master.kernel.org:/home/torvalds/BK/linux-2.6 torvalds@ppc970.osdl.org|ChangeSet|20050307220742|51594 torvalds # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/07 14:07:42-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-1394.bkbits.net/1394-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2005/03/07 14:07:36-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/07 13:54:45-08:00 torvalds@ppc970.osdl.org # Merge pcnet32 conflicting updates manually # # drivers/net/pcnet32.c # 2005/03/07 13:54:36-08:00 torvalds@ppc970.osdl.org +25 -25 # Merge pcnet32 conflicting updates manually # # include/linux/pci_ids.h # 2005/03/07 13:51:42-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/07 13:50:19-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] resync ATI PCI idents into base kernel # # include/linux/pci_ids.h # 2005/03/05 08:19:27-08:00 alan@lxorguk.ukuu.org.uk +11 -0 # resync ATI PCI idents into base kernel # # ChangeSet # 2005/03/07 13:50:06-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] stallion ressurection, phase 1 # # This gets the stallion driver working again non-SMP. Patch by Wayne # Meissner # # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # include/linux/stallion.h # 2005/03/05 07:41:16-08:00 alan@lxorguk.ukuu.org.uk +1 -1 # stallion ressurection, phase 1 # # drivers/char/stallion.c # 2005/03/05 07:32:33-08:00 alan@lxorguk.ukuu.org.uk +51 -71 # stallion ressurection, phase 1 # # ChangeSet # 2005/03/07 13:49:53-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] PCI idents for PCnet32 fix # # Sorry forgot I made these constants # # include/linux/pci_ids.h # 2005/03/05 08:19:27-08:00 alan@lxorguk.ukuu.org.uk +4 -0 # PCI idents for PCnet32 fix # # ChangeSet # 2005/03/07 13:49:40-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Restore PWC driver # # PWC has a new maintainer (Luc Saillard) and also the various contentious # binary hooks removed and replaced with reverse engineering work. # # Please restore it to the kernel # # Alan # # Signed-off-by: Luc Saillard # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # drivers/usb/media/pwc/pwc.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +278 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-uncompress.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +41 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-uncompress.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +147 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-timon.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +61 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-timon.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +1446 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-nala.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +66 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-misc.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +140 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-kiara.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +45 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-kiara.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +891 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-ioctl.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +292 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-if.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +2211 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec23.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +58 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec23.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +623 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec1.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +36 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-dec1.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +42 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc-ctrl.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +1630 -0 # Restore PWC driver # # drivers/usb/media/pwc/philips.txt # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +236 -0 # Restore PWC driver # # drivers/usb/media/pwc/Makefile # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +20 -0 # Restore PWC driver # # drivers/usb/media/pwc/pwc.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc.h # # drivers/usb/media/pwc/pwc-uncompress.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-uncompress.h # # drivers/usb/media/pwc/pwc-uncompress.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-uncompress.c # # drivers/usb/media/pwc/pwc-timon.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-timon.h # # drivers/usb/media/pwc/pwc-timon.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-timon.c # # drivers/usb/media/pwc/pwc-nala.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-nala.h # # drivers/usb/media/pwc/pwc-misc.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-misc.c # # drivers/usb/media/pwc/pwc-kiara.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-kiara.h # # drivers/usb/media/pwc/pwc-kiara.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-kiara.c # # drivers/usb/media/pwc/pwc-ioctl.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-ioctl.h # # drivers/usb/media/pwc/pwc-if.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-if.c # # drivers/usb/media/pwc/pwc-dec23.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec23.h # # drivers/usb/media/pwc/pwc-dec23.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec23.c # # drivers/usb/media/pwc/pwc-dec1.h # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec1.h # # drivers/usb/media/pwc/pwc-dec1.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-dec1.c # # drivers/usb/media/pwc/pwc-ctrl.c # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/pwc-ctrl.c # # drivers/usb/media/pwc/philips.txt # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/philips.txt # # drivers/usb/media/pwc/Makefile # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/Makefile # # drivers/usb/media/pwc/ChangeLog # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +143 -0 # Restore PWC driver # # drivers/usb/media/Makefile # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +1 -0 # Restore PWC driver # # drivers/usb/media/Kconfig # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +36 -0 # Restore PWC driver # # drivers/usb/media/pwc/ChangeLog # 2005/03/05 07:26:35-08:00 alan@lxorguk.ukuu.org.uk +0 -0 # BitKeeper file /home/torvalds/v2.6/alan/drivers/usb/media/pwc/ChangeLog # # ChangeSet # 2005/03/07 13:49:26-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Add ATP88x support to the ATP870U driver (Vendor patch) # # Patch-by: ARTOP Corp. # # Basically this adds the small bits for the new card and makes one set of items # an array because the new card is multi-channel. # # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # include/linux/pci_ids.h # 2005/03/05 08:19:27-08:00 alan@lxorguk.ukuu.org.uk +3 -0 # Add ATP88x support to the ATP870U driver (Vendor patch) # # drivers/scsi/atp870u.h # 2005/03/05 08:14:06-08:00 alan@lxorguk.ukuu.org.uk +53 -39 # Add ATP88x support to the ATP870U driver (Vendor patch) # # drivers/scsi/atp870u.c # 2005/03/05 08:14:06-08:00 alan@lxorguk.ukuu.org.uk +1845 -714 # Add ATP88x support to the ATP870U driver (Vendor patch) # # drivers/scsi/Kconfig # 2005/03/05 08:14:25-08:00 alan@lxorguk.ukuu.org.uk +2 -2 # Add ATP88x support to the ATP870U driver (Vendor patch) # # ChangeSet # 2005/03/07 13:49:13-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Fibre attached pcnet/32 # # The current driver does workarounds for errata that do not work with # fibre attached devices. This patch avoids doing the workaround on the # only known fibre attach pcnet/32 hardware. All handling is automated on # pci sub-ids # # Patch by: Guido Guenther # Signed-off-by: Alan Cox # Signed-off-by: Linus Torvalds # # drivers/net/pcnet32.c # 2005/03/05 08:12:01-08:00 alan@lxorguk.ukuu.org.uk +25 -19 # Fibre attached pcnet/32 # # ChangeSet # 2005/03/07 13:49:00-08:00 alan@lxorguk.ukuu.org.uk # [PATCH] Document a "don't do that" case for the tty layer # # Documentation/tty.txt # 2005/03/05 07:30:59-08:00 alan@lxorguk.ukuu.org.uk +5 -0 # Document a "don't do that" case for the tty layer # # ChangeSet # 2005/03/07 13:34:58-08:00 willy@parisc-linux.org # [PATCH] PA-RISC Makefile updates # # - Support sparse # - Use CONFIG_64BIT instead of CONFIG_PARISC64 # - Find palo in /sbin even if it's not in our $PATH # # Signed-off-by: Randolph Chung # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/Makefile # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +10 -3 # PA-RISC Makefile updates # # ChangeSet # 2005/03/07 13:34:43-08:00 willy@parisc-linux.org # [PATCH] PA-RISC Kconfig updates # # - Use def_bool where possible # - Eliminate PARISC64 # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/Kconfig # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +8 -16 # PA-RISC Kconfig updates # # ChangeSet # 2005/03/07 13:34:29-08:00 willy@parisc-linux.org # [PATCH] Update PA-RISC IOSAPIC driver # # - Fix all ioremap abuse noticed by CONFIG_DEBUG_IOREMAP on an N4000. # - F_EXTEND doesn't do what I thought it did on a 32-bit box. # - New calling convention for txn_alloc_irq() # - Replace CONFIG_PARISC64 with CONFIG_64BIT # - Ensure alignment of the irt buffer to 8 bytes even when slab debugging # is enabled # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/iosapic.c # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +95 -137 # Update PA-RISC IOSAPIC driver # # ChangeSet # 2005/03/07 13:34:15-08:00 willy@parisc-linux.org # [PATCH] Update PA-RISC IOMMU code # # - The pdc_io_reset_devices() call necessary for USB keyboard kills the # serial console. Use a test that seems to work for both. # - Don't bounce >4G buffers on machines with IOMMU # - Remove ASSERT code and cleanup iomem * related warnings # - Fix comment that was pointing to the old file location # - Expand comment about PDC reset to describe broken GFX+USB console at # powerup by direct linux to serial console # - Fix all ioremap abuse noticed by CONFIG_DEBUG_IOREMAP on an N4000 # - Remove casts from "READ_REG" and "WRITE_REG" macro # - Set D4 and DD bits in IOC_CTRL # - Allow all memory in machine to be in-flight DMA at once, up to 4GB # # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/sba_iommu.c # 2005/03/02 03:25:38-08:00 willy@parisc-linux.org +141 -189 # Update PA-RISC IOMMU code # # ChangeSet # 2005/03/07 13:34:01-08:00 willy@parisc-linux.org # [PATCH] Update PA-RISC PCI host adapter # # - Use CONFIG_64BIT instead of CONFIG_PARISC64 # - Rename lba_cfg_ops to elroy_cfg_ops # - Don't check for a non-1,2 or 4 size in the cfg_ops # - Call LBA_CFG_ADDR_SETUP instead of LBA_CFG_TR4_ADDR_SETUP in elroy_cfg_ops # - Don't read back from LBA_PCI_CFG_ADDR in LBA_CFG_TR4_ADDR_SETUP # - Remove LBA_FLAG_NO_DMA_DURING_CFG since it's always set for elroy_cfg_ops # - Remove LBA_TR4PLUS since we no longer need to test for it. # - Inline lba_common_init() into lba_driver_probe() # - Move TR2.1 check into an elroy-only path # - Check for LBAs that aren't Elroy, Mercury or Quicksilver. # - Remove all casts to 'int' in the driver, got rid of some unnecessary parens # and deleted the obsolete part of a comment. # - Return -EINVAL for config space >255 # - Always return 0 on config read success # - Remove definitions of TRUE and FALSE # - ioremap fix for port-io on non-PAT machines # - Remove the bad casts from the register accessors # - With those gone, I could see the piop_base needed to be remapped. # - Fix all ioremap abuse noticed by CONFIG_DEBUG_IOREMAP on an N4000. # # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/lba_pci.c # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +211 -325 # Update PA-RISC PCI host adapter # # ChangeSet # 2005/03/07 13:33:46-08:00 willy@parisc-linux.org # [PATCH] PA-RISC defconfig update # # Update a500_defconfig # Remove n4000_defconfig as a500_defconfig is now suitable for both boxes # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/configs/a500_defconfig # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +46 -18 # PA-RISC defconfig update # # BitKeeper/deleted/.del-n4000_defconfig~f54e9fd42d2c0c9c # 2005/03/07 13:33:37-08:00 willy@parisc-linux.org +0 -0 # Delete: arch/parisc/configs/n4000_defconfig # # ChangeSet # 2005/03/07 13:33:32-08:00 willy@parisc-linux.org # [PATCH] ALSA Harmony sound driver for PA-RISC # # ALSA Harmony rewrite # # Signed-Off-By: Kyle McMartin # Signed-off-by: Stuart Brady # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # sound/parisc/harmony.h # 2005/03/02 03:25:14-08:00 willy@parisc-linux.org +151 -0 # ALSA Harmony sound driver for PA-RISC # # sound/parisc/harmony.c # 2005/03/02 03:26:02-08:00 willy@parisc-linux.org +730 -885 # ALSA Harmony sound driver for PA-RISC # # sound/parisc/Kconfig # 2005/03/02 03:26:01-08:00 willy@parisc-linux.org +1 -1 # ALSA Harmony sound driver for PA-RISC # # MAINTAINERS # 2005/03/02 03:25:15-08:00 willy@parisc-linux.org +7 -0 # ALSA Harmony sound driver for PA-RISC # # sound/parisc/harmony.h # 2005/03/02 03:25:14-08:00 willy@parisc-linux.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/sound/parisc/harmony.h # # ChangeSet # 2005/03/07 13:33:16-08:00 willy@parisc-linux.org # [PATCH] PA-RISC PDC stable storage driver # # Add PDC stable storage driver. Also reorganise PA-RISC Kconfig a little. # # Signed-off-by: Thibaut VARENE # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parisc/pdc_stable.c # 2005/03/02 03:24:55-08:00 willy@parisc-linux.org +735 -0 # PA-RISC PDC stable storage driver # # drivers/parisc/Makefile # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +1 -0 # PA-RISC PDC stable storage driver # # drivers/parisc/Kconfig # 2005/03/02 03:25:37-08:00 willy@parisc-linux.org +21 -4 # PA-RISC PDC stable storage driver # # drivers/parisc/pdc_stable.c # 2005/03/02 03:24:55-08:00 willy@parisc-linux.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/parisc/pdc_stable.c # # ChangeSet # 2005/03/07 13:33:01-08:00 willy@parisc-linux.org # [PATCH] Convert from a struct dev to a firmware hwpath # # PA-RISC firmware needs a hwpath which can be constructed from a pci_dev # or a parisc_device. Previously we've known what type of device we had, # but when using sysfs we have to figure it out. # # Signed-off-by: Thibaut VARENE # Signed-off-by: Linus Torvalds # # include/asm-parisc/hardware.h # 2005/03/02 03:25:51-08:00 willy@parisc-linux.org +1 -0 # Convert from a struct dev to a firmware hwpath # # arch/parisc/kernel/drivers.c # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +19 -1 # Convert from a struct dev to a firmware hwpath # # ChangeSet # 2005/03/07 13:32:46-08:00 willy@parisc-linux.org # [PATCH] Convert PARISC64 to 64BIT # # More CONFIG_PARISC64 to CONFIG_64BIT conversion # # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/kernel/vmlinux.lds.S # 2005/03/02 03:25:26-08:00 willy@parisc-linux.org +4 -4 # Convert PARISC64 to 64BIT # # arch/parisc/kernel/perf_asm.S # 2005/03/02 03:25:25-08:00 willy@parisc-linux.org +2 -2 # Convert PARISC64 to 64BIT # # arch/parisc/kernel/pdc_chassis.c # 2005/03/02 03:25:25-08:00 willy@parisc-linux.org +2 -2 # Convert PARISC64 to 64BIT # # arch/parisc/kernel/Makefile # 2005/03/02 03:25:23-08:00 willy@parisc-linux.org +2 -2 # Convert PARISC64 to 64BIT # # ChangeSet # 2005/03/07 13:32:32-08:00 willy@parisc-linux.org # [PATCH] GCC 3.4 fixes for PA-RISC parport support # # - Move include/asm/parport_gsc.h to drivers/parport/ # - Fix gcc 3.4 compilation (redefined extern inline functions are not # considered for inlining) # # From: Joel Soete # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # drivers/parport/parport_gsc.h # 2005/01/19 12:49:36-08:00 willy@parisc-linux.org +52 -23 # GCC 3.4 fixes for PA-RISC parport support # # drivers/parport/parport_gsc.c # 2005/01/19 12:55:28-08:00 willy@parisc-linux.org +1 -90 # GCC 3.4 fixes for PA-RISC parport support # # ChangeSet # 2005/03/07 13:31:48-08:00 willy@parisc-linux.org # [PATCH] PA-RISC copy/clear_user_page improvements # # - Performance improvement to __clear_user_page_asm # - White space cleanup # - 64-bit version of copy_user_page_asm # - Add prefetching to copy_user_page_asm # - remove NOP and "bundle" comments # # Contributions from Joel Soete # Signed-off-by: Grant Grundler # Signed-off-by: Matthew Wilcox # Signed-off-by: Linus Torvalds # # arch/parisc/kernel/pacache.S # 2005/03/02 03:25:24-08:00 willy@parisc-linux.org +610 -524 # PA-RISC copy/clear_user_page improvements # # ChangeSet # 2005/03/07 09:34:59-08:00 herbert@gondor.apana.org.au # [IPSEC]: Kill redundant dst_release check in xfrm_dst_destroy # # Here's a trivial patch to get rid of a redundant check that I added # in patch 3/4. dst_release already checks for dst == NULL. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/07 09:34:47-08:00 herbert@gondor.apana.org.au +1 -2 # [IPSEC]: Kill redundant dst_release check in xfrm_dst_destroy # # Here's a trivial patch to get rid of a redundant check that I added # in patch 3/4. dst_release already checks for dst == NULL. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 09:33:29-08:00 akpm@osdl.org # [ATALK]: linux/atalk.h needs net/sock.h # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # include/linux/atalk.h # 2005/03/07 09:33:17-08:00 akpm@osdl.org +3 -0 # [ATALK]: linux/atalk.h needs net/sock.h # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 09:32:25-08:00 herbert@gondor.apana.org.au # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +3 -7 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +5 -11 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +3 -7 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/tcp.h # 2005/03/07 09:32:09-08:00 herbert@gondor.apana.org.au +4 -6 # [IPSEC]: Get rid of dst_pmtu/ext2_header_len # # Here is a patch that replaces all occurrences of dst_pmtu in the TCP # stack. As a result we no longer need ext2_header_len. # # This has a nice synergetic effect with Arnaldo's latest change to # linux/tcp.h :) # # I'll be removing other users of dst->path/dst_pmtu next. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 09:31:04-08:00 herbert@gondor.apana.org.au # [IPSEC]: Check dst validity harder in xfrm_bundle_ok # # There is another bug in xfrm_bundle_ok where I forgot to # check the validity of xdst->route. In fact, the check # on dst->path isn't strong enough either. For IPv6 entries, # dst->path->obsolete is always negative until you call # ipv6_dst_check. So we really need to do that here. # # Here's the patch to fix those two problems. Yes I know # my dst_check implementation is lame. I'll come back and # fix up all the dst_check functions by moving their dst_release # calls out. It proves that you were right in that IPv6 dst # leak thread :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/07 09:30:52-08:00 herbert@gondor.apana.org.au +3 -1 # [IPSEC]: Check dst validity harder in xfrm_bundle_ok # # There is another bug in xfrm_bundle_ok where I forgot to # check the validity of xdst->route. In fact, the check # on dst->path isn't strong enough either. For IPv6 entries, # dst->path->obsolete is always negative until you call # ipv6_dst_check. So we really need to do that here. # # Here's the patch to fix those two problems. Yes I know # my dst_check implementation is lame. I'll come back and # fix up all the dst_check functions by moving their dst_release # calls out. It proves that you were right in that IPv6 dst # leak thread :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/03/07 09:30:52-08:00 herbert@gondor.apana.org.au +9 -0 # [IPSEC]: Check dst validity harder in xfrm_bundle_ok # # There is another bug in xfrm_bundle_ok where I forgot to # check the validity of xdst->route. In fact, the check # on dst->path isn't strong enough either. For IPv6 entries, # dst->path->obsolete is always negative until you call # ipv6_dst_check. So we really need to do that here. # # Here's the patch to fix those two problems. Yes I know # my dst_check implementation is lame. I'll come back and # fix up all the dst_check functions by moving their dst_release # calls out. It proves that you were right in that IPv6 dst # leak thread :) # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/07 01:52:19-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/libata-dev/remove-one-fix # # drivers/scsi/libata-core.c # 2005/03/07 01:52:11-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:48:21-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/libata-dev/janitor # into pobox.com:/garz/repo/libata-2.6 # # drivers/scsi/sata_vsc.c # 2005/03/07 01:48:15-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:37:25-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/smc91x # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/Kconfig # 2005/03/07 01:37:22-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:35:21-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/s2io # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/s2io.c # 2005/03/07 01:35:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:33:21-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/pm_message_t # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/via-velocity.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/typhoon.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/tg3.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/eepro100.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/amd8111e.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/8139too.c # 2005/03/07 01:33:18-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/07 01:30:13-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/bonding # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/Kconfig # 2005/03/07 01:30:10-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/06 21:36:51-08:00 herbert@gondor.apana.org.au # [IPSEC]: Get metrics for xfrm_dst from top dst # # For the metrics other than MTU, we should also be getting it from # the top dst as opposed to the bottom dst. With this change, the # user is able to manipulate values such as advmss for individual # hosts behind a remote IPsec gateway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:36:27-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Get metrics for xfrm_dst from top dst # # For the metrics other than MTU, we should also be getting it from # the top dst as opposed to the bottom dst. With this change, the # user is able to manipulate values such as advmss for individual # hosts behind a remote IPsec gateway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:36:27-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Get metrics for xfrm_dst from top dst # # For the metrics other than MTU, we should also be getting it from # the top dst as opposed to the bottom dst. With this change, the # user is able to manipulate values such as advmss for individual # hosts behind a remote IPsec gateway. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:35:27-08:00 herbert@gondor.apana.org.au # [IPSEC]: Fix xfrm[46]_update_pmtu to update top dst # # Let's also fix IPsec PMTU storage. When we get an MTU update for an # xfrm_dst, it should be done to the top dst, not the bottom dst. # # For example, when we get a need-to-frag message for host C behind # a our IPsec peer B, we should be updating the dst entry for C and # not B as we do now. # # I've removed the boundary checks since the same checks are done # in ipv[46]/route.c already. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:35:03-08:00 herbert@gondor.apana.org.au +3 -5 # [IPSEC]: Fix xfrm[46]_update_pmtu to update top dst # # Let's also fix IPsec PMTU storage. When we get an MTU update for an # xfrm_dst, it should be done to the top dst, not the bottom dst. # # For example, when we get a need-to-frag message for host C behind # a our IPsec peer B, we should be updating the dst entry for C and # not B as we do now. # # I've removed the boundary checks since the same checks are done # in ipv[46]/route.c already. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:35:03-08:00 herbert@gondor.apana.org.au +2 -4 # [IPSEC]: Fix xfrm[46]_update_pmtu to update top dst # # Let's also fix IPsec PMTU storage. When we get an MTU update for an # xfrm_dst, it should be done to the top dst, not the bottom dst. # # For example, when we get a need-to-frag message for host C behind # a our IPsec peer B, we should be updating the dst entry for C and # not B as we do now. # # I've removed the boundary checks since the same checks are done # in ipv[46]/route.c already. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:34:23-08:00 herbert@gondor.apana.org.au # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2005/03/06 21:33:59-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2005/03/06 21:33:59-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/dst.h # 2005/03/06 21:33:59-08:00 herbert@gondor.apana.org.au +10 -0 # [IPSEC]: Use dst_mtu i n xfrm[46]_output # # There was a lot of fun in laying the foundations. Now it's time # to start using it. # # This patch fixes the calculations in xfrm[46]_output so that we don't # reject properly sized packets from the TCP stack. The previous # calculation is wrong because the xfrm overhead is not constant. # # After this I'll start cleaning stuff up. For example, tcp's # ext2_header_len and dst's path can both be removed. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:31:52-08:00 herbert@gondor.apana.org.au # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +63 -2 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +2 -0 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +2 -0 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/03/06 21:31:30-08:00 herbert@gondor.apana.org.au +3 -0 # [IPSEC]: Store MTU at each xfrm_dst # # Finally this is the patch that sets the MTU values of each xfrm_dst # and keeps it up-to-date. # # To recap, at this point we've obtained accurate MTU values at each # xfrm_dst. The next step would be to start using it as # dst_pmtu(xfrm_dst). # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:27:44-08:00 herbert@gondor.apana.org.au # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +5 -0 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_policy.c # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +33 -17 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_policy.c # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +33 -15 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/03/06 21:27:20-08:00 herbert@gondor.apana.org.au +1 -0 # [IPSEC]: Add route element to xfrm_dst # # This patch adds a pointer to the route corresponding to the specific # flow over the SA of an xfrm_dst that's being used. # # It also sets the next pointer of each xfrm_dst to the one above it. # This allows to traverse the list upwards from the bottom. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:24:19-08:00 herbert@gondor.apana.org.au # [IPSEC]: Add xfrm_state_mtu() # # This patch introduces the function xfrm_state_mtu which calculates # the MTU under a specific SA. This function can be simplified once # we get rid all other uses of get_max_size as we can move the calculation # into the invidual SA type. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_state.c # 2005/03/06 21:23:53-08:00 herbert@gondor.apana.org.au +30 -0 # [IPSEC]: Add xfrm_state_mtu() # # This patch introduces the function xfrm_state_mtu which calculates # the MTU under a specific SA. This function can be simplified once # we get rid all other uses of get_max_size as we can move the calculation # into the invidual SA type. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/03/06 21:23:53-08:00 herbert@gondor.apana.org.au +1 -0 # [IPSEC]: Add xfrm_state_mtu() # # This patch introduces the function xfrm_state_mtu which calculates # the MTU under a specific SA. This function can be simplified once # we get rid all other uses of get_max_size as we can move the calculation # into the invidual SA type. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 21:03:21-08:00 herbert@gondor.apana.org.au # [CRYPTO]: Mark myself as co-maintainer. # # James is stepping down for a while. # # Signed-off-by: David S. Miller # # MAINTAINERS # 2005/03/06 21:02:57-08:00 herbert@gondor.apana.org.au +2 -3 # [CRYPTO]: Mark myself as co-maintainer. # # James is stepping down for a while. # # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/06 17:25:39-08:00 sfr@canb.auug.org.au # [PATCH] Consolidate compat_sys_waitid # # This patch does: # - consolidate the three implementations of compat_sys_waitid # (some were called sys32_waitid). # - adds sys_waitid syscall to ppc # - adds sys_waitid and compat_sys_waitid syscalls to ppc64 # # I have left PARISC and MIPS to their own devices (by request). # # Signed-off-by: Stephen Rothwell # Signed-off-by: Linus Torvalds # # kernel/compat.c # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +31 -0 # Consolidate compat_sys_waitid # # include/linux/compat.h # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +6 -1 # Consolidate compat_sys_waitid # # include/asm-ppc64/unistd.h # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +2 -1 # Consolidate compat_sys_waitid # # include/asm-ppc/unistd.h # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +2 -1 # Consolidate compat_sys_waitid # # arch/x86_64/ia32/sys_ia32.c # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +0 -26 # Consolidate compat_sys_waitid # # arch/x86_64/ia32/ia32entry.S # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +1 -1 # Consolidate compat_sys_waitid # # arch/sparc64/kernel/sys_sparc32.c # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +0 -31 # Consolidate compat_sys_waitid # # arch/ppc64/kernel/misc.S # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +2 -0 # Consolidate compat_sys_waitid # # arch/ppc/kernel/misc.S # 2005/03/06 15:58:58-08:00 sfr@canb.auug.org.au +1 -0 # Consolidate compat_sys_waitid # # arch/ia64/ia32/sys_ia32.c # 2005/03/06 15:58:57-08:00 sfr@canb.auug.org.au +0 -26 # Consolidate compat_sys_waitid # # arch/ia64/ia32/ia32_entry.S # 2005/03/06 15:58:57-08:00 sfr@canb.auug.org.au +1 -1 # Consolidate compat_sys_waitid # # ChangeSet # 2005/03/06 17:04:35-08:00 torvalds@ppc970.osdl.org # Merge bk://gkernel.bkbits.net/net-drivers-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2005/03/06 17:04:30-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 17:03:25-08:00 torvalds@ppc970.osdl.org # Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/asm-arm/pgtable.h # 2005/03/06 17:03:21-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:59:24-08:00 torvalds@ppc970.osdl.org # Merge bk://linux-dj.bkbits.net/agpgart # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/linux/agp_backend.h # 2005/03/06 16:59:19-08:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # drivers/char/agp/sis-agp.c # 2005/03/06 16:59:19-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # drivers/char/agp/generic.c # 2005/03/06 16:59:19-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:58:12-08:00 torvalds@ppc970.osdl.org # Merge http://jfs.bkbits.net/linux-2.5 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # MAINTAINERS # 2005/03/06 16:58:07-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:56:53-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/net-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/net/tg3.c # 2005/03/06 16:56:48-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:55:28-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/davem/flush_cache_page-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # mm/rmap.c # 2005/03/06 16:55:23-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # mm/memory.c # 2005/03/06 16:55:23-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # mm/fremap.c # 2005/03/06 16:55:23-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/06 16:52:04-08:00 dan@debian.org # [PATCH] x86: fix TF bit corner case with ptrace and signals # # If a debugger set the TF bit, make sure to clear it when creating a # signal context. Otherwise, TF will be incorrectly restored by # sigreturn. # # Signed-off-by: Daniel Jacobowitz # Signed-off-by: Linus Torvalds # # arch/i386/kernel/signal.c # 2005/03/06 12:36:41-08:00 dan@debian.org +12 -0 # x86: fix TF bit corner case with ptrace and signals # # ChangeSet # 2005/03/06 18:11:09-05:00 davej@redhat.com # [AGPGART] vfree() checking cleanups # # generic.c vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/03/06 18:11:00-05:00 davej@redhat.com +1 -3 # [AGPGART] vfree() checking cleanups # # generic.c vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/06 23:07:50+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2515/1: S3C2410 - allow serial to use fclk on s3c2440 # # Patch from Ben Dooks # # This patch extends the s3c2410 serial driver to allow it # to use fclk and correctly determine the uart dividers. The # necessary defines are added to the serial headers as well. # Also modified is the header to point at the current # Simtec linux pages, as well as extend the copyright. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-serial.h # 2005/03/06 12:59:10+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2515/1: S3C2410 - allow serial to use fclk on s3c2440 # # drivers/serial/s3c2410.c # 2005/03/06 14:36:49+00:00 ben-linux@org.rmk.(none) +116 -25 # [PATCH] 2515/1: S3C2410 - allow serial to use fclk on s3c2440 # # ChangeSet # 2005/03/06 22:33:13+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update mach-types from website. # # Signed-off-by: Russell King # # arch/arm/tools/mach-types # 2005/03/06 22:28:32+00:00 rmk@flint.arm.linux.org.uk +44 -3 # Update from web site. # # ChangeSet # 2005/03/06 19:53:37+00:00 rmk@flint.arm.linux.org.uk # [ARM] Simplify /proc/driver/rtc procfs interface. # # The read method doesn't need to calculate eof/start offsets. # # Signed-off-by: Russell King # # arch/arm/common/rtctime.c # 2005/03/06 19:49:31+00:00 rmk@flint.arm.linux.org.uk +1 -8 # Simplify /proc/driver/rtc procfs interface. # # The read method doesn't need to calculate eof/start offsets. # # ChangeSet # 2005/03/06 19:05:01+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add validation function for struct rtc_time # # Signed-off-by: Russell King # # include/asm-arm/rtc.h # 2005/03/06 19:00:53+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add new function prototype for rtc_valid_tm() # # arch/arm/common/rtctime.c # 2005/03/06 19:00:52+00:00 rmk@flint.arm.linux.org.uk +20 -9 # Add rtc_valid_tm() to check validity of a struct rtc_time. # Move check for valid rtc_time into rtc_set_time. # # ChangeSet # 2005/03/05 21:23:33-08:00 lethal@linux-sh.org # [SH]: Cache flush simplifications after flush_cache_page() arg change. # # Signed-off-by: David S. Miller # # arch/sh64/mm/cache.c # 2005/03/05 21:23:02-08:00 lethal@linux-sh.org +1 -6 # [SH]: Cache flush simplifications after flush_cache_page() arg change. # # arch/sh/mm/cache-sh4.c # 2005/03/05 21:23:02-08:00 lethal@linux-sh.org +1 -2 # [SH]: Cache flush simplifications after flush_cache_page() arg change. # # ChangeSet # 2005/03/05 21:15:21-08:00 davem@picasso.davemloft.net # Merge davem@nuts:/disk1/BK/flush_cache_page-2.6 # into picasso.davemloft.net:/home/davem/src/BK/flush_cache_page-2.6 # # mm/rmap.c # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/memory.c # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-ppc64/cacheflush.h # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-parisc/cacheflush.h # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-arm/cacheflush.h # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # fs/binfmt_elf.c # 2005/03/05 21:15:17-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 20:52:11-08:00 davem@nuts.davemloft.net # Merge http://linux-mh.bkbits.net/bluetooth-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # MAINTAINERS # 2005/03/05 20:51:58-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 20:48:01-08:00 davem@picasso.davemloft.net # Merge davem@nuts:/disk1/BK/set_pte-2.6 # into picasso.davemloft.net:/home/davem/src/BK/set_pte-2.6 # # mm/swapfile.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/rmap.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/mremap.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # mm/memory.c # 2005/03/05 20:47:57-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # include/asm-arm/pgtable.h # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # fs/exec.c # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # arch/ppc64/mm/init.c # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # arch/ppc64/mm/hugetlbpage.c # 2005/03/05 20:47:56-08:00 davem@picasso.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 20:43:56-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/net-2.6.12 # into nuts.davemloft.net:/disk1/BK/net-2.6 # # net/ipv4/route.c # 2005/03/05 20:43:44-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # include/linux/random.h # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/ixgb/ixgb_main.c # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/e1000/e1000_main.c # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/random.c # 2005/03/05 20:43:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/05 16:26:40-08:00 torvalds@evo.osdl.org # x86: make put_user() out-of-line # # This makes the resulting assembly not only easier to read, # it results in roughly a 0.5% savings in code size. # # Fixes from Richard Henderson for the original broken asm # constraints. # # arch/i386/lib/putuser.S # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +87 -0 # # include/asm-i386/uaccess.h # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +27 -13 # x86: make put_user() out-of-line # # arch/i386/lib/putuser.S # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/i386/lib/putuser.S # # arch/i386/lib/Makefile # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +1 -1 # x86: make put_user() out-of-line # # arch/i386/kernel/i386_ksyms.c # 2005/03/05 16:26:28-08:00 torvalds@evo.osdl.org +5 -0 # x86: make put_user() out-of-line # # ChangeSet # 2005/03/05 18:11:05-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/mips # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/s2io.c # 2005/03/05 18:11:02-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # drivers/net/Kconfig # 2005/03/05 18:11:02-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 18:10:00-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/sk98lin # into pobox.com:/garz/repo/net-drivers-2.6 # # drivers/net/sk98lin/skge.c # 2005/03/05 18:09:57-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 18:08:48-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/wan-fixes # into pobox.com:/garz/repo/net-drivers-2.6 # # MAINTAINERS # 2005/03/05 18:08:45-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 18:07:32-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/pcnet32 # into pobox.com:/garz/repo/net-drivers-2.6 # # include/linux/pci_ids.h # 2005/03/05 18:07:29-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/03/05 17:55:29-05:00 galak@freescale.com # [PATCH] initialize a spin lock in gianfar driver # # Initialize the mdio_lock spin lock in mii_info struct, which is otherwise # accessed prior to initialization. # # Signed-off-by: Jaka Mocnik # Signed-off-by: Kumar Gala # Signed-off-by: Jeff Garzik # # drivers/net/gianfar.c # 2005/03/05 00:03:27-05:00 galak@freescale.com +2 -0 # initialize a spin lock in gianfar driver # # ChangeSet # 2005/03/05 17:50:51-05:00 lethal@linux-sh.org # [PATCH] net: port smc91x to SH4-202 Microdev. # # Here is a patch that gets the smc91x driver working on the # SH4-202 Microdev board. # # Signed-off-by: Paul Mundt # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2005/03/04 13:40:57-05:00 lethal@linux-sh.org +19 -0 # net: port smc91x to SH4-202 Microdev. # # drivers/net/Kconfig # 2005/03/04 13:40:57-05:00 lethal@linux-sh.org +1 -1 # net: port smc91x to SH4-202 Microdev. # # ChangeSet # 2005/03/05 13:26:50-08:00 torvalds@ppc970.osdl.org # Merge bk://gkernel.bkbits.net/net-drivers-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # drivers/net/typhoon.c # 2005/03/05 13:26:45-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # drivers/net/Kconfig # 2005/03/05 13:26:45-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/05 09:37:01-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: update CMU # # This patch updates cmu.c to get the resource by standard method. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/vr41xx/common/cmu.c # 2005/03/04 22:41:56-08:00 yuasa@hh.iij4u.or.jp +47 -20 # mips: update CMU # # arch/mips/pci/pci-vr41xx.c # 2005/03/04 22:41:56-08:00 yuasa@hh.iij4u.or.jp +1 -1 # mips: update CMU # # ChangeSet # 2005/03/05 09:36:48-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: calculate clock at any time # # This patch changes bcu.c to calculate clock at any time. Because clock can # be changed. Moreover, EXPORT_SYMBOL_GPLs are added to it. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-mips/vr41xx/vr41xx.h # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +1 -0 # mips: calculate clock at any time # # arch/mips/vr41xx/common/ksyms.c # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +0 -3 # mips: calculate clock at any time # # arch/mips/vr41xx/common/init.c # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +16 -1 # mips: calculate clock at any time # # arch/mips/vr41xx/common/bcu.c # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +10 -15 # mips: calculate clock at any time # # ChangeSet # 2005/03/05 09:36:33-08:00 yuasa@hh.iij4u.or.jp # [PATCH] mips: add TANBAC TB0219 base board driver # # This patch adds GPIO/LED/DIPSW driver for TANBAC TB0219. # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/char/tb0219.c # 2005/03/05 09:36:24-08:00 yuasa@hh.iij4u.or.jp +347 -0 # # drivers/char/Makefile # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +1 -0 # mips: add TANBAC TB0219 base board driver # # drivers/char/Kconfig # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +4 -0 # mips: add TANBAC TB0219 base board driver # # arch/mips/vr41xx/tanbac-tb0229/Makefile # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +0 -2 # mips: add TANBAC TB0219 base board driver # # arch/mips/Kconfig # 2005/03/04 22:41:55-08:00 yuasa@hh.iij4u.or.jp +0 -4 # mips: add TANBAC TB0219 base board driver # # drivers/char/tb0219.c # 2005/03/05 09:36:24-08:00 yuasa@hh.iij4u.or.jp +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/char/tb0219.c # # BitKeeper/deleted/.del-tb0219.c~8b2edbef490c5193 # 2005/03/05 09:36:24-08:00 yuasa@hh.iij4u.or.jp +0 -0 # Delete: arch/mips/vr41xx/tanbac-tb0229/tb0219.c # # ChangeSet # 2005/03/05 09:35:39-08:00 moilanen@austin.ibm.com # [PATCH] ppc64: offb remapped address # # The offb code did not take into account a remapped pci address. Adding in # the pci_mem_offset fixed a DSI in offb. # # Signed-off-by: Jake Moilanen # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/video/offb.c # 2005/03/04 22:41:55-08:00 moilanen@austin.ibm.com +10 -1 # ppc64: offb remapped address # # ChangeSet # 2005/03/05 09:35:25-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix zImage wrapper incorrect size to flush_cache() # # This patch fixes a bug in the ppc64 zImage wrapper causing it to pass an # incorrect size to flush_cache() when flushing the data and instruction # caches prior to jumping to the kernel entry. This causes crashes on # firmare environment that do strict MMU mapping only of actually allocated # areas # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/boot/main.c # 2005/03/04 22:41:55-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Fix zImage wrapper incorrect size to flush_cache() # # ChangeSet # 2005/03/05 09:35:12-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Fix thinko in prom_init.c # # (It's a real bug, but I suspect it doesn't trigger normally as we tend # to allocate the initrd low, but it should be fixed anyway). # # This patch fixes an error in prom_init.c in the check for the initrd # location vs. the memory allocation mecanism. # # Signed-off-by: Arnd Bergmann # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/prom_init.c # 2005/03/04 22:41:55-08:00 benh@kernel.crashing.org +1 -2 # ppc64: Fix thinko in prom_init.c # # ChangeSet # 2005/03/05 09:34:58-08:00 david@gibson.dropbear.id.au # [PATCH] ppc64: functions to reserve performance monitor hardware # # The PPC64 interrupt code includes a hook to call when an exception # from the performance monitor unit occurs. However, there's no way of # reserving the hook properly, so if more than one bit of code tries to # use it things will get ugly. Currently oprofile is the only user, but # there are likely to be more in future e.g. perfctr, if and when it # reaches a fit state for merging. # # This patch creates functions to reserve and release the performance # monitor hardware (including its interrupt), and makes oprofile use # them. It also creates a new arch/ppc64/kernel/pmc.c, in which we can # put any future helper functions for handling the performance monitor # counters. # # Signed-off-by: David Gibson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/pmc.h # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +29 -0 # ppc64: functions to reserve performance monitor hardware # # include/asm-ppc64/pmc.h # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/pmc.h # # arch/ppc64/oprofile/common.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +7 -11 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/traps.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +2 -12 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/pmc.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +64 -0 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/Makefile # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +1 -1 # ppc64: functions to reserve performance monitor hardware # # arch/ppc64/kernel/pmc.c # 2005/03/04 22:41:55-08:00 david@gibson.dropbear.id.au +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/pmc.c # # ChangeSet # 2005/03/05 09:34:42-08:00 olh@suse.de # [PATCH] ppc64: use vmlinux during make install on ppc64 # # make install passes the zImage to the installkernel script. When an initrd is # used, this script has to pull out the vmlinux from the zImage because yaboot # can not boot a zImage+initrd combo. It can only handle vmlinux+initrd or # zImage.initrd. Its simple to just pass the plain vmlinux instead. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/boot/install.sh # 2005/03/04 22:41:55-08:00 olh@suse.de +2 -1 # ppc64: use vmlinux during make install on ppc64 # # arch/ppc64/boot/Makefile # 2005/03/04 22:41:55-08:00 olh@suse.de +2 -2 # ppc64: use vmlinux during make install on ppc64 # # arch/ppc64/Makefile # 2005/03/04 22:41:55-08:00 olh@suse.de +9 -3 # ppc64: use vmlinux during make install on ppc64 # # ChangeSet # 2005/03/05 09:34:28-08:00 olh@suse.de # [PATCH] ppc64: disable HMT for RS64 cpus # # Hardware multithreading for RS64 cpus is currently broken. Anton sent me a # patch a few weeks ago, but it did not work. So just hide the config option # for the time being. # # Signed-off-by: Olaf Hering # Acked-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/Kconfig # 2005/03/04 22:41:54-08:00 olh@suse.de +4 -1 # ppc64: disable HMT for RS64 cpus # # ChangeSet # 2005/03/05 09:34:14-08:00 akpm@osdl.org # [PATCH] ppc64: generic hotplug cpu support fix # # Fix a false-positive from the smp_processor_id() debugging code. Idle threads # are per-cpu anwyay. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/idle.c # 2005/03/04 22:41:54-08:00 akpm@osdl.org +1 -1 # ppc64: generic hotplug cpu support fix # # ChangeSet # 2005/03/05 09:34:00-08:00 zwane@arm.linux.org.uk # [PATCH] ppc64: generic hotplug cpu support # # Patch provides a generic hotplug cpu implementation, with the only current # user being pmac. This doesn't replace real hotplug code as is currently # used by LPAR systems. Ben i can add the additional pmac specific code to # put the processor into a sleeping state seperately. Thanks to Nathan for # testing. # # Signed-off-by: Zwane Mwaikambo # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/smp.h # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +8 -1 # ppc64: generic hotplug cpu support # # include/asm-ppc64/machdep.h # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +1 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/sysfs.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +2 -4 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/smp.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +80 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/setup.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +0 -3 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/pmac_smp.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +5 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/pmac_setup.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +3 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/pSeries_setup.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +3 -2 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/irq.c # 2005/03/04 22:41:54-08:00 zwane@arm.linux.org.uk +29 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/kernel/idle.c # 2005/03/04 23:17:15-08:00 zwane@arm.linux.org.uk +4 -0 # ppc64: generic hotplug cpu support # # arch/ppc64/Kconfig # 2005/03/04 23:17:15-08:00 zwane@arm.linux.org.uk +1 -1 # ppc64: generic hotplug cpu support # # ChangeSet # 2005/03/05 09:33:46-08:00 akpm@osdl.org # [PATCH] ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround # # I cannot find a version of binutils which doesn't either do # # arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages: # arch/ppc64/kernel/vdso32/gettimeofday.S:33: Error: syntax error; found `@' but expected `,' # # or # # arch/ppc64/kernel/vdso32/gettimeofday.S: Assembler messages: # arch/ppc64/kernel/vdso32/gettimeofday.S:33: Internal error, aborting at ../../gas/config/tc-ppc.c line 2658 in md_assemble # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/vdso32/gettimeofday.S # 2005/03/04 22:41:54-08:00 akpm@osdl.org +2 -2 # ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround # # arch/ppc64/kernel/vdso32/datapage.S # 2005/03/04 22:41:54-08:00 akpm@osdl.org +1 -1 # ppc64-implement-a-vdso-and-use-it-for-signal-trampoline gas workaround # # ChangeSet # 2005/03/05 09:33:32-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Implement a vDSO and use it for signal trampoline # # This patch adds to the ppc64 kernel a virtual .so (vDSO) that is mapped # into every process space, similar to the x86 vsyscall page. However, the # implementation is very different (and doesn't use the gate area mecanism). # Actually, it contains two implementations, a 32 bits and a 64 bits one. # # These vDSO's are currently mapped at 0x100000 (+1Mb) when possible (when a # process load section isn't already there). In the future, we can randomize # that address, or even imagine having a special phdr entry letting apps that # wnat finer control over their address space to put it elsewhere (or not at # all). # # The implementation adds a hook to binfmt_elf to let the architecture add a # real VMA to the process space instead of using the gate area mecanism. # This mecanism wasn't very suitable for ppc, we couldn't just "shove" PTE # entries mapping kernel addresses into userland without expensive changes to # our hash table management. Instead, I made the vDSO be a normal VMA which, # additionally, means it supports copy-on-write semantics if made writable # via ptrace/mprotect, thus allowing breakpoints in the vDSO code. # # The current implementation of the vDSOs contain the signal trampolines with # appropriate DWARF informations, which enable us to use non-executable # stacks (patches to come later) along with a few more functions that we hope # glibc will soon make good use of (this is the "hard" part now :) Note that # the symbols exposed by the vDSO aren't "normal" function symbols, apps # can't be expected to link against them directly, the vDSO's are both seen # as if they were linked at 0 and the symbols just contain offsets to the # various functions. This is done on purpose to avoid a relocation step # (ppc64 functions normally have descriptors with abs addresses in them). # When glibc uses those functions, it's expected to use it's own trampolines # that know how to reach them. # # In some cases, the vDSO contains several versions of a given function (for # various CPUs), the kernel will "patch" the symbol table at boot to make it # point to the appropriate one transparently. What is currently implemented # is: # # - int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz); # # This is a fully userland implementation of gettimeofday, with no barriers # and no locks, and providing 100% equivalent results to the syscall version # # - void __kernel_sync_dicache(unsigned long start, unsigned long end) # # This function sync's the data and instruction caches (for making data # executable), it is expected that userland loaders use this instead of # doing it themselves, as the kernel will provide optimized versions for the # current CPU. Currently, the vDSO procides a full one for all CPUs prior # to POWER5 and a nop one for POWER5 which implements hardware snooping at # the L1 level. In the future, an intermediate implementation may be done # for the POWER4 and 970 which don't need the "dcbst" loop (the L1D cache is # write-through on those). # # - void *__kernel_get_syscall_map(unsigned int *syscall_count); # # Returns a pointer to a map of implemented syscalls on the currently # running kernel. The map is agnostic to the size of "long", unlike kernel # bitops, it stores bits from top to bottom so that memory actually contains # a linear bitmap check for syscall N by testing bit (0x80000000 >> (N & # 0x1f)) of * 32 bits int at N >> 5. # # Note about backward compatibility issues: A bug in the ppc64 libgcc # unwinder makes it unable to unwind stacks properly accross signals if the # signal trampoline isn't on the stack. This has been fixed in CVS for gcc # 4.0 and will be soon on the stable branch, but the problem exist will all # currently used versions. # # That means that until glibc gets the patch to enable it's use of the vDSO # symbols for the DWARF unwinder (rather trivial patch that will be pushed to # glibc CVS soon hopefully), unwinding from a signal handler will not work # for 64 bits applications. # # I consider this as a non-issue though as a patch is about to be produced, # which can easily get pushed to "live" distros like debian, gentoo, fedora, # etc... soon enough (it breaks compatilbity with kernels below 2.4.20 # unfortunately as our signal stack layout changed, crap crap crap), as there # are few 64 bits applications out there (expect gentoo), as it's only really # an issue with C++ code relying on throwing exceptions out of signal # handlers (extremely rare it seems), and as "release" distros like SLES or # RHEL will probably have the vDSO enabled glibc _and_ the unwinder fix by # the time they release a version with a 2.6.11 or 2.6.12 kernel anyway :) # # So far, I yet have to see an app failing because of that... # # Finally, many many many thanks to Alan Modra for writing the DWARF # information of the signal handlers and debugging the libgcc issues ! # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/vdso.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +83 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/vdso64_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +13 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/vdso64.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +110 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +294 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/gettimeofday.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +91 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/datapage.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +68 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +64 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +35 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/vdso32_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +13 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/vdso32.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +111 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +300 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/gettimeofday.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +139 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/datapage.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +68 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +36 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +614 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/vdso.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc64/vdso.h # # include/asm-ppc64/time.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/systemcfg.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +7 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/processor.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +3 -3 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/page.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +3 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/elf.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +12 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # include/asm-ppc64/a.out.h # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +4 -7 # ppc64: Implement a vDSO and use it for signal trampoline # # fs/binfmt_elf.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +8 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/mm/init.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +3 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso64/vdso64_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/vdso64_wrapper.S # # arch/ppc64/kernel/vdso64/vdso64.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/vdso64.lds.S # # arch/ppc64/kernel/vdso64/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/sigtramp.S # # arch/ppc64/kernel/vdso64/gettimeofday.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/gettimeofday.S # # arch/ppc64/kernel/vdso64/datapage.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/datapage.S # # arch/ppc64/kernel/vdso64/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/cacheflush.S # # arch/ppc64/kernel/vdso64/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso64/Makefile # # arch/ppc64/kernel/vdso32/vdso32_wrapper.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/vdso32_wrapper.S # # arch/ppc64/kernel/vdso32/vdso32.lds.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/vdso32.lds.S # # arch/ppc64/kernel/vdso32/sigtramp.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/sigtramp.S # # arch/ppc64/kernel/vdso32/gettimeofday.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/gettimeofday.S # # arch/ppc64/kernel/vdso32/datapage.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/datapage.S # # arch/ppc64/kernel/vdso32/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +65 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/Makefile # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/Makefile # # arch/ppc64/kernel/vdso.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso.c # # arch/ppc64/kernel/time.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +59 -27 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/smp.c # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/signal32.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +20 -7 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/signal.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +9 -5 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/setup.c # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +31 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/head.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/asm-offsets.c # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +22 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/Makefile # 2005/03/04 23:17:14-08:00 benh@kernel.crashing.org +2 -1 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/boot/Makefile # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +5 -11 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/Makefile # 2005/03/04 23:17:15-08:00 benh@kernel.crashing.org +21 -0 # ppc64: Implement a vDSO and use it for signal trampoline # # arch/ppc64/kernel/vdso32/cacheflush.S # 2005/03/04 22:41:54-08:00 benh@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc64/kernel/vdso32/cacheflush.S # # ChangeSet # 2005/03/05 09:33:16-08:00 sfr@canb.auug.org.au # [PATCH] ppc64: distribute EXPORT_SYMBOLs # # This patch just moves as many as possible EXPORT_SYMBOL()s from # arch/ppc64/kernel/ppc_ksyms.c to where the symbols are defined. This has # been compiled on pSeries, iSeries and pmac. # # Signed-off-by: Stephen Rothwell # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/lmb.h # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +0 -2 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/mm/init.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +8 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/time.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/signal.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +3 -3 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/setup.c # 2005/03/04 23:17:16-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/semaphore.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +5 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/prom_init.c # 2005/03/04 23:17:14-08:00 sfr@canb.auug.org.au +0 -1 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/prom.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +10 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/process.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +2 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/ppc_ksyms.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +2 -66 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/pci.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +2 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/pacaData.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/irq.c # 2005/03/04 23:17:15-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/cputable.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +3 -0 # ppc64: distribute EXPORT_SYMBOLs # # arch/ppc64/kernel/LparData.c # 2005/03/04 22:41:53-08:00 sfr@canb.auug.org.au +1 -0 # ppc64: distribute EXPORT_SYMBOLs # # ChangeSet # 2005/03/05 09:33:01-08:00 olh@suse.de # [PATCH] ppc64: defconfig updates # # Update several ppc64 defconfigs. # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +421 -173 # ppc64: defconfig updates # # arch/ppc64/configs/pSeries_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +149 -46 # ppc64: defconfig updates # # arch/ppc64/configs/maple_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +102 -23 # ppc64: defconfig updates # # arch/ppc64/configs/iSeries_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +110 -46 # ppc64: defconfig updates # # arch/ppc64/configs/g5_defconfig # 2005/03/04 22:41:53-08:00 olh@suse.de +220 -125 # ppc64: defconfig updates # # ChangeSet # 2005/03/05 09:32:46-08:00 benh@kernel.crashing.org # [PATCH] ppc64: Move systemcfg out of head.S # # The "systemcfg" data structure in the ppc64 kernel is something that used # to be defined to be at a hard-coded page number in the kernel image. This # is not necessary (at least not any more) and is a possible problem with # future developements. This patch removes that constraint, which also # simplifies various bits of assembly in head.S that were dealing with it. # # This is the first step of a deeper cleanup of systemcfg definition of usage # (and ultimately removal in it's current incarnation). # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/systemcfg.h # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +0 -5 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/proc_ppc64.c # 2005/03/04 22:41:53-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/pacaData.c # 2005/03/04 23:17:17-08:00 benh@kernel.crashing.org +6 -1 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/head.S # 2005/03/04 23:17:16-08:00 benh@kernel.crashing.org +5 -27 # ppc64: Move systemcfg out of head.S # # arch/ppc64/kernel/LparData.c # 2005/03/04 23:17:17-08:00 benh@kernel.crashing.org +1 -1 # ppc64: Move systemcfg out of head.S # # ChangeSet # 2005/03/05 09:32:31-08:00 paulus@samba.org # [PATCH] ppc64: collect and export low-level cpu usage statistics # # POWER5 machines have a per-hardware-thread register which counts at a rate # which is proportional to the percentage of cycles on which the cpu # dispatches an instruction for this thread (if the thread gets all the # dispatch cycles it counts at the same rate as the timebase register). This # register is also context-switched by the hypervisor. Thus it gives a # fine-grained measure of the actual cpu usage by the thread over time. # # This patch adds code to read this register every timer interrupt and on # every context switch. The total over all virtual processors is available # through the existing /proc/ppc64/lparcfg file, giving a way to measure the # total cpu usage over the whole partition. # # Signed-off-by: Manish Ahuja # Signed-off-by: Paul Mackerras # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/time.h # 2005/03/04 23:17:16-08:00 paulus@samba.org +9 -0 # ppc64: collect and export low-level cpu usage statistics # # include/asm-ppc64/processor.h # 2005/03/04 23:17:16-08:00 paulus@samba.org +3 -1 # ppc64: collect and export low-level cpu usage statistics # # arch/ppc64/kernel/time.c # 2005/03/04 23:17:17-08:00 paulus@samba.org +8 -0 # ppc64: collect and export low-level cpu usage statistics # # arch/ppc64/kernel/process.c # 2005/03/04 23:17:17-08:00 paulus@samba.org +18 -0 # ppc64: collect and export low-level cpu usage statistics # # arch/ppc64/kernel/lparcfg.c # 2005/03/04 22:41:53-08:00 paulus@samba.org +13 -5 # ppc64: collect and export low-level cpu usage statistics # # ChangeSet # 2005/03/05 09:32:17-08:00 olh@suse.de # [PATCH] remove unneeded includes from pSeries_nvram.c # # The pseries nvram driver started probably as a copy of nvram.c. These # includes are not needed to build it. # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc64/kernel/pSeries_nvram.c # 2005/03/04 22:41:53-08:00 olh@suse.de +0 -5 # remove unneeded includes from pSeries_nvram.c # # ChangeSet # 2005/03/05 09:32:03-08:00 galak@freescale.com # [PATCH] ppc32: PowerQUICC II Pro subarch support # # Patch adds support for the initial PowerQUICC II Pro processors # (MPC8343/E, MPC8347/E, and MPC8349/E) and the first reference platform # (MPC834x SYS) from Freescale. # # The initial support is limited to existing drivers that overlap with the # MPC85xx subarch (ethernet, I2C, uart). # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mpc83xx.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +114 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +85 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ppc83xx_setup.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +53 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ppc83xx_setup.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +138 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +49 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ipic.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +646 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc83xx_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +100 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc83xx_devices.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +237 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc834x_sys.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +51 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc834x_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +290 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +6 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +30 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/serial.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ppcboot.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -2 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ppc_sys.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +3 -1 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/mpc83xx.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/mpc83xx.h # # include/asm-ppc/irq.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +10 -0 # ppc32: PowerQUICC II Pro subarch support # # include/asm-ppc/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/include/asm-ppc/ipic.h # # include/asm-ppc/io.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -0 # ppc32: PowerQUICC II Pro subarch support # # drivers/net/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -1 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/syslib/ppc83xx_setup.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ppc83xx_setup.h # # arch/ppc/syslib/ppc83xx_setup.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ppc83xx_setup.c # # arch/ppc/syslib/ipic.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ipic.h # # arch/ppc/syslib/ipic.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/syslib/ipic.c # # arch/ppc/syslib/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/platforms/83xx/mpc83xx_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc83xx_sys.c # # arch/ppc/platforms/83xx/mpc83xx_devices.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc83xx_devices.c # # arch/ppc/platforms/83xx/mpc834x_sys.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc834x_sys.h # # arch/ppc/platforms/83xx/mpc834x_sys.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/mpc834x_sys.c # # arch/ppc/platforms/83xx/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/Makefile # # arch/ppc/platforms/83xx/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/platforms/83xx/Kconfig # # arch/ppc/kernel/setup.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/kernel/ppc_ksyms.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -1 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/kernel/cputable.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +12 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/configs/mpc834x_sys_defconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +644 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/Makefile # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -0 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/Kconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +10 -9 # ppc32: PowerQUICC II Pro subarch support # # MAINTAINERS # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -1 # ppc32: PowerQUICC II Pro subarch support # # CREDITS # 2005/03/04 22:41:52-08:00 galak@freescale.com +1 -1 # ppc32: PowerQUICC II Pro subarch support # # arch/ppc/configs/mpc834x_sys_defconfig # 2005/03/04 22:41:52-08:00 galak@freescale.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/configs/mpc834x_sys_defconfig # # ChangeSet # 2005/03/05 09:31:47-08:00 galak@freescale.com # [PATCH] ppc32: Trivial bug fix in CRITICAL_EXCEPTION macro # # This patch fixes a trival bug in the CRITICAL_EXCEPTION macro # # Signed-off-by: Takeharu KATO # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/kernel/head_booke.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +2 -2 # ppc32: Trivial bug fix in CRITICAL_EXCEPTION macro # # ChangeSet # 2005/03/05 09:31:34-08:00 galak@freescale.com # [PATCH] ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # This patch makes the MPC8555 CDS system utilize the DS1553 RTC/NVRAM. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/Makefile # 2005/03/04 23:17:19-08:00 galak@freescale.com +1 -0 # ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # arch/ppc/platforms/85xx/mpc85xx_cds_common.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +17 -3 # ppc32: Add support to use the DS1553 RTC/NVRAM on MPC8555 CDS system # # ChangeSet # 2005/03/05 09:31:20-08:00 galak@freescale.com # [PATCH] ppc32: Add support for the Dallas 1553 RTC/NVRAM # # This patch adds support for the Dallas 1553 RTC/NVRAM. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/todc.h # 2005/03/04 22:41:52-08:00 galak@freescale.com +23 -0 # ppc32: Add support for the Dallas 1553 RTC/NVRAM # # arch/ppc/syslib/todc_time.c # 2005/03/04 22:41:52-08:00 galak@freescale.com +4 -0 # ppc32: Add support for the Dallas 1553 RTC/NVRAM # # ChangeSet # 2005/03/05 09:31:06-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: support OpenBIOS/U-Boot for Ebony # # This patch adds support for OpenBios on Ebony, as Matt Porter has # suggested. It will provide same functionality as the pibs extension for # Luan and Ocotea. # # Signed-off-by: Gerhard Jaeger # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/4xx/ebony.h # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +3 -7 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/platforms/4xx/ebony.c # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +26 -6 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/boot/simple/openbios.c # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +37 -0 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/boot/simple/Makefile # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +1 -0 # ppc32: support OpenBIOS/U-Boot for Ebony # # arch/ppc/boot/simple/openbios.c # 2005/03/04 22:41:48-08:00 mporter@kernel.crashing.org +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/arch/ppc/boot/simple/openbios.c # # ChangeSet # 2005/03/05 09:30:51-08:00 mgreer@mvista.com # [PATCH] ppc32: Add GPIO/IRQ definitions for mv64x60 parts # # Add mv64x60 GPP IO pin/IRQ register definitions # # Signed-off-by: James Chapman # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/04 22:41:17-08:00 mgreer@mvista.com +41 -0 # ppc32: Add GPIO/IRQ definitions for mv64x60 parts # # ChangeSet # 2005/03/05 09:30:37-08:00 mgreer@mvista.com # [PATCH] ppc32: mv64360_pic non-zero irq base # # Add support for non-zero irq base to mv64360_pic code. # # - Fix mv64360 pic code to handle non-zero mv64x60_irq_base # - Cleanup mv64360 entries in /proc/interrupts # # Signed-off-by: James Chapman # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/04 23:17:20-08:00 mgreer@mvista.com +1 -0 # ppc32: mv64360_pic non-zero irq base # # arch/ppc/syslib/mv64360_pic.c # 2005/03/04 22:41:17-08:00 mgreer@mvista.com +17 -12 # ppc32: mv64360_pic non-zero irq base # # ChangeSet # 2005/03/05 09:30:23-08:00 galak@freescale.com # [PATCH] ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # Removes explicit defines for SVR_85xx and use the information in the # ppc_sys_specs table in platform code. Changed the ppc_sys_name strings to # be a bit more generic so we have a bit more flexilibity when we display # them. # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/reg.h # 2005/03/04 22:41:17-08:00 galak@freescale.com +0 -6 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/stx_gp3.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +4 -12 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/sbc85xx.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +3 -12 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/mpc85xx_sys.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +6 -6 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/04 23:17:19-08:00 galak@freescale.com +2 -1 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # arch/ppc/platforms/85xx/mpc85xx_ads_common.c # 2005/03/04 22:41:17-08:00 galak@freescale.com +3 -12 # ppc32: Move from using #define SVR_ to cur_ppc_sys_spec name for 85xx platform # # ChangeSet # 2005/03/05 09:30:10-08:00 galak@freescale.com # [PATCH] ppc32: fix whitespace for 85xx CDS common platform # # Fix whitespace in arch/ppc/platforms/85xx/mpc85xx_cds_common.c # # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/platforms/85xx/mpc85xx_cds_common.c # 2005/03/04 23:17:20-08:00 galak@freescale.com +150 -150 # ppc32: fix whitespace for 85xx CDS common platform # # ChangeSet # 2005/03/05 09:29:56-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Bogus definition of __cmpxchg_u32() # # This patch fix bogus types in the definition of __cmpxchg_u32() on ppc32. # # Signed-off-by: Benjamin Herrenschmidt # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/system.h # 2005/03/04 22:41:17-08:00 benh@kernel.crashing.org +2 -2 # ppc32: Bogus definition of __cmpxchg_u32() # # ChangeSet # 2005/03/05 09:29:42-08:00 mgreer@mvista.com # [PATCH] ppc32: incorrect #define in include/asm-ppc/cpm2.h # # This patch fixes the incorrect definition of a macro that sets the transmit # parity to even on a cpm uart device. # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/cpm2.h # 2005/03/04 22:41:17-08:00 mgreer@mvista.com +1 -1 # ppc32: incorrect #define in include/asm-ppc/cpm2.h # # ChangeSet # 2005/03/05 09:29:28-08:00 ebs@ebshome.net # [PATCH] ppc32: PPC4xx PIC: ack parent UIC in disable_irq # # This patch fixes bug in PPC4xx disable_irq implementation. We need to ACK # parent UIC to prevent false triggering in case IRQ we just disabled was # already pending. # # Signed-off-by: Eugene Surovegin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/ppc4xx_pic.c # 2005/03/04 22:41:17-08:00 ebs@ebshome.net +2 -1 # ppc32: PPC4xx PIC: ack parent UIC in disable_irq # # ChangeSet # 2005/03/05 09:29:14-08:00 ebs@ebshome.net # [PATCH] ppc32: Lindentify PPC4xx PIC driver # # This patch fixes whitespace in PPC4xx PIC driver. # # Signed-off-by: Eugene Surovegin # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/ppc4xx_pic.h # 2005/03/04 22:41:16-08:00 ebs@ebshome.net +4 -4 # ppc32: Lindentify PPC4xx PIC driver # # arch/ppc/syslib/ppc4xx_pic.c # 2005/03/04 23:17:21-08:00 ebs@ebshome.net +26 -20 # ppc32: Lindentify PPC4xx PIC driver # # ChangeSet # 2005/03/05 09:28:59-08:00 mporter@kernel.crashing.org # [PATCH] ppc32: move irq_desc[].status, IRQ_LEVEL bit setup to xilinx_pic.c # # Move the code that informs the kernel if the particular interrupt is edge # triggered or level sensitive from the board specific file to a # "CONFIG_VIRTEX_II_PRO-specific" file. Using old IRQ numbering in that code # is also fixed. # # Signed-off-by: Andrei Konovalov # Signed-off-by: Matt Porter # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/xilinx_pic.c # 2005/03/04 22:41:16-08:00 mporter@kernel.crashing.org +15 -1 # ppc32: move irq_desc[].status, IRQ_LEVEL bit setup to xilinx_pic.c # # arch/ppc/platforms/4xx/xilinx_ml300.c # 2005/03/04 22:41:16-08:00 mporter@kernel.crashing.org +0 -18 # ppc32: move irq_desc[].status, IRQ_LEVEL bit setup to xilinx_pic.c # # ChangeSet # 2005/03/05 09:28:45-08:00 mgreer@mvista.com # [PATCH] ppc32: Artesyn Katana enet update # # - Adapt Katana to the new names used by the ethernet driver. # - Remove SRAM allocation code for mv643xx_enet until it's had more review. # # Signed-off-by: Dale Farnsworth # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/syslib/mv64x60.c # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +10 -10 # ppc32: Artesyn Katana enet update # # arch/ppc/platforms/katana.c # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +4 -18 # ppc32: Artesyn Katana enet update # # ChangeSet # 2005/03/05 09:28:32-08:00 mgreer@mvista.com # [PATCH] ppc32: Artesyn Katana platform update # # - Adds MTD support for the soldered FLASH # - Adds cmdline parsing # - Turns on the Blue LED when the system is halted # - Moves some of the device window left by the firmware to proper alignments # - Handles possibility of different frequencies for TCLK & SysCLK in 64460 # - Misc. code clean up # # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc/mv64x60_defs.h # 2005/03/04 23:17:20-08:00 mgreer@mvista.com +3 -1 # ppc32: Artesyn Katana platform update # # arch/ppc/platforms/katana.h # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +18 -27 # ppc32: Artesyn Katana platform update # # arch/ppc/platforms/katana.c # 2005/03/04 23:17:22-08:00 mgreer@mvista.com +144 -49 # ppc32: Artesyn Katana platform update # # arch/ppc/configs/katana_defconfig # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +86 -7 # ppc32: Artesyn Katana platform update # # ChangeSet # 2005/03/05 09:28:17-08:00 olh@suse.de # [PATCH] ppc32: update arch/ppc/configs/pmac_defconfig # # enable drm/agp, cpufreq, pppoe and new pccard option # # Signed-off-by: Olaf Hering # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/configs/pmac_defconfig # 2005/03/04 22:41:16-08:00 olh@suse.de +262 -101 # ppc32: update arch/ppc/configs/pmac_defconfig # # ChangeSet # 2005/03/05 09:28:04-08:00 mgreer@mvista.com # [PATCH] ppc32: fix mv64x60 register relocation bug in bootwrapper # # The gt64260 looks at the highest 20 bits while the mv64[34]60 looks at only # the highest 16 bits when determining the base address for the bridge's # registers. This patch adds support for both. # # Signed-off-by: Nate Case # Signed-off-by: Mark A. Greer # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/boot/simple/misc-mv64x60.S # 2005/03/04 22:41:16-08:00 mgreer@mvista.com +4 -0 # ppc32: fix mv64x60 register relocation bug in bootwrapper # # ChangeSet # 2005/03/05 09:27:51-08:00 trini@kernel.crashing.org # [PATCH] ppc32: Don't create .tmp_gas_check # # This changes how the ppc32 'checkbin' target works. Previously we did all # of the tests using variables which would be evaluated for any and every # make target. This meant that 'make tags' for example would leave behind a # '.tmp_gas_check' file even though we didn't actually compile up anything, # and would get in the way of diffs. By moving all of this logic directly # into the 'checkbin' target, we only test gcc/gas versions when we're going # to compile. # # Signed-off-by: Olaf Hering # Signed-off-by: Tom Rini # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/ppc/Makefile # 2005/03/04 23:17:19-08:00 trini@kernel.crashing.org +14 -16 # ppc32: Don't create .tmp_gas_check # # ChangeSet # 2005/03/05 09:27:37-08:00 olof@austin.ibm.com # [PATCH] PPC/PPC64: Abstract cpu_feature checks. # # Abstract most manual mask checks of cpu_features with cpu_has_feature() # # Signed-off-by: Olof Johansson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-ppc64/page.h # 2005/03/04 23:17:16-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc64/mmu_context.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc64/cputable.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +5 -0 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc64/cacheflush.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # include/asm-ppc/cputable.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +5 -0 # PPC/PPC64: Abstract cpu_feature checks. # # drivers/md/raid6altivec.uc # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # drivers/macintosh/via-pmu.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/xmon/xmon.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +4 -4 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/oprofile/op_model_rs64.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/oprofile/op_model_power4.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/stab.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/slb.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/init.c # 2005/03/04 23:17:17-08:00 olof@austin.ibm.com +5 -5 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/hugetlbpage.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/hash_utils.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/mm/hash_native.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +7 -7 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/sysfs.c # 2005/03/04 23:17:15-08:00 olof@austin.ibm.com +11 -11 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/smp.c # 2005/03/04 23:17:16-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/setup.c # 2005/03/04 23:17:17-08:00 olof@austin.ibm.com +3 -3 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/process.c # 2005/03/04 23:17:18-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/pSeries_lpar.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/iSeries_setup.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc64/kernel/align.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/sandpoint.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +3 -3 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/pmac_smp.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/pmac_setup.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/platforms/pmac_cpufreq.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/mm/ppc_mmu.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/mm/mmu_decl.h # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/kernel/temp.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +1 -1 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/kernel/setup.c # 2005/03/04 23:17:19-08:00 olof@austin.ibm.com +2 -2 # PPC/PPC64: Abstract cpu_feature checks. # # arch/ppc/kernel/ppc_htab.c # 2005/03/04 22:41:15-08:00 olof@austin.ibm.com +4 -4 # PPC/PPC64: Abstract cpu_feature checks. # # ChangeSet # 2005/03/05 09:27:21-08:00 bill.irwin@oracle.com # [PATCH] make mapping->tree_lock an rwlock # # Convert mapping->tree_lock to an rwlock. # # with: # # dd if=/dev/zero of=foo bs=1 count=2M 0.80s user 4.15s system 99% cpu 4.961 total # dd if=/dev/zero of=foo bs=1 count=2M 0.73s user 4.26s system 100% cpu 4.987 total # dd if=/dev/zero of=foo bs=1 count=2M 0.79s user 4.25s system 100% cpu 5.034 total # # dd if=foo of=/dev/null bs=1 0.80s user 3.12s system 99% cpu 3.928 total # dd if=foo of=/dev/null bs=1 0.77s user 3.15s system 100% cpu 3.914 total # dd if=foo of=/dev/null bs=1 0.92s user 3.02s system 100% cpu 3.935 total # # (3.926: 1.87 usecs) # # without: # # dd if=/dev/zero of=foo bs=1 count=2M 0.85s user 3.92s system 99% cpu 4.780 total # dd if=/dev/zero of=foo bs=1 count=2M 0.78s user 4.02s system 100% cpu 4.789 total # dd if=/dev/zero of=foo bs=1 count=2M 0.82s user 3.94s system 99% cpu 4.763 total # dd if=/dev/zero of=foo bs=1 count=2M 0.71s user 4.10s system 99% cpu 4.810 tota # # dd if=foo of=/dev/null bs=1 0.76s user 2.68s system 100% cpu 3.438 total # dd if=foo of=/dev/null bs=1 0.74s user 2.72s system 99% cpu 3.465 total # dd if=foo of=/dev/null bs=1 0.67s user 2.82s system 100% cpu 3.489 total # dd if=foo of=/dev/null bs=1 0.70s user 2.62s system 99% cpu 3.326 total # # (3.430: 1.635 usecs) # # # So on a P4, the additional cost of the rwlock is ~240 nsecs for a # one-byte-write(). On the other hand: # # From: Peter Chubb # # As part of the Gelato scalability focus group, we've been running OSDL's # Re-AIM7 benchmark with an I/O intensive load with varying numbers of # processors. The current kernel shows severe contention on the tree_lock in # the address space structure when running on tmpfs or ext2 on a RAM disk. # # # Lockstat output for a 12-way: # # SPINLOCKS HOLD WAIT # UTIL CON MEAN( MAX ) MEAN( MAX )(% CPU) TOTAL NOWAIT SPIN RJECT NAME # # 5.5% 0.4us(3177us) 28us( 20ms)(44.2%) 131821954 94.5% 5.5% 0.00% *TOTAL* # # 72.3% 13.1% 0.5us( 9.5us) 29us( 20ms)(42.5%) 50542055 86.9% 13.1% 0% find_lock_page+0x30 # 23.8% 0% 385us(3177us) 0us 23235 100% 0% 0% exit_mmap+0x50 # 11.5% 0.82% 0.1us( 101us) 17us(5670us)( 1.6%) 50665658 99.2% 0.82% 0% dnotify_parent+0x70 # # # Replacing the spinlock with a multi-reader lock fixes this problem, # without unduly affecting anything else. # # Here are the benchmark results (jobs per minute at a 50-client level, average # of 5 runs, standard deviation in parens) on an HP Olympia with 3 cells, 12 # processors, and dnotify turned off (after this spinlock, the spinlock in # dnotify_parent is the worst contended for this workload). # # tmpfs............... ext2............... # #CPUs spinlock rwlock spinlock rwlock # 1 7556(15) 7588(17) +0.42% 3744(20) 3791(16) +1.25% # 2 13743(31) 13791(33) +0.35% 6405(30) 6413(24) +0.12% # 4 23334(111) 22881(154) -2% 9648(51) 9595(50) -0.55% # 8 33580(240) 36163(190) +7.7% 13183(63) 13070(68) -0.85% # 12 28748(170) 44064(238)+53% 12681(49) 14504(105)+14% # # And on a pentium3 single processsor: # 1 4177(4) 4169(2) -0.2% 3811(4) 3820(3) +0.23% # # I'm not sure what's happening in the 4-processor case. The important thing to # note is that with a spinlock, the benchmark shows worse performance for a 12 # than for an 8-way box; with the patch, the 12 way performs better, as # expected. We've done some runs with 16-way as well; without the patch below, # the 16-way performs worse than the 12-way. # # # It's a tricky tradeoff, but large-smp is hurt a lot more by the spinlocks than # small-smp is by the rwlocks. And I don't think we really want to implement # compile-time either-or-locks. # # # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/vmscan.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +4 -4 # make mapping->tree_lock an rwlock # # mm/truncate.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +3 -3 # make mapping->tree_lock an rwlock # # mm/swapfile.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +6 -6 # make mapping->tree_lock an rwlock # # mm/swap_state.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +9 -9 # make mapping->tree_lock an rwlock # # mm/readahead.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +4 -4 # make mapping->tree_lock an rwlock # # mm/page-writeback.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +14 -14 # make mapping->tree_lock an rwlock # # mm/filemap.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +16 -16 # make mapping->tree_lock an rwlock # # include/linux/fs.h # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +1 -1 # make mapping->tree_lock an rwlock # # include/asm-parisc/cacheflush.h # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +2 -2 # make mapping->tree_lock an rwlock # # include/asm-arm/cacheflush.h # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +2 -2 # make mapping->tree_lock an rwlock # # fs/inode.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +1 -1 # make mapping->tree_lock an rwlock # # fs/buffer.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +2 -2 # make mapping->tree_lock an rwlock # # drivers/mtd/devices/block2mtd.c # 2005/03/04 22:41:15-08:00 bill.irwin@oracle.com +4 -4 # make mapping->tree_lock an rwlock # # ChangeSet # 2005/03/05 09:27:06-08:00 zach.brown@oracle.com # [PATCH] only unmap what intersects a direct_IO op # # Now that we're only invalidating the pages that intersected a direct IO # write we might as well only unmap the intersecting bytes as well. This # passed a light fsx load with page cache, direct, and mmap IO. # # Signed-off-by: Zach Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +8 -4 # only unmap what intersects a direct_IO op # # ChangeSet # 2005/03/05 09:26:52-08:00 zach.brown@oracle.com # [PATCH] write and wait on range before direct io read # # This adds filemap_write_and_wait_range(mapping, lstart, lend) which starts # writeback and waits on a range of pages. We call this from # __blkdev_direct_IO with just the range that is going to be read by the # direct_IO read. It was lightly tested with fsx and ext3 and passed. # # Signed-off-by: Zach Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/filemap.c # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +16 -0 # write and wait on range before direct io read # # include/linux/fs.h # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +2 -0 # write and wait on range before direct io read # # fs/direct-io.c # 2005/03/04 22:41:15-08:00 zach.brown@oracle.com +5 -2 # write and wait on range before direct io read # # ChangeSet # 2005/03/05 09:26:38-08:00 zach.brown@oracle.com # [PATCH] invalidate range of pages after direct IO write # # Presently we invalidate all of a file's pages when writing to any part of # that file with direct-IO. # # After a direct IO write only invalidate the pages that the write intersected. # invalidate_inode_pages2_range(mapping, pgoff start, pgoff end) is added and # called from generic_file_direct_IO(). # # While we're in there, invalidate_inode_pages2() was calling # unmap_mapping_range() with the wrong convention in the single page case. # It was providing the byte offset of the final page rather than the length # of the hole being unmapped. This is also fixed. # # This was lightly tested with a 10k op fsx run with O_DIRECT on a 16MB file # in ext3 on a junky old IDE drive. Totaling vmstat columns of blocks read # and written during the runs shows that read traffic drops significantly. # The run time seems to have gone down a little. # # Two runs before the patch gave the following user/real/sys times and total # blocks in and out: # # 0m28.029s 0m20.093s 0m3.166s 16673 125107 # 0m27.949s 0m20.068s 0m3.227s 18426 126094 # # and after the patch: # # 0m26.775s 0m19.996s 0m3.060s 3505 124982 # 0m26.856s 0m19.935s 0m3.052s 3505 125279 # # akpm: # # - Don't look up more pages than we're going to use # # - Don't test page->index until we've locked the page # # - Check for the cursor wrapping at the end of the mapping. # # Signed-off-by: Zach Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/truncate.c # 2005/03/04 23:17:24-08:00 zach.brown@oracle.com +37 -14 # invalidate range of pages after direct IO write # # mm/filemap.c # 2005/03/04 23:17:25-08:00 zach.brown@oracle.com +4 -1 # invalidate range of pages after direct IO write # # include/linux/fs.h # 2005/03/04 23:17:25-08:00 zach.brown@oracle.com +2 -0 # invalidate range of pages after direct IO write # # ChangeSet # 2005/03/05 09:26:24-08:00 clameter@sgi.com # [PATCH] Move accounting function calls out of critical vm code paths # # In the 2.6.11 development cycle function calls have been added to lots # of hot vm paths to do accounting. I think these should not go into the # final 2.6.1 release because these statistics can be collected in a different # way that does not require the updating of counters from frequently used # vm code paths and is consistent with the methods use elsewhere in the kernel # to obtain statistics. # # These function calls are # # acct_update_integrals -> Account for processes based on stime changes # update_mem_hiwater -> takes rss and total_vm hiwater marks. # # acct_update_integrals is only useful to call if stime changes otherwise # it will simply return. It is therefore best to relocate the function call # to acct_update_integral into the function that updates stime which is # account_system_time and remove it from the vm code paths. # # update_mem_hiwater finds the rss hiwater mark. We call that from timer # context as well. This means that processes' high-water marks are now # sampled statistically, at timer-interrupt time rather than # deterministically. This may or may not be a problem.. # # This means that the rss limit is not always updated if rss is increased # and thus not as accurate. But the benefit is that the rss checks do no # pollute the vm paths and that it is consistent with the rss limit check. # # The following patch removes acct_update_integrals and update_mem_hiwater # from the hot vm paths. # # Signed-off-by: Christoph Lameter # # From: Jay Lan # # The new "move-accounting-function-calls-out-of-critical-vm-code-paths" # patch in 2.6.11-rc3-mm2 was different from the code i tested. # # In particular, it mistakenly dropped the accounting routine calls # in fs/exec.c. The calls in do_execve() are needed to properly # initialize accounting fields. Specifically, the tsk->acct_stimexpd # needs to be initialized to tsk->stime. # # I have discussed this with Christoph Lameter and he gave me full # blessings to bring the calls back. # # Signed-off-by: Jay Lan # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # mm/swapfile.c # 2005/03/04 23:17:24-08:00 clameter@sgi.com +0 -3 # Move accounting function calls out of critical vm code paths # # mm/rmap.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +0 -3 # Move accounting function calls out of critical vm code paths # # mm/nommu.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +1 -3 # Move accounting function calls out of critical vm code paths # # mm/mremap.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +0 -6 # Move accounting function calls out of critical vm code paths # # mm/mmap.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +0 -7 # Move accounting function calls out of critical vm code paths # # mm/memory.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +3 -16 # Move accounting function calls out of critical vm code paths # # kernel/sched.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +5 -0 # Move accounting function calls out of critical vm code paths # # kernel/exit.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +2 -2 # Move accounting function calls out of critical vm code paths # # kernel/acct.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +1 -3 # Move accounting function calls out of critical vm code paths # # include/linux/mm.h # 2005/03/04 22:41:14-08:00 clameter@sgi.com +1 -1 # Move accounting function calls out of critical vm code paths # # include/linux/acct.h # 2005/03/04 22:41:14-08:00 clameter@sgi.com +2 -2 # Move accounting function calls out of critical vm code paths # # fs/exec.c # 2005/03/04 22:41:14-08:00 clameter@sgi.com +2 -2 # Move accounting function calls out of critical vm code paths # # ChangeSet # 2005/03/05 09:26:09-08:00 arjan@infradead.org # [PATCH] Randomisation: top-of-stack randomization # # In addition to randomisation of the stack pointer within the stack, the stack # itself should be randomized too. We need both approaches, we can only # randomize the stack itself in pagesize increments. However randomizing large # ranges with the stackpointer runs into the situation where a huge chunk of the # stack rlimit is used by the randomisation; this is undesirable so we need to # do both. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/exec.c # 2005/03/04 23:17:25-08:00 arjan@infradead.org +1 -1 # Randomisation: top-of-stack randomization # # fs/binfmt_elf.c # 2005/03/04 23:17:16-08:00 arjan@infradead.org +16 -1 # Randomisation: top-of-stack randomization # # ChangeSet # 2005/03/05 09:25:55-08:00 arjan@infradead.org # [PATCH] Randomisation: add ADDR_NO_RANDOMIZE personality # # Introduce a personality that disables randomisation, so that users can use # setarch and related commands to run specific applications without # randomisation. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/personality.h # 2005/03/04 22:41:14-08:00 arjan@infradead.org +2 -1 # Randomisation: add ADDR_NO_RANDOMIZE personality # # fs/binfmt_elf.c # 2005/03/04 23:17:25-08:00 arjan@infradead.org +1 -1 # Randomisation: add ADDR_NO_RANDOMIZE personality # # ChangeSet # 2005/03/05 09:25:41-08:00 arjan@infradead.org # [PATCH] Randomisation: enable by default # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sysctl.c # 2005/03/04 22:41:14-08:00 arjan@infradead.org +1 -1 # Randomisation: enable by default # # include/linux/kernel.h # 2005/03/04 22:41:14-08:00 arjan@infradead.org +1 -1 # Randomisation: enable by default # # ChangeSet # 2005/03/05 09:25:27-08:00 arjan@infradead.org # [PATCH] Randomisation: mmap randomisation # # The patch below randomizes the starting point of the mmap area. # # This has the effect that all non-prelinked shared libaries and all bigger # malloc()s will be randomized between various invocations of the binary. # Prelinked binaries get a address-hint from ld.so in their mmap and are thus # exempt from this randomisation, in order to not break the prelink advantage. # The randomisation range is 1 megabyte (this is bigger than the stack # randomisation since the stack randomisation only needs 16 bytes alignment # while the mmap needs page alignment, a 64kb range would not have given enough # entropy to be effective) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/i386/mm/mmap.c # 2005/03/04 22:41:14-08:00 arjan@infradead.org +6 -1 # Randomisation: mmap randomisation # # ChangeSet # 2005/03/05 09:25:13-08:00 arjan@infradead.org # [PATCH] Randomisation: stack randomisation # # The patch below replaces the existing 8Kb randomisation of the userspace stack # pointer (which is currently only done for Hyperthreaded P-IVs) with a more # general randomisation over a 64Kb range. 64Kb is not a lot, but it's a start # and once the dust settles we can increase this value to a more agressive # value. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/asm-x86_64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-v850/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sparc64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sparc/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sh64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-sh/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-s390/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-ppc64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-ppc/system.h # 2005/03/04 23:17:21-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-parisc/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-mips/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-m68knommu/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +1 -0 # Randomisation: stack randomisation # # include/asm-m68k/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-m32r/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-ia64/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +3 -0 # Randomisation: stack randomisation # # include/asm-i386/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-h8300/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-frv/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-cris/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-arm26/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-arm/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # include/asm-alpha/system.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +2 -0 # Randomisation: stack randomisation # # fs/exec.c # 2005/03/04 23:17:25-08:00 arjan@infradead.org +2 -1 # Randomisation: stack randomisation # # fs/binfmt_elf.c # 2005/03/04 23:17:26-08:00 arjan@infradead.org +2 -9 # Randomisation: stack randomisation # # arch/x86_64/kernel/process.c # 2005/03/04 22:41:13-08:00 arjan@infradead.org +8 -0 # Randomisation: stack randomisation # # arch/i386/kernel/process.c # 2005/03/04 22:41:13-08:00 arjan@infradead.org +7 -0 # Randomisation: stack randomisation # # ChangeSet # 2005/03/05 09:24:57-08:00 arjan@infradead.org # [PATCH] Randomisation: add PF_RANDOMIZE # # Even though there is a global flag to disable randomisation, it's useful to # have a per process flag too; the patch below introduces this per process flag # and automatically sets it for "new" binaries. # # Eventually we will want to tie this to the legacy-va-space personality # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/sched.h # 2005/03/04 22:41:13-08:00 arjan@infradead.org +1 -0 # Randomisation: add PF_RANDOMIZE # # fs/exec.c # 2005/03/04 23:17:27-08:00 arjan@infradead.org +1 -0 # Randomisation: add PF_RANDOMIZE # # fs/binfmt_elf.c # 2005/03/04 23:17:27-08:00 arjan@infradead.org +2 -0 # Randomisation: add PF_RANDOMIZE # # ChangeSet # 2005/03/05 09:24:44-08:00 arjan@infradead.org # [PATCH] Randomisation: infrastructure # # The patch below introduces get_random_int() and randomize_range(), two helpers # used in later patches in the series. get_random_int() shares the tcp/ip # random number stuff so the CONFIG_INET ifdef needs to move slightly, and to # reduce the damange due to that, secure_ip_id() needs to move inside random.c # From: Frank Sorenson # Acked-By: Jeff Dike # # The stack randomization patches that went into 2.6.11-rc3-mm1 broke # compilation of ARCH=um. This patch fixes compiling by adding arch_align_stack # back in. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Frank Sorenson # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/random.h # 2005/03/04 22:38:34-08:00 arjan@infradead.org +3 -0 # Randomisation: infrastructure # # drivers/char/random.c # 2005/03/04 22:38:34-08:00 arjan@infradead.org +62 -22 # Randomisation: infrastructure # # arch/um/kernel/process_kern.c # 2005/03/04 22:38:38-08:00 arjan@infradead.org +9 -0 # Randomisation: infrastructure # # ChangeSet # 2005/03/05 09:24:30-08:00 arjan@infradead.org # [PATCH] Randomisation: global sysctl # # This first patch of the series introduces a sysctl (default off) that # enables/disables the randomisation feature globally. Since randomisation may # make it harder to debug really tricky situations (reproducability goes down), # the sysadmin needs a way to disable it globally. # # Signed-off-by: Arjan van de Ven # Signed-off-by: Ingo Molnar # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # kernel/sysctl.c # 2005/03/04 23:17:26-08:00 arjan@infradead.org +11 -0 # Randomisation: global sysctl # # include/linux/sysctl.h # 2005/03/04 22:32:56-08:00 arjan@infradead.org +1 -0 # Randomisation: global sysctl # # include/linux/kernel.h # 2005/03/04 23:17:26-08:00 arjan@infradead.org +6 -0 # Randomisation: global sysctl # # ChangeSet # 2005/03/05 09:24:16-08:00 galak@freescale.com # [PATCH] initialize a spin lock in CPM2 uart driver # # Static initialization of spin locks that are otherwise accessed prior to # initialization. # # Signed-off-by: Jaka Mocnik # Signed-off-by: Kumar Gala # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/serial/cpm_uart/cpm_uart_core.c # 2005/03/04 22:32:56-08:00 galak@freescale.com +6 -0 # initialize a spin lock in CPM2 uart driver # # ChangeSet # 2005/03/05 09:24:03-08:00 sean.hefty@intel.com # [PATCH] IB: MAD cancel callbacks from thread # # Modify ib_cancel_mad() to invoke a user's send completion callback from # a different thread context than that used by the caller. This allows a # caller to hold a lock while calling cancel that is also acquired from # their send handler. # # Signed-off-by: Sean Hefty # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/mad_priv.h # 2005/03/04 22:32:56-08:00 sean.hefty@intel.com +2 -0 # IB: MAD cancel callbacks from thread # # drivers/infiniband/core/mad.c # 2005/03/04 22:32:56-08:00 sean.hefty@intel.com +39 -11 # IB: MAD cancel callbacks from thread # # ChangeSet # 2005/03/05 09:23:48-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: implement query of device caps # # Set device_cap_flags field in mthca's query_device method. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +8 -5 # IB/mthca: implement query of device caps # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +27 -0 # IB/mthca: implement query of device caps # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +1 -0 # IB/mthca: implement query of device caps # # drivers/infiniband/hw/mthca/mthca_cmd.h # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +15 -1 # IB/mthca: implement query of device caps # # ChangeSet # 2005/03/05 09:23:36-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: QP locking optimization # # 1. Split the QP spinlock into separate send and receive locks. # # The only place where we have to lock both is upon modify_qp, and # that is not on data path. # # 2. Avoid taking any QP locks when polling CQ. # # This last part is achieved by getting rid of the cur field in # mthca_wq, and calculating the number of outstanding WQEs by # comparing the head and tail fields. head is only updated by # post, tail is only updated by poll. # # In a rare case where an overrun is detected, a CQ is locked and the # overrun condition is re-tested, to avoid any potential for stale # tail values. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +77 -46 # IB/mthca: QP locking optimization # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +11 -10 # IB/mthca: QP locking optimization # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 22:32:56-08:00 mst@mellanox.co.il +2 -16 # IB/mthca: QP locking optimization # # ChangeSet # 2005/03/05 09:23:21-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free multicast table # # Tie up one last loose end by mapping enough context memory to cover # the whole multicast table during initialization, and then enable # mem-free mode. mthca now supports enough of mem-free mode so that # IPoIB works with a mem-free HCA. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +28 -9 # IB/mthca: mem-free multicast table # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +3 -2 # IB/mthca: mem-free multicast table # # ChangeSet # 2005/03/05 09:23:08-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free work request posting # # Implement posting send and receive work requests for mem-free mode. # Also tidy up a few things in send/receive posting for Tavor mode (fix # smp_wmb()s that should really be just wmb()s, annotate tests in the # fast path with likely()/unlikely()). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +266 -26 # IB/mthca: mem-free work request posting # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +7 -4 # IB/mthca: mem-free work request posting # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +8 -4 # IB/mthca: mem-free work request posting # # ChangeSet # 2005/03/05 09:22:54-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free address vectors # # Update address vector handling to support mem-free mode. In mem-free # mode, the address vector (in hardware format) is copied by the driver # into each send work queue entry, so our address handle creation can # become pretty trivial: we just kmalloc() a buffer to hold the # formatted address vector. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +11 -5 # IB/mthca: mem-free address vectors # # drivers/infiniband/hw/mthca/mthca_av.c # 2005/03/04 22:32:55-08:00 roland@topspin.com +34 -12 # IB/mthca: mem-free address vectors # # ChangeSet # 2005/03/05 09:22:41-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free QP initialization # # Update QP initialization and cleanup to handle mem-free mode. In # mem-free mode, work queue sizes have to be rounded up to a power of 2, # we need to allocate doorbells, there must be memory mapped for the # entries in the QP and extended QP context table that we use, and the # entries of the receive queue must be initialized. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +175 -30 # IB/mthca: mem-free QP initialization # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +3 -0 # IB/mthca: mem-free QP initialization # # ChangeSet # 2005/03/05 09:22:27-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free CQ operations # # Add support for CQ data path operations (request notification, update # consumer index) in mem-free mode. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +5 -2 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +5 -8 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:29-08:00 roland@topspin.com +3 -3 # IB/mthca: mem-free CQ operations # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +79 -27 # IB/mthca: mem-free CQ operations # # ChangeSet # 2005/03/05 09:22:12-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free CQ initialization # # Update CQ initialization and cleanup to handle mem-free mode: we need # to make sure the HCA has memory mapped for the entry in the CQ context # table we will use and also allocate doorbell records. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +8 -0 # IB/mthca: mem-free CQ initialization # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +45 -3 # IB/mthca: mem-free CQ initialization # # ChangeSet # 2005/03/05 09:21:58-08:00 roland@topspin.com # [PATCH] IB/mthca: refactor CQ buffer allocate/free # # Factor the allocation and freeing of completion queue buffers into # mthca_alloc_cq_buf() and mthca_free_cq_buf(). This makes the code # more readable and will eventually make handling userspace CQs simpler # (the kernel doesn't have to allocate a buffer at all). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -2 # IB/mthca: refactor CQ buffer allocate/free # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +84 -78 # IB/mthca: refactor CQ buffer allocate/free # # ChangeSet # 2005/03/05 09:21:44-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free doorbell record writing # # Add a mthca_write_db_rec() to wrap writing doorbell records. On # 64-bit archs, this is just a 64-bit write, while on 32-bit archs it # splits the write into two 32-bit writes with a memory barrier to make # sure the two halves of the record are written in the correct order. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_doorbell.h # 2005/03/04 22:32:55-08:00 roland@topspin.com +12 -0 # IB/mthca: mem-free doorbell record writing # # ChangeSet # 2005/03/05 09:21:30-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free doorbell record allocation # # Mem-free mode requires the driver to allocate additional doorbell pages # for each user access region. Add support for this in mthca_memfree.c, # and have the driver allocate a table in db_tab for kernel use. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_uar.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +9 -0 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_profile.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +5 -3 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_memfree.h # 2005/03/04 22:32:54-08:00 roland@topspin.com +33 -0 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_memfree.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +196 -0 # IB/mthca: mem-free doorbell record allocation # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +4 -3 # IB/mthca: mem-free doorbell record allocation # # ChangeSet # 2005/03/05 09:21:17-08:00 roland@topspin.com # [PATCH] IB/mthca: tweak MAP_ICM_page firmware command # # Have MAP_ICM_page() firmware command map assume pages are always the # HCA-native 4K size rather than using the kernel's page size. This # will make handling doorbell pages for mem-free mode simpler. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cmd.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +1 -1 # IB/mthca: tweak MAP_ICM_page firmware command # # ChangeSet # 2005/03/05 09:21:04-08:00 roland@topspin.com # [PATCH] IB/mthca: tweak firmware command debug messages # # Slightly improve debugging output for UNMAP_ICM and MODIFY_QP firmware commands. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cmd.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +5 -2 # IB/mthca: tweak firmware command debug messages # # ChangeSet # 2005/03/05 09:20:51-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free interrupt handling # # Update interrupt handling code to handle mem-free mode. While we're # at it, improve the Tavor interrupt handling to avoid an extra MMIO # read of the event cause register. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: mem-free interrupt handling # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:29-08:00 roland@topspin.com +10 -9 # IB/mthca: mem-free interrupt handling # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +120 -39 # IB/mthca: mem-free interrupt handling # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -0 # IB/mthca: mem-free interrupt handling # # ChangeSet # 2005/03/05 09:20:37-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free EQ initialization # # Add code to initialize EQ context properly in both Tavor and mem-free mode. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +13 -6 # IB/mthca: mem-free EQ initialization # # ChangeSet # 2005/03/05 09:20:23-08:00 roland@topspin.com # [PATCH] IB/mthca: mem-free memory region support # # Add support for mem-free mode to memory region code. This mostly # amounts to properly munging between keys and indices. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_mr.c # 2005/03/04 22:32:54-08:00 roland@topspin.com +33 -13 # IB/mthca: mem-free memory region support # # ChangeSet # 2005/03/05 09:20:10-08:00 roland@topspin.com # [PATCH] IB/mthca: dynamic context memory mapping for mem-free mode # # Add support for mapping more memory into HCA's context to cover # context tables when new objects are allocated. Pass the object # size into mthca_alloc_icm_table(), reference count the ICM chunks, # and add new mthca_table_get() and mthca_table_put() functions to # handle mapping memory when allocating or destroying objects. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_memfree.h # 2005/03/04 23:17:30-08:00 roland@topspin.com +9 -3 # IB/mthca: dynamic context memory mapping for mem-free mode # # drivers/infiniband/hw/mthca/mthca_memfree.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +70 -7 # IB/mthca: dynamic context memory mapping for mem-free mode # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +10 -15 # IB/mthca: dynamic context memory mapping for mem-free mode # # ChangeSet # 2005/03/05 09:19:57-08:00 roland@topspin.com # [PATCH] IB/mthca: add UAR allocation # # Add support for allocating user access regions (UARs). Use this to # allocate a region for kernel at driver init instead using hard-coded # MTHCA_KAR_PAGE index. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_uar.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +69 -0 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_uar.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +0 -0 # BitKeeper file /home/torvalds/v2.6/linux/drivers/infiniband/hw/mthca/mthca_uar.c # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:31-08:00 roland@topspin.com +5 -0 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_profile.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -0 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +42 -21 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 23:17:31-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:31-08:00 roland@topspin.com +14 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:30-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # drivers/infiniband/hw/mthca/Makefile # 2005/03/04 22:32:53-08:00 roland@topspin.com +1 -1 # IB/mthca: add UAR allocation # # ChangeSet # 2005/03/05 09:19:43-08:00 roland@topspin.com # [PATCH] IB/mthca: map registers for mem-free mode # # Move the request/ioremap of regions related to event handling into # mthca_eq.c. Map the correct regions depending on whether we're in # Tavor or native mem-free mode. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_main.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +15 -81 # IB/mthca: map registers for mem-free mode # # drivers/infiniband/hw/mthca/mthca_eq.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +135 -3 # IB/mthca: map registers for mem-free mode # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:32-08:00 roland@topspin.com +10 -2 # IB/mthca: map registers for mem-free mode # # drivers/infiniband/hw/mthca/mthca_config_reg.h # 2005/03/04 22:32:53-08:00 roland@topspin.com +1 -0 # IB/mthca: map registers for mem-free mode # # ChangeSet # 2005/03/05 09:19:29-08:00 mst@mellanox.co.il # [PATCH] IB: remove unsignaled receives # # Remove support for unsignaled receive requests. This is a # non-standard extension to the IB spec that is not used by any known # applications or protocols, and is not supported by newer hardware. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_verbs.c # 2005/03/04 22:32:53-08:00 mst@mellanox.co.il +0 -1 # IB: remove unsignaled receives # # drivers/infiniband/ulp/ipoib/ipoib_ib.c # 2005/03/04 22:32:53-08:00 mst@mellanox.co.il +0 -1 # IB: remove unsignaled receives # # drivers/infiniband/include/ib_verbs.h # 2005/03/04 22:32:53-08:00 mst@mellanox.co.il +0 -7 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +7 -14 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_provider.h # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +1 -1 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_provider.c # 2005/03/04 23:17:30-08:00 mst@mellanox.co.il +2 -2 # IB: remove unsignaled receives # # drivers/infiniband/hw/mthca/mthca_dev.h # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +0 -2 # IB: remove unsignaled receives # # drivers/infiniband/core/mad.c # 2005/03/04 23:17:28-08:00 mst@mellanox.co.il +0 -2 # IB: remove unsignaled receives # # ChangeSet # 2005/03/05 09:19:15-08:00 roland@topspin.com # [PATCH] IB/mthca: CQ cleanups # # Simplify some of the code for CQ handling slightly. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +6 -10 # IB/mthca: CQ cleanups # # ChangeSet # 2005/03/05 09:19:00-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: improve CQ locking part 2 # # Locking during the poll cq operation can be reduced by locking the cq # while qp is being removed from the qp array. This also avoids an # extra atomic operation for reference counting. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_qp.c # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +33 -4 # IB/mthca: improve CQ locking part 2 # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:32-08:00 mst@mellanox.co.il +6 -10 # IB/mthca: improve CQ locking part 2 # # ChangeSet # 2005/03/05 09:18:47-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: improve CQ locking part 1 # # Avoid taking the CQ table lock in the fast path path by using # synchronize_irq() after removing a CQ from the table to make sure that # no completion events are still in progress. This gets a nice speedup # (about 4%) in IP over IB on my hardware. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:33-08:00 mst@mellanox.co.il +6 -7 # IB/mthca: improve CQ locking part 1 # # ChangeSet # 2005/03/05 09:18:33-08:00 mst@mellanox.co.il # [PATCH] IB/mthca: CQ minor tweaks # # Clean up CQ code so that we only calculate the address of a CQ entry # once when using it. # # Signed-off-by: Michael S. Tsirkin # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_cq.c # 2005/03/04 23:17:33-08:00 mst@mellanox.co.il +13 -13 # IB/mthca: CQ minor tweaks # # ChangeSet # 2005/03/05 09:18:19-08:00 sean.hefty@intel.com # [PATCH] IB: fix ib_find_cached_gid() port numbering # # Fix ib_find_cached_gid() to return the correct port number relative to # the port numbering used by the device. # # Signed-off-by: Sean Hefty # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/cache.c # 2005/03/04 22:32:52-08:00 sean.hefty@intel.com +1 -1 # IB: fix ib_find_cached_gid() port numbering # # ChangeSet # 2005/03/05 09:18:04-08:00 roland@topspin.com # [PATCH] IB/ipoib: fix locking on path deletion # # Fix up locking for IPoIB path table. Make sure that destruction of address # handles, neighbour info and path structs is locked properly to avoid races and # deadlocks. (Problem originally diagnosed by Shirley Ma) # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 22:32:52-08:00 roland@topspin.com +28 -9 # IB/ipoib: fix locking on path deletion # # ChangeSet # 2005/03/05 09:17:51-08:00 xma@us.ibm.com # [PATCH] IB/ipoib: don't call ipoib_put_ah with lock held # # ipoib_put_ah() may call ipoib_free_ah(), which might take the device's lock. # Therefore we need to make sure we don't call ipoib_put_ah() when holding the # lock already. # # Signed-off-by: Shirley Ma # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_multicast.c # 2005/03/04 22:32:52-08:00 xma@us.ibm.com +7 -1 # IB/ipoib: don't call ipoib_put_ah with lock held # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 23:17:33-08:00 xma@us.ibm.com +5 -1 # IB/ipoib: don't call ipoib_put_ah with lock held # # ChangeSet # 2005/03/05 09:17:36-08:00 xma@us.ibm.com # [PATCH] IB/ipoib: small fixes # # IPoIB small fixes: Initialize path->ah to NULL, and fix dereference after free # of neigh in error path of neigh_add_path(). # # Signed-off-by: Shirley Ma # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 23:17:34-08:00 xma@us.ibm.com +3 -2 # IB/ipoib: small fixes # # ChangeSet # 2005/03/05 09:17:23-08:00 roland@topspin.com # [PATCH] IB/ipoib: rename global symbols # # Make IPoIB data_debug_level module parameter static to the single file # where it is used. Also Rename IPoIB module parameter variable from # "debug_level" to "ipoib_debug_level". This avoids possible name # clashes if IPoIB is built into the kernel. We use module_param_named # so that the user-visible parameter names remain the same. # # Signed-off-by: Tom Duffy # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_main.c # 2005/03/04 23:17:34-08:00 roland@topspin.com +2 -2 # IB/ipoib: rename global symbols # # drivers/infiniband/ulp/ipoib/ipoib_ib.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +1 -1 # IB/ipoib: rename global symbols # # drivers/infiniband/ulp/ipoib/ipoib.h # 2005/03/04 22:32:52-08:00 roland@topspin.com +2 -2 # IB/ipoib: rename global symbols # # ChangeSet # 2005/03/05 09:17:09-08:00 xma@us.ibm.com # [PATCH] IB/ipoib: use list_for_each_entry_safe when required # # Change uses of list_for_each_entry() where the loop variable is freed # inside the loop to list_for_each_entry_safe(). # # Signed-off-by: Shirley Ma # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_multicast.c # 2005/03/04 23:17:34-08:00 xma@us.ibm.com +2 -2 # IB/ipoib: use list_for_each_entry_safe when required # # ChangeSet # 2005/03/05 09:16:56-08:00 roland@topspin.com # [PATCH] IB/ipoib: fix rx memory leak # # Fix memory leak when posting a receive buffer (pointed out by Shirley Ma). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/ulp/ipoib/ipoib_ib.c # 2005/03/04 23:17:34-08:00 roland@topspin.com +3 -0 # IB/ipoib: fix rx memory leak # # ChangeSet # 2005/03/05 09:16:43-08:00 roland@topspin.com # [PATCH] IB/mthca: fix reset value endianness # # MTHCA_RESET_VALUE must always be swapped, since the HCA expects to see # it in big-endian order and we write it with writel. This means on # little-endian systems we have to swap it to big-endian order before # writing, and on big-endian systems we need to swap it to make up for # the additional swap that writel will do. This fixes resetting the HCA # on big-endian machines. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_reset.c # 2005/03/04 22:32:51-08:00 roland@topspin.com +1 -1 # IB/mthca: fix reset value endianness # # ChangeSet # 2005/03/05 09:16:29-08:00 roland@topspin.com # [PATCH] IB/mthca: add missing break # # Add missing break statements in switch in mthca_profile.c (pointed out # by Michael Tsirkin). # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/hw/mthca/mthca_profile.c # 2005/03/04 23:17:32-08:00 roland@topspin.com +2 -0 # IB/mthca: add missing break # # ChangeSet # 2005/03/05 09:16:17-08:00 tduffy@sun.com # [PATCH] IB: sparse fixes # # Fix some sparse warnings by making sure we have appropriate "extern" # declarations visible. # # Signed-off-by: Tom Duffy # Signed-off-by: Hal Rosenstock ( # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/smi.c # 2005/03/04 22:32:51-08:00 tduffy@sun.com +1 -1 # IB: sparse fixes # # drivers/infiniband/core/mad_priv.h # 2005/03/04 23:17:28-08:00 tduffy@sun.com +2 -0 # IB: sparse fixes # # drivers/infiniband/core/cache.c # 2005/03/04 23:17:33-08:00 tduffy@sun.com +2 -0 # IB: sparse fixes # # drivers/infiniband/core/agent.c # 2005/03/04 22:32:51-08:00 tduffy@sun.com +1 -4 # IB: sparse fixes # # ChangeSet # 2005/03/05 09:16:03-08:00 shaharf@voltaire.com # [PATCH] IB: fix vendor MAD deregistration # # Fix bug when deregistering a vendor class MAD agent. # # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/mad_priv.h # 2005/03/04 23:17:35-08:00 shaharf@voltaire.com +2 -2 # IB: fix vendor MAD deregistration # # drivers/infiniband/core/mad.c # 2005/03/04 23:17:32-08:00 shaharf@voltaire.com +9 -4 # IB: fix vendor MAD deregistration # # ChangeSet # 2005/03/05 09:15:49-08:00 halr@voltaire.com # [PATCH] IB: simplify MAD code # # Remove unneeded MAD agent registration by using a single agent for # both directed-route and LID-routed MADs. # # Signed-off-by: Hal Rosenstock # Signed-off-by: Roland Dreier # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/infiniband/core/agent_priv.h # 2005/03/04 22:32:50-08:00 halr@voltaire.com +1 -2 # IB: simplify MAD code # # drivers/infiniband/core/agent.c # 2005/03/04 23:17:35-08:00 halr@voltaire.com +19 -42 # IB: simplify MAD code # # ChangeSet # 2005/03/05 09:15:36-08:00 yuasa@hh.iij4u.or.jp # [PATCH] audit mips fix # # CC arch/mips/kernel/ptrace.o # arch/mips/kernel/ptrace.c: In function 'do_syscall_trace': # arch/mips/kernel/ptrace.c:310: warning: implicit declaration of function 'audit_syscall_entry' # arch/mips/kernel/ptrace.c:310: error: 'struct pt_regs' has no member named 'orig_eax' # arch/mips/kernel/ptrace.c:314: warning: implicit declaration of function 'audit_syscall_exit' # # Signed-off-by: Yoichi Yuasa # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # arch/mips/kernel/ptrace.c # 2005/03/04 22:32:50-08:00 yuasa@hh.iij4u.or.jp +2 -1 # audit mips fix # # ChangeSet # 2005/03/05 09:15:23-08:00 rddunlap@osdl.org # [PATCH] aoe: fix printk warning # # u64's are not longlongs on sparc64 and ppc64. # # Signed-off-by: Randy Dunlap # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # drivers/block/aoe/aoeblk.c # 2005/03/04 22:32:50-08:00 rddunlap@osdl.org +4 -2 # aoe: fix printk warning # # ChangeSet # 2005/03/05 09:15:09-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # This patch should fix a problem that has been experienced on at-least one # busy NFS server, but it has not had lots of testing yet. If -mm could provide # that ..... # # The rpc auth cache currently differentiates between a reference due to # being in a hash chain (signalled by CACHE_HASHED flag) and any other # reference (counted in refcnt). # # This is an artificial difference due to an historical accident, and it # makes cache_put unsafe. # # This patch removes the distinction so now existance in a hash chain is # counted just like any other reference. Thus a race window in cache_put is # closed. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +4 -4 # nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # net/sunrpc/cache.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +1 -3 # nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # include/linux/sunrpc/cache.h # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +5 -14 # nfsd: discard CACHE_HASHED flag, keeping information in refcount instead. # # ChangeSet # 2005/03/05 09:14:56-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: change nfsd reply cache to use list.h lists # # also kmalloc the cache one entry at a time, instead of in one big slab. # # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # include/linux/nfsd/cache.h # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +3 -4 # nfsd: change nfsd reply cache to use list.h lists # # fs/nfsd/nfscache.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +43 -88 # nfsd: change nfsd reply cache to use list.h lists # # ChangeSet # 2005/03/05 09:14:42-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: global/static cleanups for nfsd # # The patch below contains the following cleanups: # - make some needlessly global code static # # Signed-off-by: Adrian Bunk # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nfsd/vfs.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +4 -4 # nfsd: global/static cleanups for nfsd # # fs/nfsd/nfssvc.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: global/static cleanups for nfsd # # fs/nfsd/nfsfh.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +6 -5 # nfsd: global/static cleanups for nfsd # # fs/nfsd/lockd.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: global/static cleanups for nfsd # # fs/nfsd/export.c # 2005/03/04 22:32:50-08:00 neilb@cse.unsw.edu.au +11 -11 # nfsd: global/static cleanups for nfsd # # ChangeSet # 2005/03/05 09:14:29-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: nfsd: remove pg_authenticate field # # The pg_authenticate (now pg_authenticate_obsolete) callback was only being # used by the nfs4 client callback code to circumvent the svcauth_unix code's # insistence on checking all requests against the export table. With that # problem solved, we no longer need it. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svc.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +1 -4 # nfsd: nfsd: remove pg_authenticate field # # include/linux/sunrpc/svc.h # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +0 -2 # nfsd: nfsd: remove pg_authenticate field # # ChangeSet # 2005/03/05 09:14:15-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: lockd: don't try to match callback requests against export table # # On lockd callbacks, we're a client, and the source address is that of a # server, so we shouldn't be trying to match the source address of the callback # request against our export table. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/lockd/svc.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +18 -0 # nfsd: lockd: don't try to match callback requests against export table # # ChangeSet # 2005/03/05 09:14:01-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: nfs4: use new pg_set_client method to simplify nfs4 callback authentication # # Use new pg_authenticate method to simplify nfs4 callback authentication. # # This also has the effect of changing the error return from rejectedcred to # badcred. I believe the change is correct. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nfs/callback.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +9 -147 # nfsd: nfs4: use new pg_set_client method to simplify nfs4 callback authentication # # ChangeSet # 2005/03/05 09:13:48-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # svcauth_null_accept() and svcauth_unix_accept() are currently hard-wired to # check the source ip address on an incoming request against the export table, # which make sense for nfsd but not necessarily for other rpc-based services. # # So instead we have the accept() method call a program-specific # pg_authenticate() method. We also move the call to this method into # svc_process instead of calling it from the flavor-specific accept() routines. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth_unix.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +2 -16 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # net/sunrpc/svc.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +11 -1 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # net/sunrpc/auth_gss/svcauth_gss.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +2 -7 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # include/linux/sunrpc/svc.h # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +1 -0 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # fs/nfsd/nfssvc.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +2 -0 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # fs/lockd/svc.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +15 -0 # nfsd: svcrpc: move export table checks to a per-program pg_add_client method # # ChangeSet # 2005/03/05 09:13:35-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: svcrpc: rename pg_authenticate # # Later patches remove pg_authenticate and use the name for a different purpose; # so rename it to pg_authenticate_obsolete for now. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svc.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +2 -2 # nfsd: svcrpc: rename pg_authenticate # # include/linux/sunrpc/svc.h # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: svcrpc: rename pg_authenticate # # fs/nfs/callback.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +1 -1 # nfsd: svcrpc: rename pg_authenticate # # ChangeSet # 2005/03/05 09:13:22-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: svcrpc: add a per-flavor set_client method # # Add a set_client method to the server rpc auth_ops struct, used to set the # client (for the purposes of nfsd export authorization) using flavor-specific # information. # # Signed-off-by: J. Bruce Fields # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # net/sunrpc/svcauth_unix.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +2 -0 # nfsd: svcrpc: add a per-flavor set_client method # # net/sunrpc/svcauth.c # 2005/03/04 23:17:36-08:00 neilb@cse.unsw.edu.au +5 -0 # nfsd: svcrpc: add a per-flavor set_client method # # net/sunrpc/sunrpc_syms.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +1 -0 # nfsd: svcrpc: add a per-flavor set_client method # # net/sunrpc/auth_gss/svcauth_gss.c # 2005/03/04 23:17:37-08:00 neilb@cse.unsw.edu.au +14 -0 # nfsd: svcrpc: add a per-flavor set_client method # # include/linux/sunrpc/svcauth.h # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +2 -0 # nfsd: svcrpc: add a per-flavor set_client method # # ChangeSet # 2005/03/05 09:13:08-08:00 neilb@cse.unsw.edu.au # [PATCH] nfsd: exportfs: reduce stack usage # # find_exported_dentry() declares # char nbuf[NAME_MAX+1]; # in 2 separate places, and gcc allocates space on the stack for both # of them. Having just one of them will suffice, if we can put put # with its scope. # # Reduces function stack usage on x86-32 from 0x230 to 0x130. # # Signed-off-by: Randy Dunlap # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/exportfs/expfs.c # 2005/03/04 22:32:49-08:00 neilb@cse.unsw.edu.au +1 -3 # nfsd: exportfs: reduce stack usage # # ChangeSet # 2005/03/05 09:12:54-08:00 neilb@cse.unsw.edu.au # [PATCH] SGI 921857: find broken with nohide on NFSv3 # # This patch makes "find" work when traversing nohide exports on NFSv3. The # READDIRPLUS reply needs to not return a file handle for the ".." entry when # the directory is a server side mountpoint, which would be the directory # itself, otherwise the client remembers the wrong file handle and gets # confused. # # Signed-off-by: Greg Banks # Signed-off-by: Neil Brown # Signed-off-by: Andrew Morton # Signed-off-by: Linus Torvalds # # fs/nfsd/nfs3xdr.c # 2005/03/04 22:32:48-08:00 neilb@cse.unsw.edu.au +5 -0 # SGI 921857: find broken with nohide on NFSv3 # # ChangeSet # 2005/03/05 15:55:50+00:00 rmk@flint.arm.linux.org.uk # [ARM] Remove ARM specific set_pmd() # # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # Signed-off-by: Russell King # # include/asm-arm/pgtable.h # 2005/03/05 15:51:55+00:00 rmk@flint.arm.linux.org.uk +0 -6 # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # arch/arm/mm/mm-armv.c # 2005/03/05 15:51:55+00:00 rmk@flint.arm.linux.org.uk +5 -3 # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # arch/arm/mach-sa1100/assabet.c # 2005/03/05 15:51:54+00:00 rmk@flint.arm.linux.org.uk +5 -3 # set_pmd has specific behaviour on ARM which may be unexpected. Since # it is rather too close to macros used by other architectures, open # code this functionality. # # ChangeSet # 2005/03/05 14:29:38+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix sparse warnings for ebsa110 IO implementation # # Signed-off-by: Russell King # # arch/arm/mach-ebsa110/io.c # 2005/03/05 14:25:03+00:00 rmk@flint.arm.linux.org.uk +32 -55 # Fix sparse warnings for ebsa110 IO implementation # # ChangeSet # 2005/03/05 14:20:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add __iomem checking for __raw_{read,write}[bwl] # # Signed-off-by: Russell King # # include/asm-arm/io.h # 2005/03/05 14:16:24+00:00 rmk@flint.arm.linux.org.uk +6 -6 # Add __iomem checking for __raw_{read,write}[bwl] # # ChangeSet # 2005/03/05 14:22:13+01:00 marcel@holtmann.org # [Bluetooth] Update entry for the BPA 100/105 driver # # This patch adds the missing entry for the BPA 100/105 driver # into the MAINTAINERS file. # # Signed-off-by: Marcel Holtmann # # MAINTAINERS # 2005/03/05 14:20:42+01:00 marcel@holtmann.org +5 -0 # Update entry for the BPA 100/105 driver # # ChangeSet # 2005/03/05 14:10:28+01:00 marcel@holtmann.org # [Bluetooth] Enhance HCI callback interface # # This patch adds callback functions for changing the link key and # switching the role to the Bluetooth core interface. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/hci_conn.c # 2005/03/05 14:08:48+01:00 marcel@holtmann.org +18 -0 # Enhance HCI callback interface # # net/bluetooth/hci_event.c # 2005/03/05 14:08:45+01:00 marcel@holtmann.org +31 -7 # Enhance HCI callback interface # # include/net/bluetooth/hci_core.h # 2005/03/05 14:05:56+01:00 marcel@holtmann.org +31 -1 # Enhance HCI callback interface # # ChangeSet # 2005/03/05 13:45:00+01:00 marcel@holtmann.org # [Bluetooth] Convert clock offset value from little endian # # The clock offset value is stored in little endian and so convert # it before showing it in the inquiry cache list. # # Signed-off-by: Marcel Holtmann # # net/bluetooth/hci_sysfs.c # 2005/03/05 13:43:03+01:00 marcel@holtmann.org +1 -1 # Convert clock offset value from little endian # # ChangeSet # 2005/03/05 13:31:32+01:00 marcel@holtmann.org # [Bluetooth] Remove interruptible_sleep_on_timeout() usage # # Remove deprecated interruptible_sleep_on_timeout() function calls # and replace them with direct wait-queue usage. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/bluecard_cs.c # 2005/03/05 13:30:19+01:00 marcel@holtmann.org +9 -5 # Remove interruptible_sleep_on_timeout() usage # # ChangeSet # 2005/03/05 13:29:30+01:00 marcel@holtmann.org # [Bluetooth] Don't use ISOC transfers for sniffer devices # # The sniffer devices present themself as a full H:2 device, but # actually they don't need any ISOC transfers and so don't start # them. # # Signed-off-by: Marcel Holtmann # # drivers/bluetooth/hci_usb.c # 2005/03/05 13:27:09+01:00 marcel@holtmann.org +1 -1 # Don't use ISOC transfers for sniffer devices # # ChangeSet # 2005/03/04 20:21:20-08:00 davem@northbeach.davemloft.net.davemloft.net # [TIGON3]: Update driver version and reldate. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/04 20:21:03-08:00 davem@northbeach.davemloft.net.davemloft.net +2 -2 # [TIGON3]: Update driver version and reldate. # # ChangeSet # 2005/03/04 20:20:02-08:00 davem@northbeach.davemloft.net.davemloft.net # [TIGON3]: Do not touch NIC_SRAM_FIRMWARE_MBOX when TG3_FLG2_SUN_570X. # # There is no firmware on these chips, so accessing this # value is pointless. But, more importantly, touching # this area on such chips results in PCI PIO timeouts. # # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/03/04 20:19:37-08:00 davem@northbeach.davemloft.net.davemloft.net +17 -15 # [TIGON3]: Do not touch NIC_SRAM_FIRMWARE_MBOX when TG3_FLG2_SUN_570X. # # ChangeSet # 2005/03/04 16:47:05-08:00 davem@northbeach.davemloft.net.davemloft.net # [SPARC64]: Tomatillo PCI controller bug fixes. # # - Error handlers were mis-calculating ICLR register to # ACK on Tomatillo. # - PCI error handlers should not ACK other IRQ. # - Fix Tomatillo version comparison for PCI Timeout # Interval setting # - Tomatillo PCI control register prefetch enable bits # were off. # - Tomatillo revs <= 1 need bit 61 set, all others should # have it clear. This is in the PCI control register. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/pci_schizo.c # 2005/03/04 16:46:31-08:00 davem@northbeach.davemloft.net.davemloft.net +69 -43 # [SPARC64]: Tomatillo PCI controller bug fixes. # # ChangeSet # 2005/03/04 16:12:52-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into ppc970.osdl.org:/home/torvalds/v2.6/linux # # include/linux/pci_ids.h # 2005/03/04 16:12:48-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2005/03/04 23:55:22+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix two missed ether1_outw() function calls. # # Signed-off-by: Russell King # # drivers/net/arm/ether1.c # 2005/03/04 23:51:18+00:00 rmk@flint.arm.linux.org.uk +2 -2 # Fix two missed ether1_outw() function calls. # # ChangeSet # 2005/03/04 23:13:29+00:00 nico@org.rmk.(none) # [ARM PATCH] 2514/1: save iWMMXt context to ram before entering sleep mode # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mach-pxa/pm.c # 2005/03/04 00:00:00+00:00 nico@org.rmk.(none) +5 -0 # [PATCH] 2514/1: save iWMMXt context to ram before entering sleep mode # # ChangeSet # 2005/03/04 22:07:11+00:00 rmk@flint.arm.linux.org.uk # [MMC] Use bus dev_attrs instead of handling device attrs manually # # Convert MMC to use bus dev_attrs instead of handling the registration # of these attributes itself. # # Signed-off-by: Russell King # # drivers/mmc/mmc_sysfs.c # 2005/03/04 22:01:12+00:00 rmk@flint.arm.linux.org.uk +37 -40 # Convert MMC to use bus dev_attrs instead of handling the registration # of these attributes itself. # # ChangeSet # 2005/03/04 21:19:20+00:00 gtj.member@com.rmk.(none) # [ARM PATCH] 2472/1: Updates 8250.c to correctly detect XScale UARTs # # Patch from George Joseph # # Modifications to autoconfig_16550a to add a testcase # to detect XScale UARTS. # # Signed-off-by: George Joseph # Signed-off-by: Russell King # # drivers/serial/8250.c # 2005/01/24 16:00:57+00:00 gtj.member@com.rmk.(none) +35 -0 # [PATCH] 2472/1: Updates 8250.c to correctly detect XScale UARTs # # ChangeSet # 2005/03/04 18:43:44+00:00 nico@org.rmk.(none) # [ARM PATCH] 2513/1: more PXA27x regs to save for sleep mode # # Patch from Nicolas Pitre # # ... plus Mainstone bits. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mach-pxa/pm.c # 2005/03/04 00:00:00+00:00 nico@org.rmk.(none) +34 -7 # [PATCH] 2513/1: more PXA27x regs to save for sleep mode # # arch/arm/mach-pxa/mainstone.c # 2005/03/04 00:00:00+00:00 nico@org.rmk.(none) +9 -0 # [PATCH] 2513/1: more PXA27x regs to save for sleep mode # # ChangeSet # 2005/03/04 18:19:21+00:00 davis_g@com.rmk.(none) # [ARM PATCH] 2459/1: ARMv6 supersections for static kernel direct mapped memory regions [updated] # # Patch from George G. Davis # # Use ARMv6 supersections for 16MiB static kernel direct mapped memory # regions when possible. # Based on comments received for the first version of this patch, this # version has added a comment to clarify that ARMv6 supersections are # only valid for the domain == 0 case and moved the supersection address # mask and size macros before the hardware page table definitions. # # Signed-off-by: George G. Davis # Signed-off-by: Russell King # # include/asm-arm/pgtable.h # 2005/03/04 00:00:00+00:00 davis_g@com.rmk.(none) +8 -0 # [PATCH] 2459/1: ARMv6 supersections for static kernel direct mapped memory regions [updated] # # arch/arm/mm/mm-armv.c # 2005/03/04 00:00:00+00:00 davis_g@com.rmk.(none) +43 -1 # [PATCH] 2459/1: ARMv6 supersections for static kernel direct mapped memory regions [updated] # # ChangeSet # 2005/03/04 17:01:00+00:00 andrew@com.rmk.(none) # [ARM PATCH] 1941/2: End-of-interrupt (irq_finish) macro on ARM # # Patch from SAN People # # On some ARM-based processor's (eg, Atmel's AT91RM9200) it is necessary # to signal the end-of-interrupt to the interrupt controller. This is # necessary so it can restore its internal priority levels, etc. # This patch is equivalent to the version in the current 2.4 kernels. # Patch now updated to 2.6.11 # # Signed-off-by: Andrew Victor # Signed-off-by: Russell King # # arch/arm/kernel/irq.c # 2005/03/04 10:08:06+00:00 andrew@com.rmk.(none) +9 -0 # [PATCH] 1941/2: End-of-interrupt (irq_finish) macro on ARM # # ChangeSet # 2005/03/04 16:47:29+00:00 rpurdie@net.rmk.(none) # [ARM PATCH] 2510/1: PXA: Disable pxa_gpio_irq_type printks # # Patch from Richard Purdie # # The printks inside pxa_gpio_irq_type damage performance and are of little value in a production kernel. They should be disabled. # # Signed-off-by: Richard PurdieSigned-off-by: Nicolas Pitre # Signed-off-by: Russell King # # arch/arm/mach-pxa/irq.c # 2005/03/02 21:35:46+00:00 rpurdie@net.rmk.(none) +4 -4 # [PATCH] 2510/1: PXA: Disable pxa_gpio_irq_type printks # # ChangeSet # 2005/03/04 16:24:42+00:00 tglx@de.rmk.(none) # [ARM PATCH] 2477/1: Move double defined macro to header file # # Patch from Thomas Gleixner # # IRQ_DISPATCH is defined in two c files. Move it to the common header file. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Russell King # # arch/arm/mach-lh7a40x/irq-lpd7a40x.c # 2005/03/04 00:00:00+00:00 tglx@de.rmk.(none) +0 -2 # [PATCH] 2477/1: Move double defined macro to header file # # arch/arm/mach-lh7a40x/common.h # 2005/03/04 00:00:00+00:00 tglx@de.rmk.(none) +2 -0 # [PATCH] 2477/1: Move double defined macro to header file # # arch/arm/mach-lh7a40x/arch-lpd7a40x.c # 2005/03/04 00:00:00+00:00 tglx@de.rmk.(none) +0 -2 # [PATCH] 2477/1: Move double defined macro to header file # # ChangeSet # 2005/03/03 23:15:05+00:00 nico@org.rmk.(none) # [ARM PATCH] 2509/1: fix watchdog timer frequency for PXA27x # # Patch from Nicolas Pitre # # Signed-off-by: Nicolas Pitre # Signed-off-by: Russell King # # drivers/char/watchdog/sa1100_wdt.c # 2005/02/25 18:53:29+00:00 nico@org.rmk.(none) +1 -1 # [PATCH] 2509/1: fix watchdog timer frequency for PXA27x # # ChangeSet # 2005/03/03 22:57:33+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2512/1: S3C2410 - remove bast-cpld.h from include/asm-arm/arch-s3c2410/hardware.h # # Patch from Ben Dooks # # Remove the include of bast-cpld.h, as it shouldn't be here as # it only defines some extra bast-specific registers, and does # not affect the configuration of the hardware dependenat items. # Ensure that the file is included in the one place it is needed # and not included. # This should discourage anyone else putting include files in # which do not affect the over-all hardware definitions. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/hardware.h # 2005/03/03 14:10:27+00:00 ben-linux@org.rmk.(none) +1 -5 # [PATCH] 2512/1: S3C2410 - remove bast-cpld.h from include/asm-arm/arch-s3c2410/hardware.h # # arch/arm/mach-s3c2410/mach-bast.c # 2005/03/03 14:11:23+00:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2512/1: S3C2410 - remove bast-cpld.h from include/asm-arm/arch-s3c2410/hardware.h # # ChangeSet # 2005/03/03 22:35:54+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2511/1: SMDK2440 - base machine support # # Patch from Ben Dooks # # SMDK2440 core board support # # Signed-off-by: Ben Dooks # # Signed-off-by: Dimitry Andric # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/Makefile # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +1 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/mach-s3c2410/Kconfig # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +6 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/configs/s3c2410_defconfig # 2005/03/03 10:43:43+00:00 ben-linux@org.rmk.(none) +1 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # Documentation/arm/Samsung-S3C24XX/Overview.txt # 2005/03/03 10:31:25+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/mach-s3c2410/mach-smdk2440.c # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +133 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # arch/arm/mach-s3c2410/mach-smdk2440.c # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/mach-smdk2440.c # # Documentation/arm/Samsung-S3C24XX/SMDK2440.txt # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +56 -0 # [PATCH] 2511/1: SMDK2440 - base machine support # # Documentation/arm/Samsung-S3C24XX/SMDK2440.txt # 2005/03/03 10:30:16+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt # # ChangeSet # 2005/03/03 22:09:57+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2508/1: S3C2440 - timer and irq device updates # # Patch from Ben Dooks # # The patch does a number of updates, which are inter-dependant # on each other, for the s3c2440 support and some clean-ups for # all s3c24xx architecture in general. # 1) Remove the s3c24xx_{fclk,hclk,pclk} variables, and pass # these values to the clock core on initialisation. This # removes the needless double copy, as only the timer code # uses these directly (see point 4). # Add an over-all xtal clock to the clock core # 2) Add a sysdev driver to the clock code to ensure all the # s3c2440 clocks are added if an s3c2440 is present. # 3) Add the new IRQs to irq.c, and initialise them if the # sysdev for the s3c2440 is present. # 4) Change the timer code to request the timer clk and # use it to get the frequency. # Depends on patch 2467/1 # Thanks to Guillaume Gourat for the original patches that # prompted this re-write. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/irqs.h # 2005/03/01 00:54:26+00:00 ben-linux@org.rmk.(none) +13 -4 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/time.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +20 -3 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/s3c2440.c # 2005/03/01 00:41:52+00:00 ben-linux@org.rmk.(none) +30 -42 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/s3c2410.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +9 -8 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/irq.c # 2005/03/01 01:02:28+00:00 ben-linux@org.rmk.(none) +173 -0 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/cpu.h # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/cpu.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +5 -4 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/clock.h # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +6 -9 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # arch/arm/mach-s3c2410/clock.c # 2005/03/01 00:29:07+00:00 ben-linux@org.rmk.(none) +83 -13 # [PATCH] 2508/1: S3C2440 - timer and irq device updates # # ChangeSet # 2005/03/03 21:58:16+00:00 buytenh@org.rmk.(none) # [ARM PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # Patch from Lennert Buytenhek # # This patch makes the ixp2000 port use section mappings for on-chip # registers. This has two advantages: # 1. It saves some TLB entries. # 2. It enables us to work around ixp2400 erratum #66, for which the # suggested (and only) fix involves mapping all on-chip registers # using XCB=101 instead of XCB=000. # This patch was derived from an older patch for the same erratum # (ARM patch ID 2265/1), made by Deepak Saxena. # Note that this patch does not actually constitute a workaround for # erratum #66, it merely lays the foundation for such a workaround. # # Signed-off-by: Lennert BuytenhekSigned-off-by: Deepak Saxena # Signed-off-by: Russell King # # include/asm-arm/arch-ixp2000/vmalloc.h # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/ixp2000-regs.h # 2005/02/16 23:51:04+00:00 buytenh@org.rmk.(none) +33 -26 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/ixdp2x01.h # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +2 -2 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/ixdp2x00.h # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +1 -1 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # include/asm-arm/arch-ixp2000/entry-macro.S # 2005/02/16 23:49:43+00:00 buytenh@org.rmk.(none) +3 -4 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # arch/arm/mach-ixp2000/core.c # 2005/02/16 23:50:16+00:00 buytenh@org.rmk.(none) +6 -31 # [PATCH] 2491/1: make ixp2000 use section mappings for on-chip registers # # ChangeSet # 2005/03/03 21:35:52+00:00 jelenz@edu.rmk.(none) # [ARM PATCH] 2461/1: base support for poodle machine # # Patch from John Lenz # # Adds support for the Sharp Zaurus SL-5600 # Add the ability to compile any collection of poodle and # corgi support under the PXA_SHARPSL option. # arch/arm/boot/compressed/head-sharpsl.S already has code # to detect the poodle machine. # # Signed-off-by: John Lenz # Signed-off-by: Russell King # # include/asm-arm/arch-pxa/poodle.h # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +111 -0 # [PATCH] 2461/1: base support for poodle machine # # include/asm-arm/arch-pxa/irqs.h # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +32 -0 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/mach-pxa/Makefile # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +2 -1 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/mach-pxa/Kconfig # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +16 -3 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/Kconfig # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +1 -1 # [PATCH] 2461/1: base support for poodle machine # # include/asm-arm/arch-pxa/poodle.h # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-pxa/poodle.h # # arch/arm/mach-pxa/poodle.c # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +181 -0 # [PATCH] 2461/1: base support for poodle machine # # arch/arm/mach-pxa/poodle.c # 2005/03/03 00:00:00+00:00 jelenz@edu.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-pxa/poodle.c # # ChangeSet # 2005/03/03 08:29:59+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2506/1: S3C2410 - dma descriptor slab # # Patch from Ben Dooks # # Use slab allocator instead of kmalloc() to allocate the # dma buffer descriptors. This should allow the tracking # of dma descriptors, and to check if they are being freed # correctly. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # arch/arm/mach-s3c2410/dma.c # 2005/02/28 12:57:12+00:00 ben-linux@org.rmk.(none) +24 -3 # [PATCH] 2506/1: S3C2410 - dma descriptor slab # # ChangeSet # 2005/03/03 08:13:07+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2503/1: S3C2410 - add brief documentation for HP IPAQ H1940 # # Patch from Ben Dooks # # Brief documentation for Documents/arm/Samsung-S3C24XX for the # HP IPAQ H1940 # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # Documentation/arm/Samsung-S3C24XX/H1940.txt # 2005/02/25 12:45:38+00:00 ben-linux@org.rmk.(none) +40 -0 # [PATCH] 2503/1: S3C2410 - add brief documentation for HP IPAQ H1940 # # Documentation/arm/Samsung-S3C24XX/H1940.txt # 2005/02/25 12:45:38+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/Documentation/arm/Samsung-S3C24XX/H1940.txt # # ChangeSet # 2005/03/03 07:53:43+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2502/1: S3C2410 - watchdog during kernel uncompression # # Patch from Ben Dooks # # Enable the watchdog at the start of the kernel uncompression # stage, so that if any errors occur before the kernel reaches # the stage where it can start running processes then the system # will be reset. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/uncompress.h # 2005/02/25 12:16:22+00:00 ben-linux@org.rmk.(none) +48 -15 # [PATCH] 2502/1: S3C2410 - watchdog during kernel uncompression # # arch/arm/mach-s3c2410/Kconfig # 2005/02/25 12:30:13+00:00 ben-linux@org.rmk.(none) +20 -0 # [PATCH] 2502/1: S3C2410 - watchdog during kernel uncompression # # ChangeSet # 2005/03/02 23:18:01-08:00 gregkh@suse.de # Merge suse.de:/home/greg/linux/BK/bleed-2.6 # into suse.de:/home/greg/linux/BK/pci-2.6 # # include/linux/pci_ids.h # 2005/03/02 23:17:58-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/scsi/qla2xxx/qla_os.c # 2005/03/02 23:17:58-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/pci/pci.c # 2005/03/02 23:17:57-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/net/s2io.c # 2005/03/02 23:17:57-08:00 gregkh@suse.de +0 -0 # Auto merged # # drivers/net/r8169.c # 2005/03/02 23:17:57-08:00 gregkh@suse.de +0 -0 # Auto merged # # ChangeSet # 2005/03/03 00:56:29-05:00 jchapman@katalix.com # [PATCH] mii: add GigE support # # Add support for GigE PHYs in MII support library. # # This patch allows GigE drivers to use the MII library the same way # 10/100 drivers do. # # Since the MII library is already used by lots of network drivers and the # GigE MII register bit definitions were reserved when many 10/100 PHYs # were designed, the new GigE registers are accessed only if a driver # specifically enables it. Existing 10/100 drivers should see no behavior # differences with this change. # # Signed-off-by: James Chapman # Signed-off-by: Jeff Garzik # # include/linux/mii.h # 2005/02/25 16:12:07-05:00 jchapman@katalix.com +18 -6 # mii: add GigE support # # drivers/net/mii.c # 2005/02/25 16:12:07-05:00 jchapman@katalix.com +54 -9 # mii: add GigE support # # ChangeSet # 2005/03/02 21:36:48-08:00 yoshfuji@linux-ipv6.org # [TCP]: Put back tcp_timer_bug_msg[] symbol export. # # It is needed for tcp_reset_xmit_timer(), which is invoked by # tcp_prequeue() which is invoked from tcp_ipv6.c # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # net/ipv4/tcp_timer.c # 2005/03/02 21:36:38-08:00 yoshfuji@linux-ipv6.org +1 -0 # [TCP]: Put back tcp_timer_bug_msg[] symbol export. # # It is needed for tcp_reset_xmit_timer(), which is invoked by # tcp_prequeue() which is invoked from tcp_ipv6.c # # Signed-off-by: Hideaki YOSHIFUJI # Signed-off-by: David S. Miller # # ChangeSet # 2005/03/03 00:23:55-05:00 xose@wanadoo.es # [PATCH] 2.6 eepro100: replace and delete duplicate ids # # - replace PCI_DEVICE_ID_INTEL_82557 and PCI_DEVICE_ID_INTEL_82559ER # with theirs hex numbers # - PCI_DEVICE_ID_INTEL_82801BA_7 is a duplicate of 0x2449. # # Signed-off-by: Jeff Garzik # # drivers/net/eepro100.c # 2005/02/01 15:10:15-05:00 xose@wanadoo.es +2 -6 # 2.6 eepro100: replace and delete duplicate ids # # ChangeSet # 2005/03/03 00:22:23-05:00 akpm@osdl.org # [PATCH] drivers/net/wan/z85230.c interrupt handling fix # # From: tom watson # # While working on a driver for z85230 based board I noticed what looks like # it could be a problem. If the interrupt handler is handling an interrupt # on port b and an interrupt comes in for port a, it seems to me that the # port b handler would be called instead of the port a handler, and possibly # hang the board until reset. # # Attached is a patch to set the irq methods back to port a before attempting # to call them. # # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/wan/z85230.c # 2005/02/24 12:39:03-05:00 akpm@osdl.org +3 -1 # drivers/net/wan/z85230.c interrupt handling fix # # ChangeSet # 2005/03/03 00:21:30-05:00 bunk@stusta.de # [PATCH] drivers/scsi/sata_*: make code static # # This patch makes needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_vsc.c # 2005/02/28 13:55:40-05:00 bunk@stusta.de +2 -1 # drivers/scsi/sata_*: make code static # # drivers/scsi/sata_svw.c # 2005/02/28 13:55:06-05:00 bunk@stusta.de +2 -2 # drivers/scsi/sata_*: make code static # # drivers/scsi/sata_sil.c # 2005/02/28 13:54:34-05:00 bunk@stusta.de +1 -1 # drivers/scsi/sata_*: make code static # # drivers/scsi/sata_nv.c # 2005/02/28 13:54:00-05:00 bunk@stusta.de +4 -2 # drivers/scsi/sata_*: make code static # # ChangeSet # 2005/03/03 00:19:59-05:00 khc@pm.waw.pl # [PATCH] WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # The last change to drivers/wan/hd6457x.c was a bit fatal to drivers # using it - the attached patch fixes NULL pointer dereference on RX. # # I've updated URLs in MAINTAINERS and wan/Kconfig as well. # # Signed-off-by: Krzysztof Halasa # Signed-off-by: Jeff Garzik # # drivers/net/wan/hd6457x.c # 2005/02/28 19:58:08-05:00 khc@pm.waw.pl +1 -1 # WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # drivers/net/wan/Kconfig # 2005/02/28 19:58:08-05:00 khc@pm.waw.pl +6 -5 # WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # MAINTAINERS # 2005/02/28 19:58:08-05:00 khc@pm.waw.pl +2 -2 # WAN drivers fix: N2, C101, PCI200SYN - quite fatal # # ChangeSet # 2005/03/03 00:18:38-05:00 mporter@kernel.crashing.org # [PATCH] emac: fix skb allocation for full-size jumbo frames # # Sets jumbo frame handling based on MTU and allocates rx buffers # large to handle full-size jumbo frames. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # drivers/net/ibm_emac/ibm_emac_core.h # 2005/02/18 11:30:07-05:00 mporter@kernel.crashing.org +2 -0 # emac: fix skb allocation for full-size jumbo frames # # drivers/net/ibm_emac/ibm_emac_core.c # 2005/02/18 11:23:08-05:00 mporter@kernel.crashing.org +12 -4 # emac: fix skb allocation for full-size jumbo frames # # ChangeSet # 2005/03/03 00:17:59-05:00 rddunlap@osdl.org # [PATCH] tulip/de2104x: don't mix __init & __devinit sections # # tulip/de2104x: fix section usage, don't mix __init & __devinit: # # Error: ./drivers/net/tulip/de2104x.o .text refers to 000000000000176d R_X86_64_PC32 .init.text+0xfffffffffffffffc # Error: ./drivers/net/tulip/de2104x.o .text refers to 0000000000001798 R_X86_64_PC32 .init.text+0xfffffffffffffffc # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/tulip/de2104x.c # 2005/03/02 12:49:14-05:00 rddunlap@osdl.org +1 -1 # tulip/de2104x: don't mix __init & __devinit sections # # ChangeSet # 2005/03/03 00:17:18-05:00 rddunlap@osdl.org # [PATCH] net/wan/sbni: fix section usage # # net/wan/sbni data reference can be initdata: # # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000000 R_X86_64_64 .init.data+0x0000000000000060 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000008 R_X86_64_64 .init.data+0x0000000000000140 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000010 R_X86_64_64 .init.data+0x0000000000000180 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000018 R_X86_64_64 .init.data+0x0000000000000020 # Error: ./drivers/net/wan/sbni.o .data refers to 0000000000000020 R_X86_64_64 .init.data+0x00000000000001c0 # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/wan/sbni.c # 2005/03/02 12:45:09-05:00 rddunlap@osdl.org +1 -1 # net/wan/sbni: fix section usage # # ChangeSet # 2005/03/03 00:15:00-05:00 liml@rtr.ca # [PATCH] sata_qstor: eh_timeout fix # # Here is an update to sata_qstor.c to enable full/proper # register access during eh_timeout handling. # # Signed-off-by: Mark Lord # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_qstor.c # 2005/02/28 11:19:31-05:00 liml@rtr.ca +24 -6 # sata_qstor: eh_timeout fix # # ChangeSet # 2005/03/03 00:09:04-05:00 rddunlap@osdl.org # [PATCH] prism54: fix printk format warnings # # prism54 build shows some printk format complaints: # (sparc64 build warning) # # drivers/net/wireless/prism54/isl_38xx.c:131: warning: long int format, different type arg (arg 3) # drivers/net/wireless/prism54/isl_38xx.c:151: warning: long int format, different type arg (arg 3) # # cross-compile results: # https://www.osdl.org/plm-cgi/plm?module=patch_info&patch_id=4240 # # Signed-off-by: Randy Dunlap # Signed-off-by: Jeff Garzik # # drivers/net/wireless/prism54/isl_38xx.c # 2005/03/01 23:15:00-05:00 rddunlap@osdl.org +6 -6 # prism54: fix printk format warnings # # ChangeSet # 2005/03/03 00:07:46-05:00 takis@lumumba.luc.ac.be # [PATCH] Possible AMD8111e free irq issue # # It seems to me that if in the amd8111e_open() fuction dev->irq isn't # zero and the irq request succeeds it might not get released anymore. # # Specifically, on failure of the amd8111e_restart() call the function # returns -ENOMEM without releasing the irq. The amd8111e_restart() # function can fail because of various pci_alloc_consistent() and # dev_alloc_skb() calls in amd8111e_init_ring() which is being # called by amd8111e_restart. # # 1374 if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, # 1375 dev->name, dev)) # 1376 return -EAGAIN; # # Signed-off-by: Jeff Garzik # # drivers/net/amd8111e.c # 2005/02/28 07:45:09-05:00 takis@lumumba.luc.ac.be +2 -0 # Possible AMD8111e free irq issue # # ChangeSet # 2005/03/03 00:04:43-05:00 tvignaud@mandrakesoft.com # [PATCH] fix driver name in dl2k as returned by ETHTOOL_GDRVINFO # # The GDRVINFO command of the ETHTOOL ioctl returns a bogus driver name. # # this bug confusees various network config tools... # # see mdk bug #12609 (http://qa.mandrakesoft.com/show_bug.cgi?id=12609) # for reference # # Signed-off-by: Thierry Vignaud # Signed-off-by: Jeff Garzik # # drivers/net/dl2k.c # 2005/02/25 13:26:52-05:00 tvignaud@mandrakesoft.com +1 -1 # fix driver name in dl2k as returned by ETHTOOL_GDRVINFO # # ChangeSet # 2005/03/03 00:02:38-05:00 sfeldma@pobox.com # [PATCH] eepro100: remove ID for 82556 # # 82556 support doesn't work with eepro100, so this removes the ID # (0x1228) for 82556. See this thread for more info: # # http://marc.theaimsgroup.com/?l=linux-kernel&m=110726223221165&w=2 # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # drivers/net/eepro100.c # 2005/03/03 00:02:31-05:00 sfeldma@pobox.com +0 -1 # [PATCH] eepro100: remove ID for 82556 # # 82556 support doesn't work with eepro100, so this removes the ID # (0x1228) for 82556. See this thread for more info: # # http://marc.theaimsgroup.com/?l=linux-kernel&m=110726223221165&w=2 # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/03 00:01:46-05:00 linville@redhat.com # [PATCH] sk98lin: add MODULE_DEVICE_TABLE entry # # Signed-off-by: Jeff Garzik # # drivers/net/sk98lin/skge.c # 2005/03/03 00:01:39-05:00 linville@redhat.com +2 -0 # [PATCH] sk98lin: add MODULE_DEVICE_TABLE entry # # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/03 00:00:49-05:00 pavel@suse.cz # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/via-velocity.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/via-rhine.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/typhoon.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +5 -5 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/tulip/tulip_core.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/tg3.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/sungem.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/sis900.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/ne2k-pci.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/natsemi.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/irda/donauboe.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/epic100.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/eepro100.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +3 -3 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/e100.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +2 -2 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/b44.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/amd8111e.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # drivers/net/3c59x.c # 2005/03/03 00:00:42-05:00 pavel@suse.cz +1 -1 # [PATCH] Fix u32 vs. pm_message_t in network device drivers # # This should fix confusion in network device drivers. No code # changes. # # Signed-off-by: Pavel Machek # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:58:29-05:00 mporter@kernel.crashing.org # [PATCH] Add PPC440SP support to IBM EMAC driver # # Configures EMAC thresholds appropriately for the EMAC on the PPC440SP. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # drivers/net/ibm_emac/ibm_emac.h # 2005/03/02 23:58:23-05:00 mporter@kernel.crashing.org +4 -0 # [PATCH] Add PPC440SP support to IBM EMAC driver # # Configures EMAC thresholds appropriately for the EMAC on the PPC440SP. # # Signed-off-by: Matt Porter # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:57:27-05:00 sfeldma@pobox.com # [PATCH] e100: remove reference to NAPI config option # # e100 is NAPI all the time, so the Kconfig option is wasting space. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2005/03/02 23:57:20-05:00 sfeldma@pobox.com +0 -17 # [PATCH] e100: remove reference to NAPI config option # # e100 is NAPI all the time, so the Kconfig option is wasting space. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # Documentation/networking/e100.txt # 2005/03/02 23:57:20-05:00 sfeldma@pobox.com +1 -2 # [PATCH] e100: remove reference to NAPI config option # # e100 is NAPI all the time, so the Kconfig option is wasting space. # # Signed-off-by: Scott Feldman # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:55:36-05:00 akpm@osdl.org # [PATCH] smc91x: power down PHY on suspend # # From: Ian Campbell # # Powering down the PHY saves something like 100mA at 5V on my platform. # Currently it is only done when the interface is brought down but it makes # sense to do it on suspend as well. # # Signed-off-by: Ian Campbell # Signed-off-by: Nicolas Pitre # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.c # 2005/03/02 23:55:29-05:00 akpm@osdl.org +20 -17 # [PATCH] smc91x: power down PHY on suspend # # From: Ian Campbell # # Powering down the PHY saves something like 100mA at 5V on my platform. # Currently it is only done when the interface is brought down but it makes # sense to do it on suspend as well. # # Signed-off-by: Ian Campbell # Signed-off-by: Nicolas Pitre # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:54:56-05:00 jgarzik@pobox.com # [wireless atmel] Add support LG LW2100N WLAN PCMCIA card # # Originally from Serge A. Suchkov . # # drivers/net/wireless/atmel_cs.c # 2005/03/02 23:54:50-05:00 jgarzik@pobox.com +2 -1 # [wireless atmel] Add support LG LW2100N WLAN PCMCIA card # # Originally from Serge A. Suchkov . # # ChangeSet # 2005/03/02 23:50:42-05:00 akpm@osdl.org # [PATCH] Add OMAP support to smc91x Ethernet driver # # From: Tony Lindgren # # Following patch adds support for various OMAP boards to smc91x. # # Signed-off-by: Tony Lindgren # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2005/03/02 23:50:34-05:00 akpm@osdl.org +20 -0 # [PATCH] Add OMAP support to smc91x Ethernet driver # # From: Tony Lindgren # # Following patch adds support for various OMAP boards to smc91x. # # Signed-off-by: Tony Lindgren # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:49:14-05:00 rddunlap@osdl.org # [PATCH] (v2) arlan: remove gcc warning with CONFIG_PROC_FS=n # # Signed-off-by: Jeff Garzik # # drivers/net/wireless/arlan.h # 2005/03/02 23:49:07-05:00 rddunlap@osdl.org +2 -2 # [PATCH] (v2) arlan: remove gcc warning with CONFIG_PROC_FS=n # # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/02 23:48:04-05:00 ganesh.venkatesan@intel.com # [PATCH] ixgb: Documentation/networking/ixgb.txt # # Signed-off-by: Jeff Garzik # # Documentation/networking/ixgb.txt # 2005/03/02 23:47:54-05:00 ganesh.venkatesan@intel.com +4 -5 # [PATCH] ixgb: Documentation/networking/ixgb.txt # # Signed-off-by: Jeff Garzik # # ChangeSet # 2005/03/03 02:32:18+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2500/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-adc.h # # Patch from Ben Dooks # # S3C2410 ADC register definitions # Patch from Shannon Holland # # Signed-off-by: Shannon Holland # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-adc.h # 2005/02/22 18:03:36+00:00 ben-linux@org.rmk.(none) +63 -0 # [PATCH] 2500/1: S3C2410 - include/asm-arm/arch-s3c2410/regs-adc.h # # include/asm-arm/arch-s3c2410/regs-adc.h # 2005/02/22 18:03:36+00:00 ben-linux@org.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/regs-adc.h # # ChangeSet # 2005/03/03 02:11:30+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2495/1: 21285 - fix build warnings # # Patch from Ben Dooks # # 21285 serial driver has a couple of sparse errors from zero # initialiser, as well as an unused label. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # drivers/serial/21285.c # 2005/02/21 12:34:22+00:00 ben-linux@org.rmk.(none) +0 -3 # [PATCH] 2495/1: 21285 - fix build warnings # # ChangeSet # 2005/03/03 01:52:00+00:00 cbrake@com.rmk.(none) # [ARM PATCH] 2488/1: Update Vibren PXA255 IDP support # # Patch from Cliff Brake # # Changes to machine specific files and add defconfig so the CONFIG_ARCH_PXA_IDP machine will build and run. Changes are mostly related to the 2.6 driver model. Also removed code that is no longer required -- support for older versions of hardware, etc. # # Signed-off-by: Cliff Brake # Signed-off-by: Russell King # # include/asm-arm/arch-pxa/idp.h # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +13 -277 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/mach-pxa/leds-idp.c # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +1 -0 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/mach-pxa/idp.c # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +113 -47 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/configs/pxa255-idp_defconfig # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +765 -0 # [PATCH] 2488/1: Update Vibren PXA255 IDP support # # arch/arm/configs/pxa255-idp_defconfig # 2005/02/16 16:52:21+00:00 cbrake@com.rmk.(none) +0 -0 # BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/configs/pxa255-idp_defconfig # # ChangeSet # 2005/03/03 01:37:23+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2483/1: S3C2410 - serial sparse error # # Patch from Ben Dooks # # Eliminate NULL initiated fields in the port structures # which where causing errors from sparse. # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # drivers/serial/s3c2410.c # 2005/02/14 16:58:39+00:00 ben-linux@org.rmk.(none) +0 -6 # [PATCH] 2483/1: S3C2410 - serial sparse error # # ChangeSet # 2005/03/03 01:16:06+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2482/1: IXP2000 - header cleanup # # Patch from Ben Dooks # # fix the following problems: # lib/iomap.c:140: warning: passing arg 1 of `__raw_readsb' makes pointer from integer without a cast # lib/iomap.c:156: warning: passing arg 1 of `__raw_writesb' makes pointer from integer without a cast # include/asm-arm/arch-ixp2000/io.h modified to have (void __iomem *) in front of the alignment code # include/asm/arch/system.h:22: warning: `cli' is deprecated (declared at include/linux/interrupt.h:65) # cli() replace by local_irq_disable # arch/arm/mach-ixp2000/ixdp2x01.c:116: warning: passing arg 1 of `ixp2000_reg_write' from incompatible pointer type # arch/arm/mach-ixp2000/ixdp2x01.c:117: warning: passing arg 1 of `ixp2000_reg_write' from incompatible pointer type # fixed definition of the cpld registers IXDP2X01_CPLD_VIRT_REG() # # Signed-off-by: Ben DooksLooks okay. Test-booted on ENP-2611, no problem. # # # Signed-off-by: Lennert Buytenhek # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 16:59:57-08:00 c.lucas@ifrance.com # [PATCH] drivers/w1/*: convert to pci_register_driver # # convert from pci_module_init to pci_register_driver # (from:http://kerneljanitors.org/TODO). # # Signed-off-by: Christophe Lucas # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/matrox_w1.c # 2005/03/02 09:56:32-08:00 c.lucas@ifrance.com +1 -1 # drivers/w1/*: convert to pci_register_driver # # ChangeSet # 2005/03/02 16:59:41-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: get rid of the potential problems with atomic operations. # # Get rid of the potential problems with atomic operations. # # According to upcoming atomic_ops.txt by David Miller and Anton Blanchard # some archs may reoder atomic operations with nonatomic, since # the former are always visible but the latter are not, this can lead # to unpredicted behaviour. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_therm.c # 2005/03/02 09:56:44-08:00 johnpol@2ka.mipt.ru +2 -0 # w1: get rid of the potential problems with atomic operations. # # drivers/w1/w1_family.c # 2005/03/02 09:56:44-08:00 johnpol@2ka.mipt.ru +2 -0 # w1: get rid of the potential problems with atomic operations. # # ChangeSet # 2005/03/02 16:59:25-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: replace obsoleted *sleep_on* # # Remove obsoleded *sleep_on*. # # Since they are used only to wait for a given flags and awakening # only happens on signals, we can just replace them with # msleep_interruptible. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_int.c # 2005/03/02 09:56:50-08:00 johnpol@2ka.mipt.ru +0 -1 # w1: replace obsoleted *sleep_on* # # drivers/w1/w1.h # 2005/03/02 09:56:50-08:00 johnpol@2ka.mipt.ru +0 -1 # w1: replace obsoleted *sleep_on* # # drivers/w1/w1.c # 2005/03/02 09:56:50-08:00 johnpol@2ka.mipt.ru +5 -13 # w1: replace obsoleted *sleep_on* # # ChangeSet # 2005/03/02 16:59:08-08:00 greg@kroah.com # [PATCH] w1: fix some compiler warnings generated by the last "static" patch. # # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/dscore.h # 2005/03/02 09:57:48-08:00 greg@kroah.com +0 -3 # w1: fix some compiler warnings generated by the last "static" patch. # # drivers/w1/dscore.c # 2005/03/02 09:57:48-08:00 greg@kroah.com +0 -3 # w1: fix some compiler warnings generated by the last "static" patch. # # ChangeSet # 2005/03/02 16:58:52-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: Core cleanup 1/2 # # Trivial cleanups, mostly static/non static, removed unneded exports. # It fuzzes a bit, sorry, patch is quite old. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_int.c # 2005/03/02 09:57:55-08:00 johnpol@2ka.mipt.ru +0 -3 # w1: Core cleanup 1/2 # # drivers/w1/w1_family.c # 2005/03/02 09:57:55-08:00 johnpol@2ka.mipt.ru +0 -2 # w1: Core cleanup 1/2 # # drivers/w1/w1.c # 2005/03/02 09:57:55-08:00 johnpol@2ka.mipt.ru +10 -13 # w1: Core cleanup 1/2 # # ChangeSet # 2005/03/02 16:58:36-08:00 johnpol@2ka.mipt.ru # [PATCH] w1: dscore cleanups. 2/2 # # Trivial cleanups, mostly static/non static, removed unneded exports. # # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/dscore.c # 2005/03/02 09:58:02-08:00 johnpol@2ka.mipt.ru +14 -10 # w1: dscore cleanups. 2/2 # # ChangeSet # 2005/03/02 16:58:20-08:00 nacc@us.ibm.com # [PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible() # # Description: Use msleep_interruptible() instead of schedule_timeout() to # guarantee the task delays as expected. Changed tm to an int, as it now is in # terms of msecs, not jiffies. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Evgeniy Polyakov # Signed-off-by: Greg Kroah-Hartman # # drivers/w1/w1_therm.c # 2005/03/02 09:59:29-08:00 nacc@us.ibm.com +4 -6 # w1/w1_therm: replace schedule_timeout() with msleep_interruptible() # # include/asm-arm/arch-ixp2000/system.h # 2005/02/14 00:35:09+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2482/1: IXP2000 - header cleanup # # include/asm-arm/arch-ixp2000/ixdp2x01.h # 2005/02/14 00:34:41+00:00 ben-linux@org.rmk.(none) +1 -1 # [PATCH] 2482/1: IXP2000 - header cleanup # # include/asm-arm/arch-ixp2000/io.h # 2005/02/14 00:39:16+00:00 ben-linux@org.rmk.(none) +2 -2 # [PATCH] 2482/1: IXP2000 - header cleanup # # ChangeSet # 2005/03/03 00:55:12+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2470/1: S3C2410 Documentation - add Guillaume Gourat # # Patch from Ben Dooks # # Add Guillaume Gourat to list of port contributors # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # Documentation/arm/Samsung-S3C24XX/Overview.txt # 2005/02/11 00:02:19+00:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2470/1: S3C2410 Documentation - add Guillaume Gourat # # ChangeSet # 2005/03/03 00:37:40+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2469/1: S3C2410 - add S3C2410_TCFG1_MUX4_SHIFT definition # # Patch from Ben Dooks # # Add missing S3C2410_TCFG1_MUX4_SHIFT # Patch from Guillaume Gourat # # Signed-off-by: Guillaume GOURAT # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # include/asm-arm/arch-s3c2410/regs-timer.h # 2005/02/11 00:04:43+00:00 ben-linux@org.rmk.(none) +2 -0 # [PATCH] 2469/1: S3C2410 - add S3C2410_TCFG1_MUX4_SHIFT definition # # ChangeSet # 2005/03/03 00:18:41+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2467/1: S3C2440 - camera interface device # # Patch from Ben Dooks # # Add s3c2440 camera interface device definition # Patch from Guillaume GOURAT # # Signed-off-by: Guillaume GOURAT # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 16:13:45-08:00 khali@linux-fr.org # [PATCH] I2C: Trivial indentation fix in i2c/chips/Kconfig # # Hi Greg, # # Quoting myself: # # > (...) I also think I see an indentation issue on the "tristate" line, # > seemingly copied from the SENSORS_DS1621 section which would need to # > be fixed as well. # # Here is the trivial patch fixing that, if you want to apply it. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Kconfig # 2005/03/02 07:15:12-08:00 khali@linux-fr.org +1 -1 # I2C: Trivial indentation fix in i2c/chips/Kconfig # # ChangeSet # 2005/03/02 16:13:14-08:00 khali@linux-fr.org # [PATCH] I2C: Change of i2c co-maintainer # # Since I am working more actively than Philip (or anyone else, for that # matter) on the i2c subsystem these days, it would probably make sense # that I am listed as the co-maintainer instead of him. # # Signed-off-by: Jean Delvare # Acked-by: Philip Edelbrock # Signed-off-by: Greg Kroah-Hartman # # MAINTAINERS # 2005/03/02 10:50:04-08:00 khali@linux-fr.org +2 -2 # I2C: Change of i2c co-maintainer # # include/asm-arm/arch-s3c2410/map.h # 2005/02/10 17:35:15+00:00 ben-linux@org.rmk.(none) +5 -0 # [PATCH] 2467/1: S3C2440 - camera interface device # # include/asm-arm/arch-s3c2410/irqs.h # 2005/02/10 17:41:08+00:00 ben-linux@org.rmk.(none) +3 -1 # [PATCH] 2467/1: S3C2440 - camera interface device # # arch/arm/mach-s3c2410/devs.h # 2005/02/10 17:40:27+00:00 ben-linux@org.rmk.(none) +12 -0 # [PATCH] 2467/1: S3C2440 - camera interface device # # arch/arm/mach-s3c2410/devs.c # 2005/02/10 17:39:56+00:00 ben-linux@org.rmk.(none) +36 -0 # [PATCH] 2467/1: S3C2440 - camera interface device # # ChangeSet # 2005/03/03 00:00:59+00:00 ben-linux@org.rmk.(none) # [ARM PATCH] 2465/1: VR1000 - add power-off hook # # Patch from Ben Dooks # # Add PM hook to power board down when requested # # Signed-off-by: Ben Dooks # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 15:50:42-08:00 gregkh@suse.de # [PATCH] I2C: fixed up the i2c-id.h algo ids. # # Thanks to Jean Delvare for the help with this. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c-id.h # 2005/03/02 15:48:37-08:00 gregkh@suse.de +9 -6 # I2C: fixed up the i2c-id.h algo ids. # # arch/arm/mach-s3c2410/mach-vr1000.c # 2005/02/10 15:03:12+00:00 ben-linux@org.rmk.(none) +9 -1 # [PATCH] 2465/1: VR1000 - add power-off hook # # ChangeSet # 2005/03/02 23:39:59+00:00 jelenz@edu.rmk.(none) # [ARM PATCH] 2460/1: fix up resource usage on locomo # # Patch from John Lenz # # Add the list of devices on the locomo chip, and change around # how resources and struct resource are used. There is only one # struct resource for the entire locomo, but each driver will # call request_mem_region on the pieces it is using. # Secondly, add a few helper functions to locomo.c to control # GPIOs and DAC. # # Signed-off-by: John Lenz # Signed-off-by: Russell King # # include/asm-arm/hardware/locomo.h # 2005/03/02 00:00:00+00:00 jelenz@edu.rmk.(none) +113 -111 # [PATCH] 2460/1: fix up resource usage on locomo # # arch/arm/common/locomo.c # 2005/03/02 00:00:00+00:00 jelenz@edu.rmk.(none) +330 -29 # [PATCH] 2460/1: fix up resource usage on locomo # # ChangeSet # 2005/03/02 23:20:52+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2450/1: Add missing REG_OFFSET to ixp4xx platform.h header # # Patch from Deepak Saxena # # Patch 2449/1 depends on this since it removes REG_OFFSET from the # individual board implementations. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 15:03:48-08:00 khali@linux-fr.org # [PATCH] I2C: w83627hf needs i2c-isa # # The w83627hf driver is useless unless i2c-isa is present. All other # drivers in this case do select I2C_ISA through Kconfig, so this one # should as well do. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Kconfig # 2005/03/02 09:54:07-08:00 khali@linux-fr.org +1 -0 # I2C: w83627hf needs i2c-isa # # ChangeSet # 2005/03/02 15:03:32-08:00 akpm@osdl.org # [PATCH] I2C: saa7146 build fix # # include/media/saa7146.h:160: parse error before `*' # include/media/saa7146.h:160: warning: function declaration isn't a prototype # # # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # include/media/saa7146.h # 2005/03/02 09:54:20-08:00 akpm@osdl.org +1 -1 # I2C: saa7146 build fix # # ChangeSet # 2005/03/02 15:03:15-08:00 khali@linux-fr.org # [PATCH] Add class definition to the elektor bus driver # # Hi Frank, all, # # > > Which bus driver are you using? It obviously lacks class declaration, # > > so the correct fix is to add the class there. # > # > The modules that are loading are (in reverse order): # > adm1031 # > ad5321 # > mic184 # > pca9540 # > i2c_sensor # > i2c_elektor # > i2c_algo_pcf # > i2c_core # > # > So I believe what you are asking for is the i2c_elektor driver for the # > PCF8584 ISA to I2C chip. # # Correct, I just checked and this one actually lacks its class. Patch # follows. # # This patch adds a class definition to the elektor i2c bus driver. # Without this definition, hardware monitoring chips located on such # busses cannot possibly be driven. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-elektor.c # 2005/03/02 09:54:29-08:00 khali@linux-fr.org +1 -0 # Add class definition to the elektor bus driver # # ChangeSet # 2005/03/02 15:03:00-08:00 minyard@acm.org # [PATCH] I2C: minor I2C cleanups # # This is one in a series of patches for adding a non-blocking interface # to the I2C driver for supporting the IPMI SMBus driver. This patch is a # simply some minor cleanups and is in addition to the patch by Mickey # Stein (http://marc.theaimsgroup.com/?l=linux-kernel&m=110919738708916&w=2). # # Clean up some general I2C things. Fix some grammar and put () # around all the #defines that are compound to avoid nasty # side-effects. # # Signed-off-by: Corey Minyard # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 09:54:36-08:00 minyard@acm.org +25 -25 # I2C: minor I2C cleanups # # ChangeSet # 2005/03/02 15:02:43-08:00 ben-linux@fluff.org # [PATCH] I2C: S3C2410 missing I2C_CLASS_HWMON # # None of the standard sensor drivers currently recognise the s3c24xx # I2C controller as it does not have I2C_CLASS_HWMON set in the # adapter class field. # # The attached patch initialises the adapter class to I2C_CLASS_HWMON # # Signed-off-by: Ben Dooks # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-s3c2410.c # 2005/03/02 09:54:46-08:00 ben-linux@fluff.org +1 -0 # I2C: S3C2410 missing I2C_CLASS_HWMON # # ChangeSet # 2005/03/02 15:02:27-08:00 yekkim@pacbell.net # [PATCH] I2C: Fix some gcc 4.0 compile failures and warnings # # gcc 4.0.x cvs seems to dislike "include/linux/i2c.h file" and others due # to a current gcc 4.0.x change having to do with array declarations. # # Example error msg: include/linux/i2c.h:{55,194} error: array type has # incomplete element type # # A. Daplas has recently done a workaround for this on another header # file. A thread discussing this can be found by following the link below: # # http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html # # The patch changes the array(struct i2c_msg) declaration used by # *i2c_transfer and *master_xfer from "struct i2c_msg msg[]" format to # "struct i2c_msg *msg". # # After some grepping, I came up with about a dozen files that used the # format disliked by gcc4 that're addressed by the attached patch. # Tested on gcc 3.x & gcc 4.x by configuring kernel with all i2c switches # enabled as module, and saw no errors or warnings in i2c. # # Signed-off-by: Mickey Stein # Signed-off-by: Greg Kroah-Hartman # # include/media/saa7146.h # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # include/linux/i2c.h # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +2 -2 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/video/saa7134/saa7134-i2c.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/video/bttv-i2c.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/dvb/b2c2/skystar2.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/media/common/saa7146_i2c.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +4 -4 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/i2c-core.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-s3c2410.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +2 -2 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-mpc.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-keywest.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-iop3xx.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-ibm_iic.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/busses/i2c-au1550.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-sgi.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-pcf.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-pca.c # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # drivers/i2c/algos/i2c-algo-ite.c # 2005/03/02 09:55:03-08:00 yekkim@pacbell.net +2 -2 # I2C: Fix some gcc 4.0 compile failures and warnings # # Documentation/i2c/writing-clients # 2005/03/02 09:55:02-08:00 yekkim@pacbell.net +1 -1 # I2C: Fix some gcc 4.0 compile failures and warnings # # ChangeSet # 2005/03/02 15:02:10-08:00 khali@linux-fr.org # [PATCH] I2C: Make i2c list terminators explicitely unsigned # # Shouldn't the i2c list terminators be explicitely declared as unsigned? # I'd hope it to help code analysis tools and possibly avoid false # positives. Coverity's SWAT pointed my attention to these constants. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 09:55:12-08:00 khali@linux-fr.org +2 -2 # I2C: Make i2c list terminators explicitely unsigned # # ChangeSet # 2005/03/02 15:01:52-08:00 khali@linux-fr.org # [PATCH] I2C: Remove NULL client checks in rtc8564 driver # # Several functions in your rtc8564 driver verify the non-NULLity of the # i2c client that is passed to them. It doesn't seem to be necessary, as I # can't think of any case where these functions could possibly be called # with a NULL i2c client. As a matter of fact, I couldn't find any similar # driver doing such checks. # # My attention was brought on this by Coverity's SWAT which correctly # noticed that three of these functions contain explicit or hidden # dereferences of the i2c client pointer *before* the NULL check. I guess # it wasn't a problem because the NULL case cannot happen (unless I miss # something), but this still is confusing code. # # Thus I propose the following changes: # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/rtc8564.c # 2005/03/02 09:55:20-08:00 khali@linux-fr.org +8 -8 # I2C: Remove NULL client checks in rtc8564 driver # # include/asm-arm/arch-ixp4xx/platform.h # 2005/02/02 18:09:04+00:00 dsaxena@net.rmk.(none) +6 -0 # [PATCH] 2450/1: Add missing REG_OFFSET to ixp4xx platform.h header # # ChangeSet # 2005/03/02 22:57:50+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2449/1: Make IXP4xx use platform devices for serial ports # # Patch from Deepak Saxena # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/ixdp425-setup.c # 2005/02/02 18:10:24+00:00 dsaxena@net.rmk.(none) +47 -41 # [PATCH] 2449/1: Make IXP4xx use platform devices for serial ports # # arch/arm/mach-ixp4xx/coyote-setup.c # 2005/02/02 18:10:13+00:00 dsaxena@net.rmk.(none) +38 -34 # [PATCH] 2449/1: Make IXP4xx use platform devices for serial ports # # ChangeSet # 2005/03/02 22:33:50+00:00 dsaxena@net.rmk.(none) # [ARM PATCH] 2448/1: Remove PrPMC1100 platform # # Patch from Deepak Saxena # # No longer maintained, not sure one can even buy one of these. # # Signed-off-by: Deepak Saxena # Signed-off-by: Russell King # # arch/arm/mach-ixp4xx/Makefile # 2005/02/02 17:59:45+00:00 dsaxena@net.rmk.(none) +0 -1 # [PATCH] 2448/1: Remove PrPMC1100 platform # # BitKeeper/deleted/.del-prpmc1100-setup.c~d52922ff42d9b621 # 2005/03/02 22:29:26+00:00 dsaxena@net.rmk.(none) +0 -0 # Delete: arch/arm/mach-ixp4xx/prpmc1100-setup.c # # BitKeeper/deleted/.del-prpmc1100-pci.c~da88e9014dd6125b # 2005/03/02 22:29:24+00:00 dsaxena@net.rmk.(none) +0 -0 # Delete: arch/arm/mach-ixp4xx/prpmc1100-pci.c # # ChangeSet # 2005/03/02 22:21:51+00:00 rmk@flint.arm.linux.org.uk # [ARM] Acorn expansion card core update. # # Add __iomem annotations and use iomem functions where appropriate. # Separate out expansion card allocation/initialisation and freeing. # Convert device attributes to be handled by driver core. # Clean up deprecated function warnings for internal ecard_address # usage. # # Signed-off-by: Russell King # # include/asm-arm/ecard.h # 2005/03/02 22:16:28+00:00 rmk@flint.arm.linux.org.uk +11 -4 # Add __iomem annotations to irqaddr and fiqaddr. # Stop deprecated warnings for ecard_address usage within ecard.c # # arch/arm/kernel/ecard.c # 2005/03/02 22:16:28+00:00 rmk@flint.arm.linux.org.uk +122 -94 # Stop deprecated warnings for ecard_address usage within ecard.c # Provide function to free an expansion_card. # Move expansion card structure allocation/initialisation to separate # function. # Convert device attributes to be registered/unregistered by driver # core. # Move test for calling expansion card loaders at reset up to top level. # # ChangeSet # 2005/03/02 14:03:27-08:00 davem@nuts.davemloft.net # [SPARC64]: Accept 'm5823' clock chip as seen on SB1500. # # Signed-off-by: David S. Miller # # arch/sparc64/kernel/time.c # 2005/03/02 14:02:54-08:00 davem@nuts.davemloft.net +5 -2 # [SPARC64]: Accept 'm5823' clock chip as seen on SB1500. # # ChangeSet # 2005/03/02 21:28:32+00:00 rmk@flint.arm.linux.org.uk # [ARM] Add card type specific data structure. # # Signed-off-by: Russell King # # drivers/net/arm/ether3.h # 2005/03/02 21:23:30+00:00 rmk@flint.arm.linux.org.uk +5 -0 # Add card type specific data structure. # # drivers/net/arm/ether3.c # 2005/03/02 21:23:30+00:00 rmk@flint.arm.linux.org.uk +27 -35 # Add barrier()'s to loops. # Add card type specific data. # # ChangeSet # 2005/03/02 21:09:16+00:00 rmk@flint.arm.linux.org.uk # [ARM] Net: Convert ether1 and ether3 to use iomem accesses. # # Signed-off-by: Russell King # # drivers/net/arm/ether3.h # 2005/03/02 21:04:45+00:00 rmk@flint.arm.linux.org.uk +11 -9 # Convert ether3 to use iomem accesses. # # drivers/net/arm/ether3.c # 2005/03/02 21:04:45+00:00 rmk@flint.arm.linux.org.uk +32 -21 # Convert ether3 to use iomem accesses. # # drivers/net/arm/ether1.h # 2005/03/02 21:04:45+00:00 rmk@flint.arm.linux.org.uk +5 -4 # Convert ether1 to use iomem accesses. # # drivers/net/arm/ether1.c # 2005/03/02 21:04:44+00:00 rmk@flint.arm.linux.org.uk +78 -67 # Convert ether1 to use iomem accesses. # # ChangeSet # 2005/03/02 20:35:25+00:00 rmk@flint.arm.linux.org.uk # [ARM] Use ecard_{request,release}_resources() for resource management # # Signed-off-by: Russell King # # drivers/net/arm/ether3.c # 2005/03/02 20:30:38+00:00 rmk@flint.arm.linux.org.uk +14 -18 # Claim/release expansion card resources with ecard_request_resources() # and ecard_release_resources() # # drivers/net/arm/ether1.c # 2005/03/02 20:30:38+00:00 rmk@flint.arm.linux.org.uk +13 -18 # Claim/release expansion card resources with ecard_request_resources() # and ecard_release_resources() # # ChangeSet # 2005/03/02 12:18:53-08:00 hfvogt@gmx.net # [PATCH] I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4) # # can you please apply the attached patch (against 2.6.11-rc4, but works # as well for 2.6.11-rc3-mm2), that adds support for the two SMBusses of # the nForce4 to the i2c-nforce2 i2c bus driver. The patch is reported to # work on the standard nForce4 (i.e. non-Ultra, non-SLI), but I expect # that it works as well for the other nForce4 chipsets, that seem to have # the same PCI-id for the SMBus-device. # # This patch was proposed by Chuck , thanks to him for the # information, testing and his patch. # # Signed-off-by: Hans-Frieder Vogt # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2005/03/02 09:55:27-08:00 hfvogt@gmx.net +1 -0 # I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4) # # drivers/i2c/busses/i2c-nforce2.c # 2005/03/02 09:55:27-08:00 hfvogt@gmx.net +4 -2 # I2C i2c-nforce2: add support for nForce4 (patch against 2.6.11-rc4) # # ChangeSet # 2005/03/02 12:18:36-08:00 icampbell@arcom.com # [PATCH] I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c # # I was looking at your ixp4xx gpio i2c driver for inspiration (for a # similar pxa2xx one) and I just happened to notice a tiny typo. # # Signed-off-by: Ian Campbell # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/i2c-ixp4xx.c # 2005/03/02 09:55:39-08:00 icampbell@arcom.com +2 -2 # I2C: fix typo in drivers/i2c/busses/i2c-ixp4xx.c # # ChangeSet # 2005/03/02 12:18:19-08:00 macro@linux-mips.org # [PATCH] I2C: Enable I2C_PIIX4 for 64-bit platforms # # Is there any specific reason for the PIIX4 SMBus driver to be disabled on # 64-bit platforms? If not, then please apply the following change. The # MIPS Technologies Malta development board has the 82371EB chip and # supports 64-bit configurations. I've verified the driver to work # correctly using 64-bit kernels for both endiannesses. # # Signed-off-by: Maciej W. Rozycki # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/busses/Kconfig # 2005/03/02 09:55:46-08:00 macro@linux-mips.org +1 -1 # I2C: Enable I2C_PIIX4 for 64-bit platforms # # ChangeSet # 2005/03/02 12:18:03-08:00 icampbell@arcom.com # [PATCH] I2C: improve debugging output # # Rework the pca_xfer() function to always print the number of # successfully completed transfers in a series when debugging, even when # exiting with an error. # # Signed-off-by: Ian Campbell # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/algos/i2c-algo-pca.c # 2005/03/02 09:55:52-08:00 icampbell@arcom.com +16 -12 # I2C: improve debugging output # # ChangeSet # 2005/03/02 20:17:47+00:00 rmk@flint.arm.linux.org.uk # [ARM] Net: add macro to access driver specific netdev data. # # Signed-off-by: Russell King # # ChangeSet # 2005/03/02 12:17:46-08:00 maartendeprez@scarlet.be # [PATCH] I2C: add GL520SM Sensor Chip driver # # Port of the Genesys Logic 520SM sensor chip driver from linux 2.4 # # Signed-off-by: Maarten Deprez # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/gl520sm.c # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +754 -0 # I2C: add GL520SM Sensor Chip driver # # drivers/i2c/chips/Makefile # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +1 -0 # I2C: add GL520SM Sensor Chip driver # # drivers/i2c/chips/Kconfig # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +11 -0 # I2C: add GL520SM Sensor Chip driver # # drivers/i2c/chips/gl520sm.c # 2005/03/02 09:55:58-08:00 maartendeprez@scarlet.be +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/gl520sm.c # # ChangeSet # 2005/03/02 12:17:29-08:00 mgreer@mvista.com # [PATCH] I2C: add Marvell mv64xxx i2c driver # # Marvell makes a line of host bridge for PPC and MIPS systems. On those # bridges is an i2c controller. This patch adds the driver for that i2c # controller. # # Please apply. # # Depends on patch submitted by Jean Delvare: # http://archives.andrew.net.au/lm-sensors/msg29405.html # # Signed-off-by: Mark A. Greer # Signed-off-by: Greg Kroah-Hartman # # include/linux/mv643xx.h # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +11 -6 # I2C: add Marvell mv64xxx i2c driver # # include/linux/i2c-id.h # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +3 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/i2c-mv64xxx.c # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +596 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/Makefile # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +1 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/Kconfig # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +10 -0 # I2C: add Marvell mv64xxx i2c driver # # drivers/i2c/busses/i2c-mv64xxx.c # 2005/03/02 09:56:05-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/busses/i2c-mv64xxx.c # # ChangeSet # 2005/03/02 12:17:12-08:00 aurelien@aurel32.net # [PATCH] I2C: New chip driver: sis5595 # # Please find below the new version of the patch against kernel # 2.6.11-rc3-mm1 to add the sis5595 driver (sensor part). # # As you suggested, I have changed the PCI part of the driver, taking the # via686a driver as an example. I have also changed the comparison of # jiffies by using time_after. # # # Signed-off-by: Aurelien Jarno # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/sis5595.c # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +794 -0 # I2C: New chip driver: sis5595 # # drivers/i2c/chips/Makefile # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +1 -0 # I2C: New chip driver: sis5595 # # drivers/i2c/chips/Kconfig # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +12 -0 # I2C: New chip driver: sis5595 # # drivers/i2c/chips/sis5595.c # 2005/03/02 09:56:12-08:00 aurelien@aurel32.net +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/sis5595.c # # ChangeSet # 2005/03/02 12:16:55-08:00 mgreer@mvista.com # [PATCH] I2C: add ST M41T00 I2C RTC chip driver # # This patch adds support for the ST M41T00 I2C RTC chip. # # This rtc chip has no mechanism to freeze it's registers while being # read; however, it will delay updating the external values of the # registers for 250ms after a register is read. To ensure that a sane # time value is read, the driver verifies that the same registers values # were read twice before returning. # # Also, when setting the rtc from an interrupt handler, a tasklet is used # to provide the context required by the i2c core code. # # # Signed-off-by: Mark A. Greer # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/m41t00.c # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +247 -0 # I2C: add ST M41T00 I2C RTC chip driver # # drivers/i2c/chips/Makefile # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +1 -0 # I2C: add ST M41T00 I2C RTC chip driver # # drivers/i2c/chips/Kconfig # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +9 -0 # I2C: add ST M41T00 I2C RTC chip driver # # drivers/i2c/chips/m41t00.c # 2005/03/02 09:56:19-08:00 mgreer@mvista.com +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/m41t00.c # # ChangeSet # 2005/03/02 12:16:37-08:00 adobriyan@mail.ru # [PATCH] I2C: use time_after instead of comparing jiffies # # Signed-off-by: Alexey Dobriyan # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83l785ts.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/w83781d.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/w83627hf.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/via686a.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/smsc47m1.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/smsc47b397.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/pc87360.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/max1619.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -4 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm90.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm87.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm85.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm83.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm80.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm78.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm77.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm75.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/lm63.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/it87.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/gl518sm.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/fscher.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/eeprom.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/ds1621.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/asb100.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1031.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1026.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +4 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1025.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +2 -3 # I2C: use time_after instead of comparing jiffies # # drivers/i2c/chips/adm1021.c # 2005/03/02 09:56:26-08:00 adobriyan@mail.ru +3 -2 # I2C: use time_after instead of comparing jiffies # # ChangeSet # 2005/03/02 12:12:54-08:00 bunk@stusta.de # [PATCH] i2c-core.c: make some code static # # This patch makes some needlessly global code static. # # Signed-off-by: Adrian Bunk # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 09:57:42-08:00 bunk@stusta.de +0 -2 # i2c-core.c: make some code static # # drivers/i2c/i2c-core.c # 2005/03/02 09:57:42-08:00 bunk@stusta.de +39 -40 # i2c-core.c: make some code static # # drivers/net/arm/ether3.h # 2005/03/02 20:12:26+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add macro to access driver private netdev data. # # drivers/net/arm/ether3.c # 2005/03/02 20:12:26+00:00 rmk@flint.arm.linux.org.uk +97 -116 # Use a macro to access driver-specific netdev data. # # drivers/net/arm/ether1.h # 2005/03/02 20:12:26+00:00 rmk@flint.arm.linux.org.uk +2 -0 # Add macro to access driver private netdev data. # # drivers/net/arm/ether1.c # 2005/03/02 20:12:25+00:00 rmk@flint.arm.linux.org.uk +58 -70 # Use a macro to access driver-specific netdev data. # # ChangeSet # 2005/03/02 12:10:18-08:00 shawn.starr@rogers.com # [PATCH] I2C: lm80 driver improvement # # Description: Cleanup some cluttered macros, add error checking for fan divisor value set. # # Signed-off-by: Sytse Wielinga # Signed-off-by: Aurelien Jarno # Signed-off-by: Shawn Starr # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm80.c # 2005/03/02 09:58:09-08:00 shawn.starr@rogers.com +12 -5 # I2C: lm80 driver improvement # # ChangeSet # 2005/03/02 12:10:01-08:00 mhoffman@lightlink.com # [PATCH] I2C: unnecessary #includes in asb100.c # # * Jean Delvare [2005-01-25 10:14:49 +0100]: # > Any reson why asb100.c (in linux 2.6.11-rc2) includes linux/ioport.h and # > asm/io.h? As an i2c-only chip driver, I don't think it needs these. # > # > As a side note, I also wonder what the inclusions of linux/config.h, # > linux/types.h and asm/errno.h are there for. # # Because they look pretty? Here's a patch Greg, please apply... # # Signed-off-by: Mark M. Hoffman # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/asb100.c # 2005/03/02 09:58:27-08:00 mhoffman@lightlink.com +0 -5 # I2C: unnecessary #includes in asb100.c # # ChangeSet # 2005/03/02 12:09:45-08:00 khali@linux-fr.org # [PATCH] I2C: Kill unused includes in i2c-sensor-detect.c # # Looks to me like i2c-sensor-detect.c includes a handful of headers it # doesn't need at all. This patch removes them. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-sensor-detect.c # 2005/03/02 09:58:33-08:00 khali@linux-fr.org +0 -7 # I2C: Kill unused includes in i2c-sensor-detect.c # # ChangeSet # 2005/03/02 12:09:28-08:00 khali@linux-fr.org # [PATCH] I2C: Enable w83781d and w83627hf temperature channels # # The chips supported by the w83781d and w83627hf drivers might come up # with their temperature channels disabled. Currently, the w83781d driver # does so for temp3 but omits temp2, while the w83627hf driver omits both. # The following patch fixes that, and prints warning messages when the # driver has to enable the channels (normally the BIOS should do it for # us). We also skip this initialization step for the AS99127F chips, for # which we have no documentation. # # This should hopefully solve the problem reported here: # http://archives.andrew.net.au/lm-sensors/msg29150.html # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83781d.c # 2005/03/02 09:58:47-08:00 khali@linux-fr.org +20 -3 # I2C: Enable w83781d and w83627hf temperature channels # # drivers/i2c/chips/w83627hf.c # 2005/03/02 09:58:47-08:00 khali@linux-fr.org +21 -0 # I2C: Enable w83781d and w83627hf temperature channels # # ChangeSet # 2005/03/02 12:04:28-08:00 aurelien@aurel32.net # [PATCH] I2C: lm78 driver improvement # # The following patch against kernel 2.6.11-rc2-mm1 improves the lm78 # driver. I used it as a model to port the sis5595 driver to the 2.6 # kernel, and I then applied the changes suggested by Jean Delvare on # the sis5595 driver to this one. # # # Signed-off-by: Aurelien Jarno # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/lm78.c # 2005/03/02 09:58:53-08:00 aurelien@aurel32.net +24 -29 # I2C: lm78 driver improvement # # ChangeSet # 2005/03/02 12:04:12-08:00 mhoffman@lightlink.com # [PATCH] I2C: i2c-dev namespace cleanup # # This patch is namespace cleanup for the i2c-dev module. Please apply. # # Signed-off-by Mark M. Hoffman # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/i2c-dev.c # 2005/03/02 09:59:08-08:00 mhoffman@lightlink.com +4 -4 # I2C: i2c-dev namespace cleanup # # ChangeSet # 2005/03/02 15:03:29-05:00 davej@redhat.com # [AGPGART] Fix typo. # # From: Joern Heissler # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/03/02 15:03:19-05:00 davej@redhat.com +1 -1 # [AGPGART] Fix typo. # # From: Joern Heissler # Signed-off-by: Dave Jones # # ChangeSet # 2005/03/02 11:59:41-08:00 stefan@desire.ch # [PATCH] I2C: fix for fscpos voltage values # # Multiplied the voltage multipliers by 10 in order to comply with the sysfs # guidelines. # # Signed-off-by: Stefan Ott # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:00:05-08:00 stefan@desire.ch +3 -3 # I2C: fix for fscpos voltage values # # ChangeSet # 2005/03/02 11:58:47-08:00 greg@kroah.com # [PATCH] I2C: just delete the id field, let's not delay it any longer # # Becides, sparse keeps complaining when it sees this attribute within a structure... # # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 10:00:35-08:00 greg@kroah.com +0 -1 # I2C: just delete the id field, let's not delay it any longer # # ChangeSet # 2005/03/02 11:58:29-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (5/5) # # > (5/5) Documentation update. # # Finally, updates are required to the i2c/writing-client and # i2c/porting-client documents. Remove any reference to i2c_client id and # invite porters to discard that struct member. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # Documentation/i2c/writing-clients # 2005/03/02 10:00:42-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (5/5) # # Documentation/i2c/porting-clients # 2005/03/02 10:00:42-08:00 khali@linux-fr.org +3 -3 # I2C: Kill i2c_client.id (5/5) # # ChangeSet # 2005/03/02 11:52:48-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (4/5) # # > (4/5) Deprecate i2c_client.id. # # Now that i2c_client.id has no more users in the kernel (none that I # could find at least) we could remove that struct member. I however think # that it's better to only deprecate it at the moment, in case I missed # users or any of the other patches are delayed for some reason. We could # then delete the id member definitely in a month or so. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # include/linux/i2c.h # 2005/03/02 10:00:49-08:00 khali@linux-fr.org +1 -1 # I2C: Kill i2c_client.id (4/5) # # ChangeSet # 2005/03/02 11:52:31-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (3/5) # # (3/5) Stop using i2c_client.id in misc drivers. # # Affected drivers: # * acorn/char/pcf8583 # * acorn/char/i2c # * i2c/i2c-dev # * macintosh/therm_windtunnel # * sound/oss/dmasound/dac3550a # * sound/ppc/keywest # # The Acorn pcf8583 driver would give the i2c_client id the same value as # the i2c_driver id, and later test that client id (in i2c). I changed it # to test the client's driver id instead. The result is the same and the # client id is then useless and can be removed. # # All other drivers here would allocate the client id to some value and # then never use it. They are unaffected by the change. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # sound/ppc/keywest.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -2 # I2C: Kill i2c_client.id (3/5) # # sound/oss/dmasound/dac3550a.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (3/5) # # drivers/macintosh/therm_windtunnel.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (3/5) # # drivers/i2c/i2c-dev.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (3/5) # # drivers/acorn/char/pcf8583.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (3/5) # # drivers/acorn/char/i2c.c # 2005/03/02 10:00:56-08:00 khali@linux-fr.org +1 -1 # I2C: Kill i2c_client.id (3/5) # # ChangeSet # 2005/03/02 11:52:15-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (2/5) # # (2/5) Stop using i2c_client.id in media/video drivers. # # Affected drivers: # * adv7170 # * adv7175 # * bt819 # * bt856 # * bttv # * cx88 # * ovcamchip # * saa5246a # * saa5249 # * saa7110 # * saa7111 # * saa7114 # * saa7134 # * saa7185 # * tda7432 # * tda9840 # * tda9875 # * tea6415c # * tea6420 # * tuner-3036 # * vpx3220 # # Most drivers here would include the id as part of their i2c client name # (e.g. adv7170[0]). This looks more like an habit than something really # needed, so I replaced the various printf by strlcpy, which should be # slightly faster. As said earlier, clients can be differenciated thanks # to their bus id and address if needed, so I don't think that including # this information in the client name is wise anyway. # # Other drivers would either set the id to -1 or to a unique value but # then never use it. These drivers are unaffected by the changes. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/media/video/vpx3220.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +8 -11 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tuner-3036.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tea6420.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tea6415c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tda9875.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tda9840.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/tda7432.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7185.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7134/saa7134-i2c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7114.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7111.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa7110.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa5249.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/saa5246a.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/ovcamchip/ovcamchip_core.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/cx88/cx88-i2c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/bttv-i2c.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/bt856.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/bt819.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +3 -8 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/adv7175.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # drivers/media/video/adv7170.c # 2005/03/02 10:01:03-08:00 khali@linux-fr.org +1 -4 # I2C: Kill i2c_client.id (2/5) # # ChangeSet # 2005/03/02 11:51:51-08:00 khali@linux-fr.org # [PATCH] I2C: Kill i2c_client.id (1/5) # # (1/5) Stop using i2c_client.id in i2c/chips drivers (mostly hardware # monitoring drivers). # # Drivers affected: # * adm1021 # * adm1025 # * adm1026 # * adm1031 # * ds1621 # * fscher # * gl518sm # * isp1301_omap # * lm75 # * lm77 # * lm80 # * lm83 # * lm85 # * lm87 # * lm90 # * max1619 # * pcf8574 # * pcf8591 # * rtc8564 # * smsc47m1 # * w83l785ts # # The vast majority of these drivers simply defined the i2c_client id # struct member but never used it, so they are not affected at all by the # change. Exceptions are: # # * lm85 and rtc8564, which would at least display the id in a debug # message when assigning it. Not really useful though, as the id was then # never used. # # * adm1026, which used the assigned id in all driver messages. However, # since dev_* calls will append the bus number and client address to these # messages, the id information is redundant and can go away. Also, the # driver would allow some GPIO reprogramming on the first client only # (id=0) and removing the id doesn't allow that anymore. I would restore a # similar functionality if needed, but the ADM1026 chip is found on very # few motherboards and none of these has more than one ADM1026 chip AFAIK, # so it doesn't seem to be worth the effort. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/w83l785ts.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/smsc47m1.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -5 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/rtc8564.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -2 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/pcf8591.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/pcf8574.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/max1619.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm90.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm87.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm85.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -9 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm83.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm80.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -8 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm77.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/lm75.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/isp1301_omap.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -1 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/gl518sm.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/fscher.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/ds1621.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1031.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1026.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +32 -48 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1025.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -7 # I2C: Kill i2c_client.id (1/5) # # drivers/i2c/chips/adm1021.c # 2005/03/02 10:01:11-08:00 khali@linux-fr.org +0 -4 # I2C: Kill i2c_client.id (1/5) # # ChangeSet # 2005/03/02 11:51:21-08:00 greg@kroah.com # [PATCH] I2C: Fix up some build warnings in the fscpos driver. # # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:01:19-08:00 greg@kroah.com +1 -3 # I2C: Fix up some build warnings in the fscpos driver. # # ChangeSet # 2005/03/02 11:50:10-08:00 khali@linux-fr.org # [PATCH] I2C: Allow it87 pwm reconfiguration # # Quoting myself: # # > As soon as you will have confirmed that everything worked as expected, # > Jonas and I will provide a patch adding a pwm polarity reconfiguration # > module parameter for you to test. This should give you access to the # > PWM features of your it87 chip again, but in a safe way for a change # > ;) # # Here comes this patch. The new "fix_pwm_polarity" module parameter # allows one to force the it87 chip reconfiguration. This is only # supported in the case the original PWM configuration is suspected to be # bogus, and only if we think that reconfiguring the chip is safe. # # I wish to thank Rudolf Marek and Jonas Munsin again for their testing # and review of my code. # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/it87.c # 2005/03/02 10:01:25-08:00 khali@linux-fr.org +59 -12 # I2C: Allow it87 pwm reconfiguration # # ChangeSet # 2005/03/02 19:16:04+00:00 rmk@flint.arm.linux.org.uk # [ARM] Unuse scsi host->base # # This eliminates the final usage of deprecated elements in scsi_host by # Acorn SCSI drivers. # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 19:11:57+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # drivers/scsi/arm/fas216.h # 2005/03/02 19:11:57+00:00 rmk@flint.arm.linux.org.uk +1 -2 # Mark info->scsi.io_base with __iomem. # Remove info->scsi.io_port. # # drivers/scsi/arm/fas216.c # 2005/03/02 19:11:57+00:00 rmk@flint.arm.linux.org.uk +6 -12 # Remove inb / outb. # Use info->scsi.io_base instead of info->host->io_port. # # drivers/scsi/arm/eesox.c # 2005/03/02 19:11:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # drivers/scsi/arm/cumana_2.c # 2005/03/02 19:11:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # drivers/scsi/arm/arxescsi.c # 2005/03/02 19:11:56+00:00 rmk@flint.arm.linux.org.uk +0 -2 # Remove host->base. # # ChangeSet # 2005/03/02 11:04:17-08:00 stefan@desire.ch # [PATCH] I2C: add fscpos chip driver # # This patch against 2.6.11-rc1 contains a driver for fscpos sensors. # # Signed-off-by: Stefan Ott # Signed-off-by: Greg Kroah-Hartman # # drivers/i2c/chips/Makefile # 2005/03/02 10:01:31-08:00 stefan@desire.ch +1 -0 # I2C: add fscpos chip driver # # drivers/i2c/chips/Kconfig # 2005/03/02 10:01:31-08:00 stefan@desire.ch +11 -0 # I2C: add fscpos chip driver # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:01:31-08:00 stefan@desire.ch +633 -0 # I2C: add fscpos chip driver # # drivers/i2c/chips/fscpos.c # 2005/03/02 10:01:31-08:00 stefan@desire.ch +0 -0 # BitKeeper file /home/greg/linux/BK/do/i2c-2.6/drivers/i2c/chips/fscpos.c # # ChangeSet # 2005/03/02 18:50:36+00:00 rmk@flint.arm.linux.org.uk # [ARM] SCSI: Move host->dma_channel to info->scsi.dma # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 18:45:41+00:00 rmk@flint.arm.linux.org.uk +14 -13 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/fas216.h # 2005/03/02 18:45:41+00:00 rmk@flint.arm.linux.org.uk +1 -0 # Add scsi dma channel # # drivers/scsi/arm/fas216.c # 2005/03/02 18:45:40+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/eesox.c # 2005/03/02 18:45:39+00:00 rmk@flint.arm.linux.org.uk +14 -13 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/cumana_2.c # 2005/03/02 18:45:39+00:00 rmk@flint.arm.linux.org.uk +13 -13 # Move host->dma_channel to info->scsi.dma # # drivers/scsi/arm/arxescsi.c # 2005/03/02 18:45:39+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Move host->dma_channel to info->scsi.dma # # ChangeSet # 2005/03/02 17:28:15+00:00 rmk@flint.arm.linux.org.uk # [ARM] Don't use host->irq # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 17:22:48+00:00 rmk@flint.arm.linux.org.uk +5 -6 # Don't use host->irq. # # drivers/scsi/arm/fas216.c # 2005/03/02 17:22:48+00:00 rmk@flint.arm.linux.org.uk +1 -1 # Don't use host->irq. # # drivers/scsi/arm/eesox.c # 2005/03/02 17:22:48+00:00 rmk@flint.arm.linux.org.uk +5 -6 # Don't use host->irq. # # drivers/scsi/arm/cumana_2.c # 2005/03/02 17:22:47+00:00 rmk@flint.arm.linux.org.uk +5 -6 # Don't use host->irq. # # drivers/scsi/arm/arxescsi.c # 2005/03/02 17:22:47+00:00 rmk@flint.arm.linux.org.uk +1 -2 # Don't use host->irq. # # ChangeSet # 2005/03/02 16:56:54+00:00 rmk@flint.arm.linux.org.uk # [ARM] Acorn SCSI: Ensure iomem pointers are marked as such. # # Signed-off-by: Russell King # # drivers/scsi/arm/powertec.c # 2005/03/02 16:50:55+00:00 rmk@flint.arm.linux.org.uk +18 -16 # Ensure iomem pointers are marked as such. # # drivers/scsi/arm/eesox.c # 2005/03/02 16:50:54+00:00 rmk@flint.arm.linux.org.uk +22 -22 # Ensure iomem pointers are marked as such. # # drivers/scsi/arm/cumana_2.c # 2005/03/02 16:50:54+00:00 rmk@flint.arm.linux.org.uk +28 -30 # Ensure iomem pointers are marked as such. # # drivers/scsi/arm/arxescsi.c # 2005/03/02 16:50:54+00:00 rmk@flint.arm.linux.org.uk +7 -4 # Ensure iomem pointers are marked as such. # # ChangeSet # 2005/03/02 16:07:18+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix sparse warnings in ARM IDE drivers. # # Signed-off-by: Russell King # # drivers/ide/arm/rapide.c # 2005/03/02 16:02:29+00:00 rmk@flint.arm.linux.org.uk +1 -1 # "ctrl" is an iomem pointer. Mark it as such. # # drivers/ide/arm/icside.c # 2005/03/02 16:02:28+00:00 rmk@flint.arm.linux.org.uk +1 -1 # "idmem" is an iomem pointer. Mark it as such. # # ChangeSet # 2005/03/02 15:32:02+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix set_fiq_regs()/get_fiq_regs() # # Make these "naked" functions. This allows us to eliminate the # clobbers which later gcc versions complain about. # # Signed-off-by: Russell King # # arch/arm/kernel/fiq.c # 2005/03/02 15:26:19+00:00 rmk@flint.arm.linux.org.uk +20 -27 # Convert [sg]et_fiq_regs() to be "naked" functions. # # ChangeSet # 2005/03/02 15:09:38+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update syscall table # # Add demultiplexed socket and ipc syscalls. Add key syscalls. # # Leave the new numbers for the demultiplexed socket and ipc syscalls # commented out in asm-arm/unistd.h for the time being. # # Signed-off-by: Russell King # # include/asm-arm/unistd.h # 2005/03/02 15:05:14+00:00 rmk@flint.arm.linux.org.uk +40 -2 # Add syscall numbers. Comment out unmuxed socket and ipc calls for # the time being. # # arch/arm/kernel/sys_arm.c # 2005/03/02 15:05:14+00:00 rmk@flint.arm.linux.org.uk +12 -0 # Add sys_shmat, required for demultiplexed IPC. # # arch/arm/kernel/calls.S # 2005/03/02 15:05:14+00:00 rmk@flint.arm.linux.org.uk +33 -2 # Update syscall table - demultiplexed socket calls, IPC calls and # key syscalls. # # ChangeSet # 2005/03/01 15:38:13-08:00 davem@nuts.davemloft.net # Resolve conflicts. # # arch/ppc64/mm/tlb.c # 2005/03/01 15:37:54-08:00 davem@nuts.davemloft.net +0 -6 # Resolve conflicts with bug fix. # # ChangeSet # 2005/03/01 15:33:45-08:00 davem@nuts.davemloft.net # Resolve conflicts. # # mm/highmem.c # 2005/03/01 15:04:37-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # arch/arm/mm/consistent.c # 2005/03/01 15:04:36-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/03/01 15:00:34-08:00 davem@nuts.davemloft.net # [S390]: Fix build after set_pte_at() changes. # # Signed-off-by: David S. Miller # # include/asm-s390/pgtable.h # 2005/03/01 15:00:00-08:00 davem@nuts.davemloft.net +1 -1 # [S390]: Fix build after set_pte_at() changes. # # ChangeSet # 2005/02/27 11:34:35-08:00 davem@nuts.davemloft.net # [SPARC64]: Do the init_mm check inline in set_pte_at(). # # Signed-off-by: David S. Miller # # include/asm-sparc64/pgtable.h # 2005/02/27 11:33:59-08:00 davem@nuts.davemloft.net +8 -5 # [SPARC64]: Do the init_mm check inline in set_pte_at(). # # arch/sparc64/mm/tlb.c # 2005/02/27 11:33:59-08:00 davem@nuts.davemloft.net +2 -11 # [SPARC64]: Do the init_mm check inline in set_pte_at(). # # ChangeSet # 2005/02/26 20:51:23-08:00 davem@nuts.davemloft.net # [MM]: Pass correct address down to bottom of page table iterators. # # Some routines, namely zeromap_pte_range, remap_pte_range, # change_pte_range, unmap_area_pte, and map_area_pte, were # using a chopped off address. This causes bogus addresses # to be passed into set_pte_at() and friends, resulting # in missed TLB flushes and other nasties. # # Signed-off-by: David S. Miller # # mm/vmalloc.c # 2005/02/26 20:50:16-08:00 davem@nuts.davemloft.net +13 -9 # [MM]: Pass correct address down to bottom of page table iterators. # # mm/mprotect.c # 2005/02/26 20:50:16-08:00 davem@nuts.davemloft.net +10 -7 # [MM]: Pass correct address down to bottom of page table iterators. # # mm/memory.c # 2005/02/26 20:50:16-08:00 davem@nuts.davemloft.net +7 -5 # [MM]: Pass correct address down to bottom of page table iterators. # # ChangeSet # 2005/02/26 04:10:55-05:00 dcbw@redhat.com # [PATCH] wireless: Make Atmel driver use SET_NETDEV_DEV # # Make the Atmel wireless driver use SET_NETDEV_DEV to get the correct # entries in sysfs. Seems like somebody meant to do this but it got lost. # atmel_cs.c was previously fixed to pass in the correct struct device * # via handle_to_dev() but the driver never actually used it. # # Signed-off-by: Dan Williams # Signed-off-by: Jeff Garzik # # drivers/net/wireless/atmel.c # 2005/02/01 16:15:55-05:00 dcbw@redhat.com +2 -0 # wireless: Make Atmel driver use SET_NETDEV_DEV # # ChangeSet # 2005/02/26 04:10:42-05:00 dcbw@redhat.com # [PATCH] wireless: WEXT quality cleanups + max rssi # # (resend) # # Use correct maximum rssi level for at76c502e-type cards, and correct # values in the qual.updated field to more closely match the current # Wireless Extensions API. # # Signed-off-by: Dan Williams # Signed-off-by: Jeff Garzik # # drivers/net/wireless/atmel.c # 2005/02/01 16:25:53-05:00 dcbw@redhat.com +28 -11 # wireless: WEXT quality cleanups + max rssi # # ChangeSet # 2005/02/26 04:10:29-05:00 dcbw@redhat.com # [PATCH] wireless: Clean up firmware loading in # # (resend) # # Identify different firmware by enums, not strings, as we need to have # some integral firmware identifier for choosing maximum rssi values for # each different firmware type. Consolidate the information about # firmware filenames and capabilities in the atmel module, not in atmel_cs # or atmel_pci. Move common prototypes and firmware enum into new atmel.h # file. The atmel_cs driver also thought that init_atmel_card() took "int # irq" as the first parameter, this is now fixed to be "unsigned short # irq". # # Signed-off-by: Dan Williams # Signed-off-by: Jeff Garzik # # drivers/net/wireless/atmel.h # 2005/01/30 18:33:31-05:00 dcbw@redhat.com +43 -0 # wireless: Clean up firmware loading in # # drivers/net/wireless/atmel_pci.c # 2005/01/30 14:05:30-05:00 dcbw@redhat.com +2 -4 # wireless: Clean up firmware loading in # # drivers/net/wireless/atmel_cs.c # 2005/01/30 14:05:08-05:00 dcbw@redhat.com +22 -26 # wireless: Clean up firmware loading in # # drivers/net/wireless/atmel.h # 2005/01/30 18:33:31-05:00 dcbw@redhat.com +0 -0 # BitKeeper file /garz/repo/netdev-2.6/atmel/drivers/net/wireless/atmel.h # # drivers/net/wireless/atmel.c # 2005/02/01 16:22:26-05:00 dcbw@redhat.com +45 -17 # wireless: Clean up firmware loading in # # ChangeSet # 2005/02/25 16:36:06-08:00 davem@nuts.davemloft.net # [MM]: Add 'pfn' arg to flush_cache_page(). # # Based almost entirely upon a patch by Russell King. # # Signed-off-by: David S. Miller # # mm/rmap.c # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # mm/memory.c # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # mm/fremap.c # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-x86_64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-v850/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sparc64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +7 -7 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sparc/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +7 -7 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cpu-sh4/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cpu-sh3/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cpu-sh2/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-sh/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-s390/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-ppc64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-ppc/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-parisc/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-mips/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +2 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-m68knommu/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-m68k/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +7 -8 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-m32r/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-ia64/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-i386/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-h8300/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-frv/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-cris/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-arm26/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-arm/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +8 -8 # [MM]: Add 'pfn' arg to flush_cache_page(). # # include/asm-alpha/cacheflush.h # 2005/02/25 16:35:20-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # fs/binfmt_elf.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sparc/mm/srmmu.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sh64/mm/cache.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +4 -24 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sh/mm/cache-sh7705.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +2 -18 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/sh/mm/cache-sh4.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +11 -30 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/cache.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-tx39.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-sb1.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +6 -5 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-r4k.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/mips/mm/c-r3k.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/arm/mm/flush.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add 'pfn' arg to flush_cache_page(). # # arch/arm/mm/fault-armv.c # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add 'pfn' arg to flush_cache_page(). # # Documentation/cachetlb.txt # 2005/02/25 16:35:19-08:00 davem@nuts.davemloft.net +9 -3 # [MM]: Add 'pfn' arg to flush_cache_page(). # # ChangeSet # 2005/02/25 15:48:28-08:00 khali@linux-fr.org # [PATCH] PCI: One more Asus SMBus quirk # # One more Asus laptop requiring the SMBus quirk (W1N model). # # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/quirks.c # 2005/02/14 11:10:24-08:00 khali@linux-fr.org +1 -0 # PCI: One more Asus SMBus quirk # # ChangeSet # 2005/02/25 15:48:12-08:00 alexn@dsv.su.se # [PATCH] PCI: fix hotplug double free # # With the brackets missed out func could be freed twice. # # Found by Coverity tool # # Signed-off-by: Alexander Nyberg # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/pciehp_ctrl.c # 2005/02/23 01:26:22-08:00 alexn@dsv.su.se +2 -1 # PCI: fix hotplug double free # # ChangeSet # 2005/02/25 15:47:53-08:00 akpm@osdl.org # [PATCH] PCI: tone down pci=routeirq message # # From: Bjorn Helgaas # # Tone down the message about using "pci=routeirq". I do still get a few # reports, but most are now prompted just by the fact that my email address # appears in dmesg in an "error-type" message. # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Andrew Morton # Signed-off-by: Greg Kroah-Hartman # # arch/ia64/pci/pci.c # 2005/02/22 18:53:24-08:00 akpm@osdl.org +3 -13 # PCI: tone down pci=routeirq message # # arch/i386/pci/acpi.c # 2005/02/22 18:53:24-08:00 akpm@osdl.org +4 -13 # PCI: tone down pci=routeirq message # # ChangeSet # 2005/02/25 14:36:10-08:00 benh@kernel.crashing.org # [PATCH] PCI: Apple PCI IDs update # # please sent that to Andrew/Linus in your next batch for after 2.6.11, # those new IDs will be needed for support of the new iMac G5. # # The changes to pci.ids match the changes already submitted to the web # database. # # From: Benjamin Herrenschmidt # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2005/02/17 19:26:36-08:00 benh@kernel.crashing.org +3 -0 # PCI: Apple PCI IDs update # # ChangeSet # 2005/02/25 08:26:11-08:00 gregkh@suse.de # PCI: remove pci_find_device usage from pci sysfs code. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci-sysfs.c # 2005/02/25 08:25:55-08:00 gregkh@suse.de +1 -1 # PCI: remove pci_find_device usage from pci sysfs code. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2005/02/24 14:52:48-05:00 jgarzik@pobox.com # [libata ahci] Print out port id on error messages # # Pointed out by Justin Cormack, Brett Russ, and others. # # drivers/scsi/ahci.c # 2005/02/24 14:52:41-05:00 jgarzik@pobox.com +1 -1 # [libata ahci] Print out port id on error messages # # Pointed out by Justin Cormack, Brett Russ, and others. # # ChangeSet # 2005/02/24 11:25:26-08:00 ajgrothe@yahoo.com # [CRYPTO]: Add Tiger digest algorithms. # # Signed-off-by: James Morris # Signed-off-by: David S. Miller # # crypto/tcrypt.h # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +131 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/tcrypt.c # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +16 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/Makefile # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +1 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/Kconfig # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +13 -0 # [CRYPTO]: Add Tiger digest algorithms. # # Documentation/crypto/api-intro.txt # 2005/02/24 11:24:22-08:00 ajgrothe@yahoo.com +3 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/tgr192.c # 2005/02/24 11:24:18-08:00 ajgrothe@yahoo.com +735 -0 # [CRYPTO]: Add Tiger digest algorithms. # # crypto/tgr192.c # 2005/02/24 11:24:18-08:00 ajgrothe@yahoo.com +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/crypto/tgr192.c # # ChangeSet # 2005/02/24 10:59:51-08:00 herbert@gondor.apana.org.au # [IXGB]: Check skb_header_cloned for TSO packets. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/net/ixgb/ixgb_main.c # 2005/02/24 10:59:26-08:00 herbert@gondor.apana.org.au +18 -4 # [IXGB]: Check skb_header_cloned for TSO packets. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/24 00:33:29-05:00 tklauser@nuerscht.ch # [PATCH] drivers/scsi/ahci: Use the DMA_{64,32}BIT_MASK constants # # Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h # when calling pci_set_dma_mask() or pci_set_consistent_dma_mask() # See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details # # Signed-off-by: Tobias Klauser # Signed-off-by: Jeff Garzik # # drivers/scsi/ahci.c # 2005/02/16 15:19:53-05:00 tklauser@nuerscht.ch +5 -5 # drivers/scsi/ahci: Use the DMA_{64,32}BIT_MASK constants # # ChangeSet # 2005/02/24 00:33:15-05:00 tklauser@nuerscht.ch # [PATCH] drivers/scsi/sata_vsc: Use the DMA_{64,32}BIT_MASK constants # # Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h # when calling pci_set_dma_mask() or pci_set_consistent_dma_mask() # See http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for details # # Signed-off-by: Tobias Klauser # Signed-off-by: Jeff Garzik # # drivers/scsi/sata_vsc.c # 2005/02/16 15:25:01-05:00 tklauser@nuerscht.ch +2 -2 # drivers/scsi/sata_vsc: Use the DMA_{64,32}BIT_MASK constants # # ChangeSet # 2005/02/24 00:25:36-05:00 mlord@pobox.com # [libata qstor] minor update per LKML comments # # * use __le{32,64} # * use DMA_{32,64}BIT_MASK # # drivers/scsi/sata_qstor.c # 2005/02/24 00:25:30-05:00 mlord@pobox.com +10 -10 # [libata qstor] minor update per LKML comments # # * use __le{32,64} # * use DMA_{32,64}BIT_MASK # # ChangeSet # 2005/02/24 00:17:17-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] smc91x iomem annotations # # usual iomem annotations; # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.c # 2005/02/15 13:38:10-05:00 viro@parcelfarce.linux.theplanet.co.uk +41 -33 # smc91x iomem annotations # # ChangeSet # 2005/02/24 00:12:34-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/smc91x # # arch/arm/mach-pxa/lubbock.c # 2005/02/24 00:12:31-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/02/23 19:57:33-08:00 laforge@netfilter.org # [NETFILTER]: ipt_hashlimit: use hlist instead of list head # # Use hlist instead of list_head to save lots of memory for the hash buckets. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2005/02/23 19:57:13-08:00 laforge@netfilter.org +35 -24 # [NETFILTER]: ipt_hashlimit: use hlist instead of list head # # Use hlist instead of list_head to save lots of memory for the hash buckets. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 19:56:46-08:00 laforge@netfilter.org # [NETFILTER]: ipt_hashlimit: replace rwlock with spinlock # # As Samuel points out, the rwlock doesn't really make much sense. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # net/ipv4/netfilter/ipt_hashlimit.c # 2005/02/23 19:56:26-08:00 laforge@netfilter.org +8 -8 # [NETFILTER]: ipt_hashlimit: replace rwlock with spinlock # # As Samuel points out, the rwlock doesn't really make much sense. # # Signed-off-by: Samuel Jean # Signed-off-by: Harald Welte # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 19:51:56-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/net-2.6 # into nuts.davemloft.net:/disk1/BK/net-2.6.12 # # net/ipv6/addrconf.c # 2005/02/23 19:51:43-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/23 19:27:50-08:00 davem@nuts.davemloft.net # [PPC]: Use new set_pte_at() w/mm+address args. # # Based almost entirely upon an earlier patch by # Benjamin Herrenschmidt. # # Signed-off-by: David S. Miller # # include/asm-ppc64/pgtable.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +32 -20 # [PPC]: Use new set_pte_at() w/mm+address args. # # include/asm-ppc64/pgalloc.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +6 -22 # [PPC]: Use new set_pte_at() w/mm+address args. # # include/asm-ppc/pgtable.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +33 -28 # [PPC]: Use new set_pte_at() w/mm+address args. # # include/asm-ppc/highmem.h # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +1 -1 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc64/mm/tlb.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +2 -9 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/mm/tlb.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +0 -20 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/mm/pgtable.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +2 -12 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/mm/init.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +0 -12 # [PPC]: Use new set_pte_at() w/mm+address args. # # arch/ppc/kernel/dma-mapping.c # 2005/02/23 19:26:53-08:00 davem@nuts.davemloft.net +5 -2 # [PPC]: Use new set_pte_at() w/mm+address args. # # ChangeSet # 2005/02/23 19:18:34-08:00 herbert@gondor.apana.org.au # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/skbuff.h # 2005/02/23 19:18:14-08:00 herbert@gondor.apana.org.au +19 -0 # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/net/tg3.c # 2005/02/23 19:18:14-08:00 herbert@gondor.apana.org.au +6 -0 # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # drivers/net/e1000/e1000_main.c # 2005/02/23 19:18:14-08:00 herbert@gondor.apana.org.au +18 -4 # [NET]: Add skb_header_cloned and use it in e1000/tg3 # # This patch adds skb_header_cloned which tells us whether we need to # copy the data before we can modify the header part of the skb. Again, # what constitutes the header is left up to the users of the skb to define. # # This patch then uses this function in e1000/tg3 to copy the data before # the TCP/IP header is modified. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 19:17:24-08:00 herbert@gondor.apana.org.au # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2005/02/23 19:16:59-08:00 herbert@gondor.apana.org.au +3 -0 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/tcp.c # 2005/02/23 19:16:58-08:00 herbert@gondor.apana.org.au +1 -0 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/core/skbuff.c # 2005/02/23 19:16:58-08:00 herbert@gondor.apana.org.au +4 -1 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/linux/skbuff.h # 2005/02/23 19:16:58-08:00 herbert@gondor.apana.org.au +34 -2 # [NET]: Add skb_header_release and use it in net/ipv4/tcp # # This patch adds skb_header_release which can be called when the owner # of an skb no longer needs to access the header at all. What constitutes # the header is left up to the users of the skb to define. # # For instance, for outbound TCP packets we define the header to be # anything in front of the TCP payload. Therefore we add skb_header_release # calls to all the paths where outound TCP packets are produced. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/23 17:46:43-08:00 davem@nuts.davemloft.net # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # No longer need to store this information in the pte table # page struct. # # Signed-off-by: David S. Miller # # include/asm-sparc64/pgtable.h # 2005/02/23 17:45:37-08:00 davem@nuts.davemloft.net +6 -5 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # include/asm-sparc64/pgalloc.h # 2005/02/23 17:45:37-08:00 davem@nuts.davemloft.net +5 -15 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/tlb.c # 2005/02/23 17:45:37-08:00 davem@nuts.davemloft.net +7 -10 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/init.c # 2005/02/23 17:45:36-08:00 davem@nuts.davemloft.net +2 -1 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/hugetlbpage.c # 2005/02/23 17:45:36-08:00 davem@nuts.davemloft.net +6 -4 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # arch/sparc64/mm/generic.c # 2005/02/23 17:45:36-08:00 davem@nuts.davemloft.net +14 -11 # [SPARC64]: Pass mm/addr directly to tlb_batch_add() # # ChangeSet # 2005/02/23 19:36:15-05:00 davej@redhat.com # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/uninorth-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +10 -10 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/sworks-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +7 -7 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/sis-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +3 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/nvidia-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +2 -1 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/intel-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +15 -11 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/i460-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +9 -6 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/hp-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +9 -6 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/generic.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +47 -44 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/efficeon-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +3 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/backend.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -4 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/ati-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/amd64-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +2 -1 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/amd-k7-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/alpha-agp.c # 2005/02/23 19:36:05-05:00 davej@redhat.com +4 -3 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # drivers/char/agp/agp.h # 2005/02/23 19:36:05-05:00 davej@redhat.com +10 -8 # [AGPGART] add bridge parameter to driver functions # # From: Michael Werner # # Add bridge parameter to create_gatt_table, free_gatt_table and mask_memory # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # # ChangeSet # 2005/02/23 15:42:56-08:00 davem@nuts.davemloft.net # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # I'm taking a slightly different approach this time around so things # are easier to integrate. Here is the first patch which builds the # infrastructure. Basically: # # 1) Add set_pte_at() which is set_pte() with 'mm' and 'addr' arguments # added. All generic code uses set_pte_at(). # # Most platforms simply get this define: # #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) # # I chose this method over simply changing all set_pte() call sites # because many platforms implement this in assembler and it would # take forever to preserve the build and stabilize things if modifying # that was necessary. # # Soon, with platform maintainer's help, we can kill of set_pte() entirely. # To be honest, there are only a handful of set_pte() call sites in the # arch specific code. # # Actually, in this patch ppc64 is completely set_pte() free and does not # define it. # # 2) pte_clear() gets 'mm' and 'addr' arguments now. # This had a cascading effect on many ptep_test_and_*() routines. Specifically: # a) ptep_test_and_clear_{young,dirty}() now take 'vma' and 'address' args. # b) ptep_get_and_clear now take 'mm' and 'address' args. # c) ptep_mkdirty was deleted, unused by any code. # d) ptep_set_wrprotect now takes 'mm' and 'address' args. # # I've tested this patch as follows: # # 1) compile and run tested on sparc64/SMP # 2) compile tested on: # a) ppc64/SMP # b) i386 both with and without PAE enabled # # Signed-off-by: David S. Miller # # mm/vmalloc.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/swapfile.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/rmap.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/mremap.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/mprotect.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +10 -10 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/memory.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +21 -18 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/highmem.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # mm/fremap.c # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +3 -3 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-x86_64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +9 -7 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-um/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-um/pgtable-3level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-um/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sparc64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +3 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sparc/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sh64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sh/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-sh/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-s390/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +11 -16 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-s390/pgalloc.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ppc64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +12 -9 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ppc/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +6 -11 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ppc/highmem.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-parisc/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +10 -20 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-mips/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +8 -6 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m68k/sun3_pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m68k/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -0 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m68k/motorola_pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m32r/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +4 -10 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-m32r/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-ia64/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +10 -21 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-i386/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +7 -6 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-i386/pgtable-3level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +3 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-i386/pgtable-2level.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-generic/pgtable.h # 2005/02/23 15:40:53-08:00 davem@nuts.davemloft.net +38 -37 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-frv/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +6 -12 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-cris/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +3 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-arm26/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-arm/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # include/asm-alpha/pgtable.h # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +5 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # fs/exec.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sparc64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sparc/mm/highmem.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sparc/mm/generic.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +6 -6 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh64/mm/ioremap.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh/mm/pg-sh7705.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh/mm/pg-sh4.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +4 -4 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/sh/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/s390/mm/init.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ppc64/mm/init.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ppc64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +6 -5 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ppc/kernel/dma-mapping.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/parisc/mm/kmap.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +2 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/parisc/kernel/pci-dma.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/mips/mm/highmem.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/ia64/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/i386/mm/hugetlbpage.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/i386/mm/highmem.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +1 -1 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # arch/arm/mm/consistent.c # 2005/02/23 15:40:52-08:00 davem@nuts.davemloft.net +4 -2 # [MM]: Add set_pte_at() which takes 'mm' and 'addr' args. # # ChangeSet # 2005/02/23 18:19:13-05:00 davej@redhat.com # [FB] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds fb support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/video/intelfb/intelfbdrv.c # 2005/02/23 18:19:04-05:00 davej@redhat.com +12 -11 # [FB] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds fb support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/video/i810/i810_main.c # 2005/02/23 18:19:04-05:00 davej@redhat.com +9 -8 # [FB] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds fb support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:18:13-05:00 davej@redhat.com # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_stub.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +1 -1 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_memory.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +2 -2 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_drv.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +1 -1 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drm_agpsupport.c # 2005/02/23 18:18:04-05:00 davej@redhat.com +16 -12 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/drm/drmP.h # 2005/02/23 18:18:04-05:00 davej@redhat.com +5 -4 # [DRM] add support for new multiple agp bridge agpgart api # # From: Michael Werner # # This patch adds drm support for new multiple agp bridge agpgart api. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:17:02-05:00 davej@redhat.com # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +1 -1 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/i460-agp.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +1 -1 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/ali-agp.c # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/23 18:16:53-05:00 davej@redhat.com +2 -2 # [AGPGART] allow drivers to allocate memory local to the bridge # # From: Michael Werner # # This patch allows drivers to allocate memory local to the bridge using # platform specific alloc_page routines. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:15:47-05:00 davej@redhat.com # [AGPGART] add agp_find_bridge function # # From: Michael Werner # # This patch gives non-generic platforms a method for using platform specific # agp_find_bridge functions. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/02/23 18:15:38-05:00 davej@redhat.com +2 -0 # [AGPGART] add agp_find_bridge function # # From: Michael Werner # # This patch gives non-generic platforms a method for using platform specific # agp_find_bridge functions. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/23 18:15:38-05:00 davej@redhat.com +4 -1 # [AGPGART] add agp_find_bridge function # # From: Michael Werner # # This patch gives non-generic platforms a method for using platform specific # agp_find_bridge functions. # # Signed-off-by: Mike Werner # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:12:13-05:00 davej@redhat.com # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/02/23 18:12:04-05:00 davej@redhat.com +14 -7 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +71 -47 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/frontend.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +17 -13 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +60 -44 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/23 18:12:04-05:00 davej@redhat.com +3 -0 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # arch/x86_64/kernel/pci-gart.c # 2005/02/23 18:12:04-05:00 davej@redhat.com +1 -1 # [AGPGART] allow multiple backends to be initialized. # # From: Michael Werner # # This patch adds support for initializing and addressing multiple AGP # bridges using the agpgart driver. In particular, it extends agp_acquire # and agp_allocate_memory so that different bridges can be acquired and # memory allocated within a specific AGP aperature. # # From: Brice Goglin # # It seems that memsetting the whole bridge structure to 0 (instead of juste # the agp_in_use field) fixes Benoit's problem too. No idea which field was # responsible for this. New patch attached. # # From: Mike Werner # # add bridge assignment missed in agp_allocate_memory # # From: Andi Kleen # # Here's the correct fix. agp_bridge is defined in drivers/char/agp/agp.h. # It's a bit ugly though. # # Signed-off-by: Mike Werner # Signed-off-by: Andi Kleen # Signed-off-by: Andrew Morton # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 18:02:50-05:00 davej@redhat.com # [AGPGART] Rework AGPv2 rate verification. # # The spec says its valid for multiple bits to be set when we read rate, # however we must take care to ensure that we only write 1 bit back. # # This removes some bogus warnings that appeared on some boxes. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/23 18:02:41-05:00 davej@redhat.com +18 -11 # [AGPGART] Rework AGPv2 rate verification. # # The spec says its valid for multiple bits to be set when we read rate, # however we must take care to ensure that we only write 1 bit back. # # This removes some bogus warnings that appeared on some boxes. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 12:37:52-05:00 davej@redhat.com # [AGPGART] aper_base can't be signed. # # We pass this to remap_pfn_range after shifting it right. # Nasty things happen as a result. # # Signed-off-by: Dave Jones # # include/linux/agp_backend.h # 2005/02/23 12:37:43-05:00 davej@redhat.com +3 -3 # [AGPGART] aper_base can't be signed. # # We pass this to remap_pfn_range after shifting it right. # Nasty things happen as a result. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 12:36:42-05:00 davej@redhat.com # [AGPGART] Compile fixes. # # Somehow the conversion to the extra arg for agp_collect_device_status() got dropped. # # Signed-off-by: Dave Jones # # drivers/char/agp/sworks-agp.c # 2005/02/23 12:36:32-05:00 davej@redhat.com +1 -1 # [AGPGART] Compile fixes. # # Somehow the conversion to the extra arg for agp_collect_device_status() got dropped. # # Signed-off-by: Dave Jones # # drivers/char/agp/sis-agp.c # 2005/02/23 12:36:32-05:00 davej@redhat.com +3 -3 # [AGPGART] Compile fixes. # # Somehow the conversion to the extra arg for agp_collect_device_status() got dropped. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/23 03:46:53-05:00 davej@redhat.com # [AGPGART] yet more whitespace removal. # # Signed-off-by: Dave Jones # # drivers/char/agp/frontend.c # 2005/02/23 03:46:44-05:00 davej@redhat.com +20 -20 # [AGPGART] yet more whitespace removal. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 19:23:21-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/network-2.6.12 # into nuts.davemloft.net:/disk1/BK/net-2.6.12 # # net/xfrm/xfrm_policy.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/ipv6/tcp_ipv6.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/ipv4/tcp_ipv4.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/ipv4/route.c # 2005/02/22 19:23:09-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # kernel/workqueue.c # 2005/02/22 19:23:08-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/22 22:00:10-05:00 davej@redhat.com # [AGPGART] i810 suspend/resume support. # # From Nigel Cunningham/Karol Kozimor # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/22 22:00:00-05:00 davej@redhat.com +2 -0 # [AGPGART] i810 suspend/resume support. # # From Nigel Cunningham/Karol Kozimor # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:53:10-05:00 davej@delerium.kernelslacker.org # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/uninorth-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/sworks-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/sis-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/nvidia-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/i460-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/efficeon-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/ati-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/amd64-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # drivers/char/agp/ali-agp.c # 2005/02/22 19:56:06-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Convert from pci_module_init to pci_register_driver # # Signed-off-by: Christophe Lucas # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:35:30-05:00 davej@delerium.kernelslacker.org # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # BitKeeper/deleted/.del-intel-mch-agp.c~ada34657bfa6d42b # 2005/02/22 21:35:14-05:00 davej@delerium.kernelslacker.org +0 -0 # Delete: drivers/char/agp/intel-mch-agp.c # # drivers/char/agp/Makefile # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -1 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # drivers/char/agp/Kconfig # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -10 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # arch/x86_64/defconfig # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -1 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # arch/i386/defconfig # 2005/02/22 19:55:59-05:00 davej@delerium.kernelslacker.org +0 -1 # [AGPGART] Drop the Intel-mch AGP driver. # # Andi Kleen points out that the intel-agp driver actually works on i865's, where # the -mch driver doesn't. The -mch driver was something of a failed experiment. # Hoping that the code would be much cleaner, I forked the intel-agp driver into # this variant, and removed some legacy bits. The result was a third the size, # but it still was no work of art, worse yet -- it didn't even do what it said on the can. # # intel-agp still supports everything that the -mch driver did, so we can just # remove this from the tree and fall back to the old driver. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:52-05:00 davej@delerium.kernelslacker.org # [AGPGART] Lower 7 bits of TLB flush register must be zero. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:02-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] Lower 7 bits of TLB flush register must be zero. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:37-05:00 davej@delerium.kernelslacker.org # [AGPGART] Various "I'm a dumbass" compile fixes. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:09-05:00 davej@delerium.kernelslacker.org +4 -4 # [AGPGART] Various "I'm a dumbass" compile fixes. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:22-05:00 davej@delerium.kernelslacker.org # [AGPGART] Don't clobber other bits in control register when flushing TLB on VIA. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:17-05:00 davej@delerium.kernelslacker.org +7 -2 # [AGPGART] Don't clobber other bits in control register when flushing TLB on VIA. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:27:07-05:00 davej@delerium.kernelslacker.org # [AGPGART] VIA AGPGARTs can support really small aperture sizes. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:24-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] VIA AGPGARTs can support really small aperture sizes. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:52-05:00 davej@delerium.kernelslacker.org # [AGPGART] Trailing whitespace removal de jour. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:31-05:00 davej@delerium.kernelslacker.org +4 -4 # [AGPGART] Trailing whitespace removal de jour. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:36-05:00 davej@delerium.kernelslacker.org # [AGPGART] Print diagnostic info when failing to determine aperture size on VIA systems. # # I've seen this happen a few times, and never got to the bottom of it, so hopefully # this will make things a little easier to diagnose what's going on. # # Signed-off-by: Dave Jones # # drivers/char/agp/via-agp.c # 2005/02/22 19:55:38-05:00 davej@delerium.kernelslacker.org +1 -0 # [AGPGART] Print diagnostic info when failing to determine aperture size on VIA systems. # # I've seen this happen a few times, and never got to the bottom of it, so hopefully # this will make things a little easier to diagnose what's going on. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:21-05:00 davej@delerium.kernelslacker.org # [AGPGART] Trailing whitespace removal. # # Signed-off-by: Dave Jones # # drivers/char/agp/backend.c # 2005/02/22 19:55:45-05:00 davej@delerium.kernelslacker.org +6 -6 # [AGPGART] Trailing whitespace removal. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:26:04-05:00 davej@delerium.kernelslacker.org # [AGPGART] Make agp=off boot param work for Intel AGP drivers. # # Signed-off-by: Dave Jones # # drivers/char/agp/intel-mch-agp.c # 2005/02/22 19:56:13-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] Make agp=off boot param work for Intel AGP drivers. # # Signed-off-by: Dave Jones # # drivers/char/agp/intel-agp.c # 2005/02/22 19:56:13-05:00 davej@delerium.kernelslacker.org +2 -0 # [AGPGART] Make agp=off boot param work for Intel AGP drivers. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:49-05:00 davej@delerium.kernelslacker.org # [AGPGART] Make sure we don't give up searching for gfx cards. # # We need to clear the previously found cap_ptr, or we exit after # finding the first one, even if its not the one plugged into the # bridge we're looking at. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:20-05:00 davej@delerium.kernelslacker.org +1 -0 # [AGPGART] Make sure we don't give up searching for gfx cards. # # We need to clear the previously found cap_ptr, or we exit after # finding the first one, even if its not the one plugged into the # bridge we're looking at. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:33-05:00 davej@delerium.kernelslacker.org # [AGPGART] Map the graphic card to the bridge its connected to. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:27-05:00 davej@delerium.kernelslacker.org +5 -0 # [AGPGART] Map the graphic card to the bridge its connected to. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:18-05:00 davej@delerium.kernelslacker.org # [AGPGART] Silly thinko in reserve bit masking. # # Stupid inversion meant we passed '0' to userspace, and madness # ensued resulting in very funky visuals. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:34-05:00 davej@delerium.kernelslacker.org +2 -2 # [AGPGART] Silly thinko in reserve bit masking. # # Stupid inversion meant we passed '0' to userspace, and madness # ensued resulting in very funky visuals. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:25:03-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix the same pci_get_class bug in the amd-k7 driver. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:56:41-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Fix the same pci_get_class bug in the amd-k7 driver. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:24:48-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix stupid thinko in device discovery. # # Should fix the 'cant find AGP VGA controller' warnings. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:48-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Fix stupid thinko in device discovery. # # Should fix the 'cant find AGP VGA controller' warnings. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:24:32-05:00 davej@delerium.kernelslacker.org # [AGPGART] In AGP2.0 mode, if we're in 1X mode, disable fast writes. # # In this mode, fast writes are just ignored, and treated as regular PCI # writes, but disabling them explicitly doesn't hurt. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:56:55-05:00 davej@delerium.kernelslacker.org +4 -0 # [AGPGART] In AGP2.0 mode, if we're in 1X mode, disable fast writes. # # In this mode, fast writes are just ignored, and treated as regular PCI # writes, but disabling them explicitly doesn't hurt. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:24:12-05:00 davej@delerium.kernelslacker.org # [AGPGART] Mask out the reserved bits of the agp mode register before handing them to userspace. # # X munges what we hand to it, so with luck, this will lower the possibility # of it handing us something with reserved bits set. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:02-05:00 davej@delerium.kernelslacker.org +17 -14 # [AGPGART] Mask out the reserved bits of the agp mode register before handing them to userspace. # # X munges what we hand to it, so with luck, this will lower the possibility # of it handing us something with reserved bits set. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:57-05:00 davej@delerium.kernelslacker.org # [AGPGART] Introduce routine to check current operating mode of agp bridge. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:08-05:00 davej@delerium.kernelslacker.org +17 -11 # [AGPGART] Introduce routine to check current operating mode of agp bridge. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:42-05:00 davej@delerium.kernelslacker.org # [AGPGART] Remove pointless tests for bridge vendor from amd-k7-agp driver. # # If we got far enough to run this code, we *must* have an AMD bridge. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:57:15-05:00 davej@delerium.kernelslacker.org +2 -4 # [AGPGART] Remove pointless tests for bridge vendor from amd-k7-agp driver. # # If we got far enough to run this code, we *must* have an AMD bridge. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:27-05:00 davej@delerium.kernelslacker.org # [AGPGART] AMD 751 errata workaround. # Some combinations of NVidia GeForce cards and this AGP chipset cause lockups # when operated in AGP x2 mode. Force them to x1 mode for safety. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:57:22-05:00 davej@delerium.kernelslacker.org +31 -0 # [AGPGART] AMD 751 errata workaround. # Some combinations of NVidia GeForce cards and this AGP chipset cause lockups # when operated in AGP x2 mode. Force them to x1 mode for safety. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:23:12-05:00 davej@delerium.kernelslacker.org # [AGPGART] AMD 761 errata workaround. # B0/B1 steppings of this chipset were horribly broken, # and couldn't do fast writes, or side band addressing. # Looking through the errata on this one reads like a horror story, it's # a miracle it could get AGP x1 working. # # Signed-off-by: Dave Jones # # drivers/char/agp/amd-k7-agp.c # 2005/02/22 19:57:29-05:00 davej@delerium.kernelslacker.org +18 -0 # [AGPGART] AMD 761 errata workaround. # B0/B1 steppings of this chipset were horribly broken, # and couldn't do fast writes, or side band addressing. # Looking through the errata on this one reads like a horror story, it's # a miracle it could get AGP x1 working. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:57-05:00 davej@delerium.kernelslacker.org # [AGPGART] Add mechanism for chipset specific errata. # # Allow chipset drivers to tell the generic routines not to enable # certain features if they have errata when those features are used. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:36-05:00 davej@delerium.kernelslacker.org +29 -3 # [AGPGART] Add mechanism for chipset specific errata. # # Allow chipset drivers to tell the generic routines not to enable # certain features if they have errata when those features are used. # # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/22 19:57:36-05:00 davej@delerium.kernelslacker.org +5 -0 # [AGPGART] Add mechanism for chipset specific errata. # # Allow chipset drivers to tell the generic routines not to enable # certain features if they have errata when those features are used. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:42-05:00 davej@delerium.kernelslacker.org # [AGPGART] Name & Shame the apps passing bad flags. # (Basically a distinction between XFree and Xorg) # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:43-05:00 davej@delerium.kernelslacker.org +6 -6 # [AGPGART] Name & Shame the apps passing bad flags. # (Basically a distinction between XFree and Xorg) # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:27-05:00 davej@delerium.kernelslacker.org # [AGPGART] Do some sanity checks on the rates that userspace passes. # # The AGP specifications define the following... # # agp2 agp3 # 000 BAD BAD # 001 x1 x4 # 010 x2 x8 # 011 BAD x8 # 100 x4 BAD # 101 BAD BAD # 110 BAD BAD # 111 BAD BAD # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:57:50-05:00 davej@delerium.kernelslacker.org +33 -0 # [AGPGART] Do some sanity checks on the rates that userspace passes. # # The AGP specifications define the following... # # agp2 agp3 # 000 BAD BAD # 001 x1 x4 # 010 x2 x8 # 011 BAD x8 # 100 x4 BAD # 101 BAD BAD # 110 BAD BAD # 111 BAD BAD # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:22:11-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix up the reserved bits. # The previous checks were against AGP_STAT values, but userspace passes us # an agp command register. # # drivers/char/agp/agp.h # 2005/02/22 19:57:57-05:00 davej@delerium.kernelslacker.org +2 -2 # [AGPGART] Fix up the reserved bits. # The previous checks were against AGP_STAT values, but userspace passes us # an agp command register. # # ChangeSet # 2005/02/22 21:21:55-05:00 davej@delerium.kernelslacker.org # [AGPGART] Warn and fix up mode if userspace passes nonsense. # Check the reserved bits in the agp mode register. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:04-05:00 davej@delerium.kernelslacker.org +11 -1 # [AGPGART] Warn and fix up mode if userspace passes nonsense. # Check the reserved bits in the agp mode register. # # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/22 19:58:04-05:00 davej@delerium.kernelslacker.org +3 -0 # [AGPGART] Warn and fix up mode if userspace passes nonsense. # Check the reserved bits in the agp mode register. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:21:40-05:00 davej@delerium.kernelslacker.org # [AGPGART] Check the bridge is in 3.0 mode, not the graphic card. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:11-05:00 davej@delerium.kernelslacker.org +4 -3 # [AGPGART] Check the bridge is in 3.0 mode, not the graphic card. # # Signed-off-by: Dave Jones # # drivers/char/agp/agp.h # 2005/02/22 19:58:11-05:00 davej@delerium.kernelslacker.org +1 -1 # [AGPGART] Check the bridge is in 3.0 mode, not the graphic card. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:21:25-05:00 davej@delerium.kernelslacker.org # [AGPGART] Fix refcount bug in mode parsing code. # # The pci_get_class conversion leaked this refcount. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:17-05:00 davej@delerium.kernelslacker.org +4 -3 # [AGPGART] Fix refcount bug in mode parsing code. # # The pci_get_class conversion leaked this refcount. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:21:09-05:00 davej@delerium.kernelslacker.org # [AGPGART] Rename a bunch of ambiguous variables. # mode = What X wants us to set the mode to (As set by AGPMode in X config) # cmd = PCI_AGP_STATUS from the AGP bridge. # tmp = PCI_AGP_STATUS from the graphic card. # # mode -> requested_mode # cmd -> bridge_agpstat # tmp -> vga_agpstat # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:24-05:00 davej@delerium.kernelslacker.org +74 -72 # [AGPGART] Rename a bunch of ambiguous variables. # mode = What X wants us to set the mode to (As set by AGPMode in X config) # cmd = PCI_AGP_STATUS from the AGP bridge. # tmp = PCI_AGP_STATUS from the graphic card. # # mode -> requested_mode # cmd -> bridge_agpstat # tmp -> vga_agpstat # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:20:54-05:00 davej@delerium.kernelslacker.org # [AGPGART] Don't scan whole bus for a VGA card. # Use the handy pci_get_class() function instead of implementing our own # pci bus walking loop. Also makes it skip non-VGA devices fixing up a # long-standing FIXME. Previously, it may have been tripping up on AGP # bridges, which could have caused all sorts of sillyness. # # Signed-off-by: Dave Jones # # drivers/char/agp/generic.c # 2005/02/22 19:58:31-05:00 davej@delerium.kernelslacker.org +45 -29 # [AGPGART] Don't scan whole bus for a VGA card. # Use the handy pci_get_class() function instead of implementing our own # pci bus walking loop. Also makes it skip non-VGA devices fixing up a # long-standing FIXME. Previously, it may have been tripping up on AGP # bridges, which could have caused all sorts of sillyness. # # Signed-off-by: Dave Jones # # ChangeSet # 2005/02/22 21:09:45-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/mii # # drivers/net/tg3.h # 2005/02/22 21:09:42-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/02/20 21:11:56-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Driver version white space, # # 10 Driver version number, white space, comments, device id & other changes # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +13 -7 # e1000: Driver version white space, # # drivers/net/e1000/e1000_hw.h # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +9 -2 # e1000: Driver version white space, # # drivers/net/e1000/e1000_hw.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +4 -5 # e1000: Driver version white space, # # ChangeSet # 2005/02/20 21:11:41-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Fixes related to Cable length # # 9 Fixes related to Cable length estimation # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_hw.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +42 -37 # e1000: Fixes related to Cable length # # ChangeSet # 2005/02/20 21:11:30-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Report failure code when loopback # # 8 Report failure code when loopback test fails # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_ethtool.c # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +6 -5 # e1000: Report failure code when loopback # # ChangeSet # 2005/02/20 21:11:15-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Checks for desc ring/rx data # # 7 Add checks for desc ring/rx data bufs spanning 64k address boundary # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +133 -2 # e1000: Checks for desc ring/rx data # # ChangeSet # 2005/02/20 21:11:01-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Patch from Peter Kjellstroem -- # # 6 Patch from Peter Kjellstroem -- fix lockup with 82547 # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +18 -0 # e1000: Patch from Peter Kjellstroem -- # # ChangeSet # 2005/02/20 21:10:46-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Fix WOL settings in 82544 based # # 5 Fix WOL settings in 82544 based adapters # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +7 -1 # e1000: Fix WOL settings in 82544 based # # drivers/net/e1000/e1000.h # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +1 -0 # e1000: Fix WOL settings in 82544 based # # ChangeSet # 2005/02/20 21:10:31-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Delay clean-up of last Tx buffer # # 4 Delay clean-up of last Tx buffer to fix pre-mature writeback of Tx descriptors. # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +30 -1 # e1000: Delay clean-up of last Tx buffer # # drivers/net/e1000/e1000.h # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +1 -0 # e1000: Delay clean-up of last Tx buffer # # ChangeSet # 2005/02/20 21:10:20-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Avoid race between e1000_watchdog # # 3 Avoid race condition between e1000_watchdog and e1000_clean_tx_irq # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +12 -7 # e1000: Avoid race between e1000_watchdog # # drivers/net/e1000/e1000.h # 2005/02/02 02:10:26-05:00 mallikarjuna.chilakala@intel.com +1 -0 # e1000: Avoid race between e1000_watchdog # # ChangeSet # 2005/02/20 21:10:06-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: use netif_poll_{enable|disable} # # 2 use netif_poll_{enable|disable} to synchronize between poll and i/f down/up # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +7 -0 # e1000: use netif_poll_{enable|disable} # # ChangeSet # 2005/02/20 21:09:54-05:00 mallikarjuna.chilakala@intel.com # [PATCH] e1000: Robert Olsson's fix and refinement # # 1 Robert Olsson's fix and refinement to the poll routine # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/e1000/e1000_main.c # 2005/02/02 02:10:27-05:00 mallikarjuna.chilakala@intel.com +4 -7 # e1000: Robert Olsson's fix and refinement # # ChangeSet # 2005/02/20 20:59:40-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Driver version, white space, other stuff # # Driver version number, white space, comments, device id & other changes # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_param.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_osdep.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +20 -15 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ids.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_hw.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_hw.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ethtool.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +4 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ee.h # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb_ee.c # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # drivers/net/ixgb/ixgb.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -1 # ixgb: Driver version, white space, # # ChangeSet # 2005/02/20 20:59:28-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Invalidate software cache, when EEPROM write occurs # # Added code to invalidate software cache, when a write is made to the EEPROM. # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_ee.h # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +1 -0 # ixgb: Invalidate software cache, when # # drivers/net/ixgb/ixgb_ee.c # 2005/02/07 02:33:01-05:00 mallikarjuna.chilakala@intel.com +10 -4 # ixgb: Invalidate software cache, when # # ChangeSet # 2005/02/20 20:59:16-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Robert Olsson's fix and refinement to poll # # obert Olsson's fix and refinement to the poll routine # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +4 -8 # ixgb: Robert Olsson's fix and refinement # # ChangeSet # 2005/02/20 20:59:04-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: Avoid race e1000_watchdog and ixgb_clean_tx_irq # # Avoid race between e1000_watchdog and ixgb_clean_tx_irq # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +13 -7 # ixgb: Avoid race e1000_watchdog and # # drivers/net/ixgb/ixgb.h # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +1 -0 # ixgb: Avoid race e1000_watchdog and # # ChangeSet # 2005/02/20 20:58:53-05:00 mallikarjuna.chilakala@intel.com # [PATCH] ixgb: use netif_poll_{enable|disable} # # 1 use netif_poll_{enable|disable} to synchronize between poll and i/f down/up # Signed-off-by: Mallikarjuna R Chilakala # Signed-off-by: Ganesh Venkatesan # Signed-off-by: John Ronciak # Signed-off-by: Jeff Garzik # # drivers/net/ixgb/ixgb_main.c # 2005/02/07 02:33:02-05:00 mallikarjuna.chilakala@intel.com +6 -0 # ixgb: use netif_poll_{enable|disable} # # ChangeSet # 2005/02/18 16:45:25-06:00 shaggy@austin.ibm.com # JFS: change project url to http://jfs.sourceforge.net/ # # Signed-off-by: Dave Kleikamp # # MAINTAINERS # 2005/02/18 16:45:14-06:00 shaggy@austin.ibm.com +2 -2 # move to sourceforge.net # # Documentation/Changes # 2005/02/18 16:45:14-06:00 shaggy@austin.ibm.com +1 -1 # move to sourceforge.net # # ChangeSet # 2005/02/18 16:41:17-06:00 shaggy@austin.ibm.com # JFS: allow iocharset=none mount option # # iocharset=none is an explicit option to specify the default # character translation be used (no translation). This allows # remounting a partition which was mounted with a different setting, # and allows the same mount options to be used between 2.6 and 2.4 # kernels, where there is a different default. # # Signed-off-by: Dave Kleikamp # # fs/jfs/super.c # 2005/02/18 16:41:05-06:00 shaggy@austin.ibm.com +13 -8 # Allow iocharset=none mount option # # Documentation/filesystems/jfs.txt # 2005/02/18 16:41:05-06:00 shaggy@austin.ibm.com +3 -9 # Allow iocharset=none mount option # # ChangeSet # 2005/02/17 15:07:21-08:00 c-d.hailfinger.devel.2005@gmx.net # [PATCH] PCI: pci.ids update # # this patch partially updates drivers/pci/pci.ids to the current # version from http://pciids.sf.net. I have gone over the diff to # ensure nothing gets deleted/changed erroneously. There are some # differences where I couldn't verify whether the in-kernel or # the upstream version are correct, so I left them alone. # # Patch checked for build warnings and I'm running a kernel with # it on my machine right now. # # Signed-off-by: Carl-Daniel Hailfinger # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci.ids # 2005/02/16 19:05:44-08:00 c-d.hailfinger.devel.2005@gmx.net +1011 -126 # PCI: pci.ids update # # ChangeSet # 2005/02/17 15:07:01-08:00 roland@topspin.com # [PATCH] PCI: clean up the msi api # # Remove the call to request_mem_region() in msix_capability_init() to # grab the MSI-X vector table. Drivers should be using # pci_request_regions() so that they own all of the PCI BARs, and the # MSI-X core should trust it's being called by a correct driver. # # Signed-off-by: Roland Dreier # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/msi.c # 2005/02/16 16:00:00-08:00 roland@topspin.com +2 -11 # PCI: clean up the msi api # # ChangeSet # 2005/02/17 15:06:37-08:00 c-d.hailfinger.devel.2005@gmx.net # [PATCH] pci/quirks.c: unhide SMBus device on Samsung P35 laptop # # this patch is needed to make the SMBus device on my Samsung P35 # laptop visible. By default, it doesn't appear as a pci device. # # Patch tested, works perfectly for me. Please apply. # # Signed-off-by: Carl-Daniel Hailfinger # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci_ids.h # 2005/02/16 14:48:09-08:00 c-d.hailfinger.devel.2005@gmx.net +2 -0 # pci/quirks.c: unhide SMBus device on Samsung P35 laptop # # drivers/pci/quirks.c # 2005/02/16 14:50:49-08:00 c-d.hailfinger.devel.2005@gmx.net +6 -0 # pci/quirks.c: unhide SMBus device on Samsung P35 laptop # # ChangeSet # 2005/02/17 15:06:16-08:00 ak@muc.de # [PATCH] PCI: allow x86_64 to do pci express # # On Mon, Feb 14, 2005 at 10:47:01AM +0100, Piotr Kaczuba wrote: # > On Mon, Feb 14, 2005 at 10:18:43AM +0100, Andi Kleen wrote: # > > Piotr Kaczuba writes: # > > > Is there a reason why "PCI access mode" config option isn't available for # > > > x86_64? Due to this, PCIE config options aren't available either. # > > # > > There is no 64bit PCI BIOS, so access is always direct. # > > # > > I assume you mean mmconfig access with "PCIE config options", that is # > > a separate config option and available. # > # > I mean the PCIEPORTBUS option which depends on PCI_GOMMCONFIG or # > PCI_GOANY. I assume that due to PCI_MMCONFIG / PCI_GOMMCONFIG mismatch # > it's not available on x86_64. # # Ok, that's a bug in PCIEPORTBUS. Best is probably to # completely remove the dependency, it doesn't make much sense # (the code has to handle the case of mmconfig not being available at # runtime anyways) # # Remove bogus dependency in PCI Express root driver. # # Signed-off-by: Andi Kleen # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pcie/Kconfig # 2005/02/14 03:59:46-08:00 ak@muc.de +0 -1 # PCI: allow x86_64 to do pci express # # ChangeSet # 2005/02/17 15:05:53-08:00 khali@linux-fr.org # [PATCH] PCI: Add PCI quirk for SMBus on the Toshiba Satellite A40 # # The Toshiba Satellite A40 laptop hides its SMBus device, much like a # number of Asus boards reputedly do. This prevents access to the LM90 # hardware monitoring chip. This simple patch extends the PCI quirk used # for the Asus and HP systems to this Toshiba laptop. # # Signed-off-by: Frans Pop # Signed-off-by: Jean Delvare # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/quirks.c # 2005/02/13 03:35:28-08:00 khali@linux-fr.org +6 -0 # PCI: Add PCI quirk for SMBus on the Toshiba Satellite A40 # # ChangeSet # 2005/02/17 15:05:32-08:00 dlsy@snoqualmie.dp.intel.com # [PATCH] PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers # # Here is a patch to fix a problem in OSHP calls in shpchp and pciehp # drivers that was detected in 2.6.11-rc3. In this kernel, calls to # acpi_evaluate_object() to evaluate OSHP returned AE_BUFFER_OVERFLOW # with the existing code. Earlier kernels didn't return this error # code. The correct fix should be making return_buffer pointer NULL # for no value is returned from this method. # # Signed-off-by: Dely Sy # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/shpchprm_acpi.c # 2005/02/08 14:04:19-08:00 dlsy@snoqualmie.dp.intel.com +1 -2 # PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers # # drivers/pci/hotplug/pciehprm_acpi.c # 2005/02/08 14:03:48-08:00 dlsy@snoqualmie.dp.intel.com +1 -2 # PCI Hotplug: Fix OSHP calls in shpchp and pciehp drivers # # ChangeSet # 2005/02/17 15:05:08-08:00 c.lucas@ifrance.com # [PATCH] drivers/pci/*: convert to pci_register_driver # # convert from pci_module_init to pci_register_driver # (from:http://kerneljanitors.org/TODO). # # Signed-off-by: Christophe Lucas # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pcie/portdrv_pci.c # 2005/02/07 00:41:08-08:00 c.lucas@ifrance.com +1 -1 # drivers/pci/*: convert to pci_register_driver # # ChangeSet # 2005/02/15 15:16:58-08:00 herbert@gondor.apana.org.au # [XFRM]: stale_bundle()'s test was reversed # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/02/15 15:16:04-08:00 herbert@gondor.apana.org.au +1 -1 # [XFRM]: stale_bundle()'s test was reversed # # ChangeSet # 2005/02/15 14:10:35-08:00 herbert@gondor.apana.org.au # [IPV6]: Make loopback idev stick around. # # Mirror the ipv4 change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/addrconf.c # 2005/02/15 14:10:14-08:00 herbert@gondor.apana.org.au +8 -2 # [IPV6]: Make loopback idev stick around. # # Mirror the ipv4 change. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 14:09:38-08:00 herbert@gondor.apana.org.au # [IPV4]: Make loopback idev stick around. # # As it is when loopback_dev loses all of its IPv4 addresses its # corresponding idev will be destroyed. Unfortunately as of last # August route.c relies on the loopback idev to kill references # to other idev objects. # # The end result is that when you do ip a f dev lo, unregistering # other devices will hang until those dst objects referring to # their idev objects die of natural causes. Of course this may # never happen if the processes holding those references get # dead-locked by invoking an operation that takes the RTNL. # # A simple solution is to make sure that loopback's idev sticks # around all the time. # # Incidentally this also fixes the setting of some flags on the # loopback idev object as currently the code that does it won't # be called if you add the addresses to lo after bring it up. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/devinet.c # 2005/02/15 14:09:16-08:00 herbert@gondor.apana.org.au +13 -4 # [IPV4]: Make loopback idev stick around. # # As it is when loopback_dev loses all of its IPv4 addresses its # corresponding idev will be destroyed. Unfortunately as of last # August route.c relies on the loopback idev to kill references # to other idev objects. # # The end result is that when you do ip a f dev lo, unregistering # other devices will hang until those dst objects referring to # their idev objects die of natural causes. Of course this may # never happen if the processes holding those references get # dead-locked by invoking an operation that takes the RTNL. # # A simple solution is to make sure that loopback's idev sticks # around all the time. # # Incidentally this also fixes the setting of some flags on the # loopback idev object as currently the code that does it won't # be called if you add the addresses to lo after bring it up. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 13:58:56-08:00 akpm@osdl.org # [IPVS]: Fix deadlock in update_defense_level() # # This function invokes si_meminfo() from timer context, # which doesn't work due to bdev_lock not being an IRQ # safe lock. # # So move it to keventd context. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # net/ipv4/ipvs/ip_vs_ctl.c # 2005/02/15 13:58:35-08:00 akpm@osdl.org +8 -11 # [IPVS]: Fix deadlock in update_defense_level() # # This function invokes si_meminfo() from timer context, # which doesn't work due to bdev_lock not being an IRQ # safe lock. # # So move it to keventd context. # # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 13:57:16-08:00 akpm@osdl.org # [WORKQUEUE]: Add cancel_rearming_delayed_work() # # From: Arjan van de Ven # # cancel_rearming_delayed_workqueue() is only used inside workqueue.c; make # this function static (the more useful wrapper around it later in that # function remains non-static and exported) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # kernel/workqueue.c # 2005/02/15 13:56:55-08:00 akpm@osdl.org +24 -0 # [WORKQUEUE]: Add cancel_rearming_delayed_work() # # From: Arjan van de Ven # # cancel_rearming_delayed_workqueue() is only used inside workqueue.c; make # this function static (the more useful wrapper around it later in that # function remains non-static and exported) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # include/linux/workqueue.h # 2005/02/15 13:56:55-08:00 akpm@osdl.org +1 -0 # [WORKQUEUE]: Add cancel_rearming_delayed_work() # # From: Arjan van de Ven # # cancel_rearming_delayed_workqueue() is only used inside workqueue.c; make # this function static (the more useful wrapper around it later in that # function remains non-static and exported) # # Signed-off-by: Arjan van de Ven # Signed-off-by: Andrew Morton # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/15 15:47:08-06:00 shaggy@austin.ibm.com # JFS: Fix array overflow # # On a system with more than 64 processors, commit_threads was too # big and caused an array overflow. Always limit it to MAX_COMMIT_THREADS. # # Also, avoid waking up more than one commit thread at a time. # # Signed-off-by: Dave Kleikamp # # fs/jfs/super.c # 2005/02/15 15:46:55-06:00 shaggy@austin.ibm.com +1 -1 # Prevent array overflow by limiting commit_threads to MAX_COMMIT_THREADS # # fs/jfs/jfs_txnmgr.c # 2005/02/15 15:46:55-06:00 shaggy@austin.ibm.com +7 -2 # Only wake up one commit thread at a time # # ChangeSet # 2005/02/15 13:46:51-08:00 herbert@gondor.apana.org.au # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # This patch merges __xfrm4_bundle_ok/__xfrm6_bundle_ok/stale_bundle # so that when I add MTU verification code I don't have to put it in # three places. # # It also moves the tests on dst->dev and dst->obsolete outside the # loop since the former is identical throughout the bundle and the # latter can only be positive on the final element which also happens # to be dst->path. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/xfrm/xfrm_policy.c # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +26 -12 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # net/ipv6/xfrm6_policy.c # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +1 -21 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # net/ipv4/xfrm4_policy.c # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +1 -21 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # include/net/xfrm.h # 2005/02/15 13:46:16-08:00 herbert@gondor.apana.org.au +1 -0 # [IPSEC]: Merge xfrm{4,6}_bundle_ok/stale_bundle # # ChangeSet # 2005/02/15 13:36:18-08:00 davem@nuts.davemloft.net # [TIMER]: Export avenrun for packet scheduler meta ematch. # # Signed-off-by: David S. Miller # # kernel/timer.c # 2005/02/15 13:35:45-08:00 davem@nuts.davemloft.net +2 -0 # [TIMER]: Export avenrun for packet scheduler meta ematch. # # ChangeSet # 2005/02/15 13:04:52-08:00 davem@nuts.davemloft.net # [ATM]: fore200e needs to be converted over to sk_atm(). # # Signed-off-by: David S. Miller # # drivers/atm/fore200e.c # 2005/02/15 13:04:20-08:00 davem@nuts.davemloft.net +6 -6 # [ATM]: fore200e needs to be converted over to sk_atm(). # # ChangeSet # 2005/02/15 12:21:22-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Basic classifier # # The basic classifier is the most simple classifier one can think of, # it doesn't do anything on its own but to support extended matches and # actions. A basic classifier returns true if no ematches or actions # are configured and thus can also be used as a catch-all classifier. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:20:47-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Basic classifier # # net/sched/Kconfig # 2005/02/15 12:20:47-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: Basic classifier # # include/linux/pkt_cls.h # 2005/02/15 12:20:47-08:00 davem@nuts.davemloft.net +14 -0 # [PKT_SCHED]: Basic classifier # # net/sched/cls_basic.c # 2005/02/15 12:20:45-08:00 davem@nuts.davemloft.net +303 -0 # [PKT_SCHED]: Basic classifier # # net/sched/cls_basic.c # 2005/02/15 12:20:45-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/cls_basic.c # # ChangeSet # 2005/02/15 12:20:03-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Metadata ematch (meta) # # The meta ematch allows comparing various metadata values against # static values from usersapce or other metadata values. It currently # supports various numeric meta values such as netfilter mark, packet # length, security level, interface indices, tc classid, load average, # a random value but also variable length values such as interface # names. Adding support for additional meta values is as easy as # writing a data collector (usually 1-5 lines of code) and assign it # to a id and type by putting it into the meta operations table. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:19:29-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Metadata ematch (meta) # # net/sched/Kconfig # 2005/02/15 12:19:29-08:00 davem@nuts.davemloft.net +11 -0 # [PKT_SCHED]: Metadata ematch (meta) # # include/linux/pkt_cls.h # 2005/02/15 12:19:29-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Metadata ematch (meta) # # net/sched/em_meta.c # 2005/02/15 12:19:25-08:00 davem@nuts.davemloft.net +661 -0 # [PKT_SCHED]: Metadata ematch (meta) # # net/sched/em_meta.c # 2005/02/15 12:19:25-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_meta.c # # include/linux/tc_ematch/tc_em_meta.h # 2005/02/15 12:19:24-08:00 davem@nuts.davemloft.net +69 -0 # [PKT_SCHED]: Metadata ematch (meta) # # include/linux/tc_ematch/tc_em_meta.h # 2005/02/15 12:19:24-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/include/linux/tc_ematch/tc_em_meta.h # # ChangeSet # 2005/02/15 12:18:11-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: u32 ematch # # The u32 ematch behaves exactly the same as a u32 match and will replace # it in the long term. It allows the underlying classifiers to give hints # about the position of the next protocol header (i.e. nexthdr+). # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: u32 ematch # # net/sched/Kconfig # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: u32 ematch # # include/net/pkt_cls.h # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +2 -0 # [PKT_SCHED]: u32 ematch # # include/linux/pkt_cls.h # 2005/02/15 12:17:28-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: u32 ematch # # net/sched/em_u32.c # 2005/02/15 12:17:19-08:00 davem@nuts.davemloft.net +63 -0 # [PKT_SCHED]: u32 ematch # # net/sched/em_u32.c # 2005/02/15 12:17:19-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_u32.c # # ChangeSet # 2005/02/15 12:16:10-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # The nbyte ematch allows comparing any number of bytes at an arbitary # offset based on one of the skb layers. Its main usage is intended # for IPv6 addresses but may be used for any kind of pattern. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/em_nbyte.c # 2005/02/15 12:15:35-08:00 davem@nuts.davemloft.net +82 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # net/sched/Makefile # 2005/02/15 12:15:36-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # net/sched/Kconfig # 2005/02/15 12:15:36-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # include/linux/pkt_cls.h # 2005/02/15 12:15:36-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # net/sched/em_nbyte.c # 2005/02/15 12:15:35-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_nbyte.c # # include/linux/tc_ematch/tc_em_nbyte.h # 2005/02/15 12:15:33-08:00 davem@nuts.davemloft.net +13 -0 # [PKT_SCHED]: Multi byte comparison ematch (nbyte) # # include/linux/tc_ematch/tc_em_nbyte.h # 2005/02/15 12:15:33-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/include/linux/tc_ematch/tc_em_nbyte.h # # ChangeSet # 2005/02/15 12:14:44-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Simple comparison ematch (cmp) # # The cmp ematch compares a static value provided by userspace against # a 8, 16, or 32bit chunk read from the packet. The reading offset is # provided by userspace and based on one of the skb layers (mac|nh|h). # The ematch provides functionality to transform the byte order of # the chunk and/or apply a mask and understands the operands eq, lt, # and gt. Basically, it is very similiar to the u32 (e)match but tries # filling the gaps left behind. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # net/sched/Kconfig # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +10 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # include/net/pkt_cls.h # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +20 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # include/linux/pkt_cls.h # 2005/02/15 12:13:58-08:00 davem@nuts.davemloft.net +8 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # net/sched/em_cmp.c # 2005/02/15 12:13:56-08:00 davem@nuts.davemloft.net +101 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # net/sched/em_cmp.c # 2005/02/15 12:13:56-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/em_cmp.c # # include/linux/tc_ematch/tc_em_cmp.h # 2005/02/15 12:13:55-08:00 davem@nuts.davemloft.net +26 -0 # [PKT_SCHED]: Simple comparison ematch (cmp) # # include/linux/tc_ematch/tc_em_cmp.h # 2005/02/15 12:13:55-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/include/linux/tc_ematch/tc_em_cmp.h # # ChangeSet # 2005/02/15 12:13:15-08:00 davem@nuts.davemloft.net # [PKT_SCHED]: Extended Matches API # # An extended match (ematch) is a small classifiction tool not worth # writing a full classifier for. Ematches can be interconnected to form # a logic expression and get attached to classifiers to extend their # functionatlity. # # The userspace part transforms the logic expressions into an array # consisting of multiple sequences of interconnected ematches separated # by markers. Precedence is implemented by a special ematch kind # referencing a sequence beyond the marker of the current sequence # causing the current position in the sequence to be pushed onto a stack # to allow the current position to be overwritten by the position # referenced in the special ematch. Matching continues in the new sequence # until a marker is reached causing the position to be restored from the # stack. # # Signed-off-by: Thomas Graf # Signed-off-by: David S. Miller # # net/sched/Makefile # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +1 -0 # [PKT_SCHED]: Extended Matches API # # net/sched/Kconfig # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +23 -0 # [PKT_SCHED]: Extended Matches API # # include/net/pkt_cls.h # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +170 -0 # [PKT_SCHED]: Extended Matches API # # include/linux/rtnetlink.h # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +5 -0 # [PKT_SCHED]: Extended Matches API # # include/linux/pkt_cls.h # 2005/02/15 12:12:37-08:00 davem@nuts.davemloft.net +72 -0 # [PKT_SCHED]: Extended Matches API # # net/sched/ematch.c # 2005/02/15 12:12:33-08:00 davem@nuts.davemloft.net +524 -0 # [PKT_SCHED]: Extended Matches API # # net/sched/ematch.c # 2005/02/15 12:12:33-08:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6.12/net/sched/ematch.c # # ChangeSet # 2005/02/15 11:54:41-08:00 davem@nuts.davemloft.net # Merge nuts.davemloft.net:/disk1/BK/network-2.6.12 # into nuts.davemloft.net:/disk1/BK/net-2.6.12 # # net/ipv4/route.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/core/sock.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/char/random.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/atm/iphase.c # 2005/02/15 11:54:29-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/13 12:50:34-05:00 nacc@us.ibm.com # [PATCH] net/s2io: replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to guarantee the task delays # as expected. This makes the code independent of HZ values (particularly # important when HZ changes or is dynamic). Compile- and boot-tested. # # Signed-off-by: Nishanth Aravamudan # Acked-by: Ravinandan Arakali # Signed-off-by: Jeff Garzik # # drivers/net/s2io.c # 2005/02/09 14:08:48-05:00 nacc@us.ibm.com +18 -35 # net/s2io: replace schedule_timeout() with msleep() # # ChangeSet # 2005/02/11 16:59:53-05:00 andi@cosy.sbg.ac.at # [PATCH] sundance: attempt to address high irqs due to TX overflow # # In at least some versions of Kernel 2.6 (2.6.8.1, 2.6.11-rc2) # the driver drivers/net/sundance.c creates high interrupt load # (~ 100 interrupts per second) even in case of no network traffic # at all. # # It seems that some sort of TX overflow handling is misplaced # and triggers interrupts very often even in case of no data to # send. The TX overflow handling has been moved to a more # appropriate place. # # While there, an off by one error of reading the TX status has # also been corrected by moving the read after the break. # # Thanks to Jeroen who tested the patch (also with high workload). # Interrupts are down to normal and there are no obvious side # effects. # # drivers/net/sundance.c # 2005/02/11 16:59:47-05:00 andi@cosy.sbg.ac.at +4 -3 # [PATCH] sundance: attempt to address high irqs due to TX overflow # # In at least some versions of Kernel 2.6 (2.6.8.1, 2.6.11-rc2) # the driver drivers/net/sundance.c creates high interrupt load # (~ 100 interrupts per second) even in case of no network traffic # at all. # # It seems that some sort of TX overflow handling is misplaced # and triggers interrupts very often even in case of no data to # send. The TX overflow handling has been moved to a more # appropriate place. # # While there, an off by one error of reading the TX status has # also been corrected by moving the read after the break. # # Thanks to Jeroen who tested the patch (also with high workload). # Interrupts are down to normal and there are no obvious side # effects. # # ChangeSet # 2005/02/11 16:55:06-05:00 fubar@us.ibm.com # [PATCH] bonding: Update/rewrite bonding.txt # # This is a complete overhaul of the bonding.txt documentation. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # Documentation/networking/bonding.txt # 2005/02/11 04:44:37-05:00 fubar@us.ibm.com +1367 -741 # bonding: Update/rewrite bonding.txt # # ChangeSet # 2005/02/11 16:54:54-05:00 fubar@us.ibm.com # [PATCH] bonding: Update kconfig description # # This patch updates the very-outdated Kconfig description for bonding. # Users reading the help text in menuconfig or xconfig would see text that # implied that bonding only supports static link aggregation, and required a # specific switch to make it work. The new description mentions multiple # bonding modes and points the user to the bonding.txt documentation. # # Signed-off-by: Mitch Williams # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # drivers/net/Kconfig # 2005/02/08 17:05:06-05:00 fubar@us.ibm.com +5 -8 # bonding: Update kconfig description # # ChangeSet # 2005/02/11 16:54:40-05:00 fubar@us.ibm.com # [PATCH] bonding: change misleading warning # # This updates a warning message that the bonding driver issues # when some modes are unable to determine the link speed of a slave # device. The old message led users to believe that bonding was slowing # their gigabit devices to 100 Mb/sec. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # drivers/net/bonding/bond_main.c # 2005/02/11 02:00:02-05:00 fubar@us.ibm.com +2 -2 # bonding: change misleading warning # # ChangeSet # 2005/02/11 16:54:28-05:00 fubar@us.ibm.com # [PATCH] : bonding: use wrappers to change mtu and MAC # # This updates the bonding driver to use the dev_set_mtu() and # dev_set_mac_address() wrapper functions. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # drivers/net/bonding/bond_main.c # 2005/02/11 01:20:08-05:00 fubar@us.ibm.com +11 -20 # : bonding: use wrappers to change mtu and MAC # # drivers/net/bonding/bond_alb.c # 2005/02/11 01:16:32-05:00 fubar@us.ibm.com +4 -4 # : bonding: use wrappers to change mtu and MAC # # ChangeSet # 2005/02/11 16:54:16-05:00 fubar@us.ibm.com # [PATCH] : net/core: move set MAC into separate function # # This moves the SIOCSIFHWADDR code from dev_ifsioc() into a # separate new function, dev_set_mac_address(). This provides a single # entry point for all callers performing MAC address changes. # # Signed-off-by: Jay Vosburgh # Signed-off-by: Jeff Garzik # # net/core/dev.c # 2005/02/11 00:54:32-05:00 fubar@us.ibm.com +17 -11 # : net/core: move set MAC into separate function # # include/linux/netdevice.h # 2005/02/11 00:54:25-05:00 fubar@us.ibm.com +2 -0 # : net/core: move set MAC into separate function # # ChangeSet # 2005/02/08 20:26:38-08:00 herbert@gondor.apana.org.au # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_tunnel.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/xfrm6_output.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ipcomp6.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/esp6.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv6/ah6.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_tunnel.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/xfrm4_output.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ipcomp.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/esp4.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # net/ipv4/ah4.c # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -3 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # include/net/xfrm.h # 2005/02/08 20:26:16-08:00 herbert@gondor.apana.org.au +1 -1 # [IPSEC]: Stop using dst->xfrm # # Here is a precursor to the xfrm dst consolidation that I talked about. # In order to be able to store multiple SAs in one dst, we need to stop # using dst->xfrm directly. # # The following patch does that for the ->output() functions. # # Signed-off-by: Herbert Xu # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/08 20:17:48-08:00 davem@nuts.davemloft.net # Resolve ATM conflicts. # # net/atm/svc.c # 2005/02/08 20:17:29-08:00 davem@nuts.davemloft.net +1 -1 # Resolve ATM conflicts. # # ChangeSet # 2005/02/08 20:13:46-08:00 davem@nuts.davemloft.net # Resolve ATM conflicts. # # net/netlink/af_netlink.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/key/af_key.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/atm/lec.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # net/atm/clip.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # include/linux/atalk.h # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/net/pppoe.c # 2005/02/08 20:09:15-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # drivers/atm/he.c # 2005/02/08 20:09:14-08:00 davem@nuts.davemloft.net +0 -0 # Auto merged # # ChangeSet # 2005/02/08 20:06:58-08:00 shemminger@osdl.org # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv6/tcp_ipv6.c # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +104 -23 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # net/ipv4/tcp_ipv4.c # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +1 -0 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # include/linux/random.h # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +2 -0 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # drivers/char/random.c # 2005/02/08 20:06:36-08:00 shemminger@osdl.org +15 -0 # [IPV6]: match TCP port selection behavior with ipv4 # # This patch makes TCP over IPV6 select ports the same way the current # TCPv4 code does. It uses a hash function to provide a starting offset # and a free running counter to provide seed. # # This changes the port selection semantics to match TCPv4 as well. # If the port is in use but to a different remote address, it will get # reused. It looks like the TCPv6 code was not updated when the TCPv4 # code changed. Now the code in ipv4/tcp_ipv4.c and ipv6/tcp_ipv6.c are # almost identical for tcp_hash_connect. # # Signed-off-by: Stephen Hemminger # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/08 20:02:47-08:00 kaber@trash.net # [NET]: Remove protocol specific hacks in skb_ip_make_writable() # # These cause more trouble than anything else. In fact these # silly checks keep the ipt action from working with targets # that mangle the data area. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # net/core/netfilter.c # 2005/02/08 20:02:09-08:00 kaber@trash.net +1 -33 # [NET]: Remove protocol specific hacks in skb_ip_make_writable() # # These cause more trouble than anything else. In fact these # silly checks keep the ipt action from working with targets # that mangle the data area. # # Signed-off-by: Patrick McHardy # Signed-off-by: David S. Miller # # ChangeSet # 2005/02/08 12:23:18-08:00 brking@us.ibm.com # [PATCH] PCI: Dynids - passing driver data # # Currently, code exists in the pci layer to allow userspace to specify # driver data when adding a pci dynamic id from sysfs. However, this data # is never used and there exists no way in the existing code to use it. # This patch allows device drivers to indicate that they want driver data # passed to them on dynamic id adds by initializing use_driver_data in their # pci_driver->pci_dynids struct. The documentation has also been updated # to reflect this. # # Signed-off-by: Brian King # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/pci-driver.c # 2005/02/07 13:58:21-08:00 brking@us.ibm.com +0 -1 # PCI: Dynids - passing driver data # # Documentation/pci.txt # 2005/02/07 13:58:21-08:00 brking@us.ibm.com +4 -4 # PCI: Dynids - passing driver data # # ChangeSet # 2005/02/08 12:22:53-08:00 Mark.Haigh@spirentcom.com # [PATCH] arch/i386/kernel/pci/irq.c: Wrong message output # # The following has been reported in the wild for kernel 2.6.8-24: # # PCI: Enabling device 0000:00:05.0 (0000 -> 0002) # PCI: No IRQ known for interrupt pin @ of device 0000:00:05.0. Probably # buggy MP table. # # It should read "No IRQ known for interrupt pin A", but the 'pin' # variable has already been decremented (from 1 to 0), so the line: # # printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device # %s.%s\n", 'A' + pin - 1, dev->slot_name, msg); # # causes "pin @" to be output, because 'A' + 0 - 1 == '@'. # # The supplied patch should fix it. It also removes a redundant check for # a nonzero pin. # # Signed-off-by: Mark F. Haigh # Signed-off-by: Greg Kroah-Hartman # # arch/i386/pci/irq.c # 2005/02/07 21:39:15-08:00 Mark.Haigh@spirentcom.com +36 -37 # arch/i386/kernel/pci/irq.c: Wrong message output # # ChangeSet # 2005/02/07 16:21:16-08:00 bjorn.helgaas@hp.com # [PATCH] PCI: pci_raw_ops should use unsigned args # # Convert pci_raw_ops to use unsigned segment (aka domain), # bus, and devfn. With the previous code, various ia64 config # accesses fail due to segment sign-extension problems. # # ia64: # - With a signed seg >= 0x8, unwanted sign-extension occurs when # "seg << 28" is cast to u64 in PCI_SAL_EXT_ADDRESS() # - PCI_SAL_EXT_ADDRESS(): cast to u64 *before* shifting; otherwise # "seg << 28" is evaluated as unsigned int (32 bits) and gets # truncated when seg > 0xf # - pci_sal_read(): validate "value" ptr as other arches do # - pci_sal_{read,write}(): return -EINVAL rather than SAL error status # # arch/i386/pci/direct.c | 12 ++++++---- # arch/i386/pci/mmconfig.c | 6 +++-- # arch/i386/pci/numa.c | 6 +++-- # arch/i386/pci/pcbios.c | 6 +++-- # arch/ia64/pci/pci.c | 53 ++++++++++++++++++--------------------------- # arch/x86_64/pci/mmconfig.c | 8 ++++-- # include/linux/pci.h | 6 +++-- # 7 files changed, 51 insertions(+), 46 deletions(-) # # Signed-off-by: Bjorn Helgaas # Acked-by: Matthew Wilcox # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2005/02/03 10:08:22-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/x86_64/pci/mmconfig.c # 2005/02/03 10:08:22-08:00 bjorn.helgaas@hp.com +5 -3 # PCI: pci_raw_ops should use unsigned args # # arch/ia64/pci/pci.c # 2005/02/03 10:08:22-08:00 bjorn.helgaas@hp.com +22 -31 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/pcbios.c # 2005/02/03 10:08:21-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/numa.c # 2005/02/03 10:55:05-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/mmconfig.c # 2005/02/03 10:08:21-08:00 bjorn.helgaas@hp.com +4 -2 # PCI: pci_raw_ops should use unsigned args # # arch/i386/pci/direct.c # 2005/02/03 10:08:21-08:00 bjorn.helgaas@hp.com +8 -4 # PCI: pci_raw_ops should use unsigned args # # ChangeSet # 2005/02/07 16:20:50-08:00 bjorn.helgaas@hp.com # [PATCH] PCI: NUMA-Q PCI config access arg validation # # Fix NUMA-Q PCI config access bus validation. "bus" indexes # into BUS2QUAD, which is mp_bus_id_to_node[MAX_MP_BUSSES]. # # This depends on the "pci_raw_ops should use unsigned args" # patch I posted earlier today (no functional dependency; it # just happens to be very close textually). # # Signed-off-by: Bjorn Helgaas # Signed-off-by: Martin J. Bligh # Signed-off-by: Greg Kroah-Hartman # # arch/i386/pci/numa.c # 2005/02/03 15:24:27-08:00 bjorn.helgaas@hp.com +2 -2 # PCI: NUMA-Q PCI config access arg validation # # ChangeSet # 2005/02/07 16:20:26-08:00 muneda.takahiro@jp.fujitsu.com # [PATCH] PCI: fix pci_remove_legacy_files() crash # # The legacy_io which is the member of pci_bus struct might be # NULL. It should be checked. # # This patch checks 'b->legacy_io', NULL or not. # # Signed-off-by: MUNEDA Takahiro # Acked-by: Jesse Barnes # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/probe.c # 2005/02/02 18:21:51-08:00 muneda.takahiro@jp.fujitsu.com +5 -3 # PCI: fix pci_remove_legacy_files() crash # # ChangeSet # 2005/02/07 14:38:32-08:00 matthew@wil.cx # [PATCH] PCI: Make pci_claim_resource __devinit # # ia64 calls pci_claim_resource() from pcibios_fixup_bus(), which is # __devinit, so pci_claim_resource() needs to be __devinit too. # # Signed-off-by: Matthew Wilcox # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/setup-res.c # 2005/02/07 12:51:58-08:00 matthew@wil.cx +1 -1 # PCI: Make pci_claim_resource __devinit # # ChangeSet # 2005/02/07 14:38:06-08:00 matthew@wil.cx # [PATCH] PCI: pci_proc_domain # # There's no need for the architectures to know how to name busses, # so replace pci_name_bus with pci_proc_domain -- a predicate to allow # architectures to choose whether domains are included in /proc/bus/pci # or not. I've converted all architectures but only tested ia64 and a # CONFIG_PCI_DOMAINS=n build. # # Signed-off-by: Matthew Wilcox # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +1 -2 # PCI: pci_proc_domain # # include/asm-sparc64/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +4 -1 # PCI: pci_proc_domain # # include/asm-ppc64/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -2 # PCI: pci_proc_domain # # include/asm-ppc/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +1 -2 # PCI: pci_proc_domain # # include/asm-mips/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -9 # PCI: pci_proc_domain # # include/asm-ia64/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -7 # PCI: pci_proc_domain # # include/asm-alpha/pci.h # 2005/02/07 12:52:02-08:00 matthew@wil.cx +2 -9 # PCI: pci_proc_domain # # drivers/pci/proc.c # 2005/02/07 12:52:02-08:00 matthew@wil.cx +13 -7 # PCI: pci_proc_domain # # arch/sparc64/kernel/pci.c # 2005/02/07 12:52:02-08:00 matthew@wil.cx +0 -6 # PCI: pci_proc_domain # # arch/ppc64/kernel/pci.c # 2005/02/07 12:52:02-08:00 matthew@wil.cx +6 -10 # PCI: pci_proc_domain # # ChangeSet # 2005/02/07 14:37:42-08:00 eike-hotplug@sf-tec.de # [PATCH] PCI Hotplug: Remove unneeded instructions from ibmphp_pci.c # # this patch removes some unneeded code from ibmphp_pci.c. First I thought it # is a bug and the second line should have been "sec_no = (int) sec_number". # But than I found exactly the same read only 9 lines higher and after it the # line I expected the second one to be. Between the 2 pci_bus_read_config_byte's # are only some checks so I don't expect them to return different results. And # sec_no is and int so removing this wont change anything at all. # # # Signed-off-by: Rolf Eike Beer # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/hotplug/ibmphp_pci.c # 2005/02/07 12:52:07-08:00 eike-hotplug@sf-tec.de +0 -3 # PCI Hotplug: Remove unneeded instructions from ibmphp_pci.c # # ChangeSet # 2005/02/07 14:37:01-08:00 davej@redhat.com # [PATCH] Remove pci_dev->slot_name # # This is a pointer to dev.bus_id, which is properly accessed through the # pci_name() function. # # Signed-off-by: Dave Jones # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2005/02/07 12:52:49-08:00 davej@redhat.com +0 -2 # Remove pci_dev->slot_name # # ChangeSet # 2005/02/07 14:36:14-08:00 davej@redhat.com # [PATCH] convert pci_dev->slot_name usage to pci_name() # # Prepare for removal of pci_dev->slot_name # # Signed-off-by: Dave Jones # Signed-off-by: Greg Kroah-Hartman # # drivers/scsi/qla2xxx/qla_os.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +7 -7 # convert pci_dev->slot_name usage to pci_name() # # drivers/pcmcia/yenta_socket.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/pci/setup-res.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/pci/probe.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +0 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/pci/pci.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/parisc/dino.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -3 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/wan/wanxl.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +16 -22 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/via-velocity.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/typhoon.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/tulip/tulip.h # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/sk98lin/skge.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/sk98lin/skethtool.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/s2io.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/r8169.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # drivers/net/defxx.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/media/video/zoran_driver.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/media/video/meye.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/media/common/saa7146_video.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/isdn/hisax/hisax_fcpcipnp.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/ide/pci/sgiioc4.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +3 -3 # convert pci_dev->slot_name usage to pci_name() # # drivers/char/agp/sis-agp.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # drivers/char/agp/generic.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/sh64/kernel/pcibios.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # arch/sh64/kernel/pci_sh5.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/sh/drivers/pci/pci-st40.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/sh/drivers/pci/pci-sh7751.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +4 -4 # convert pci_dev->slot_name usage to pci_name() # # arch/sh/drivers/pci/fixups-sh03.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # arch/ppc/kernel/pci.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +1 -1 # convert pci_dev->slot_name usage to pci_name() # # arch/mips/pmc-sierra/yosemite/ht.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +3 -3 # convert pci_dev->slot_name usage to pci_name() # # arch/frv/mb93090-mb00/pci-vdk.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +3 -3 # convert pci_dev->slot_name usage to pci_name() # # arch/frv/mb93090-mb00/pci-frv.c # 2005/02/07 12:52:54-08:00 davej@redhat.com +2 -2 # convert pci_dev->slot_name usage to pci_name() # # ChangeSet # 2005/02/07 12:20:33-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # MAINTAINERS # 2005/02/07 12:20:26-05:00 scjody@modernduck.com +0 -0 # Auto merged # # BitKeeper/etc/ignore # 2005/02/07 12:19:58-05:00 scjody@modernduck.com +10 -10 # auto-union # # ChangeSet # 2005/02/05 23:12:30-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/libata-dev/remove-one-fix # # drivers/scsi/libata-core.c # 2005/02/05 23:12:26-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/02/05 23:08:09-05:00 adam@yggdrasil.com # [PATCH] ata_pci_remove_one used freed memory # # Attempting to unload a serial ATA driver module gave me a kernel # memory fault. I think this problem occurs in all configurations, but # I should mention that my configuration may be slightly unusual in that # I configured my BIOS not to do IDE emulation with SATA disks, and I don't # actually have any disks plugged in. # # The problem was that ata_pci_remove_one would call # scsi_host_put(ap->host), which would free the memory used to hold # host_set->ports, but host_set->ports was used later in ata_pci_remove_one. # # So, the following patch reorders some of the steps in # ata_pci_remove_one and seems to eliminate the problem, at least to # the extent that I can unload and reload the module, although I do not # have a SATA disk handy for testing (I'm expecting one to arrive later # today). # # The patch actually makes the code four lines shorter, although # two of those lines come from putting an assignement and variable # declaration in the same line. Since the patch is a little hard to # read, here is a description of the edit steps. # # 1. Moved pci_release_regions() to toward the end of the routine # to facilitate merging the loops before and after it. Also, I think that # calls that are good candidates for consolidating into the bus-level code # in the future (instead of individual drivers) are best put at the beginning # or end of the driver routines so that it is clearer if there would be # problems doing such consolidation. # # 2. Moved the cacluation of ioaddr into the only if-branch that # uses it. # # 3. Moved the call to scsi_host_put to after the code that # checks ATA_FLAG_NO_LEGACY. # # Signed-off-by: Jeff Garzik # # drivers/scsi/libata-core.c # 2004/12/24 21:15:45-05:00 adam@yggdrasil.com +6 -10 # ata_pci_remove_one used freed memory # # ChangeSet # 2005/02/04 14:49:20-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # MAINTAINERS # 2005/02/04 14:49:13-05:00 scjody@modernduck.com +0 -0 # Auto merged # # ChangeSet # 2005/02/03 14:17:57-05:00 scjody@modernduck.com # Re-added Ben Collins to 1394. # # Signed-off-by: Jody McIntyre # # MAINTAINERS # 2005/02/03 14:17:34-05:00 scjody@modernduck.com +6 -0 # Re-added Ben Collins to 1394. # # ChangeSet # 2005/02/03 13:32:52-05:00 scjody@modernduck.com # Merge modernduck.com:/usr/src/bk/linux-2.5 # into modernduck.com:/usr/src/bk/1394-2.6 # # MAINTAINERS # 2005/02/03 13:32:44-05:00 scjody@modernduck.com +0 -0 # Auto merged # # ChangeSet # 2005/02/02 16:50:23-08:00 lkml@einar-lueck.de # [IPV4]: Splitting of ip_route_{in,out}put_slow(). # # From: Einar Lueck # # This patch splits up ip_route_[in|out]put_slow in inlined functions. # Basic idea: # * improve overall comprehensibility # * allow for an easier application of patch for improved multipath # support # # Signed-off-by: David S. Miller # # net/ipv4/route.c # 2005/02/02 16:49:29-08:00 lkml@einar-lueck.de +332 -207 # [IPV4]: Splitting of ip_route_{in,out}put_slow(). # # BitKeeper/etc/ignore # 2005/02/02 14:11:07-05:00 scjody@modernduck.com +3 -0 # added patches/pcilynx-stack-reduction.patch patches/select-net.patch patches/series # # ChangeSet # 2005/02/02 13:33:22-05:00 scjody@modernduck.com # 1394 uses skbs, so select NET. # # drivers/ieee1394/Kconfig # 2005/02/02 13:32:57-05:00 scjody@modernduck.com +1 -0 # 1394 uses skbs, so select NET. # # ChangeSet # 2005/02/02 00:37:41-05:00 akpm@osdl.org # [PATCH] use datacs in smc91x driver # # From: Ian Campbell # # Below is a patch to support the second 32-bit DATACS chipselect in the # smc91x driver to transfer data. Support is enabled by adding a resource to # the platform device named 'smc91x-data32'. # # My platform has a 16-bit chip select for the primary IO region and no DMA. # I found that throughput went from roughly 50mbit/s to 80mbit/s. I tested # by throwing UDP packets at it using mgen (9000 packets/second with UDP # payload of 1472 bytes is roughly 100mbit/s, I think) and counting the # packets received in 60s, I then did the same for transmitting. The # measurements are very rough but the improvement seems fairly significant to # me. # # Patch was compiled for lubbock and neponset and compiled and tested on my # PXA platform. # # Signed-off-by: Ian Campbell # Signed-off-by: Nicolas Pitre # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.h # 2005/01/28 22:36:52-05:00 akpm@osdl.org +52 -7 # use datacs in smc91x driver # # drivers/net/smc91x.c # 2005/01/28 22:36:52-05:00 akpm@osdl.org +108 -42 # use datacs in smc91x driver # # arch/arm/mach-sa1100/neponset.c # 2005/01/28 22:36:52-05:00 akpm@osdl.org +2 -0 # use datacs in smc91x driver # # arch/arm/mach-pxa/lubbock.c # 2005/01/28 22:36:52-05:00 akpm@osdl.org +2 -0 # use datacs in smc91x driver # # ChangeSet # 2005/02/02 00:37:29-05:00 nico@cam.org # [PATCH] smc91x: allow RX of VLAN packets # # This patch allows for VLAN packets to be received. The initial patch # was from Andrew de Quincey. # # While there, it also adds a test against an impossible hardware state # in theory but that happened in practice where the chip returns a # packet length of 0 which, once the status words have been substracted, # causes the transfer of data with a negative length. Flaky hardware is # probably to blame here but better guard ourselves against that than # crashing the kernel. David Brownell was the happy victim of such hw. # # Signed-off-by: Nicolas Pitre # Signed-off-by: Jeff Garzik # # drivers/net/smc91x.c # 2005/01/27 22:16:44-05:00 nico@cam.org +14 -2 # smc91x: allow RX of VLAN packets # # ChangeSet # 2005/02/01 17:05:14-05:00 scjody@modernduck.com # pcilynx.c: # pcilynx: reduce stack usage in add_card(), # from 800 to 308 bytes (on i386), by dynamically allocating # struct i2c_adapter i2c_adapter; /* 492 bytes */ # # Signed-off-by: Randy Dunlap # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/02/01 17:03:20-05:00 scjody@modernduck.com +18 -11 # pcilynx: reduce stack usage in add_card(), # from 800 to 308 bytes (on i386), by dynamically allocating # struct i2c_adapter i2c_adapter; /* 492 bytes */ # # ChangeSet # 2005/01/31 16:19:48-05:00 scjody@modernduck.com # Update ieee1394 maintainers. # # Signed-off-by: Jody McIntyre # # MAINTAINERS # 2005/01/31 16:19:25-05:00 scjody@modernduck.com +18 -8 # Update ieee1394 maintainers. # # ChangeSet # 2005/01/31 16:02:58-05:00 scjody@modernduck.com # Fix PCILynx bus resets. # # Signed-off-by: Ben Collins # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/01/31 16:02:35-05:00 scjody@modernduck.com +2 -2 # Fix PCILynx bus resets. # # ChangeSet # 2005/01/31 15:51:07-05:00 scjody@modernduck.com # Dan Dennedy: change allocation to GPF_ATOMIC to fix timing issue when this # is called from raw1394.c:arm_register(). # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/highlevel.c # 2005/01/31 15:50:32-05:00 scjody@modernduck.com +1 -1 # Dan Dennedy: change allocation to GPF_ATOMIC to fix timing issue when this # is called from raw1394.c:arm_register(). # # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/01/31 15:50:09-05:00 scjody@modernduck.com # Fix whitespace/indenting to match SVN. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/31 15:49:38-05:00 scjody@modernduck.com +2 -2 # Fix whitespace/indenting to match SVN. # # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/01/31 15:47:36-05:00 scjody@modernduck.com # Fix revisions to match svn # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/01/31 15:46:02-05:00 scjody@modernduck.com +1 -1 # Fix revisions to match svn # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/31 15:46:02-05:00 scjody@modernduck.com +2 -2 # Fix revisions to match svn # Signed-off-by: Jody McIntyre # # ChangeSet # 2005/01/31 01:16:24-05:00 scjody@modernduck.com # Dan Dennedy: # # reorganise LUN handling to resolve oops # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:15:47-05:00 scjody@modernduck.com +2 -5 # # ChangeSet # 2005/01/31 01:15:11-05:00 scjody@modernduck.com # # Adds a disable_irm option to ieee1394.ko which disables all Isochronous # Resource Manager functionality, useful to work around certain problems, # e.g. iPod detection. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/pcilynx.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +23 -16 # # drivers/ieee1394/ohci1394.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +8 -4 # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +2 -1 # # drivers/ieee1394/ieee1394_core.h # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +1 -0 # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +17 -1 # # drivers/ieee1394/ieee1394.h # 2005/01/31 01:14:29-05:00 scjody@modernduck.com +24 -0 # # ChangeSet # 2005/01/31 01:13:34-05:00 scjody@modernduck.com # Dan Dennedy: # # bugfix for logical unit directory lun number # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/01/31 01:12:53-05:00 scjody@modernduck.com +4 -1 # # ChangeSet # 2005/01/31 01:10:23-05:00 scjody@modernduck.com # # Bugfix for Logical Unit Number in unit directory -- popular with multi-bay # enclosures -- while not breaking Logical Unit Directory. # # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/01/31 01:09:18-05:00 scjody@modernduck.com +2 -2 # # drivers/ieee1394/nodemgr.h # 2005/01/31 01:09:18-05:00 scjody@modernduck.com +2 -0 # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:09:17-05:00 scjody@modernduck.com +20 -5 # # ChangeSet # 2005/01/31 01:08:05-05:00 scjody@modernduck.com # # Fixed removal of old partial datagrams. Since max_partial_datagrams can # be changed at runtime, there may be _more_ than max_partial_datagrams # in the list. Also removed obsolote comment. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/31 01:07:26-05:00 scjody@modernduck.com +2 -3 # # ChangeSet # 2005/01/31 01:06:59-05:00 scjody@modernduck.com # # dma.c vfree() checking cleanups. # # Signed-off by: James Lamanna # Signed-off-by: Domen Puncer # Signed-off-by: Jody McIntyre # # drivers/ieee1394/dma.c # 2005/01/31 01:06:22-05:00 scjody@modernduck.com +5 -9 # # ChangeSet # 2005/01/31 01:05:55-05:00 scjody@modernduck.com # # Sets the sendtime of a packet _before_ adding it to pending_packet_queue, # to prevent premature expiry (which leads to "unsolicited response packet" # errors, among other things). # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 01:05:18-05:00 scjody@modernduck.com +1 -0 # # ChangeSet # 2005/01/31 01:04:34-05:00 scjody@modernduck.com # # We need to update the old csr1212 cache's bus generation after a bus # reset once we decide it is still valid. # Closes a vmalloc leak on *every* bus reset. # # Signed-off-by: Jim Radford # Signed-off-by: Jody McIntyre # # drivers/ieee1394/nodemgr.c # 2005/01/31 01:03:52-05:00 scjody@modernduck.com +7 -0 # # ChangeSet # 2005/01/31 01:03:20-05:00 scjody@modernduck.com # # This closes a small vmalloc leak on insmod/rmmod. # # Signed-off-by: Jim Radford # Signed-off-by: Jody McIntyre # # drivers/ieee1394/config_roms.c # 2005/01/31 01:02:41-05:00 scjody@modernduck.com +1 -1 # # ChangeSet # 2005/01/31 01:00:27-05:00 scjody@modernduck.com # # Dan Dennedy: # # Ignore any return value from devfs since it is non-critical, and a # EEXIST return prevents the module from loading! # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/31 00:59:32-05:00 scjody@modernduck.com +1 -4 # # ChangeSet # 2005/01/31 00:58:01-05:00 scjody@modernduck.com # # Move simple class to ieee1394 core and register as # /sys/class/ieee1394_protocol. # Add sysfs/udev support to video1394 and dv1394 using simple class # ieee1394_protocol. # # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/31 00:57:19-05:00 scjody@modernduck.com +8 -2 # # drivers/ieee1394/raw1394.c # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +16 -25 # # drivers/ieee1394/ieee1394_core.h # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +1 -0 # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +13 -3 # # drivers/ieee1394/dv1394.c # 2005/01/31 00:57:18-05:00 scjody@modernduck.com +5 -0 # # ChangeSet # 2005/01/31 00:56:15-05:00 scjody@modernduck.com # Cleanup with Lindent. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/31 00:51:42-05:00 scjody@modernduck.com +1525 -1538 # # ChangeSet # 2005/01/31 00:49:36-05:00 scjody@modernduck.com # Some Lindent cleanup (most removed to its own patch by scjody) # Adds basic sysfs support for udev etc. # # Signed-off-by: Daniel Drake # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/31 00:47:36-05:00 scjody@modernduck.com +531 -335 # # ChangeSet # 2005/01/31 00:34:02-05:00 scjody@modernduck.com # # Change some variables and functions that were needlessly global static. # Removes several functions that weren't used anywhere in the kernel. # Removes many unnecessary EXPORT_SYMBOL's. # # Signed-off-by: Adrian Bunk # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +5 -5 # # drivers/ieee1394/sbp2.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +2 -2 # # drivers/ieee1394/nodemgr.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +2 -45 # # drivers/ieee1394/ieee1394_transactions.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +0 -28 # # drivers/ieee1394/ieee1394_core.h # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +0 -1 # # drivers/ieee1394/ieee1394_core.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +3 -27 # # drivers/ieee1394/highlevel.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +0 -32 # # drivers/ieee1394/dv1394.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +1 -1 # # drivers/ieee1394/amdtp.c # 2005/01/31 00:33:22-05:00 scjody@modernduck.com +8 -8 # # ChangeSet # 2005/01/31 00:32:16-05:00 scjody@modernduck.com # # Fixes a bug in the channel reservation : # If dma resources allocation fails, the channel was not freed. I fixed # that by marking the channel allocated after the dma resources allocation # succeeded. Also changed the error return value from ioctl. # # Signed-off-by: Philippe De Muyter # Signed-off-by: Dan Dennedy # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/31 00:31:38-05:00 scjody@modernduck.com +55 -37 # # ChangeSet # 2005/01/30 23:28:23-05:00 scjody@modernduck.com # Damien Douxchamps: # # I have tested and updated a patch from Randy Dunlap that fixes missing # entries in the modules.ieee1394map file. The patch is against latest SVN # (1234). # # The patch adds the following entries for IIDC cameras that would not be # detected otherwise: # # video1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000101 # video1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000102 # raw1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000101 # raw1394 0x0000000c 0x000000 0x000000 0x00a02d 0x000102 # # This is necessary because the IIDC consortium interpreted the 1394 # specifications differently. They have been summoned by the 1394TA to # change their numbering policy so that these entries are final and will # not grow forever in number. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/video1394.c # 2005/01/30 23:27:16-05:00 scjody@modernduck.com +10 -0 # # drivers/ieee1394/raw1394.c # 2005/01/30 23:27:07-05:00 scjody@modernduck.com +10 -0 # # ChangeSet # 2005/01/30 23:24:06-05:00 scjody@modernduck.com # From Stefan Richter: # # In trunk/ohci1394.c, duplicate code has slipped in which sets # max_packet_size to 512 and prints a log notice. See "Serial EEPROM # Sanity check" further down in ohci_initialize(). Since the latter code # is more appropriate, the former is deleted by the attached patch. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/01/30 23:20:38-05:00 scjody@modernduck.com +0 -6 # # ChangeSet # 2005/01/30 23:00:14-05:00 scjody@modernduck.com # This patch makes sure we check the return value of copy_to_user() in # drivers/ieee1394/raw1394.c::raw1394_read() with the added bonus of # silencing this warning: # include/asm/uaccess.h: In function `raw1394_read': # drivers/ieee1394/raw1394.c:446: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result # # I've submitted this before, but never got an ACK or NACK, and the patch is # still relevant against latest Linus bk (2.6.10-rc2-bk11 atm). # # # Signed-off-by: Jesper Juhl # Signed-off-by: Jody McIntyre # # drivers/ieee1394/raw1394.c # 2005/01/30 22:58:41-05:00 scjody@modernduck.com +8 -2 # # ChangeSet # 2005/01/30 22:30:46-05:00 scjody@modernduck.com # Olaf Hering: Fix sw-suspend issue # # sw-suspend does not work with our kernel. # khpsbpkt will die because down_interruptible returns -EINTR on suspend. # As a result, hpsb packet delivery will not work anymore after resume. # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ieee1394_core.c # 2005/01/30 22:28:36-05:00 scjody@modernduck.com +10 -6 # # ChangeSet # 2005/01/30 22:11:26-05:00 scjody@modernduck.com # Christoph Hellwig: avoid obsolete scsi APIs in sbp2 # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.h # 2005/01/30 22:10:07-05:00 scjody@modernduck.com +9 -7 # # drivers/ieee1394/sbp2.c # 2005/01/30 22:10:07-05:00 scjody@modernduck.com +36 -33 # # ChangeSet # 2005/01/29 15:28:42-05:00 scjody@modernduck.com # fix nodemgr parsing subdirectories in unit directory and tiny bugfix in # sbp2 unit directory parsing (for PowerFile) # # Signed-off-by: Jody McIntyre # # drivers/ieee1394/sbp2.c # 2005/01/29 15:28:18-05:00 scjody@modernduck.com +1 -1 # # drivers/ieee1394/nodemgr.c # 2005/01/29 15:28:18-05:00 scjody@modernduck.com +59 -48 # # ChangeSet # 2005/01/29 15:27:50-05:00 scjody@modernduck.com # # Fix GCC 3.4 compile error with inline keyword in function prototype. # # Signed-off-by: Adrian Bunk # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/eth1394.c # 2005/01/29 15:27:27-05:00 scjody@modernduck.com +2 -2 # # ChangeSet # 2005/01/29 15:25:53-05:00 scjody@modernduck.com # # Use wmb() to make sure things get flushed before setting the wakup bit. # # Signed-off-by: Ben Collins # Submitted-by: Keith Bengston # Signed-off-by: Jody McIntyre # # drivers/ieee1394/ohci1394.c # 2005/01/29 15:25:30-05:00 scjody@modernduck.com +4 -0 # # ChangeSet # 2005/01/29 15:24:28-05:00 scjody@modernduck.com # # Fix buffer overflow in csr1212.c. # # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/csr1212.c # 2005/01/29 15:24:05-05:00 scjody@modernduck.com +5 -2 # # ChangeSet # 2005/01/29 15:21:50-05:00 scjody@modernduck.com # # Fix bug where 4 times Extended ROM Leaf size would be read when parsing in csr1212. Added NULL check for csr1212_rom_cache_malloc return value. # # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/csr1212.c # 2005/01/29 15:21:26-05:00 scjody@modernduck.com +7 -5 # # ChangeSet # 2005/01/29 15:16:50-05:00 scjody@modernduck.com # # Fix bugs generating and parsing ConfigROMs with Extended ROM entries. # # Signed-off-by: Steve Kinneberg # Signed-off-by: Jody McIntyre # # drivers/ieee1394/csr1212.c # 2005/01/29 15:16:02-05:00 scjody@modernduck.com +75 -44 # # ChangeSet # 2005/01/28 00:16:10-05:00 ralf@linux-mips.org # [PATCH] SGI Seeq updates # # o Support for setting the MAC address # o Make some sort of attempt at dealing with multicast in order to support # IPv6 etc. The Seeq 8003 was built in the assumption nobody was ever going # to need multicast, it seems. # # Signed-off-by: Jeff Garzik # # drivers/net/sgiseeq.c # 2005/01/27 21:11:40-05:00 ralf@linux-mips.org +52 -18 # SGI Seeq updates # # ChangeSet # 2005/01/28 00:15:58-05:00 ralf@linux-mips.org # [PATCH] SB1250 driver updates # # o Fix initialization of internal sbmac eth1 # o Clean up comments # o Add in new module parameter handling # o Fix printing of device name before register_netdevice # # Signed-off-by: Jeff Garzik # # drivers/net/sb1250-mac.c # 2005/01/27 21:08:04-05:00 ralf@linux-mips.org +58 -51 # SB1250 driver updates # # ChangeSet # 2005/01/28 00:15:46-05:00 ralf@linux-mips.org # [PATCH] S2IO syntax fixes # # Syntactic nitpicking - C wants a space between the "include" and "<" just # gcc happens to be tollerant. # # Signed-off-by: Jeff Garzik # # drivers/net/s2io.c # 2005/01/27 21:05:03-05:00 ralf@linux-mips.org +23 -22 # S2IO syntax fixes # # ChangeSet # 2005/01/28 00:15:32-05:00 ralf@linux-mips.org # [PATCH] Meth driver updates # # General driver updates, now approaching reliability of some definition. # # Signed-off-by: Jeff Garzik # # drivers/net/meth.h # 2005/01/27 21:03:34-05:00 ralf@linux-mips.org +1 -1 # Meth driver updates # # drivers/net/meth.c # 2005/01/27 21:03:34-05:00 ralf@linux-mips.org +143 -132 # Meth driver updates # # ChangeSet # 2005/01/28 00:12:42-05:00 ralf@linux-mips.org # [PATCH] Marvell MV-64340 driver upda # # o Momentum Ocelot 3 also features a MV-64340 # o Momentum Jaguar ATX does not need the special casing in the driver. # # Signed-off-by: Jeff Garzik # # drivers/net/mv643xx_eth.c # 2005/01/27 21:01:51-05:00 ralf@linux-mips.org +0 -2 # Marvell MV-64340 driver upda # # drivers/net/Kconfig # 2005/01/27 21:01:51-05:00 ralf@linux-mips.org +1 -1 # Marvell MV-64340 driver upda # # ChangeSet # 2005/01/28 00:12:28-05:00 ralf@linux-mips.org # [PATCH] Jazzsonic driver updates # # o Resurrect the Jazz SONIC driver after years of it not having been tested # o Convert from Space.c initialization to module_init / platform device. # # Signed-off-by: Jeff Garzik # # drivers/net/sonic.c # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +2 -2 # Jazzsonic driver updates # # drivers/net/jazzsonic.c # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +146 -71 # Jazzsonic driver updates # # drivers/net/Space.c # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +0 -8 # Jazzsonic driver updates # # drivers/net/Kconfig # 2005/01/27 20:59:23-05:00 ralf@linux-mips.org +1 -1 # Jazzsonic driver updates # # ChangeSet # 2005/01/28 00:12:15-05:00 ralf@linux-mips.org # [PATCH] IOC3 driver updates # # o Fix build if CONFIG_SERIAL_8250 is disabled. # o Add support for setting the MAC address via ifconfig # o Generally try to pretend we're a better PCI citizen than the broken piece # of silicon that the IOC3 is actually is. # # Signed-off-by: Jeff Garzik # # drivers/net/ioc3-eth.c # 2005/01/27 20:55:14-05:00 ralf@linux-mips.org +71 -11 # IOC3 driver updates # # drivers/net/Kconfig # 2005/01/27 20:55:14-05:00 ralf@linux-mips.org +1 -1 # IOC3 driver updates # # ChangeSet # 2005/01/28 00:09:27-05:00 ralf@linux-mips.org # [PATCH] Remove Baget network driver # # Remove the support for Baget, a Russian embedded system suffering from # bitrot for way too long. # # Signed-off-by: Jeff Garzik # # drivers/net/Space.c # 2005/01/27 20:47:03-05:00 ralf@linux-mips.org +0 -3 # Remove Baget network driver # # drivers/net/Makefile # 2005/01/27 20:47:03-05:00 ralf@linux-mips.org +0 -1 # Remove Baget network driver # # drivers/net/Kconfig # 2005/01/27 20:47:03-05:00 ralf@linux-mips.org +0 -8 # Remove Baget network driver # # BitKeeper/deleted/.del-bagetlance.c~e863fc0ebec8bb67 # 2005/01/28 00:09:20-05:00 ralf@linux-mips.org +0 -0 # Delete: drivers/net/bagetlance.c # # ChangeSet # 2005/01/28 00:09:14-05:00 ralf@linux-mips.org # [PATCH] Au1000 driver updates # # o mii-tool support # o MAC address memcpy fix # o VLAN support # # Signed-off-by: Jeff Garzik # # drivers/net/au1000_eth.h # 2005/01/27 20:46:47-05:00 ralf@linux-mips.org +32 -23 # Au1000 driver updates # # drivers/net/au1000_eth.c # 2005/01/27 20:46:47-05:00 ralf@linux-mips.org +1114 -247 # Au1000 driver updates # # ChangeSet # 2005/01/27 17:18:18-05:00 dhollis@davehollis.com # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # include/linux/mii.h # 2005/01/27 17:18:11-05:00 dhollis@davehollis.com +4 -0 # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # drivers/net/tg3.h # 2005/01/27 17:18:11-05:00 dhollis@davehollis.com +0 -14 # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # drivers/net/b44.h # 2005/01/27 17:18:11-05:00 dhollis@davehollis.com +0 -14 # Move MII-related constants from b44/tg3 drivers to linux/mii.h. # # ChangeSet # 2005/01/27 16:58:32-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] ibmlana part 2 (iomem annotations and isa-ectomy) # # the usual switch to ioremap and normal iomem access primitives # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/ibmlana.h # 2004/12/27 21:29:49-05:00 viro@parcelfarce.linux.theplanet.co.uk +1 -0 # ibmlana part 2 (iomem annotations and isa-ectomy) # # drivers/net/ibmlana.c # 2004/12/27 21:29:49-05:00 viro@parcelfarce.linux.theplanet.co.uk +38 -30 # ibmlana part 2 (iomem annotations and isa-ectomy) # # ChangeSet # 2005/01/27 16:58:20-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] ibmlana part 1 (netdev_priv()) # # switched to netdev_priv() # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/ibmlana.c # 2004/12/27 01:04:19-05:00 viro@parcelfarce.linux.theplanet.co.uk +14 -17 # ibmlana part 1 (netdev_priv()) # # ChangeSet # 2005/01/27 16:55:13-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sk_mca - iomem and isa-ectomy # # usual isa-ectomy and iomem annotations # # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/sk_mca.h # 2005/01/19 18:58:13-05:00 viro@parcelfarce.linux.theplanet.co.uk +5 -14 # sk_mca - iomem and isa-ectomy # # drivers/net/sk_mca.c # 2005/01/19 18:58:13-05:00 viro@parcelfarce.linux.theplanet.co.uk +50 -46 # sk_mca - iomem and isa-ectomy # # ChangeSet # 2005/01/27 16:54:59-05:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] sk_mca - netdev_priv() # # Signed-off-by: Al Viro # Signed-off-by: Jeff Garzik # # drivers/net/sk_mca.c # 2005/01/19 18:58:13-05:00 viro@parcelfarce.linux.theplanet.co.uk +14 -16 # sk_mca - netdev_priv() # # ChangeSet # 2005/01/27 15:55:00-05:00 brazilnut@us.ibm.com # [PATCH] pcnet32: 79c976 with fiber optic fix # # After testing this patch I agree that it should be applied. The one # change I made was to print the device name (ethN) instead of 'pcnet32'. # Tested ia32. # # From: Guido Guenther , # Lars Munch # # Skip PHY selection on Allied Telesyn 2701FX, it looses the link otherwise. # Fix up the AT 2700FX as well. # # Signed-Off-By: Guido Guenther # Signed-off-by: Andrew Morton # signed-off-by: Don Fry # Signed-off-by: Jeff Garzik # # include/linux/pci_ids.h # 2005/01/05 00:57:36-05:00 brazilnut@us.ibm.com +5 -0 # pcnet32: 79c976 with fiber optic fix # # drivers/net/pcnet32.c # 2005/01/05 00:57:36-05:00 brazilnut@us.ibm.com +29 -18 # pcnet32: 79c976 with fiber optic fix # # ChangeSet # 2005/01/24 09:09:37-06:00 shaggy@austin.ibm.com # Merge jfs@jfs.bkbits.net:linux-2.5 # into austin.ibm.com:/home/shaggy/bk/jfs-2.5 # # fs/jfs/jfs_txnmgr.c # 2005/01/24 09:09:26-06:00 shaggy@austin.ibm.com +0 -0 # Auto merged # # fs/jfs/jfs_metapage.c # 2005/01/24 09:09:26-06:00 shaggy@austin.ibm.com +0 -0 # Auto merged # # fs/jfs/jfs_logmgr.c # 2005/01/24 09:09:26-06:00 shaggy@austin.ibm.com +0 -0 # Auto merged # # ChangeSet # 2005/01/21 00:17:51-02:00 acme@toy.ghostprotocols.net # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/sched/sch_atm.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/svc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +37 -34 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/signaling.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +22 -19 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/raw.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +9 -5 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/proc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +9 -9 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/pppoatm.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +2 -1 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/mpc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +18 -10 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/lec.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +23 -15 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/ioctl.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +5 -4 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/common.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +24 -31 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/clip.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +11 -8 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/br2684.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +2 -2 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/atm/atm_misc.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +4 -3 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/atmdev.h # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +20 -8 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/iphase.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +7 -5 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/idt77252.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +5 -4 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/he.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/atm/atmtcp.c # 2005/01/21 00:17:39-02:00 acme@toy.ghostprotocols.net +7 -7 # [ATM] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/21 00:16:19-02:00 acme@toy.ghostprotocols.net # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/if_pppox.h # 2005/01/21 00:16:04-02:00 acme@toy.ghostprotocols.net +15 -4 # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/pppox.c # 2005/01/21 00:16:04-02:00 acme@toy.ghostprotocols.net +1 -1 # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # drivers/net/pppoe.c # 2005/01/21 00:16:04-02:00 acme@toy.ghostprotocols.net +39 -62 # [PPPOX] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 21:21:48-02:00 acme@toy.ghostprotocols.net # [IRDA] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/irda/af_irda.c # 2005/01/20 21:21:35-02:00 acme@toy.ghostprotocols.net +14 -24 # [IRDA] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/irda/af_irda.h # 2005/01/20 21:21:35-02:00 acme@toy.ghostprotocols.net +7 -2 # [IRDA] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 21:17:52-02:00 acme@toy.ghostprotocols.net # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_sap.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_proc.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +4 -4 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_if.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +2 -2 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_conn.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +18 -32 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_c_ev.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +1 -1 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/llc_c_ac.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +46 -46 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/llc/af_llc.c # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +11 -11 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/llc_conn.h # 2005/01/20 21:17:39-02:00 acme@toy.ghostprotocols.net +8 -3 # [LLC] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 21:09:34-02:00 acme@toy.ghostprotocols.net # [PF_KEY] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/key/af_key.c # 2005/01/20 21:09:22-02:00 acme@toy.ghostprotocols.net +14 -19 # [PF_KEY] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:59:08-02:00 acme@toy.ghostprotocols.net # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_timer.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +7 -7 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_subr.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +7 -7 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_proc.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +1 -1 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_out.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +4 -4 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_in.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +5 -5 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/x25_facilities.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +1 -1 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/x25/af_x25.c # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +13 -23 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/x25.h # 2005/01/20 20:58:55-02:00 acme@toy.ghostprotocols.net +7 -3 # [X25] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:54:11-02:00 acme@toy.ghostprotocols.net # [NETLINK] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/netlink/af_netlink.c # 2005/01/20 20:53:58-02:00 acme@toy.ghostprotocols.net +28 -30 # [NETLINK] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:44:56-02:00 acme@toy.ghostprotocols.net # [ECONET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/econet/af_econet.c # 2005/01/20 20:44:43-02:00 acme@toy.ghostprotocols.net +8 -13 # [ECONET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/if_ec.h # 2005/01/20 20:44:43-02:00 acme@toy.ghostprotocols.net +7 -3 # [ECONET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:41:35-02:00 acme@toy.ghostprotocols.net # [AF_PACKET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/packet/af_packet.c # 2005/01/20 20:41:21-02:00 acme@toy.ghostprotocols.net +26 -29 # [AF_PACKET] stop using sk_protinfo # # Required to introduce struct connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:36:07-02:00 acme@toy.ghostprotocols.net # [DECNET] Don't use sk_protinfo + private sock slab cache # # DecNET already uses a private sock slab cache, but initializes sk->sk_protinfo, # pointing to (sk + 1), this is wrong because at sk_free time we call # sk->sk_destruct, that by default points to sock_def_destruct, that does a kfree # on sk->sk_protinfo, since it was initialized at net_proto_family->create() time # (dn_create), but in decnet sk_protinfo was not kmalloced, it was allocated # piggybacked to struct sock. # # This doesn't causes problems because decnet sets sk->sk_destruct to a custom # function that doesn't calls kfree(sk->sk_protinfo), but to reach a long time # goal of killing sk_protinfo lets just make DN_SK return sk + 1. # # I left merging dn_scp with dn_sock for later, as the current state suits my # needs to introduce connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/decnet/af_decnet.c # 2005/01/20 20:35:54-02:00 acme@toy.ghostprotocols.net +1 -2 # [DECNET] Don't use sk_protinfo + private sock slab cache # # DecNET already uses a private sock slab cache, but initializes sk->sk_protinfo, # pointing to (sk + 1), this is wrong because at sk_free time we call # sk->sk_destruct, that by default points to sock_def_destruct, that does a kfree # on sk->sk_protinfo, since it was initialized at net_proto_family->create() time # (dn_create), but in decnet sk_protinfo was not kmalloced, it was allocated # piggybacked to struct sock. # # This doesn't causes problems because decnet sets sk->sk_destruct to a custom # function that doesn't calls kfree(sk->sk_protinfo), but to reach a long time # goal of killing sk_protinfo lets just make DN_SK return sk + 1. # # I left merging dn_scp with dn_sock for later, as the current state suits my # needs to introduce connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/net/dn.h # 2005/01/20 20:35:54-02:00 acme@toy.ghostprotocols.net +5 -1 # [DECNET] Don't use sk_protinfo + private sock slab cache # # DecNET already uses a private sock slab cache, but initializes sk->sk_protinfo, # pointing to (sk + 1), this is wrong because at sk_free time we call # sk->sk_destruct, that by default points to sock_def_destruct, that does a kfree # on sk->sk_protinfo, since it was initialized at net_proto_family->create() time # (dn_create), but in decnet sk_protinfo was not kmalloced, it was allocated # piggybacked to struct sock. # # This doesn't causes problems because decnet sets sk->sk_destruct to a custom # function that doesn't calls kfree(sk->sk_protinfo), but to reach a long time # goal of killing sk_protinfo lets just make DN_SK return sk + 1. # # I left merging dn_scp with dn_sock for later, as the current state suits my # needs to introduce connection_sock. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:32:38-02:00 acme@toy.ghostprotocols.net # [APPLETALK] stop using sk_protinfo # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/appletalk/ddp.c # 2005/01/20 20:32:26-02:00 acme@toy.ghostprotocols.net +2 -9 # [APPLETALK] stop using sk_protinfo # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # include/linux/atalk.h # 2005/01/20 20:32:26-02:00 acme@toy.ghostprotocols.net +7 -2 # [APPLETALK] stop using sk_protinfo # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 20:25:41-02:00 acme@toy.ghostprotocols.net # [SOCK] make sk_alloc use kmalloc for non performance critical families # # With this we can have aggregate protocol specific struct proto_sock # allocated for non performance critical protocols. # # We still check for slab == NULL && zero_it == 1 to allocate from the # generic "sock" slab cache, but this will be removed when all the # network families stop using sk_protinfo, when the generic "sock" # slab cache will be removed. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # net/core/sock.c # 2005/01/20 20:25:26-02:00 acme@toy.ghostprotocols.net +14 -3 # [SOCK] make sk_alloc use kmalloc for non performance critical families # # With this we can have aggregate protocol specific struct proto_sock # allocated for non performance critical protocols. # # We still check for slab == NULL && zero_it == 1 to allocate from the # generic "sock" slab cache, but this will be removed when all the # network families stop using sk_protinfo, when the generic "sock" # slab cache will be removed. # # Signed-off-by: Arnaldo Carvalho de Melo # Signed-off-by: David S. Miller # # ChangeSet # 2005/01/20 14:46:30-06:00 shaggy@austin.ibm.com # JFS: replace schedule_timeout() with msleep() # # Use msleep() instead of schedule_timeout() to guarantee the task # delays as expected. The current code uses TASK_INTERRUPTIBLE; # however, it does not check for signals, so I do not think the # change to msleep() is necessarily bad. # # Signed-off-by: Nishanth Aravamudan # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_logmgr.c # 2005/01/20 14:46:19-06:00 shaggy@austin.ibm.com +2 -2 # replace schedule_timeout() with msleep() # # ChangeSet # 2005/01/20 14:22:50-06:00 shaggy@austin.ibm.com # JFS: add missing include # # This is why it's a good idea to compile & test before checking in # the code. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_metapage.c # 2005/01/20 14:22:33-06:00 shaggy@austin.ibm.com +1 -0 # add missing include # # ChangeSet # 2005/01/20 14:14:19-06:00 shaggy@austin.ibm.com # JFS: fix livelock waiting for stale metapage # # Several waitors were keeping mp->count from going to zero, so we # would never release the page. Simplify the logic by doing a busy # wait without locking the metapage. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_metapage.c # 2005/01/20 14:13:55-06:00 shaggy@austin.ibm.com +6 -17 # many waitors for stale metapage resulted in livelock # # ChangeSet # 2005/01/18 01:43:40-05:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/linux-2.6 # into pobox.com:/garz/repo/netdev-2.6/8139too # # drivers/net/8139too.c # 2005/01/18 01:43:27-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/01/18 00:56:24-05:00 jgarzik@pobox.com # Merge http://typhoon.bkbits.net/typhoon-2.6 # into pobox.com:/garz/repo/netdev-2.6/typhoon # # drivers/net/typhoon.c # 2005/01/18 00:56:21-05:00 jgarzik@pobox.com +0 -0 # Auto merged # # ChangeSet # 2005/01/14 13:10:38-06:00 shaggy@austin.ibm.com # JFS: base static allocations on physical memory size # # On larger systems, performance is improved with a larger # allocation of tlocks & tblocks. Base the default size of these # allocations on the physical memory size. # # Signed-off-by: Dave Kleikamp # # fs/jfs/jfs_txnmgr.c # 2005/01/14 13:10:22-06:00 shaggy@austin.ibm.com +28 -6 # base default number of tlocks & tblocks on size of phyiscal memory # # ChangeSet # 2005/01/07 01:25:03-05:00 dave@thedillows.org # Bump version and release date. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 01:24:46-05:00 dave@thedillows.org +2 -2 # Bump version and release date. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 01:23:22-05:00 dave@thedillows.org # Version 03.001.008 of the Typhoon firmware, courtesy of 3Com. # Fixes various crypto bugs on the 3CR990B family, among other # issues. # # Signed-off-by: David Dillow # # drivers/net/typhoon-firmware.h # 2005/01/07 01:23:05-05:00 dave@thedillows.org +2525 -3043 # Version 03.001.008 of the Typhoon firmware, courtesy of 3Com. # Fixes various crypto bugs on the 3CR990B family, among other # issues. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 01:22:08-05:00 dave@thedillows.org # Fixup the version reporting to match 3Com. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 01:21:50-05:00 dave@thedillows.org +6 -3 # Fixup the version reporting to match 3Com. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 01:18:58-05:00 dave@thedillows.org # Use module_param() and add descriptions. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 01:18:41-05:00 dave@thedillows.org +8 -2 # Use module_param() and add descriptions. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 00:55:41-05:00 dave@thedillows.org # Teach typhoon to use port IO on machines that need it. It will attempt # to use MMIO, but if that fails (or the user asks), it will fallback # to port IO. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 00:55:21-05:00 dave@thedillows.org +144 -72 # Teach typhoon to use port IO on machines that need it. It will attempt # to use MMIO, but if that fails (or the user asks), it will fallback # to port IO. # # Signed-off-by: David Dillow # # ChangeSet # 2005/01/07 00:53:27-05:00 dave@thedillows.org # Enable bus mastering before saving our state, or we'll only be able # to load the modules one time. # # Signed-off-by: David Dillow # # drivers/net/typhoon.c # 2005/01/07 00:53:08-05:00 dave@thedillows.org +3 -4 # Enable bus mastering before saving our state, or we'll only be able # to load the modules one time. # # Signed-off-by: David Dillow # # ChangeSet # 2004/10/30 09:06:31-04:00 jgarzik@pobox.com # Merge pobox.com:/garz/repo/netdev-2.6/tmp # into pobox.com:/garz/repo/netdev-2.6/8139too # # drivers/net/8139too.c # 2004/10/30 09:06:28-04:00 jgarzik@pobox.com +0 -1 # Auto merged # # ChangeSet # 2004/10/30 09:05:22-04:00 tglx@linutronix.de # [PATCH] rtl8139too.c: Fix missing pci_disable_dev # # Simple fix to make pci_enable/disable symetric and avoid the warning on # module unload. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2004/10/21 20:00:00-04:00 tglx@linutronix.de +1 -1 # rtl8139too.c: Fix missing pci_disable_dev # # ChangeSet # 2004/10/26 17:10:11-04:00 akpm@osdl.org # [PATCH] rtl8139too.c: Fix missing pci_disable_dev # # From: Thomas Gleixner # # Simple fix to make pci_enable/disable symetric and avoid the warning on # module unload. # # Signed-off-by: Thomas Gleixner # Signed-off-by: Andrew Morton # Signed-off-by: Jeff Garzik # # drivers/net/8139too.c # 2004/10/24 06:32:54-04:00 akpm@osdl.org +1 -1 # rtl8139too.c: Fix missing pci_disable_dev # # ChangeSet # 2004/10/26 17:00:44-04:00 jgarzik@pobox.com # Hand-merge upstream pci_{save,restore}_state() stuff. # # drivers/net/8139too.c # 2004/10/26 17:00:39-04:00 jgarzik@pobox.com +0 -1 # Hand-merge upstream pci_{save,restore}_state() stuff. # # ChangeSet # 2004/10/15 19:25:35-04:00 shemminger@osdl.org # [PATCH] 8139too: use netdev_priv # # Use netdev_priv where appropriate, and get rid of "can't happen anymore" assert's. # # Signed-off-by: Stephen Hemminger # # drivers/net/8139too.c # 2004/10/15 18:25:02-04:00 shemminger@osdl.org +38 -45 # 8139too: use netdev_priv # # ChangeSet # 2004/08/28 19:06:15-04:00 rene.herman@keyaccess.nl # [PATCH] 8139too Interframe Gap Time # # drivers/net/8139too.c # 2004/04/30 10:29:08-04:00 rene.herman@keyaccess.nl +9 -5 # 8139too Interframe Gap Time # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS 2005-03-07 14:54:17 -08:00 +++ b/CREDITS 2005-03-07 14:54:17 -08:00 @@ -1095,7 +1095,7 @@ N: Kumar Gala E: kumar.gala@freescale.com -D: Embedded PowerPC 6xx/7xx/74xx/82xx/85xx support +D: Embedded PowerPC 6xx/7xx/74xx/82xx/83xx/85xx support S: Austin, Texas 78729 S: USA diff -Nru a/Documentation/Changes b/Documentation/Changes --- a/Documentation/Changes 2005-03-07 14:54:18 -08:00 +++ b/Documentation/Changes 2005-03-07 14:54:18 -08:00 @@ -339,7 +339,7 @@ JFSutils -------- -o +o Reiserfsprogs ------------- diff -Nru a/Documentation/arm/Samsung-S3C24XX/H1940.txt b/Documentation/arm/Samsung-S3C24XX/H1940.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/arm/Samsung-S3C24XX/H1940.txt 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,40 @@ + HP IPAQ H1940 + ============= + +http://www.handhelds.org/projects/h1940.html + +Introduction +------------ + + The HP H1940 is a S3C2410 based handheld device, with + bluetooth connectivity. + + +Support +------- + + A variety of information is available + + handhelds.org project page: + + http://www.handhelds.org/projects/h1940.html + + handhelds.org wiki page: + + http://handhelds.org/moin/moin.cgi/HpIpaqH1940 + + Herbert Pötzl pages: + + http://vserver.13thfloor.at/H1940/ + + +Maintainers +----------- + + This project is being maintained and developed by a variety + of people, including Ben Dooks, Arnaud Patard, and Herbert Pötzl. + + Thanks to the many others who have also provided support. + + +(c) 2005 Ben Dooks \ No newline at end of file diff -Nru a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt 2005-03-07 14:54:18 -08:00 +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt 2005-03-07 14:54:18 -08:00 @@ -36,6 +36,10 @@ Samsung's own development board, geared for PDA work. + Samsung/Meritech SMDK2440 + + The S3C2440 compatible version of the SMDK2440 + Thorcom VR1000 Custom embedded board @@ -98,6 +102,7 @@ Klaus Fetscher Dimitry Andric Shannon Holland + Guillaume Gourat (NexVision) Document Changes @@ -108,6 +113,8 @@ 25 Oct 2004 - BJD - Added Dimitry Andric to list of contributors 25 Oct 2004 - BJD - Updated the MTD from the 2.6.9 merge 21 Jan 2005 - BJD - Added rx3715, added Shannon to contributors + 10 Feb 2005 - BJD - Added Guillaume Gourat to contributors + 02 Mar 2005 - BJD - Added SMDK2440 to list of machines Document Author --------------- diff -Nru a/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt b/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/arm/Samsung-S3C24XX/SMDK2440.txt 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,56 @@ + Samsung/Meritech SMDK2440 + ========================= + +Introduction +------------ + + The SMDK2440 is a two part evaluation board for the Samsung S3C2440 + processor. It includes support for LCD, SmartMedia, Audio, SD and + 10MBit Ethernet, and expansion headers for various signals, including + the camera and unused GPIO. + + +Configuration +------------- + + To set the default configuration, use `make smdk2440_defconfig` which + will configure the common features of this board, or use + `make s3c2410_config` to include support for all s3c2410/s3c2440 machines + + +Support +------- + + Ben Dooks' SMDK2440 site at http://www.fluff.org/ben/smdk2440/ which + includes linux based USB download tools. + + Some of the h1940 patches that can be found from the H1940 project + site at http://www.handhelds.org/projects/h1940.html can also be + applied to this board. + + +Peripherals +----------- + + There is no current support for any of the extra peripherals on the + base-board itself. + + +MTD +--- + + The NAND flash should be supported by the in kernel MTD NAND support, + NOR flash will be added later. + + +Maintainers +----------- + + This board is being maintained by Ben Dooks, for more info, see + http://www.fluff.org/ben/smdk2440/ + + Many thanks to Dimitry Andric of TomTom for the loan of the SMDK2440, + and to Simtec Electronics for allowing me time to work on this. + + +(c) 2004 Ben Dooks \ No newline at end of file diff -Nru a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt --- a/Documentation/cachetlb.txt 2005-03-07 14:54:16 -08:00 +++ b/Documentation/cachetlb.txt 2005-03-07 14:54:16 -08:00 @@ -155,7 +155,7 @@ change_range_of_page_tables(mm, start, end); flush_tlb_range(vma, start, end); - 3) flush_cache_page(vma, addr); + 3) flush_cache_page(vma, addr, pfn); set_pte(pte_pointer, new_pte_val); flush_tlb_page(vma, addr); @@ -203,7 +203,7 @@ call flush_cache_page (see below) for each entry which may be modified. -3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +3) void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) This time we need to remove a PAGE_SIZE sized range from the cache. The 'vma' is the backing structure used by @@ -213,8 +213,14 @@ executable (and thus could be in the 'instruction cache' in "Harvard" type cache layouts). + The 'pfn' indicates the physical page frame (shift this value + left by PAGE_SHIFT to get the physical address) that 'addr' + translates to. It is this mapping which should be removed from + the cache. + After running, there will be no entries in the cache for - 'vma->vm_mm' for virtual address 'addr'. + 'vma->vm_mm' for virtual address 'addr' which translates + to 'pfn'. This is used primarily during fault processing. diff -Nru a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt --- a/Documentation/crypto/api-intro.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/crypto/api-intro.txt 2005-03-07 14:54:17 -08:00 @@ -234,6 +234,9 @@ Anubis algorithm contributors: Aaron Grothe +Tiger algorithm contributors: + Aaron Grothe + Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: diff -Nru a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt --- a/Documentation/filesystems/jfs.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/filesystems/jfs.txt 2005-03-07 14:54:17 -08:00 @@ -1,13 +1,6 @@ IBM's Journaled File System (JFS) for Linux -JFS Homepage: http://oss.software.ibm.com/jfs/ - -Team members ------------- -Dave Kleikamp shaggy@austin.ibm.com -Dave Blaschke blaschke@us.ibm.com -Steve Best sbest@us.ibm.com -Barry Arndt barndt@us.ibm.com +JFS Homepage: http://jfs.sourceforge.net/ The following mount options are supported: @@ -15,6 +8,7 @@ ASCII. The default is to do no conversion. Use iocharset=utf8 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in the kernel .config file. + iocharset=none specifies the default behavior explicitly. resize=value Resize the volume to blocks. JFS only supports growing a volume, not shrinking it. This option is only @@ -38,4 +32,4 @@ Please send bugs, comments, cards and letters to shaggy@austin.ibm.com. The JFS mailing list can be subscribed to by using the link labeled -"Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/. +"Mail list Subscribe" at our web page http://jfs.sourceforge.net/ diff -Nru a/Documentation/i2c/porting-clients b/Documentation/i2c/porting-clients --- a/Documentation/i2c/porting-clients 2005-03-07 14:54:16 -08:00 +++ b/Documentation/i2c/porting-clients 2005-03-07 14:54:16 -08:00 @@ -49,9 +49,8 @@ static void lm75_update_client(struct i2c_client *client); * [Sysctl] All sysctl stuff is of course gone (defines, ctl_table - and functions). Instead, right after the static id definition - line, you have to define show and set functions for each sysfs - file. Only define set for writable values. Take a look at an + and functions). Instead, you have to define show and set functions for + each sysfs file. Only define set for writable values. Take a look at an existing 2.6 driver for details (lm78 for example). Don't forget to define the attributes for each file (this is that step that links callback functions). Use the file names specified in @@ -86,6 +85,7 @@ Replace the sysctl directory registration by calls to device_create_file. Move the driver initialization before any sysfs file creation. + Drop client->id. * [Init] Limits must not be set by the driver (can be done later in user-space). Chip should not be reset default (although a module diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients --- a/Documentation/i2c/writing-clients 2005-03-07 14:54:16 -08:00 +++ b/Documentation/i2c/writing-clients 2005-03-07 14:54:16 -08:00 @@ -344,9 +344,6 @@ For now, you can ignore the `flags' parameter. It is there for future use. - /* Unique ID allocation */ - static int foo_id = 0; - int foo_detect_client(struct i2c_adapter *adapter, int address, unsigned short flags, int kind) { @@ -482,7 +479,6 @@ data->type = kind; /* SENSORS ONLY END */ - new_client->id = foo_id++; /* Automatically unique */ data->valid = 0; /* Only if you use this field */ init_MUTEX(&data->update_lock); /* Only if you use this field */ @@ -642,7 +638,7 @@ parameter contains the bytes the read/write, the third the length of the buffer. Returned is the actual number of bytes read/written. - extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], + extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num); This sends a series of messages. Each message can be a read or write, diff -Nru a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt --- a/Documentation/networking/bonding.txt 2005-03-07 14:54:16 -08:00 +++ b/Documentation/networking/bonding.txt 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,5 @@ - Linux Ethernet Bonding Driver mini-howto + Linux Ethernet Bonding Driver HOWTO Initial release : Thomas Davis Corrections, HA extensions : 2000/10/03-15 : @@ -9,8 +9,11 @@ - Janice Girouard - Jay Vosburgh +Reorganized and updated Feb 2005 by Jay Vosburgh + Note : ------ + The bonding driver originally came from Donald Becker's beowulf patches for kernel 2.0. It has changed quite a bit since, and the original tools from extreme-linux and beowulf sites will not work with this version of the driver. @@ -18,218 +21,190 @@ For new versions of the driver, patches for older kernels and the updated userspace tools, please follow the links at the end of this file. - Table of Contents ================= -Installation -Bond Configuration -Module Parameters -Configuring Multiple Bonds -Switch Configuration -Verifying Bond Configuration -Frequently Asked Questions -High Availability -Promiscuous Sniffing notes -8021q VLAN support -Limitations -Resources and Links - - -Installation -============ - -1) Build kernel with the bonding driver ---------------------------------------- -For the latest version of the bonding driver, use kernel 2.4.12 or above -(otherwise you will need to apply a patch). - -Configure kernel with `make menuconfig/xconfig/config', and select "Bonding -driver support" in the "Network device support" section. It is recommended -to configure the driver as module since it is currently the only way to -pass parameters to the driver and configure more than one bonding device. - -Build and install the new kernel and modules. - -2) Get and install the userspace tools --------------------------------------- -This version of the bonding driver requires updated ifenslave program. The -original one from extreme-linux and beowulf will not work. Kernels 2.4.12 -and above include the updated version of ifenslave.c in -Documentation/networking directory. For older kernels, please follow the -links at the end of this file. - -IMPORTANT!!! If you are running on Redhat 7.1 or greater, you need -to be careful because /usr/include/linux is no longer a symbolic link -to /usr/src/linux/include/linux. If you build ifenslave while this is -true, ifenslave will appear to succeed but your bond won't work. The purpose -of the -I option on the ifenslave compile line is to make sure it uses -/usr/src/linux/include/linux/if_bonding.h instead of the version from -/usr/include/linux. - -To install ifenslave.c, do: - # gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave - # cp ifenslave /sbin/ifenslave +1. Bonding Driver Installation +2. Bonding Driver Options -Bond Configuration -================== +3. Configuring Bonding Devices +3.1 Configuration with sysconfig support +3.2 Configuration with initscripts support +3.3 Configuring Bonding Manually +3.4 Configuring Multiple Bonds -You will need to add at least the following line to /etc/modprobe.conf -so the bonding driver will automatically load when the bond0 interface is -configured. Refer to the modprobe.conf manual page for specific modprobe.conf -syntax details. The Module Parameters section of this document describes each -bonding driver parameter. - - alias bond0 bonding - -Use standard distribution techniques to define the bond0 network interface. For -example, on modern Red Hat distributions, create an ifcfg-bond0 file in -the /etc/sysconfig/network-scripts directory that resembles the following: +5. Querying Bonding Configuration +5.1 Bonding Configuration +5.2 Network Configuration -DEVICE=bond0 -IPADDR=192.168.1.1 -NETMASK=255.255.255.0 -NETWORK=192.168.1.0 -BROADCAST=192.168.1.255 -ONBOOT=yes -BOOTPROTO=none -USERCTL=no +6. Switch Configuration -(use appropriate values for your network above) +7. 802.1q VLAN Support -All interfaces that are part of a bond should have SLAVE and MASTER -definitions. For example, in the case of Red Hat, if you wish to make eth0 and -eth1 a part of the bonding interface bond0, their config files (ifcfg-eth0 and -ifcfg-eth1) should resemble the following: +8. Link Monitoring +8.1 ARP Monitor Operation +8.2 Configuring Multiple ARP Targets +8.3 MII Monitor Operation -DEVICE=eth0 -USERCTL=no -ONBOOT=yes -MASTER=bond0 -SLAVE=yes -BOOTPROTO=none +9. Potential Trouble Sources +9.1 Adventures in Routing +9.2 Ethernet Device Renaming +9.3 Painfully Slow Or No Failed Link Detection By Miimon -Use DEVICE=eth1 in the ifcfg-eth1 config file. If you configure a second -bonding interface (bond1), use MASTER=bond1 in the config file to make the -network interface be a slave of bond1. - -Restart the networking subsystem or just bring up the bonding device if your -administration tools allow it. Otherwise, reboot. On Red Hat distros you can -issue `ifup bond0' or `/etc/rc.d/init.d/network restart'. - -If the administration tools of your distribution do not support -master/slave notation in configuring network interfaces, you will need to -manually configure the bonding device with the following commands: - - # /sbin/ifconfig bond0 192.168.1.1 netmask 255.255.255.0 \ - broadcast 192.168.1.255 up - - # /sbin/ifenslave bond0 eth0 - # /sbin/ifenslave bond0 eth1 - -(use appropriate values for your network above) - -You can then create a script containing these commands and place it in the -appropriate rc directory. - -If you specifically need all network drivers loaded before the bonding driver, -adding the following line to modprobe.conf will cause the network driver for -eth0 and eth1 to be loaded before the bonding driver. - -install bond0 /sbin/modprobe -a eth0 eth1 && /sbin/modprobe bonding - -Be careful not to reference bond0 itself at the end of the line, or modprobe -will die in an endless recursive loop. - -If running SNMP agents, the bonding driver should be loaded before any network -drivers participating in a bond. This requirement is due to the the interface -index (ipAdEntIfIndex) being associated to the first interface found with a -given IP address. That is, there is only one ipAdEntIfIndex for each IP -address. For example, if eth0 and eth1 are slaves of bond0 and the driver for -eth0 is loaded before the bonding driver, the interface for the IP address -will be associated with the eth0 interface. This configuration is shown below, -the IP address 192.168.1.1 has an interface index of 2 which indexes to eth0 -in the ifDescr table (ifDescr.2). +10. SNMP agents - interfaces.ifTable.ifEntry.ifDescr.1 = lo - interfaces.ifTable.ifEntry.ifDescr.2 = eth0 - interfaces.ifTable.ifEntry.ifDescr.3 = eth1 - interfaces.ifTable.ifEntry.ifDescr.4 = eth2 - interfaces.ifTable.ifEntry.ifDescr.5 = eth3 - interfaces.ifTable.ifEntry.ifDescr.6 = bond0 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 5 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 4 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 +11. Promiscuous mode -This problem is avoided by loading the bonding driver before any network -drivers participating in a bond. Below is an example of loading the bonding -driver first, the IP address 192.168.1.1 is correctly associated with -ifDescr.2. +12. High Availability Information +12.1 High Availability in a Single Switch Topology +12.1.1 Bonding Mode Selection for Single Switch Topology +12.1.2 Link Monitoring for Single Switch Topology +12.2 High Availability in a Multiple Switch Topology +12.2.1 Bonding Mode Selection for Multiple Switch Topology +12.2.2 Link Monitoring for Multiple Switch Topology +12.3 Switch Behavior Issues for High Availability - interfaces.ifTable.ifEntry.ifDescr.1 = lo - interfaces.ifTable.ifEntry.ifDescr.2 = bond0 - interfaces.ifTable.ifEntry.ifDescr.3 = eth0 - interfaces.ifTable.ifEntry.ifDescr.4 = eth1 - interfaces.ifTable.ifEntry.ifDescr.5 = eth2 - interfaces.ifTable.ifEntry.ifDescr.6 = eth3 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 6 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 5 - ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 +13. Hardware Specific Considerations +13.1 IBM BladeCenter -While some distributions may not report the interface name in ifDescr, -the association between the IP address and IfIndex remains and SNMP -functions such as Interface_Scan_Next will report that association. +14. Frequently Asked Questions +15. Resources and Links -Module Parameters -================= -Optional parameters for the bonding driver can be supplied as command line -arguments to the insmod command. Typically, these parameters are specified in -the file /etc/modprobe.conf (see the manual page for modprobe.conf). The -available bonding driver parameters are listed below. If a parameter is not -specified the default value is used. When initially configuring a bond, it -is recommended "tail -f /var/log/messages" be run in a separate window to -watch for bonding driver error messages. - -It is critical that either the miimon or arp_interval and arp_ip_target -parameters be specified, otherwise serious network degradation will occur -during link failures. +1. Bonding Driver Installation +============================== + + Most popular distro kernels ship with the bonding driver +already available as a module and the ifenslave user level control +program installed and ready for use. If your distro does not, or you +have need to compile bonding from source (e.g., configuring and +installing a mainline kernel from kernel.org), you'll need to perform +the following steps: + +1.1 Configure and build the kernel with bonding +----------------------------------------------- + + The latest version of the bonding driver is available in the +drivers/net/bonding subdirectory of the most recent kernel source +(which is available on http://kernel.org). + + Prior to the 2.4.11 kernel, the bonding driver was maintained +largely outside the kernel tree; patches for some earlier kernels are +available on the bonding sourceforge site, although those patches are +still several years out of date. Most users will want to use either +the most recent kernel from kernel.org or whatever kernel came with +their distro. + + Configure kernel with "make menuconfig" (or "make xconfig" or +"make config"), then select "Bonding driver support" in the "Network +device support" section. It is recommended that you configure the +driver as module since it is currently the only way to pass parameters +to the driver or configure more than one bonding device. + + Build and install the new kernel and modules, then proceed to +step 2. + +1.2 Install ifenslave Control Utility +------------------------------------- + + The ifenslave user level control program is included in the +kernel source tree, in the file Documentation/networking/ifenslave.c. +It is generally recommended that you use the ifenslave that +corresponds to the kernel that you are using (either from the same +source tree or supplied with the distro), however, ifenslave +executables from older kernels should function (but features newer +than the ifenslave release are not supported). Running an ifenslave +that is newer than the kernel is not supported, and may or may not +work. + + To install ifenslave, do the following: + +# gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave +# cp ifenslave /sbin/ifenslave + + If your kernel source is not in "/usr/src/linux," then replace +"/usr/src/linux/include" in the above with the location of your kernel +source include directory. + + You may wish to back up any existing /sbin/ifenslave, or, for +testing or informal use, tag the ifenslave to the kernel version +(e.g., name the ifenslave executable /sbin/ifenslave-2.6.10). + +IMPORTANT NOTE: + + If you omit the "-I" or specify an incorrect directory, you +may end up with an ifenslave that is incompatible with the kernel +you're trying to build it for. Some distros (e.g., Red Hat from 7.1 +onwards) do not have /usr/include/linux symbolically linked to the +default kernel source include directory. + + +2. Bonding Driver Options +========================= + + Options for the bonding driver are supplied as parameters to +the bonding module at load time. They may be given as command line +arguments to the insmod or modprobe command, but are usually specified +in either the /etc/modprobe.conf configuration file, or in a +distro-specific configuration file (some of which are detailed in the +next section). + + The available bonding driver parameters are listed below. If a +parameter is not specified the default value is used. When initially +configuring a bond, it is recommended "tail -f /var/log/messages" be +run in a separate window to watch for bonding driver error messages. + + It is critical that either the miimon or arp_interval and +arp_ip_target parameters be specified, otherwise serious network +degradation will occur during link failures. Very few devices do not +support at least miimon, so there is really no reason not to use it. + + Options with textual values will accept either the text name + or, for backwards compatibility, the option value. E.g., + "mode=802.3ad" and "mode=4" set the same mode. + + The parameters are as follows: arp_interval - Specifies the ARP monitoring frequency in milli-seconds. - If ARP monitoring is used in a load-balancing mode (mode 0 or 2), the - switch should be configured in a mode that evenly distributes packets - across all links - such as round-robin. If the switch is configured to - distribute the packets in an XOR fashion, all replies from the ARP - targets will be received on the same link which could cause the other - team members to fail. ARP monitoring should not be used in conjunction - with miimon. A value of 0 disables ARP monitoring. The default value - is 0. + Specifies the ARP monitoring frequency in milli-seconds. If + ARP monitoring is used in a load-balancing mode (mode 0 or 2), + the switch should be configured in a mode that evenly + distributes packets across all links - such as round-robin. If + the switch is configured to distribute the packets in an XOR + fashion, all replies from the ARP targets will be received on + the same link which could cause the other team members to + fail. ARP monitoring should not be used in conjunction with + miimon. A value of 0 disables ARP monitoring. The default + value is 0. arp_ip_target - Specifies the ip addresses to use when arp_interval is > 0. These - are the targets of the ARP request sent to determine the health of - the link to the targets. Specify these values in ddd.ddd.ddd.ddd - format. Multiple ip adresses must be seperated by a comma. At least - one ip address needs to be given for ARP monitoring to work. The - maximum number of targets that can be specified is set at 16. + Specifies the ip addresses to use when arp_interval is > 0. + These are the targets of the ARP request sent to determine the + health of the link to the targets. Specify these values in + ddd.ddd.ddd.ddd format. Multiple ip adresses must be + seperated by a comma. At least one IP address must be given + for ARP monitoring to function. The maximum number of targets + that can be specified is 16. The default value is no IP + addresses. downdelay - Specifies the delay time in milli-seconds to disable a link after a - link failure has been detected. This should be a multiple of miimon - value, otherwise the value will be rounded. The default value is 0. + Specifies the time, in milliseconds, to wait before disabling + a slave after a link failure has been detected. This option + is only valid for the miimon link monitor. The downdelay + value should be a multiple of the miimon value; if not, it + will be rounded down to the nearest multiple. The default + value is 0. lacp_rate - Option specifying the rate in which we'll ask our link partner to - transmit LACPDU packets in 802.3ad mode. Possible values are: + Option specifying the rate in which we'll ask our link partner + to transmit LACPDU packets in 802.3ad mode. Possible values + are: slow or 0 Request partner to transmit LACPDUs every 30 seconds (default) @@ -246,69 +221,76 @@ miimon - Specifies the frequency in milli-seconds that MII link monitoring - will occur. A value of zero disables MII link monitoring. A value - of 100 is a good starting point. See High Availability section for - additional information. The default value is 0. + Specifies the frequency in milli-seconds that MII link + monitoring will occur. A value of zero disables MII link + monitoring. A value of 100 is a good starting point. The + use_carrier option, below, affects how the link state is + determined. See the High Availability section for additional + information. The default value is 0. mode Specifies one of the bonding policies. The default is - round-robin (balance-rr). Possible values are (you can use - either the text or numeric option): + balance-rr (round robin). Possible values are: balance-rr or 0 - Round-robin policy: Transmit in a sequential order - from the first available slave through the last. This - mode provides load balancing and fault tolerance. + Round-robin policy: Transmit packets in sequential + order from the first available slave through the + last. This mode provides load balancing and fault + tolerance. active-backup or 1 Active-backup policy: Only one slave in the bond is - active. A different slave becomes active if, and only - if, the active slave fails. The bond's MAC address is + active. A different slave becomes active if, and only + if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides - fault tolerance. + fault tolerance. The primary option affects the + behavior of this mode. balance-xor or 2 XOR policy: Transmit based on [(source MAC address - XOR'd with destination MAC address) modula slave - count]. This selects the same slave for each - destination MAC address. This mode provides load + XOR'd with destination MAC address) modulo slave + count]. This selects the same slave for each + destination MAC address. This mode provides load balancing and fault tolerance. broadcast or 3 Broadcast policy: transmits everything on all slave - interfaces. This mode provides fault tolerance. + interfaces. This mode provides fault tolerance. 802.3ad or 4 - IEEE 802.3ad Dynamic link aggregation. Creates aggregation - groups that share the same speed and duplex settings. - Transmits and receives on all slaves in the active - aggregator. + IEEE 802.3ad Dynamic link aggregation. Creates + aggregation groups that share the same speed and + duplex settings. Utilizes all slaves in the active + aggregator according to the 802.3ad specification. Pre-requisites: - 1. Ethtool support in the base drivers for retrieving the - speed and duplex of each slave. + 1. Ethtool support in the base drivers for retrieving + the speed and duplex of each slave. 2. A switch that supports IEEE 802.3ad Dynamic link aggregation. + Most switches will require some type of configuration + to enable 802.3ad mode. + balance-tlb or 5 - Adaptive transmit load balancing: channel bonding that does - not require any special switch support. The outgoing - traffic is distributed according to the current load - (computed relative to the speed) on each slave. Incoming - traffic is received by the current slave. If the receiving - slave fails, another slave takes over the MAC address of - the failed receiving slave. + Adaptive transmit load balancing: channel bonding that + does not require any special switch support. The + outgoing traffic is distributed according to the + current load (computed relative to the speed) on each + slave. Incoming traffic is received by the current + slave. If the receiving slave fails, another slave + takes over the MAC address of the failed receiving + slave. Prerequisite: @@ -317,205 +299,452 @@ balance-alb or 6 - Adaptive load balancing: includes balance-tlb + receive - load balancing (rlb) for IPV4 traffic and does not require - any special switch support. The receive load balancing is - achieved by ARP negotiation. The bonding driver intercepts - the ARP Replies sent by the server on their way out and - overwrites the src hw address with the unique hw address of - one of the slaves in the bond such that different clients - use different hw addresses for the server. - - Receive traffic from connections created by the server is - also balanced. When the server sends an ARP Request the - bonding driver copies and saves the client's IP information - from the ARP. When the ARP Reply arrives from the client, - its hw address is retrieved and the bonding driver - initiates an ARP reply to this client assigning it to one - of the slaves in the bond. A problematic outcome of using - ARP negotiation for balancing is that each time that an ARP - request is broadcasted it uses the hw address of the - bond. Hence, clients learn the hw address of the bond and - the balancing of receive traffic collapses to the current - salve. This is handled by sending updates (ARP Replies) to - all the clients with their assigned hw address such that - the traffic is redistributed. Receive traffic is also - redistributed when a new slave is added to the bond and - when an inactive slave is re-activated. The receive load is - distributed sequentially (round robin) among the group of - highest speed slaves in the bond. - - When a link is reconnected or a new slave joins the bond - the receive traffic is redistributed among all active - slaves in the bond by intiating ARP Replies with the - selected mac address to each of the clients. The updelay - modeprobe parameter must be set to a value equal or greater - than the switch's forwarding delay so that the ARP Replies - sent to the clients will not be blocked by the switch. + Adaptive load balancing: includes balance-tlb plus + receive load balancing (rlb) for IPV4 traffic, and + does not require any special switch support. The + receive load balancing is achieved by ARP negotiation. + The bonding driver intercepts the ARP Replies sent by + the local system on their way out and overwrites the + source hardware address with the unique hardware + address of one of the slaves in the bond such that + different peers use different hardware addresses for + the server. + + Receive traffic from connections created by the server + is also balanced. When the local system sends an ARP + Request the bonding driver copies and saves the peer's + IP information from the ARP packet. When the ARP + Reply arrives from the peer, its hardware address is + retrieved and the bonding driver initiates an ARP + reply to this peer assigning it to one of the slaves + in the bond. A problematic outcome of using ARP + negotiation for balancing is that each time that an + ARP request is broadcast it uses the hardware address + of the bond. Hence, peers learn the hardware address + of the bond and the balancing of receive traffic + collapses to the current slave. This is handled by + sending updates (ARP Replies) to all the peers with + their individually assigned hardware address such that + the traffic is redistributed. Receive traffic is also + redistributed when a new slave is added to the bond + and when an inactive slave is re-activated. The + receive load is distributed sequentially (round robin) + among the group of highest speed slaves in the bond. + + When a link is reconnected or a new slave joins the + bond the receive traffic is redistributed among all + active slaves in the bond by intiating ARP Replies + with the selected mac address to each of the + clients. The updelay parameter (detailed below) must + be set to a value equal or greater than the switch's + forwarding delay so that the ARP Replies sent to the + peers will not be blocked by the switch. Prerequisites: - 1. Ethtool support in the base drivers for retrieving the - speed of each slave. + 1. Ethtool support in the base drivers for retrieving + the speed of each slave. - 2. Base driver support for setting the hw address of a - device also when it is open. This is required so that there - will always be one slave in the team using the bond hw - address (the curr_active_slave) while having a unique hw - address for each slave in the bond. If the curr_active_slave - fails it's hw address is swapped with the new curr_active_slave - that was chosen. + 2. Base driver support for setting the hardware + address of a device while it is open. This is + required so that there will always be one slave in the + team using the bond hardware address (the + curr_active_slave) while having a unique hardware + address for each slave in the bond. If the + curr_active_slave fails its hardware address is + swapped with the new curr_active_slave that was + chosen. primary - A string (eth0, eth2, etc) to equate to a primary device. If this - value is entered, and the device is on-line, it will be used first - as the output media. Only when this device is off-line, will - alternate devices be used. Otherwise, once a failover is detected - and a new default output is chosen, it will remain the output media - until it too fails. This is useful when one slave was preferred - over another, i.e. when one slave is 1000Mbps and another is - 100Mbps. If the 1000Mbps slave fails and is later restored, it may - be preferred the faster slave gracefully become the active slave - - without deliberately failing the 100Mbps slave. Specifying a - primary is only valid in active-backup mode. + A string (eth0, eth2, etc) specifying which slave is the + primary device. The specified device will always be the + active slave while it is available. Only when the primary is + off-line will alternate devices be used. This is useful when + one slave is preferred over another, e.g., when one slave has + higher throughput than another. + + The primary option is only valid for active-backup mode. updelay - Specifies the delay time in milli-seconds to enable a link after a - link up status has been detected. This should be a multiple of miimon - value, otherwise the value will be rounded. The default value is 0. + Specifies the time, in milliseconds, to wait before enabling a + slave after a link recovery has been detected. This option is + only valid for the miimon link monitor. The updelay value + should be a multiple of the miimon value; if not, it will be + rounded down to the nearest multiple. The default value is 0. use_carrier - Specifies whether or not miimon should use MII or ETHTOOL - ioctls vs. netif_carrier_ok() to determine the link status. - The MII or ETHTOOL ioctls are less efficient and utilize a - deprecated calling sequence within the kernel. The - netif_carrier_ok() relies on the device driver to maintain its - state with netif_carrier_on/off; at this writing, most, but - not all, device drivers support this facility. - - If bonding insists that the link is up when it should not be, - it may be that your network device driver does not support - netif_carrier_on/off. This is because the default state for - netif_carrier is "carrier on." In this case, disabling - use_carrier will cause bonding to revert to the MII / ETHTOOL - ioctl method to determine the link state. - - A value of 1 enables the use of netif_carrier_ok(), a value of - 0 will use the deprecated MII / ETHTOOL ioctls. The default - value is 1. - - -Configuring Multiple Bonds -========================== - -If several bonding interfaces are required, either specify the max_bonds -parameter (described above), or load the driver multiple times. Using -the max_bonds parameter is less complicated, but has the limitation that -all bonding instances created will have the same options. Loading the -driver multiple times allows each instance of the driver to have differing -options. - -For example, to configure two bonding interfaces, one with mii link -monitoring performed every 100 milliseconds, and one with ARP link -monitoring performed every 200 milliseconds, the /etc/conf.modules should -resemble the following: + Specifies whether or not miimon should use MII or ETHTOOL + ioctls vs. netif_carrier_ok() to determine the link + status. The MII or ETHTOOL ioctls are less efficient and + utilize a deprecated calling sequence within the kernel. The + netif_carrier_ok() relies on the device driver to maintain its + state with netif_carrier_on/off; at this writing, most, but + not all, device drivers support this facility. + + If bonding insists that the link is up when it should not be, + it may be that your network device driver does not support + netif_carrier_on/off. The default state for netif_carrier is + "carrier on," so if a driver does not support netif_carrier, + it will appear as if the link is always up. In this case, + setting use_carrier to 0 will cause bonding to revert to the + MII / ETHTOOL ioctl method to determine the link state. + + A value of 1 enables the use of netif_carrier_ok(), a value of + 0 will use the deprecated MII / ETHTOOL ioctls. The default + value is 1. + + + +3. Configuring Bonding Devices +============================== + + There are, essentially, two methods for configuring bonding: +with support from the distro's network initialization scripts, and +without. Distros generally use one of two packages for the network +initialization scripts: initscripts or sysconfig. Recent versions of +these packages have support for bonding, while older versions do not. + + We will first describe the options for configuring bonding for +distros using versions of initscripts and sysconfig with full or +partial support for bonding, then provide information on enabling +bonding without support from the network initialization scripts (i.e., +older versions of initscripts or sysconfig). + + If you're unsure whether your distro uses sysconfig or +initscripts, or don't know if it's new enough, have no fear. +Determining this is fairly straightforward. + + First, issue the command: + +$ rpm -qf /sbin/ifup + + It will respond with a line of text starting with either +"initscripts" or "sysconfig," followed by some numbers. This is the +package that provides your network initialization scripts. + + Next, to determine if your installation supports bonding, +issue the command: + +$ grep ifenslave /sbin/ifup + + If this returns any matches, then your initscripts or +sysconfig has support for bonding. + +3.1 Configuration with sysconfig support +---------------------------------------- + + This section applies to distros using a version of sysconfig +with bonding support, for example, SuSE Linux Enterprise Server 9. + + SuSE SLES 9's networking configuration system does support +bonding, however, at this writing, the YaST system configuration +frontend does not provide any means to work with bonding devices. +Bonding devices can be managed by hand, however, as follows. + + First, if they have not already been configured, configure the +slave devices. On SLES 9, this is most easily done by running the +yast2 sysconfig configuration utility. The goal is for to create an +ifcfg-id file for each slave device. The simplest way to accomplish +this is to configure the devices for DHCP. The name of the +configuration file for each device will be of the form: + +ifcfg-id-xx:xx:xx:xx:xx:xx + + Where the "xx" portion will be replaced with the digits from +the device's permanent MAC address. + + Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been +created, it is necessary to edit the configuration files for the slave +devices (the MAC addresses correspond to those of the slave devices). +Before editing, the file will contain muliple lines, and will look +something like this: + +BOOTPROTO='dhcp' +STARTMODE='on' +USERCTL='no' +UNIQUE='XNzu.WeZGOGF+4wE' +_nm_name='bus-pci-0001:61:01.0' + + Change the BOOTPROTO and STARTMODE lines to the following: + +BOOTPROTO='none' +STARTMODE='off' + + Do not alter the UNIQUE or _nm_name lines. Remove any other +lines (USERCTL, etc). + + Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified, +it's time to create the configuration file for the bonding device +itself. This file is named ifcfg-bondX, where X is the number of the +bonding device to create, starting at 0. The first such file is +ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig +network configuration system will correctly start multiple instances +of bonding. + + The contents of the ifcfg-bondX file is as follows: + +BOOTPROTO="static" +BROADCAST="10.0.2.255" +IPADDR="10.0.2.10" +NETMASK="255.255.0.0" +NETWORK="10.0.2.0" +REMOTE_IPADDR="" +STARTMODE="onboot" +BONDING_MASTER="yes" +BONDING_MODULE_OPTS="mode=active-backup miimon=100" +BONDING_SLAVE0="eth0" +BONDING_SLAVE1="eth1" + + Replace the sample BROADCAST, IPADDR, NETMASK and NETWORK +values with the appropriate values for your network. + + Note that configuring the bonding device with BOOTPROTO='dhcp' +does not work; the scripts attempt to obtain the device address from +DHCP prior to adding any of the slave devices. Without active slaves, +the DHCP requests are not sent to the network. + + The STARTMODE specifies when the device is brought online. +The possible values are: + + onboot: The device is started at boot time. If you're not + sure, this is probably what you want. + + manual: The device is started only when ifup is called + manually. Bonding devices may be configured this + way if you do not wish them to start automatically + at boot for some reason. + + hotplug: The device is started by a hotplug event. This is not + a valid choice for a bonding device. + + off or ignore: The device configuration is ignored. + + The line BONDING_MASTER='yes' indicates that the device is a +bonding master device. The only useful value is "yes." + + The contents of BONDING_MODULE_OPTS are supplied to the +instance of the bonding module for this device. Specify the options +for the bonding mode, link monitoring, and so on here. Do not include +the max_bonds bonding parameter; this will confuse the configuration +system if you have multiple bonding devices. + + Finally, supply one BONDING_SLAVEn="ethX" for each slave, +where "n" is an increasing value, one for each slave, and "ethX" is +the name of the slave device (eth0, eth1, etc). + + When all configuration files have been modified or created, +networking must be restarted for the configuration changes to take +effect. This can be accomplished via the following: + +# /etc/init.d/network restart + + Note that the network control script (/sbin/ifdown) will +remove the bonding module as part of the network shutdown processing, +so it is not necessary to remove the module by hand if, e.g., the +module paramters have changed. + + Also, at this writing, YaST/YaST2 will not manage bonding +devices (they do not show bonding interfaces on its list of network +devices). It is necessary to edit the configuration file by hand to +change the bonding configuration. + + Additional general options and details of the ifcfg file +format can be found in an example ifcfg template file: + +/etc/sysconfig/network/ifcfg.template + + Note that the template does not document the various BONDING_ +settings described above, but does describe many of the other options. + +3.2 Configuration with initscripts support +------------------------------------------ + + This section applies to distros using a version of initscripts +with bonding support, for example, Red Hat Linux 9 or Red Hat +Enterprise Linux version 3. On these systems, the network +initialization scripts have some knowledge of bonding, and can be +configured to control bonding devices. + + These distros will not automatically load the network adapter +driver unless the ethX device is configured with an IP address. +Because of this constraint, users must manually configure a +network-script file for all physical adapters that will be members of +a bondX link. Network script files are located in the directory: + +/etc/sysconfig/network-scripts + + The file name must be prefixed with "ifcfg-eth" and suffixed +with the adapter's physical adapter number. For example, the script +for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0. +Place the following text in the file: -alias bond0 bonding -alias bond1 bonding +DEVICE=eth0 +USERCTL=no +ONBOOT=yes +MASTER=bond0 +SLAVE=yes +BOOTPROTO=none -options bond0 miimon=100 -options bond1 -o bonding1 arp_interval=200 arp_ip_target=10.0.0.1 + The DEVICE= line will be different for every ethX device and +must correspond with the name of the file, i.e., ifcfg-eth1 must have +a device line of DEVICE=eth1. The setting of the MASTER= line will +also depend on the final bonding interface name chosen for your bond. +As with other network devices, these typically start at 0, and go up +one for each device, i.e., the first bonding instance is bond0, the +second is bond1, and so on. + + Next, create a bond network script. The file name for this +script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is +the number of the bond. For bond0 the file is named "ifcfg-bond0", +for bond1 it is named "ifcfg-bond1", and so on. Within that file, +place the following text: -Configuring Multiple ARP Targets -================================ +DEVICE=bond0 +IPADDR=192.168.1.1 +NETMASK=255.255.255.0 +NETWORK=192.168.1.0 +BROADCAST=192.168.1.255 +ONBOOT=yes +BOOTPROTO=none +USERCTL=no -While ARP monitoring can be done with just one target, it can be useful -in a High Availability setup to have several targets to monitor. In the -case of just one target, the target itself may go down or have a problem -making it unresponsive to ARP requests. Having an additional target (or -several) increases the reliability of the ARP monitoring. + Be sure to change the networking specific lines (IPADDR, +NETMASK, NETWORK and BROADCAST) to match your network configuration. -Multiple ARP targets must be seperated by commas as follows: + Finally, it is necessary to edit /etc/modules.conf to load the +bonding module when the bond0 interface is brought up. The following +sample lines in /etc/modules.conf will load the bonding module, and +select its options: -# example options for ARP monitoring with three targets alias bond0 bonding -options bond0 arp_interval=60 arp_ip_target=192.168.0.1,192.168.0.3,192.168.0.9 +options bond0 mode=balance-alb miimon=100 -For just a single target the options would resemble: + Replace the sample parameters with the appropriate set of +options for your configuration. -# example options for ARP monitoring with one target + Finally run "/etc/rc.d/init.d/network restart" as root. This +will restart the networking subsystem and your bond link should be now +up and running. + + +3.3 Configuring Bonding Manually +-------------------------------- + + This section applies to distros whose network initialization +scripts (the sysconfig or initscripts package) do not have specific +knowledge of bonding. One such distro is SuSE Linux Enterprise Server +version 8. + + The general methodology for these systems is to place the +bonding module parameters into /etc/modprobe.conf, then add modprobe +and/or ifenslave commands to the system's global init script. The +name of the global init script differs; for sysconfig, it is +/etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local. + + For example, if you wanted to make a simple bond of two e100 +devices (presumed to be eth0 and eth1), and have it persist across +reboots, edit the appropriate file (/etc/init.d/boot.local or +/etc/rc.d/rc.local), and add the following: + +modprobe bonding -obond0 mode=balance-alb miimon=100 +modprobe e100 +ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up +ifenslave bond0 eth0 +ifenslave bond0 eth1 + + Replace the example bonding module parameters and bond0 +network configuration (IP address, netmask, etc) with the appropriate +values for your configuration. The above example loads the bonding +module with the name "bond0," this simplifies the naming if multiple +bonding modules are loaded (each successive instance of the module is +given a different name, and the module instance names match the +bonding interface names). + + Unfortunately, this method will not provide support for the +ifup and ifdown scripts on the bond devices. To reload the bonding +configuration, it is necessary to run the initialization script, e.g., + +# /etc/init.d/boot.local + + or + +# /etc/rc.d/rc.local + + It may be desirable in such a case to create a separate script +which only initializes the bonding configuration, then call that +separate script from within boot.local. This allows for bonding to be +enabled without re-running the entire global init script. + + To shut down the bonding devices, it is necessary to first +mark the bonding device itself as being down, then remove the +appropriate device driver modules. For our example above, you can do +the following: + +# ifconfig bond0 down +# rmmod bond0 +# rmmod e100 + + Again, for convenience, it may be desirable to create a script +with these commands. + + +3.4 Configuring Multiple Bonds +------------------------------ + + This section contains information on configuring multiple +bonding devices with differing options. If you require multiple +bonding devices, but all with the same options, see the "max_bonds" +module paramter, documented above. + + To create multiple bonding devices with differing options, it +is necessary to load the bonding driver multiple times. Note that +current versions of the sysconfig network initialization scripts +handle this automatically; if your distro uses these scripts, no +special action is needed. See the section Configuring Bonding +Devices, above, if you're not sure about your network initialization +scripts. + + To load multiple instances of the module, it is necessary to +specify a different name for each instance (the module loading system +requires that every loaded module, even multiple instances of the same +module, have a unique name). This is accomplished by supplying +multiple sets of bonding options in /etc/modprobe.conf, for example: + alias bond0 bonding -options bond0 arp_interval=60 arp_ip_target=192.168.0.100 - -Potential Problems When Using ARP Monitor -========================================= +options bond0 -o bond0 mode=balance-rr miimon=100 -1. Driver support - -The ARP monitor relies on the network device driver to maintain two -statistics: the last receive time (dev->last_rx), and the last -transmit time (dev->trans_start). If the network device driver does -not update one or both of these, then the typical result will be that, -upon startup, all links in the bond will immediately be declared down, -and remain that way. A network monitoring tool (tcpdump, e.g.) will -show ARP requests and replies being sent and received on the bonding -device. - -The possible resolutions for this are to (a) fix the device driver, or -(b) discontinue the ARP monitor (using miimon as an alternative, for -example). - -2. Adventures in Routing - -When bonding is set up with the ARP monitor, it is important that the -slave devices not have routes that supercede routes of the master (or, -generally, not have routes at all). For example, suppose the bonding -device bond0 has two slaves, eth0 and eth1, and the routing table is -as follows: - -Kernel IP routing table -Destination Gateway Genmask Flags MSS Window irtt Iface -10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth0 -10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 -10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 bond0 -127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo +alias bond1 bonding +options bond1 -o bond1 mode=balance-alb miimon=50 -In this case, the ARP monitor (and ARP itself) may become confused, -because ARP requests will be sent on one interface (bond0), but the -corresponding reply will arrive on a different interface (eth0). This -reply looks to ARP as an unsolicited ARP reply (because ARP matches -replies on an interface basis), and is discarded. This will likely -still update the receive/transmit times in the driver, but will lose -packets. - -The resolution here is simply to insure that slaves do not have routes -of their own, and if for some reason they must, those routes do not -supercede routes of their master. This should generally be the case, -but unusual configurations or errant manual or automatic static route -additions may cause trouble. + will load the bonding module two times. The first instance is +named "bond0" and creates the bond0 device in balance-rr mode with an +miimon of 100. The second instance is named "bond1" and creates the +bond1 device in balance-alb mode with an miimon of 50. -Switch Configuration -==================== + This may be repeated any number of times, specifying a new and +unique name in place of bond0 or bond1 for each instance. -While the switch does not need to be configured when the active-backup, -balance-tlb or balance-alb policies (mode=1,5,6) are used, it does need to -be configured for the round-robin, XOR, broadcast, or 802.3ad policies -(mode=0,2,3,4). + When the appropriate module paramters are in place, then +configure bonding according to the instructions for your distro. +5. Querying Bonding Configuration +================================= -Verifying Bond Configuration -============================ +5.1 Bonding Configuration +------------------------- -1) Bonding information files ----------------------------- -The bonding driver information files reside in the /proc/net/bonding directory. + Each bonding device has a read-only file residing in the +/proc/net/bonding directory. The file contents include information +about the bonding configuration, options and state of each slave. -Sample contents of /proc/net/bonding/bond0 after the driver is loaded with -parameters of mode=0 and miimon=1000 is shown below. + For example, the contents of /proc/net/bonding/bond0 after the +driver is loaded with parameters of mode=0 and miimon=1000 is +generally as follows: + Ethernet Channel Bonding Driver: 2.6.1 (October 29, 2004) Bonding Mode: load balancing (round-robin) Currently Active Slave: eth0 MII Status: up @@ -531,15 +760,23 @@ MII Status: up Link Failure Count: 1 -2) Network verification ------------------------ -The network configuration can be verified using the ifconfig command. In -the example below, the bond0 interface is the master (MASTER) while eth0 and -eth1 are slaves (SLAVE). Notice all slaves of bond0 have the same MAC address -(HWaddr) as bond0 for all modes except TLB and ALB that require a unique MAC -address for each slave. + The precise format and contents will change depending upon the +bonding configuration, state, and version of the bonding driver. + +5.2 Network configuration +------------------------- + + The network configuration can be inspected using the ifconfig +command. Bonding devices will have the MASTER flag set; Bonding slave +devices will have the SLAVE flag set. The ifconfig output does not +contain information on which slaves are associated with which masters. + + In the example below, the bond0 interface is the master +(MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of +bond0 have the same MAC address (HWaddr) as bond0 for all modes except +TLB and ALB that require a unique MAC address for each slave. -[root]# /sbin/ifconfig +# /sbin/ifconfig bond0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4 inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 @@ -563,430 +800,819 @@ collisions:0 txqueuelen:100 Interrupt:9 Base address:0x1400 +6. Switch Configuration +======================= -Frequently Asked Questions -========================== + For this section, "switch" refers to whatever system the +bonded devices are directly connected to (i.e., where the other end of +the cable plugs into). This may be an actual dedicated switch device, +or it may be another regular system (e.g., another computer running +Linux), + + The active-backup, balance-tlb and balance-alb modes do not +require any specific configuration of the switch. + + The 802.3ad mode requires that the switch have the appropriate +ports configured as an 802.3ad aggregation. The precise method used +to configure this varies from switch to switch, but, for example, a +Cisco 3550 series switch requires that the appropriate ports first be +grouped together in a single etherchannel instance, then that +etherchannel is set to mode "lacp" to enable 802.3ad (instead of +standard EtherChannel). + + The balance-rr, balance-xor and broadcast modes generally +require that the switch have the appropriate ports grouped together. +The nomenclature for such a group differs between switches, it may be +called an "etherchannel" (as in the Cisco example, above), a "trunk +group" or some other similar variation. For these modes, each switch +will also have its own configuration options for the switch's transmit +policy to the bond. Typical choices include XOR of either the MAC or +IP addresses. The transmit policy of the two peers does not need to +match. For these three modes, the bonding mode really selects a +transmit policy for an EtherChannel group; all three will interoperate +with another EtherChannel group. + + +7. 802.1q VLAN Support +====================== + + It is possible to configure VLAN devices over a bond interface +using the 8021q driver. However, only packets coming from the 8021q +driver and passing through bonding will be tagged by default. Self +generated packets, for example, bonding's learning packets or ARP +packets generated by either ALB mode or the ARP monitor mechanism, are +tagged internally by bonding itself. As a result, bonding must +"learn" the VLAN IDs configured above it, and use those IDs to tag +self generated packets. + + For reasons of simplicity, and to support the use of adapters +that can do VLAN hardware acceleration offloding, the bonding +interface declares itself as fully hardware offloaing capable, it gets +the add_vid/kill_vid notifications to gather the necessary +information, and it propagates those actions to the slaves. In case +of mixed adapter types, hardware accelerated tagged packets that +should go through an adapter that is not offloading capable are +"un-accelerated" by the bonding driver so the VLAN tag sits in the +regular location. + + VLAN interfaces *must* be added on top of a bonding interface +only after enslaving at least one slave. The bonding interface has a +hardware address of 00:00:00:00:00:00 until the first slave is added. +If the VLAN interface is created prior to the first enslavement, it +would pick up the all-zeroes hardware address. Once the first slave +is attached to the bond, the bond device itself will pick up the +slave's hardware address, which is then available for the VLAN device. + + Also, be aware that a similar problem can occur if all slaves +are released from a bond that still has one or more VLAN interfaces on +top of it. When a new slave is added, the bonding interface will +obtain its hardware address from the first slave, which might not +match the hardware address of the VLAN interfaces (which was +ultimately copied from an earlier slave). + + There are two methods to insure that the VLAN device operates +with the correct hardware address if all slaves are removed from a +bond interface: + + 1. Remove all VLAN interfaces then recreate them + + 2. Set the bonding interface's hardware address so that it +matches the hardware address of the VLAN interfaces. + + Note that changing a VLAN interface's HW address would set the +underlying device -- i.e. the bonding interface -- to promiscouos +mode, which might not be what you want. -1. Is it SMP safe? - - Yes. The old 2.0.xx channel bonding patch was not SMP safe. - The new driver was designed to be SMP safe from the start. -2. What type of cards will work with it? - - Any Ethernet type cards (you can even mix cards - a Intel - EtherExpress PRO/100 and a 3com 3c905b, for example). - You can even bond together Gigabit Ethernet cards! +8. Link Monitoring +================== -3. How many bonding devices can I have? + The bonding driver at present supports two schemes for +monitoring a slave device's link state: the ARP monitor and the MII +monitor. + + At the present time, due to implementation restrictions in the +bonding driver itself, it is not possible to enable both ARP and MII +monitoring simultaneously. + +8.1 ARP Monitor Operation +------------------------- + + The ARP monitor operates as its name suggests: it sends ARP +queries to one or more designated peer systems on the network, and +uses the response as an indication that the link is operating. This +gives some assurance that traffic is actually flowing to and from one +or more peers on the local network. + + The ARP monitor relies on the device driver itself to verify +that traffic is flowing. In particular, the driver must keep up to +date the last receive time, dev->last_rx, and transmit start time, +dev->trans_start. If these are not updated by the driver, then the +ARP monitor will immediately fail any slaves using that driver, and +those slaves will stay down. If networking monitoring (tcpdump, etc) +shows the ARP requests and replies on the network, then it may be that +your device driver is not updating last_rx and trans_start. - There is no limit. +8.2 Configuring Multiple ARP Targets +------------------------------------ -4. How many slaves can a bonding device have? + While ARP monitoring can be done with just one target, it can +be useful in a High Availability setup to have several targets to +monitor. In the case of just one target, the target itself may go +down or have a problem making it unresponsive to ARP requests. Having +an additional target (or several) increases the reliability of the ARP +monitoring. - Limited by the number of network interfaces Linux supports and/or the - number of network cards you can place in your system. + Multiple ARP targets must be seperated by commas as follows: -5. What happens when a slave link dies? +# example options for ARP monitoring with three targets +alias bond0 bonding +options bond0 arp_interval=60 arp_ip_target=192.168.0.1,192.168.0.3,192.168.0.9 - If your ethernet cards support MII or ETHTOOL link status monitoring - and the MII monitoring has been enabled in the driver (see description - of module parameters), there will be no adverse consequences. This - release of the bonding driver knows how to get the MII information and - enables or disables its slaves according to their link status. - See section on High Availability for additional information. - - For ethernet cards not supporting MII status, the arp_interval and - arp_ip_target parameters must be specified for bonding to work - correctly. If packets have not been sent or received during the - specified arp_interval duration, an ARP request is sent to the - targets to generate send and receive traffic. If after this - interval, either the successful send and/or receive count has not - incremented, the next slave in the sequence will become the active - slave. - - If neither mii_monitor and arp_interval is configured, the bonding - driver will not handle this situation very well. The driver will - continue to send packets but some packets will be lost. Retransmits - will cause serious degradation of performance (in the case when one - of two slave links fails, 50% packets will be lost, which is a serious - problem for both TCP and UDP). + For just a single target the options would resemble: -6. Can bonding be used for High Availability? +# example options for ARP monitoring with one target +alias bond0 bonding +options bond0 arp_interval=60 arp_ip_target=192.168.0.100 - Yes, if you use MII monitoring and ALL your cards support MII link - status reporting. See section on High Availability for more - information. -7. Which switches/systems does it work with? +8.3 MII Monitor Operation +------------------------- - In round-robin and XOR mode, it works with systems that support - trunking: + The MII monitor monitors only the carrier state of the local +network interface. It accomplishes this in one of three ways: by +depending upon the device driver to maintain its carrier state, by +querying the device's MII registers, or by making an ethtool query to +the device. + + If the use_carrier module parameter is 1 (the default value), +then the MII monitor will rely on the driver for carrier state +information (via the netif_carrier subsystem). As explained in the +use_carrier parameter information, above, if the MII monitor fails to +detect carrier loss on the device (e.g., when the cable is physically +disconnected), it may be that the driver does not support +netif_carrier. + + If use_carrier is 0, then the MII monitor will first query the +device's (via ioctl) MII registers and check the link state. If that +request fails (not just that it returns carrier down), then the MII +monitor will make an ethtool ETHOOL_GLINK request to attempt to obtain +the same information. If both methods fail (i.e., the driver either +does not support or had some error in processing both the MII register +and ethtool requests), then the MII monitor will assume the link is +up. - * Many Cisco switches and routers (look for EtherChannel support). - * SunTrunking software. - * Alteon AceDirector switches / WebOS (use Trunks). - * BayStack Switches (trunks must be explicitly configured). Stackable - models (450) can define trunks between ports on different physical - units. - * Linux bonding, of course ! - - In 802.3ad mode, it works with with systems that support IEEE 802.3ad - Dynamic Link Aggregation: - - * Extreme networks Summit 7i (look for link-aggregation). - * Many Cisco switches and routers (look for LACP support; this may - require an upgrade to your IOS software; LACP support was added - by Cisco in late 2002). - * Foundry Big Iron 4000 +9. Potential Sources of Trouble +=============================== - In active-backup, balance-tlb and balance-alb modes, it should work - with any Layer-II switch. +9.1 Adventures in Routing +------------------------- + When bonding is configured, it is important that the slave +devices not have routes that supercede routes of the master (or, +generally, not have routes at all). For example, suppose the bonding +device bond0 has two slaves, eth0 and eth1, and the routing table is +as follows: -8. Where does a bonding device get its MAC address from? +Kernel IP routing table +Destination Gateway Genmask Flags MSS Window irtt Iface +10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth0 +10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 +10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 bond0 +127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo - If not explicitly configured with ifconfig, the MAC address of the - bonding device is taken from its first slave device. This MAC address - is then passed to all following slaves and remains persistent (even if - the the first slave is removed) until the bonding device is brought - down or reconfigured. + This routing configuration will likely still update the +receive/transmit times in the driver (needed by the ARP monitor), but +may bypass the bonding driver (because outgoing traffic to, in this +case, another host on network 10 would use eth0 or eth1 before bond0). + + The ARP monitor (and ARP itself) may become confused by this +configuration, because ARP requests (generated by the ARP monitor) +will be sent on one interface (bond0), but the corresponding reply +will arrive on a different interface (eth0). This reply looks to ARP +as an unsolicited ARP reply (because ARP matches replies on an +interface basis), and is discarded. The MII monitor is not affected +by the state of the routing table. + + The solution here is simply to insure that slaves do not have +routes of their own, and if for some reason they must, those routes do +not supercede routes of their master. This should generally be the +case, but unusual configurations or errant manual or automatic static +route additions may cause trouble. - If you wish to change the MAC address, you can set it with ifconfig: +9.2 Ethernet Device Renaming +---------------------------- - # ifconfig bond0 hw ether 00:11:22:33:44:55 + On systems with network configuration scripts that do not +associate physical devices directly with network interface names (so +that the same physical device always has the same "ethX" name), it may +be necessary to add some special logic to either /etc/modules.conf or +/etc/modprobe.conf (depending upon which is installed on the system). - The MAC address can be also changed by bringing down/up the device - and then changing its slaves (or their order): + For example, given a modules.conf containing the following: - # ifconfig bond0 down ; modprobe -r bonding - # ifconfig bond0 .... up - # ifenslave bond0 eth... +alias bond0 bonding +options bond0 mode=some-mode miimon=50 +alias eth0 tg3 +alias eth1 tg3 +alias eth2 e1000 +alias eth3 e1000 + + If neither eth0 and eth1 are slaves to bond0, then when the +bond0 interface comes up, the devices may end up reordered. This +happens because bonding is loaded first, then its slave device's +drivers are loaded next. Since no other drivers have been loaded, +when the e1000 driver loads, it will receive eth0 and eth1 for its +devices, but the bonding configuration tries to enslave eth2 and eth3 +(which may later be assigned to the tg3 devices). + + Adding the following: + +add above bonding e1000 tg3 + + causes modprobe to load e1000 then tg3, in that order, when +bonding is loaded. This command is fully documented in the +modules.conf manual page. + + On systems utilizing modprobe.conf (or modprobe.conf.local), +an equivalent problem can occur. In this case, the following can be +added to modprobe.conf (or modprobe.conf.local, as appropriate), as +follows (all on one line; it has been split here for clarity): + +install bonding /sbin/modprobe tg3; /sbin/modprobe e1000; + /sbin/modprobe --ignore-install bonding + + This will, when loading the bonding module, rather than +performing the normal action, instead execute the provided command. +This command loads the device drivers in the order needed, then calls +modprobe with --ingore-install to cause the normal action to then take +place. Full documentation on this can be found in the modprobe.conf +and modprobe manual pages. + +9.3. Painfully Slow Or No Failed Link Detection By Miimon +--------------------------------------------------------- + + By default, bonding enables the use_carrier option, which +instructs bonding to trust the driver to maintain carrier state. + + As discussed in the options section, above, some drivers do +not support the netif_carrier_on/_off link state tracking system. +With use_carrier enabled, bonding will always see these links as up, +regardless of their actual state. + + Additionally, other drivers do support netif_carrier, but do +not maintain it in real time, e.g., only polling the link state at +some fixed interval. In this case, miimon will detect failures, but +only after some long period of time has expired. If it appears that +miimon is very slow in detecting link failures, try specifying +use_carrier=0 to see if that improves the failure detection time. If +it does, then it may be that the driver checks the carrier state at a +fixed interval, but does not cache the MII register values (so the +use_carrier=0 method of querying the registers directly works). If +use_carrier=0 does not improve the failover, then the driver may cache +the registers, or the problem may be elsewhere. + + Also, remember that miimon only checks for the device's +carrier state. It has no way to determine the state of devices on or +beyond other ports of a switch, or if a switch is refusing to pass +traffic while still maintaining carrier on. + +10. SNMP agents +=============== + + If running SNMP agents, the bonding driver should be loaded +before any network drivers participating in a bond. This requirement +is due to the the interface index (ipAdEntIfIndex) being associated to +the first interface found with a given IP address. That is, there is +only one ipAdEntIfIndex for each IP address. For example, if eth0 and +eth1 are slaves of bond0 and the driver for eth0 is loaded before the +bonding driver, the interface for the IP address will be associated +with the eth0 interface. This configuration is shown below, the IP +address 192.168.1.1 has an interface index of 2 which indexes to eth0 +in the ifDescr table (ifDescr.2). - This method will automatically take the address from the next slave - that will be added. + interfaces.ifTable.ifEntry.ifDescr.1 = lo + interfaces.ifTable.ifEntry.ifDescr.2 = eth0 + interfaces.ifTable.ifEntry.ifDescr.3 = eth1 + interfaces.ifTable.ifEntry.ifDescr.4 = eth2 + interfaces.ifTable.ifEntry.ifDescr.5 = eth3 + interfaces.ifTable.ifEntry.ifDescr.6 = bond0 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 5 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 4 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 - To restore your slaves' MAC addresses, you need to detach them - from the bond (`ifenslave -d bond0 eth0'). The bonding driver will then - restore the MAC addresses that the slaves had before they were enslaved. + This problem is avoided by loading the bonding driver before +any network drivers participating in a bond. Below is an example of +loading the bonding driver first, the IP address 192.168.1.1 is +correctly associated with ifDescr.2. -9. Which transmit polices can be used? + interfaces.ifTable.ifEntry.ifDescr.1 = lo + interfaces.ifTable.ifEntry.ifDescr.2 = bond0 + interfaces.ifTable.ifEntry.ifDescr.3 = eth0 + interfaces.ifTable.ifEntry.ifDescr.4 = eth1 + interfaces.ifTable.ifEntry.ifDescr.5 = eth2 + interfaces.ifTable.ifEntry.ifDescr.6 = eth3 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 6 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 5 + ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 - Round-robin, based on the order of enslaving, the output device - is selected base on the next available slave. Regardless of - the source and/or destination of the packet. + While some distributions may not report the interface name in +ifDescr, the association between the IP address and IfIndex remains +and SNMP functions such as Interface_Scan_Next will report that +association. - Active-backup policy that ensures that one and only one device will - transmit at any given moment. Active-backup policy is useful for - implementing high availability solutions using two hubs (see - section on High Availability). +11. Promiscuous mode +==================== - XOR, based on (src hw addr XOR dst hw addr) % slave count. This - policy selects the same slave for each destination hw address. + When running network monitoring tools, e.g., tcpdump, it is +common to enable promiscuous mode on the device, so that all traffic +is seen (instead of seeing only traffic destined for the local host). +The bonding driver handles promiscuous mode changes to the bonding +master device (e.g., bond0), and propogates the setting to the slave +devices. + + For the balance-rr, balance-xor, broadcast, and 802.3ad modes, +the promiscuous mode setting is propogated to all slaves. + + For the active-backup, balance-tlb and balance-alb modes, the +promiscuous mode setting is propogated only to the active slave. + + For balance-tlb mode, the active slave is the slave currently +receiving inbound traffic. + + For balance-alb mode, the active slave is the slave used as a +"primary." This slave is used for mode-specific control traffic, for +sending to peers that are unassigned or if the load is unbalanced. + + For the active-backup, balance-tlb and balance-alb modes, when +the active slave changes (e.g., due to a link failure), the +promiscuous setting will be propogated to the new active slave. + +12. High Availability Information +================================= + + High Availability refers to configurations that provide +maximum network availability by having redundant or backup devices, +links and switches between the host and the rest of the world. + + There are currently two basic methods for configuring to +maximize availability. They are dependent on the network topology and +the primary goal of the configuration, but in general, a configuration +can be optimized for maximum available bandwidth, or for maximum +network availability. + +12.1 High Availability in a Single Switch Topology +-------------------------------------------------- + + If two hosts (or a host and a switch) are directly connected +via multiple physical links, then there is no network availability +penalty for optimizing for maximum bandwidth: there is only one switch +(or peer), so if it fails, you have no alternative access to fail over +to. - Broadcast policy transmits everything on all slave interfaces. +Example 1 : host to switch (or other host) - 802.3ad, based on XOR but distributes traffic among all interfaces - in the active aggregator. + +----------+ +----------+ + | |eth0 eth0| switch | + | Host A +--------------------------+ or | + | +--------------------------+ other | + | |eth1 eth1| host | + +----------+ +----------+ - Transmit load balancing (balance-tlb) balances the traffic - according to the current load on each slave. The balancing is - clients based and the least loaded slave is selected for each new - client. The load of each slave is calculated relative to its speed - and enables load balancing in mixed speed teams. - Adaptive load balancing (balance-alb) uses the Transmit load - balancing for the transmit load. The receive load is balanced only - among the group of highest speed active slaves in the bond. The - load is distributed with round-robin i.e. next available slave in - the high speed group of active slaves. +12.1.1 Bonding Mode Selection for single switch topology +-------------------------------------------------------- -High Availability -================= + This configuration is the easiest to set up and to understand, +although you will have to decide which bonding mode best suits your +needs. The tradeoffs for each mode are detailed below: + +balance-rr: This mode is the only mode that will permit a single + TCP/IP connection to stripe traffic across multiple + interfaces. It is therefore the only mode that will allow a + single TCP/IP stream to utilize more than one interface's + worth of throughput. This comes at a cost, however: the + striping often results in peer systems receiving packets out + of order, causing TCP/IP's congestion control system to kick + in, often by retransmitting segments. + + It is possible to adjust TCP/IP's congestion limits by + altering the net.ipv4.tcp_reordering sysctl parameter. The + usual default value is 3, and the maximum useful value is 127. + For a four interface balance-rr bond, expect that a single + TCP/IP stream will utilize no more than approximately 2.3 + interface's worth of throughput, even after adjusting + tcp_reordering. + + If you are utilizing protocols other than TCP/IP, UDP for + example, and your application can tolerate out of order + delivery, then this mode can allow for single stream datagram + performance that scales near linearly as interfaces are added + to the bond. + + This mode requires the switch to have the appropriate ports + configured for "etherchannel" or "trunking." + +active-backup: There is not much advantage in this network topology to + the active-backup mode, as the inactive backup devices are all + connected to the same peer as the primary. In this case, a + load balancing mode (with link monitoring) will provide the + same level of network availability, but with increased + available bandwidth. On the plus side, it does not require + any configuration of the switch. + +balance-xor: This mode will limit traffic such that packets destined + for specific peers will always be sent over the same + interface. Since the destination is determined by the MAC + addresses involved, this may be desirable if you have a large + network with many hosts. It is likely to be suboptimal if all + your traffic is passed through a single router, however. As + with balance-rr, the switch ports need to be configured for + "etherchannel" or "trunking." + +broadcast: Like active-backup, there is not much advantage to this + mode in this type of network topology. + +802.3ad: This mode can be a good choice for this type of network + topology. The 802.3ad mode is an IEEE standard, so all peers + that implement 802.3ad should interoperate well. The 802.3ad + protocol includes automatic configuration of the aggregates, + so minimal manual configuration of the switch is needed + (typically only to designate that some set of devices is + usable for 802.3ad). The 802.3ad standard also mandates that + frames be delivered in order (within certain limits), so in + general single connections will not see misordering of + packets. The 802.3ad mode does have some drawbacks: the + standard mandates that all devices in the aggregate operate at + the same speed and duplex. Also, as with all bonding load + balance modes other than balance-rr, no single connection will + be able to utilize more than a single interface's worth of + bandwidth. Additionally, the linux bonding 802.3ad + implementation distributes traffic by peer (using an XOR of + MAC addresses), so in general all traffic to a particular + destination will use the same interface. Finally, the 802.3ad + mode mandates the use of the MII monitor, therefore, the ARP + monitor is not available in this mode. + +balance-tlb: This mode is also a good choice for this type of + topology. It has no special switch configuration + requirements, and balances outgoing traffic by peer, in a + vaguely intelligent manner (not a simple XOR as in balance-xor + or 802.3ad mode), so that unlucky MAC addresses will not all + "bunch up" on a single interface. Interfaces may be of + differing speeds. On the down side, in this mode all incoming + traffic arrives over a single interface, this mode requires + certain ethtool support in the network device driver of the + slave interfaces, and the ARP monitor is not available. + +balance-alb: This mode is everything that balance-tlb is, and more. It + has all of the features (and restrictions) of balance-tlb, and + will also balance incoming traffic from peers (as described in + the Bonding Module Options section, above). The only extra + down side to this mode is that the network device driver must + support changing the hardware address while the device is + open. + +12.1.2 Link Monitoring for Single Switch Topology +------------------------------------------------- + + The choice of link monitoring may largely depend upon which +mode you choose to use. The more advanced load balancing modes do not +support the use of the ARP monitor, and are thus restricted to using +the MII monitor (which does not provide as high a level of assurance +as the ARP monitor). + + +12.2 High Availability in a Multiple Switch Topology +---------------------------------------------------- + + With multiple switches, the configuration of bonding and the +network changes dramatically. In multiple switch topologies, there is +a tradeoff between network availability and usable bandwidth. -To implement high availability using the bonding driver, the driver needs to be -compiled as a module, because currently it is the only way to pass parameters -to the driver. This may change in the future. - -High availability is achieved by using MII or ETHTOOL status reporting. You -need to verify that all your interfaces support MII or ETHTOOL link status -reporting. On Linux kernel 2.2.17, all the 100 Mbps capable drivers and -yellowfin gigabit driver support MII. To determine if ETHTOOL link reporting -is available for interface eth0, type "ethtool eth0" and the "Link detected:" -line should contain the correct link status. If your system has an interface -that does not support MII or ETHTOOL status reporting, a failure of its link -will not be detected! A message indicating MII and ETHTOOL is not supported by -a network driver is logged when the bonding driver is loaded with a non-zero -miimon value. - -The bonding driver can regularly check all its slaves links using the ETHTOOL -IOCTL (ETHTOOL_GLINK command) or by checking the MII status registers. The -check interval is specified by the module argument "miimon" (MII monitoring). -It takes an integer that represents the checking time in milliseconds. It -should not come to close to (1000/HZ) (10 milli-seconds on i386) because it -may then reduce the system interactivity. A value of 100 seems to be a good -starting point. It means that a dead link will be detected at most 100 -milli-seconds after it goes down. - -Example: - - # modprobe bonding miimon=100 - -Or, put the following line in /etc/modprobe.conf: - - options bond0 miimon=100 - -There are currently two policies for high availability. They are dependent on -whether: - - a) hosts are connected to a single host or switch that support trunking - - b) hosts are connected to several different switches or a single switch that - does not support trunking - - -1) High Availability on a single switch or host - load balancing ----------------------------------------------------------------- -It is the easiest to set up and to understand. Simply configure the -remote equipment (host or switch) to aggregate traffic over several -ports (Trunk, EtherChannel, etc.) and configure the bonding interfaces. -If the module has been loaded with the proper MII option, it will work -automatically. You can then try to remove and restore different links -and see in your logs what the driver detects. When testing, you may -encounter problems on some buggy switches that disable the trunk for a -long time if all ports in a trunk go down. This is not Linux, but really -the switch (reboot it to ensure). + Below is a sample network, configured to maximize the +availability of the network: -Example 1 : host to host at twice the speed + | | + |port3 port3| + +-----+----+ +-----+----+ + | |port2 ISL port2| | + | switch A +--------------------------+ switch B | + | | | | + +-----+----+ +-----++---+ + |port1 port1| + | +-------+ | + +-------------+ host1 +---------------+ + eth0 +-------+ eth1 - +----------+ +----------+ - | |eth0 eth0| | - | Host A +--------------------------+ Host B | - | +--------------------------+ | - | |eth1 eth1| | - +----------+ +----------+ + In this configuration, there is a link between the two +switches (ISL, or inter switch link), and multiple ports connecting to +the outside world ("port3" on each switch). There is no technical +reason that this could not be extended to a third switch. + +12.2.1 Bonding Mode Selection for Multiple Switch Topology +---------------------------------------------------------- + + In a topology such as this, the active-backup and broadcast +modes are the only useful bonding modes; the other modes require all +links to terminate on the same peer for them to behave rationally. + +active-backup: This is generally the preferred mode, particularly if + the switches have an ISL and play together well. If the + network configuration is such that one switch is specifically + a backup switch (e.g., has lower capacity, higher cost, etc), + then the primary option can be used to insure that the + preferred link is always used when it is available. + +broadcast: This mode is really a special purpose mode, and is suitable + only for very specific needs. For example, if the two + switches are not connected (no ISL), and the networks beyond + them are totally independant. In this case, if it is + necessary for some specific one-way traffic to reach both + independent networks, then the broadcast mode may be suitable. + +12.2.2 Link Monitoring Selection for Multiple Switch Topology +------------------------------------------------------------- + + The choice of link monitoring ultimately depends upon your +switch. If the switch can reliably fail ports in response to other +failures, then either the MII or ARP monitors should work. For +example, in the above example, if the "port3" link fails at the remote +end, the MII monitor has no direct means to detect this. The ARP +monitor could be configured with a target at the remote end of port3, +thus detecting that failure without switch support. + + In general, however, in a multiple switch topology, the ARP +monitor can provide a higher level of reliability in detecting link +failures. Additionally, it should be configured with multiple targets +(at least one for each switch in the network). This will insure that, +regardless of which switch is active, the ARP monitor has a suitable +target to query. + + +12.3 Switch Behavior Issues for High Availability +------------------------------------------------- + + You may encounter issues with the timing of link up and down +reporting by the switch. + + First, when a link comes up, some switches may indicate that +the link is up (carrier available), but not pass traffic over the +interface for some period of time. This delay is typically due to +some type of autonegotiation or routing protocol, but may also occur +during switch initialization (e.g., during recovery after a switch +failure). If you find this to be a problem, specify an appropriate +value to the updelay bonding module option to delay the use of the +relevant interface(s). + + Second, some switches may "bounce" the link state one or more +times while a link is changing state. This occurs most commonly while +the switch is initializing. Again, an appropriate updelay value may +help, but note that if all links are down, then updelay is ignored +when any link becomes active (the slave closest to completing its +updelay is chosen). + + Note that when a bonding interface has no active links, the +driver will immediately reuse the first link that goes up, even if +updelay parameter was specified. If there are slave interfaces +waiting for the updelay timeout to expire, the interface that first +went into that state will be immediately reused. This reduces down +time of the network if the value of updelay has been overestimated. + + In addition to the concerns about switch timings, if your +switches take a long time to go into backup mode, it may be desirable +to not activate a backup interface immediately after a link goes down. +Failover may be delayed via the downdelay bonding module option. + +13. Hardware Specific Considerations +==================================== + + This section contains additional information for configuring +bonding on specific hardware platforms, or for interfacing bonding +with particular switches or other devices. + +13.1 IBM BladeCenter +-------------------- + + This applies to the JS20 and similar systems. + + On the JS20 blades, the bonding driver supports only +balance-rr, active-backup, balance-tlb and balance-alb modes. This is +largely due to the network topology inside the BladeCenter, detailed +below. + +JS20 network adapter information +-------------------------------- + + All JS20s come with two Broadcom Gigabit Ethernet ports +integrated on the planar. In the BladeCenter chassis, the eth0 port +of all JS20 blades is hard wired to I/O Module #1; similarly, all eth1 +ports are wired to I/O Module #2. An add-on Broadcom daughter card +can be installed on a JS20 to provide two more Gigabit Ethernet ports. +These ports, eth2 and eth3, are wired to I/O Modules 3 and 4, +respectively. + + Each I/O Module may contain either a switch or a passthrough +module (which allows ports to be directly connected to an external +switch). Some bonding modes require a specific BladeCenter internal +network topology in order to function; these are detailed below. - On each host : - # modprobe bonding miimon=100 - # ifconfig bond0 addr - # ifenslave bond0 eth0 eth1 + Additional BladeCenter-specific networking information can be +found in two IBM Redbooks (www.ibm.com/redbooks): -Example 2 : host to switch at twice the speed +"IBM eServer BladeCenter Networking Options" +"IBM eServer BladeCenter Layer 2-7 Network Switching" - +----------+ +----------+ - | |eth0 port1| | - | Host A +--------------------------+ switch | - | +--------------------------+ | - | |eth1 port2| | - +----------+ +----------+ +BladeCenter networking configuration +------------------------------------ - On host A : On the switch : - # modprobe bonding miimon=100 # set up a trunk on port1 - # ifconfig bond0 addr and port2 - # ifenslave bond0 eth0 eth1 + Because a BladeCenter can be configured in a very large number +of ways, this discussion will be confined to describing basic +configurations. + + Normally, Ethernet Switch Modules (ESM) are used in I/O +modules 1 and 2. In this configuration, the eth0 and eth1 ports of a +JS20 will be connected to different internal switches (in the +respective I/O modules). + + An optical passthru module (OPM) connects the I/O module +directly to an external switch. By using OPMs in I/O module #1 and +#2, the eth0 and eth1 interfaces of a JS20 can be redirected to the +outside world and connected to a common external switch. + + Depending upon the mix of ESM and OPM modules, the network +will appear to bonding as either a single switch topology (all OPM +modules) or as a multiple switch topology (one or more ESM modules, +zero or more OPM modules). It is also possible to connect ESM modules +together, resulting in a configuration much like the example in "High +Availability in a multiple switch topology." + +Requirements for specifc modes +------------------------------ + + The balance-rr mode requires the use of OPM modules for +devices in the bond, all connected to an common external switch. That +switch must be configured for "etherchannel" or "trunking" on the +appropriate ports, as is usual for balance-rr. + + The balance-alb and balance-tlb modes will function with +either switch modules or passthrough modules (or a mix). The only +specific requirement for these modes is that all network interfaces +must be able to reach all destinations for traffic sent over the +bonding device (i.e., the network must converge at some point outside +the BladeCenter). + + The active-backup mode has no additional requirements. + +Link monitoring issues +---------------------- + + When an Ethernet Switch Module is in place, only the ARP +monitor will reliably detect link loss to an external switch. This is +nothing unusual, but examination of the BladeCenter cabinet would +suggest that the "external" network ports are the ethernet ports for +the system, when it fact there is a switch between these "external" +ports and the devices on the JS20 system itself. The MII monitor is +only able to detect link failures between the ESM and the JS20 system. + + When a passthrough module is in place, the MII monitor does +detect failures to the "external" port, which is then directly +connected to the JS20 system. + +Other concerns +-------------- + + The Serial Over LAN link is established over the primary +ethernet (eth0) only, therefore, any loss of link to eth0 will result +in losing your SoL connection. It will not fail over with other +network traffic. + + It may be desirable to disable spanning tree on the switch +(either the internal Ethernet Switch Module, or an external switch) to +avoid fail-over delays issues when using bonding. + + +14. Frequently Asked Questions +============================== +1. Is it SMP safe? -2) High Availability on two or more switches (or a single switch without - trunking support) ---------------------------------------------------------------------------- -This mode is more problematic because it relies on the fact that there -are multiple ports and the host's MAC address should be visible on one -port only to avoid confusing the switches. + Yes. The old 2.0.xx channel bonding patch was not SMP safe. +The new driver was designed to be SMP safe from the start. -If you need to know which interface is the active one, and which ones are -backup, use ifconfig. All backup interfaces have the NOARP flag set. +2. What type of cards will work with it? -To use this mode, pass "mode=1" to the module at load time : + Any Ethernet type cards (you can even mix cards - a Intel +EtherExpress PRO/100 and a 3com 3c905b, for example). They need not +be of the same speed. - # modprobe bonding miimon=100 mode=active-backup +3. How many bonding devices can I have? - or: + There is no limit. - # modprobe bonding miimon=100 mode=1 +4. How many slaves can a bonding device have? -Or, put in your /etc/modprobe.conf : + This is limited only by the number of network interfaces Linux +supports and/or the number of network cards you can place in your +system. - options bond0 miimon=100 mode=active-backup +5. What happens when a slave link dies? -Example 1: Using multiple host and multiple switches to build a "no single -point of failure" solution. + If link monitoring is enabled, then the failing device will be +disabled. The active-backup mode will fail over to a backup link, and +other modes will ignore the failed link. The link will continue to be +monitored, and should it recover, it will rejoin the bond (in whatever +manner is appropriate for the mode). See the section on High +Availability for additional information. + + Link monitoring can be enabled via either the miimon or +arp_interval paramters (described in the module paramters section, +above). In general, miimon monitors the carrier state as sensed by +the underlying network device, and the arp monitor (arp_interval) +monitors connectivity to another host on the local network. + + If no link monitoring is configured, the bonding driver will +be unable to detect link failures, and will assume that all links are +always available. This will likely result in lost packets, and a +resulting degredation of performance. The precise performance loss +depends upon the bonding mode and network configuration. +6. Can bonding be used for High Availability? - | | - |port3 port3| - +-----+----+ +-----+----+ - | |port7 ISL port7| | - | switch A +--------------------------+ switch B | - | +--------------------------+ | - | |port8 port8| | - +----++----+ +-----++---+ - port2||port1 port1||port2 - || +-------+ || - |+-------------+ host1 +---------------+| - | eth0 +-------+ eth1 | - | | - | +-------+ | - +--------------+ host2 +----------------+ - eth0 +-------+ eth1 + Yes. See the section on High Availability for details. -In this configuration, there is an ISL - Inter Switch Link (could be a trunk), -several servers (host1, host2 ...) attached to both switches each, and one or -more ports to the outside world (port3...). One and only one slave on each host -is active at a time, while all links are still monitored (the system can -detect a failure of active and backup links). - -Each time a host changes its active interface, it sticks to the new one until -it goes down. In this example, the hosts are negligibly affected by the -expiration time of the switches' forwarding tables. - -If host1 and host2 have the same functionality and are used in load balancing -by another external mechanism, it is good to have host1's active interface -connected to one switch and host2's to the other. Such system will survive -a failure of a single host, cable, or switch. The worst thing that may happen -in the case of a switch failure is that half of the hosts will be temporarily -unreachable until the other switch expires its tables. +7. Which switches/systems does it work with? -Example 2: Using multiple ethernet cards connected to a switch to configure - NIC failover (switch is not required to support trunking). + The full answer to this depends upon the desired mode. + In the basic balance modes (balance-rr and balance-xor), it +works with any system that supports etherchannel (also called +trunking). Most managed switches currently available have such +support, and many unmananged switches as well. + + The advanced balance modes (balance-tlb and balance-alb) do +not have special switch requirements, but do need device drivers that +support specific features (described in the appropriate section under +module paramters, above). + + In 802.3ad mode, it works with with systems that support IEEE +802.3ad Dynamic Link Aggregation. Most managed and many unmanaged +switches currently available support 802.3ad. - +----------+ +----------+ - | |eth0 port1| | - | Host A +--------------------------+ switch | - | +--------------------------+ | - | |eth1 port2| | - +----------+ +----------+ + The active-backup mode should work with any Layer-II switch. - On host A : On the switch : - # modprobe bonding miimon=100 mode=1 # (optional) minimize the time - # ifconfig bond0 addr # for table expiration - # ifenslave bond0 eth0 eth1 +8. Where does a bonding device get its MAC address from? -Each time the host changes its active interface, it sticks to the new one until -it goes down. In this example, the host is strongly affected by the expiration -time of the switch forwarding table. + If not explicitly configured with ifconfig, the MAC address of +the bonding device is taken from its first slave device. This MAC +address is then passed to all following slaves and remains persistent +(even if the the first slave is removed) until the bonding device is +brought down or reconfigured. + + If you wish to change the MAC address, you can set it with +ifconfig: + +# ifconfig bond0 hw ether 00:11:22:33:44:55 + + The MAC address can be also changed by bringing down/up the +device and then changing its slaves (or their order): + +# ifconfig bond0 down ; modprobe -r bonding +# ifconfig bond0 .... up +# ifenslave bond0 eth... + This method will automatically take the address from the next +slave that is added. -3) Adapting to your switches' timing ------------------------------------- -If your switches take a long time to go into backup mode, it may be -desirable not to activate a backup interface immediately after a link goes -down. It is possible to delay the moment at which a link will be -completely disabled by passing the module parameter "downdelay" (in -milliseconds, must be a multiple of miimon). - -When a switch reboots, it is possible that its ports report "link up" status -before they become usable. This could fool a bond device by causing it to -use some ports that are not ready yet. It is possible to delay the moment at -which an active link will be reused by passing the module parameter "updelay" -(in milliseconds, must be a multiple of miimon). - -A similar situation can occur when a host re-negotiates a lost link with the -switch (a case of cable replacement). - -A special case is when a bonding interface has lost all slave links. Then the -driver will immediately reuse the first link that goes up, even if updelay -parameter was specified. (If there are slave interfaces in the "updelay" state, -the interface that first went into that state will be immediately reused.) This -allows to reduce down-time if the value of updelay has been overestimated. - -Examples : - - # modprobe bonding miimon=100 mode=1 downdelay=2000 updelay=5000 - # modprobe bonding miimon=100 mode=balance-rr downdelay=0 updelay=5000 - - -Promiscuous Sniffing notes -========================== - -If you wish to bond channels together for a network sniffing -application --- you wish to run tcpdump, or ethereal, or an IDS like -snort, with its input aggregated from multiple interfaces using the -bonding driver --- then you need to handle the Promiscuous interface -setting by hand. Specifically, when you "ifconfing bond0 up" you -must add the promisc flag there; it will be propagated down to the -slave interfaces at ifenslave time; a full example might look like: - - ifconfig bond0 promisc up - for if in eth1 eth2 ...;do - ifconfig $if up - ifenslave bond0 $if - done - snort ... -i bond0 ... - -Ifenslave also wants to propagate addresses from interface to -interface, appropriately for its design functions in HA and channel -capacity aggregating; but it works fine for unnumbered interfaces; -just ignore all the warnings it emits. + To restore your slaves' MAC addresses, you need to detach them +from the bond (`ifenslave -d bond0 eth0'). The bonding driver will +then restore the MAC addresses that the slaves had before they were +enslaved. +15. Resources and Links +======================= -8021q VLAN support -================== +The latest version of the bonding driver can be found in the latest +version of the linux kernel, found on http://kernel.org -It is possible to configure VLAN devices over a bond interface using the 8021q -driver. However, only packets coming from the 8021q driver and passing through -bonding will be tagged by default. Self generated packets, like bonding's -learning packets or ARP packets generated by either ALB mode or the ARP -monitor mechanism, are tagged internally by bonding itself. As a result, -bonding has to "learn" what VLAN IDs are configured on top of it, and it uses -those IDs to tag self generated packets. - -For simplicity reasons, and to support the use of adapters that can do VLAN -hardware acceleration offloding, the bonding interface declares itself as -fully hardware offloaing capable, it gets the add_vid/kill_vid notifications -to gather the necessary information, and it propagates those actions to the -slaves. -In case of mixed adapter types, hardware accelerated tagged packets that should -go through an adapter that is not offloading capable are "un-accelerated" by the -bonding driver so the VLAN tag sits in the regular location. - -VLAN interfaces *must* be added on top of a bonding interface only after -enslaving at least one slave. This is because until the first slave is added the -bonding interface has a HW address of 00:00:00:00:00:00, which will be copied by -the VLAN interface when it is created. - -Notice that a problem would occur if all slaves are released from a bond that -still has VLAN interfaces on top of it. When later coming to add new slaves, the -bonding interface would get a HW address from the first slave, which might not -match that of the VLAN interfaces. It is recommended that either all VLANs are -removed and then re-added, or to manually set the bonding interface's HW -address so it matches the VLAN's. (Note: changing a VLAN interface's HW address -would set the underlying device -- i.e. the bonding interface -- to promiscouos -mode, which might not be what you want). - - -Limitations -=========== -The main limitations are : - - only the link status is monitored. If the switch on the other side is - partially down (e.g. doesn't forward anymore, but the link is OK), the link - won't be disabled. Another way to check for a dead link could be to count - incoming frames on a heavily loaded host. This is not applicable to small - servers, but may be useful when the front switches send multicast - information on their links (e.g. VRRP), or even health-check the servers. - Use the arp_interval/arp_ip_target parameters to count incoming/outgoing - frames. +Discussions regarding the bonding driver take place primarily on the +bonding-devel mailing list, hosted at sourceforge.net. If you have +questions or problems, post them to the list. +bonding-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/bonding-devel -Resources and Links -=================== +There is also a project site on sourceforge. -Current development on this driver is posted to: - - http://www.sourceforge.net/projects/bonding/ +http://www.sourceforge.net/projects/bonding Donald Becker's Ethernet Drivers and diag programs may be found at : - http://www.scyld.com/network/ -You will also find a lot of information regarding Ethernet, NWay, MII, etc. at -www.scyld.com. - -Patches for 2.2 kernels are at Willy Tarreau's site : - - http://wtarreau.free.fr/pub/bonding/ - - http://www-miaif.lip6.fr/~tarreau/pub/bonding/ - -To get latest informations about Linux Kernel development, please consult -the Linux Kernel Mailing List Archives at : - http://www.ussg.iu.edu/hypermail/linux/kernel/ +You will also find a lot of information regarding Ethernet, NWay, MII, +etc. at www.scyld.com. -- END -- diff -Nru a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt --- a/Documentation/networking/e100.txt 2005-03-07 14:54:18 -08:00 +++ b/Documentation/networking/e100.txt 2005-03-07 14:54:18 -08:00 @@ -140,8 +140,7 @@ NAPI ---- - NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled - or disabled based on the configuration of the kernel. + NAPI (Rx polling mode) is supported in the e100 driver. See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. diff -Nru a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt --- a/Documentation/networking/ixgb.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/networking/ixgb.txt 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -September 13, 2004 +November 17, 2004 Contents @@ -18,8 +18,7 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and -EM64T systems. +of Adapters, version 1.0.x. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed @@ -71,8 +70,8 @@ Ethernet PAUSE frames. RxDescriptors -Valid Range: 64-4096 -Default Value: 1024 +Valid Range: 64-512 +Default Value: 512 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for diff -Nru a/Documentation/pci.txt b/Documentation/pci.txt --- a/Documentation/pci.txt 2005-03-07 14:54:17 -08:00 +++ b/Documentation/pci.txt 2005-03-07 14:54:17 -08:00 @@ -99,10 +99,10 @@ Users need pass only as many fields as necessary; vendor, device, subvendor, and subdevice fields default to PCI_ANY_ID (FFFFFFFF), class and classmask fields default to 0, and driver_data defaults to -0UL. Device drivers must call - pci_dynids_set_use_driver_data(pci_driver *, 1) -in order for the driver_data field to get passed to the driver. -Otherwise, only a 0 is passed in that field. +0UL. Device drivers must initialize use_driver_data in the dynids struct +in their pci_driver struct prior to calling pci_register_driver in order +for the driver_data field to get passed to the driver. Otherwise, only a +0 is passed in that field. When the driver exits, it just calls pci_unregister_driver() and the PCI layer automatically calls the remove hook for all devices handled by the driver. diff -Nru a/Documentation/tty.txt b/Documentation/tty.txt --- a/Documentation/tty.txt 2005-03-07 14:54:18 -08:00 +++ b/Documentation/tty.txt 2005-03-07 14:54:18 -08:00 @@ -93,6 +93,11 @@ ldisc must be careful about setting order and to handle unexpected calls. Must not sleep. + The driver is forbidden from calling this directly + from the ->write call from the ldisc as the ldisc + is permitted to call the driver write method from + this function. In such a situation defer it. + Locking diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2005-03-07 14:54:17 -08:00 +++ b/MAINTAINERS 2005-03-07 14:54:17 -08:00 @@ -457,6 +457,11 @@ M: marcel@holtmann.org S: Maintained +BLUETOOTH HCI BPA10X DRIVER +P: Marcel Holtmann +M: marcel@holtmann.org +S: Maintained + BLUETOOTH HCI BFUSB DRIVER P: Marcel Holtmann M: marcel@holtmann.org @@ -596,11 +601,10 @@ S: Maintained CRYPTO API -P: James Morris -M: jmorris@redhat.com +P: Herbert Xu +M: herbert@gondor.apana.org.au P: David S. Miller M: davem@davemloft.net -W http://samba.org/~jamesm/crypto/ L: linux-kernel@vger.kernel.org S: Maintained @@ -910,10 +914,17 @@ W: http://www.icp-vortex.com/ S: Supported -GENERIC HDLC DRIVER, N2 AND C101 DRIVERS +GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS P: Krzysztof Halasa M: khc@pm.waw.pl -W: http://hq.pm.waw.pl/hdlc/ +W: http://www.kernel.org/pub/linux/utils/net/hdlc/ +S: Maintained + +HARMONY SOUND DRIVER +P: Kyle McMartin +M: kyle@parisc-linux.org +W: http://www.parisc-linux.org/~kyle/harmony/ +L: parisc-linux@lists.parisc-linux.org S: Maintained HAYES ESP SERIAL DRIVER @@ -991,8 +1002,8 @@ I2C AND SENSORS DRIVERS P: Greg Kroah-Hartman M: greg@kroah.com -P: Philip Edelbrock -M: phil@netroedge.com +P: Jean Delvare +M: khali@linux-fr.org L: sensors@stimpy.netroedge.com W: http://www.lm-sensors.nu/ S: Maintained @@ -1082,9 +1093,21 @@ L: linux-kernel@vger.kernel.org S: Maintained +IEEE 1394 ETHERNET (eth1394) +L: linux1394-devel@lists.sourceforge.net +W: http://www.linux1394.org/ +S: Orphan + +IEEE 1394 SBP2 +L: linux1394-devel@lists.sourceforge.net +W: http://www.linux1394.org/ +S: Orphan + IEEE 1394 SUBSYSTEM P: Ben Collins M: bcollins@debian.org +P: Jody McIntyre +M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1092,13 +1115,15 @@ IEEE 1394 OHCI DRIVER P: Ben Collins M: bcollins@debian.org +P: Jody McIntyre +M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained IEEE 1394 PCILYNX DRIVER -P: Andreas Bombe -M: andreas.bombe@munich.netsurf.de +P: Jody McIntyre +M: scjody@steamballoon.com L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1106,6 +1131,8 @@ IEEE 1394 RAW I/O DRIVER P: Ben Collins M: bcollins@debian.org +P: Dan Dennedy +M: dan@dennedy.org L: linux1394-devel@lists.sourceforge.net W: http://www.linux1394.org/ S: Maintained @@ -1247,8 +1274,8 @@ JFS FILESYSTEM P: Dave Kleikamp M: shaggy@austin.ibm.com -L: jfs-discussion@oss.software.ibm.com -W: http://oss.software.ibm.com/jfs/ +L: jfs-discussion@lists.sourceforge.net +W: http://jfs.sourceforge.net/ S: Supported KCONFIG @@ -1372,7 +1399,7 @@ L: linuxppc-embedded@ozlabs.org S: Maintained -LINUX FOR POWERPC EMBEDDED PPC85XX +LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX P: Kumar Gala M: kumar.gala@freescale.com W: http://www.penguinppc.org/ diff -Nru a/arch/arm/Kconfig b/arch/arm/Kconfig --- a/arch/arm/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/Kconfig 2005-03-07 14:54:17 -08:00 @@ -231,7 +231,7 @@ config SHARP_LOCOMO bool - depends on SA1100_COLLIE + depends on SA1100_COLLIE || MACH_POODLE default y config SHARP_SCOOP diff -Nru a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c --- a/arch/arm/common/locomo.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/common/locomo.c 2005-03-07 14:54:16 -08:00 @@ -34,11 +34,33 @@ #include +/* M62332 output channel selection */ +#define M62332_EVR_CH 1 /* M62332 volume channel number */ + /* 0 : CH.1 , 1 : CH. 2 */ +/* DAC send data */ +#define M62332_SLAVE_ADDR 0x4e /* Slave address */ +#define M62332_W_BIT 0x00 /* W bit (0 only) */ +#define M62332_SUB_ADDR 0x00 /* Sub address */ +#define M62332_A_BIT 0x00 /* A bit (0 only) */ + +/* DAC setup and hold times (expressed in us) */ +#define DAC_BUS_FREE_TIME 5 /* 4.7 us */ +#define DAC_START_SETUP_TIME 5 /* 4.7 us */ +#define DAC_STOP_SETUP_TIME 4 /* 4.0 us */ +#define DAC_START_HOLD_TIME 5 /* 4.7 us */ +#define DAC_SCL_LOW_HOLD_TIME 5 /* 4.7 us */ +#define DAC_SCL_HIGH_HOLD_TIME 4 /* 4.0 us */ +#define DAC_DATA_SETUP_TIME 1 /* 250 ns */ +#define DAC_DATA_HOLD_TIME 1 /* 300 ns */ +#define DAC_LOW_SETUP_TIME 1 /* 300 ns */ +#define DAC_HIGH_SETUP_TIME 1 /* 1000 ns */ + /* the following is the overall data for the locomo chip */ struct locomo { struct device *dev; unsigned long phys; unsigned int irq; + spinlock_t lock; void *base; }; @@ -50,7 +72,57 @@ const char * name; }; +/* All the locomo devices. If offset is non-zero, the mapbase for the + * locomo_dev will be set to the chip base plus offset. If offset is + * zero, then the mapbase for the locomo_dev will be set to zero. An + * offset of zero means the device only uses GPIOs or other helper + * functions inside this file */ static struct locomo_dev_info locomo_devices[] = { + { + .devid = LOCOMO_DEVID_KEYBOARD, + .irq = { + IRQ_LOCOMO_KEY, + }, + .name = "locomo-keyboard", + .offset = LOCOMO_KEYBOARD, + .length = 16, + }, + { + .devid = LOCOMO_DEVID_FRONTLIGHT, + .irq = {}, + .name = "locomo-frontlight", + .offset = LOCOMO_FRONTLIGHT, + .length = 8, + + }, + { + .devid = LOCOMO_DEVID_BACKLIGHT, + .irq = {}, + .name = "locomo-backlight", + .offset = LOCOMO_BACKLIGHT, + .length = 8, + }, + { + .devid = LOCOMO_DEVID_AUDIO, + .irq = {}, + .name = "locomo-audio", + .offset = LOCOMO_AUDIO, + .length = 4, + }, + { + .devid = LOCOMO_DEVID_LED, + .irq = {}, + .name = "locomo-led", + .offset = LOCOMO_LED, + .length = 8, + }, + { + .devid = LOCOMO_DEVID_UART, + .irq = {}, + .name = "locomo-uart", + .offset = 0, + .length = 0, + }, }; @@ -146,7 +218,7 @@ struct irqdesc *d; void *mapbase = get_irq_chipdata(irq); - if (locomo_readl(mapbase + LOCOMO_KIC) & 0x0001) { + if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { d = irq_desc + LOCOMO_IRQ_KEY_START; d->handle(LOCOMO_IRQ_KEY_START, d, regs); } @@ -156,27 +228,27 @@ { void *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_KIC); + r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START)); - locomo_writel(r, mapbase + LOCOMO_KIC); + locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } static void locomo_key_mask_irq(unsigned int irq) { void *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_KIC); + r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START)); - locomo_writel(r, mapbase + LOCOMO_KIC); + locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } static void locomo_key_unmask_irq(unsigned int irq) { void *mapbase = get_irq_chipdata(irq); unsigned int r; - r = locomo_readl(mapbase + LOCOMO_KIC); + r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START)); - locomo_writel(r, mapbase + LOCOMO_KIC); + locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } static struct irqchip locomo_key_chip = { @@ -421,13 +493,11 @@ { struct locomo_dev *dev = LOCOMO_DEV(_dev); - release_resource(&dev->res); kfree(dev); } static int -locomo_init_one_child(struct locomo *lchip, struct resource *parent, - struct locomo_dev_info *info) +locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) { struct locomo_dev *dev; int ret; @@ -454,25 +524,17 @@ dev->dev.bus = &locomo_bus_type; dev->dev.release = locomo_dev_release; dev->dev.coherent_dma_mask = lchip->dev->coherent_dma_mask; - dev->res.start = lchip->phys + info->offset; - dev->res.end = dev->res.start + info->length; - dev->res.name = dev->dev.bus_id; - dev->res.flags = IORESOURCE_MEM; - dev->mapbase = lchip->base + info->offset; - memmove(dev->irq, info->irq, sizeof(dev->irq)); - if (info->length) { - ret = request_resource(parent, &dev->res); - if (ret) { - printk("LoCoMo: failed to allocate resource for %s\n", - dev->res.name); - goto out; - } - } + if (info->offset) + dev->mapbase = lchip->base + info->offset; + else + dev->mapbase = 0; + dev->length = info->length; + + memmove(dev->irq, info->irq, sizeof(dev->irq)); ret = device_register(&dev->dev); if (ret) { - release_resource(&dev->res); out: kfree(dev); } @@ -504,6 +566,8 @@ memset(lchip, 0, sizeof(struct locomo)); + spin_lock_init(&lchip->lock); + lchip->dev = me; dev_set_drvdata(lchip->dev, lchip); @@ -523,7 +587,7 @@ /* locomo initialize */ locomo_writel(0, lchip->base + LOCOMO_ICR); /* KEYBOARD */ - locomo_writel(0, lchip->base + LOCOMO_KIC); + locomo_writel(0, lchip->base + LOCOMO_KEYBOARD + LOCOMO_KIC); /* GPIO */ locomo_writel(0, lchip->base + LOCOMO_GPO); @@ -534,8 +598,8 @@ locomo_writel(0, lchip->base + LOCOMO_GIE); /* FrontLight */ - locomo_writel(0, lchip->base + LOCOMO_ALS); - locomo_writel(0, lchip->base + LOCOMO_ALD); + locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); + locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); /* Longtime timer */ locomo_writel(0, lchip->base + LOCOMO_LTINT); /* SPI */ @@ -578,7 +642,7 @@ locomo_setup_irq(lchip); for (i = 0; i < ARRAY_SIZE(locomo_devices); i++) - locomo_init_one_child(lchip, mem, &locomo_devices[i]); + locomo_init_one_child(lchip, &locomo_devices[i]); return 0; @@ -654,6 +718,238 @@ return (struct locomo *)dev_get_drvdata(ldev->dev.parent); } +void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned int dir) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int r; + + spin_lock_irqsave(&lchip->lock, flags); + + r = locomo_readl(lchip->base + LOCOMO_GPD); + r &= ~bits; + locomo_writel(r, lchip->base + LOCOMO_GPD); + + r = locomo_readl(lchip->base + LOCOMO_GPE); + if (dir) + r |= bits; + else + r &= ~bits; + locomo_writel(r, lchip->base + LOCOMO_GPE); + + spin_unlock_irqrestore(&lchip->lock, flags); +} + +unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int ret; + + spin_lock_irqsave(&lchip->lock, flags); + ret = locomo_readl(lchip->base + LOCOMO_GPL); + spin_unlock_irqrestore(&lchip->lock, flags); + + ret &= bits; + return ret; +} + +unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int ret; + + spin_lock_irqsave(&lchip->lock, flags); + ret = locomo_readl(lchip->base + LOCOMO_GPO); + spin_unlock_irqrestore(&lchip->lock, flags); + + ret &= bits; + return ret; +} + +void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int set) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + unsigned long flags; + unsigned int r; + + spin_lock_irqsave(&lchip->lock, flags); + + r = locomo_readl(lchip->base + LOCOMO_GPO); + if (set) + r |= bits; + else + r &= ~bits; + locomo_writel(r, lchip->base + LOCOMO_GPO); + + spin_unlock_irqrestore(&lchip->lock, flags); +} + +static void locomo_m62332_sendbit(void *mapbase, int bit) +{ + unsigned int r; + + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + + if (bit & 1) { + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + } else { + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + } + + udelay(DAC_DATA_SETUP_TIME); /* 250 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.0 usec */ +} + +void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel) +{ + struct locomo *lchip = locomo_chip_driver(ldev); + int i; + unsigned char data; + unsigned int r; + void *mapbase = lchip->base; + unsigned long flags; + + spin_lock_irqsave(&lchip->lock, flags); + + /* Start */ + udelay(DAC_BUS_FREE_TIME); /* 5.0 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.0 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_START_HOLD_TIME); /* 5.0 usec */ + udelay(DAC_DATA_HOLD_TIME); /* 300 nsec */ + + /* Send slave address and W bit (LSB is W bit) */ + data = (M62332_SLAVE_ADDR << 1) | M62332_W_BIT; + for (i = 1; i <= 8; i++) { + locomo_m62332_sendbit(mapbase, data >> (8 - i)); + } + + /* Check A bit */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ + if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ + printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); + return; + } + + /* Send Sub address (LSB is channel select) */ + /* channel = 0 : ch1 select */ + /* = 1 : ch2 select */ + data = M62332_SUB_ADDR + channel; + for (i = 1; i <= 8; i++) { + locomo_m62332_sendbit(mapbase, data >> (8 - i)); + } + + /* Check A bit */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ + if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ + printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); + return; + } + + /* Send DAC data */ + for (i = 1; i <= 8; i++) { + locomo_m62332_sendbit(mapbase, dac_data >> (8 - i)); + } + + /* Check A bit */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SDAOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ + if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ + printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); + return; + } + + /* stop */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r &= ~(LOCOMO_DAC_SCLOEB); + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 300 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4 usec */ + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_HIGH_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4 usec */ + + r = locomo_readl(mapbase + LOCOMO_DAC); + r |= LOCOMO_DAC_SCLOEB | LOCOMO_DAC_SDAOEB; + locomo_writel(r, mapbase + LOCOMO_DAC); + udelay(DAC_LOW_SETUP_TIME); /* 1000 nsec */ + udelay(DAC_SCL_LOW_HOLD_TIME); /* 4.7 usec */ + + spin_unlock_irqrestore(&lchip->lock, flags); +} + /* * LoCoMo "Register Access Bus." * @@ -755,3 +1051,8 @@ EXPORT_SYMBOL(locomo_driver_register); EXPORT_SYMBOL(locomo_driver_unregister); +EXPORT_SYMBOL(locomo_gpio_set_dir); +EXPORT_SYMBOL(locomo_gpio_read_level); +EXPORT_SYMBOL(locomo_gpio_read_output); +EXPORT_SYMBOL(locomo_gpio_write); +EXPORT_SYMBOL(locomo_m62332_senddata); diff -Nru a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c --- a/arch/arm/common/rtctime.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/common/rtctime.c 2005-03-07 14:54:16 -08:00 @@ -94,15 +94,11 @@ EXPORT_SYMBOL(rtc_time_to_tm); /* - * Convert Gregorian date to seconds since 01-01-1970 00:00:00. + * Does the rtc_time represent a valid date/time? */ -int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) +int rtc_valid_tm(struct rtc_time *tm) { - unsigned int yrs = tm->tm_year + 1900; - - *time = 0; - - if (yrs < 1970 || + if (tm->tm_year < 70 || tm->tm_mon >= 12 || tm->tm_mday < 1 || tm->tm_mday > month_days(tm->tm_mon, yrs) || @@ -111,7 +107,16 @@ tm->tm_sec >= 60) return -EINVAL; - *time = mktime(yrs, tm->tm_mon + 1, tm->tm_mday, + return 0; +} +EXPORT_SYMBOL(rtc_valid_tm); + +/* + * Convert Gregorian date to seconds since 01-01-1970 00:00:00. + */ +int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) +{ + *time = mktime(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); return 0; @@ -144,7 +149,13 @@ static inline int rtc_set_time(struct rtc_ops *ops, struct rtc_time *tm) { - return ops->set_time(tm); + int ret; + + ret = rtc_valid_tm(tm); + if (ret == 0) + ret = ops->set_time(tm); + + return ret; } static inline int rtc_read_alarm(struct rtc_ops *ops, struct rtc_wkalrm *alrm) @@ -412,7 +423,6 @@ struct rtc_wkalrm alrm; struct rtc_time tm; char *p = page; - int len; rtc_read_time(ops, &tm); @@ -461,13 +471,7 @@ if (ops->proc) p += ops->proc(p); - len = (p - page) - off; - if (len < 0) - len = 0; - *eof = len <= count; - *start = page + off; - - return len; + return p - page; } int register_rtc(struct rtc_ops *ops) diff -Nru a/arch/arm/configs/pxa255-idp_defconfig b/arch/arm/configs/pxa255-idp_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/configs/pxa255-idp_defconfig 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,765 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc3 +# Fri Feb 11 16:53:43 2005 +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_LOCALVERSION="" +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=y +CONFIG_KOBJECT_UEVENT=y +# 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_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_KMOD is not set + +# +# System Type +# +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_L7200 is not set +CONFIG_ARCH_PXA=y +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_MAINSTONE is not set +CONFIG_ARCH_PXA_IDP=y +# CONFIG_PXA_SHARPSL is not set +CONFIG_PXA25x=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_MINICACHE=y + +# +# Processor Features +# +# CONFIG_ARM_THUMB is not set +CONFIG_XSCALE_PMU=y + +# +# General setup +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +# CONFIG_XIP_KERNEL is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# At least one math emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_PM is not set +# CONFIG_PREEMPT is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=/dev/nfs ip=dhcp console=ttyS0,115200 mem=64M" +CONFIG_LEDS=y +CONFIG_LEDS_TIMER=y +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +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=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set +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 is not set +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_EDB7312 is not set +# CONFIG_MTD_SHARP_SL 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 is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# 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_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD 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 +# CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# 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_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 +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# 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 + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_SMC91X=y + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE 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_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_IDE_GENERIC 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 device support +# +# CONFIG_SCSI is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +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=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set + +# +# Input 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 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 + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +CONFIG_SERIAL_PXA_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB 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_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_VFAT_FS is not set +CONFIG_FAT_DEFAULT_CODEPAGE=437 +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_TMPFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# 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_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 +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=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 +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# 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=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Graphics support +# +CONFIG_FB=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_PXA=y +# CONFIG_FB_PXA_PARAMETERS is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# Misc devices +# + +# +# USB support +# +# CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# Kernel hacking +# +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_FS is not set +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_WAITQ is not set +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff -Nru a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig --- a/arch/arm/configs/s3c2410_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/configs/s3c2410_defconfig 2005-03-07 14:54:16 -08:00 @@ -87,6 +87,7 @@ CONFIG_ARCH_BAST=y CONFIG_ARCH_H1940=y CONFIG_ARCH_SMDK2410=y +CONFIG_ARCH_S3C2440=y CONFIG_MACH_VR1000=y CONFIG_MACH_RX3715=y CONFIG_CPU_S3C2410=y diff -Nru a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S --- a/arch/arm/kernel/calls.S 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/kernel/calls.S 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /* * linux/arch/arm/kernel/calls.S * - * Copyright (C) 1995-2004 Russell King + * Copyright (C) 1995-2005 Russell King * * 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 @@ -10,7 +10,7 @@ * This file is included twice in entry-common.S */ #ifndef NR_syscalls -#define NR_syscalls 288 +#define NR_syscalls 320 #else __syscall_start: @@ -295,6 +295,37 @@ .long sys_mq_notify .long sys_mq_getsetattr /* 280 */ .long sys_waitid + .long sys_socket + .long sys_bind + .long sys_connect + .long sys_listen +/* 285 */ .long sys_accept + .long sys_getsockname + .long sys_getpeername + .long sys_socketpair + .long sys_send +/* 290 */ .long sys_sendto + .long sys_recv + .long sys_recvfrom + .long sys_shutdown + .long sys_setsockopt +/* 295 */ .long sys_getsockopt + .long sys_sendmsg + .long sys_recvmsg + .long sys_semop + .long sys_semget +/* 300 */ .long sys_semctl + .long sys_msgsnd + .long sys_msgrcv + .long sys_msgget + .long sys_msgctl +/* 305 */ .long sys_shmat + .long sys_shmdt + .long sys_shmget + .long sys_shmctl + .long sys_add_key +/* 310 */ .long sys_request_key + .long sys_keyctl __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff -Nru a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c --- a/arch/arm/kernel/ecard.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/kernel/ecard.c 2005-03-07 14:54:18 -08:00 @@ -85,27 +85,21 @@ }; asmlinkage extern int -ecard_loader_reset(volatile unsigned char *pa, loader_t loader); +ecard_loader_reset(unsigned long base, loader_t loader); asmlinkage extern int -ecard_loader_read(int off, volatile unsigned char *pa, loader_t loader); +ecard_loader_read(int off, unsigned long base, loader_t loader); -static const struct ecard_id * -ecard_match_device(const struct ecard_id *ids, struct expansion_card *ec); - -static inline unsigned short -ecard_getu16(unsigned char *v) +static inline unsigned short ecard_getu16(unsigned char *v) { return v[0] | v[1] << 8; } -static inline signed long -ecard_gets24(unsigned char *v) +static inline signed long ecard_gets24(unsigned char *v) { return v[0] | v[1] << 8 | v[2] << 16 | ((v[2] & 0x80) ? 0xff000000 : 0); } -static inline ecard_t * -slot_to_ecard(unsigned int slot) +static inline ecard_t *slot_to_ecard(unsigned int slot) { return slot < MAX_ECARDS ? slot_to_expcard[slot] : NULL; } @@ -122,26 +116,31 @@ * From a security standpoint, we trust the card vendors. This * may be a misplaced trust. */ -#define BUS_ADDR(x) ((((unsigned long)(x)) << 2) + IO_BASE) -#define POD_INT_ADDR(x) ((volatile unsigned char *)\ - ((BUS_ADDR((x)) - IO_BASE) + IO_START)) - static void ecard_task_reset(struct ecard_request *req) { struct expansion_card *ec = req->ec; - if (ec->loader) - ecard_loader_reset(POD_INT_ADDR(ec->podaddr), ec->loader); + struct resource *res; + + res = ec->slot_no == 8 + ? &ec->resource[ECARD_RES_MEMC] + : ec->type == ECARD_EASI + ? &ec->resource[ECARD_RES_EASI] + : &ec->resource[ECARD_RES_IOCSYNC]; + + ecard_loader_reset(res->start, ec->loader); } static void ecard_task_readbytes(struct ecard_request *req) { - unsigned char *buf = (unsigned char *)req->buffer; - volatile unsigned char *base_addr = - (volatile unsigned char *)POD_INT_ADDR(req->ec->podaddr); + struct expansion_card *ec = req->ec; + unsigned char *buf = req->buffer; unsigned int len = req->length; unsigned int off = req->address; - if (req->ec->slot_no == 8) { + if (ec->slot_no == 8) { + void __iomem *base = (void __iomem *) + ec->resource[ECARD_RES_MEMC].start; + /* * The card maintains an index which increments the address * into a 4096-byte page on each access. We need to keep @@ -161,7 +160,7 @@ * greater than the offset, reset the hardware index counter. */ if (off == 0 || index > off) { - *base_addr = 0; + writeb(0, base); index = 0; } @@ -170,21 +169,24 @@ * required offset. The read bytes are discarded. */ while (index < off) { - unsigned char byte; - byte = base_addr[page]; + readb(base + page); index += 1; } while (len--) { - *buf++ = base_addr[page]; + *buf++ = readb(base + page); index += 1; } } else { + unsigned long base = (ec->type == ECARD_EASI + ? &ec->resource[ECARD_RES_EASI] + : &ec->resource[ECARD_RES_IOCSYNC])->start; + void __iomem *pbase = (void __iomem *)base; - if (!req->use_loader || !req->ec->loader) { + if (!req->use_loader || !ec->loader) { off *= 4; while (len--) { - *buf++ = base_addr[off]; + *buf++ = readb(pbase + off); off += 4; } } else { @@ -194,8 +196,8 @@ * expansion card loader programs. */ *(unsigned long *)0x108 = 0; - *buf++ = ecard_loader_read(off++, base_addr, - req->ec->loader); + *buf++ = ecard_loader_read(off++, base, + ec->loader); } } } @@ -406,7 +408,7 @@ static int ecard_def_irq_pending(ecard_t *ec) { - return !ec->irqmask || ec->irqaddr[0] & ec->irqmask; + return !ec->irqmask || readb(ec->irqaddr) & ec->irqmask; } static void ecard_def_fiq_enable(ecard_t *ec, int fiqnr) @@ -421,7 +423,7 @@ static int ecard_def_fiq_pending(ecard_t *ec) { - return !ec->fiqmask || ec->fiqaddr[0] & ec->fiqmask; + return !ec->fiqmask || readb(ec->fiqaddr) & ec->fiqmask; } static expansioncard_ops_t ecard_default_ops = { @@ -522,7 +524,7 @@ ec->ops->irqpending(ec) ? "" : "not "); else printk("irqaddr %p, mask = %02X, status = %02X\n", - ec->irqaddr, ec->irqmask, *ec->irqaddr); + ec->irqaddr, ec->irqmask, readb(ec->irqaddr)); } } @@ -675,7 +677,7 @@ #define IO_EC_MEMC8_BASE 0 #endif -unsigned int ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) +unsigned int __ecard_address(ecard_t *ec, card_type_t type, card_speed_t speed) { unsigned long address = 0; int slot = ec->slot_no; @@ -779,55 +781,89 @@ get_ecard_dev_info); } -#define ec_set_resource(ec,nr,st,sz,flg) \ +#define ec_set_resource(ec,nr,st,sz) \ do { \ (ec)->resource[nr].name = ec->dev.bus_id; \ (ec)->resource[nr].start = st; \ (ec)->resource[nr].end = (st) + (sz) - 1; \ - (ec)->resource[nr].flags = flg; \ + (ec)->resource[nr].flags = IORESOURCE_MEM; \ } while (0) -static void __init ecard_init_resources(struct expansion_card *ec) +static void __init ecard_free_card(struct expansion_card *ec) +{ + int i; + + for (i = 0; i < ECARD_NUM_RESOURCES; i++) + if (ec->resource[i].flags) + release_resource(&ec->resource[i]); + + kfree(ec); +} + +static struct expansion_card *__init ecard_alloc_card(int type, int slot) { - unsigned long base = PODSLOT_IOC4_BASE; - unsigned int slot = ec->slot_no; + struct expansion_card *ec; + unsigned long base; int i; + ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); + if (!ec) { + ec = ERR_PTR(-ENOMEM); + goto nomem; + } + + memset(ec, 0, sizeof(ecard_t)); + + ec->slot_no = slot; + ec->type = type; + ec->irq = NO_IRQ; + ec->fiq = NO_IRQ; + ec->dma = NO_DMA; + ec->ops = &ecard_default_ops; + + snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); + ec->dev.parent = NULL; + ec->dev.bus = &ecard_bus_type; + ec->dev.dma_mask = &ec->dma_mask; + ec->dma_mask = (u64)0xffffffff; + if (slot < 4) { ec_set_resource(ec, ECARD_RES_MEMC, PODSLOT_MEMC_BASE + (slot << 14), - PODSLOT_MEMC_SIZE, IORESOURCE_MEM); - base = PODSLOT_IOC0_BASE; - } + PODSLOT_MEMC_SIZE); + base = PODSLOT_IOC0_BASE + (slot << 14); + } else + base = PODSLOT_IOC4_BASE + ((slot - 4) << 14); #ifdef CONFIG_ARCH_RPC if (slot < 8) { ec_set_resource(ec, ECARD_RES_EASI, PODSLOT_EASI_BASE + (slot << 24), - PODSLOT_EASI_SIZE, IORESOURCE_MEM); + PODSLOT_EASI_SIZE); } if (slot == 8) { - ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, - NETSLOT_SIZE, IORESOURCE_MEM); + ec_set_resource(ec, ECARD_RES_MEMC, NETSLOT_BASE, NETSLOT_SIZE); } else #endif - for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) { + for (i = 0; i <= ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) ec_set_resource(ec, i + ECARD_RES_IOCSLOW, - base + (slot << 14) + (i << 19), - PODSLOT_IOC_SIZE, IORESOURCE_MEM); - } + base + (i << 19), PODSLOT_IOC_SIZE); for (i = 0; i < ECARD_NUM_RESOURCES; i++) { - if (ec->resource[i].start && + if (ec->resource[i].flags && request_resource(&iomem_resource, &ec->resource[i])) { printk(KERN_ERR "%s: resource(s) not available\n", ec->dev.bus_id); ec->resource[i].end -= ec->resource[i].start; ec->resource[i].start = 0; + ec->resource[i].flags = 0; } } + + nomem: + return ec; } static ssize_t ecard_show_irq(struct device *dev, char *buf) @@ -836,16 +872,12 @@ return sprintf(buf, "%u\n", ec->irq); } -static DEVICE_ATTR(irq, S_IRUGO, ecard_show_irq, NULL); - static ssize_t ecard_show_dma(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->dma); } -static DEVICE_ATTR(dma, S_IRUGO, ecard_show_dma, NULL); - static ssize_t ecard_show_resources(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); @@ -861,23 +893,33 @@ return str - buf; } -static DEVICE_ATTR(resource, S_IRUGO, ecard_show_resources, NULL); - static ssize_t ecard_show_vendor(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->cid.manufacturer); } -static DEVICE_ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL); - static ssize_t ecard_show_device(struct device *dev, char *buf) { struct expansion_card *ec = ECARD_DEV(dev); return sprintf(buf, "%u\n", ec->cid.product); } -static DEVICE_ATTR(device, S_IRUGO, ecard_show_device, NULL); +static ssize_t ecard_show_type(struct device *dev, char *buf) +{ + struct expansion_card *ec = ECARD_DEV(dev); + return sprintf(buf, "%s\n", ec->type == ECARD_EASI ? "EASI" : "IOC"); +} + +static struct device_attribute ecard_dev_attrs[] = { + __ATTR(device, S_IRUGO, ecard_show_device, NULL), + __ATTR(dma, S_IRUGO, ecard_show_dma, NULL), + __ATTR(irq, S_IRUGO, ecard_show_irq, NULL), + __ATTR(resource, S_IRUGO, ecard_show_resources, NULL), + __ATTR(type, S_IRUGO, ecard_show_type, NULL), + __ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL), + __ATTR_NULL, +}; int ecard_request_resources(struct expansion_card *ec) @@ -927,21 +969,13 @@ ecard_t **ecp; ecard_t *ec; struct ex_ecid cid; - int i, rc = -ENOMEM; + int i, rc; - ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); - if (!ec) + ec = ecard_alloc_card(type, slot); + if (IS_ERR(ec)) { + rc = PTR_ERR(ec); goto nomem; - - memset(ec, 0, sizeof(ecard_t)); - - ec->slot_no = slot; - ec->type = type; - ec->irq = NO_IRQ; - ec->fiq = NO_IRQ; - ec->dma = NO_DMA; - ec->card_desc = NULL; - ec->ops = &ecard_default_ops; + } rc = -ENODEV; if ((ec->podaddr = ecard_address(ec, type, ECARD_SYNC)) == 0) @@ -964,7 +998,7 @@ ec->cid.fiqmask = cid.r_fiqmask; ec->cid.fiqoff = ecard_gets24(cid.r_fiqoff); ec->fiqaddr = - ec->irqaddr = (unsigned char *)ioaddr(ec->podaddr); + ec->irqaddr = (void __iomem *)ioaddr(ec->podaddr); if (ec->cid.is) { ec->irqmask = ec->cid.irqmask; @@ -983,14 +1017,6 @@ break; } - snprintf(ec->dev.bus_id, sizeof(ec->dev.bus_id), "ecard%d", slot); - ec->dev.parent = NULL; - ec->dev.bus = &ecard_bus_type; - ec->dev.dma_mask = &ec->dma_mask; - ec->dma_mask = (u64)0xffffffff; - - ecard_init_resources(ec); - /* * hook the interrupt handlers */ @@ -1017,17 +1043,12 @@ slot_to_expcard[slot] = ec; device_register(&ec->dev); - device_create_file(&ec->dev, &dev_attr_dma); - device_create_file(&ec->dev, &dev_attr_irq); - device_create_file(&ec->dev, &dev_attr_resource); - device_create_file(&ec->dev, &dev_attr_vendor); - device_create_file(&ec->dev, &dev_attr_device); return 0; -nodev: - kfree(ec); -nomem: + nodev: + ecard_free_card(ec); + nomem: return rc; } @@ -1128,9 +1149,15 @@ if (drv->shutdown) drv->shutdown(ec); ecard_release(ec); - req.fn = ecard_task_reset; - req.ec = ec; - ecard_call(&req); + + /* + * If this card has a loader, call the reset handler. + */ + if (ec->loader) { + req.fn = ecard_task_reset; + req.ec = ec; + ecard_call(&req); + } } int ecard_register_driver(struct ecard_driver *drv) @@ -1164,8 +1191,9 @@ } struct bus_type ecard_bus_type = { - .name = "ecard", - .match = ecard_match, + .name = "ecard", + .dev_attrs = ecard_dev_attrs, + .match = ecard_match, }; static int ecard_bus_init(void) @@ -1176,7 +1204,7 @@ postcore_initcall(ecard_bus_init); EXPORT_SYMBOL(ecard_readchunk); -EXPORT_SYMBOL(ecard_address); +EXPORT_SYMBOL(__ecard_address); EXPORT_SYMBOL(ecard_register_driver); EXPORT_SYMBOL(ecard_remove_driver); EXPORT_SYMBOL(ecard_bus_type); diff -Nru a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c --- a/arch/arm/kernel/fiq.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/kernel/fiq.c 2005-03-07 14:54:18 -08:00 @@ -46,12 +46,6 @@ #include #include -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -#warning This file requires GCC 3.3.x or older to build. Alternatively, -#warning please talk to GCC people to resolve the issues with the -#warning assembly clobber list. -#endif - static unsigned long no_fiq_insn; /* Default reacquire function @@ -91,44 +85,43 @@ /* * Taking an interrupt in FIQ mode is death, so both these functions - * disable irqs for the duration. + * disable irqs for the duration. Note - these functions are almost + * entirely coded in assembly. */ -void set_fiq_regs(struct pt_regs *regs) +void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) { register unsigned long tmp; - __asm__ volatile ( - "mrs %0, cpsr\n\ + asm volatile ( + "mov ip, sp\n\ + stmfd sp!, {fp, ip, lr, pc}\n\ + sub fp, ip, #4\n\ + mrs %0, cpsr\n\ msr cpsr_c, %2 @ select FIQ mode\n\ mov r0, r0\n\ ldmia %1, {r8 - r14}\n\ msr cpsr_c, %0 @ return to SVC mode\n\ - mov r0, r0" + mov r0, r0\n\ + ldmea fp, {fp, sp, pc}" : "=&r" (tmp) - : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE) - /* These registers aren't modified by the above code in a way - visible to the compiler, but we mark them as clobbers anyway - so that GCC won't put any of the input or output operands in - them. */ - : "r8", "r9", "r10", "r11", "r12", "r13", "r14"); + : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); } -void get_fiq_regs(struct pt_regs *regs) +void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs) { register unsigned long tmp; - __asm__ volatile ( - "mrs %0, cpsr\n\ + asm volatile ( + "mov ip, sp\n\ + stmfd sp!, {fp, ip, lr, pc}\n\ + sub fp, ip, #4\n\ + mrs %0, cpsr\n\ msr cpsr_c, %2 @ select FIQ mode\n\ mov r0, r0\n\ stmia %1, {r8 - r14}\n\ msr cpsr_c, %0 @ return to SVC mode\n\ - mov r0, r0" + mov r0, r0\n\ + ldmea fp, {fp, sp, pc}" : "=&r" (tmp) - : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE) - /* These registers aren't modified by the above code in a way - visible to the compiler, but we mark them as clobbers anyway - so that GCC won't put any of the input or output operands in - them. */ - : "r8", "r9", "r10", "r11", "r12", "r13", "r14"); + : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); } int claim_fiq(struct fiq_handler *f) diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c --- a/arch/arm/kernel/irq.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/kernel/irq.c 2005-03-07 14:54:16 -08:00 @@ -56,6 +56,13 @@ void (*init_arch_irq)(void) __initdata = NULL; /* + * No architecture-specific irq_finish function defined in arm/arch/irqs.h. + */ +#ifndef irq_finish +#define irq_finish(irq) do { } while (0) +#endif + +/* * Dummy mask/unmask handler */ void dummy_mask_unmask_irq(unsigned int irq) @@ -531,6 +538,8 @@ */ if (!list_empty(&irq_pending)) do_pending_irqs(regs); + + irq_finish(irq); spin_unlock(&irq_controller_lock); irq_exit(); diff -Nru a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c --- a/arch/arm/kernel/sys_arm.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/kernel/sys_arm.c 2005-03-07 14:54:16 -08:00 @@ -230,6 +230,18 @@ } } +asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg, + unsigned long __user *addr) +{ + unsigned long ret; + long err; + + err = do_shmat(shmid, shmaddr, shmflg, &ret); + if (err == 0) + err = put_user(ret, addr); + return err; +} + /* Fork a new task - this creates a new program thread. * This is called indirectly via a small wrapper */ diff -Nru a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c --- a/arch/arm/mach-ebsa110/io.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-ebsa110/io.c 2005-03-07 14:54:18 -08:00 @@ -153,9 +153,9 @@ * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readb(ISAIO_BASE + (port << 2)); + ret = __raw_readb((void __iomem *)ISAIO_BASE + (port << 2)); else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -174,45 +174,33 @@ */ u8 __inb16(unsigned int port) { - u32 ret; + unsigned int offset; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readb(ISAIO_BASE + (port << 2)); - else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + offset = port << 2; + else + offset = (port & ~1) << 1 | (port & 1); - /* - * Shame nothing else does - */ - ret = __raw_readb(a + (port & 1)); - } - return ret; + return __raw_readb((void __iomem *)ISAIO_BASE + offset); } u16 __inw(unsigned int port) { - u32 ret; + unsigned int offset; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - ret = __raw_readw(ISAIO_BASE + (port << 2)); + offset = port << 2; else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); - - /* - * Shame nothing else does - */ - if (port & 1) - BUG(); - - ret = __raw_readw(a); + offset = port << 1; + BUG_ON(port & 1); } - return ret; + return __raw_readw((void __iomem *)ISAIO_BASE + offset); } /* @@ -225,7 +213,7 @@ if (SUPERIO_PORT(port) || port & 3) BUG(); - a = ISAIO_BASE + (port << 1); + a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); return __raw_readw(a) | __raw_readw(a + 4) << 16; } @@ -241,9 +229,9 @@ * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - __raw_writeb(val, ISAIO_BASE + (port << 2)); + __raw_writeb(val, (void __iomem *)ISAIO_BASE + (port << 2)); else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + void __iomem *a = (void __iomem *)ISAIO_BASE + ((port & ~1) << 1); /* * Shame nothing else does @@ -257,37 +245,33 @@ void __outb16(u8 val, unsigned int port) { + unsigned int offset; + /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - __raw_writeb(val, ISAIO_BASE + (port << 2)); - else { - void __iomem *a = ISAIO_BASE + ((port & ~1) << 1); + offset = port << 2; + else + offset = (port & ~1) << 1 | (port & 1); - /* - * Shame nothing else does - */ - __raw_writeb(val, a + (port & 1)); - } + __raw_writeb(val, (void __iomem *)ISAIO_BASE + offset); } void __outw(u16 val, unsigned int port) { - u32 off; + unsigned int offset; /* * The SuperIO registers use sane addressing techniques... */ if (SUPERIO_PORT(port)) - off = port << 2; + offset = port << 2; else { - off = port << 1; - if (port & 1) - BUG(); - + offset = port << 1; + BUG_ON(port & 1); } - __raw_writew(val, ISAIO_BASE + off); + __raw_writew(val, (void __iomem *)ISAIO_BASE + offset); } void __outl(u32 val, unsigned int port) @@ -300,13 +284,6 @@ EXPORT_SYMBOL(__outw); EXPORT_SYMBOL(__outl); -extern void __arch_writesb(unsigned long virt, const void *from, int len); -extern void __arch_writesw(unsigned long virt, const void *from, int len); -extern void __arch_writesl(unsigned long virt, const void *from, int len); -extern void __arch_readsb(unsigned long virt, void *from, int len); -extern void __arch_readsw(unsigned long virt, void *from, int len); -extern void __arch_readsl(unsigned long virt, void *from, int len); - void outsb(unsigned int port, const void *from, int len) { u32 off; @@ -319,7 +296,7 @@ BUG(); } - __raw_writesb(ISAIO_BASE + off, from, len); + __raw_writesb((void __iomem *)ISAIO_BASE + off, from, len); } void insb(unsigned int port, void *from, int len) @@ -334,7 +311,7 @@ BUG(); } - __raw_readsb(ISAIO_BASE + off, from, len); + __raw_readsb((void __iomem *)ISAIO_BASE + off, from, len); } EXPORT_SYMBOL(outsb); @@ -352,7 +329,7 @@ BUG(); } - __raw_writesw(ISAIO_BASE + off, from, len); + __raw_writesw((void __iomem *)ISAIO_BASE + off, from, len); } void insw(unsigned int port, void *from, int len) @@ -367,7 +344,7 @@ BUG(); } - __raw_readsw(ISAIO_BASE + off, from, len); + __raw_readsw((void __iomem *)ISAIO_BASE + off, from, len); } EXPORT_SYMBOL(outsw); @@ -384,7 +361,7 @@ if (SUPERIO_PORT(port) || port & 3) BUG(); - __raw_writesw(ISAIO_BASE + off, from, len << 1); + __raw_writesw((void __iomem *)ISAIO_BASE + off, from, len << 1); } void insl(unsigned int port, void *from, int len) @@ -394,7 +371,7 @@ if (SUPERIO_PORT(port) || port & 3) BUG(); - __raw_readsw(ISAIO_BASE + off, from, len << 1); + __raw_readsw((void __iomem *)ISAIO_BASE + off, from, len << 1); } EXPORT_SYMBOL(outsl); diff -Nru a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c --- a/arch/arm/mach-ixp2000/core.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-ixp2000/core.c 2005-03-07 14:54:18 -08:00 @@ -79,31 +79,11 @@ /************************************************************************* * Chip specific mappings shared by all IXP2000 systems *************************************************************************/ -static struct map_desc ixp2000_small_io_desc[] __initdata = { +static struct map_desc ixp2000_io_desc[] __initdata = { { - .virtual = IXP2000_GLOBAL_REG_VIRT_BASE, - .physical = IXP2000_GLOBAL_REG_PHYS_BASE, - .length = IXP2000_GLOBAL_REG_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_GPIO_VIRT_BASE, - .physical = IXP2000_GPIO_PHYS_BASE, - .length = IXP2000_GPIO_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_TIMER_VIRT_BASE, - .physical = IXP2000_TIMER_PHYS_BASE, - .length = IXP2000_TIMER_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_UART_VIRT_BASE, - .physical = IXP2000_UART_PHYS_BASE, - .length = IXP2000_UART_SIZE, - .type = MT_DEVICE - }, { - .virtual = IXP2000_SLOWPORT_CSR_VIRT_BASE, - .physical = IXP2000_SLOWPORT_CSR_PHYS_BASE, - .length = IXP2000_SLOWPORT_CSR_SIZE, + .virtual = IXP2000_CAP_VIRT_BASE, + .physical = IXP2000_CAP_PHYS_BASE, + .length = IXP2000_CAP_SIZE, .type = MT_DEVICE }, { .virtual = IXP2000_INTCTL_VIRT_BASE, @@ -115,11 +95,7 @@ .physical = IXP2000_PCI_CREG_PHYS_BASE, .length = IXP2000_PCI_CREG_SIZE, .type = MT_DEVICE - } -}; - -static struct map_desc ixp2000_large_io_desc[] __initdata = { - { + }, { .virtual = IXP2000_PCI_CSR_VIRT_BASE, .physical = IXP2000_PCI_CSR_PHYS_BASE, .length = IXP2000_PCI_CSR_SIZE, @@ -157,8 +133,7 @@ void __init ixp2000_map_io(void) { - iotable_init(ixp2000_small_io_desc, ARRAY_SIZE(ixp2000_small_io_desc)); - iotable_init(ixp2000_large_io_desc, ARRAY_SIZE(ixp2000_large_io_desc)); + iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); early_serial_setup(&ixp2000_serial_port); /* Set slowport to 8-bit mode. */ diff -Nru a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile --- a/arch/arm/mach-ixp4xx/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-ixp4xx/Makefile 2005-03-07 14:54:16 -08:00 @@ -7,6 +7,5 @@ obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o ixdp425-setup.o obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o -obj-$(CONFIG_ARCH_PRPMC1100) += prpmc1100-pci.o prpmc1100-setup.o obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o diff -Nru a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c --- a/arch/arm/mach-ixp4xx/coyote-setup.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-ixp4xx/coyote-setup.c 2005-03-07 14:54:16 -08:00 @@ -3,7 +3,7 @@ * * Board setup for ADI Engineering and IXDGP425 boards * - * Copyright (C) 2003-2004 MontaVista Software, Inc. + * Copyright (C) 2003-2005 MontaVista Software, Inc. * * Author: Deepak Saxena */ @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -24,39 +24,8 @@ #include #include -#ifdef __ARMEB__ -#define REG_OFFSET 3 -#else -#define REG_OFFSET 0 -#endif - -/* - * Only one serial port is connected on the Coyote & IXDPG425 - */ -static struct uart_port coyote_serial_port = { - .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART2_BASE_PHYS), - .irq = IRQ_IXP4XX_UART2, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 0, - .type = PORT_XSCALE, - .fifosize = 32 -}; - void __init coyote_map_io(void) { - if (machine_is_ixdpg425()) { - coyote_serial_port.membase = - (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); - coyote_serial_port.mapbase = IXP4XX_UART1_BASE_PHYS; - coyote_serial_port.irq = IRQ_IXP4XX_UART1; - } - - early_serial_setup(&coyote_serial_port); - ixp4xx_map_io(); } @@ -81,14 +50,49 @@ .resource = &coyote_flash_resource, }; +static struct resource coyote_uart_resource = { + .start = IXP4XX_UART2_BASE_PHYS, + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM, +}; + +static struct plat_serial8250_port coyote_uart_data = { + .mapbase = IXP4XX_UART2_BASE_PHYS, + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART2, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, +}; + +static struct platform_device coyote_uart = { + .name = "serial8250", + .id = 0, + .dev = { + .platform_data = &coyote_uart_data, + }, + .num_resources = 1, + .resource = &coyote_uart_resource, +}; + static struct platform_device *coyote_devices[] __initdata = { - &coyote_flash + &coyote_flash, + &coyote_uart }; static void __init coyote_init(void) { *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE; *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; + + if (machine_is_ixdpg425()) { + coyote_uart_data.membase = + (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); + coyote_uart_data.mapbase = IXP4XX_UART1_BASE_PHYS; + coyote_uart_data.irq = IRQ_IXP4XX_UART1; + } + ixp4xx_sys_init(); platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices)); diff -Nru a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c 2005-03-07 14:54:17 -08:00 @@ -3,7 +3,7 @@ * * IXDP425/IXCDP1100 board-setup * - * Copyright (C) 2003-2004 MontaVista Software, Inc. + * Copyright (C) 2003-2005 MontaVista Software, Inc. * * Author: Deepak Saxena */ @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include @@ -24,46 +24,8 @@ #include #include -#ifdef __ARMEB__ -#define REG_OFFSET 3 -#else -#define REG_OFFSET 0 -#endif - -/* - * IXDP425 uses both chipset serial ports - */ -static struct uart_port ixdp425_serial_ports[] = { - { - .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART1_BASE_PHYS), - .irq = IRQ_IXP4XX_UART1, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 0, - .type = PORT_XSCALE, - .fifosize = 32 - } , { - .membase = (char*)(IXP4XX_UART2_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART2_BASE_PHYS), - .irq = IRQ_IXP4XX_UART2, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 1, - .type = PORT_XSCALE, - .fifosize = 32 - } -}; - void __init ixdp425_map_io(void) { - early_serial_setup(&ixdp425_serial_ports[0]); - early_serial_setup(&ixdp425_serial_ports[1]); - ixp4xx_map_io(); } @@ -102,10 +64,54 @@ .num_resources = 0 }; +static struct resource ixdp425_uart_resources[] = { + { + .start = IXP4XX_UART1_BASE_PHYS, + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM + }, + { + .start = IXP4XX_UART2_BASE_PHYS, + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM + } +}; + +static struct plat_serial8250_port ixdp425_uart_data[] = { + { + .mapbase = IXP4XX_UART1_BASE_PHYS, + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART1, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + }, + { + .mapbase = IXP4XX_UART2_BASE_PHYS, + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART1, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + } +}; + +static struct platform_device ixdp425_uart = { + .name = "serial8250", + .id = 0, + .dev.platform_data = ixdp425_uart_data, + .num_resources = 2, + .resource = ixdp425_uart_resources +}; + static struct platform_device *ixdp425_devices[] __initdata = { &ixdp425_i2c_controller, - &ixdp425_flash + &ixdp425_flash, + &ixdp425_uart }; + static void __init ixdp425_init(void) { diff -Nru a/arch/arm/mach-ixp4xx/prpmc1100-pci.c b/arch/arm/mach-ixp4xx/prpmc1100-pci.c --- a/arch/arm/mach-ixp4xx/prpmc1100-pci.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,120 +0,0 @@ -/* - * arch/arm/mach-ixp4xx/prpmc1100-pci.c - * - * PrPMC1100 PCI initialization - * - * Copyright (C) 2003-2004 MontaVista Sofwtare, Inc. - * Based on IXDP425 code originally (C) Intel Corporation - * - * Author: Deepak Saxena - * - * PrPMC1100 PCI init code. GPIO usage is similar to that on - * IXDP425, but the IRQ routing is completely different and - * depends on what carrier you are using. This code is written - * to work on the Motorola PrPMC800 ATX carrier board. - * - * 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 - - -void __init prpmc1100_pci_preinit(void) -{ - gpio_line_config(PRPMC1100_PCI_INTA_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - gpio_line_config(PRPMC1100_PCI_INTB_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - gpio_line_config(PRPMC1100_PCI_INTC_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - gpio_line_config(PRPMC1100_PCI_INTD_PIN, - IXP4XX_GPIO_IN | IXP4XX_GPIO_ACTIVE_LOW); - - gpio_line_isr_clear(PRPMC1100_PCI_INTA_PIN); - gpio_line_isr_clear(PRPMC1100_PCI_INTB_PIN); - gpio_line_isr_clear(PRPMC1100_PCI_INTC_PIN); - gpio_line_isr_clear(PRPMC1100_PCI_INTD_PIN); - - ixp4xx_pci_preinit(); -} - - -static int __init prpmc1100_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - int irq = -1; - - static int pci_irq_table[][4] = { - { /* IDSEL 16 - PMC A1 */ - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC - }, { /* IDSEL 17 - PRPMC-A-B */ - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC - }, { /* IDSEL 18 - PMC A1-B */ - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC, - IRQ_PRPMC1100_PCI_INTD - }, { /* IDSEL 19 - Unused */ - 0, 0, 0, 0 - }, { /* IDSEL 20 - P2P Bridge */ - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC, - IRQ_PRPMC1100_PCI_INTD - }, { /* IDSEL 21 - PMC A2 */ - IRQ_PRPMC1100_PCI_INTC, - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB - }, { /* IDSEL 22 - PMC A2-B */ - IRQ_PRPMC1100_PCI_INTD, - IRQ_PRPMC1100_PCI_INTA, - IRQ_PRPMC1100_PCI_INTB, - IRQ_PRPMC1100_PCI_INTC - }, - }; - - if (slot >= PRPMC1100_PCI_MIN_DEVID && slot <= PRPMC1100_PCI_MAX_DEVID - && pin >= 1 && pin <= PRPMC1100_PCI_IRQ_LINES) { - irq = pci_irq_table[slot - PRPMC1100_PCI_MIN_DEVID][pin - 1]; - } - - return irq; -} - - -struct hw_pci prpmc1100_pci __initdata = { - .nr_controllers = 1, - .preinit = prpmc1100_pci_preinit, - .swizzle = pci_std_swizzle, - .setup = ixp4xx_setup, - .scan = ixp4xx_scan_bus, - .map_irq = prpmc1100_map_irq, -}; - -int __init prpmc1100_pci_init(void) -{ - if (machine_is_prpmc1100()) - pci_common_init(&prpmc1100_pci); - return 0; -} - -subsys_initcall(prpmc1100_pci_init); - diff -Nru a/arch/arm/mach-ixp4xx/prpmc1100-setup.c b/arch/arm/mach-ixp4xx/prpmc1100-setup.c --- a/arch/arm/mach-ixp4xx/prpmc1100-setup.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,98 +0,0 @@ -/* - * arch/arm/mach-ixp4xx/prpmc1100-setup.c - * - * Motorola PrPMC1100 board setup - * - * Copyright (C) 2003-2004 MontaVista Software, Inc. - * - * Author: Deepak Saxena - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __ARMEB__ -#define REG_OFFSET 3 -#else -#define REG_OFFSET 0 -#endif - -/* - * Only one serial port is connected on the PrPMC1100 - */ -static struct uart_port prpmc1100_serial_port = { - .membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET), - .mapbase = (IXP4XX_UART1_BASE_PHYS), - .irq = IRQ_IXP4XX_UART1, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - .line = 0, - .type = PORT_XSCALE, - .fifosize = 32 -}; - -void __init prpmc1100_map_io(void) -{ - early_serial_setup(&prpmc1100_serial_port); - - ixp4xx_map_io(); -} - -static struct flash_platform_data prpmc1100_flash_data = { - .map_name = "cfi_probe", - .width = 2, -}; - -static struct resource prpmc1100_flash_resource = { - .start = PRPMC1100_FLASH_BASE, - .end = PRPMC1100_FLASH_BASE + PRPMC1100_FLASH_SIZE, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device prpmc1100_flash = { - .name = "IXP4XX-Flash", - .id = 0, - .dev = { - .platform_data = &prpmc1100_flash_data, - }, - .num_resources = 1, - .resource = &prpmc1100_flash_resource, -}; - -static struct platform_device *prpmc1100_devices[] __initdata = { - &prpmc1100_flash -}; - -static void __init prpmc1100_init(void) -{ - ixp4xx_sys_init(); - - platform_add_devices(prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices)); -} - -MACHINE_START(PRPMC1100, "Motorola PrPMC1100") - MAINTAINER("MontaVista Software, Inc.") - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, - IXP4XX_PERIPHERAL_BASE_VIRT) - MAPIO(prpmc1100_map_io) - INITIRQ(ixp4xx_init_irq) - .timer = &ixp4xx_timer, - BOOT_PARAMS(0x0100) - INIT_MACHINE(prpmc1100_init) -MACHINE_END - diff -Nru a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c 2005-03-07 14:54:16 -08:00 @@ -157,8 +157,6 @@ .unmask = lh7a40x_unmask_cpld_irq, }; -#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) - static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff -Nru a/arch/arm/mach-lh7a40x/common.h b/arch/arm/mach-lh7a40x/common.h --- a/arch/arm/mach-lh7a40x/common.h 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-lh7a40x/common.h 2005-03-07 14:54:17 -08:00 @@ -12,3 +12,5 @@ extern void lh7a400_init_irq (void); extern void lh7a404_init_irq (void); + +#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) diff -Nru a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c --- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c 2005-03-07 14:54:16 -08:00 @@ -55,8 +55,6 @@ .unmask = lh7a40x_unmask_cpld_irq, }; -#define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) - static void lh7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { diff -Nru a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig --- a/arch/arm/mach-pxa/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-pxa/Kconfig 2005-03-07 14:54:16 -08:00 @@ -19,28 +19,36 @@ select PXA25x config PXA_SHARPSL - bool "SHARP SL-C7xx Models (Corgi, Shepherd and Husky)" + bool "SHARP SL-5600 and SL-C7xx Models" select PXA25x help Say Y here if you intend to run this kernel on a - Sharp SL-C700 (Corgi), SL-C750 (Shepherd) or a - Sharp SL-C760 (Husky) handheld computer. + Sharp SL-5600 (Poodle), Sharp SL-C700 (Corgi), + SL-C750 (Shepherd) or a Sharp SL-C760 (Husky) + handheld computer. endchoice endmenu +config MACH_POODLE + bool "Enable Sharp SL-5600 (Poodle) Support" + depends PXA_SHARPSL + config MACH_CORGI bool "Enable Sharp SL-C700 (Corgi) Support" depends PXA_SHARPSL + select PXA_SHARP_C7xx config MACH_SHEPHERD bool "Enable Sharp SL-C750 (Shepherd) Support" depends PXA_SHARPSL + select PXA_SHARP_C7xx config MACH_HUSKY bool "Enable Sharp SL-C760 (Husky) Support" depends PXA_SHARPSL + select PXA_SHARP_C7xx config PXA25x bool @@ -56,5 +64,10 @@ bool help Enable support for iWMMXt + +config PXA_SHARP_C7xx + bool + help + Enable support for all Sharp C7xx models endif diff -Nru a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile --- a/arch/arm/mach-pxa/Makefile 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-pxa/Makefile 2005-03-07 14:54:17 -08:00 @@ -11,7 +11,8 @@ obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o obj-$(CONFIG_ARCH_PXA_IDP) += idp.o -obj-$(CONFIG_PXA_SHARPSL) += corgi.o corgi_ssp.o ssp.o +obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o ssp.o +obj-$(CONFIG_MACH_POODLE) += poodle.o # Support for blinky lights led-y := leds.o diff -Nru a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c --- a/arch/arm/mach-pxa/idp.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-pxa/idp.c 2005-03-07 14:54:16 -08:00 @@ -10,13 +10,16 @@ * 2001-09-13: Cliff Brake * Initial code * - * Expected command line: mem=32M initrd=0xa1000000,4M root=/dev/ram ramdisk=8192 + * 2005-02-15: Cliff Brake + * + * Updated for 2.6 kernel + * */ -#include + #include -#include -#include #include +#include +#include #include #include @@ -29,68 +32,133 @@ #include #include +#include +#include +#include #include "generic.h" -#ifndef PXA_IDP_REV02 -/* shadow registers for write only registers */ -unsigned int idp_cpld_led_control_shadow = 0x1; -unsigned int idp_cpld_periph_pwr_shadow = 0xd; -unsigned int ipd_cpld_cir_shadow = 0; -unsigned int idp_cpld_kb_col_high_shadow = 0; -unsigned int idp_cpld_kb_col_low_shadow = 0; -unsigned int idp_cpld_pccard_en_shadow = 0xC3; -unsigned int idp_cpld_gpioh_dir_shadow = 0; -unsigned int idp_cpld_gpioh_value_shadow = 0; -unsigned int idp_cpld_gpiol_dir_shadow = 0; -unsigned int idp_cpld_gpiol_value_shadow = 0; - -/* - * enable all LCD signals -- they should still be on - * write protect flash - * enable all serial port transceivers +/* TODO: + * - add pxa2xx_audio_ops_t device structure + * - Ethernet interrupt */ -unsigned int idp_control_port_shadow = ((0x7 << 21) | /* LCD power */ - (0x1 << 19) | /* disable flash write enable */ - (0x7 << 9)); /* enable serial port transeivers */ +static struct resource smc91x_resources[] = { + [0] = { + .start = (IDP_ETH_PHYS + 0x300), + .end = (IDP_ETH_PHYS + 0xfffff), + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO(4), + .end = IRQ_GPIO(4), + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device smc91x_device = { + .name = "smc91x", + .id = 0, + .num_resources = ARRAY_SIZE(smc91x_resources), + .resource = smc91x_resources, +}; + +static void idp_backlight_power(int on) +{ + if (on) { + IDP_CPLD_LCD |= (1<<1); + } else { + IDP_CPLD_LCD &= ~(1<<1); + } +} + +static void idp_vlcd(int on) +{ + if (on) { + IDP_CPLD_LCD |= (1<<2); + } else { + IDP_CPLD_LCD &= ~(1<<2); + } +} + +static void idp_lcd_power(int on) +{ + if (on) { + IDP_CPLD_LCD |= (1<<0); + } else { + IDP_CPLD_LCD &= ~(1<<0); + } + + /* call idp_vlcd for now as core driver does not support + * both power and vlcd hooks. Note, this is not technically + * the correct sequence, but seems to work. Disclaimer: + * this may eventually damage the display. + */ + + idp_vlcd(on); +} + +static struct pxafb_mach_info sharp_lm8v31 __initdata = { + .pixclock = 270000, + .xres = 640, + .yres = 480, + .bpp = 16, + .hsync_len = 1, + .left_margin = 3, + .right_margin = 3, + .vsync_len = 1, + .upper_margin = 0, + .lower_margin = 0, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .cmap_greyscale = 0, + .cmap_inverse = 0, + .cmap_static = 0, + .lccr0 = LCCR0_SDS, + .lccr3 = LCCR3_PCP | LCCR3_Acb(255), + .pxafb_backlight_power = &idp_backlight_power, + .pxafb_lcd_power = &idp_lcd_power +}; + +static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data) +{ + /* setup GPIO for PXA25x MMC controller */ + pxa_gpio_mode(GPIO6_MMCCLK_MD); + pxa_gpio_mode(GPIO8_MMCCS0_MD); + + return 0; +} -#endif +static struct pxamci_platform_data idp_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .init = idp_mci_init, +}; static void __init idp_init(void) { printk("idp_init()\n"); + + platform_device_register(&smc91x_device); + //platform_device_register(&mst_audio_device); + set_pxa_fb_info(&sharp_lm8v31); + pxa_set_mci_info(&idp_mci_platform_data); } static void __init idp_init_irq(void) { + pxa_init_irq(); + + set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); } static struct map_desc idp_io_desc[] __initdata = { /* virtual physical length type */ - -#ifndef PXA_IDP_REV02 - { IDP_CTRL_PORT_BASE, - IDP_CTRL_PORT_PHYS, - IDP_CTRL_PORT_SIZE, - MT_DEVICE }, -#endif - - { IDP_IDE_BASE, - IDP_IDE_PHYS, - IDP_IDE_SIZE, - MT_DEVICE }, - { IDP_ETH_BASE, - IDP_ETH_PHYS, - IDP_ETH_SIZE, - MT_DEVICE }, - { IDP_COREVOLT_BASE, + { IDP_COREVOLT_VIRT, IDP_COREVOLT_PHYS, IDP_COREVOLT_SIZE, MT_DEVICE }, - { IDP_CPLD_BASE, + { IDP_CPLD_VIRT, IDP_CPLD_PHYS, IDP_CPLD_SIZE, MT_DEVICE } @@ -101,8 +169,6 @@ pxa_map_io(); iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc)); - set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); - // serial ports 2 & 3 pxa_gpio_mode(GPIO42_BTRXD_MD); pxa_gpio_mode(GPIO43_BTTXD_MD); @@ -114,8 +180,8 @@ } -MACHINE_START(PXA_IDP, "Accelent Xscale IDP") - MAINTAINER("Accelent Systems Inc.") +MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") + MAINTAINER("Vibren Technologies") BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) MAPIO(idp_map_io) INITIRQ(idp_init_irq) diff -Nru a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c --- a/arch/arm/mach-pxa/irq.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/irq.c 2005-03-07 14:54:18 -08:00 @@ -97,23 +97,23 @@ type = __IRQT_RISEDGE | __IRQT_FALEDGE; } - printk(KERN_DEBUG "IRQ%d (GPIO%d): ", irq, gpio); + /* printk(KERN_DEBUG "IRQ%d (GPIO%d): ", irq, gpio); */ pxa_gpio_mode(gpio | GPIO_IN); if (type & __IRQT_RISEDGE) { - printk("rising "); + /* printk("rising "); */ __set_bit (gpio, GPIO_IRQ_rising_edge); } else __clear_bit (gpio, GPIO_IRQ_rising_edge); if (type & __IRQT_FALEDGE) { - printk("falling "); + /* printk("falling "); */ __set_bit (gpio, GPIO_IRQ_falling_edge); } else __clear_bit (gpio, GPIO_IRQ_falling_edge); - printk("edges\n"); + /* printk("edges\n"); */ GRER(gpio) = GPIO_IRQ_rising_edge[idx] & GPIO_IRQ_mask[idx]; GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx]; diff -Nru a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c --- a/arch/arm/mach-pxa/leds-idp.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/leds-idp.c 2005-03-07 14:54:18 -08:00 @@ -19,6 +19,7 @@ #include #include +#include #include #include "leds.h" diff -Nru a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c --- a/arch/arm/mach-pxa/lubbock.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/lubbock.c 2005-03-07 14:54:18 -08:00 @@ -138,6 +138,7 @@ static struct resource smc91x_resources[] = { [0] = { + .name = "smc91x-regs", .start = 0x0c000000, .end = 0x0c0fffff, .flags = IORESOURCE_MEM, @@ -148,6 +149,7 @@ .flags = IORESOURCE_IRQ, }, [2] = { + .name = "smc91x-attrib", .start = 0x0e000000, .end = 0x0e0fffff, .flags = IORESOURCE_MEM, diff -Nru a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c --- a/arch/arm/mach-pxa/mainstone.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-pxa/mainstone.c 2005-03-07 14:54:18 -08:00 @@ -295,6 +295,15 @@ { pxa_map_io(); iotable_init(mainstone_io_desc, ARRAY_SIZE(mainstone_io_desc)); + + /* initialize sleep mode regs (wake-up sources, etc) */ + PGSR0 = 0x00008800; + PGSR1 = 0x00000002; + PGSR2 = 0x0001FC00; + PGSR3 = 0x00001F81; + PWER = 0xC0000002; + PRER = 0x00000002; + PFER = 0x00000002; } MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") diff -Nru a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c --- a/arch/arm/mach-pxa/pm.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-pxa/pm.c 2005-03-07 14:54:17 -08:00 @@ -47,12 +47,18 @@ */ enum { SLEEP_SAVE_START = 0, - SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, - SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, - SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, - SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, - SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR2_L, - SLEEP_SAVE_GAFR0_U, SLEEP_SAVE_GAFR1_U, SLEEP_SAVE_GAFR2_U, + SLEEP_SAVE_GPLR0, SLEEP_SAVE_GPLR1, SLEEP_SAVE_GPLR2, SLEEP_SAVE_GPLR3, + SLEEP_SAVE_GPDR0, SLEEP_SAVE_GPDR1, SLEEP_SAVE_GPDR2, SLEEP_SAVE_GPDR3, + SLEEP_SAVE_GRER0, SLEEP_SAVE_GRER1, SLEEP_SAVE_GRER2, SLEEP_SAVE_GRER3, + SLEEP_SAVE_GFER0, SLEEP_SAVE_GFER1, SLEEP_SAVE_GFER2, SLEEP_SAVE_GFER3, + SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3, + + SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U, + SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U, + SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U, + SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U, + + SLEEP_SAVE_PSTR, SLEEP_SAVE_ICMR, SLEEP_SAVE_CKEN, @@ -73,6 +79,11 @@ if (state != PM_SUSPEND_MEM) return -EINVAL; +#ifdef CONFIG_IWMMXT + /* force any iWMMXt context to ram **/ + iwmmxt_task_disable(NULL); +#endif + /* preserve current time */ rtc.tv_sec = RCNR; rtc.tv_nsec = 0; @@ -82,20 +93,32 @@ SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2); SAVE(GRER0); SAVE(GRER1); SAVE(GRER2); SAVE(GFER0); SAVE(GFER1); SAVE(GFER2); + SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); + SAVE(GAFR0_L); SAVE(GAFR0_U); SAVE(GAFR1_L); SAVE(GAFR1_U); SAVE(GAFR2_L); SAVE(GAFR2_U); +#ifdef CONFIG_PXA27x + SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); + SAVE(GAFR3_L); SAVE(GAFR3_U); +#endif + SAVE(ICMR); ICMR = 0; SAVE(CKEN); CKEN = 0; + SAVE(PSTR); + /* Note: wake up source are set up in each machine specific files */ /* clear GPIO transition detect bits */ GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2; +#ifdef CONFIG_PXA27x + GEDR3 = GEDR3; +#endif /* Clear sleep reset status */ RCSR = RCSR_SMR; @@ -121,7 +144,8 @@ #ifdef CONFIG_ARCH_LUBBOCK LUB_HEXLED = 0xbadbadc5; #endif - while (1); + while (1) + pxa_cpu_suspend(); } /* ensure not to come back here if it wasn't intended */ @@ -135,6 +159,12 @@ RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); + RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); + +#ifdef CONFIG_PXA27x + RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); + RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); +#endif PSSR = PSSR_RDH | PSSR_PH; @@ -143,6 +173,8 @@ ICLR = 0; ICCR = 1; RESTORE(ICMR); + + RESTORE(PSTR); /* restore current time */ rtc.tv_sec = RCNR; diff -Nru a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-pxa/poodle.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,181 @@ +/* + * linux/arch/arm/mach-pxa/poodle.c + * + * Support for the SHARP Poodle Board. + * + * Based on: + * linux/arch/arm/mach-pxa/lubbock.c Author: Nicolas Pitre + * + * 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. + * + * Change Log + * 12-Dec-2002 Sharp Corporation for Poodle + * John Lenz updates to 2.6 + */ +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "generic.h" + +static struct resource poodle_scoop_resources[] = { + [0] = { + .start = 0x10800000, + .end = 0x10800fff, + .flags = IORESOURCE_MEM, + }, +}; + +static struct scoop_config poodle_scoop_setup = { + .io_dir = POODLE_SCOOP_IO_DIR, + .io_out = POODLE_SCOOP_IO_OUT, +}; + +static struct platform_device poodle_scoop_device = { + .name = "sharp-scoop", + .id = -1, + .dev = { + .platform_data = &poodle_scoop_setup, + }, + .num_resources = ARRAY_SIZE(poodle_scoop_resources), + .resource = poodle_scoop_resources, +}; + + +/* LoCoMo device */ +static struct resource locomo_resources[] = { + [0] = { + .start = 0x10000000, + .end = 0x10001fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_GPIO(10), + .end = IRQ_GPIO(10), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device locomo_device = { + .name = "locomo", + .id = 0, + .num_resources = ARRAY_SIZE(locomo_resources), + .resource = locomo_resources, +}; + +/* PXAFB device */ +static struct pxafb_mach_info poodle_fb_info __initdata = { + .pixclock = 144700, + + .xres = 320, + .yres = 240, + .bpp = 16, + + .hsync_len = 7, + .left_margin = 11, + .right_margin = 30, + + .vsync_len = 2, + .upper_margin = 2, + .lower_margin = 0, + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + + .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, + .lccr3 = 0, + + .pxafb_backlight_power = NULL, + .pxafb_lcd_power = NULL, +}; + +static struct platform_device *devices[] __initdata = { + &locomo_device, + &poodle_scoop_device, +}; + +static void __init poodle_init(void) +{ + int ret = 0; + + /* cpu initialize */ + /* Pgsr Register */ + PGSR0 = 0x0146dd80; + PGSR1 = 0x03bf0890; + PGSR2 = 0x0001c000; + + /* Alternate Register */ + GAFR0_L = 0x01001000; + GAFR0_U = 0x591a8010; + GAFR1_L = 0x900a8451; + GAFR1_U = 0xaaa5aaaa; + GAFR2_L = 0x8aaaaaaa; + GAFR2_U = 0x00000002; + + /* Direction Register */ + GPDR0 = 0xd3f0904c; + GPDR1 = 0xfcffb7d3; + GPDR2 = 0x0001ffff; + + /* Output Register */ + GPCR0 = 0x00000000; + GPCR1 = 0x00000000; + GPCR2 = 0x00000000; + + GPSR0 = 0x00400000; + GPSR1 = 0x00000000; + GPSR2 = 0x00000000; + + set_pxa_fb_info(&poodle_fb_info); + + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); + if (ret) { + printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n"); + } +} + +static struct map_desc poodle_io_desc[] __initdata = { + /* virtual physical length */ + { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */ +}; + +static void __init poodle_map_io(void) +{ + pxa_map_io(); + iotable_init(poodle_io_desc, ARRAY_SIZE(poodle_io_desc)); + + /* setup sleep mode values */ + PWER = 0x00000002; + PFER = 0x00000000; + PRER = 0x00000002; + PGSR0 = 0x00008000; + PGSR1 = 0x003F0202; + PGSR2 = 0x0001C000; + PCFR |= PCFR_OPDE; +} + +MACHINE_START(POODLE, "SHARP Poodle") + BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) + MAPIO(poodle_map_io) + INITIRQ(pxa_init_irq) + .timer = &pxa_timer, + .init_machine = poodle_init, +MACHINE_END diff -Nru a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig --- a/arch/arm/mach-s3c2410/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/Kconfig 2005-03-07 14:54:17 -08:00 @@ -26,6 +26,12 @@ Say Y here if you are using the SMDK2410 or the derived module A9M2410 +config ARCH_S3C2440 + bool "SMDK2440" + select CPU_S3C2440 + help + Say Y here if you are using the SMDK2440. + config MACH_VR1000 bool "Thorcom VR1000" select CPU_S3C2410 @@ -58,6 +64,26 @@ depends on ARCH_S3C2410 help Support for S3C2440 Samsung Mobile CPU based systems. + +comment "S3C2410 Boot" + +config S3C2410_BOOT_WATCHDOG + bool "S3C2410 Initialisation watchdog" + depends on ARCH_S3C2410 && S3C2410_WATCHDOG + help + Say y to enable the watchdog during the kernel decompression + stage. If the kernel fails to uncompress, then the watchdog + will trigger a reset and the system should restart. + + Although this uses the same hardware unit as the kernel watchdog + driver, it is not a replacement for it. If you use this option, + you will have to use the watchdg driver to either stop the timeout + or restart it. If you do not, then your kernel will reboot after + startup. + + The driver uses a fixed timeout value, so the exact time till the + system resets depends on the value of PCLK. The timeout on an + 200MHz s3c2410 should be about 30 seconds. comment "S3C2410 Setup" diff -Nru a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile --- a/arch/arm/mach-s3c2410/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/Makefile 2005-03-07 14:54:16 -08:00 @@ -28,5 +28,6 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o +obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o diff -Nru a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c --- a/arch/arm/mach-s3c2410/clock.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/clock.c 2005-03-07 14:54:16 -08:00 @@ -1,7 +1,7 @@ /* linux/arch/arm/mach-s3c2410/clock.c * - * Copyright (c) 2004 Simtec Electronics - * Ben Dooks + * Copyright (c) 2004-2005 Simtec Electronics + * Ben Dooks * * S3C2410 Clock control support * @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -46,18 +47,13 @@ #include #include "clock.h" +#include "cpu.h" /* clock information */ -unsigned long s3c24xx_xtal = 12*1000*1000; /* default 12MHz */ -unsigned long s3c24xx_fclk; -unsigned long s3c24xx_hclk; -unsigned long s3c24xx_pclk; - static LIST_HEAD(clocks); static DECLARE_MUTEX(clocks_sem); - /* old functions */ void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable) @@ -206,6 +202,14 @@ /* base clocks */ +static struct clk clk_xtal = { + .name = "xtal", + .id = -1, + .rate = 0, + .parent = NULL, + .ctrlbit = 0, +}; + static struct clk clk_f = { .name = "fclk", .id = -1, @@ -286,6 +290,7 @@ .ctrlbit = S3C2410_CLKCON_USBD }, { .name = "timers", + .id = -1, .parent = &clk_p, .enable = s3c24xx_clkcon_enable, .ctrlbit = S3C2410_CLKCON_PWMT @@ -378,19 +383,24 @@ /* initalise all the clocks */ -int __init s3c24xx_setup_clocks(void) +int __init s3c24xx_setup_clocks(unsigned long xtal, + unsigned long fclk, + unsigned long hclk, + unsigned long pclk) { struct clk *clkp = init_clocks; int ptr; int ret; - printk(KERN_INFO "S3C2410 Clock control, (c) 2004 Simtec Electronics\n"); + printk(KERN_INFO "S3C2410 Clocks, (c) 2004 Simtec Electronics\n"); /* initialise the main system clocks */ - clk_h.rate = s3c24xx_hclk; - clk_p.rate = s3c24xx_pclk; - clk_f.rate = s3c24xx_fclk; + clk_xtal.rate = xtal; + + clk_h.rate = hclk; + clk_p.rate = pclk; + clk_f.rate = fclk; /* it looks like just setting the register here is not good * enough, and causes the odd hang at initial boot time, so @@ -414,6 +424,9 @@ /* register our clocks */ + if (s3c24xx_register_clock(&clk_xtal) < 0) + printk(KERN_ERR "failed to register master xtal\n"); + if (s3c24xx_register_clock(&clk_f) < 0) printk(KERN_ERR "failed to register cpu fclk\n"); @@ -423,6 +436,8 @@ if (s3c24xx_register_clock(&clk_p) < 0) printk(KERN_ERR "failed to register cpu pclk\n"); + /* register clocks from clock array */ + for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { ret = s3c24xx_register_clock(clkp); if (ret < 0) { @@ -434,4 +449,59 @@ return 0; } +/* S3C2440 extended clock support */ + +#ifdef CONFIG_CPU_S3C2440 + +static struct clk s3c2440_clk_upll = { + .name = "upll", + .id = -1, +}; + +static struct clk s3c2440_clk_cam = { + .name = "camif", + .parent = &clk_h, + .id = -1, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2440_CLKCON_CAMERA, +}; + +static struct clk s3c2440_clk_ac97 = { + .name = "ac97", + .parent = &clk_p, + .id = -1, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2440_CLKCON_CAMERA, +}; + +static int s3c2440_clk_add(struct sys_device *sysdev) +{ + unsigned long upllcon = __raw_readl(S3C2410_UPLLCON); + + s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal.rate) * 2; + + printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n", + print_mhz(s3c2440_clk_upll.rate)); + + s3c24xx_register_clock(&s3c2440_clk_ac97); + s3c24xx_register_clock(&s3c2440_clk_cam); + s3c24xx_register_clock(&s3c2440_clk_upll); + + clk_disable(&s3c2440_clk_ac97); + clk_disable(&s3c2440_clk_cam); + + return 0; +} + +static struct sysdev_driver s3c2440_clk_driver = { + .add = s3c2440_clk_add, +}; + +static int s3c24xx_clk_driver(void) +{ + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver); +} + +arch_initcall(s3c24xx_clk_driver); +#endif /* CONFIG_CPU_S3C2440 */ diff -Nru a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h --- a/arch/arm/mach-s3c2410/clock.h 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/clock.h 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,8 @@ /* * linux/arch/arm/mach-s3c2410/clock.h * - * Copyright (c) 2004 Simtec Electronics + * Copyright (c) 2004-2005 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ * Written by Ben Dooks, * * This program is free software; you can redistribute it and/or modify @@ -29,13 +30,6 @@ extern struct clk s3c24xx_clkout1; extern struct clk s3c24xx_uclk; -/* processor clock settings, in Hz */ - -extern unsigned long s3c24xx_xtal; -extern unsigned long s3c24xx_pclk; -extern unsigned long s3c24xx_hclk; -extern unsigned long s3c24xx_fclk; - /* exports for arch/arm/mach-s3c2410 * * Please DO NOT use these outside of arch/arm/mach-s3c2410 @@ -44,4 +38,7 @@ extern int s3c24xx_clkcon_enable(struct clk *clk, int enable); extern int s3c24xx_register_clock(struct clk *clk); -extern int s3c24xx_setup_clocks(void); +extern int s3c24xx_setup_clocks(unsigned long xtal, + unsigned long fclk, + unsigned long hclk, + unsigned long pclk); diff -Nru a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c --- a/arch/arm/mach-s3c2410/cpu.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,8 @@ /* linux/arch/arm/mach-s3c2410/cpu.c * - * Copyright (c) 2004 Simtec Electronics - * Ben Dooks + * Copyright (c) 2004-2005 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ + * Ben Dooks * * S3C24XX CPU Support * @@ -181,8 +182,8 @@ void __init s3c24xx_init_clocks(int xtal) { - if (xtal != 0) - s3c24xx_xtal = xtal; + if (xtal == 0) + xtal = 12*1000*1000; if (cpu == NULL) panic("s3c24xx_init_clocks: no cpu setup?\n"); diff -Nru a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h --- a/arch/arm/mach-s3c2410/cpu.h 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/cpu.h 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,7 @@ /* forward declaration */ struct s3c2410_uartcfg; +struct map_desc; /* core initialisation functions */ @@ -58,3 +59,7 @@ struct sys_timer; extern struct sys_timer s3c24xx_timer; + +/* system device classes */ + +extern struct sysdev_class s3c2440_sysclass; diff -Nru a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c --- a/arch/arm/mach-s3c2410/devs.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/devs.c 2005-03-07 14:54:16 -08:00 @@ -10,6 +10,7 @@ * published by the Free Software Foundation. * * Modifications: + * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv * 29-Aug-2004 BJD Added timers 0 through 3 * 29-Aug-2004 BJD Changed index of devices we only have one of to -1 * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources @@ -446,3 +447,38 @@ }; EXPORT_SYMBOL(s3c_device_timer3); + +#ifdef CONFIG_CPU_S3C2440 + +/* Camif Controller */ + +static struct resource s3c_camif_resource[] = { + [0] = { + .start = S3C2440_PA_CAMIF, + .end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_CAM, + .end = IRQ_CAM, + .flags = IORESOURCE_IRQ, + } + +}; + +static u64 s3c_device_camif_dmamask = 0xffffffffUL; + +struct platform_device s3c_device_camif = { + .name = "s3c2440-camif", + .id = -1, + .num_resources = ARRAY_SIZE(s3c_camif_resource), + .resource = s3c_camif_resource, + .dev = { + .dma_mask = &s3c_device_camif_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; + +EXPORT_SYMBOL(s3c_device_camif); + +#endif // CONFIG_CPU_S32440 diff -Nru a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h --- a/arch/arm/mach-s3c2410/devs.h 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/devs.h 2005-03-07 14:54:16 -08:00 @@ -12,7 +12,11 @@ * Modifications: * 18-Aug-2004 BJD Created initial version * 27-Aug-2004 BJD Added timers 0 through 3 + * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv */ +#include + +extern struct platform_device *s3c24xx_uart_devs[]; extern struct platform_device s3c_device_usb; extern struct platform_device s3c_device_lcd; @@ -34,3 +38,11 @@ extern struct platform_device s3c_device_timer3; extern struct platform_device s3c_device_usbgadget; + +/* s3c2440 specific devices */ + +#ifdef CONFIG_CPU_S3C2440 + +extern struct platform_device s3c_device_camif; + +#endif diff -Nru a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c --- a/arch/arm/mach-s3c2410/dma.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-s3c2410/dma.c 2005-03-07 14:54:18 -08:00 @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-bast/dma.c * - * (c) 2003,2004 Simtec Electronics + * (c) 2003-2005 Simtec Electronics * Ben Dooks * * S3C2410 DMA core @@ -12,6 +12,7 @@ * published by the Free Software Foundation. * * Changelog: + * 27-Feb-2005 BJD Added kmem cache for dma descriptors * 18-Nov-2004 BJD Removed error for loading onto stopped channel * 10-Nov-2004 BJD Ensure all external symbols exported for modules * 10-Nov-2004 BJD Use sys_device and sysdev_class for power management @@ -57,6 +58,7 @@ /* io map for dma */ static void __iomem *dma_base; +static kmem_cache_t *dma_kmem; /* dma channel state information */ s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; @@ -432,7 +434,7 @@ pr_debug("%s: id=%p, data=%08x, size=%d\n", __FUNCTION__, id, (unsigned int)data, size); - buf = (s3c2410_dma_buf_t *)kmalloc(sizeof(*buf), GFP_ATOMIC); + buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC); if (buf == NULL) { pr_debug("%s: out of memory (%d alloc)\n", __FUNCTION__, sizeof(*buf)); @@ -511,7 +513,7 @@ buf->magic = -1; if (magicok) { - kfree(buf); + kmem_cache_free(dma_kmem, buf); } else { printk("s3c2410_dma_freebuf: buff %p with bad magic\n", buf); } @@ -1128,6 +1130,14 @@ .resume = s3c2410_dma_resume, }; +/* kmem cache implementation */ + +static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) +{ + memset(p, 0, sizeof(s3c2410_dma_buf_t)); +} + + /* initialisation code */ static int __init s3c2410_init_dma(void) @@ -1150,6 +1160,16 @@ goto err; } + dma_kmem = kmem_cache_create("dma_desc", sizeof(s3c2410_dma_buf_t), 0, + SLAB_HWCACHE_ALIGN, + s3c2410_dma_cache_ctor, NULL); + + if (dma_kmem == NULL) { + printk(KERN_ERR "dma failed to make kmem cache\n"); + ret = -ENOMEM; + goto err; + } + for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) { cp = &s3c2410_chans[channel]; @@ -1181,6 +1201,7 @@ return 0; err: + kmem_cache_destroy(dma_kmem); iounmap(dma_base); dma_base = NULL; return ret; diff -Nru a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c --- a/arch/arm/mach-s3c2410/irq.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/irq.c 2005-03-07 14:54:16 -08:00 @@ -57,6 +57,7 @@ #include #include +#include "cpu.h" #include "pm.h" #define irqdbf(x...) @@ -628,6 +629,7 @@ s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs); } + /* s3c24xx_init_irq * * Initialise S3C2410 IRQ system @@ -771,3 +773,174 @@ irqdbf("s3c2410: registered interrupt handlers\n"); } + +/* s3c2440 irq code +*/ + +#ifdef CONFIG_CPU_S3C2440 + +/* WDT/AC97 */ + +static void s3c_irq_demux_wdtac97(unsigned int irq, + struct irqdesc *desc, + struct pt_regs *regs) +{ + unsigned int subsrc, submsk; + struct irqdesc *mydesc; + + /* read the current pending interrupts, and the mask + * for what it is available */ + + subsrc = __raw_readl(S3C2410_SUBSRCPND); + submsk = __raw_readl(S3C2410_INTSUBMSK); + + subsrc &= ~submsk; + subsrc >>= 13; + subsrc &= 3; + + if (subsrc != 0) { + if (subsrc & 1) { + mydesc = irq_desc + IRQ_S3C2440_WDT; + mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); + } + if (subsrc & 2) { + mydesc = irq_desc + IRQ_S3C2440_AC97; + mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); + } + } +} + + +#define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0)) + +static void +s3c_irq_wdtac97_mask(unsigned int irqno) +{ + s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13); +} + +static void +s3c_irq_wdtac97_unmask(unsigned int irqno) +{ + s3c_irqsub_unmask(irqno, INTMSK_WDT); +} + +static void +s3c_irq_wdtac97_ack(unsigned int irqno) +{ + s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13); +} + +static struct irqchip s3c_irq_wdtac97 = { + .mask = s3c_irq_wdtac97_mask, + .unmask = s3c_irq_wdtac97_unmask, + .ack = s3c_irq_wdtac97_ack, +}; + +/* camera irq */ + +static void s3c_irq_demux_cam(unsigned int irq, + struct irqdesc *desc, + struct pt_regs *regs) +{ + unsigned int subsrc, submsk; + struct irqdesc *mydesc; + + /* read the current pending interrupts, and the mask + * for what it is available */ + + subsrc = __raw_readl(S3C2410_SUBSRCPND); + submsk = __raw_readl(S3C2410_INTSUBMSK); + + subsrc &= ~submsk; + subsrc >>= 11; + subsrc &= 3; + + if (subsrc != 0) { + if (subsrc & 1) { + mydesc = irq_desc + IRQ_S3C2440_CAM_C; + mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); + } + if (subsrc & 2) { + mydesc = irq_desc + IRQ_S3C2440_CAM_P; + mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); + } + } +} + +#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) + +static void +s3c_irq_cam_mask(unsigned int irqno) +{ + s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11); +} + +static void +s3c_irq_cam_unmask(unsigned int irqno) +{ + s3c_irqsub_unmask(irqno, INTMSK_CAM); +} + +static void +s3c_irq_cam_ack(unsigned int irqno) +{ + s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); +} + +static struct irqchip s3c_irq_cam = { + .mask = s3c_irq_cam_mask, + .unmask = s3c_irq_cam_unmask, + .ack = s3c_irq_cam_ack, +}; + +static int s3c2440_irq_add(struct sys_device *sysdev) +{ + unsigned int irqno; + + printk("S3C2440: IRQ Support\n"); + + set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip); + set_irq_handler(IRQ_NFCON, do_level_IRQ); + set_irq_flags(IRQ_NFCON, IRQF_VALID); + + /* add new chained handler for wdt, ac7 */ + + set_irq_chip(IRQ_WDT, &s3c_irq_level_chip); + set_irq_handler(IRQ_WDT, do_level_IRQ); + set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97); + + for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) { + set_irq_chip(irqno, &s3c_irq_wdtac97); + set_irq_handler(irqno, do_level_IRQ); + set_irq_flags(irqno, IRQF_VALID); + } + + /* add chained handler for camera */ + + set_irq_chip(IRQ_CAM, &s3c_irq_level_chip); + set_irq_handler(IRQ_CAM, do_level_IRQ); + set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam); + + for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) { + set_irq_chip(irqno, &s3c_irq_cam); + set_irq_handler(irqno, do_level_IRQ); + set_irq_flags(irqno, IRQF_VALID); + } + + return 0; +} + +static struct sysdev_driver s3c2440_irq_driver = { + .add = s3c2440_irq_add, +}; + +static int s3c24xx_irq_driver(void) +{ + return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); +} + +arch_initcall(s3c24xx_irq_driver); + +#endif /* CONFIG_CPU_S3C2440 */ + diff -Nru a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c --- a/arch/arm/mach-s3c2410/mach-bast.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/mach-bast.c 2005-03-07 14:54:17 -08:00 @@ -23,6 +23,7 @@ * 04-Jan-2005 BJD New uart init call * 10-Jan-2005 BJD Removed include of s3c2410.h * 14-Jan-2005 BJD Add support for muitlple NAND devices + * 03-Mar-2005 BJD Ensured that bast-cpld.h is included */ #include @@ -39,6 +40,7 @@ #include #include +#include #include #include diff -Nru a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/arm/mach-s3c2410/mach-smdk2440.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,133 @@ +/* linux/arch/arm/mach-s3c2410/mach-smdk2440.c + * + * Copyright (c) 2004,2005 Simtec Electronics + * Ben Dooks + * + * http://www.fluff.org/ben/smdk2440/ + * + * Thanks to Dimity Andric and TomTom for the loan of an SMDK2440. + * + * 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. + * + * Modifications: + * 01-Nov-2004 BJD Initial version + * 12-Nov-2004 BJD Updated for release + * 04-Jan-2005 BJD Fixes for pre-release + * 22-Feb-2005 BJD Updated for 2.6.11-rc5 relesa +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +//#include +#include +#include +#include + +#include "s3c2410.h" +#include "s3c2440.h" +#include "clock.h" +#include "devs.h" +#include "cpu.h" +#include "pm.h" + +static struct map_desc smdk2440_iodesc[] __initdata = { + /* ISA IO Space map (memory space selected by A24) */ + + { S3C2410_VA_ISA_WORD, S3C2410_CS2, SZ_16M, MT_DEVICE }, + { S3C2410_VA_ISA_BYTE, S3C2410_CS2, SZ_16M, MT_DEVICE }, +}; + +#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK +#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB +#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE + +static struct s3c2410_uartcfg smdk2440_uartcfgs[] = { + [0] = { + .hwport = 0, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + [1] = { + .hwport = 1, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + /* IR port */ + [2] = { + .hwport = 2, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x43, + .ufcon = 0x51, + } +}; + +static struct platform_device *smdk2440_devices[] __initdata = { + &s3c_device_usb, + &s3c_device_lcd, + &s3c_device_wdt, + &s3c_device_i2c, + &s3c_device_iis, +}; + +static struct s3c24xx_board smdk2440_board __initdata = { + .devices = smdk2440_devices, + .devices_count = ARRAY_SIZE(smdk2440_devices) +}; + +void __init smdk2440_map_io(void) +{ + s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); + s3c24xx_init_clocks(16934400); + s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); + s3c24xx_set_board(&smdk2440_board); +} + +void __init smdk2440_machine_init(void) +{ + /* Configure the LEDs (even if we have no LED support)*/ + + s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP); + s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP); + s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP); + s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP); + + s3c2410_gpio_setpin(S3C2410_GPF4, 0); + s3c2410_gpio_setpin(S3C2410_GPF5, 0); + s3c2410_gpio_setpin(S3C2410_GPF6, 0); + s3c2410_gpio_setpin(S3C2410_GPF7, 0); + + s3c2410_pm_init(); +} + +MACHINE_START(S3C2440, "SMDK2440") + MAINTAINER("Ben Dooks ") + BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART) + BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) + + .init_irq = s3c24xx_init_irq, + .map_io = smdk2440_map_io, + .init_machine = smdk2440_machine_init, + .timer = &s3c24xx_timer, +MACHINE_END diff -Nru a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c --- a/arch/arm/mach-s3c2410/mach-vr1000.c 2005-03-07 14:54:18 -08:00 +++ b/arch/arm/mach-s3c2410/mach-vr1000.c 2005-03-07 14:54:18 -08:00 @@ -24,6 +24,7 @@ * 14-Jan-2005 BJD Added clock init * 15-Jan-2005 BJD Add serial port device definition * 20-Jan-2005 BJD Use UPF_IOREMAP for ports + * 10-Feb-2005 BJD Added power-off capability */ #include @@ -52,8 +53,8 @@ #include #include -//#include #include +#include #include "clock.h" #include "devs.h" @@ -269,6 +270,11 @@ .clocks_count = ARRAY_SIZE(vr1000_clocks), }; +static void vr1000_power_off(void) +{ + s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPB9_OUTP); + s3c2410_gpio_setpin(S3C2410_GPB9, 1); +} void __init vr1000_map_io(void) { @@ -284,6 +290,8 @@ s3c24xx_clkout1.parent = &s3c24xx_dclk1; s3c24xx_uclk.parent = &s3c24xx_clkout1; + + pm_power_off = vr1000_power_off; s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); s3c24xx_init_clocks(0); diff -Nru a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c --- a/arch/arm/mach-s3c2410/s3c2410.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2410.c 2005-03-07 14:54:17 -08:00 @@ -17,7 +17,7 @@ * 21-Aug-2004 BJD Added new struct s3c2410_board handler * 28-Sep-2004 BJD Updates for new serial port bits * 04-Nov-2004 BJD Updated UART configuration process - * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate + * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate */ #include @@ -164,31 +164,32 @@ void __init s3c2410_init_clocks(int xtal) { unsigned long tmp; + unsigned long fclk; + unsigned long hclk; + unsigned long pclk; /* now we've got our machine bits initialised, work out what * clocks we've got */ - s3c24xx_fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), - s3c24xx_xtal); + fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal); tmp = __raw_readl(S3C2410_CLKDIVN); /* work out clock scalings */ - s3c24xx_hclk = s3c24xx_fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1); - s3c24xx_pclk = s3c24xx_hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1); + hclk = fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1); + pclk = hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1); /* print brieft summary of clocks, etc */ printk("S3C2410: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), - print_mhz(s3c24xx_pclk)); + print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); /* initialise the clocks here, to allow other things like the * console to use them */ - s3c24xx_setup_clocks(); + s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); } int __init s3c2410_init(void) diff -Nru a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c --- a/arch/arm/mach-s3c2410/s3c2440.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/s3c2440.c 2005-03-07 14:54:16 -08:00 @@ -109,7 +109,6 @@ .resource = s3c_uart0_resource, }; - static struct platform_device s3c_uart1 = { .name = "s3c2440-uart", .id = 1, @@ -149,19 +148,6 @@ s3c2440_uart_count = uart; } -/* s3c2440 specific clock sources */ - -static struct clk s3c2440_clk_cam = { - .name = "camera", - .enable = s3c24xx_clkcon_enable, - .ctrlbit = S3C2440_CLKCON_CAMERA -}; - -static struct clk s3c2440_clk_ac97 = { - .name = "ac97", - .enable = s3c24xx_clkcon_enable, - .ctrlbit = S3C2440_CLKCON_CAMERA -}; #ifdef CONFIG_PM @@ -190,7 +176,7 @@ #define s3c2440_resume NULL #endif -static struct sysdev_class s3c2440_sysclass = { +struct sysdev_class s3c2440_sysclass = { set_kset_name("s3c2440-core"), .suspend = s3c2440_suspend, .resume = s3c2440_resume @@ -209,19 +195,24 @@ /* rename any peripherals used differing from the s3c2410 */ s3c_device_i2c.name = "s3c2440-i2c"; + + /* change irq for watchdog */ + + s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; + s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT; } void __init s3c2440_init_clocks(int xtal) { unsigned long clkdiv; unsigned long camdiv; - int s3c2440_hdiv = 1; + unsigned long hclk, fclk, pclk; + int hdiv = 1; /* now we've got our machine bits initialised, work out what * clocks we've got */ - s3c24xx_fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), - s3c24xx_xtal) * 2; + fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2; clkdiv = __raw_readl(S3C2410_CLKDIVN); camdiv = __raw_readl(S3C2440_CAMDIVN); @@ -230,63 +221,60 @@ switch (clkdiv & S3C2440_CLKDIVN_HDIVN_MASK) { case S3C2440_CLKDIVN_HDIVN_1: - s3c2440_hdiv = 1; + hdiv = 1; break; case S3C2440_CLKDIVN_HDIVN_2: - s3c2440_hdiv = 1; + hdiv = 1; break; case S3C2440_CLKDIVN_HDIVN_4_8: - s3c2440_hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4; + hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4; break; case S3C2440_CLKDIVN_HDIVN_3_6: - s3c2440_hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3; + hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3; break; } - s3c24xx_hclk = s3c24xx_fclk / s3c2440_hdiv; - s3c24xx_pclk = s3c24xx_hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); + hclk = fclk / hdiv; + pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); /* print brief summary of clocks, etc */ printk("S3C2440: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk), - print_mhz(s3c24xx_pclk)); + print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); /* initialise the clocks here, to allow other things like the * console to use them, and to add new ones after the initialisation */ - s3c24xx_setup_clocks(); - - /* add s3c2440 specific clocks */ - - s3c2440_clk_cam.parent = clk_get(NULL, "hclk"); - s3c2440_clk_ac97.parent = clk_get(NULL, "pclk"); + s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); +} - s3c24xx_register_clock(&s3c2440_clk_ac97); - s3c24xx_register_clock(&s3c2440_clk_cam); +/* need to register class before we actually register the device, and + * we also need to ensure that it has been initialised before any of the + * drivers even try to use it (even if not on an s3c2440 based system) + * as a driver which may support both 2410 and 2440 may try and use it. +*/ - clk_disable(&s3c2440_clk_ac97); - clk_disable(&s3c2440_clk_cam); +int __init s3c2440_core_init(void) +{ + return sysdev_class_register(&s3c2440_sysclass); } +core_initcall(s3c2440_core_init); + int __init s3c2440_init(void) { int ret; printk("S3C2440: Initialising architecture\n"); - ret = sysdev_class_register(&s3c2440_sysclass); - if (ret == 0) - ret = sysdev_register(&s3c2440_sysdev); - + ret = sysdev_register(&s3c2440_sysdev); if (ret != 0) printk(KERN_ERR "failed to register sysdev for s3c2440\n"); - - if (ret == 0) + else ret = platform_add_devices(s3c24xx_uart_devs, s3c2440_uart_count); return ret; diff -Nru a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c --- a/arch/arm/mach-s3c2410/time.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-s3c2410/time.c 2005-03-07 14:54:16 -08:00 @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/time.c * - * Copyright (C) 2003,2004 Simtec Electronics + * Copyright (C) 2003-2005 Simtec Electronics * Ben Dooks, * * This program is free software; you can redistribute it and/or modify @@ -23,6 +23,8 @@ #include #include #include +#include + #include #include #include @@ -33,6 +35,7 @@ #include #include #include +#include #include "clock.h" @@ -169,6 +172,9 @@ tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1; } else { + unsigned long pclk; + struct clk *clk; + /* for the h1940 (and others), we use the pclk from the core * to generate the timer values. since values around 50 to * 70MHz are not values we can directly generate the timer @@ -180,7 +186,18 @@ /* this is used as default if no other timer can be found */ - timer_usec_ticks = timer_mask_usec_ticks(6, s3c24xx_pclk); + clk = clk_get(NULL, "timers"); + if (IS_ERR(clk)) + panic("failed to get clock for system timer"); + + clk_use(clk); + clk_enable(clk); + + pclk = clk_get_rate(clk); + + /* configure clock tick */ + + timer_usec_ticks = timer_mask_usec_ticks(6, pclk); tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; tcfg1 |= S3C2410_TCFG1_MUX4_DIV2; @@ -188,7 +205,7 @@ tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK; tcfg0 |= ((6 - 1) / 2) << S3C2410_TCFG_PRESCALER1_SHIFT; - tcnt = (s3c24xx_pclk / 6) / HZ; + tcnt = (pclk / 6) / HZ; } /* timers reload after counting zero, so reduce the count by 1 */ diff -Nru a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c --- a/arch/arm/mach-sa1100/assabet.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mach-sa1100/assabet.c 2005-03-07 14:54:16 -08:00 @@ -259,9 +259,11 @@ unsigned long phys = __PREG(GPLR) & PMD_MASK; unsigned long virt = io_p2v(phys); int prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO); - pmd_t pmd; - pmd_val(pmd) = phys | prot; - set_pmd(pmd_offset(pgd_offset_k(virt), virt), pmd); + pmd_t *pmd; + + pmd = pmd_offset(pgd_offset_k(virt), virt); + *pmd = __pmd(phys | prot); + flush_pmd_entry(pmd); } /* diff -Nru a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c --- a/arch/arm/mach-sa1100/neponset.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mach-sa1100/neponset.c 2005-03-07 14:54:17 -08:00 @@ -266,6 +266,7 @@ static struct resource smc91x_resources[] = { [0] = { + .name = "smc91x-regs", .start = SA1100_CS3_PHYS, .end = SA1100_CS3_PHYS + 0x01ffffff, .flags = IORESOURCE_MEM, @@ -276,6 +277,7 @@ .flags = IORESOURCE_IRQ, }, [2] = { + .name = "smc91x-attrib", .start = SA1100_CS3_PHYS + 0x02000000, .end = SA1100_CS3_PHYS + 0x03ffffff, .flags = IORESOURCE_MEM, diff -Nru a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c --- a/arch/arm/mm/consistent.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mm/consistent.c 2005-03-07 14:54:17 -08:00 @@ -323,7 +323,7 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle) { struct vm_region *c; - unsigned long flags; + unsigned long flags, addr; pte_t *ptep; size = PAGE_ALIGN(size); @@ -342,11 +342,13 @@ } ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start); + addr = c->vm_start; do { - pte_t pte = ptep_get_and_clear(ptep); + pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep); unsigned long pfn; ptep++; + addr += PAGE_SIZE; if (!pte_none(pte) && pte_present(pte)) { pfn = pte_pfn(pte); diff -Nru a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c --- a/arch/arm/mm/fault-armv.c 2005-03-07 14:54:16 -08:00 +++ b/arch/arm/mm/fault-armv.c 2005-03-07 14:54:16 -08:00 @@ -54,7 +54,7 @@ * fault (ie, is old), we can safely ignore any issues. */ if (pte_present(entry) && pte_val(entry) & shared_pte_mask) { - flush_cache_page(vma, address); + flush_cache_page(vma, address, pte_pfn(entry)); pte_val(entry) &= ~shared_pte_mask; set_pte(pte, entry); flush_tlb_page(vma, address); @@ -115,7 +115,7 @@ if (aliases) adjust_pte(vma, addr); else - flush_cache_page(vma, addr); + flush_cache_page(vma, addr, page_to_pfn(page)); } /* diff -Nru a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c --- a/arch/arm/mm/flush.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mm/flush.c 2005-03-07 14:54:17 -08:00 @@ -56,7 +56,7 @@ if (!(mpnt->vm_flags & VM_MAYSHARE)) continue; offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; - flush_cache_page(mpnt, mpnt->vm_start + offset); + flush_cache_page(mpnt, mpnt->vm_start + offset, page_to_pfn(page)); if (cache_is_vipt()) break; } diff -Nru a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c --- a/arch/arm/mm/mm-armv.c 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/mm/mm-armv.c 2005-03-07 14:54:17 -08:00 @@ -252,7 +252,25 @@ if (virt & (1 << 20)) pmdp++; - set_pmd(pmdp, __pmd(phys | prot)); + *pmdp = __pmd(phys | prot); + flush_pmd_entry(pmdp); +} + +/* + * Create a SUPER SECTION PGD between VIRT and PHYS with protection PROT + */ +static inline void +alloc_init_supersection(unsigned long virt, unsigned long phys, int prot) +{ + int i; + + for (i = 0; i < 16; i += 1) { + alloc_init_section(virt, phys & SUPERSECTION_MASK, + prot | PMD_SECT_SUPER); + + virt += (PGDIR_SIZE / 2); + phys += (PGDIR_SIZE / 2); + } } /* @@ -436,7 +454,8 @@ * Create the page directory entries and any necessary * page tables for the mapping specified by `md'. We * are able to cope here with varying sizes and address - * offsets, and we take full advantage of sections. + * offsets, and we take full advantage of sections and + * supersections. */ static void __init create_mapping(struct map_desc *md) { @@ -483,6 +502,30 @@ length -= PAGE_SIZE; } + /* N.B. ARMv6 supersections are only defined to work with domain 0. + * Since domain assignments can in fact be arbitrary, the + * 'domain == 0' check below is required to insure that ARMv6 + * supersections are only allocated for domain 0 regardless + * of the actual domain assignments in use. + */ + if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { + /* Align to supersection boundary */ + while ((virt & ~SUPERSECTION_MASK || (virt + off) & + ~SUPERSECTION_MASK) && length >= (PGDIR_SIZE / 2)) { + alloc_init_section(virt, virt + off, prot_sect); + + virt += (PGDIR_SIZE / 2); + length -= (PGDIR_SIZE / 2); + } + + while (length >= SUPERSECTION_SIZE) { + alloc_init_supersection(virt, virt + off, prot_sect); + + virt += SUPERSECTION_SIZE; + length -= SUPERSECTION_SIZE; + } + } + /* * A section mapping covers half a "pgdir" entry. */ @@ -526,8 +569,9 @@ if (cpu_arch <= CPU_ARCH_ARMv5) pmdval |= PMD_BIT4; pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT); - set_pmd(pmd, __pmd(pmdval)); - set_pmd(pmd + 1, __pmd(pmdval + (1 << (PGDIR_SHIFT - 1)))); + pmd[0] = __pmd(pmdval); + pmd[1] = __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))); + flush_pmd_entry(pmd); } } diff -Nru a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types --- a/arch/arm/tools/mach-types 2005-03-07 14:54:17 -08:00 +++ b/arch/arm/tools/mach-types 2005-03-07 14:54:17 -08:00 @@ -6,7 +6,7 @@ # To add an entry into this database, please see Documentation/arm/README, # or contact rmk@arm.linux.org.uk # -# Last update: Thu Jan 6 00:10:23 2005 +# Last update: Wed Mar 2 11:32:53 2005 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -226,7 +226,7 @@ pnp1110 SA1100_PNP1110 PNP1110 215 csb226 ARCH_CSB226 CSB226 216 arnold SA1100_ARNOLD ARNOLD 217 -voiceblue SA1100_PSIBOARD PSIBOARD 218 +voiceblue MACH_VOICEBLUE VOICEBLUE 218 jz8028 ARCH_JZ8028 JZ8028 219 h5400 ARCH_H5400 H5400 220 forte SA1100_FORTE FORTE 221 @@ -381,7 +381,7 @@ spearhead ARCH_SPEARHEAD SPEARHEAD 370 pantera ARCH_PANTERA PANTERA 371 prayoglite ARCH_PRAYOGLITE PRAYOGLITE 372 -gumstik ARCH_GUMSTIK GUMSTIK 373 +gumstix ARCH_GUMSTIK GUMSTIK 373 rcube ARCH_RCUBE RCUBE 374 rea_olv ARCH_REA_OLV REA_OLV 375 pxa_iphone ARCH_PXA_IPHONE PXA_IPHONE 376 @@ -667,3 +667,44 @@ manga_ks8695 MACH_MANGA_KS8695 MANGA_KS8695 657 ajax MACH_AJAX AJAX 658 nec_mp900 MACH_NEC_MP900 NEC_MP900 659 +vvtk1000 MACH_VVTK1000 VVTK1000 661 +kafa MACH_KAFA KAFA 662 +vvtk3000 MACH_VVTK3000 VVTK3000 663 +pimx1 MACH_PIMX1 PIMX1 664 +ollie MACH_OLLIE OLLIE 665 +skymax MACH_SKYMAX SKYMAX 666 +jazz MACH_JAZZ JAZZ 667 +tel_t3 MACH_TEL_T3 TEL_T3 668 +aisino_fcr255 MACH_AISINO_FCR255 AISINO_FCR255 669 +btweb MACH_BTWEB BTWEB 670 +dbg_lh79520 MACH_DBG_LH79520 DBG_LH79520 671 +cm41xx MACH_CM41XX CM41XX 672 +ts72xx MACH_TS72XX TS72XX 673 +nggpxa MACH_NGGPXA NGGPXA 674 +csb535 MACH_CSB535 CSB535 675 +csb536 MACH_CSB536 CSB536 676 +pxa_trakpod MACH_PXA_TRAKPOD PXA_TRAKPOD 677 +praxis MACH_PRAXIS PRAXIS 678 +lh75411 MACH_LH75411 LH75411 679 +otom MACH_OTOM OTOM 680 +nexcoder_2440 MACH_NEXCODER_2440 NEXCODER_2440 681 +loox410 MACH_LOOX410 LOOX410 682 +westlake MACH_WESTLAKE WESTLAKE 683 +nsb MACH_NSB NSB 684 +esl_sarva_stn MACH_ESL_SARVA_STN ESL_SARVA_STN 685 +esl_sarva_tft MACH_ESL_SARVA_TFT ESL_SARVA_TFT 686 +esl_sarva_iad MACH_ESL_SARVA_IAD ESL_SARVA_IAD 687 +esl_sarva_acc MACH_ESL_SARVA_ACC ESL_SARVA_ACC 688 +typhoon MACH_TYPHOON TYPHOON 689 +cnav MACH_CNAV CNAV 690 +a730 MACH_A730 A730 691 +netstar MACH_NETSTAR NETSTAR 692 +supercon MACH_PHASEFALE_SUPERCON PHASEFALE_SUPERCON 693 +shiva1100 MACH_SHIVA1100 SHIVA1100 694 +etexsc MACH_ETEXSC ETEXSC 695 +ixdpg465 MACH_IXDPG465 IXDPG465 696 +a9m2410 MACH_A9M2410 A9M2410 697 +a9m2440 MACH_A9M2440 A9M2440 698 +a9m9750 MACH_A9M9750 A9M9750 699 +a9m9360 MACH_A9M9360 A9M9360 700 +unc90 MACH_UNC90 UNC90 701 diff -Nru a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c --- a/arch/frv/mb93090-mb00/pci-frv.c 2005-03-07 14:54:16 -08:00 +++ b/arch/frv/mb93090-mb00/pci-frv.c 2005-03-07 14:54:16 -08:00 @@ -43,7 +43,7 @@ pci_read_config_dword(dev, reg, &check); if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) { printk(KERN_ERR "PCI: Error while updating region " - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, + "%s/%d (%08x != %08x)\n", pci_name(dev), resource, new, check); } } @@ -128,7 +128,7 @@ continue; pr = pci_find_parent_resource(dev, r); if (!pr || request_resource(pr, r) < 0) - printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, dev->slot_name); + printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); } } pcibios_allocate_bus_resources(&bus->children); diff -Nru a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c --- a/arch/frv/mb93090-mb00/pci-vdk.c 2005-03-07 14:54:18 -08:00 +++ b/arch/frv/mb93090-mb00/pci-vdk.c 2005-03-07 14:54:18 -08:00 @@ -294,7 +294,7 @@ */ int i; - printk("PCI: Fixing base address flags for device %s\n", d->slot_name); + printk("PCI: Fixing base address flags for device %s\n", pci_name(d)); for(i=0; i<4; i++) d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; } @@ -308,7 +308,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - printk("PCI: IDE base address fixup for %s\n", d->slot_name); + printk("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { @@ -326,7 +326,7 @@ * There exist PCI IDE controllers which have utter garbage * in first four base registers. Ignore that. */ - printk("PCI: IDE base address trash cleared for %s\n", d->slot_name); + printk("PCI: IDE base address trash cleared for %s\n", pci_name(d)); for(i=0; i<4; i++) d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; } diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig --- a/arch/i386/defconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/defconfig 2005-03-07 14:54:17 -08:00 @@ -802,7 +802,6 @@ # CONFIG_AGP_AMD is not set # CONFIG_AGP_AMD64 is not set CONFIG_AGP_INTEL=y -CONFIG_AGP_INTEL_MCH=m # CONFIG_AGP_NVIDIA is not set # CONFIG_AGP_SIS is not set # CONFIG_AGP_SWORKS is not set diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c --- a/arch/i386/kernel/i386_ksyms.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/kernel/i386_ksyms.c 2005-03-07 14:54:18 -08:00 @@ -97,6 +97,11 @@ EXPORT_SYMBOL(__get_user_2); EXPORT_SYMBOL(__get_user_4); +EXPORT_SYMBOL(__put_user_1); +EXPORT_SYMBOL(__put_user_2); +EXPORT_SYMBOL(__put_user_4); +EXPORT_SYMBOL(__put_user_8); + EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c 2005-03-07 14:54:16 -08:00 +++ b/arch/i386/kernel/process.c 2005-03-07 14:54:16 -08:00 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -828,3 +829,9 @@ return 0; } +unsigned long arch_align_stack(unsigned long sp) +{ + if (randomize_va_space) + sp -= get_random_int() % 8192; + return sp & ~0xf; +} diff -Nru a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c --- a/arch/i386/kernel/signal.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/kernel/signal.c 2005-03-07 14:54:17 -08:00 @@ -277,6 +277,18 @@ { int tmp, err = 0; + /* + * If TF is set due to a debugger (PT_DTRACE), clear the TF + * flag so that register information in the sigcontext is + * correct. + */ + if (unlikely(regs->eflags & TF_MASK)) { + if (likely(current->ptrace & PT_DTRACE)) { + current->ptrace &= ~PT_DTRACE; + regs->eflags &= ~TF_MASK; + } + } + tmp = 0; __asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp)); err |= __put_user(tmp, (unsigned int __user *)&sc->gs); diff -Nru a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile --- a/arch/i386/lib/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/lib/Makefile 2005-03-07 14:54:18 -08:00 @@ -3,7 +3,7 @@ # -lib-y = checksum.o delay.o usercopy.o getuser.o memcpy.o strstr.o \ +lib-y = checksum.o delay.o usercopy.o getuser.o putuser.o memcpy.o strstr.o \ bitops.o lib-$(CONFIG_X86_USE_3DNOW) += mmx.o diff -Nru a/arch/i386/lib/putuser.S b/arch/i386/lib/putuser.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/i386/lib/putuser.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,87 @@ +/* + * __put_user functions. + * + * (C) Copyright 2005 Linus Torvalds + * + * These functions have a non-standard call interface + * to make them more efficient, especially as they + * return an error value in addition to the "real" + * return value. + */ +#include + + +/* + * __put_user_X + * + * Inputs: %eax[:%edx] contains the data + * %ecx contains the address + * + * Outputs: %eax is error code (0 or -EFAULT) + * + * These functions should not modify any other registers, + * as they get called from within inline assembly. + */ + +#define ENTER pushl %ebx ; GET_THREAD_INFO(%ebx) +#define EXIT popl %ebx ; ret + +.text +.align 4 +.globl __put_user_1 +__put_user_1: + ENTER + cmpl TI_addr_limit(%ebx),%ecx + jae bad_put_user +1: movb %al,(%ecx) + xorl %eax,%eax + EXIT + +.align 4 +.globl __put_user_2 +__put_user_2: + ENTER + movl TI_addr_limit(%ebx),%ebx + subl $1,%ebx + cmpl %ebx,%ecx + jae bad_put_user +2: movw %ax,(%ecx) + xorl %eax,%eax + EXIT + +.align 4 +.globl __put_user_4 +__put_user_4: + ENTER + movl TI_addr_limit(%ebx),%ebx + subl $3,%ebx + cmpl %ebx,%ecx + jae bad_put_user +3: movl %eax,(%ecx) + xorl %eax,%eax + EXIT + +.align 4 +.globl __put_user_8 +__put_user_8: + ENTER + movl TI_addr_limit(%ebx),%ebx + subl $7,%ebx + cmpl %ebx,%ecx + jae bad_put_user +4: movl %eax,(%ecx) +5: movl %edx,4(%ecx) + xorl %eax,%eax + EXIT + +bad_put_user: + movl $-14,%eax + EXIT + +.section __ex_table,"a" + .long 1b,bad_put_user + .long 2b,bad_put_user + .long 3b,bad_put_user + .long 4b,bad_put_user + .long 5b,bad_put_user +.previous diff -Nru a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c --- a/arch/i386/mm/highmem.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/mm/highmem.c 2005-03-07 14:54:17 -08:00 @@ -66,7 +66,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte-idx); + pte_clear(&init_mm, vaddr, kmap_pte-idx); __flush_tlb_one(vaddr); #endif diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c --- a/arch/i386/mm/hugetlbpage.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/mm/hugetlbpage.c 2005-03-07 14:54:18 -08:00 @@ -216,7 +216,7 @@ BUG_ON(end & (HPAGE_SIZE - 1)); for (address = start; address < end; address += HPAGE_SIZE) { - pte = ptep_get_and_clear(huge_pte_offset(mm, address)); + pte = ptep_get_and_clear(mm, address, huge_pte_offset(mm, address)); if (pte_none(pte)) continue; page = pte_page(pte); diff -Nru a/arch/i386/mm/mmap.c b/arch/i386/mm/mmap.c --- a/arch/i386/mm/mmap.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/mm/mmap.c 2005-03-07 14:54:17 -08:00 @@ -26,6 +26,7 @@ #include #include +#include /* * Top of mmap area (just below the process stack). @@ -38,13 +39,17 @@ static inline unsigned long mmap_base(struct mm_struct *mm) { unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur; + unsigned long random_factor = 0; + + if (current->flags & PF_RANDOMIZE) + random_factor = get_random_int() % (1024*1024); if (gap < MIN_GAP) gap = MIN_GAP; else if (gap > MAX_GAP) gap = MAX_GAP; - return TASK_SIZE - (gap & PAGE_MASK); + return PAGE_ALIGN(TASK_SIZE - gap - random_factor); } /* diff -Nru a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c --- a/arch/i386/pci/acpi.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/pci/acpi.c 2005-03-07 14:54:17 -08:00 @@ -37,21 +37,12 @@ * also do it here in case there are still broken drivers that * don't use pci_enable_device(). */ - printk(KERN_INFO "** Routing PCI interrupts for all devices because \"pci=routeirq\"\n"); - printk(KERN_INFO "** was specified. If this was required to make a driver work,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); + printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n"); while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) acpi_pci_irq_enable(dev); - } else { - printk(KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n"); - printk(KERN_INFO "** causes a device to stop working, it is probably because the\n"); - printk(KERN_INFO "** driver failed to call pci_enable_device(). As a temporary\n"); - printk(KERN_INFO "** workaround, the \"pci=routeirq\" argument restores the old\n"); - printk(KERN_INFO "** behavior. If this argument makes the device work again,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); - } + } else + printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n"); + #ifdef CONFIG_X86_IO_APIC if (acpi_ioapic) print_IO_APIC(); diff -Nru a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c --- a/arch/i386/pci/direct.c 2005-03-07 14:54:16 -08:00 +++ b/arch/i386/pci/direct.c 2005-03-07 14:54:16 -08:00 @@ -13,7 +13,8 @@ #define PCI_CONF1_ADDRESS(bus, devfn, reg) \ (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3)) -static int pci_conf1_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_conf1_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; @@ -41,7 +42,8 @@ return 0; } -static int pci_conf1_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_conf1_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; @@ -83,7 +85,8 @@ #define PCI_CONF2_ADDRESS(dev, reg) (u16)(0xC000 | (dev << 8) | reg) -static int pci_conf2_read(int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_conf2_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; int dev, fn; @@ -121,7 +124,8 @@ return 0; } -static int pci_conf2_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_conf2_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; int dev, fn; diff -Nru a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c --- a/arch/i386/pci/irq.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/pci/irq.c 2005-03-07 14:54:18 -08:00 @@ -1031,56 +1031,55 @@ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) { - char *msg; - msg = ""; + char *msg = ""; + + pin--; /* interrupt pins are numbered starting from 1 */ + if (io_apic_assign_pci_irqs) { int irq; - if (pin) { - pin--; /* interrupt pins are numbered starting from 1 */ - irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); - /* - * Busses behind bridges are typically not listed in the MP-table. - * In this case we have to look up the IRQ based on the parent bus, - * parent slot, and pin number. The SMP code detects such bridged - * busses itself so we should get into this branch reliably. - */ - temp_dev = dev; - while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ - struct pci_dev * bridge = dev->bus->self; - - pin = (pin + PCI_SLOT(dev->devfn)) % 4; - irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, - PCI_SLOT(bridge->devfn), pin); - if (irq >= 0) - printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n", - pci_name(bridge), 'A' + pin, irq); - dev = bridge; - } - dev = temp_dev; - if (irq >= 0) { + irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin); + /* + * Busses behind bridges are typically not listed in the MP-table. + * In this case we have to look up the IRQ based on the parent bus, + * parent slot, and pin number. The SMP code detects such bridged + * busses itself so we should get into this branch reliably. + */ + temp_dev = dev; + while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ + struct pci_dev * bridge = dev->bus->self; + + pin = (pin + PCI_SLOT(dev->devfn)) % 4; + irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, + PCI_SLOT(bridge->devfn), pin); + if (irq >= 0) + printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n", + pci_name(bridge), 'A' + pin, irq); + dev = bridge; + } + dev = temp_dev; + if (irq >= 0) { #ifdef CONFIG_PCI_MSI - if (!platform_legacy_irq(irq)) - irq = IO_APIC_VECTOR(irq); + if (!platform_legacy_irq(irq)) + irq = IO_APIC_VECTOR(irq); #endif - printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n", - pci_name(dev), 'A' + pin, irq); - dev->irq = irq; - return 0; - } else - msg = " Probably buggy MP table."; - } + printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n", + pci_name(dev), 'A' + pin, irq); + dev->irq = irq; + return 0; + } else + msg = " Probably buggy MP table."; } else if (pci_probe & PCI_BIOS_IRQ_SCAN) msg = ""; else msg = " Please try using pci=biosirq."; - + /* With IDE legacy devices the IRQ lookup failure is not a problem.. */ if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5)) return 0; - + printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n", - 'A' + pin - 1, pci_name(dev), msg); + 'A' + pin, pci_name(dev), msg); } /* VIA bridges use interrupt line for apic/pci steering across the V-Link */ diff -Nru a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c --- a/arch/i386/pci/mmconfig.c 2005-03-07 14:54:17 -08:00 +++ b/arch/i386/pci/mmconfig.c 2005-03-07 14:54:17 -08:00 @@ -34,7 +34,8 @@ } } -static int pci_mmcfg_read(int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_mmcfg_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; @@ -62,7 +63,8 @@ return 0; } -static int pci_mmcfg_write(int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_mmcfg_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; diff -Nru a/arch/i386/pci/numa.c b/arch/i386/pci/numa.c --- a/arch/i386/pci/numa.c 2005-03-07 14:54:16 -08:00 +++ b/arch/i386/pci/numa.c 2005-03-07 14:54:16 -08:00 @@ -14,11 +14,12 @@ #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ (0x80000000 | (BUS2LOCAL(bus) << 16) | (devfn << 8) | (reg & ~3)) -static int pci_conf1_mq_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_conf1_mq_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long flags; - if (!value || (bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) + if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) return -EINVAL; spin_lock_irqsave(&pci_config_lock, flags); @@ -42,11 +43,12 @@ return 0; } -static int pci_conf1_mq_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_conf1_mq_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long flags; - if ((bus > MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) + if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) return -EINVAL; spin_lock_irqsave(&pci_config_lock, flags); diff -Nru a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c --- a/arch/i386/pci/pcbios.c 2005-03-07 14:54:18 -08:00 +++ b/arch/i386/pci/pcbios.c 2005-03-07 14:54:18 -08:00 @@ -172,7 +172,8 @@ return (int) (ret & 0xff00) >> 8; } -static int pci_bios_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_bios_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { unsigned long result = 0; unsigned long flags; @@ -227,7 +228,8 @@ return (int)((result & 0xff00) >> 8); } -static int pci_bios_write (int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_bios_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { unsigned long result = 0; unsigned long flags; diff -Nru a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S --- a/arch/ia64/ia32/ia32_entry.S 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/ia32/ia32_entry.S 2005-03-07 14:54:17 -08:00 @@ -494,7 +494,7 @@ data8 compat_sys_mq_notify data8 compat_sys_mq_getsetattr data8 sys_ni_syscall /* reserved for kexec */ - data8 sys32_waitid + data8 compat_sys_waitid // guard against failures to increase IA32_NR_syscalls .org ia32_syscall_table + 8*IA32_NR_syscalls diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c --- a/arch/ia64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 @@ -2633,32 +2633,6 @@ advice); } -asmlinkage long sys32_waitid(int which, compat_pid_t pid, - compat_siginfo_t __user *uinfo, int options, - struct compat_rusage __user *uru) -{ - siginfo_t info; - struct rusage ru; - 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, - uru ? (struct rusage __user *) &ru : NULL); - set_fs (old_fs); - - if (ret < 0 || info.si_signo == 0) - return ret; - - if (uru && (ret = put_compat_rusage(&ru, uru))) - return ret; - - BUG_ON(info.si_code & __SI_MASK); - info.si_code |= __SI_CHLD; - return copy_siginfo_to_user32(uinfo, &info); -} - #ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */ asmlinkage long sys32_setreuid(compat_uid_t ruid, compat_uid_t euid) diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c --- a/arch/ia64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -244,7 +244,7 @@ continue; page = pte_page(*pte); put_page(page); - pte_clear(pte); + pte_clear(mm, address, pte); } mm->rss -= (end - start) >> PAGE_SHIFT; flush_tlb_range(vma, start, end); diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c --- a/arch/ia64/pci/pci.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ia64/pci/pci.c 2005-03-07 14:54:17 -08:00 @@ -3,9 +3,9 @@ * * Derived from bios32.c of i386 tree. * - * Copyright (C) 2002 Hewlett-Packard Co + * (c) Copyright 2002, 2005 Hewlett-Packard Development Company, L.P. * David Mosberger-Tang - * Bjorn Helgaas + * Bjorn Helgaas * Copyright (C) 2004 Silicon Graphics, Inc. * * Note: Above list of copyright holders is incomplete... @@ -27,26 +27,12 @@ #include #include #include - #include - - -#ifdef CONFIG_SMP -# include -#endif +#include #include #include -#undef DEBUG -#define DEBUG - -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif - static int pci_routeirq; /* @@ -55,23 +41,22 @@ * synchronization mechanism here. */ -#define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \ - ((u64)(seg << 24) | (u64)(bus << 16) | \ - (u64)(devfn << 8) | (u64)(reg)) +#define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \ + (((u64) seg << 24) | (bus << 16) | (devfn << 8) | (reg)) /* SAL 3.2 adds support for extended config space. */ #define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \ - ((u64)(seg << 28) | (u64)(bus << 20) | \ - (u64)(devfn << 12) | (u64)(reg)) + (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg)) static int -pci_sal_read (int seg, int bus, int devfn, int reg, int len, u32 *value) +pci_sal_read (unsigned int seg, unsigned int bus, unsigned int devfn, + int reg, int len, u32 *value) { - u64 addr, mode, data = 0; - int result = 0; + u64 addr, data = 0; + int mode, result; - if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) + if (!value || (seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) return -EINVAL; if ((seg | reg) <= 255) { @@ -82,16 +67,19 @@ mode = 1; } result = ia64_sal_pci_config_read(addr, mode, len, &data); + if (result != 0) + return -EINVAL; *value = (u32) data; - - return result; + return 0; } static int -pci_sal_write (int seg, int bus, int devfn, int reg, int len, u32 value) +pci_sal_write (unsigned int seg, unsigned int bus, unsigned int devfn, + int reg, int len, u32 value) { - u64 addr, mode; + u64 addr; + int mode, result; if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) return -EINVAL; @@ -103,7 +91,10 @@ addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg); mode = 1; } - return ia64_sal_pci_config_write(addr, mode, len, value); + result = ia64_sal_pci_config_write(addr, mode, len, value); + if (result != 0) + return -EINVAL; + return 0; } static struct pci_raw_ops pci_sal_ops = { @@ -160,21 +151,11 @@ * also do it here in case there are still broken drivers that * don't use pci_enable_device(). */ - printk(KERN_INFO "** Routing PCI interrupts for all devices because \"pci=routeirq\"\n"); - printk(KERN_INFO "** was specified. If this was required to make a driver work,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); + printk(KERN_INFO "PCI: Routing interrupts for all devices because \"pci=routeirq\" specified\n"); for_each_pci_dev(dev) acpi_pci_irq_enable(dev); - } else { - printk(KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n"); - printk(KERN_INFO "** causes a device to stop working, it is probably because the\n"); - printk(KERN_INFO "** driver failed to call pci_enable_device(). As a temporary\n"); - printk(KERN_INFO "** workaround, the \"pci=routeirq\" argument restores the old\n"); - printk(KERN_INFO "** behavior. If this argument makes the device work again,\n"); - printk(KERN_INFO "** please email the output of \"lspci\" to bjorn.helgaas@hp.com\n"); - printk(KERN_INFO "** so I can fix the driver.\n"); - } + } else + printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n"); return 0; } diff -Nru a/arch/mips/Kconfig b/arch/mips/Kconfig --- a/arch/mips/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/Kconfig 2005-03-07 14:54:17 -08:00 @@ -122,10 +122,6 @@ The TANBAC TB0229 (VR4131DIMM) is a MIPS-based platform manufactured by TANBAC. Please refer to about VR4131DIMM. -config TANBAC_TB0219 - bool "Added TANBAC TB0219 Base board support" - depends on TANBAC_TB0229 - config VICTOR_MPC30X bool "Support for Victor MP-C303/304" select DMA_NONCOHERENT diff -Nru a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c --- a/arch/mips/kernel/ptrace.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/kernel/ptrace.c 2005-03-07 14:54:18 -08:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -307,7 +308,7 @@ { if (unlikely(current->audit_context)) { if (!entryexit) - audit_syscall_entry(current, regs->orig_eax, + audit_syscall_entry(current, regs->regs[2], regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]); else diff -Nru a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c --- a/arch/mips/mm/c-r3k.c 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/mm/c-r3k.c 2005-03-07 14:54:17 -08:00 @@ -254,8 +254,7 @@ { } -static void r3k_flush_cache_page(struct vm_area_struct *vma, - unsigned long page) +static void r3k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) { } diff -Nru a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c --- a/arch/mips/mm/c-r4k.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/mm/c-r4k.c 2005-03-07 14:54:18 -08:00 @@ -426,8 +426,7 @@ } } -static void r4k_flush_cache_page(struct vm_area_struct *vma, - unsigned long page) +static void r4k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) { struct flush_cache_page_args args; diff -Nru a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c --- a/arch/mips/mm/c-sb1.c 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/mm/c-sb1.c 2005-03-07 14:54:17 -08:00 @@ -160,8 +160,7 @@ * dcache first, then invalidate the icache. If the page isn't * executable, nothing is required. */ -static void local_sb1_flush_cache_page(struct vm_area_struct *vma, - unsigned long addr) +static void local_sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) { int cpu = smp_processor_id(); @@ -183,17 +182,18 @@ struct flush_cache_page_args { struct vm_area_struct *vma; unsigned long addr; + unsigned long pfn; }; static void sb1_flush_cache_page_ipi(void *info) { struct flush_cache_page_args *args = info; - local_sb1_flush_cache_page(args->vma, args->addr); + local_sb1_flush_cache_page(args->vma, args->addr, args->pfn); } /* Dirty dcache could be on another CPU, so do the IPIs */ -static void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +static void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) { struct flush_cache_page_args args; @@ -203,10 +203,11 @@ addr &= PAGE_MASK; args.vma = vma; args.addr = addr; + args.pfn = pfn; on_each_cpu(sb1_flush_cache_page_ipi, (void *) &args, 1, 1); } #else -void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +void sb1_flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) __attribute__((alias("local_sb1_flush_cache_page"))); #endif diff -Nru a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c --- a/arch/mips/mm/c-tx39.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/mm/c-tx39.c 2005-03-07 14:54:18 -08:00 @@ -178,8 +178,7 @@ } } -static void tx39_flush_cache_page(struct vm_area_struct *vma, - unsigned long page) +static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) { int exec = vma->vm_flags & VM_EXEC; struct mm_struct *mm = vma->vm_mm; diff -Nru a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c --- a/arch/mips/mm/cache.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/mm/cache.c 2005-03-07 14:54:16 -08:00 @@ -23,7 +23,7 @@ void (*flush_cache_mm)(struct mm_struct *mm); void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, unsigned long end); -void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page); +void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); void (*flush_icache_range)(unsigned long start, unsigned long end); void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); diff -Nru a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c --- a/arch/mips/mm/highmem.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/mm/highmem.c 2005-03-07 14:54:16 -08:00 @@ -75,7 +75,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte-idx); + pte_clear(&init_mm, vaddr, kmap_pte-idx); local_flush_tlb_one(vaddr); #endif diff -Nru a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c --- a/arch/mips/pci/pci-vr41xx.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/pci/pci-vr41xx.c 2005-03-07 14:54:18 -08:00 @@ -288,4 +288,4 @@ return 0; } -early_initcall(vr41xx_pciu_init); +arch_initcall(vr41xx_pciu_init); diff -Nru a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c --- a/arch/mips/pmc-sierra/yosemite/ht.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/pmc-sierra/yosemite/ht.c 2005-03-07 14:54:18 -08:00 @@ -303,7 +303,7 @@ if (!r->start && r->end) { printk(KERN_ERR "PCI: Device %s not available because of " - "resource collisions\n", dev->slot_name); + "resource collisions\n", pci_name(dev)); return -EINVAL; } if (r->flags & IORESOURCE_IO) @@ -377,7 +377,7 @@ ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) { printk(KERN_ERR "PCI: Error while updating region " - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, + "%s/%d (%08x != %08x)\n", pci_name(dev), resource, new, check); } } @@ -396,7 +396,7 @@ addresses kilobyte aligned. */ if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large" - " (%ld bytes)\n", dev->slot_name, + " (%ld bytes)\n", pci_name(dev), dev->resource - res, size); } diff -Nru a/arch/mips/vr41xx/common/bcu.c b/arch/mips/vr41xx/common/bcu.c --- a/arch/mips/vr41xx/common/bcu.c 2005-03-07 14:54:18 -08:00 +++ b/arch/mips/vr41xx/common/bcu.c 2005-03-07 14:54:18 -08:00 @@ -3,7 +3,7 @@ * * Copyright (C) 2002 MontaVista Software Inc. * Author: Yoichi Yuasa - * Copyright (C) 2003-2004 Yoichi Yuasa + * Copyright (C) 2003-2005 Yoichi Yuasa * * 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 @@ -28,20 +28,16 @@ * Yoichi Yuasa * - Added support for NEC VR4133. */ -#include -#include #include +#include #include #include #include #include -#define IO_MEM_RESOURCE_START 0UL -#define IO_MEM_RESOURCE_END 0x1fffffffUL - -#define CLKSPEEDREG_TYPE1 KSEG1ADDR(0x0b000014) -#define CLKSPEEDREG_TYPE2 KSEG1ADDR(0x0f000014) +#define CLKSPEEDREG_TYPE1 (void __iomem *)KSEG1ADDR(0x0b000014) +#define CLKSPEEDREG_TYPE2 (void __iomem *)KSEG1ADDR(0x0f000014) #define CLKSP(x) ((x) & 0x001f) #define CLKSP_VR4133(x) ((x) & 0x0007) @@ -63,11 +59,15 @@ return vr41xx_vtclock; } +EXPORT_SYMBOL_GPL(vr41xx_get_vtclock_frequency); + unsigned long vr41xx_get_tclock_frequency(void) { return vr41xx_tclock; } +EXPORT_SYMBOL_GPL(vr41xx_get_tclock_frequency); + static inline uint16_t read_clkspeed(void) { switch (current_cpu_data.cputype) { @@ -207,7 +207,7 @@ return tclock; } -static int __init vr41xx_bcu_init(void) +void vr41xx_calculate_clock_frequency(void) { unsigned long pclock; uint16_t clkspeed; @@ -217,11 +217,6 @@ pclock = calculate_pclock(clkspeed); vr41xx_vtclock = calculate_vtclock(clkspeed, pclock); vr41xx_tclock = calculate_tclock(clkspeed, pclock, vr41xx_vtclock); - - iomem_resource.start = IO_MEM_RESOURCE_START; - iomem_resource.end = IO_MEM_RESOURCE_END; - - return 0; } -early_initcall(vr41xx_bcu_init); +EXPORT_SYMBOL_GPL(vr41xx_calculate_clock_frequency); diff -Nru a/arch/mips/vr41xx/common/cmu.c b/arch/mips/vr41xx/common/cmu.c --- a/arch/mips/vr41xx/common/cmu.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/vr41xx/common/cmu.c 2005-03-07 14:54:16 -08:00 @@ -3,7 +3,7 @@ * * Copyright (C) 2001-2002 MontaVista Software Inc. * Author: Yoichi Yuasa - * Copuright (C) 2003-2004 Yoichi Yuasa + * Copuright (C) 2003-2005 Yoichi Yuasa * * 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 @@ -29,6 +29,8 @@ * - Added support for NEC VR4133. */ #include +#include +#include #include #include #include @@ -37,8 +39,16 @@ #include #include -#define CMUCLKMSK_TYPE1 KSEG1ADDR(0x0b000060) -#define CMUCLKMSK_TYPE2 KSEG1ADDR(0x0f000060) +#define CMU_TYPE1_BASE 0x0b000060UL +#define CMU_TYPE1_SIZE 0x4 + +#define CMU_TYPE2_BASE 0x0f000060UL +#define CMU_TYPE2_SIZE 0x4 + +#define CMU_TYPE3_BASE 0x0f000060UL +#define CMU_TYPE3_SIZE 0x8 + +#define CMUCLKMSK 0x0 #define MSKPIU 0x0001 #define MSKSIU 0x0002 #define MSKAIU 0x0004 @@ -52,19 +62,17 @@ #define MSKFFIR 0x0400 #define MSKSCSI 0x1000 #define MSKPPCIU 0x2000 -#define CMUCLKMSK2 KSEG1ADDR(0x0f000064) +#define CMUCLKMSK2 0x4 #define MSKCEU 0x0001 #define MSKMAC0 0x0002 #define MSKMAC1 0x0004 -static uint32_t cmu_base; +static void __iomem *cmu_base; static uint16_t cmuclkmsk, cmuclkmsk2; static spinlock_t cmu_lock; -#define read_cmuclkmsk() readw(cmu_base) -#define read_cmuclkmsk2() readw(CMUCLKMSK2) -#define write_cmuclkmsk() writew(cmuclkmsk, cmu_base) -#define write_cmuclkmsk2() writew(cmuclkmsk2, CMUCLKMSK2) +#define cmu_read(offset) readw(cmu_base + (offset)) +#define cmu_write(offset, value) writew((value), cmu_base + (offset)) void vr41xx_supply_clock(vr41xx_clock_t clock) { @@ -120,13 +128,15 @@ if (clock == CEU_CLOCK || clock == ETHER0_CLOCK || clock == ETHER1_CLOCK) - write_cmuclkmsk2(); + cmu_write(CMUCLKMSK2, cmuclkmsk2); else - write_cmuclkmsk(); + cmu_write(CMUCLKMSK, cmuclkmsk); spin_unlock_irq(&cmu_lock); } +EXPORT_SYMBOL_GPL(vr41xx_supply_clock); + void vr41xx_mask_clock(vr41xx_clock_t clock) { spin_lock_irq(&cmu_lock); @@ -193,38 +203,55 @@ if (clock == CEU_CLOCK || clock == ETHER0_CLOCK || clock == ETHER1_CLOCK) - write_cmuclkmsk2(); + cmu_write(CMUCLKMSK2, cmuclkmsk2); else - write_cmuclkmsk(); + cmu_write(CMUCLKMSK, cmuclkmsk); spin_unlock_irq(&cmu_lock); } +EXPORT_SYMBOL_GPL(vr41xx_mask_clock); + static int __init vr41xx_cmu_init(void) { + unsigned long start, size; + switch (current_cpu_data.cputype) { case CPU_VR4111: case CPU_VR4121: - cmu_base = CMUCLKMSK_TYPE1; + start = CMU_TYPE1_BASE; + size = CMU_TYPE1_SIZE; break; case CPU_VR4122: case CPU_VR4131: - cmu_base = CMUCLKMSK_TYPE2; - break; + start = CMU_TYPE2_BASE; + size = CMU_TYPE2_SIZE; + break; case CPU_VR4133: - cmu_base = CMUCLKMSK_TYPE2; - cmuclkmsk2 = read_cmuclkmsk2(); + start = CMU_TYPE3_BASE; + size = CMU_TYPE3_SIZE; break; default: panic("Unexpected CPU of NEC VR4100 series"); break; } - cmuclkmsk = read_cmuclkmsk(); + if (request_mem_region(start, size, "CMU") == NULL) + return -EBUSY; + + cmu_base = ioremap(start, size); + if (cmu_base == NULL) { + release_mem_region(start, size); + return -EBUSY; + } + + cmuclkmsk = cmu_read(CMUCLKMSK); + if (current_cpu_data.cputype == CPU_VR4133) + cmuclkmsk2 = cmu_read(CMUCLKMSK2); spin_lock_init(&cmu_lock); return 0; } -early_initcall(vr41xx_cmu_init); +core_initcall(vr41xx_cmu_init); diff -Nru a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c --- a/arch/mips/vr41xx/common/init.c 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/vr41xx/common/init.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /* * init.c, Common initialization routines for NEC VR4100 series. * - * Copyright (C) 2003-2004 Yoichi Yuasa + * Copyright (C) 2003-2005 Yoichi Yuasa * * 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,9 +18,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include +#include + +#define IO_MEM_RESOURCE_START 0UL +#define IO_MEM_RESOURCE_END 0x1fffffffUL + +static void __init iomem_resource_init(void) +{ + iomem_resource.start = IO_MEM_RESOURCE_START; + iomem_resource.end = IO_MEM_RESOURCE_END; +} void __init prom_init(void) { @@ -35,6 +46,10 @@ if (i < (argc - 1)) strcat(arcs_cmdline, " "); } + + vr41xx_calculate_clock_frequency(); + + iomem_resource_init(); } unsigned long __init prom_free_prom_memory (void) diff -Nru a/arch/mips/vr41xx/common/ksyms.c b/arch/mips/vr41xx/common/ksyms.c --- a/arch/mips/vr41xx/common/ksyms.c 2005-03-07 14:54:16 -08:00 +++ b/arch/mips/vr41xx/common/ksyms.c 2005-03-07 14:54:16 -08:00 @@ -22,9 +22,6 @@ #include -EXPORT_SYMBOL(vr41xx_get_vtclock_frequency); -EXPORT_SYMBOL(vr41xx_get_tclock_frequency); - EXPORT_SYMBOL(vr41xx_set_rtclong1_cycle); EXPORT_SYMBOL(vr41xx_read_rtclong1_counter); EXPORT_SYMBOL(vr41xx_set_rtclong2_cycle); diff -Nru a/arch/mips/vr41xx/tanbac-tb0229/Makefile b/arch/mips/vr41xx/tanbac-tb0229/Makefile --- a/arch/mips/vr41xx/tanbac-tb0229/Makefile 2005-03-07 14:54:17 -08:00 +++ b/arch/mips/vr41xx/tanbac-tb0229/Makefile 2005-03-07 14:54:17 -08:00 @@ -3,5 +3,3 @@ # obj-y := setup.o - -obj-$(CONFIG_TANBAC_TB0219) += tb0219.o diff -Nru a/arch/mips/vr41xx/tanbac-tb0229/tb0219.c b/arch/mips/vr41xx/tanbac-tb0229/tb0219.c --- a/arch/mips/vr41xx/tanbac-tb0229/tb0219.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,44 +0,0 @@ -/* - * tb0219.c, Setup for the TANBAC TB0219 - * - * Copyright (C) 2003 Megasolution Inc. - * Copyright (C) 2004 Yoichi Yuasa - * - * 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 - -#define TB0219_RESET_REGS KSEG1ADDR(0x0a00000e) - -#define tb0219_hard_reset() writew(0, TB0219_RESET_REGS) - -static void tanbac_tb0219_restart(char *command) -{ - local_irq_disable(); - tb0219_hard_reset(); - while (1); -} - -static int __init tanbac_tb0219_setup(void) -{ - _machine_restart = tanbac_tb0219_restart; - - return 0; -} - -early_initcall(tanbac_tb0219_setup); diff -Nru a/arch/parisc/Kconfig b/arch/parisc/Kconfig --- a/arch/parisc/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/Kconfig 2005-03-07 14:54:17 -08:00 @@ -6,8 +6,7 @@ mainmenu "Linux/PA-RISC Kernel Configuration" config PARISC - bool - default y + def_bool y help The PA-RISC microprocessor is designed by Hewlett-Packard and used in many of their workstations & servers (HP9000 700 and 800 series, @@ -15,19 +14,16 @@ at . config MMU - bool - default y + def_bool y config STACK_GROWSUP - bool - default y + def_bool y config UID16 bool config RWSEM_GENERIC_SPINLOCK - bool - default y + def_bool y config RWSEM_XCHGADD_ALGORITHM bool @@ -111,7 +107,7 @@ def_bool y depends on PA8X00 -config PARISC64 +config 64BIT bool "64-bit kernel" depends on PA8X00 help @@ -124,9 +120,6 @@ enable this option otherwise. The 64bit kernel is significantly bigger and slower than the 32bit one. -config 64BIT - def_bool PARISC64 - config SMP bool "Symmetric multi-processing support" ---help--- @@ -166,13 +159,12 @@ default n config COMPAT - bool - depends on PARISC64 - default y + def_bool y + depends on 64BIT config HPUX bool "Support for HP-UX binaries" - depends on !PARISC64 + depends on !64BIT config NR_CPUS int "Maximum number of CPUs (2-32)" diff -Nru a/arch/parisc/Makefile b/arch/parisc/Makefile --- a/arch/parisc/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/parisc/Makefile 2005-03-07 14:54:18 -08:00 @@ -17,9 +17,12 @@ # Mike Shaver, Helge Deller and Martin K. Petersen # NM = sh $(srctree)/arch/parisc/nm -ifdef CONFIG_PARISC64 +CHECKFLAGS += -D__hppa__=1 + +ifdef CONFIG_64BIT CROSS_COMPILE := hppa64-linux- UTS_MACHINE := parisc64 +CHECKFLAGS += -D__LP64__=1 -m64 else MACHINE := $(subst 64,,$(shell uname -m)) ifneq ($(MACHINE),parisc) @@ -65,8 +68,12 @@ drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/ +PALO := $(shell if which palo; then : ; \ + elif [ -x /sbin/palo ]; then echo /sbin/palo; \ + fi) + palo: vmlinux - @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \ + @if [ -x $PALO ]; then \ echo 'ERROR: Please install palo first (apt-get install palo)';\ echo 'or build it from source and install it somewhere in your $$PATH';\ false; \ @@ -78,7 +85,7 @@ echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ false; \ fi - palo -f ./palo.conf + $(PALO) -f ./palo.conf oldpalo: vmlinux export TOPDIR=`pwd`; \ diff -Nru a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig --- a/arch/parisc/configs/a500_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/configs/a500_defconfig 2005-03-07 14:54:16 -08:00 @@ -1,12 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-pa5 -# Wed Jan 5 13:22:34 2005 +# Linux kernel version: 2.6.11-rc4-pa1 +# Wed Feb 16 11:32:49 2005 # CONFIG_PARISC=y CONFIG_MMU=y CONFIG_STACK_GROWSUP=y CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y # # Code maturity level options @@ -68,7 +71,6 @@ CONFIG_PA8X00=y CONFIG_PA20=y CONFIG_PREFETCH=y -CONFIG_PARISC64=y CONFIG_64BIT=y CONFIG_SMP=y CONFIG_HOTPLUG_CPU=y @@ -87,16 +89,12 @@ CONFIG_PCI_LBA=y CONFIG_IOSAPIC=y CONFIG_IOMMU_SBA=y -# CONFIG_SUPERIO is not set -# CONFIG_CHASSIS_LCD_LED is not set -CONFIG_PDC_CHASSIS=y # # PCCARD (PCMCIA/CardBus) support # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m CONFIG_CARDBUS=y @@ -107,6 +105,7 @@ CONFIG_PD6729=m CONFIG_I82092=m CONFIG_TCIC=m +CONFIG_PCCARD_NONSTATIC=m # # PCI Hotplug Support @@ -114,6 +113,14 @@ # CONFIG_HOTPLUG_PCI is not set # +# PA-RISC specific drivers +# +# CONFIG_SUPERIO is not set +# CONFIG_CHASSIS_LCD_LED is not set +CONFIG_PDC_CHASSIS=y +CONFIG_PDC_STABLE=y + +# # Executable file formats # CONFIG_BINFMT_ELF=y @@ -153,6 +160,7 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_UMEM=m +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set @@ -171,6 +179,7 @@ CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -205,6 +214,7 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=m +CONFIG_SCSI_ISCSI_ATTRS=m # # SCSI low-level drivers @@ -231,10 +241,10 @@ # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_IOMAPPED=y +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set @@ -249,7 +259,6 @@ CONFIG_SCSI_QLA2300=m CONFIG_SCSI_QLA2322=m CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set CONFIG_SCSI_DEBUG=m @@ -399,8 +408,6 @@ CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -465,7 +472,7 @@ # CONFIG_NET_TULIP=y CONFIG_DE2104X=m -CONFIG_TULIP=m +CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set CONFIG_TULIP_MMIO=y # CONFIG_TULIP_NAPI is not set @@ -483,7 +490,6 @@ # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=m -# CONFIG_EEPRO100_PIO is not set CONFIG_E100=m CONFIG_E100_NAPI=y # CONFIG_FEALNX is not set @@ -524,6 +530,7 @@ CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y +# CONFIG_2BUFF_MODE is not set # # Token Ring devices @@ -691,7 +698,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -733,9 +739,9 @@ # # Console display driver support # +CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=160 CONFIG_DUMMY_CONSOLE_ROWS=64 -CONFIG_DUMMY_CONSOLE=y # # Sound @@ -764,6 +770,15 @@ # CONFIG_MMC is not set # +# InfiniBand support +# +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_MTHCA=m +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set +CONFIG_INFINIBAND_IPOIB=m +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -775,10 +790,16 @@ # CONFIG_REISERFS_FS is not set CONFIG_JFS_FS=m # CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set @@ -786,7 +807,7 @@ # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=y @@ -817,7 +838,8 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set -# CONFIG_TMPFS is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -935,6 +957,8 @@ # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_IOREMAP is not set +# CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_RWLOCK is not set # @@ -971,6 +995,10 @@ CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/parisc/configs/n4000_defconfig b/arch/parisc/configs/n4000_defconfig --- a/arch/parisc/configs/n4000_defconfig 2005-03-07 14:54:18 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,927 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-pa5 -# Wed Jan 5 13:40:36 2005 -# -CONFIG_PARISC=y -CONFIG_MMU=y -CONFIG_STACK_GROWSUP=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -# CONFIG_CLEAN_COMPILE is not set -CONFIG_BROKEN=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_HOTPLUG=y -CONFIG_KOBJECT_UEVENT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_FUTEX=y -CONFIG_EPOLL=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Processor type and features -# -# CONFIG_PA7000 is not set -# CONFIG_PA7100LC is not set -# CONFIG_PA7200 is not set -# CONFIG_PA7300LC is not set -CONFIG_PA8X00=y -CONFIG_PA20=y -CONFIG_PREFETCH=y -CONFIG_PARISC64=y -CONFIG_64BIT=y -# CONFIG_SMP is not set -CONFIG_DISCONTIGMEM=y -# CONFIG_PREEMPT is not set -CONFIG_COMPAT=y - -# -# Bus options (PCI, PCMCIA, EISA, GSC, ISA) -# -# CONFIG_GSC is not set -CONFIG_PCI=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y -CONFIG_PCI_LBA=y -CONFIG_IOSAPIC=y -CONFIG_IOMMU_SBA=y -# CONFIG_SUPERIO is not set -CONFIG_CHASSIS_LCD_LED=y -# CONFIG_PDC_CHASSIS is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PC-card bridges -# - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -CONFIG_BLK_DEV_UMEM=m -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP 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_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=6144 -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_ST=y -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=y -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=y - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=y -CONFIG_SCSI_FC_ATTRS=m - -# -# 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_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_INITIO is not set -# 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=y -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -CONFIG_SCSI_QLOGIC_FC=m -# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set -CONFIG_SCSI_QLOGIC_1280=m -# CONFIG_SCSI_QLOGIC_1280_1040 is not set -CONFIG_SCSI_QLA2XXX=y -# CONFIG_SCSI_QLA21XX is not set -# CONFIG_SCSI_QLA22XX is not set -CONFIG_SCSI_QLA2300=m -CONFIG_SCSI_QLA2322=m -CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set -CONFIG_SCSI_DEBUG=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=y -CONFIG_MD_RAID0=y -CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -# CONFIG_BLK_DEV_DM is not set - -# -# Fusion MPT device support -# -CONFIG_FUSION=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=m -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=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_SYN_COOKIES is not set -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 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 -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_LIMIT=m -CONFIG_IP_NF_MATCH_IPRANGE=m -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=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH_ESP=m -CONFIG_IP_NF_MATCH_LENGTH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_TCPMSS=m -CONFIG_IP_NF_MATCH_HELPER=m -CONFIG_IP_NF_MATCH_STATE=m -CONFIG_IP_NF_MATCH_CONNTRACK=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_REALM=m -CONFIG_IP_NF_MATCH_SCTP=m -CONFIG_IP_NF_MATCH_COMMENT=m -CONFIG_IP_NF_MATCH_HASHLIMIT=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 -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_MARK=m -CONFIG_IP_NF_TARGET_CLASSIFY=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 is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set -CONFIG_XFRM=y -CONFIG_XFRM_USER=m - -# -# SCTP Configuration (EXPERIMENTAL) -# -# 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=m -CONFIG_LLC2=m -# 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 -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -CONFIG_NET_CLS_ROUTE=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# 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=m -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_ETHERTAP is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=y -CONFIG_TULIP=y -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -# CONFIG_DE4X5 is not set -# CONFIG_WINBOND_840 is not set -# CONFIG_DM9102 is not set -CONFIG_HP100=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -# 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=m -# CONFIG_EEPRO100_PIO is not set -CONFIG_E100=m -CONFIG_E100_NAPI=y -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=m -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -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_SIS900 is not set -CONFIG_EPIC100=m -# CONFIG_SUNDANCE is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -CONFIG_ACENIC_OMIT_TIGON_I=y -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# 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_VIA_VELOCITY is not set -CONFIG_TIGON3=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_PCI_HERMES=m -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# 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 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 is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# 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 - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE 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 - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=8 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_MULTIPORT is not set -# CONFIG_SERIAL_8250_RSA is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_MUX is not set -CONFIG_PDC_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -CONFIG_GEN_RTC=y -CONFIG_GEN_RTC_X=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -CONFIG_RAW_DRIVER=y -CONFIG_MAX_RAW_DEVS=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE_COLUMNS=160 -CONFIG_DUMMY_CONSOLE_ROWS=64 -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -# CONFIG_REISERFS_FS is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -# CONFIG_XFS_RT is not set -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=y - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -# CONFIG_ZISOFS is not set -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -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 is not set -# CONFIG_DEVPTS_FS_XATTR is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp437" -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -CONFIG_NLS_CODEPAGE_863=m -# CONFIG_NLS_CODEPAGE_864 is not set -CONFIG_NLS_CODEPAGE_865=m -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# 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=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -CONFIG_NLS_ISO8859_15=m -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -CONFIG_DEBUG_KERNEL=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_INFO is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=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 is not set -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_MICHAEL_MIC is not set -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m diff -Nru a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile --- a/arch/parisc/kernel/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/kernel/Makefile 2005-03-07 14:54:16 -08:00 @@ -19,6 +19,6 @@ obj-$(CONFIG_PA11) += pci-dma.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_MODULES) += module.o -obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o ioctl32.o signal32.o +obj-$(CONFIG_64BIT) += binfmt_elf32.o sys_parisc32.o ioctl32.o signal32.o # only supported for PCX-W/U in 64-bit mode at the moment -obj-$(CONFIG_PARISC64) += perf.o perf_asm.o +obj-$(CONFIG_64BIT) += perf.o perf_asm.o diff -Nru a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c --- a/arch/parisc/kernel/drivers.c 2005-03-07 14:54:18 -08:00 +++ b/arch/parisc/kernel/drivers.c 2005-03-07 14:54:18 -08:00 @@ -10,7 +10,7 @@ * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard * Copyright (c) 2001 Helge Deller * Copyright (c) 2001,2002 Ryan Bradetich - * Copyright (c) 2004 Thibaut VARENE + * Copyright (c) 2004-2005 Thibaut VARENE * * The file handles registering devices and drivers, then matching them. * It's the closest we get to a dating agency. @@ -610,6 +610,24 @@ return parse_tree_node(parent, 6, modpath); } EXPORT_SYMBOL(hwpath_to_device); + +/** + * device_to_hwpath - Populates the hwpath corresponding to the given device. + * @param dev the target device + * @param path pointer to a previously allocated hwpath struct to be filled in + */ +void device_to_hwpath(struct device *dev, struct hardware_path *path) +{ + struct parisc_device *padev; + if (dev->bus == &parisc_bus_type) { + padev = to_parisc_device(dev); + get_node_path(dev->parent, path); + path->mod = padev->hw_path; + } else if (is_pci_dev(dev)) { + get_node_path(dev, path); + } +} +EXPORT_SYMBOL(device_to_hwpath); #define BC_PORT_MASK 0x8 #define BC_LOWER_PORT 0x8 diff -Nru a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S --- a/arch/parisc/kernel/pacache.S 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/kernel/pacache.S 2005-03-07 14:54:16 -08:00 @@ -27,17 +27,17 @@ */ #ifdef __LP64__ -#define ADDIB addib,* -#define CMPB cmpb,* -#define ANDCM andcm,* +#define ADDIB addib,* +#define CMPB cmpb,* +#define ANDCM andcm,* - .level 2.0w + .level 2.0w #else -#define ADDIB addib, -#define CMPB cmpb, -#define ANDCM andcm +#define ADDIB addib, +#define CMPB cmpb, +#define ANDCM andcm - .level 2.0 + .level 2.0 #endif #include @@ -46,7 +46,7 @@ #include .text - .align 128 + .align 128 .export flush_tlb_all_local,code @@ -68,7 +68,7 @@ * consolidated. */ - rsm PSW_SM_I,%r19 /* relied upon translation! PA 2.0 Arch. F-5 */ + rsm PSW_SM_I, %r19 /* relied upon translation! PA 2.0 Arch. F-5 */ nop nop nop @@ -77,127 +77,127 @@ nop nop - rsm PSW_SM_Q,%r0 /* Turn off Q bit to load iia queue */ - ldil L%REAL_MODE_PSW, %r1 - ldo R%REAL_MODE_PSW(%r1), %r1 - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%PA(1f),%r1 - ldo R%PA(1f)(%r1),%r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm PSW_SM_Q, %r0 /* Turn off Q bit to load iia queue */ + ldil L%REAL_MODE_PSW, %r1 + ldo R%REAL_MODE_PSW(%r1), %r1 + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%PA(1f), %r1 + ldo R%PA(1f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -1: ldil L%PA(cache_info),%r1 - ldo R%PA(cache_info)(%r1),%r1 +1: ldil L%PA(cache_info), %r1 + ldo R%PA(cache_info)(%r1), %r1 /* Flush Instruction Tlb */ - LDREG ITLB_SID_BASE(%r1),%r20 - LDREG ITLB_SID_STRIDE(%r1),%r21 - LDREG ITLB_SID_COUNT(%r1),%r22 - LDREG ITLB_OFF_BASE(%r1),%arg0 - LDREG ITLB_OFF_STRIDE(%r1),%arg1 - LDREG ITLB_OFF_COUNT(%r1),%arg2 - LDREG ITLB_LOOP(%r1),%arg3 - - ADDIB= -1,%arg3,fitoneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fitdone /* If loop < 0, skip */ - copy %arg0,%r28 /* Init base addr */ - -fitmanyloop: /* Loop if LOOP >= 2 */ - mtsp %r20,%sr1 - add %r21,%r20,%r20 /* increment space */ - copy %arg2,%r29 /* Init middle loop count */ - -fitmanymiddle: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fitmanymiddle /* Adjusted inner loop decr */ - pitlbe 0(%sr1,%r28) - pitlbe,m %arg1(%sr1,%r28) /* Last pitlbe and addr adjust */ - ADDIB> -1,%r29,fitmanymiddle /* Middle loop decr */ - copy %arg3,%r31 /* Re-init inner loop count */ - - movb,tr %arg0,%r28,fitmanyloop /* Re-init base addr */ - ADDIB<=,n -1,%r22,fitdone /* Outer loop count decr */ - -fitoneloop: /* Loop if LOOP = 1 */ - mtsp %r20,%sr1 - copy %arg0,%r28 /* init base addr */ - copy %arg2,%r29 /* init middle loop count */ - -fitonemiddle: /* Loop if LOOP = 1 */ - ADDIB> -1,%r29,fitonemiddle /* Middle loop count decr */ - pitlbe,m %arg1(%sr1,%r28) /* pitlbe for one loop */ + LDREG ITLB_SID_BASE(%r1), %r20 + LDREG ITLB_SID_STRIDE(%r1), %r21 + LDREG ITLB_SID_COUNT(%r1), %r22 + LDREG ITLB_OFF_BASE(%r1), %arg0 + LDREG ITLB_OFF_STRIDE(%r1), %arg1 + LDREG ITLB_OFF_COUNT(%r1), %arg2 + LDREG ITLB_LOOP(%r1), %arg3 + + ADDIB= -1, %arg3, fitoneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ + copy %arg0, %r28 /* Init base addr */ + +fitmanyloop: /* Loop if LOOP >= 2 */ + mtsp %r20, %sr1 + add %r21, %r20, %r20 /* increment space */ + copy %arg2, %r29 /* Init middle loop count */ + +fitmanymiddle: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ + pitlbe 0(%sr1, %r28) + pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ + ADDIB> -1, %r29, fitmanymiddle /* Middle loop decr */ + copy %arg3, %r31 /* Re-init inner loop count */ + + movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ + ADDIB<=,n -1, %r22, fitdone /* Outer loop count decr */ + +fitoneloop: /* Loop if LOOP = 1 */ + mtsp %r20, %sr1 + copy %arg0, %r28 /* init base addr */ + copy %arg2, %r29 /* init middle loop count */ + +fitonemiddle: /* Loop if LOOP = 1 */ + ADDIB> -1, %r29, fitonemiddle /* Middle loop count decr */ + pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ - ADDIB> -1,%r22,fitoneloop /* Outer loop count decr */ - add %r21,%r20,%r20 /* increment space */ + ADDIB> -1, %r22, fitoneloop /* Outer loop count decr */ + add %r21, %r20, %r20 /* increment space */ fitdone: /* Flush Data Tlb */ - LDREG DTLB_SID_BASE(%r1),%r20 - LDREG DTLB_SID_STRIDE(%r1),%r21 - LDREG DTLB_SID_COUNT(%r1),%r22 - LDREG DTLB_OFF_BASE(%r1),%arg0 - LDREG DTLB_OFF_STRIDE(%r1),%arg1 - LDREG DTLB_OFF_COUNT(%r1),%arg2 - LDREG DTLB_LOOP(%r1),%arg3 - - ADDIB= -1,%arg3,fdtoneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fdtdone /* If loop < 0, skip */ - copy %arg0,%r28 /* Init base addr */ - -fdtmanyloop: /* Loop if LOOP >= 2 */ - mtsp %r20,%sr1 - add %r21,%r20,%r20 /* increment space */ - copy %arg2,%r29 /* Init middle loop count */ - -fdtmanymiddle: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fdtmanymiddle /* Adjusted inner loop decr */ - pdtlbe 0(%sr1,%r28) - pdtlbe,m %arg1(%sr1,%r28) /* Last pdtlbe and addr adjust */ - ADDIB> -1,%r29,fdtmanymiddle /* Middle loop decr */ - copy %arg3,%r31 /* Re-init inner loop count */ - - movb,tr %arg0,%r28,fdtmanyloop /* Re-init base addr */ - ADDIB<=,n -1,%r22,fdtdone /* Outer loop count decr */ - -fdtoneloop: /* Loop if LOOP = 1 */ - mtsp %r20,%sr1 - copy %arg0,%r28 /* init base addr */ - copy %arg2,%r29 /* init middle loop count */ - -fdtonemiddle: /* Loop if LOOP = 1 */ - ADDIB> -1,%r29,fdtonemiddle /* Middle loop count decr */ - pdtlbe,m %arg1(%sr1,%r28) /* pdtlbe for one loop */ + LDREG DTLB_SID_BASE(%r1), %r20 + LDREG DTLB_SID_STRIDE(%r1), %r21 + LDREG DTLB_SID_COUNT(%r1), %r22 + LDREG DTLB_OFF_BASE(%r1), %arg0 + LDREG DTLB_OFF_STRIDE(%r1), %arg1 + LDREG DTLB_OFF_COUNT(%r1), %arg2 + LDREG DTLB_LOOP(%r1), %arg3 + + ADDIB= -1, %arg3, fdtoneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ + copy %arg0, %r28 /* Init base addr */ + +fdtmanyloop: /* Loop if LOOP >= 2 */ + mtsp %r20, %sr1 + add %r21, %r20, %r20 /* increment space */ + copy %arg2, %r29 /* Init middle loop count */ + +fdtmanymiddle: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ + pdtlbe 0(%sr1, %r28) + pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ + ADDIB> -1, %r29, fdtmanymiddle /* Middle loop decr */ + copy %arg3, %r31 /* Re-init inner loop count */ + + movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ + ADDIB<=,n -1, %r22,fdtdone /* Outer loop count decr */ + +fdtoneloop: /* Loop if LOOP = 1 */ + mtsp %r20, %sr1 + copy %arg0, %r28 /* init base addr */ + copy %arg2, %r29 /* init middle loop count */ + +fdtonemiddle: /* Loop if LOOP = 1 */ + ADDIB> -1, %r29, fdtonemiddle /* Middle loop count decr */ + pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ - ADDIB> -1,%r22,fdtoneloop /* Outer loop count decr */ - add %r21,%r20,%r20 /* increment space */ + ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ + add %r21, %r20, %r20 /* increment space */ fdtdone: /* Switch back to virtual mode */ - rsm PSW_SM_Q,%r0 /* clear Q bit to load iia queue */ - ldil L%KERNEL_PSW, %r1 - ldo R%KERNEL_PSW(%r1), %r1 - or %r1,%r19,%r1 /* Set I bit if set on entry */ - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%(2f), %r1 - ldo R%(2f)(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm PSW_SM_Q, %r0 /* clear Q bit to load iia queue */ + ldil L%KERNEL_PSW, %r1 + ldo R%KERNEL_PSW(%r1), %r1 + or %r1, %r19, %r1 /* Set I bit if set on entry */ + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%(2f), %r1 + ldo R%(2f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -2: bv %r0(%r2) +2: bv %r0(%r2) nop .exit @@ -211,140 +211,198 @@ .callinfo NO_CALLS .entry - mtsp %r0,%sr1 - ldil L%cache_info,%r1 - ldo R%cache_info(%r1),%r1 + mtsp %r0, %sr1 + ldil L%cache_info, %r1 + ldo R%cache_info(%r1), %r1 /* Flush Instruction Cache */ - LDREG ICACHE_BASE(%r1),%arg0 - LDREG ICACHE_STRIDE(%r1),%arg1 - LDREG ICACHE_COUNT(%r1),%arg2 - LDREG ICACHE_LOOP(%r1),%arg3 - rsm PSW_SM_I,%r22 /* No mmgt ops during loop*/ - ADDIB= -1,%arg3,fioneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fisync /* If loop < 0, do sync */ - -fimanyloop: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fimanyloop /* Adjusted inner loop decr */ - fice 0(%sr1,%arg0) - fice,m %arg1(%sr1,%arg0) /* Last fice and addr adjust */ - movb,tr %arg3,%r31,fimanyloop /* Re-init inner loop count */ - ADDIB<=,n -1,%arg2,fisync /* Outer loop decr */ - -fioneloop: /* Loop if LOOP = 1 */ - ADDIB> -1,%arg2,fioneloop /* Outer loop count decr */ - fice,m %arg1(%sr1,%arg0) /* Fice for one loop */ + LDREG ICACHE_BASE(%r1), %arg0 + LDREG ICACHE_STRIDE(%r1), %arg1 + LDREG ICACHE_COUNT(%r1), %arg2 + LDREG ICACHE_LOOP(%r1), %arg3 + rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ + ADDIB= -1, %arg3, fioneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ + +fimanyloop: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ + fice 0(%sr1, %arg0) + fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ + movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ + ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ + +fioneloop: /* Loop if LOOP = 1 */ + ADDIB> -1, %arg2, fioneloop /* Outer loop count decr */ + fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ fisync: sync - mtsm %r22 - bv %r0(%r2) + mtsm %r22 + bv %r0(%r2) nop .exit .procend - .export flush_data_cache_local,code - .import cache_info,data + .export flush_data_cache_local, code + .import cache_info, data flush_data_cache_local: .proc .callinfo NO_CALLS .entry - mtsp %r0,%sr1 - ldil L%cache_info,%r1 - ldo R%cache_info(%r1),%r1 + mtsp %r0, %sr1 + ldil L%cache_info, %r1 + ldo R%cache_info(%r1), %r1 /* Flush Data Cache */ - LDREG DCACHE_BASE(%r1),%arg0 - LDREG DCACHE_STRIDE(%r1),%arg1 - LDREG DCACHE_COUNT(%r1),%arg2 - LDREG DCACHE_LOOP(%r1),%arg3 - rsm PSW_SM_I,%r22 - ADDIB= -1,%arg3,fdoneloop /* Preadjust and test */ - movb,<,n %arg3,%r31,fdsync /* If loop < 0, do sync */ - -fdmanyloop: /* Loop if LOOP >= 2 */ - ADDIB> -1,%r31,fdmanyloop /* Adjusted inner loop decr */ - fdce 0(%sr1,%arg0) - fdce,m %arg1(%sr1,%arg0) /* Last fdce and addr adjust */ - movb,tr %arg3,%r31,fdmanyloop /* Re-init inner loop count */ - ADDIB<=,n -1,%arg2,fdsync /* Outer loop decr */ - -fdoneloop: /* Loop if LOOP = 1 */ - ADDIB> -1,%arg2,fdoneloop /* Outer loop count decr */ - fdce,m %arg1(%sr1,%arg0) /* Fdce for one loop */ + LDREG DCACHE_BASE(%r1), %arg0 + LDREG DCACHE_STRIDE(%r1), %arg1 + LDREG DCACHE_COUNT(%r1), %arg2 + LDREG DCACHE_LOOP(%r1), %arg3 + rsm PSW_SM_I, %r22 + ADDIB= -1, %arg3, fdoneloop /* Preadjust and test */ + movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ + +fdmanyloop: /* Loop if LOOP >= 2 */ + ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ + fdce 0(%sr1, %arg0) + fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ + movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ + ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ + +fdoneloop: /* Loop if LOOP = 1 */ + ADDIB> -1, %arg2, fdoneloop /* Outer loop count decr */ + fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ fdsync: syncdma sync - mtsm %r22 - bv %r0(%r2) + mtsm %r22 + bv %r0(%r2) nop .exit .procend .export copy_user_page_asm,code + .align 16 copy_user_page_asm: .proc .callinfo NO_CALLS .entry - ldi 64,%r1 +#ifdef __LP64__ + /* PA8x00 CPUs can consume 2 loads or 1 store per cycle. + * Unroll the loop by hand and arrange insn appropriately. + * GCC probably can do this just as well. + */ + + ldd 0(%r25), %r19 + ldi 32, %r1 /* PAGE_SIZE/128 == 32 */ + ldw 64(%r25), %r0 /* prefetch 1 cacheline ahead */ + ldw 128(%r25), %r0 /* prefetch 2 */ + +1: ldd 8(%r25), %r20 + ldw 192(%r25), %r0 /* prefetch 3 */ + ldw 256(%r25), %r0 /* prefetch 4 */ + + ldd 16(%r25), %r21 + ldd 24(%r25), %r22 + std %r19, 0(%r26) + std %r20, 8(%r26) + + ldd 32(%r25), %r19 + ldd 40(%r25), %r20 + std %r21, 16(%r26) + std %r22, 24(%r26) + + ldd 48(%r25), %r21 + ldd 56(%r25), %r22 + std %r19, 32(%r26) + std %r20, 40(%r26) + + ldd 64(%r25), %r19 + ldd 72(%r25), %r20 + std %r21, 48(%r26) + std %r22, 56(%r26) + + ldd 80(%r25), %r21 + ldd 88(%r25), %r22 + std %r19, 64(%r26) + std %r20, 72(%r26) + + ldd 96(%r25), %r19 + ldd 104(%r25), %r20 + std %r21, 80(%r26) + std %r22, 88(%r26) + + ldd 112(%r25), %r21 + ldd 120(%r25), %r22 + std %r19, 96(%r26) + std %r20, 104(%r26) + + ldo 128(%r25), %r25 + std %r21, 112(%r26) + std %r22, 120(%r26) + ldo 128(%r26), %r26 + + ADDIB> -1, %r1, 1b /* bundle 10 */ + ldd 0(%r25), %r19 /* start next loads */ + +#else /* * This loop is optimized for PCXL/PCXL2 ldw/ldw and stw/stw - * bundles (very restricted rules for bundling). It probably - * does OK on PCXU and better, but we could do better with - * ldd/std instructions. Note that until (if) we start saving + * bundles (very restricted rules for bundling). + * Note that until (if) we start saving * the full 64 bit register values on interrupt, we can't * use ldd/std on a 32 bit kernel. */ - + ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ 1: - ldw 0(%r25),%r19 - ldw 4(%r25),%r20 - ldw 8(%r25),%r21 - ldw 12(%r25),%r22 - stw %r19,0(%r26) - stw %r20,4(%r26) - stw %r21,8(%r26) - stw %r22,12(%r26) - ldw 16(%r25),%r19 - ldw 20(%r25),%r20 - ldw 24(%r25),%r21 - ldw 28(%r25),%r22 - stw %r19,16(%r26) - stw %r20,20(%r26) - stw %r21,24(%r26) - stw %r22,28(%r26) - ldw 32(%r25),%r19 - ldw 36(%r25),%r20 - ldw 40(%r25),%r21 - ldw 44(%r25),%r22 - stw %r19,32(%r26) - stw %r20,36(%r26) - stw %r21,40(%r26) - stw %r22,44(%r26) - ldw 48(%r25),%r19 - ldw 52(%r25),%r20 - ldw 56(%r25),%r21 - ldw 60(%r25),%r22 - stw %r19,48(%r26) - stw %r20,52(%r26) - stw %r21,56(%r26) - stw %r22,60(%r26) - ldo 64(%r26),%r26 - ADDIB> -1,%r1,1b - ldo 64(%r25),%r25 - - bv %r0(%r2) + ldw 0(%r25), %r19 + ldw 4(%r25), %r20 + ldw 8(%r25), %r21 + ldw 12(%r25), %r22 + stw %r19, 0(%r26) + stw %r20, 4(%r26) + stw %r21, 8(%r26) + stw %r22, 12(%r26) + ldw 16(%r25), %r19 + ldw 20(%r25), %r20 + ldw 24(%r25), %r21 + ldw 28(%r25), %r22 + stw %r19, 16(%r26) + stw %r20, 20(%r26) + stw %r21, 24(%r26) + stw %r22, 28(%r26) + ldw 32(%r25), %r19 + ldw 36(%r25), %r20 + ldw 40(%r25), %r21 + ldw 44(%r25), %r22 + stw %r19, 32(%r26) + stw %r20, 36(%r26) + stw %r21, 40(%r26) + stw %r22, 44(%r26) + ldw 48(%r25), %r19 + ldw 52(%r25), %r20 + ldw 56(%r25), %r21 + ldw 60(%r25), %r22 + stw %r19, 48(%r26) + stw %r20, 52(%r26) + stw %r21, 56(%r26) + stw %r22, 60(%r26) + ldo 64(%r26), %r26 + ADDIB> -1, %r1, 1b + ldo 64(%r25), %r25 +#endif + bv %r0(%r2) nop .exit @@ -393,33 +451,33 @@ .callinfo NO_CALLS .entry - ldil L%(__PAGE_OFFSET),%r1 - sub %r26,%r1,%r26 - sub %r25,%r1,%r23 /* move physical addr into non shadowed reg */ - - ldil L%(TMPALIAS_MAP_START),%r28 -#ifdef __LP64__ - extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */ - extrd,u %r23,56,32,%r23 /* convert phys addr to tlb insert format */ - depd %r24,63,22,%r28 /* Form aliased virtual address 'to' */ - depdi 0,63,12,%r28 /* Clear any offset bits */ - copy %r28,%r29 - depdi 1,41,1,%r29 /* Form aliased virtual address 'from' */ -#else - extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */ - extrw,u %r23,24,25,%r23 /* convert phys addr to tlb insert format */ - depw %r24,31,22,%r28 /* Form aliased virtual address 'to' */ - depwi 0,31,12,%r28 /* Clear any offset bits */ - copy %r28,%r29 - depwi 1,9,1,%r29 /* Form aliased virtual address 'from' */ + ldil L%(__PAGE_OFFSET), %r1 + sub %r26, %r1, %r26 + sub %r25, %r1, %r23 /* move physical addr into non shadowed reg */ + + ldil L%(TMPALIAS_MAP_START), %r28 +#ifdef __LP64__ + extrd,u %r26,56,32, %r26 /* convert phys addr to tlb insert format */ + extrd,u %r23,56,32, %r23 /* convert phys addr to tlb insert format */ + depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */ + depdi 0, 63,12, %r28 /* Clear any offset bits */ + copy %r28, %r29 + depdi 1, 41,1, %r29 /* Form aliased virtual address 'from' */ +#else + extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ + extrw,u %r23, 24,25, %r23 /* convert phys addr to tlb insert format */ + depw %r24, 31,22, %r28 /* Form aliased virtual address 'to' */ + depwi 0, 31,12, %r28 /* Clear any offset bits */ + copy %r28, %r29 + depwi 1, 9,1, %r29 /* Form aliased virtual address 'from' */ #endif /* Purge any old translations */ - pdtlb 0(%r28) - pdtlb 0(%r29) + pdtlb 0(%r28) + pdtlb 0(%r29) - ldi 64,%r1 + ldi 64, %r1 /* * This loop is optimized for PCXL/PCXL2 ldw/ldw and stw/stw @@ -432,43 +490,43 @@ 1: - ldw 0(%r29),%r19 - ldw 4(%r29),%r20 - ldw 8(%r29),%r21 - ldw 12(%r29),%r22 - stw %r19,0(%r28) - stw %r20,4(%r28) - stw %r21,8(%r28) - stw %r22,12(%r28) - ldw 16(%r29),%r19 - ldw 20(%r29),%r20 - ldw 24(%r29),%r21 - ldw 28(%r29),%r22 - stw %r19,16(%r28) - stw %r20,20(%r28) - stw %r21,24(%r28) - stw %r22,28(%r28) - ldw 32(%r29),%r19 - ldw 36(%r29),%r20 - ldw 40(%r29),%r21 - ldw 44(%r29),%r22 - stw %r19,32(%r28) - stw %r20,36(%r28) - stw %r21,40(%r28) - stw %r22,44(%r28) - ldw 48(%r29),%r19 - ldw 52(%r29),%r20 - ldw 56(%r29),%r21 - ldw 60(%r29),%r22 - stw %r19,48(%r28) - stw %r20,52(%r28) - stw %r21,56(%r28) - stw %r22,60(%r28) - ldo 64(%r28),%r28 - ADDIB> -1,%r1,1b - ldo 64(%r29),%r29 + ldw 0(%r29), %r19 + ldw 4(%r29), %r20 + ldw 8(%r29), %r21 + ldw 12(%r29), %r22 + stw %r19, 0(%r28) + stw %r20, 4(%r28) + stw %r21, 8(%r28) + stw %r22, 12(%r28) + ldw 16(%r29), %r19 + ldw 20(%r29), %r20 + ldw 24(%r29), %r21 + ldw 28(%r29), %r22 + stw %r19, 16(%r28) + stw %r20, 20(%r28) + stw %r21, 24(%r28) + stw %r22, 28(%r28) + ldw 32(%r29), %r19 + ldw 36(%r29), %r20 + ldw 40(%r29), %r21 + ldw 44(%r29), %r22 + stw %r19, 32(%r28) + stw %r20, 36(%r28) + stw %r21, 40(%r28) + stw %r22, 44(%r28) + ldw 48(%r29), %r19 + ldw 52(%r29), %r20 + ldw 56(%r29), %r21 + ldw 60(%r29), %r22 + stw %r19, 48(%r28) + stw %r20, 52(%r28) + stw %r21, 56(%r28) + stw %r22, 60(%r28) + ldo 64(%r28), %r28 + ADDIB> -1, %r1,1b + ldo 64(%r29), %r29 - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -482,49 +540,77 @@ .callinfo NO_CALLS .entry - tophys_r1 %r26 + tophys_r1 %r26 - ldil L%(TMPALIAS_MAP_START),%r28 + ldil L%(TMPALIAS_MAP_START), %r28 #ifdef __LP64__ #if (TMPALIAS_MAP_START >= 0x80000000) - depdi 0,31,32,%r28 /* clear any sign extension */ + depdi 0, 31,32, %r28 /* clear any sign extension */ #endif - extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */ - depd %r25,63,22,%r28 /* Form aliased virtual address 'to' */ - depdi 0,63,12,%r28 /* Clear any offset bits */ -#else - extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */ - depw %r25,31,22,%r28 /* Form aliased virtual address 'to' */ - depwi 0,31,12,%r28 /* Clear any offset bits */ + extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ + depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ + depdi 0, 63,12, %r28 /* Clear any offset bits */ +#else + extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ + depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ + depwi 0, 31,12, %r28 /* Clear any offset bits */ #endif /* Purge any old translation */ - pdtlb 0(%r28) + pdtlb 0(%r28) - ldi 64,%r1 +#ifdef __LP64__ + ldi 32, %r1 /* PAGE_SIZE/128 == 32 */ + + /* PREFETCH (Write) has not (yet) been proven to help here */ +/* #define PREFETCHW_OP ldd 256(%0), %r0 */ + +1: std %r0, 0(%r28) + std %r0, 8(%r28) + std %r0, 16(%r28) + std %r0, 24(%r28) + std %r0, 32(%r28) + std %r0, 40(%r28) + std %r0, 48(%r28) + std %r0, 56(%r28) + std %r0, 64(%r28) + std %r0, 72(%r28) + std %r0, 80(%r28) + std %r0, 88(%r28) + std %r0, 96(%r28) + std %r0, 104(%r28) + std %r0, 112(%r28) + std %r0, 120(%r28) + ADDIB> -1, %r1, 1b + ldo 128(%r28), %r28 + +#else /* ! __LP64 */ + + ldi 64, %r1 /* PAGE_SIZE/64 == 64 */ 1: - stw %r0,0(%r28) - stw %r0,4(%r28) - stw %r0,8(%r28) - stw %r0,12(%r28) - stw %r0,16(%r28) - stw %r0,20(%r28) - stw %r0,24(%r28) - stw %r0,28(%r28) - stw %r0,32(%r28) - stw %r0,36(%r28) - stw %r0,40(%r28) - stw %r0,44(%r28) - stw %r0,48(%r28) - stw %r0,52(%r28) - stw %r0,56(%r28) - stw %r0,60(%r28) - ADDIB> -1,%r1,1b - ldo 64(%r28),%r28 + stw %r0, 0(%r28) + stw %r0, 4(%r28) + stw %r0, 8(%r28) + stw %r0, 12(%r28) + stw %r0, 16(%r28) + stw %r0, 20(%r28) + stw %r0, 24(%r28) + stw %r0, 28(%r28) + stw %r0, 32(%r28) + stw %r0, 36(%r28) + stw %r0, 40(%r28) + stw %r0, 44(%r28) + stw %r0, 48(%r28) + stw %r0, 52(%r28) + stw %r0, 56(%r28) + stw %r0, 60(%r28) + ADDIB> -1, %r1, 1b + ldo 64(%r28), %r28 +#endif /* __LP64 */ - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -537,38 +623,38 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - fdc,m %r23(%r26) - CMPB<< %r26,%r25,1b - fdc,m %r23(%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + fdc,m %r23(%r26) + CMPB<< %r26, %r25,1b + fdc,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -581,38 +667,38 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1,63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1,31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - fdc,m %r23(%sr3,%r26) - CMPB<< %r26,%r25,1b - fdc,m %r23(%sr3,%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + fdc,m %r23(%sr3, %r26) + CMPB<< %r26, %r25,1b + fdc,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -625,38 +711,38 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - fic,m %r23(%sr3,%r26) - CMPB<< %r26,%r25,1b - fic,m %r23(%sr3,%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + fic,m %r23(%sr3, %r26) + CMPB<< %r26, %r25,1b + fic,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -670,37 +756,37 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - -1: pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - pdc,m %r23(%r26) - CMPB<< %r26,%r25,1b - pdc,m %r23(%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + +1: pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + pdc,m %r23(%r26) + CMPB<< %r26, %r25, 1b + pdc,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -718,54 +804,54 @@ .callinfo NO_CALLS .entry - tophys_r1 %r26 + tophys_r1 %r26 - ldil L%(TMPALIAS_MAP_START),%r28 + ldil L%(TMPALIAS_MAP_START), %r28 #ifdef __LP64__ - extrd,u %r26,56,32,%r26 /* convert phys addr to tlb insert format */ - depd %r25,63,22,%r28 /* Form aliased virtual address 'to' */ - depdi 0,63,12,%r28 /* Clear any offset bits */ + extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ + depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ + depdi 0, 63,12, %r28 /* Clear any offset bits */ #else - extrw,u %r26,24,25,%r26 /* convert phys addr to tlb insert format */ - depw %r25,31,22,%r28 /* Form aliased virtual address 'to' */ - depwi 0,31,12,%r28 /* Clear any offset bits */ + extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ + depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ + depwi 0, 31,12, %r28 /* Clear any offset bits */ #endif /* Purge any old translation */ - pdtlb 0(%r28) + pdtlb 0(%r28) - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r29 + depdi,z 1, 63-PAGE_SHIFT,1, %r29 #else - depwi,z 1,31-PAGE_SHIFT,1,%r29 -#endif - add %r28,%r29,%r29 - sub %r29,%r23,%r29 - -1: fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - fdc,m %r23(%r28) - CMPB<< %r28,%r29,1b - fdc,m %r23(%r28) + depwi,z 1, 31-PAGE_SHIFT,1, %r29 +#endif + add %r28, %r29, %r29 + sub %r29, %r23, %r29 + +1: fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + fdc,m %r23(%r28) + CMPB<< %r28, %r29, 1b + fdc,m %r23(%r28) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -779,16 +865,16 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fdc,m %r23(%sr3,%r26) +1: CMPB<<,n %r26, %r25, 1b + fdc,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -801,17 +887,17 @@ .callinfo NO_CALLS .entry - ldil L%dcache_stride,%r1 - ldw R%dcache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%dcache_stride, %r1 + ldw R%dcache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fdc,m %r23(%r26) +1: CMPB<<,n %r26, %r25,1b + fdc,m %r23(%r26) sync syncdma - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -824,16 +910,16 @@ .callinfo NO_CALLS .entry - ldil L%icache_stride,%r1 - ldw R%icache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%icache_stride, %r1 + ldw R%icache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fic,m %r23(%sr3,%r26) +1: CMPB<<,n %r26, %r25,1b + fic,m %r23(%sr3, %r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -846,38 +932,38 @@ .callinfo NO_CALLS .entry - ldil L%icache_stride,%r1 - ldw R%icache_stride(%r1),%r23 + ldil L%icache_stride, %r1 + ldw R%icache_stride(%r1), %r23 #ifdef __LP64__ - depdi,z 1,63-PAGE_SHIFT,1,%r25 + depdi,z 1, 63-PAGE_SHIFT,1, %r25 #else - depwi,z 1,31-PAGE_SHIFT,1,%r25 + depwi,z 1, 31-PAGE_SHIFT,1, %r25 #endif - add %r26,%r25,%r25 - sub %r25,%r23,%r25 - - -1: fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - fic,m %r23(%r26) - CMPB<< %r26,%r25,1b - fic,m %r23(%r26) + add %r26, %r25, %r25 + sub %r25, %r23, %r25 + + +1: fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + fic,m %r23(%r26) + CMPB<< %r26, %r25, 1b + fic,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit @@ -890,22 +976,22 @@ .callinfo NO_CALLS .entry - ldil L%icache_stride,%r1 - ldw R%icache_stride(%r1),%r23 - ldo -1(%r23),%r21 - ANDCM %r26,%r21,%r26 + ldil L%icache_stride, %r1 + ldw R%icache_stride(%r1), %r23 + ldo -1(%r23), %r21 + ANDCM %r26, %r21, %r26 -1: CMPB<<,n %r26,%r25,1b - fic,m %r23(%r26) +1: CMPB<<,n %r26, %r25, 1b + fic,m %r23(%r26) sync - bv %r0(%r2) + bv %r0(%r2) nop .exit .procend - .align 128 + .align 128 .export disable_sr_hashing_asm,code @@ -916,7 +1002,7 @@ /* Switch to real mode */ - ssm 0,%r0 /* relied upon translation! */ + ssm 0, %r0 /* relied upon translation! */ nop nop nop @@ -925,73 +1011,73 @@ nop nop - rsm (PSW_SM_Q|PSW_SM_I),%r0 /* disable Q&I to load the iia queue */ - ldil L%REAL_MODE_PSW, %r1 - ldo R%REAL_MODE_PSW(%r1), %r1 - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%PA(1f),%r1 - ldo R%PA(1f)(%r1),%r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm (PSW_SM_Q|PSW_SM_I), %r0 /* disable Q&I to load the iia queue */ + ldil L%REAL_MODE_PSW, %r1 + ldo R%REAL_MODE_PSW(%r1), %r1 + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%PA(1f), %r1 + ldo R%PA(1f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -1: cmpib,=,n SRHASH_PCXST,%r26,srdis_pcxs - cmpib,=,n SRHASH_PCXL,%r26,srdis_pcxl - cmpib,=,n SRHASH_PA20,%r26,srdis_pa20 - b,n srdis_done +1: cmpib,=,n SRHASH_PCXST, %r26,srdis_pcxs + cmpib,=,n SRHASH_PCXL, %r26,srdis_pcxl + cmpib,=,n SRHASH_PA20, %r26,srdis_pa20 + b,n srdis_done srdis_pcxs: /* Disable Space Register Hashing for PCXS,PCXT,PCXT' */ - .word 0x141c1a00 /* mfdiag %dr0,%r28 */ - .word 0x141c1a00 /* must issue twice */ - depwi 0,18,1,%r28 /* Clear DHE (dcache hash enable) */ - depwi 0,20,1,%r28 /* Clear IHE (icache hash enable) */ - .word 0x141c1600 /* mtdiag %r28,%dr0 */ - .word 0x141c1600 /* must issue twice */ - b,n srdis_done + .word 0x141c1a00 /* mfdiag %dr0, %r28 */ + .word 0x141c1a00 /* must issue twice */ + depwi 0,18,1, %r28 /* Clear DHE (dcache hash enable) */ + depwi 0,20,1, %r28 /* Clear IHE (icache hash enable) */ + .word 0x141c1600 /* mtdiag %r28, %dr0 */ + .word 0x141c1600 /* must issue twice */ + b,n srdis_done srdis_pcxl: /* Disable Space Register Hashing for PCXL */ - .word 0x141c0600 /* mfdiag %dr0,%r28 */ - depwi 0,28,2,%r28 /* Clear DHASH_EN & IHASH_EN */ - .word 0x141c0240 /* mtdiag %r28,%dr0 */ - b,n srdis_done + .word 0x141c0600 /* mfdiag %dr0, %r28 */ + depwi 0,28,2, %r28 /* Clear DHASH_EN & IHASH_EN */ + .word 0x141c0240 /* mtdiag %r28, %dr0 */ + b,n srdis_done srdis_pa20: /* Disable Space Register Hashing for PCXU,PCXU+,PCXW,PCXW+ */ - .word 0x144008bc /* mfdiag %dr2,%r28 */ - depdi 0,54,1,%r28 /* clear DIAG_SPHASH_ENAB (bit 54) */ - .word 0x145c1840 /* mtdiag %r28,%dr2 */ + .word 0x144008bc /* mfdiag %dr2, %r28 */ + depdi 0, 54,1, %r28 /* clear DIAG_SPHASH_ENAB (bit 54) */ + .word 0x145c1840 /* mtdiag %r28, %dr2 */ srdis_done: /* Switch back to virtual mode */ - rsm PSW_SM_Q,%r0 /* clear Q bit to load iia queue */ - ldil L%KERNEL_PSW, %r1 - ldo R%KERNEL_PSW(%r1), %r1 - mtctl %r1, %cr22 - mtctl %r0, %cr17 /* Clear IIASQ tail */ - mtctl %r0, %cr17 /* Clear IIASQ head */ - ldil L%(2f), %r1 - ldo R%(2f)(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ head */ - ldo 4(%r1), %r1 - mtctl %r1, %cr18 /* IIAOQ tail */ + rsm PSW_SM_Q, %r0 /* clear Q bit to load iia queue */ + ldil L%KERNEL_PSW, %r1 + ldo R%KERNEL_PSW(%r1), %r1 + mtctl %r1, %cr22 + mtctl %r0, %cr17 /* Clear IIASQ tail */ + mtctl %r0, %cr17 /* Clear IIASQ head */ + ldil L%(2f), %r1 + ldo R%(2f)(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ head */ + ldo 4(%r1), %r1 + mtctl %r1, %cr18 /* IIAOQ tail */ rfi nop -2: bv %r0(%r2) +2: bv %r0(%r2) nop .exit diff -Nru a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c --- a/arch/parisc/kernel/pci-dma.c 2005-03-07 14:54:18 -08:00 +++ b/arch/parisc/kernel/pci-dma.c 2005-03-07 14:54:18 -08:00 @@ -180,7 +180,7 @@ end = PMD_SIZE; do { pte_t page = *pte; - pte_clear(pte); + pte_clear(&init_mm, vaddr, pte); purge_tlb_start(); pdtlb_kernel(orig_vaddr); purge_tlb_end(); diff -Nru a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c --- a/arch/parisc/kernel/pdc_chassis.c 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/kernel/pdc_chassis.c 2005-03-07 14:54:17 -08:00 @@ -182,7 +182,7 @@ DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message); -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT if (is_pdc_pat()) { switch(message) { case PDC_CHASSIS_DIRECT_BSTART: @@ -238,7 +238,7 @@ retval = -1; } } else retval = -1; -#endif /* CONFIG_PARISC64 */ +#endif /* CONFIG_64BIT */ } /* if (pdc_chassis_enabled) */ #endif /* CONFIG_PDC_CHASSIS */ return retval; diff -Nru a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S --- a/arch/parisc/kernel/perf_asm.S 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/kernel/perf_asm.S 2005-03-07 14:54:17 -08:00 @@ -22,9 +22,9 @@ #include #include -#ifdef __LP64__ +#ifdef CONFIG_64BIT .level 2.0w -#endif /* __LP64__ */ +#endif /* CONFIG_64BIT */ #define MTDIAG_1(gr) .word 0x14201840 + gr*0x10000 #define MTDIAG_2(gr) .word 0x14401840 + gr*0x10000 diff -Nru a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S --- a/arch/parisc/kernel/vmlinux.lds.S 2005-03-07 14:54:16 -08:00 +++ b/arch/parisc/kernel/vmlinux.lds.S 2005-03-07 14:54:16 -08:00 @@ -29,7 +29,7 @@ #include /* ld script to make hppa Linux kernel */ -#ifndef CONFIG_PARISC64 +#ifndef CONFIG_64BIT OUTPUT_FORMAT("elf32-hppa-linux") OUTPUT_ARCH(hppa) #else @@ -38,7 +38,7 @@ #endif ENTRY(_stext) -#ifndef CONFIG_PARISC64 +#ifndef CONFIG_64BIT jiffies = jiffies_64 + 4; #else jiffies = jiffies_64; @@ -112,7 +112,7 @@ . = ALIGN(16384); init_istack : { *(init_istack) } -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT . = ALIGN(16); /* Linkage tables */ .opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } @@ -180,7 +180,7 @@ /* Sections to be discarded */ /DISCARD/ : { *(.exitcall.exit) -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT /* temporary hack until binutils is fixed to not emit these for static binaries */ *(.interp) diff -Nru a/arch/parisc/mm/kmap.c b/arch/parisc/mm/kmap.c --- a/arch/parisc/mm/kmap.c 2005-03-07 14:54:17 -08:00 +++ b/arch/parisc/mm/kmap.c 2005-03-07 14:54:17 -08:00 @@ -49,10 +49,10 @@ * unmap_uncached_page() and save a little code space but I didn't * do that since I'm not certain whether this is the right path. -PB */ -static void unmap_cached_pte(pte_t * pte, unsigned long arg) +static void unmap_cached_pte(pte_t * pte, unsigned long addr, unsigned long arg) { pte_t page = *pte; - pte_clear(pte); + pte_clear(&init_mm, addr, pte); if (!pte_none(page)) { if (pte_present(page)) { unsigned long map_nr = pte_pagenr(page); diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/Kconfig 2005-03-07 14:54:18 -08:00 @@ -52,17 +52,17 @@ default 6xx config 6xx - bool "6xx/7xx/74xx/52xx/8260" + bool "6xx/7xx/74xx/52xx/82xx/83xx" help There are four types of PowerPC chips supported. The more common types (601, 603, 604, 740, 750, 7400), the Motorola embedded - versions (821, 823, 850, 855, 860, 52xx, 8260), the IBM embedded + versions (821, 823, 850, 855, 860, 52xx, 82xx, 83xx), the IBM embedded versions (403 and 405) and the high end 64 bit Power processors (POWER 3, POWER4, and IBM 970 also known as G5) Unless you are building a kernel for one of the embedded processor systems, 64 bit IBM RS/6000 or an Apple G5, choose 6xx. Note that the kernel runs in 32-bit mode even on 64-bit chips. - Also note that because the 52xx & 82xx family has a 603e core, + Also note that because the 52xx, 82xx, & 83xx family has a 603e core, specific support for that chipset is asked later on. config 40x @@ -109,7 +109,7 @@ config ALTIVEC bool "AltiVec Support" depends on 6xx || POWER4 - depends on !8260 + depends on !8260 && !83xx ---help--- This option enables kernel support for the Altivec extensions to the PowerPC processor. The kernel currently supports saving and restoring @@ -140,7 +140,7 @@ config TAU bool "Thermal Management Support" - depends on 6xx && !8260 + depends on 6xx && !8260 && !83xx help G3 and G4 processors have an on-chip temperature sensor called the 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die @@ -228,6 +228,7 @@ If in doubt, say Y here. source arch/ppc/platforms/4xx/Kconfig +source arch/ppc/platforms/83xx/Kconfig source arch/ppc/platforms/85xx/Kconfig config PPC64BRIDGE @@ -475,7 +476,7 @@ choice prompt "Machine Type" - depends on 6xx || POWER3 || POWER4 + depends on (6xx && !83xx) || POWER3 || POWER4 default PPC_MULTIPLATFORM ---help--- Linux currently supports several different kinds of PowerPC-based @@ -660,7 +661,7 @@ config 8260 bool "CPM2 Support" if WILLOW - depends on 6xx + depends on 6xx && !83xx default y if TQM8260 || RPX8260 || EST8260 || SBS8260 || SBC82xx || PQ2FADS help The MPC8260 is a typical embedded CPU made by Motorola. Selecting @@ -1079,8 +1080,8 @@ bool config PCI - bool "PCI support" if 40x || CPM2 || 85xx - default y if !40x && !CPM2 && !8xx && !APUS && !85xx + bool "PCI support" if 40x || CPM2 || 83xx || 85xx + default y if !40x && !CPM2 && !8xx && !APUS && !83xx && !85xx default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS default PCI_QSPAN if !4xx && !CPM2 && 8xx help diff -Nru a/arch/ppc/Makefile b/arch/ppc/Makefile --- a/arch/ppc/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/Makefile 2005-03-07 14:54:18 -08:00 @@ -57,6 +57,7 @@ core-y += arch/ppc/kernel/ arch/ppc/platforms/ \ arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/ core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ +core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/ core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/ core-$(CONFIG_MATH_EMULATION) += arch/ppc/math-emu/ core-$(CONFIG_XMON) += arch/ppc/xmon/ @@ -112,26 +113,24 @@ 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 $(TOUT) >/dev/null 2>&1 && echo 0 || echo 1) checkbin: -ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) - @echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' - @echo 'correctly with gcc-3.4 and your version of binutils.' - @echo '*** Please upgrade your binutils or downgrade your gcc' - @false -endif -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 2.12.1 or newer' - @false -endif - @true + @if test "$(GCC_VERSION)" = "0304" ; then \ + if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ + echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ + echo 'correctly with gcc-3.4 and your version of binutils.'; \ + echo '*** Please upgrade your binutils or downgrade your gcc'; \ + false; \ + fi ; \ + fi + @if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \ + echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \ + echo 'correctly with old versions of binutils.' ; \ + echo '*** Please upgrade your binutils to 2.12.1 or newer' ; \ + false ; \ + fi CLEAN_FILES += include/asm-$(ARCH)/offsets.h \ arch/$(ARCH)/kernel/asm-offsets.s \ diff -Nru a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile --- a/arch/ppc/boot/simple/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/boot/simple/Makefile 2005-03-07 14:54:16 -08:00 @@ -65,6 +65,7 @@ zimageinitrd-$(CONFIG_EBONY) := zImage.initrd-TREE end-$(CONFIG_EBONY) := ebony entrypoint-$(CONFIG_EBONY) := 0x01000000 + extra.o-$(CONFIG_EBONY) := openbios.o zimage-$(CONFIG_LUAN) := zImage-TREE zimageinitrd-$(CONFIG_LUAN) := zImage.initrd-TREE diff -Nru a/arch/ppc/boot/simple/misc-mv64x60.S b/arch/ppc/boot/simple/misc-mv64x60.S --- a/arch/ppc/boot/simple/misc-mv64x60.S 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/boot/simple/misc-mv64x60.S 2005-03-07 14:54:17 -08:00 @@ -32,7 +32,11 @@ #if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE) move_base: li r20,0 +#ifdef CONFIG_GT64260 li r23,20 +#else /* Must be mv64[34]60 which uses top 16 bits */ + li r23,16 +#endif /* Relocate bridge's regs */ addis r25,0,CONFIG_MV64X60_BASE@h diff -Nru a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/boot/simple/openbios.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,37 @@ +/* + * arch/ppc/boot/simple/openbios.c + * + * 2005 (c) SYSGO AG - g.jaeger@sysgo.com + * 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. + * + * Derived from arch/ppc/boot/simple/pibs.c (from MontaVista) + */ + +#include +#include +#include +#include +#include + +extern unsigned long decompress_kernel(unsigned long load_addr, int num_words, + unsigned long cksum); + +/* We need to make sure that this is before the images to ensure + * that it's in a mapped location. */ +bd_t hold_resid_buf __attribute__ ((__section__ (".data.boot"))); +bd_t *hold_residual = &hold_resid_buf; + +void * +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, + void *ign1, void *ign2) +{ + decompress_kernel(load_addr, num_words, cksum); + + /* simply copy the MAC addresses */ + memcpy(hold_residual->bi_enetaddr, (char *)EBONY_OPENBIOS_MAC_BASE, 6); + memcpy(hold_residual->bi_enet1addr, (char *)(EBONY_OPENBIOS_MAC_BASE+EBONY_OPENBIOS_MAC_OFFSET), 6); + + return (void *)hold_residual; +} diff -Nru a/arch/ppc/configs/katana_defconfig b/arch/ppc/configs/katana_defconfig --- a/arch/ppc/configs/katana_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/configs/katana_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.11-rc2 -# Tue Jan 25 16:31:13 2005 +# Linux kernel version: 2.6.11-rc4 +# Tue Feb 15 14:27:12 2005 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y @@ -152,8 +152,8 @@ CONFIG_TASK_SIZE=0x80000000 CONFIG_CONSISTENT_START_BOOL=y CONFIG_CONSISTENT_START=0xf0000000 -# CONFIG_CONSISTENT_SIZE_BOOL is not set -CONFIG_CONSISTENT_SIZE=0x00200000 +CONFIG_CONSISTENT_SIZE_BOOL=y +CONFIG_CONSISTENT_SIZE=0x00400000 # CONFIG_BOOT_LOAD_BOOL is not set CONFIG_BOOT_LOAD=0x00800000 @@ -171,7 +171,82 @@ # # Memory Technology Devices (MTD) # -# CONFIG_MTD is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_PARTITIONS=y +CONFIG_MTD_CONCAT=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +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=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_NOSWAP=y +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set +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 is not set +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_START=0xe0000000 +CONFIG_MTD_PHYSMAP_LEN=0x0 +CONFIG_MTD_PHYSMAP_BANKWIDTH=4 + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_SLRAM is not set +CONFIG_MTD_PHRAM=y +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set # # Parallel port support @@ -531,7 +606,6 @@ # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -573,6 +647,10 @@ # CONFIG_JBD is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set @@ -619,6 +697,8 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set @@ -637,7 +717,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set diff -Nru a/arch/ppc/configs/mpc834x_sys_defconfig b/arch/ppc/configs/mpc834x_sys_defconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/configs/mpc834x_sys_defconfig 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,644 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc4 +# Thu Feb 17 16:12:23 2005 +# +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=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_LOCALVERSION="" +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_KOBJECT_UEVENT=y +# CONFIG_IKCONFIG is not set +CONFIG_EMBEDDED=y +# CONFIG_KALLSYMS is not set +CONFIG_FUTEX=y +# CONFIG_EPOLL is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Processor +# +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_CPU_FREQ is not set +CONFIG_PPC_GEN550=y +CONFIG_83xx=y + +# +# Freescale 83xx options +# +CONFIG_MPC834x_SYS=y +CONFIG_MPC834x=y +CONFIG_PPC_STD_MMU=y + +# +# Platform options +# +# CONFIG_SMP is not set +# CONFIG_PREEMPT is not set +# CONFIG_HIGHMEM is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_CMDLINE_BOOL is not set + +# +# Bus options +# +CONFIG_GENERIC_ISA_DMA=y +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# Advanced setup +# +# CONFIG_ADVANCED_OPTIONS is not set + +# +# Default settings for advanced configuration options are used +# +CONFIG_HIGHMEM_START=0xfe000000 +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_KERNEL_START=0xc0000000 +CONFIG_TASK_SIZE=0x80000000 +CONFIG_BOOT_LOAD=0x00800000 + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=32768 +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_LBD is not set +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Macintosh device drivers +# + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV 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=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_SYN_COOKIES=y +# 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# 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_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 +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# 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 + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y + +# +# Ethernet (1000 Mbit) +# +CONFIG_GIANFAR=y +# CONFIG_GFAR_NAPI is not set + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Telephony Support +# +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# 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_I8042 is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE 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 is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +CONFIG_GEN_RTC=y +# CONFIG_GEN_RTC_X is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_ISA is not set +CONFIG_I2C_MPC=y +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ASB100 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_LM63 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_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SMSC47M1 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 +# + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +# CONFIG_FB is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set + +# +# XFS support +# +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# 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_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# 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_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 +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +# CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Library routines +# +# CONFIG_CRC_CCITT is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# diff -Nru a/arch/ppc/configs/pmac_defconfig b/arch/ppc/configs/pmac_defconfig --- a/arch/ppc/configs/pmac_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/configs/pmac_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,8 +1,12 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc4 +# Sun Feb 13 14:56:58 2005 # CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_PPC=y CONFIG_PPC32=y @@ -13,40 +17,45 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -# CONFIG_STANDALONE is not set CONFIG_BROKEN_ON_SMP=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # 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 -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y # @@ -58,17 +67,21 @@ # 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=y # CONFIG_TAU_INT is not set # CONFIG_TAU_AVERAGE is not set CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_PROC_INTF=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_STAT_DETAILS=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 is not set -# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_POWERSAVE=m +CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=m CONFIG_CPU_FREQ_PMAC=y CONFIG_CPU_FREQ_TABLE=y CONFIG_PPC601_SYNC_FIX=y @@ -80,11 +93,14 @@ # CONFIG_PPC_MULTIPLATFORM=y # CONFIG_APUS is not set +# CONFIG_KATANA is not set # CONFIG_WILLOW is not set +# CONFIG_CPCI690 is not set # CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set -# CONFIG_EV64260 is not set +# CONFIG_CHESTNUT is not set # CONFIG_SPRUCE is not set +# CONFIG_EV64260 is not set # CONFIG_LOPEC is not set # CONFIG_MCPN765 is not set # CONFIG_MVME5100 is not set @@ -97,9 +113,13 @@ # 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_RPX6 is not set +# CONFIG_RPX8260 is not set # CONFIG_TQM8260 is not set +# CONFIG_ADS8272 is not set +# CONFIG_PQ2FADS is not set +# CONFIG_LITE5200 is not set CONFIG_PPC_CHRP=y CONFIG_PPC_PMAC=y CONFIG_PPC_PREP=y @@ -108,11 +128,9 @@ # CONFIG_SMP is not set # CONFIG_PREEMPT is not set # CONFIG_HIGHMEM is not set -CONFIG_KERNEL_ELF=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_PROC_DEVICETREE=y -CONFIG_PPC_RTAS=y # CONFIG_PREP_RESIDUAL is not set # CONFIG_CMDLINE_BOOL is not set @@ -127,14 +145,21 @@ CONFIG_PCI_NAMES=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support # -CONFIG_PCMCIA=m +CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -CONFIG_YENTA=m +CONFIG_PCMCIA=m CONFIG_CARDBUS=y -CONFIG_I82092=m -CONFIG_TCIC=m + +# +# PC-card bridges +# +CONFIG_YENTA=m +# CONFIG_PD6729 is not set +# CONFIG_I82092 is not set +# CONFIG_TCIC is not set +CONFIG_PCCARD_NONSTATIC=m # # Advanced setup @@ -156,7 +181,10 @@ # # Generic Driver Options # +# CONFIG_STANDALONE is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set # # Memory Technology Devices (MTD) @@ -176,18 +204,35 @@ # Block devices # # CONFIG_BLK_DEV_FD is not set +CONFIG_MAC_FLOPPY=m # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set 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_UB is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" CONFIG_LBD=y +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -198,16 +243,15 @@ # # 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_IDECS=m +# CONFIG_BLK_DEV_IDECS is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=y # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes @@ -218,12 +262,11 @@ # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set -CONFIG_BLK_DEV_SL82C105=y +# CONFIG_BLK_DEV_SL82C105 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set @@ -249,7 +292,7 @@ CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_BLINK=y -CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y +# CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y @@ -275,7 +318,6 @@ # 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=y # CONFIG_SCSI_LOGGING is not set @@ -284,33 +326,35 @@ # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_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=m CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y CONFIG_SCSI_AIC7XXX_OLD=m # CONFIG_SCSI_AIC79XX is not set -CONFIG_SCSI_ADVANSYS=m -# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_DPT_I2O 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_INITIO is not set # CONFIG_SCSI_INIA100 is not set CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 @@ -327,7 +371,6 @@ # 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_NSP32 is not set @@ -384,7 +427,8 @@ CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m -# CONFIG_IEEE1394_CMP is not set +CONFIG_IEEE1394_CMP=m +CONFIG_IEEE1394_AMDTP=m # # I2O device support @@ -400,8 +444,6 @@ CONFIG_PMAC_PBOOK=y CONFIG_PMAC_APM_EMU=y CONFIG_PMAC_BACKLIGHT=y -# CONFIG_MAC_FLOPPY is not set -CONFIG_MAC_SERIAL=y CONFIG_ADB_MACIO=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y @@ -434,6 +476,9 @@ # 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_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -447,11 +492,14 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_QUEUE is not set +CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_LIMIT=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -471,8 +519,17 @@ CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=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 @@ -484,17 +541,19 @@ CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -# CONFIG_IP_NF_MANGLE is not set -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=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 is not set -CONFIG_IP_NF_TARGET_NOTRACK=m -CONFIG_IP_NF_RAW=m # # SCTP Configuration (EXPERIMENTAL) @@ -512,12 +571,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing @@ -593,7 +652,6 @@ CONFIG_MACE=y # CONFIG_MACE_AAUI_PORT is not set CONFIG_BMAC=y -# CONFIG_OAKNET is not set # CONFIG_HAPPYMEAL is not set CONFIG_SUNGEM=y # CONFIG_NET_VENDOR_3COM is not set @@ -634,6 +692,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -667,7 +726,6 @@ # # Wireless 802.11b ISA/PCI cards support # -# CONFIG_AIRO is not set CONFIG_HERMES=m CONFIG_APPLE_AIRPORT=m # CONFIG_PLX_HERMES is not set @@ -691,15 +749,7 @@ # # PCMCIA network device support # -CONFIG_NET_PCMCIA=y -# CONFIG_PCMCIA_3C589 is not set -# CONFIG_PCMCIA_3C574 is not set -# CONFIG_PCMCIA_FMVJ18X is not set -# CONFIG_PCMCIA_PCNET is not set -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_PCMCIA_AXNET is not set +# CONFIG_NET_PCMCIA is not set # # Wan interfaces @@ -714,10 +764,9 @@ CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=y CONFIG_PPP_BSDCOMP=m -# CONFIG_PPPOE is not set +CONFIG_PPPOE=m # CONFIG_SLIP is not set # CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set @@ -740,7 +789,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set @@ -753,11 +802,8 @@ # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y +# CONFIG_SERIO is not set # CONFIG_SERIO_I8042 is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set # # Input Device Drivers @@ -796,12 +842,12 @@ # Non-8250 serial port support # CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_PMACZILOG=y -# CONFIG_SERIAL_PMACZILOG_CONSOLE is not set +CONFIG_SERIAL_PMACZILOG_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -822,9 +868,14 @@ # # Ftape, the floppy tape device driver # -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set +CONFIG_AGP=m +CONFIG_AGP_UNINORTH=m +CONFIG_DRM=m +# CONFIG_DRM_TDFX is not set +CONFIG_DRM_R128=m +CONFIG_DRM_RADEON=m +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set # # PCMCIA character devices @@ -843,6 +894,7 @@ # CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set # # I2C Hardware Bus support @@ -857,6 +909,7 @@ # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set CONFIG_I2C_KEYWEST=m +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PIIX4 is not set @@ -866,26 +919,38 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # 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 # # Hardware Sensors Chip support # # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 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_LM63 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_LM87 is not set # CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 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 @@ -897,12 +962,18 @@ # 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 # @@ -920,6 +991,9 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +# CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y @@ -927,16 +1001,14 @@ CONFIG_FB_PLATINUM=y CONFIG_FB_VALKYRIE=y CONFIG_FB_CT65550=y +# CONFIG_FB_ASILIANT is not set CONFIG_FB_IMSTT=y -# CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set # CONFIG_FB_RIVA is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -# CONFIG_FB_MATROX_G450 is not set -CONFIG_FB_MATROX_G100A=y -CONFIG_FB_MATROX_G100=y +CONFIG_FB_MATROX_G=y # CONFIG_FB_MATROX_I2C is not set # CONFIG_FB_MATROX_MULTIHEAD is not set # CONFIG_FB_RADEON_OLD is not set @@ -946,12 +1018,15 @@ CONFIG_FB_ATY128=y CONFIG_FB_ATY=y CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GX=y +CONFIG_FB_ATY_GENERIC_LCD=y # CONFIG_FB_ATY_XL_INIT is not set +CONFIG_FB_ATY_GX=y +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set CONFIG_FB_3DFX=y +CONFIG_FB_3DFX_ACCEL=y # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_TRIDENT is not set # CONFIG_FB_VIRTUAL is not set @@ -960,10 +1035,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 @@ -975,6 +1048,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_DEVICE=y # # Sound @@ -989,6 +1067,7 @@ CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m CONFIG_SND_SEQUENCER=m CONFIG_SND_SEQ_DUMMY=m @@ -1013,6 +1092,7 @@ # # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set @@ -1021,6 +1101,8 @@ # CONFIG_SND_CS46XX is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_CA0106 is not set # CONFIG_SND_KORG1212 is not set # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set @@ -1044,6 +1126,7 @@ # CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_SONICVIBES is not set # CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VX222 is not set # @@ -1052,9 +1135,10 @@ CONFIG_SND_POWERMAC=m # -# ALSA USB devices +# USB devices # CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_USX2Y=m # # PCMCIA devices @@ -1077,6 +1161,10 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -1084,6 +1172,7 @@ # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -1093,20 +1182,25 @@ # CONFIG_USB_MIDI is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # CONFIG_USB_STORAGE is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y # CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set +CONFIG_USB_HIDDEV=y # CONFIG_USB_AIPTEK is not set # 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 @@ -1115,7 +1209,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -1127,11 +1220,11 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set +CONFIG_USB_PEGASUS=m # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set @@ -1147,6 +1240,7 @@ # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set CONFIG_USB_SERIAL_VISOR=m @@ -1154,41 +1248,75 @@ # CONFIG_USB_SERIAL_IR is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set +CONFIG_USB_EZUSB=y # # USB Miscellaneous drivers # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # 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_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set @@ -1198,10 +1326,15 @@ CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -1211,7 +1344,8 @@ CONFIG_ISO9660_FS=y # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set -# CONFIG_UDF_FS is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -1219,6 +1353,8 @@ CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -1227,11 +1363,12 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y -CONFIG_DEVFS_FS=y -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -# CONFIG_DEVPTS_FS_XATTR is not set +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS_XATTR=y +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -1245,7 +1382,7 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set +CONFIG_CRAMFS=m # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -1256,16 +1393,19 @@ # 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=y -# CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set @@ -1288,7 +1428,6 @@ # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -1320,8 +1459,9 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -1332,31 +1472,52 @@ # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set +CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_UTF8=m # # Library routines # +CONFIG_CRC_CCITT=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # -# CONFIG_DEBUG_KERNEL is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_XMON is not set +# CONFIG_BDI_SWITCH is not set CONFIG_BOOTX_TEXT=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set + +# +# Hardware crypto devices +# diff -Nru a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c --- a/arch/ppc/kernel/cputable.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/kernel/cputable.c 2005-03-07 14:54:17 -08:00 @@ -560,6 +560,18 @@ .dcache_bsize = 32, .cpu_setup = __setup_cpu_603 }, + { /* e300 (a 603e core, plus some) on 83xx */ + .pvr_mask = 0x7fff0000, + .pvr_value = 0x00830000, + .cpu_name = "e300", + .cpu_features = CPU_FTR_SPLIT_ID_CACHE | + CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, + .cpu_user_features = COMMON_PPC, + .icache_bsize = 32, + .dcache_bsize = 32, + .cpu_setup = __setup_cpu_603 + }, { /* default match, we assume split I/D cache & TB (non-601)... */ .pvr_mask = 0x00000000, .pvr_value = 0x00000000, diff -Nru a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c --- a/arch/ppc/kernel/dma-mapping.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/kernel/dma-mapping.c 2005-03-07 14:54:16 -08:00 @@ -219,7 +219,8 @@ c = vm_region_alloc(&consistent_head, size, gfp & ~(__GFP_DMA | __GFP_HIGHMEM)); if (c) { - pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start); + unsigned long vaddr = c->vm_start; + pte_t *pte = consistent_pte + CONSISTENT_OFFSET(vaddr); struct page *end = page + (1 << order); /* @@ -232,9 +233,11 @@ set_page_count(page, 1); SetPageReserved(page); - set_pte(pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL))); + set_pte_at(&init_mm, vaddr, + pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL))); page++; pte++; + vaddr += PAGE_SIZE; } while (size -= PAGE_SIZE); /* @@ -262,7 +265,7 @@ void __dma_free_coherent(size_t size, void *vaddr) { struct vm_region *c; - unsigned long flags; + unsigned long flags, addr; pte_t *ptep; size = PAGE_ALIGN(size); @@ -281,11 +284,13 @@ } ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start); + addr = c->vm_start; do { - pte_t pte = ptep_get_and_clear(ptep); + pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep); unsigned long pfn; ptep++; + addr += PAGE_SIZE; if (!pte_none(pte) && pte_present(pte)) { pfn = pte_pfn(pte); diff -Nru a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h --- a/arch/ppc/kernel/head_booke.h 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/kernel/head_booke.h 2005-03-07 14:54:16 -08:00 @@ -194,8 +194,8 @@ 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) + NOCOPY, crit_transfer_to_handler, \ + ret_from_crit_exc) #define MCHECK_EXCEPTION(n, label, hdlr) \ START_EXCEPTION(label); \ diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/misc.S 2005-03-07 14:54:18 -08:00 @@ -1450,3 +1450,4 @@ .long sys_add_key .long sys_request_key /* 270 */ .long sys_keyctl + .long sys_waitid diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c --- a/arch/ppc/kernel/pci.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/kernel/pci.c 2005-03-07 14:54:17 -08:00 @@ -1058,7 +1058,7 @@ return; res = *(bus->resource[0]); - DBG("Remapping Bus %d, bridge: %s\n", bus->number, bridge->slot_name); + DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); DBG(" IO window: %08lx-%08lx\n", res.start, res.end); diff -Nru a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c --- a/arch/ppc/kernel/ppc_htab.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/ppc_htab.c 2005-03-07 14:54:18 -08:00 @@ -108,7 +108,7 @@ PTE *ptr; #endif /* CONFIG_PPC_STD_MMU */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_604_PERF_MON) { + if (cpu_has_feature(CPU_FTR_604_PERF_MON)) { mmcr0 = mfspr(SPRN_MMCR0); pmc1 = mfspr(SPRN_PMC1); pmc2 = mfspr(SPRN_PMC2); @@ -209,7 +209,7 @@ if ( !strncmp( buffer, "reset", 5) ) { - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_604_PERF_MON) { + if (cpu_has_feature(CPU_FTR_604_PERF_MON)) { /* reset PMC1 and PMC2 */ mtspr(SPRN_PMC1, 0); mtspr(SPRN_PMC2, 0); @@ -221,7 +221,7 @@ } /* Everything below here requires the performance monitor feature. */ - if ( !cur_cpu_spec[0]->cpu_features & CPU_FTR_604_PERF_MON ) + if (!cpu_has_feature(CPU_FTR_604_PERF_MON)) return count; /* turn off performance monitoring */ @@ -339,7 +339,7 @@ "0.5", "1.0", "(reserved2)", "(reserved3)" }; - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR)) + if (!cpu_has_feature(CPU_FTR_L2CR)) return -EFAULT; if ( /*!table->maxlen ||*/ (*ppos && !write)) { diff -Nru a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c --- a/arch/ppc/kernel/ppc_ksyms.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/ppc_ksyms.c 2005-03-07 14:54:18 -08:00 @@ -319,7 +319,8 @@ EXPORT_SYMBOL(cpm_install_handler); EXPORT_SYMBOL(cpm_free_handler); #endif /* CONFIG_8xx */ -#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) +#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) ||\ + defined(CONFIG_83xx) EXPORT_SYMBOL(__res); #endif diff -Nru a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c --- a/arch/ppc/kernel/setup.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/kernel/setup.c 2005-03-07 14:54:18 -08:00 @@ -227,6 +227,10 @@ maj = ((pvr >> 8) & 0xFF) - 1; min = pvr & 0xFF; break; + case 0x8083: /* e300 */ + maj = PVR_MAJ(pvr); + min = PVR_MIN(pvr); + break; case 0x8020: /* e500 */ maj = PVR_MAJ(pvr); min = PVR_MIN(pvr); @@ -619,7 +623,7 @@ /* Checks "l2cr=xxxx" command-line option */ int __init ppc_setup_l2cr(char *str) { - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) { + if (cpu_has_feature(CPU_FTR_L2CR)) { unsigned long val = simple_strtoul(str, NULL, 0); printk(KERN_INFO "l2cr set to %lx\n", val); _set_L2CR(0); /* force invalidate by disable cache */ @@ -720,7 +724,7 @@ * Systems with OF can look in the properties on the cpu node(s) * for a possibly more accurate value. */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_SPLIT_ID_CACHE) { + if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { dcache_bsize = cur_cpu_spec[0]->dcache_bsize; icache_bsize = cur_cpu_spec[0]->icache_bsize; ucache_bsize = 0; diff -Nru a/arch/ppc/kernel/temp.c b/arch/ppc/kernel/temp.c --- a/arch/ppc/kernel/temp.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/kernel/temp.c 2005-03-07 14:54:17 -08:00 @@ -223,7 +223,7 @@ /* We assume in SMP that if one CPU has TAU support, they * all have it --BenH */ - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_TAU)) { + if (!cpu_has_feature(CPU_FTR_TAU)) { printk("Thermal assist unit not available\n"); tau_initialized = 0; return 1; diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c --- a/arch/ppc/mm/init.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/mm/init.c 2005-03-07 14:54:16 -08:00 @@ -490,18 +490,6 @@ printk(KERN_INFO "AGP special page: 0x%08lx\n", agp_special_page); #endif - /* Make sure all our pagetable pages have page->mapping - and page->index set correctly. */ - for (addr = KERNELBASE; addr != 0; addr += PGDIR_SIZE) { - struct page *pg; - pmd_t *pmd = pmd_offset(pgd_offset_k(addr), addr); - if (pmd_present(*pmd)) { - pg = pmd_page(*pmd); - pg->mapping = (void *) &init_mm; - pg->index = addr; - } - } - mem_init_done = 1; } diff -Nru a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h --- a/arch/ppc/mm/mmu_decl.h 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/mm/mmu_decl.h 2005-03-07 14:54:17 -08:00 @@ -75,7 +75,7 @@ unsigned long pdval) { if ((Hash != 0) && - (cur_cpu_spec[0]->cpu_features & CPU_FTR_HPTE_TABLE)) + cpu_has_feature(CPU_FTR_HPTE_TABLE)) flush_hash_pages(0, va, pdval, 1); else _tlbie(va); diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c --- a/arch/ppc/mm/pgtable.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/mm/pgtable.c 2005-03-07 14:54:16 -08:00 @@ -102,11 +102,6 @@ if (mem_init_done) { pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); - if (pte) { - struct page *ptepage = virt_to_page(pte); - ptepage->mapping = (void *) mm; - ptepage->index = address & PMD_MASK; - } } else { pte = (pte_t *)early_get_page(); if (pte) @@ -126,11 +121,8 @@ #endif ptepage = alloc_pages(flags, 0); - if (ptepage) { - ptepage->mapping = (void *) mm; - ptepage->index = address & PMD_MASK; + if (ptepage) clear_highpage(ptepage); - } return ptepage; } @@ -139,7 +131,6 @@ #ifdef CONFIG_SMP hash_page_sync(); #endif - virt_to_page(pte)->mapping = NULL; free_page((unsigned long)pte); } @@ -148,7 +139,6 @@ #ifdef CONFIG_SMP hash_page_sync(); #endif - ptepage->mapping = NULL; __free_page(ptepage); } @@ -298,7 +288,7 @@ pg = pte_alloc_kernel(&init_mm, pd, va); if (pg != 0) { err = 0; - set_pte(pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); + set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); if (mem_init_done) flush_HPTE(0, va, pmd_val(*pd)); } diff -Nru a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c --- a/arch/ppc/mm/ppc_mmu.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/mm/ppc_mmu.c 2005-03-07 14:54:16 -08:00 @@ -138,7 +138,7 @@ union ubat *bat = BATS[index]; if (((flags & _PAGE_NO_CACHE) == 0) && - (cur_cpu_spec[0]->cpu_features & CPU_FTR_NEED_COHERENT)) + cpu_has_feature(CPU_FTR_NEED_COHERENT)) flags |= _PAGE_COHERENT; bl = (size >> 17) - 1; @@ -191,7 +191,7 @@ extern unsigned int hash_page[]; extern unsigned int flush_hash_patch_A[], flush_hash_patch_B[]; - if ((cur_cpu_spec[0]->cpu_features & CPU_FTR_HPTE_TABLE) == 0) { + if (!cpu_has_feature(CPU_FTR_HPTE_TABLE)) { /* * Put a blr (procedure return) instruction at the * start of hash_page, since we can still get DSI diff -Nru a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c --- a/arch/ppc/mm/tlb.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/mm/tlb.c 2005-03-07 14:54:18 -08:00 @@ -47,26 +47,6 @@ } /* - * Called by ptep_test_and_clear_young() - */ -void flush_hash_one_pte(pte_t *ptep) -{ - struct page *ptepage; - struct mm_struct *mm; - unsigned long ptephys; - unsigned long addr; - - if (Hash == 0) - return; - - ptepage = virt_to_page(ptep); - mm = (struct mm_struct *) ptepage->mapping; - ptephys = __pa(ptep) & PAGE_MASK; - addr = ptepage->index + (((unsigned long)ptep & ~PAGE_MASK) << 10); - flush_hash_pages(mm->context, addr, ptephys, 1); -} - -/* * Called by ptep_set_access_flags, must flush on CPUs for which the * DSI handler can't just "fixup" the TLB on a write fault */ diff -Nru a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c --- a/arch/ppc/platforms/4xx/ebony.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/4xx/ebony.c 2005-03-07 14:54:18 -08:00 @@ -49,8 +49,19 @@ #include #include #include +#include #include +#include + +/* + * This is a horrible kludge, we eventually need to abstract this + * generic PHY stuff, so the standard phy mode defines can be + * easily used from arch code. + */ +#include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h" + +bd_t __res; static struct ibm44x_clocks clocks __initdata; @@ -258,19 +269,21 @@ static void __init ebony_setup_arch(void) { - unsigned char * vpd_base; struct ocp_def *def; struct ocp_func_emac_data *emacdata; /* Set mac_addr for each EMAC */ - vpd_base = ioremap64(EBONY_VPD_BASE, EBONY_VPD_SIZE); def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0); emacdata = def->additions; - memcpy(emacdata->mac_addr, EBONY_NA0_ADDR(vpd_base), 6); + emacdata->phy_map = 0x00000001; /* Skip 0x00 */ + emacdata->phy_mode = PHY_MODE_RMII; + memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6); + def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1); emacdata = def->additions; - memcpy(emacdata->mac_addr, EBONY_NA1_ADDR(vpd_base), 6); - iounmap(vpd_base); + emacdata->phy_map = 0x00000001; /* Skip 0x00 */ + emacdata->phy_mode = PHY_MODE_RMII; + memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6); /* * Determine various clocks. @@ -314,7 +327,14 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { - parse_bootinfo((struct bi_record *) (r3 + KERNELBASE)); + parse_bootinfo(find_bootinfo()); + + /* + * If we were passed in a board information, copy it into the + * residual data area. + */ + if (r3) + __res = *(bd_t *)(r3 + KERNELBASE); ibm44x_platform_init(); diff -Nru a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h --- a/arch/ppc/platforms/4xx/ebony.h 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/4xx/ebony.h 2005-03-07 14:54:17 -08:00 @@ -23,13 +23,9 @@ /* F/W TLB mapping used in bootloader glue to reset EMAC */ #define PPC44x_EMAC0_MR0 0xE0000800 -/* Macros to get at Ebony VPD info */ -#define EBONY_VPD_BASE 0x00000001fffffe00ULL -#define EBONY_VPD_SIZE 0x24 -#define EBONY_NA0_OFFSET 0x0c -#define EBONY_NA1_OFFSET 0x18 -#define EBONY_NA0_ADDR(base) (base + EBONY_NA0_OFFSET) -#define EBONY_NA1_ADDR(base) (base + EBONY_NA1_OFFSET) +/* Where to find the MAC info */ +#define EBONY_OPENBIOS_MAC_BASE 0xfffffe0c +#define EBONY_OPENBIOS_MAC_OFFSET 0x0c /* Default clock rates for Rev. B and Rev. C silicon */ #define EBONY_440GP_RB_SYSCLK 33000000 diff -Nru a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c --- a/arch/ppc/platforms/4xx/xilinx_ml300.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c 2005-03-07 14:54:16 -08:00 @@ -122,25 +122,7 @@ void __init ml300_init_irq(void) { - unsigned int i; - ppc4xx_init_IRQ(); - - /* - * For PowerPC 405 cores the default value for NR_IRQS is 32. - * See include/asm-ppc/irq.h for details. - * This is just fine for ML300. - */ -#if (NR_IRQS != 32) -#error NR_IRQS must be 32 for ML300 -#endif - - for (i = 0; i < NR_IRQS; i++) { - if (XPAR_INTC_0_KIND_OF_INTR & (0x80000000 >> i)) - irq_desc[i].status &= ~IRQ_LEVEL; - else - irq_desc[i].status |= IRQ_LEVEL; - } } void __init diff -Nru a/arch/ppc/platforms/83xx/Kconfig b/arch/ppc/platforms/83xx/Kconfig --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/Kconfig 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,30 @@ +config 83xx + bool "PowerQUICC II Pro (83xx) Support" + depends on 6xx + +menu "Freescale 83xx options" + depends on 83xx + +choice + prompt "Machine Type" + depends on 83xx + default MPC834x_SYS + +config MPC834x_SYS + bool "Freescale MPC834x SYS" + help + This option enables support for the MPC 834x SYS evaluation board. + +endchoice + +config MPC834x + bool + depends on MPC834x_SYS + default y + +config PPC_GEN550 + bool + depends on 83xx + default y + +endmenu diff -Nru a/arch/ppc/platforms/83xx/Makefile b/arch/ppc/platforms/83xx/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,6 @@ +# +# Makefile for the PowerPC 83xx linux kernel. +# +obj-$(CONFIG_83xx) += mpc83xx_sys.o mpc83xx_devices.o + +obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,290 @@ +/* + * arch/ppc/platforms/83xx/mpc834x_sys.c + * + * MPC834x SYS board specific routines + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for linux/serial_core.h */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef CONFIG_PCI +unsigned long isa_io_base = 0; +unsigned long isa_mem_base = 0; +#endif + +extern unsigned long total_memory; /* in mm/init */ + +unsigned char __res[sizeof (bd_t)]; + +#ifdef CONFIG_PCI +#error "PCI is not supported" +/* NEED mpc83xx_map_irq & mpc83xx_exclude_device + see platforms/85xx/mpc85xx_ads_common.c */ +#endif /* CONFIG_PCI */ + +/* ************************************************************************ + * + * Setup the architecture + * + */ +static void __init +mpc834x_sys_setup_arch(void) +{ + bd_t *binfo = (bd_t *) __res; + unsigned int freq; + struct gianfar_platform_data *pdata; + + /* get the core frequency */ + freq = binfo->bi_intfreq; + + /* Set loops_per_jiffy to a half-way reasonable value, + for use until calibrate_delay gets called. */ + loops_per_jiffy = freq / HZ; + +#ifdef CONFIG_PCI + /* setup PCI host bridges */ + mpc83xx_sys_setup_hose(); +#endif + mpc83xx_early_serial_map(); + + /* setup the board related information for the enet controllers */ + pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1); + pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; + pdata->interruptPHY = MPC83xx_IRQ_EXT1; + pdata->phyid = 0; + /* fixup phy address */ + pdata->phy_reg_addr += binfo->bi_immr_base; + memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); + + pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2); + pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; + pdata->interruptPHY = MPC83xx_IRQ_EXT2; + pdata->phyid = 1; + /* fixup phy address */ + pdata->phy_reg_addr += binfo->bi_immr_base; + memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); + +#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_HDA1; +#endif +} + +static void __init +mpc834x_sys_map_io(void) +{ + /* we steal the lowest ioremap addr for virt space */ + io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO); + io_block_mapping(BCSR_VIRT_ADDR, BCSR_PHYS_ADDR, BCSR_SIZE, _PAGE_IO); +} + +int +mpc834x_sys_show_cpuinfo(struct seq_file *m) +{ + uint pvid, svid, phid1; + bd_t *binfo = (bd_t *) __res; + unsigned int freq; + + /* get the core frequency */ + freq = binfo->bi_intfreq; + + pvid = mfspr(PVR); + svid = mfspr(SVR); + + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); + seq_printf(m, "Vendor\t\t: Freescale Inc.\n"); + seq_printf(m, "Machine\t\t: mpc%s sys\n", cur_ppc_sys_spec->ppc_sys_name); + seq_printf(m, "core clock\t: %d MHz\n" + "bus clock\t: %d MHz\n", + (int)(binfo->bi_intfreq / 1000000), + (int)(binfo->bi_busfreq / 1000000)); + seq_printf(m, "PVR\t\t: 0x%x\n", pvid); + seq_printf(m, "SVR\t\t: 0x%x\n", svid); + + /* Display cpu Pll setting */ + phid1 = mfspr(HID1); + seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); + + /* Display the amount of memory */ + seq_printf(m, "Memory\t\t: %d MB\n", (int)(binfo->bi_memsize / (1024 * 1024))); + + return 0; +} + + +void __init +mpc834x_sys_init_IRQ(void) +{ + bd_t *binfo = (bd_t *) __res; + + u8 senses[8] = { + 0, /* EXT 0 */ + IRQ_SENSE_LEVEL, /* EXT 1 */ + IRQ_SENSE_LEVEL, /* EXT 2 */ + 0, /* EXT 3 */ + 0, /* EXT 4 */ + 0, /* EXT 5 */ + 0, /* EXT 6 */ + 0, /* EXT 7 */ + }; + + ipic_init(binfo->bi_immr_base + 0x00700, 0, MPC83xx_IPIC_IRQ_OFFSET, senses, 8); + + /* Initialize the default interrupt mapping priorities, + * in case the boot rom changed something on us. + */ + ipic_set_default_priority(); +} + +static __inline__ void +mpc834x_sys_set_bat(void) +{ + /* we steal the lowest ioremap addr for virt space */ + mb(); + mtspr(DBAT1U, VIRT_IMMRBAR | 0x1e); + mtspr(DBAT1L, immrbar | 0x2a); + mb(); +} + +void __init +platform_init(unsigned long r3, unsigned long r4, unsigned long r5, + unsigned long r6, unsigned long r7) +{ + bd_t *binfo = (bd_t *) __res; + + /* parse_bootinfo must always be called first */ + parse_bootinfo(find_bootinfo()); + + /* + * If we were passed in a board information, copy it into the + * residual data area. + */ + if (r3) { + memcpy((void *) __res, (void *) (r3 + KERNELBASE), + sizeof (bd_t)); + } + +#if defined(CONFIG_BLK_DEV_INITRD) + /* + * If the init RAM disk has been configured in, and there's a valid + * starting address for it, set it up. + */ + if (r4) { + initrd_start = r4 + KERNELBASE; + initrd_end = r5 + KERNELBASE; + } +#endif /* CONFIG_BLK_DEV_INITRD */ + + /* Copy the kernel command line arguments to a safe place. */ + if (r6) { + *(char *) (r7 + KERNELBASE) = 0; + strcpy(cmd_line, (char *) (r6 + KERNELBASE)); + } + + immrbar = binfo->bi_immr_base; + + mpc834x_sys_set_bat(); + +#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) + { + struct uart_port p; + + memset(&p, 0, sizeof (p)); + p.iotype = SERIAL_IO_MEM; + p.membase = (unsigned char __iomem *)immrbar + 0x4500; + p.uartclk = binfo->bi_busfreq; + + gen550_init(0, &p); + + memset(&p, 0, sizeof (p)); + p.iotype = SERIAL_IO_MEM; + p.membase = (unsigned char __iomem *)immrbar + 0x4500; + p.uartclk = binfo->bi_busfreq; + + gen550_init(1, &p); + } +#endif + + identify_ppc_sys_by_id(mfspr(SVR)); + + /* setup the PowerPC module struct */ + ppc_md.setup_arch = mpc834x_sys_setup_arch; + ppc_md.show_cpuinfo = mpc834x_sys_show_cpuinfo; + + ppc_md.init_IRQ = mpc834x_sys_init_IRQ; + ppc_md.get_irq = ipic_get_irq; + + ppc_md.restart = mpc83xx_restart; + ppc_md.power_off = mpc83xx_power_off; + ppc_md.halt = mpc83xx_halt; + + ppc_md.find_end_of_memory = mpc83xx_find_end_of_memory; + ppc_md.setup_io_mappings = mpc834x_sys_map_io; + + ppc_md.time_init = mpc83xx_time_init; + ppc_md.set_rtc_time = NULL; + ppc_md.get_rtc_time = NULL; + ppc_md.calibrate_decr = mpc83xx_calibrate_decr; + + ppc_md.early_serial_map = mpc83xx_early_serial_map; +#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) + ppc_md.progress = gen550_progress; +#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ + + if (ppc_md.progress) + ppc_md.progress("mpc834x_sys_init(): exit", 0); + + return; +} diff -Nru a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,51 @@ +/* + * arch/ppc/platforms/83xx/mpc834x_sys.h + * + * MPC834X SYS common board definitions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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. + * + */ + +#ifndef __MACH_MPC83XX_SYS_H__ +#define __MACH_MPC83XX_SYS_H__ + +#include +#include +#include +#include +#include + +#define VIRT_IMMRBAR ((uint)0xfe000000) + +#define BCSR_PHYS_ADDR ((uint)0xf8000000) +#define BCSR_VIRT_ADDR ((uint)0xfe100000) +#define BCSR_SIZE ((uint)(32 * 1024)) + +#ifdef CONFIG_PCI +/* PCI interrupt controller */ +#define PIRQA MPC83xx_IRQ_IRQ4 +#define PIRQB MPC83xx_IRQ_IRQ5 +#define PIRQC MPC83xx_IRQ_IRQ6 +#define PIRQD MPC83xx_IRQ_IRQ7 + +#define MPC834x_SYS_PCI1_LOWER_IO 0x00000000 +#define MPC834x_SYS_PCI1_UPPER_IO 0x00ffffff + +#define MPC834x_SYS_PCI1_LOWER_MEM 0x80000000 +#define MPC834x_SYS_PCI1_UPPER_MEM 0x9fffffff + +#define MPC834x_SYS_PCI1_IO_BASE 0xe2000000 +#define MPC834x_SYS_PCI1_MEM_OFFSET 0x00000000 + +#define MPC834x_SYS_PCI1_IO_SIZE 0x01000000 +#endif /* CONFIG_PCI */ + +#endif /* __MACH_MPC83XX_SYS_H__ */ diff -Nru a/arch/ppc/platforms/83xx/mpc83xx_devices.c b/arch/ppc/platforms/83xx/mpc83xx_devices.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc83xx_devices.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,237 @@ +/* + * arch/ppc/platforms/83xx/mpc83xx_devices.c + * + * MPC83xx Device descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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 +#include +#include +#include +#include + +/* We use offsets for IORESOURCE_MEM since we do not know at compile time + * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup + */ + +static struct gianfar_platform_data mpc83xx_tsec1_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = 0x24000, +}; + +static struct gianfar_platform_data mpc83xx_tsec2_pdata = { + .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | + FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | + FSL_GIANFAR_DEV_HAS_MULTI_INTR, + .phy_reg_addr = 0x24000, +}; + +static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = { + .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, +}; + +static struct plat_serial8250_port serial_platform_data[] = { + [0] = { + .mapbase = 0x4500, + .irq = MPC83xx_IRQ_UART1, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, + [1] = { + .mapbase = 0x4600, + .irq = MPC83xx_IRQ_UART2, + .iotype = UPIO_MEM, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + }, +}; + +struct platform_device ppc_sys_platform_devices[] = { + [MPC83xx_TSEC1] = { + .name = "fsl-gianfar", + .id = 1, + .dev.platform_data = &mpc83xx_tsec1_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = 0x24000, + .end = 0x24fff, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC83xx_IRQ_TSEC1_TX, + .end = MPC83xx_IRQ_TSEC1_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC83xx_IRQ_TSEC1_RX, + .end = MPC83xx_IRQ_TSEC1_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC83xx_IRQ_TSEC1_ERROR, + .end = MPC83xx_IRQ_TSEC1_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_TSEC2] = { + .name = "fsl-gianfar", + .id = 2, + .dev.platform_data = &mpc83xx_tsec2_pdata, + .num_resources = 4, + .resource = (struct resource[]) { + { + .start = 0x25000, + .end = 0x25fff, + .flags = IORESOURCE_MEM, + }, + { + .name = "tx", + .start = MPC83xx_IRQ_TSEC2_TX, + .end = MPC83xx_IRQ_TSEC2_TX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "rx", + .start = MPC83xx_IRQ_TSEC2_RX, + .end = MPC83xx_IRQ_TSEC2_RX, + .flags = IORESOURCE_IRQ, + }, + { + .name = "error", + .start = MPC83xx_IRQ_TSEC2_ERROR, + .end = MPC83xx_IRQ_TSEC2_ERROR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_IIC1] = { + .name = "fsl-i2c", + .id = 1, + .dev.platform_data = &mpc83xx_fsl_i2c1_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x3000, + .end = 0x30ff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_IIC1, + .end = MPC83xx_IRQ_IIC1, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_IIC2] = { + .name = "fsl-i2c", + .id = 2, + .dev.platform_data = &mpc83xx_fsl_i2c2_pdata, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x3100, + .end = 0x31ff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_IIC2, + .end = MPC83xx_IRQ_IIC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_DUART] = { + .name = "serial8250", + .id = 0, + .dev.platform_data = serial_platform_data, + }, + [MPC83xx_SEC2] = { + .name = "fsl-sec2", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x30000, + .end = 0x3ffff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_SEC2, + .end = MPC83xx_IRQ_SEC2, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_USB2_DR] = { + .name = "fsl-usb2-dr", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x22000, + .end = 0x22fff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_USB2_DR, + .end = MPC83xx_IRQ_USB2_DR, + .flags = IORESOURCE_IRQ, + }, + }, + }, + [MPC83xx_USB2_MPH] = { + .name = "fsl-usb2-mph", + .id = 1, + .num_resources = 2, + .resource = (struct resource[]) { + { + .start = 0x23000, + .end = 0x23fff, + .flags = IORESOURCE_MEM, + }, + { + .start = MPC83xx_IRQ_USB2_MPH, + .end = MPC83xx_IRQ_USB2_MPH, + .flags = IORESOURCE_IRQ, + }, + }, + }, +}; + +static int __init mach_mpc83xx_fixup(struct platform_device *pdev) +{ + ppc_sys_fixup_mem_resource(pdev, immrbar); + return 0; +} + +static int __init mach_mpc83xx_init(void) +{ + if (ppc_md.progress) + ppc_md.progress("mach_mpc83xx_init:enter", 0); + ppc_sys_device_fixup = mach_mpc83xx_fixup; + return 0; +} + +postcore_initcall(mach_mpc83xx_init); diff -Nru a/arch/ppc/platforms/83xx/mpc83xx_sys.c b/arch/ppc/platforms/83xx/mpc83xx_sys.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/platforms/83xx/mpc83xx_sys.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,100 @@ +/* + * arch/ppc/platforms/83xx/mpc83xx_sys.c + * + * MPC83xx System descriptions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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 + +struct ppc_sys_spec *cur_ppc_sys_spec; +struct ppc_sys_spec ppc_sys_specs[] = { + { + .ppc_sys_name = "8349E", + .mask = 0xFFFF0000, + .value = 0x80500000, + .num_devices = 8, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8349", + .mask = 0xFFFF0000, + .value = 0x80510000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8347E", + .mask = 0xFFFF0000, + .value = 0x80520000, + .num_devices = 8, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8347", + .mask = 0xFFFF0000, + .value = 0x80530000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, MPC83xx_USB2_MPH + }, + }, + { + .ppc_sys_name = "8343E", + .mask = 0xFFFF0000, + .value = 0x80540000, + .num_devices = 7, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2, + MPC83xx_USB2_DR, + }, + }, + { + .ppc_sys_name = "8343", + .mask = 0xFFFF0000, + .value = 0x80550000, + .num_devices = 6, + .device_list = (enum ppc_sys_devices[]) + { + MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1, + MPC83xx_IIC2, MPC83xx_DUART, + MPC83xx_USB2_DR, + }, + }, + { /* default match */ + .ppc_sys_name = "", + .mask = 0x00000000, + .value = 0x00000000, + }, +}; diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c 2005-03-07 14:54:18 -08:00 @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -128,19 +129,9 @@ pvid = mfspr(PVR); svid = mfspr(SVR); + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); - - switch (svid & 0xffff0000) { - case SVR_8540: - seq_printf(m, "Machine\t\t: mpc8540ads\n"); - break; - case SVR_8560: - seq_printf(m, "Machine\t\t: mpc8560ads\n"); - break; - default: - seq_printf(m, "Machine\t\t: unknown\n"); - break; - } + seq_printf(m, "Machine\t\t: mpc%sads\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "SVR\t\t: 0x%x\n", svid); 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 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c 2005-03-07 14:54:18 -08:00 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -73,60 +74,60 @@ /* Internal interrupts are all Level Sensitive, and Positive Polarity */ static u_char mpc85xx_cds_openpic_initsenses[] __initdata = { - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 0: L2 Cache */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 1: ECM */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 2: DDR DRAM */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 3: LBIU */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 4: DMA 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 5: DMA 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 6: DMA 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 7: DMA 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 8: PCI/PCI-X */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 9: RIO Inbound Port Write Error */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 10: RIO Doorbell Inbound */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 11: RIO Outbound Message */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 12: RIO Inbound Message */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 13: TSEC 0 Transmit */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 14: TSEC 0 Receive */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 15: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 16: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 17: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 18: TSEC 0 Receive/Transmit Error */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 19: TSEC 1 Transmit */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 20: TSEC 1 Receive */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 21: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 22: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 23: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 24: TSEC 1 Receive/Transmit Error */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 25: Fast Ethernet */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 26: DUART */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 27: I2C */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 28: Performance Monitor */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 29: Unused */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 30: CPM */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Internal 31: Unused */ #if defined(CONFIG_PCI) - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI1 slot */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI1 slot */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI1 slot */ #else - 0x0, /* External 0: */ - 0x0, /* External 1: */ - 0x0, /* External 2: */ - 0x0, /* External 3: */ -#endif - 0x0, /* External 4: */ - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ - 0x0, /* External 6: */ - 0x0, /* External 7: */ - 0x0, /* External 8: */ - 0x0, /* External 9: */ - 0x0, /* External 10: */ + 0x0, /* External 0: */ + 0x0, /* External 1: */ + 0x0, /* External 2: */ + 0x0, /* External 3: */ +#endif + 0x0, /* External 4: */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ + 0x0, /* External 6: */ + 0x0, /* External 7: */ + 0x0, /* External 8: */ + 0x0, /* External 9: */ + 0x0, /* External 10: */ #if defined(CONFIG_85xx_PCI2) && defined(CONFIG_PCI) - (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 11: PCI2 slot 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 11: PCI2 slot 0 */ #else - 0x0, /* External 11: */ + 0x0, /* External 11: */ #endif }; @@ -134,31 +135,32 @@ int mpc85xx_cds_show_cpuinfo(struct seq_file *m) { - uint pvid, svid, phid1; - uint memsize = total_memory; - bd_t *binfo = (bd_t *) __res; - unsigned int freq; + uint pvid, svid, phid1; + uint memsize = total_memory; + bd_t *binfo = (bd_t *) __res; + unsigned int freq; - /* get the core frequency */ - freq = binfo->bi_intfreq; + /* get the core frequency */ + freq = binfo->bi_intfreq; - pvid = mfspr(PVR); - svid = mfspr(SVR); + pvid = mfspr(PVR); + svid = mfspr(SVR); - seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); - seq_printf(m, "Machine\t\t: CDS (%x)\n", cadmus[CM_VER]); + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); + seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); + seq_printf(m, "Machine\t\t: CDS - MPC%s (%x)\n", cur_ppc_sys_spec->ppc_sys_name, cadmus[CM_VER]); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); - seq_printf(m, "PVR\t\t: 0x%x\n", pvid); - seq_printf(m, "SVR\t\t: 0x%x\n", svid); + seq_printf(m, "PVR\t\t: 0x%x\n", pvid); + seq_printf(m, "SVR\t\t: 0x%x\n", svid); - /* Display cpu Pll setting */ - phid1 = mfspr(HID1); - seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); + /* Display cpu Pll setting */ + phid1 = mfspr(HID1); + seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); - /* Display the amount of memory */ - seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); + /* Display the amount of memory */ + seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); - return 0; + return 0; } #ifdef CONFIG_CPM2 @@ -185,21 +187,21 @@ int i; #endif - /* Determine the Physical Address of the OpenPIC regs */ - phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; - OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE); - OpenPIC_InitSenses = mpc85xx_cds_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses); - - /* Skip reserved space and internal sources */ - openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); - /* Map PIC IRQs 0-11 */ - openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); - - /* we let openpic interrupts starting from an offset, to - * leave space for cascading interrupts underneath. - */ - openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); + /* Determine the Physical Address of the OpenPIC regs */ + phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; + OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE); + OpenPIC_InitSenses = mpc85xx_cds_openpic_initsenses; + OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses); + + /* Skip reserved space and internal sources */ + openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200); + /* Map PIC IRQs 0-11 */ + openpic_set_sources(32, 12, OpenPIC_Addr + 0x10000); + + /* we let openpic interrupts starting from an offset, to + * leave space for cascading interrupts underneath. + */ + openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); #ifdef CONFIG_CPM2 /* disable all CPM interupts */ @@ -219,7 +221,7 @@ setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction); #endif - return; + return; } #ifdef CONFIG_PCI @@ -278,8 +280,8 @@ } } -#define ARCADIA_HOST_BRIDGE_IDSEL 17 -#define ARCADIA_2ND_BRIDGE_IDSEL 3 +#define ARCADIA_HOST_BRIDGE_IDSEL 17 +#define ARCADIA_2ND_BRIDGE_IDSEL 3 extern int mpc85xx_pci1_last_busno; @@ -289,7 +291,7 @@ if (bus == 0 && PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; #ifdef CONFIG_85xx_PCI2 - if (mpc85xx_pci1_last_busno) + if (mpc85xx_pci1_last_busno) if (bus == (mpc85xx_pci1_last_busno + 1) && PCI_SLOT(devfn) == 0) return PCIBIOS_DEVICE_NOT_FOUND; #endif @@ -303,6 +305,8 @@ } #endif /* CONFIG_PCI */ +TODC_ALLOC(); + /* ************************************************************************ * * Setup the architecture @@ -311,14 +315,14 @@ static void __init mpc85xx_cds_setup_arch(void) { - bd_t *binfo = (bd_t *) __res; - unsigned int freq; + bd_t *binfo = (bd_t *) __res; + unsigned int freq; struct gianfar_platform_data *pdata; - /* get the core frequency */ - freq = binfo->bi_intfreq; + /* get the core frequency */ + freq = binfo->bi_intfreq; - printk("mpc85xx_cds_setup_arch\n"); + printk("mpc85xx_cds_setup_arch\n"); #ifdef CONFIG_CPM2 cpm2_reset(); @@ -328,17 +332,24 @@ cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1; printk("CDS Version = %x in PCI slot %d\n", cadmus[CM_VER], cds_pci_slot); - /* Set loops_per_jiffy to a half-way reasonable value, - for use until calibrate_delay gets called. */ - loops_per_jiffy = freq / HZ; + /* Setup TODC access */ + TODC_INIT(TODC_TYPE_DS1743, + 0, + 0, + ioremap(CDS_RTC_ADDR, CDS_RTC_SIZE), + 8); + + /* Set loops_per_jiffy to a half-way reasonable value, + for use until calibrate_delay gets called. */ + loops_per_jiffy = freq / HZ; #ifdef CONFIG_PCI - /* setup PCI host bridges */ - mpc85xx_setup_hose(); + /* setup PCI host bridges */ + mpc85xx_setup_hose(); #endif #ifdef CONFIG_SERIAL_8250 - mpc85xx_early_serial_map(); + mpc85xx_early_serial_map(); #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG @@ -366,14 +377,14 @@ #ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else + if (initrd_start) + ROOT_DEV = Root_RAM0; + else #endif #ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; + ROOT_DEV = Root_NFS; #else - ROOT_DEV = Root_HDA1; + ROOT_DEV = Root_HDA1; #endif } @@ -382,18 +393,18 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { - /* parse_bootinfo must always be called first */ - parse_bootinfo(find_bootinfo()); + /* parse_bootinfo must always be called first */ + parse_bootinfo(find_bootinfo()); - /* - * If we were passed in a board information, copy it into the - * residual data area. - */ - if (r3) { - memcpy((void *) __res, (void *) (r3 + KERNELBASE), - sizeof (bd_t)); + /* + * If we were passed in a board information, copy it into the + * residual data area. + */ + if (r3) { + memcpy((void *) __res, (void *) (r3 + KERNELBASE), + sizeof (bd_t)); - } + } #ifdef CONFIG_SERIAL_TEXT_DEBUG { bd_t *binfo = (bd_t *) __res; @@ -401,7 +412,7 @@ /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */ settlbcam(NUM_TLBCAMS - 1, binfo->bi_immr_base, - binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); + binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0); memset(&p, 0, sizeof (p)); p.iotype = SERIAL_IO_MEM; @@ -420,49 +431,53 @@ #endif #if defined(CONFIG_BLK_DEV_INITRD) - /* - * If the init RAM disk has been configured in, and there's a valid - * starting address for it, set it up. - */ - if (r4) { - initrd_start = r4 + KERNELBASE; - initrd_end = r5 + KERNELBASE; - } -#endif /* CONFIG_BLK_DEV_INITRD */ - - /* Copy the kernel command line arguments to a safe place. */ - - if (r6) { - *(char *) (r7 + KERNELBASE) = 0; - strcpy(cmd_line, (char *) (r6 + KERNELBASE)); - } + /* + * If the init RAM disk has been configured in, and there's a valid + * starting address for it, set it up. + */ + if (r4) { + initrd_start = r4 + KERNELBASE; + initrd_end = r5 + KERNELBASE; + } +#endif /* CONFIG_BLK_DEV_INITRD */ + + /* Copy the kernel command line arguments to a safe place. */ + + if (r6) { + *(char *) (r7 + KERNELBASE) = 0; + strcpy(cmd_line, (char *) (r6 + KERNELBASE)); + } identify_ppc_sys_by_id(mfspr(SVR)); - /* setup the PowerPC module struct */ - ppc_md.setup_arch = mpc85xx_cds_setup_arch; - ppc_md.show_cpuinfo = mpc85xx_cds_show_cpuinfo; - - ppc_md.init_IRQ = mpc85xx_cds_init_IRQ; - ppc_md.get_irq = openpic_get_irq; - - ppc_md.restart = mpc85xx_restart; - ppc_md.power_off = mpc85xx_power_off; - ppc_md.halt = mpc85xx_halt; - - ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory; - - ppc_md.time_init = NULL; - ppc_md.set_rtc_time = NULL; - ppc_md.get_rtc_time = NULL; - ppc_md.calibrate_decr = mpc85xx_calibrate_decr; + /* setup the PowerPC module struct */ + ppc_md.setup_arch = mpc85xx_cds_setup_arch; + ppc_md.show_cpuinfo = mpc85xx_cds_show_cpuinfo; + + ppc_md.init_IRQ = mpc85xx_cds_init_IRQ; + ppc_md.get_irq = openpic_get_irq; + + ppc_md.restart = mpc85xx_restart; + ppc_md.power_off = mpc85xx_power_off; + ppc_md.halt = mpc85xx_halt; + + ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory; + + ppc_md.calibrate_decr = mpc85xx_calibrate_decr; + + 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.nvram_read_val = todc_direct_read_val; + ppc_md.nvram_write_val = todc_direct_write_val; #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) - ppc_md.progress = gen550_progress; + ppc_md.progress = gen550_progress; #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ - if (ppc_md.progress) - ppc_md.progress("mpc85xx_cds_init(): exit", 0); + if (ppc_md.progress) + ppc_md.progress("mpc85xx_cds_init(): exit", 0); - return; + return; } diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h 2005-03-07 14:54:16 -08:00 @@ -33,6 +33,10 @@ #define CM_CSR (1) #define CM_RST (2) +/* CDS NVRAM/RTC */ +#define CDS_RTC_ADDR (0xf8000000) +#define CDS_RTC_SIZE (8 * 1024) + /* PCI config */ #define PCI1_CFG_ADDR_OFFSET (0x8000) #define PCI1_CFG_DATA_OFFSET (0x8004) diff -Nru a/arch/ppc/platforms/85xx/mpc85xx_sys.c b/arch/ppc/platforms/85xx/mpc85xx_sys.c --- a/arch/ppc/platforms/85xx/mpc85xx_sys.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/platforms/85xx/mpc85xx_sys.c 2005-03-07 14:54:16 -08:00 @@ -21,7 +21,7 @@ struct ppc_sys_spec *cur_ppc_sys_spec; struct ppc_sys_spec ppc_sys_specs[] = { { - .ppc_sys_name = "MPC8540", + .ppc_sys_name = "8540", .mask = 0xFFFF0000, .value = 0x80300000, .num_devices = 10, @@ -33,7 +33,7 @@ }, }, { - .ppc_sys_name = "MPC8560", + .ppc_sys_name = "8560", .mask = 0xFFFF0000, .value = 0x80700000, .num_devices = 19, @@ -49,7 +49,7 @@ }, }, { - .ppc_sys_name = "MPC8541", + .ppc_sys_name = "8541", .mask = 0xFFFF0000, .value = 0x80720000, .num_devices = 13, @@ -63,7 +63,7 @@ }, }, { - .ppc_sys_name = "MPC8541E", + .ppc_sys_name = "8541E", .mask = 0xFFFF0000, .value = 0x807A0000, .num_devices = 14, @@ -77,7 +77,7 @@ }, }, { - .ppc_sys_name = "MPC8555", + .ppc_sys_name = "8555", .mask = 0xFFFF0000, .value = 0x80710000, .num_devices = 20, @@ -94,7 +94,7 @@ }, }, { - .ppc_sys_name = "MPC8555E", + .ppc_sys_name = "8555E", .mask = 0xFFFF0000, .value = 0x80790000, .num_devices = 21, diff -Nru a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c --- a/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/85xx/sbc85xx.c 2005-03-07 14:54:17 -08:00 @@ -42,6 +42,7 @@ #include #include #include +#include #include @@ -128,19 +129,9 @@ pvid = mfspr(PVR); svid = mfspr(SVR); + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: Wind River\n"); - - switch (svid & 0xffff0000) { - case SVR_8540: - seq_printf(m, "Machine\t\t: hhmmm, this board isn't made yet!\n"); - break; - case SVR_8560: - seq_printf(m, "Machine\t\t: SBC8560\n"); - break; - default: - seq_printf(m, "Machine\t\t: unknown\n"); - break; - } + seq_printf(m, "Machine\t\t: SBC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); seq_printf(m, "SVR\t\t: 0x%x\n", svid); diff -Nru a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c --- a/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/85xx/stx_gp3.c 2005-03-07 14:54:17 -08:00 @@ -34,8 +34,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -266,19 +268,9 @@ memsize = total_memory; + seq_printf(m, "chip\t\t: MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "Vendor\t\t: RPC Electronics STx \n"); - - switch (svid & 0xffff0000) { - case SVR_8540: - seq_printf(m, "Machine\t\t: GP3 - MPC8540\n"); - break; - case SVR_8560: - seq_printf(m, "Machine\t\t: GP3 - MPC8560\n"); - break; - default: - seq_printf(m, "Machine\t\t: unknown\n"); - break; - } + seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name); seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000, freq % 1000000); seq_printf(m, "PVR\t\t: 0x%x\n", pvid); diff -Nru a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c --- a/arch/ppc/platforms/katana.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/katana.c 2005-03-07 14:54:18 -08:00 @@ -1,9 +1,10 @@ /* * arch/ppc/platforms/katana.c * - * Board setup routines for the Artesyn Katana 750 based boards. + * Board setup routines for the Artesyn Katana cPCI boards. * - * Tim Montgomery + * Athor: Tim Montgomery + * Maintained by: Mark A. Greer * * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il * Based on code done by - Mark A. Greer @@ -26,7 +27,8 @@ #include #include #include -#include +#include +#include #include #ifdef CONFIG_BOOTIMG #include @@ -36,13 +38,19 @@ #include #include #include +#include #include #include static struct mv64x60_handle bh; static katana_id_t katana_id; -static u32 cpld_base; -static u32 sram_base; +static void __iomem *cpld_base; +static void __iomem *sram_base; + +static u32 katana_flash_size_0; +static u32 katana_flash_size_1; + +unsigned char __res[sizeof(bd_t)]; /* PCI Interrupt routing */ static int __init @@ -105,7 +113,7 @@ void __init katana_get_board_id(void) { - switch (in_8((volatile char *)(cpld_base + KATANA_CPLD_PRODUCT_ID))) { + switch (in_8(cpld_base + KATANA_CPLD_PRODUCT_ID)) { case KATANA_PRODUCT_ID_3750: katana_id = KATANA_ID_3750; break; @@ -170,7 +178,7 @@ static inline int katana_is_monarch(void) { - return in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_3)) & + return in_8(cpld_base + KATANA_CPLD_BD_CFG_3) & KATANA_CPLD_BD_CFG_3_MONARCH; } @@ -180,18 +188,17 @@ u8 reset_out; /* Enable access to IPMI ctlr by clearing IPMI PORTSEL bit in CPLD */ - reset_out = in_8((volatile char *)(cpld_base + KATANA_CPLD_RESET_OUT)); + reset_out = in_8(cpld_base + KATANA_CPLD_RESET_OUT); reset_out &= ~KATANA_CPLD_RESET_OUT_PORTSEL; - out_8((volatile void *)(cpld_base + KATANA_CPLD_RESET_OUT), reset_out); - return; + out_8(cpld_base + KATANA_CPLD_RESET_OUT, reset_out); } -static unsigned long +static u32 katana_bus_freq(void) { u8 bd_cfg_0; - bd_cfg_0 = in_8((volatile char *)(cpld_base + KATANA_CPLD_BD_CFG_0)); + bd_cfg_0 = in_8(cpld_base + KATANA_CPLD_BD_CFG_0); switch (bd_cfg_0 & KATANA_CPLD_BD_CFG_0_SYSCLK_MASK) { case KATANA_CPLD_BD_CFG_0_SYSCLK_200: @@ -263,13 +270,12 @@ * BIT25 summarizes GPP interrupts 8-15 */ mv64x60_set_bits(&bh, MV64360_IC_CPU0_INTR_MASK_HI, (1<<25)); - return; } void __init katana_setup_peripherals(void) { - u32 base, size_0, size_1; + u32 base; /* Set up windows for boot CS, soldered & socketed flash, and CPLD */ mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, @@ -277,19 +283,22 @@ bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); /* Assume firmware set up window sizes correctly for dev 0 & 1 */ - mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, &base, &size_0); + mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, &base, + &katana_flash_size_0); - if (size_0 > 0) { + if (katana_flash_size_0 > 0) { mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, - KATANA_SOLDERED_FLASH_BASE, size_0, 0); + KATANA_SOLDERED_FLASH_BASE, katana_flash_size_0, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN); } - mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, &base, &size_1); + mv64x60_get_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, &base, + &katana_flash_size_1); - if (size_1 > 0) { + if (katana_flash_size_1 > 0) { mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, - (KATANA_SOLDERED_FLASH_BASE + size_0), size_1, 0); + (KATANA_SOLDERED_FLASH_BASE + katana_flash_size_0), + katana_flash_size_1, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); } @@ -300,12 +309,12 @@ mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_3_WIN, KATANA_CPLD_BASE, KATANA_CPLD_SIZE, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_3_WIN); - cpld_base = (u32)ioremap(KATANA_CPLD_BASE, KATANA_CPLD_SIZE); + cpld_base = ioremap(KATANA_CPLD_BASE, KATANA_CPLD_SIZE); mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0); bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); - sram_base = (u32)ioremap(KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE); + sram_base = ioremap(KATANA_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE); /* Set up Enet->SRAM window */ mv64x60_set_32bit_window(&bh, MV64x60_ENET2MEM_4_WIN, @@ -339,13 +348,11 @@ * internal data path in SRAM since it's first time accessing it * while after reset it's not configured. */ - memset((void *)sram_base, 0, MV64360_SRAM_SIZE); + memset(sram_base, 0, MV64360_SRAM_SIZE); /* Only processor zero [on 3750] is an PCI interrupt controller */ if (katana_get_proc_num() == 0) katana_intr_setup(); - - return; } static void __init @@ -356,7 +363,7 @@ memset(&si, 0, sizeof(si)); - si.phys_reg_base = KATANA_BRIDGE_REG_BASE; + si.phys_reg_base = CONFIG_MV64X60_NEW_BASE; si.pci_1.enable_bus = 1; si.pci_1.pci_io.cpu_base = KATANA_PCI1_IO_START_PROC_ADDR; @@ -410,10 +417,77 @@ mv64x60_set_bus(&bh, 1, 0); bh.hose_b->first_busno = 0; bh.hose_b->last_busno = 0xff; +} + +#ifdef CONFIG_MTD_PHYSMAP - return; +#ifndef MB +#define MB (1 << 20) +#endif + +/* + * MTD Layout depends on amount of soldered FLASH in system. Sizes in MB. + * + * FLASH Amount: 128 64 32 16 + * ------------- --- -- -- -- + * Monitor: 1 1 1 1 + * Primary Kernel: 1.5 1.5 1.5 1.5 + * Primary fs: 30 30 + * Secondary Kernel: 1.5 1.5 N/A N/A + * Secondary fs: N/A N/A + * User: + */ +static int __init +katana_setup_mtd(void) +{ + u32 size; + int ptbl_entries; + static struct mtd_partition *ptbl; + + size = katana_flash_size_0 + katana_flash_size_1; + if (!size) + return -ENOMEM; + + ptbl_entries = (size >= (64*MB)) ? 6 : 4; + + if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), + GFP_KERNEL)) == NULL) { + + printk(KERN_WARNING "Can't alloc MTD partition table\n"); + return -ENOMEM; + } + memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); + + ptbl[0].name = "Monitor"; + ptbl[0].size = KATANA_MTD_MONITOR_SIZE; + ptbl[1].name = "Primary Kernel"; + ptbl[1].offset = MTDPART_OFS_NXTBLK; + ptbl[1].size = 0x00180000; /* 1.5 MB */ + ptbl[2].name = "Primary Filesystem"; + ptbl[2].offset = MTDPART_OFS_APPEND; + ptbl[2].size = MTDPART_SIZ_FULL; /* Correct for 16 & 32 MB */ + ptbl[ptbl_entries-1].name = "User FLASH"; + ptbl[ptbl_entries-1].offset = KATANA_MTD_MONITOR_SIZE; + ptbl[ptbl_entries-1].size = MTDPART_SIZ_FULL; + + if (size >= (64*MB)) { + ptbl[2].size = 30*MB; + ptbl[3].name = "Secondary Kernel"; + ptbl[3].offset = MTDPART_OFS_NXTBLK; + ptbl[3].size = 0x00180000; /* 1.5 MB */ + ptbl[4].name = "Secondary Filesystem"; + ptbl[4].offset = MTDPART_OFS_APPEND; + ptbl[4].size = MTDPART_SIZ_FULL; + } + + physmap_map.size = size; + physmap_set_partitions(ptbl, ptbl_entries); + return 0; } +arch_initcall(katana_setup_mtd); +#endif + static void __init katana_setup_arch(void) { @@ -444,8 +518,7 @@ printk(KERN_INFO "DD2.0 detected. Setting L2 cache" "to Writethrough mode\n"); _set_L2CR(L2CR_L2E | L2CR_L2PE | L2CR_L2WT); - } - else + } else _set_L2CR(L2CR_L2E | L2CR_L2PE); if (ppc_md.progress) @@ -458,7 +531,6 @@ printk(KERN_INFO "Artesyn Communication Products, LLC - Katana(TM)\n"); if (ppc_md.progress) ppc_md.progress("katana_setup_arch: exit", 0); - return; } /* Platform device data fixup routines. */ @@ -473,9 +545,12 @@ pdata->max_idle = 40; pdata->default_baud = KATANA_DEFAULT_BAUD; pdata->brg_clk_src = KATANA_MPSC_CLK_SRC; - pdata->brg_clk_freq = KATANA_MPSC_CLK_FREQ; - - return; + /* + * TCLK (not SysCLk) is routed to BRG, then to the MPSC. On most parts, + * TCLK == SysCLK but on 64460, they are separate pins. + * SysCLK can go up to 200 MHz but TCLK can only go up to 133 MHz. + */ + pdata->brg_clk_freq = min(katana_bus_freq(), MV64x60_TCLK_FREQ_MAX); } #endif @@ -483,32 +558,18 @@ static void __init katana_fixup_eth_pdata(struct platform_device *pdev) { - struct mv64xxx_eth_platform_data *eth_pd; + struct mv643xx_eth_platform_data *eth_pd; static u16 phy_addr[] = { KATANA_ETH0_PHY_ADDR, KATANA_ETH1_PHY_ADDR, KATANA_ETH2_PHY_ADDR, }; - int rx_size = KATANA_ETH_RX_QUEUE_SIZE * MV64340_ETH_DESC_SIZE; - int tx_size = KATANA_ETH_TX_QUEUE_SIZE * MV64340_ETH_DESC_SIZE; eth_pd = pdev->dev.platform_data; eth_pd->force_phy_addr = 1; eth_pd->phy_addr = phy_addr[pdev->id]; eth_pd->tx_queue_size = KATANA_ETH_TX_QUEUE_SIZE; eth_pd->rx_queue_size = KATANA_ETH_RX_QUEUE_SIZE; - eth_pd->tx_sram_addr = mv643xx_sram_alloc(tx_size); - - if (eth_pd->tx_sram_addr) - eth_pd->tx_sram_size = tx_size; - else - printk(KERN_ERR "mv643xx_sram_alloc failed\n"); - - eth_pd->rx_sram_addr = mv643xx_sram_alloc(rx_size); - if (eth_pd->rx_sram_addr) - eth_pd->rx_sram_size = rx_size; - else - printk(KERN_ERR "mv643xx_sram_alloc failed\n"); } #endif @@ -524,9 +585,9 @@ { MPSC_CTLR_NAME "1", katana_fixup_mpsc_pdata }, #endif #if defined(CONFIG_MV643XX_ETH) - { MV64XXX_ETH_NAME "0", katana_fixup_eth_pdata }, - { MV64XXX_ETH_NAME "1", katana_fixup_eth_pdata }, - { MV64XXX_ETH_NAME "2", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME "0", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME "1", katana_fixup_eth_pdata }, + { MV643XX_ETH_NAME "2", katana_fixup_eth_pdata }, #endif }; struct platform_device *pdev; @@ -548,11 +609,10 @@ static void katana_restart(char *cmd) { - volatile ulong i = 10000000; + ulong i = 10000000; /* issue hard reset to the reset command register */ - out_8((volatile char *)(cpld_base + KATANA_CPLD_RST_CMD), - KATANA_CPLD_RST_CMD_HR); + out_8(cpld_base + KATANA_CPLD_RST_CMD, KATANA_CPLD_RST_CMD_HR); while (i-- > 0) ; panic("restart failed\n"); @@ -561,6 +621,14 @@ static void katana_halt(void) { + u8 v; + + if (katana_id == KATANA_ID_752I) { + v = in_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF); + v |= HSL_PLD_HOT_SWAP_LED_BIT; + out_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF, v); + } + while (1) ; /* NOTREACHED */ } @@ -598,12 +666,13 @@ } seq_printf(m, "product ID\t: 0x%x\n", - in_8((volatile char *)(cpld_base + KATANA_CPLD_PRODUCT_ID))); + in_8(cpld_base + KATANA_CPLD_PRODUCT_ID)); seq_printf(m, "hardware rev\t: 0x%x\n", - in_8((volatile char *)(cpld_base+KATANA_CPLD_HARDWARE_VER))); + in_8(cpld_base+KATANA_CPLD_HARDWARE_VER)); seq_printf(m, "PLD rev\t\t: 0x%x\n", - in_8((volatile char *)(cpld_base + KATANA_CPLD_PLD_VER))); - seq_printf(m, "PLB freq\t: %ldMhz\n", katana_bus_freq() / 1000000); + in_8(cpld_base + KATANA_CPLD_PLD_VER)); + seq_printf(m, "PLB freq\t: %ldMhz\n", + (long)katana_bus_freq() / 1000000); seq_printf(m, "PCI\t\t: %sMonarch\n", katana_is_monarch()? "" : "Non-"); return 0; @@ -612,23 +681,21 @@ static void __init katana_calibrate_decr(void) { - ulong freq; + u32 freq; freq = katana_bus_freq() / 4; printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", - freq / 1000000, freq % 1000000); + (long)freq / 1000000, (long)freq % 1000000); tb_ticks_per_jiffy = freq / HZ; tb_to_us = mulhwu_scale_factor(freq, 1000000); - - return; } unsigned long __init katana_find_end_of_memory(void) { - return mv64x60_get_mem_size(KATANA_BRIDGE_REG_BASE, + return mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE, MV64x60_TYPE_MV64360); } @@ -639,8 +706,6 @@ mtspr(DBAT2U, 0xf0001ffe); mtspr(DBAT2L, 0xf000002a); mb(); - - return; } #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) @@ -657,6 +722,23 @@ { parse_bootinfo(find_bootinfo()); + /* ASSUMPTION: If both r3 (bd_t pointer) and r6 (cmdline pointer) + * are non-zero, then we should use the board info from the bd_t + * structure and the cmdline pointed to by r6 instead of the + * information from birecs, if any. Otherwise, use the information + * from birecs as discovered by the preceeding call to + * parse_bootinfo(). This rule should work with both PPCBoot, which + * uses a bd_t board info structure, and the kernel boot wrapper, + * which uses birecs. + */ + if (r3 && r6) { + /* copy board info structure */ + memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) ); + /* copy command line */ + *(char *)(r7+KERNELBASE) = 0; + strcpy(cmd_line, (char *)(r6+KERNELBASE)); + } + isa_mem_base = 0; ppc_md.setup_arch = katana_setup_arch; @@ -672,7 +754,7 @@ #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) ppc_md.setup_io_mappings = katana_map_io; ppc_md.progress = mv64x60_mpsc_progress; - mv64x60_progress_init(KATANA_BRIDGE_REG_BASE); + mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE); #endif #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) @@ -680,5 +762,4 @@ #endif katana_set_bat(); /* Need for katana_find_end_of_memory and progress */ - return; } diff -Nru a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h --- a/arch/ppc/platforms/katana.h 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/katana.h 2005-03-07 14:54:18 -08:00 @@ -19,18 +19,17 @@ * PCI I/O space and 4 windows from the CPU bus to PCI MEM space. * We'll only use one PCI MEM window on each PCI bus. * - * This is the CPU physical memory map (windows must be at least 1MB and start + * This is the CPU physical memory map (windows must be at least 64 KB and start * on a boundary that is a multiple of the window size): * * 0xff800000-0xffffffff - Boot window * 0xf8400000-0xf85fffff - Internal SRAM - * 0xf8200000-0xf823ffff - CPLD - * 0xf8100000-0xf810ffff - MV64360 Registers - * 0xf8000000-0xf80fffff - PLCC socket - * 0xf0000000-0xf01fffff - Consistent memory pool - * 0xe8000000-0xefffffff - soldered flash - * 0xc0000000-0xc0ffffff - PCI I/O - * 0x80000000-0xbfffffff - PCI MEM + * 0xf8200000-0xf83fffff - CPLD + * 0xf8100000-0xf810ffff - MV64360 Registers (CONFIG_MV64X60_NEW_BASE) + * 0xf8000000-0xf80fffff - Socketed FLASH + * 0xe0000000-0xefffffff - Soldered FLASH + * 0xc0000000-0xc3ffffff - PCI I/O (second hose) + * 0x80000000-0xbfffffff - PCI MEM (second hose) */ #ifndef __PPC_PLATFORMS_KATANA_H @@ -38,33 +37,22 @@ /* CPU Physical Memory Map setup. */ #define KATANA_BOOT_WINDOW_BASE 0xff800000 +#define KATANA_BOOT_WINDOW_SIZE 0x00800000 /* 8 MB */ #define KATANA_INTERNAL_SRAM_BASE 0xf8400000 #define KATANA_CPLD_BASE 0xf8200000 -#define KATANA_BRIDGE_REG_BASE 0xf8100000 +#define KATANA_CPLD_SIZE 0x00200000 /* 2 MB */ #define KATANA_SOCKET_BASE 0xf8000000 -#define KATANA_SOLDERED_FLASH_BASE 0xe8000000 - -#define KATANA_BOOT_WINDOW_SIZE_ACTUAL 0x00800000 /* 8MB */ -#define KATANA_CPLD_SIZE_ACTUAL 0x00020000 /* 128KB */ -#define KATANA_SOCKETED_FLASH_SIZE_ACTUAL 0x00080000 /* 512KB */ -#define KATANA_SOLDERED_FLASH_SIZE_ACTUAL 0x02000000 /* 32MB */ - -#define KATANA_BOOT_WINDOW_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_BOOT_WINDOW_SIZE_ACTUAL) -#define KATANA_CPLD_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_CPLD_SIZE_ACTUAL) -#define KATANA_SOCKETED_FLASH_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_SOCKETED_FLASH_SIZE_ACTUAL) -#define KATANA_SOLDERED_FLASH_SIZE max(MV64360_WINDOW_SIZE_MIN, \ - KATANA_SOLDERED_FLASH_SIZE_ACTUAL) +#define KATANA_SOCKETED_FLASH_SIZE 0x00100000 /* 1 MB */ +#define KATANA_SOLDERED_FLASH_BASE 0xe0000000 +#define KATANA_SOLDERED_FLASH_SIZE 0x10000000 /* 256 MB */ #define KATANA_PCI1_MEM_START_PROC_ADDR 0x80000000 #define KATANA_PCI1_MEM_START_PCI_HI_ADDR 0x00000000 #define KATANA_PCI1_MEM_START_PCI_LO_ADDR 0x80000000 -#define KATANA_PCI1_MEM_SIZE 0x40000000 +#define KATANA_PCI1_MEM_SIZE 0x40000000 /* 1 GB */ #define KATANA_PCI1_IO_START_PROC_ADDR 0xc0000000 #define KATANA_PCI1_IO_START_PCI_ADDR 0x00000000 -#define KATANA_PCI1_IO_SIZE 0x01000000 +#define KATANA_PCI1_IO_SIZE 0x04000000 /* 64 MB */ /* Board-specific IRQ info */ #define KATANA_PCI_INTA_IRQ_3750 64+8 @@ -138,6 +126,8 @@ #define HSL_PLD_J4SGA_REG_OFF 0 #define HSL_PLD_J4GA_REG_OFF 1 #define HSL_PLD_J2GA_REG_OFF 2 +#define HSL_PLD_HOT_SWAP_OFF 6 +#define HSL_PLD_HOT_SWAP_LED_BIT 0x1 #define GA_MASK 0x1f #define HSL_PLD_SIZE 0x1000 #define K3750_GPP_GEO_ADDR_PINS 0xf8000000 @@ -162,7 +152,8 @@ #define KATANA_DEFAULT_BAUD 9600 #define KATANA_MPSC_CLK_SRC 8 /* TCLK */ -#define KATANA_MPSC_CLK_FREQ 133333333 /* 133.3333... MHz */ + +#define KATANA_MTD_MONITOR_SIZE (1 << 20) /* 1 MB */ #define KATANA_ETH0_PHY_ADDR 12 #define KATANA_ETH1_PHY_ADDR 11 diff -Nru a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c --- a/arch/ppc/platforms/pmac_cpufreq.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/pmac_cpufreq.c 2005-03-07 14:54:17 -08:00 @@ -230,7 +230,7 @@ enable_kernel_fp(); #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) enable_kernel_altivec(); #endif /* CONFIG_ALTIVEC */ diff -Nru a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c --- a/arch/ppc/platforms/pmac_setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/pmac_setup.c 2005-03-07 14:54:17 -08:00 @@ -274,7 +274,7 @@ pmac_find_bridges(); /* Checks "l2cr-value" property in the registry */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) { + if (cpu_has_feature(CPU_FTR_L2CR)) { struct device_node *np = find_devices("cpus"); if (np == 0) np = find_type_devices("cpu"); diff -Nru a/arch/ppc/platforms/pmac_smp.c b/arch/ppc/platforms/pmac_smp.c --- a/arch/ppc/platforms/pmac_smp.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/platforms/pmac_smp.c 2005-03-07 14:54:17 -08:00 @@ -119,7 +119,7 @@ static void __init core99_init_caches(int cpu) { - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR)) + if (!cpu_has_feature(CPU_FTR_L2CR)) return; if (cpu == 0) { @@ -132,7 +132,7 @@ printk("CPU%d: L2CR set to %lx\n", cpu, core99_l2_cache); } - if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR)) + if (!cpu_has_feature(CPU_FTR_L3CR)) return; if (cpu == 0){ diff -Nru a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c --- a/arch/ppc/platforms/sandpoint.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/platforms/sandpoint.c 2005-03-07 14:54:18 -08:00 @@ -319,10 +319,10 @@ * We will do this now with good known values. Future versions * of DINK32 are supposed to get this correct. */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_SPEC7450) + if (cpu_has_feature(CPU_FTR_SPEC7450)) /* 745x is different. We only want to pass along enable. */ _set_L2CR(L2CR_L2E); - else if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) + else if (cpu_has_feature(CPU_FTR_L2CR)) /* All modules have 1MB of L2. We also assume that an * L2 divisor of 3 will work. */ @@ -330,7 +330,7 @@ | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF); #if 0 /* Untested right now. */ - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR) { + if (cpu_has_feature(CPU_FTR_L3CR)) { /* Magic value. */ _set_L3CR(0x8f032000); } diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile --- a/arch/ppc/syslib/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/Makefile 2005-03-07 14:54:16 -08:00 @@ -99,4 +99,9 @@ ifeq ($(CONFIG_85xx),y) obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o endif +obj-$(CONFIG_83xx) += ipic.o ppc83xx_setup.o ppc_sys.o +ifeq ($(CONFIG_83xx),y) +obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o +endif +obj-$(CONFIG_MPC8555_CDS) += todc_time.o obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o diff -Nru a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ipic.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,646 @@ +/* + * include/asm-ppc/ipic.c + * + * IPIC routines implementations. + * + * Copyright 2005 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ipic.h" + +static struct ipic p_ipic; +static struct ipic * primary_ipic; + +static struct ipic_info ipic_info[] = { + [9] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 24, + .prio_mask = 0, + }, + [10] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 25, + .prio_mask = 1, + }, + [11] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 26, + .prio_mask = 2, + }, + [14] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 29, + .prio_mask = 5, + }, + [15] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 30, + .prio_mask = 6, + }, + [16] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_D, + .force = IPIC_SIFCR_H, + .bit = 31, + .prio_mask = 7, + }, + [17] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 1, + .prio_mask = 5, + }, + [18] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 2, + .prio_mask = 6, + }, + [19] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 3, + .prio_mask = 7, + }, + [20] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 4, + .prio_mask = 4, + }, + [21] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 5, + .prio_mask = 5, + }, + [22] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 6, + .prio_mask = 6, + }, + [23] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_B, + .force = IPIC_SEFCR, + .bit = 7, + .prio_mask = 7, + }, + [32] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 0, + .prio_mask = 0, + }, + [33] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 1, + .prio_mask = 1, + }, + [34] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 2, + .prio_mask = 2, + }, + [35] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 3, + .prio_mask = 3, + }, + [36] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 4, + .prio_mask = 4, + }, + [37] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 5, + .prio_mask = 5, + }, + [38] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 6, + .prio_mask = 6, + }, + [39] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_H, + .prio = IPIC_SIPRR_A, + .force = IPIC_SIFCR_H, + .bit = 7, + .prio_mask = 7, + }, + [48] = { + .pend = IPIC_SEPNR, + .mask = IPIC_SEMSR, + .prio = IPIC_SMPRR_A, + .force = IPIC_SEFCR, + .bit = 0, + .prio_mask = 4, + }, + [64] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 0, + .prio_mask = 0, + }, + [65] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 1, + .prio_mask = 1, + }, + [66] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 2, + .prio_mask = 2, + }, + [67] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_A, + .force = IPIC_SIFCR_L, + .bit = 3, + .prio_mask = 3, + }, + [68] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 4, + .prio_mask = 0, + }, + [69] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 5, + .prio_mask = 1, + }, + [70] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 6, + .prio_mask = 2, + }, + [71] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = IPIC_SMPRR_B, + .force = IPIC_SIFCR_L, + .bit = 7, + .prio_mask = 3, + }, + [72] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 8, + }, + [73] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 9, + }, + [74] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 10, + }, + [75] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 11, + }, + [76] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 12, + }, + [77] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 13, + }, + [78] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 14, + }, + [79] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 15, + }, + [80] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 16, + }, + [84] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 20, + }, + [85] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 21, + }, + [90] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 26, + }, + [91] = { + .pend = IPIC_SIPNR_H, + .mask = IPIC_SIMSR_L, + .prio = 0, + .force = IPIC_SIFCR_L, + .bit = 27, + }, +}; + +static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg) +{ + return in_be32(base + (reg >> 2)); +} + +static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32 value) +{ + out_be32(base + (reg >> 2), value); +} + +static inline struct ipic * ipic_from_irq(unsigned int irq) +{ + return primary_ipic; +} + +static void ipic_enable_irq(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + temp = ipic_read(ipic->regs, ipic_info[src].mask); + temp |= (1 << (31 - ipic_info[src].bit)); + ipic_write(ipic->regs, ipic_info[src].mask, temp); +} + +static void ipic_disable_irq(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + temp = ipic_read(ipic->regs, ipic_info[src].mask); + temp &= ~(1 << (31 - ipic_info[src].bit)); + ipic_write(ipic->regs, ipic_info[src].mask, temp); +} + +static void ipic_disable_irq_and_ack(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + ipic_disable_irq(irq); + + temp = ipic_read(ipic->regs, ipic_info[src].pend); + temp |= (1 << (31 - ipic_info[src].bit)); + ipic_write(ipic->regs, ipic_info[src].pend, temp); +} + +static void ipic_end_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) + ipic_enable_irq(irq); +} + +struct hw_interrupt_type ipic = { + .typename = " IPIC ", + .enable = ipic_enable_irq, + .disable = ipic_disable_irq, + .ack = ipic_disable_irq_and_ack, + .end = ipic_end_irq, +}; + +void __init ipic_init(phys_addr_t phys_addr, + unsigned int flags, + unsigned int irq_offset, + unsigned char *senses, + unsigned int senses_count) +{ + u32 i, temp = 0; + + primary_ipic = &p_ipic; + primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE); + + primary_ipic->irq_offset = irq_offset; + + ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0); + + /* default priority scheme is grouped. If spread mode is required + * configure SICFR accordingly */ + if (flags & IPIC_SPREADMODE_GRP_A) + temp |= SICFR_IPSA; + if (flags & IPIC_SPREADMODE_GRP_D) + temp |= SICFR_IPSD; + if (flags & IPIC_SPREADMODE_MIX_A) + temp |= SICFR_MPSA; + if (flags & IPIC_SPREADMODE_MIX_B) + temp |= SICFR_MPSB; + + ipic_write(primary_ipic->regs, IPIC_SICNR, temp); + + /* handle MCP route */ + temp = 0; + if (flags & IPIC_DISABLE_MCP_OUT) + temp = SERCR_MCPR; + ipic_write(primary_ipic->regs, IPIC_SERCR, temp); + + /* handle routing of IRQ0 to MCP */ + temp = ipic_read(primary_ipic->regs, IPIC_SEMSR); + + if (flags & IPIC_IRQ0_MCP) + temp |= SEMSR_SIRQ0; + else + temp &= ~SEMSR_SIRQ0; + + ipic_write(primary_ipic->regs, IPIC_SEMSR, temp); + + for (i = 0 ; i < NR_IPIC_INTS ; i++) { + irq_desc[i+irq_offset].handler = &ipic; + irq_desc[i+irq_offset].status = IRQ_LEVEL; + } + + temp = 0; + for (i = 0 ; i < senses_count ; i++) { + if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) { + temp |= 1 << (16 - i); + if (i != 0) + irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0; + else + irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0; + } + } + ipic_write(primary_ipic->regs, IPIC_SECNR, temp); + + printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS, + senses_count, primary_ipic->regs); +} + +int ipic_set_priority(unsigned int irq, unsigned int priority) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + if (priority > 7) + return -EINVAL; + if (src > 127) + return -EINVAL; + if (ipic_info[src].prio == 0) + return -EINVAL; + + temp = ipic_read(ipic->regs, ipic_info[src].prio); + + if (priority < 4) { + temp &= ~(0x7 << (20 + (3 - priority) * 3)); + temp |= ipic_info[src].prio_mask << (20 + (3 - priority) * 3); + } else { + temp &= ~(0x7 << (4 + (7 - priority) * 3)); + temp |= ipic_info[src].prio_mask << (4 + (7 - priority) * 3); + } + + ipic_write(ipic->regs, ipic_info[src].prio, temp); + + return 0; +} + +void ipic_set_highest_priority(unsigned int irq) +{ + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; + u32 temp; + + temp = ipic_read(ipic->regs, IPIC_SICFR); + + /* clear and set HPI */ + temp &= 0x7f000000; + temp |= (src & 0x7f) << 24; + + ipic_write(ipic->regs, IPIC_SICFR, temp); +} + +void ipic_set_default_priority(void) +{ + ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0); + ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1); + ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2); + ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3); + ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4); + ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5); + ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6); + ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7); + + ipic_set_priority(MPC83xx_IRQ_UART1, 0); + ipic_set_priority(MPC83xx_IRQ_UART2, 1); + ipic_set_priority(MPC83xx_IRQ_SEC2, 2); + ipic_set_priority(MPC83xx_IRQ_IIC1, 5); + ipic_set_priority(MPC83xx_IRQ_IIC2, 6); + ipic_set_priority(MPC83xx_IRQ_SPI, 7); + ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0); + ipic_set_priority(MPC83xx_IRQ_PIT, 1); + ipic_set_priority(MPC83xx_IRQ_PCI1, 2); + ipic_set_priority(MPC83xx_IRQ_PCI2, 3); + ipic_set_priority(MPC83xx_IRQ_EXT0, 4); + ipic_set_priority(MPC83xx_IRQ_EXT1, 5); + ipic_set_priority(MPC83xx_IRQ_EXT2, 6); + ipic_set_priority(MPC83xx_IRQ_EXT3, 7); + ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0); + ipic_set_priority(MPC83xx_IRQ_MU, 1); + ipic_set_priority(MPC83xx_IRQ_SBA, 2); + ipic_set_priority(MPC83xx_IRQ_DMA, 3); + ipic_set_priority(MPC83xx_IRQ_EXT4, 4); + ipic_set_priority(MPC83xx_IRQ_EXT5, 5); + ipic_set_priority(MPC83xx_IRQ_EXT6, 6); + ipic_set_priority(MPC83xx_IRQ_EXT7, 7); +} + +void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) +{ + struct ipic *ipic = primary_ipic; + u32 temp; + + temp = ipic_read(ipic->regs, IPIC_SERMR); + temp |= (1 << (31 - mcp_irq)); + ipic_write(ipic->regs, IPIC_SERMR, temp); +} + +void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq) +{ + struct ipic *ipic = primary_ipic; + u32 temp; + + temp = ipic_read(ipic->regs, IPIC_SERMR); + temp &= (1 << (31 - mcp_irq)); + ipic_write(ipic->regs, IPIC_SERMR, temp); +} + +u32 ipic_get_mcp_status(void) +{ + return ipic_read(primary_ipic->regs, IPIC_SERMR); +} + +void ipic_clear_mcp_status(u32 mask) +{ + ipic_write(primary_ipic->regs, IPIC_SERMR, mask); +} + +/* Return an interrupt vector or -1 if no interrupt is pending. */ +int ipic_get_irq(struct pt_regs *regs) +{ + int irq; + + irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f; + + if (irq == 0) /* 0 --> no irq is pending */ + irq = -1; + + return irq; +} + +static struct sysdev_class ipic_sysclass = { + set_kset_name("ipic"), +}; + +static struct sys_device device_ipic = { + .id = 0, + .cls = &ipic_sysclass, +}; + +static int __init init_ipic_sysfs(void) +{ + int rc; + + if (!primary_ipic->regs) + return -ENODEV; + printk(KERN_DEBUG "Registering ipic with sysfs...\n"); + + rc = sysdev_class_register(&ipic_sysclass); + if (rc) { + printk(KERN_ERR "Failed registering ipic sys class\n"); + return -ENODEV; + } + rc = sysdev_register(&device_ipic); + if (rc) { + printk(KERN_ERR "Failed registering ipic sys device\n"); + return -ENODEV; + } + return 0; +} + +subsys_initcall(init_ipic_sysfs); diff -Nru a/arch/ppc/syslib/ipic.h b/arch/ppc/syslib/ipic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ipic.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,49 @@ +/* + * arch/ppc/kernel/ipic.h + * + * IPIC private definitions and structure. + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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. + */ +#ifndef __IPIC_H__ +#define __IPIC_H__ + +#include + +#define MPC83xx_IPIC_SIZE (0x00100) + +/* System Global Interrupt Configuration Register */ +#define SICFR_IPSA 0x00010000 +#define SICFR_IPSD 0x00080000 +#define SICFR_MPSA 0x00200000 +#define SICFR_MPSB 0x00400000 + +/* System External Interrupt Mask Register */ +#define SEMSR_SIRQ0 0x00008000 + +/* System Error Control Register */ +#define SERCR_MCPR 0x00000001 + +struct ipic { + volatile u32 __iomem *regs; + unsigned int irq_offset; +}; + +struct ipic_info { + u8 pend; /* pending register offset from base */ + u8 mask; /* mask register offset from base */ + u8 prio; /* priority register offset from base */ + u8 force; /* force register offset from base */ + u8 bit; /* register bit position (as per doc) + bit mask = 1 << (31 - bit) */ + u8 prio_mask; /* priority mask value */ +}; + +#endif /* __IPIC_H__ */ diff -Nru a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c --- a/arch/ppc/syslib/mv64360_pic.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/mv64360_pic.c 2005-03-07 14:54:16 -08:00 @@ -64,7 +64,7 @@ /* ========================== local declarations =========================== */ struct hw_interrupt_type mv64360_pic = { - .typename = " mv64360_pic ", + .typename = " mv64360 ", .enable = mv64360_unmask_irq, .disable = mv64360_mask_irq, .ack = mv64360_mask_irq, @@ -155,9 +155,10 @@ */ int cpu_nr = smp_processor_id(); if (cpu_nr == 1) { - if (!(mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_LO) & (1 << 28))) + if (!(mv64x60_read(&bh, MV64360_IC_MAIN_CAUSE_LO) & + (1 << MV64x60_IRQ_DOORBELL))) return -1; - return 28; + return mv64360_irq_base + MV64x60_IRQ_DOORBELL; } #endif @@ -171,7 +172,7 @@ if (irq == -1) irq = -2; /* bogus interrupt, should never happen */ else { - if ((irq >= 24) && (irq < 28)) { + if ((irq >= 24) && (irq < MV64x60_IRQ_DOORBELL)) { irq_gpp = mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE); irq_gpp = __ilog2(irq_gpp & @@ -217,8 +218,9 @@ { #ifdef CONFIG_SMP /* second CPU gets only doorbell interrupts */ - if ((irq - mv64360_irq_base) == 28) { - mv64x60_set_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, (1 << 28)); + if ((irq - mv64360_irq_base) == MV64x60_IRQ_DOORBELL) { + mv64x60_set_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, + (1 << MV64x60_IRQ_DOORBELL)); return; } #endif @@ -257,8 +259,9 @@ mv64360_mask_irq(unsigned int irq) { #ifdef CONFIG_SMP - if ((irq - mv64360_irq_base) == 28) { - mv64x60_clr_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, (1 << 28)); + if ((irq - mv64360_irq_base) == MV64x60_IRQ_DOORBELL) { + mv64x60_clr_bits(&bh, MV64360_IC_CPU1_INTR_MASK_LO, + (1 << MV64x60_IRQ_DOORBELL)); return; } #endif @@ -371,7 +374,7 @@ /* Clear old errors and register CPU interface error intr handler */ mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); - if ((rc = request_irq(MV64x60_IRQ_CPU_ERR, + if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) printk(KERN_WARNING "Can't register cpu error handler: %d", rc); @@ -380,7 +383,7 @@ /* Clear old errors and register internal SRAM error intr handler */ mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); - if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR, + if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); @@ -397,7 +400,8 @@ /* Clear old errors and register PCI 0 error intr handler */ mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); - if ((rc = request_irq(MV64360_IRQ_PCI0, mv64360_pci_error_int_handler, + if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, + mv64360_pci_error_int_handler, SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) printk(KERN_WARNING "Can't register pci 0 error handler: %d", rc); @@ -407,7 +411,8 @@ /* Clear old errors and register PCI 1 error intr handler */ mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); - if ((rc = request_irq(MV64360_IRQ_PCI1, mv64360_pci_error_int_handler, + if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base, + mv64360_pci_error_int_handler, SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) printk(KERN_WARNING "Can't register pci 1 error handler: %d", rc); diff -Nru a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c --- a/arch/ppc/syslib/mv64x60.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/mv64x60.c 2005-03-07 14:54:16 -08:00 @@ -314,15 +314,15 @@ static struct resource mv64x60_eth_shared_resources[] = { [0] = { .name = "ethernet shared base", - .start = MV64340_ETH_SHARED_REGS, - .end = MV64340_ETH_SHARED_REGS + - MV64340_ETH_SHARED_REGS_SIZE - 1, + .start = MV643XX_ETH_SHARED_REGS, + .end = MV643XX_ETH_SHARED_REGS + + MV643XX_ETH_SHARED_REGS_SIZE - 1, .flags = IORESOURCE_MEM, }, }; static struct platform_device mv64x60_eth_shared_device = { - .name = MV64XXX_ETH_SHARED_NAME, + .name = MV643XX_ETH_SHARED_NAME, .id = 0, .num_resources = ARRAY_SIZE(mv64x60_eth_shared_resources), .resource = mv64x60_eth_shared_resources, @@ -338,10 +338,10 @@ }, }; -static struct mv64xxx_eth_platform_data eth0_pd; +static struct mv643xx_eth_platform_data eth0_pd; static struct platform_device eth0_device = { - .name = MV64XXX_ETH_NAME, + .name = MV643XX_ETH_NAME, .id = 0, .num_resources = ARRAY_SIZE(mv64x60_eth0_resources), .resource = mv64x60_eth0_resources, @@ -361,10 +361,10 @@ }, }; -static struct mv64xxx_eth_platform_data eth1_pd; +static struct mv643xx_eth_platform_data eth1_pd; static struct platform_device eth1_device = { - .name = MV64XXX_ETH_NAME, + .name = MV643XX_ETH_NAME, .id = 1, .num_resources = ARRAY_SIZE(mv64x60_eth1_resources), .resource = mv64x60_eth1_resources, @@ -384,10 +384,10 @@ }, }; -static struct mv64xxx_eth_platform_data eth2_pd; +static struct mv643xx_eth_platform_data eth2_pd; static struct platform_device eth2_device = { - .name = MV64XXX_ETH_NAME, + .name = MV643XX_ETH_NAME, .id = 2, .num_resources = ARRAY_SIZE(mv64x60_eth2_resources), .resource = mv64x60_eth2_resources, diff -Nru a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c --- a/arch/ppc/syslib/ppc4xx_pic.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc/syslib/ppc4xx_pic.c 2005-03-07 14:54:16 -08:00 @@ -4,7 +4,7 @@ * Interrupt controller driver for PowerPC 4xx-based processors. * * Eugene Surovegin or - * Copyright (c) 2004 Zultys Technologies + * Copyright (c) 2004, 2005 Zultys Technologies * * Based on original code by * Copyright (c) 1999 Grant Erickson @@ -29,8 +29,9 @@ /* See comment in include/arch-ppc/ppc4xx_pic.h * for more info about these two variables */ -extern struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[NR_UICS] __attribute__((weak)); -extern unsigned char ppc4xx_uic_ext_irq_cfg[] __attribute__((weak)); +extern struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[NR_UICS] + __attribute__ ((weak)); +extern unsigned char ppc4xx_uic_ext_irq_cfg[] __attribute__ ((weak)); #define IRQ_MASK_UIC0(irq) (1 << (31 - (irq))) #define IRQ_MASK_UICx(irq) (1 << (31 - ((irq) & 0x1f))) @@ -48,6 +49,7 @@ { \ ppc_cached_irq_mask[n] &= ~IRQ_MASK_UIC##n(irq); \ mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]); \ + ACK_UIC##n##_PARENT \ } \ \ static void ppc4xx_uic##n##_ack(unsigned int irq) \ @@ -63,11 +65,11 @@ { \ unsigned int status = irq_desc[irq].status; \ u32 mask = IRQ_MASK_UIC##n(irq); \ - if (status & IRQ_LEVEL){ \ + if (status & IRQ_LEVEL) { \ mtdcr(DCRN_UIC_SR(UIC##n), mask); \ ACK_UIC##n##_PARENT \ } \ - if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))){ \ + if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) { \ ppc_cached_irq_mask[n] |= mask; \ mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]); \ } \ @@ -86,7 +88,9 @@ #define ACK_UIC0_PARENT mtdcr(DCRN_UIC_SR(UICB), UICB_UIC0NC); #define ACK_UIC1_PARENT mtdcr(DCRN_UIC_SR(UICB), UICB_UIC1NC); #define ACK_UIC2_PARENT mtdcr(DCRN_UIC_SR(UICB), UICB_UIC2NC); -UIC_HANDLERS(0); UIC_HANDLERS(1); UIC_HANDLERS(2); +UIC_HANDLERS(0); +UIC_HANDLERS(1); +UIC_HANDLERS(2); static int ppc4xx_pic_get_irq(struct pt_regs *regs) { @@ -114,7 +118,8 @@ #elif NR_UICS == 2 #define ACK_UIC0_PARENT #define ACK_UIC1_PARENT mtdcr(DCRN_UIC_SR(UIC0), UIC0_UIC1NC); -UIC_HANDLERS(0); UIC_HANDLERS(1); +UIC_HANDLERS(0); +UIC_HANDLERS(1); static int ppc4xx_pic_get_irq(struct pt_regs *regs) { @@ -143,18 +148,20 @@ return uic0 ? 32 - ffs(uic0) : -1; } -static inline void ppc4xx_pic_impl_init(void){} +static inline void ppc4xx_pic_impl_init(void) +{ +} #endif static struct ppc4xx_uic_impl { struct hw_interrupt_type decl; - int base; /* Base DCR number */ + int base; /* Base DCR number */ } __uic[] = { - { .decl = DECLARE_UIC(0), .base = UIC0 }, + { .decl = DECLARE_UIC(0), .base = UIC0 }, #if NR_UICS > 1 - { .decl = DECLARE_UIC(1), .base = UIC1 }, + { .decl = DECLARE_UIC(1), .base = UIC1 }, #if NR_UICS > 2 - { .decl = DECLARE_UIC(2), .base = UIC2 }, + { .decl = DECLARE_UIC(2), .base = UIC2 }, #endif #endif }; @@ -168,9 +175,9 @@ void __init ppc4xx_pic_init(void) { int i; - unsigned char* eirqs = ppc4xx_uic_ext_irq_cfg; + unsigned char *eirqs = ppc4xx_uic_ext_irq_cfg; - for (i = 0; i < NR_UICS; ++i){ + for (i = 0; i < NR_UICS; ++i) { int base = __uic[i].base; /* Disable everything by default */ @@ -181,23 +188,23 @@ mtdcr(DCRN_UIC_CR(base), 0); /* Configure polarity and triggering */ - if (ppc4xx_core_uic_cfg){ - struct ppc4xx_uic_settings* p = ppc4xx_core_uic_cfg + i; + if (ppc4xx_core_uic_cfg) { + struct ppc4xx_uic_settings *p = ppc4xx_core_uic_cfg + i; u32 mask = p->ext_irq_mask; u32 pr = mfdcr(DCRN_UIC_PR(base)) & mask; u32 tr = mfdcr(DCRN_UIC_TR(base)) & mask; /* "Fixed" interrupts (on-chip devices) */ - pr |= p->polarity & ~mask; + pr |= p->polarity & ~mask; tr |= p->triggering & ~mask; /* Merge external IRQs settings if board port * provided them */ - if (eirqs && mask){ + if (eirqs && mask) { pr &= ~mask; tr &= ~mask; - while (mask){ + while (mask) { /* Extract current external IRQ mask */ u32 eirq_mask = 1 << __ilog2(mask); @@ -227,8 +234,8 @@ ppc4xx_pic_impl_init(); /* Attach low-level handlers */ - for (i = 0; i < (NR_UICS << 5); ++i){ - irq_desc[i].handler = &__uic[i >> 5].decl; + for (i = 0; i < (NR_UICS << 5); ++i) { + irq_desc[i].handler = &__uic[i >> 5].decl; if (is_level_sensitive(i)) irq_desc[i].status |= IRQ_LEVEL; } diff -Nru a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ppc83xx_setup.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,138 @@ +/* + * arch/ppc/syslib/ppc83xx_setup.c + * + * MPC83XX common board code + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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 +#include +#include +#include /* for linux/serial_core.h */ +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +phys_addr_t immrbar; + +/* Return the amount of memory */ +unsigned long __init +mpc83xx_find_end_of_memory(void) +{ + bd_t *binfo; + + binfo = (bd_t *) __res; + + return binfo->bi_memsize; +} + +long __init +mpc83xx_time_init(void) +{ +#define SPCR_OFFS 0x00000110 +#define SPCR_TBEN 0x00400000 + + bd_t *binfo = (bd_t *)__res; + u32 *spcr = ioremap(binfo->bi_immr_base + SPCR_OFFS, 4); + + *spcr |= SPCR_TBEN; + + iounmap(spcr); + + return 0; +} + +/* The decrementer counts at the system (internal) clock freq divided by 4 */ +void __init +mpc83xx_calibrate_decr(void) +{ + bd_t *binfo = (bd_t *) __res; + unsigned int freq, divisor; + + freq = binfo->bi_busfreq; + divisor = 4; + tb_ticks_per_jiffy = freq / HZ / divisor; + tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); +} + +#ifdef CONFIG_SERIAL_8250 +void __init +mpc83xx_early_serial_map(void) +{ +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + struct uart_port serial_req; +#endif + struct plat_serial8250_port *pdata; + bd_t *binfo = (bd_t *) __res; + pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC83xx_DUART); + + /* Setup serial port access */ + pdata[0].uartclk = binfo->bi_busfreq; + pdata[0].mapbase += binfo->bi_immr_base; + pdata[0].membase = ioremap(pdata[0].mapbase, 0x100); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + memset(&serial_req, 0, sizeof (serial_req)); + serial_req.iotype = SERIAL_IO_MEM; + serial_req.mapbase = pdata[0].mapbase; + serial_req.membase = pdata[0].membase; + serial_req.regshift = 0; + + gen550_init(0, &serial_req); +#endif + + pdata[1].uartclk = binfo->bi_busfreq; + pdata[1].mapbase += binfo->bi_immr_base; + pdata[1].membase = ioremap(pdata[1].mapbase, 0x100); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + /* Assume gen550_init() doesn't modify serial_req */ + serial_req.mapbase = pdata[1].mapbase; + serial_req.membase = pdata[1].membase; + + gen550_init(1, &serial_req); +#endif +} +#endif + +void +mpc83xx_restart(char *cmd) +{ + local_irq_disable(); + for(;;); +} + +void +mpc83xx_power_off(void) +{ + local_irq_disable(); + for(;;); +} + +void +mpc83xx_halt(void) +{ + local_irq_disable(); + for(;;); +} + +/* PCI SUPPORT DOES NOT EXIT, MODEL after ppc85xx_setup.c */ diff -Nru a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc/syslib/ppc83xx_setup.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,53 @@ +/* + * arch/ppc/syslib/ppc83xx_setup.h + * + * MPC83XX common board definitions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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. + * + */ + +#ifndef __PPC_SYSLIB_PPC83XX_SETUP_H +#define __PPC_SYSLIB_PPC83XX_SETUP_H + +#include +#include +#include + +extern unsigned long mpc83xx_find_end_of_memory(void) __init; +extern long mpc83xx_time_init(void) __init; +extern void mpc83xx_calibrate_decr(void) __init; +extern void mpc83xx_early_serial_map(void) __init; +extern void mpc83xx_restart(char *cmd); +extern void mpc83xx_power_off(void); +extern void mpc83xx_halt(void); +extern void mpc83xx_setup_hose(void) __init; + +/* PCI config */ +#if 0 +#define PCI1_CFG_ADDR_OFFSET (FIXME) +#define PCI1_CFG_DATA_OFFSET (FIXME) + +#define PCI2_CFG_ADDR_OFFSET (FIXME) +#define PCI2_CFG_DATA_OFFSET (FIXME) +#endif + +/* Serial Config */ +#ifdef CONFIG_SERIAL_MANY_PORTS +#define RS_TABLE_SIZE 64 +#else +#define RS_TABLE_SIZE 2 +#endif + +#ifndef BASE_BAUD +#define BASE_BAUD 115200 +#endif + +#endif /* __PPC_SYSLIB_PPC83XX_SETUP_H */ diff -Nru a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c --- a/arch/ppc/syslib/todc_time.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc/syslib/todc_time.c 2005-03-07 14:54:17 -08:00 @@ -287,6 +287,7 @@ limit = 1; switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1743: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ @@ -322,6 +323,7 @@ if (todc_info->rtc_type != TODC_TYPE_MC146818) { switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1743: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ @@ -418,6 +420,7 @@ unsigned char save_control = 0, val; switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1747: @@ -432,6 +435,7 @@ val = todc_read_val(addr); switch (todc_info->rtc_type) { + case TODC_TYPE_DS1553: case TODC_TYPE_DS1557: case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1747: diff -Nru a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c --- a/arch/ppc/syslib/xilinx_pic.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc/syslib/xilinx_pic.c 2005-03-07 14:54:18 -08:00 @@ -114,6 +114,14 @@ { int i; + /* + * NOTE: The assumption here is that NR_IRQS is 32 or less + * (NR_IRQS is 32 for PowerPC 405 cores by default). + */ +#if (NR_IRQS > 32) +#error NR_IRQS > 32 not supported +#endif + #if XPAR_XINTC_USE_DCR == 0 intc = ioremap(XPAR_INTC_0_BASEADDR, 32); @@ -138,6 +146,12 @@ ppc_md.get_irq = xilinx_pic_get_irq; - for (i = 0; i < NR_IRQS; ++i) + for (i = 0; i < NR_IRQS; ++i) { irq_desc[i].handler = &xilinx_intc; + + if (XPAR_INTC_0_KIND_OF_INTR & (0x00000001 << i)) + irq_desc[i].status &= ~IRQ_LEVEL; + else + irq_desc[i].status |= IRQ_LEVEL; + } } diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig --- a/arch/ppc64/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/Kconfig 2005-03-07 14:54:17 -08:00 @@ -194,7 +194,10 @@ config HMT bool "Hardware multithreading" - depends on SMP && PPC_PSERIES + depends on SMP && PPC_PSERIES && BROKEN + help + This option enables hardware multithreading on RS64 cpus. + pSeries systems p620 and p660 have such a cpu type. config DISCONTIGMEM bool "Discontiguous Memory Support" @@ -313,7 +316,7 @@ config HOTPLUG_CPU bool "Support for hot-pluggable CPUs" - depends on SMP && EXPERIMENTAL && PPC_PSERIES + depends on SMP && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC) select HOTPLUG ---help--- Say Y here to be able to turn CPUs off and on. diff -Nru a/arch/ppc64/Makefile b/arch/ppc64/Makefile --- a/arch/ppc64/Makefile 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/Makefile 2005-03-07 14:54:16 -08:00 @@ -15,17 +15,38 @@ KERNELLOAD := 0xc000000000000000 +# Set default 32 bits cross compilers for vdso and boot wrapper +CROSS32_COMPILE ?= + +CROSS32CC := $(CROSS32_COMPILE)gcc +CROSS32AS := $(CROSS32_COMPILE)as +CROSS32LD := $(CROSS32_COMPILE)ld +CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy + +# If we have a biarch compiler, use it for 32 bits cross compile if +# CROSS32_COMPILE wasn't explicitely defined, and add proper explicit +# target type to target compilers + HAS_BIARCH := $(call cc-option-yn, -m64) ifeq ($(HAS_BIARCH),y) +ifeq ($(CROSS32_COMPILE),) +CROSS32CC := $(CC) -m32 +CROSS32AS := $(AS) -a32 +CROSS32LD := $(LD) -m elf32ppc +CROSS32OBJCOPY := $(OBJCOPY) +endif AS := $(AS) -a64 LD := $(LD) -m elf64ppc CC := $(CC) -m64 endif +export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY + new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) ifeq ($(new_nm),y) NM := $(NM) --synthetic + endif CHECKFLAGS += -m64 -D__powerpc__ @@ -65,14 +86,20 @@ $(boottarget-y): vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -bootimage-$(CONFIG_PPC_PSERIES) := zImage -bootimage-$(CONFIG_PPC_MAPLE) := zImage +bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage +bootimage-$(CONFIG_PPC_PMAC) := vmlinux +bootimage-$(CONFIG_PPC_MAPLE) := $(boot)/zImage bootimage-$(CONFIG_PPC_ISERIES) := vmlinux BOOTIMAGE := $(bootimage-y) install: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ -all: $(BOOTIMAGE) +defaultimage-$(CONFIG_PPC_PSERIES) := zImage +defaultimage-$(CONFIG_PPC_PMAC) := vmlinux +defaultimage-$(CONFIG_PPC_MAPLE) := zImage +defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux +KBUILD_IMAGE := $(defaultimage-y) +all: $(KBUILD_IMAGE) archclean: $(Q)$(MAKE) $(clean)=$(boot) diff -Nru a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile --- a/arch/ppc64/boot/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/boot/Makefile 2005-03-07 14:54:18 -08:00 @@ -20,17 +20,11 @@ # CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE # in the toplevel makefile. -CROSS32_COMPILE ?= -#CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux- -BOOTCC := $(CROSS32_COMPILE)gcc HOSTCC := gcc BOOTCFLAGS := $(HOSTCFLAGS) $(LINUXINCLUDE) -fno-builtin -BOOTAS := $(CROSS32_COMPILE)as BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -BOOTLD := $(CROSS32_COMPILE)ld BOOTLFLAGS := -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds -BOOTOBJCOPY := $(CROSS32_COMPILE)objcopy OBJCOPYFLAGS := contents,alloc,load,readonly,data src-boot := crt0.S string.S prom.c main.c zlib.c imagesize.c div64.S @@ -38,10 +32,10 @@ obj-boot := $(addsuffix .o, $(basename $(src-boot))) quiet_cmd_bootcc = BOOTCC $@ - cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< + cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< quiet_cmd_bootas = BOOTAS $@ - cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< + cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c $(call if_changed_dep,bootcc) @@ -77,15 +71,15 @@ $(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE $(call if_changed,ramdisk) -addsection = $(BOOTOBJCOPY) $(1) \ +addsection = $(CROSS32OBJCOPY) $(1) \ --add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \ --set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS) quiet_cmd_addnote = ADDNOTE $@ - cmd_addnote = $(BOOTLD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ + cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ quiet_cmd_piggy = PIGGY $@ - cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(BOOTAS) -o $@ + cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(CROSS32AS) -o $@ $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE $(call if_changed,gzip) @@ -117,7 +111,7 @@ awk '{printf "unsigned long vmlinux_memsize = 0x%s;\n", substr($$1,8)}' \ >> $(obj)/imagesize.c -install: $(CONFIGURE) $(obj)/$(BOOTIMAGE) - sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" "$(obj)/$(BOOTIMAGE)" "$(INSTALL_PATH)" +install: $(CONFIGURE) $(BOOTIMAGE) + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" "$(BOOTIMAGE)" clean-files := $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip) diff -Nru a/arch/ppc64/boot/install.sh b/arch/ppc64/boot/install.sh --- a/arch/ppc64/boot/install.sh 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/boot/install.sh 2005-03-07 14:54:18 -08:00 @@ -17,6 +17,7 @@ # $2 - kernel image file # $3 - kernel map file # $4 - default install path (blank if root directory) +# $5 - kernel boot file, the zImage # # User may have a custom install script @@ -27,7 +28,7 @@ # Default install # this should work for both the pSeries zImage and the iSeries vmlinux.sm -image_name=`basename $2` +image_name=`basename $5` if [ -f $4/$image_name ]; then mv $4/$image_name $4/$image_name.old diff -Nru a/arch/ppc64/boot/main.c b/arch/ppc64/boot/main.c --- a/arch/ppc64/boot/main.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/boot/main.c 2005-03-07 14:54:18 -08:00 @@ -200,7 +200,7 @@ vmlinux.addr += (unsigned long)elf64ph->p_offset; vmlinux.size -= (unsigned long)elf64ph->p_offset; - flush_cache((void *)vmlinux.addr, vmlinux.memsize); + flush_cache((void *)vmlinux.addr, vmlinux.size); if (a1) printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr)); diff -Nru a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig --- a/arch/ppc64/configs/g5_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/configs/g5_defconfig 2005-03-07 14:54:16 -08:00 @@ -1,11 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc3 -# Thu Oct 7 15:18:38 2004 +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:53 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -18,6 +19,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -25,25 +27,26 @@ CONFIG_LOCALVERSION="" 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_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set +CONFIG_KOBJECT_UEVENT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y # 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 -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -51,10 +54,11 @@ # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -65,6 +69,7 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_PPC_PSERIES is not set CONFIG_PPC_PMAC=y +# CONFIG_PPC_MAPLE is not set CONFIG_PPC=y CONFIG_PPC64=y CONFIG_PPC_OF=y @@ -75,12 +80,10 @@ CONFIG_POWER4_ONLY=y CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y CONFIG_NR_CPUS=2 # CONFIG_SCHED_SMT is not set # CONFIG_PREEMPT is not set -# CONFIG_PPC_RTAS is not set -# CONFIG_LPARCFG is not set +CONFIG_GENERIC_HARDIRQS=y # # General setup @@ -91,12 +94,15 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG_CPU is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -139,14 +145,29 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -161,11 +182,10 @@ CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=y -CONFIG_BLK_DEV_IDETAPE=y -CONFIG_BLK_DEV_IDEFLOPPY=y +# 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 @@ -205,7 +225,6 @@ CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y # CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set -CONFIG_BLK_DEV_IDEDMA_PMAC_AUTO=y # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -240,6 +259,7 @@ # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers @@ -254,6 +274,7 @@ # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set CONFIG_SCSI_SATA_SVW=y # CONFIG_SCSI_ATA_PIIX is not set # CONFIG_SCSI_SATA_NV is not set @@ -261,6 +282,7 @@ # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set # CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_ULI is not set # CONFIG_SCSI_SATA_VIA is not set # CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_BUSLOGIC is not set @@ -270,12 +292,9 @@ # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_INITIO is not set # 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_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set @@ -286,11 +305,9 @@ # 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_DEBUG is not set -# CONFIG_SCSI_MAC53C94 is not set # # Multi-device support (RAID and LVM) @@ -300,15 +317,16 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y -# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID10=m CONFIG_MD_RAID5=y -# CONFIG_MD_RAID6 is not set -# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y -# CONFIG_DM_CRYPT is not set -# CONFIG_DM_SNAPSHOT is not set -# CONFIG_DM_MIRROR is not set -# CONFIG_DM_ZERO is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_ZERO=m # # Fusion MPT device support @@ -386,6 +404,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=m +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -398,61 +418,71 @@ # # IP: Netfilter Configuration # -CONFIG_IP_NF_CONNTRACK=y -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -# CONFIG_IP_NF_FTP is not set -# CONFIG_IP_NF_IRC is not set -# CONFIG_IP_NF_TFTP is not set -# CONFIG_IP_NF_AMANDA is not set -CONFIG_IP_NF_QUEUE=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_LIMIT=y -CONFIG_IP_NF_MATCH_IPRANGE=y -CONFIG_IP_NF_MATCH_MAC=y -CONFIG_IP_NF_MATCH_PKTTYPE=y -CONFIG_IP_NF_MATCH_MARK=y -CONFIG_IP_NF_MATCH_MULTIPORT=y -CONFIG_IP_NF_MATCH_TOS=y -CONFIG_IP_NF_MATCH_RECENT=y -CONFIG_IP_NF_MATCH_ECN=y -CONFIG_IP_NF_MATCH_DSCP=y -CONFIG_IP_NF_MATCH_AH_ESP=y -CONFIG_IP_NF_MATCH_LENGTH=y -CONFIG_IP_NF_MATCH_TTL=y -CONFIG_IP_NF_MATCH_TCPMSS=y -CONFIG_IP_NF_MATCH_HELPER=y -CONFIG_IP_NF_MATCH_STATE=y -CONFIG_IP_NF_MATCH_CONNTRACK=y -CONFIG_IP_NF_MATCH_OWNER=y -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_REALM is not set -# CONFIG_IP_NF_MATCH_SCTP is not set -# CONFIG_IP_NF_MATCH_COMMENT is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_LOG=y -CONFIG_IP_NF_TARGET_ULOG=y -CONFIG_IP_NF_TARGET_TCPMSS=y -CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +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=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=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=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_TARGET_NETMAP=y -CONFIG_IP_NF_TARGET_SAME=y -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_MANGLE=y -CONFIG_IP_NF_TARGET_TOS=y -CONFIG_IP_NF_TARGET_ECN=y -CONFIG_IP_NF_TARGET_DSCP=y -CONFIG_IP_NF_TARGET_MARK=y -CONFIG_IP_NF_TARGET_CLASSIFY=y -# CONFIG_IP_NF_RAW is not set -CONFIG_IP_NF_ARPTABLES=y -CONFIG_IP_NF_ARPFILTER=y -CONFIG_IP_NF_ARP_MANGLE=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=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_XFRM=y -# CONFIG_XFRM_USER is not set +CONFIG_XFRM_USER=m # # SCTP Configuration (EXPERIMENTAL) @@ -471,13 +501,12 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set +CONFIG_NET_CLS_ROUTE=y # # Network testing @@ -587,7 +616,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_JOYDEV=m @@ -663,7 +692,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 @@ -693,6 +721,7 @@ # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set CONFIG_I2C_KEYWEST=y +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set @@ -701,6 +730,7 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set @@ -712,20 +742,25 @@ # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 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_LM63 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_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -768,6 +803,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set @@ -789,6 +825,7 @@ # CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -814,6 +851,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_DEVICE=y # # Sound @@ -833,6 +875,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -842,6 +886,7 @@ # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -849,9 +894,13 @@ # CONFIG_USB_BLUETOOTH_TTY is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_RW_DETECT is not set +CONFIG_USB_STORAGE_RW_DETECT=y CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_ISD200=y @@ -862,7 +911,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -885,7 +934,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -897,12 +945,12 @@ # # -# USB Network adaptors +# USB Network Adapters # -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m CONFIG_USB_USBNET=m # @@ -914,6 +962,7 @@ CONFIG_USB_GENESYS=y CONFIG_USB_NET1080=y CONFIG_USB_PL2301=y +CONFIG_USB_KC2190=y # # Intelligent USB Devices/Gadgets @@ -939,6 +988,7 @@ CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_VISOR=m @@ -946,6 +996,8 @@ CONFIG_USB_SERIAL_IR=m CONFIG_USB_SERIAL_EDGEPORT=m CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KEYSPAN=m CONFIG_USB_SERIAL_KEYSPAN_MPR=y @@ -966,6 +1018,7 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m CONFIG_USB_SERIAL_OMNINET=m @@ -976,42 +1029,72 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # 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_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set +CONFIG_REISERFS_FS=y +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set + +# +# XFS support +# +CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y +# CONFIG_XFS_RT is not set +# CONFIG_XFS_QUOTA is not set +CONFIG_XFS_SECURITY=y +CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m # CONFIG_AUTOFS4_FS is not set @@ -1019,8 +1102,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y @@ -1044,6 +1128,8 @@ CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -1053,8 +1139,8 @@ # # 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_HFS_FS=m +CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -1087,7 +1173,7 @@ CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set # CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_POSIX is not set +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1117,7 +1203,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 @@ -1138,10 +1224,10 @@ # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # 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_CODEPAGE_1250=y +CONFIG_NLS_CODEPAGE_1251=y +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 @@ -1151,10 +1237,10 @@ # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set +CONFIG_NLS_ISO8859_15=y # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_UTF8=y # # Profiling support @@ -1167,19 +1253,23 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y # CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_KPROBES is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUGGER is not set # CONFIG_PPCDBG is not set CONFIG_IRQSTACKS=y -# CONFIG_SCHEDSTATS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1193,7 +1283,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set +CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -1201,19 +1291,24 @@ CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # +# Hardware crypto devices +# + +# # 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/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig --- a/arch/ppc64/configs/iSeries_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/configs/iSeries_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,9 +1,12 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:52 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -16,19 +19,20 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" 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_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -37,12 +41,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -52,8 +56,9 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -61,15 +66,17 @@ # Platform support # CONFIG_PPC_ISERIES=y -# CONFIG_PPC_PSERIES is not set +# CONFIG_PPC_MULTIPLATFORM is not set CONFIG_PPC=y CONFIG_PPC64=y +CONFIG_IBMVIO=y # CONFIG_POWER4_ONLY 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_GENERIC_HARDIRQS=y CONFIG_MSCHUNKS=y CONFIG_LPARCFG=y @@ -82,12 +89,15 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -# CONFIG_HOTPLUG_CPU is not set # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -128,13 +138,26 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -169,6 +192,7 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers @@ -191,6 +215,7 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set CONFIG_SCSI_IBMVSCSI=m +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set @@ -203,7 +228,6 @@ # 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_DEBUG is not set @@ -220,6 +244,7 @@ CONFIG_MD_RAID5=y CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -271,6 +296,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=m +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -284,6 +311,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m @@ -308,8 +338,17 @@ CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=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 @@ -327,21 +366,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_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=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 -# 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 @@ -362,7 +393,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -425,19 +455,21 @@ # 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) # -# CONFIG_ACENIC is not set +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set # CONFIG_DL2K is not set -# CONFIG_E1000 is not set +CONFIG_E1000=m +# CONFIG_E1000_NAPI 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_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -498,7 +530,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set @@ -511,11 +543,8 @@ # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y +# CONFIG_SERIO is not set # CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set # # Input Device Drivers @@ -563,7 +592,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 @@ -606,6 +634,12 @@ # USB support # # CONFIG_USB is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # # USB Gadget Support @@ -613,16 +647,26 @@ # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y @@ -631,20 +675,27 @@ # CONFIG_REISERFS_PROC_INFO is not set CONFIG_REISERFS_FS_XATTR=y CONFIG_REISERFS_FS_POSIX_ACL=y -# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_REISERFS_FS_SECURITY=y CONFIG_JFS_FS=m CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set +CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m # CONFIG_AUTOFS4_FS is not set @@ -652,8 +703,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y @@ -675,8 +727,10 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y -# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y @@ -721,6 +775,7 @@ # CONFIG_CIFS_STATS is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -795,19 +850,23 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUGGER is not set # CONFIG_PPCDBG is not set -# CONFIG_IRQSTACKS is not set -# CONFIG_SCHEDSTATS is not set +CONFIG_IRQSTACKS=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -821,7 +880,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WHIRLPOOL=m +CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -832,10 +891,15 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig --- a/arch/ppc64/configs/maple_defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/configs/maple_defconfig 2005-03-07 14:54:16 -08:00 @@ -1,11 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9 -# Wed Oct 20 15:39:14 2004 +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:53 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -18,6 +19,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -25,12 +27,12 @@ CONFIG_LOCALVERSION="" 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_LOG_BUF_SHIFT=17 # CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -39,12 +41,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -52,9 +54,10 @@ # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -77,10 +80,10 @@ CONFIG_POWER4_ONLY=y CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -# CONFIG_IRQ_ALL_CPUS is not set CONFIG_NR_CPUS=2 # CONFIG_SCHED_SMT is not set # CONFIG_PREEMPT is not set +CONFIG_GENERIC_HARDIRQS=y # # General setup @@ -91,6 +94,20 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set @@ -103,6 +120,7 @@ # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set # @@ -127,13 +145,26 @@ # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON 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_UB is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -151,7 +182,6 @@ # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set CONFIG_IDE_TASK_IOCTL=y -CONFIG_IDE_TASKFILE_IO=y # # IDE chipset support/bugfixes @@ -250,6 +280,8 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -269,7 +301,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -330,7 +361,6 @@ # 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) @@ -344,6 +374,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # @@ -461,7 +492,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set @@ -489,6 +519,7 @@ # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set @@ -497,6 +528,7 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set @@ -508,20 +540,25 @@ # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 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_LM63 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_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -588,6 +625,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -597,6 +636,7 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -604,10 +644,14 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # CONFIG_USB_STORAGE is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -637,7 +681,7 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set @@ -657,6 +701,7 @@ CONFIG_USB_SERIAL_GENERIC=y # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CYPRESS_M8=m # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set # CONFIG_USB_SERIAL_VISOR is not set @@ -664,6 +709,8 @@ # CONFIG_USB_SERIAL_IR is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_EDGEPORT_TI is not set +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set CONFIG_USB_SERIAL_KEYSPAN=y CONFIG_USB_SERIAL_KEYSPAN_MPR=y @@ -683,6 +730,7 @@ # CONFIG_USB_SERIAL_MCT_U232 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_SAFE is not set +CONFIG_USB_SERIAL_TI=m # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set @@ -693,22 +741,37 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # 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_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -719,10 +782,15 @@ # CONFIG_JBD_DEBUG is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set @@ -752,8 +820,10 @@ CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set CONFIG_TMPFS=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y +CONFIG_HUGETLBFS=y +CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y # @@ -766,7 +836,7 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set +CONFIG_CRAMFS=y # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -784,7 +854,6 @@ CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -# CONFIG_EXPORTFS is not set CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y @@ -869,21 +938,25 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUGGER=y CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_PPCDBG is not set # CONFIG_IRQSTACKS is not set -# CONFIG_SCHEDSTATS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -908,14 +981,20 @@ # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y diff -Nru a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig --- a/arch/ppc64/configs/pSeries_defconfig 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/configs/pSeries_defconfig 2005-03-07 14:54:18 -08:00 @@ -1,11 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.9-rc2 -# Thu Sep 23 16:45:05 2004 +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:54 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -18,6 +19,7 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y +CONFIG_LOCK_KERNEL=y # # General setup @@ -28,10 +30,9 @@ 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_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -40,12 +41,12 @@ # 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_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set # @@ -55,8 +56,9 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_SYSVIPC_COMPAT=y @@ -67,22 +69,25 @@ CONFIG_PPC_MULTIPLATFORM=y CONFIG_PPC_PSERIES=y # CONFIG_PPC_PMAC is not set +# CONFIG_PPC_MAPLE is not set CONFIG_PPC=y CONFIG_PPC64=y CONFIG_PPC_OF=y CONFIG_ALTIVEC=y CONFIG_PPC_SPLPAR=y +CONFIG_IBMVIO=y +# CONFIG_U3_DART is not set # CONFIG_BOOTX_TEXT is not set # CONFIG_POWER4_ONLY is not set CONFIG_IOMMU_VMERGE=y CONFIG_SMP=y -CONFIG_IRQ_ALL_CPUS=y CONFIG_NR_CPUS=128 -# CONFIG_HMT is not set CONFIG_DISCONTIGMEM=y CONFIG_NUMA=y CONFIG_SCHED_SMT=y # CONFIG_PREEMPT is not set +CONFIG_EEH=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_PPC_RTAS=y CONFIG_RTAS_FLASH=m CONFIG_SCANLOG=m @@ -100,9 +105,13 @@ CONFIG_HOTPLUG_CPU=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -110,7 +119,6 @@ CONFIG_HOTPLUG_PCI=m # CONFIG_HOTPLUG_PCI_FAKE is not set # CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set # CONFIG_HOTPLUG_PCI_SHPC is not set CONFIG_HOTPLUG_PCI_RPA=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m @@ -137,7 +145,14 @@ # # Parallel port support # -# CONFIG_PARPORT is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_PC_CML1=m +# CONFIG_PARPORT_SERIAL is not set +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_1284 is not set # # Plug and Play support @@ -147,18 +162,32 @@ # Block devices # CONFIG_BLK_DEV_FD=m +# CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m # 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_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -177,7 +206,6 @@ # 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 @@ -247,6 +275,7 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y +CONFIG_SCSI_ISCSI_ATTRS=m # # SCSI low-level drivers @@ -269,15 +298,18 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set CONFIG_SCSI_IBMVSCSI=y +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set CONFIG_SCSI_SYM53C8XX_2=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_IPR_TRACE=y +CONFIG_SCSI_IPR_DUMP=y # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set @@ -287,7 +319,6 @@ CONFIG_SCSI_QLA2300=m CONFIG_SCSI_QLA2322=m CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set @@ -304,6 +335,7 @@ CONFIG_MD_RAID5=y CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m @@ -355,6 +387,8 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_TUNNEL=y +CONFIG_IP_TCPDIAG=m +# CONFIG_IP_TCPDIAG_IPV6 is not set # # IP: Virtual Server Configuration @@ -368,7 +402,8 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m @@ -397,6 +432,9 @@ CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_REALM=m CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_FILTER=m CONFIG_IP_NF_TARGET_REJECT=m CONFIG_IP_NF_TARGET_LOG=m @@ -419,13 +457,13 @@ CONFIG_IP_NF_TARGET_DSCP=m CONFIG_IP_NF_TARGET_MARK=m CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=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_XFRM=y CONFIG_XFRM_USER=m @@ -446,7 +484,6 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing @@ -512,7 +549,6 @@ # 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) @@ -527,6 +563,7 @@ # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -536,6 +573,7 @@ # CONFIG_IXGB_NAPI is not set CONFIG_S2IO=m # CONFIG_S2IO_NAPI is not set +# CONFIG_2BUFF_MODE is not set # # Token Ring devices @@ -556,6 +594,7 @@ # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set +# CONFIG_PLIP is not set CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_FILTER is not set @@ -588,7 +627,7 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set @@ -605,7 +644,9 @@ CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # @@ -624,7 +665,7 @@ # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y -# CONFIG_INPUT_PCSPKR is not set +CONFIG_INPUT_PCSPKR=m # CONFIG_INPUT_UINPUT is not set # @@ -653,6 +694,9 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_PRINTER is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set CONFIG_HVC_CONSOLE=y CONFIG_HVCS=m @@ -674,7 +718,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=1024 @@ -703,7 +746,9 @@ # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -711,6 +756,7 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set @@ -722,20 +768,25 @@ # CONFIG_I2C_SENSOR is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ASB100 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_LM63 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_LM87 is not set # CONFIG_SENSORS_LM90 is not set # CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_W83781D is not set @@ -778,6 +829,7 @@ # CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set @@ -790,8 +842,7 @@ CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y +CONFIG_FB_MATROX_G=y # CONFIG_FB_MATROX_I2C is not set CONFIG_FB_MATROX_MULTIHEAD=y # CONFIG_FB_RADEON_OLD is not set @@ -800,6 +851,7 @@ # CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -825,6 +877,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_DEVICE=y # # Sound @@ -844,6 +901,8 @@ # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # USB Host Controller Drivers @@ -853,6 +912,7 @@ # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -860,6 +920,10 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_RW_DETECT is not set @@ -873,7 +937,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -893,7 +957,6 @@ # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -905,7 +968,7 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set @@ -916,6 +979,7 @@ # # USB port drivers # +# CONFIG_USB_USS720 is not set # # USB Serial Converter support @@ -927,32 +991,51 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # 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_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_MTHCA=m +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set +CONFIG_INFINIBAND_IPOIB=m +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set + +# # File systems # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y @@ -961,20 +1044,27 @@ # CONFIG_REISERFS_PROC_INFO is not set CONFIG_REISERFS_FS_XATTR=y CONFIG_REISERFS_FS_POSIX_ACL=y -# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_REISERFS_FS_SECURITY=y CONFIG_JFS_FS=m CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set +CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m # CONFIG_AUTOFS4_FS is not set @@ -982,8 +1072,9 @@ # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_ZISOFS is not set +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y @@ -1005,8 +1096,10 @@ CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set CONFIG_DEVPTS_FS_XATTR=y -# CONFIG_DEVPTS_FS_SECURITY is not set +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -1035,13 +1128,13 @@ CONFIG_NFS_V3=y CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m +CONFIG_NFSD=y CONFIG_NFSD_V3=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m +CONFIG_EXPORTFS=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y @@ -1051,6 +1144,7 @@ # CONFIG_CIFS_STATS is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1116,21 +1210,25 @@ # CONFIG_DEBUG_KERNEL=y CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUGGER=y CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_PPCDBG is not set CONFIG_IRQSTACKS=y -# CONFIG_SCHEDSTATS is not set # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1144,7 +1242,7 @@ CONFIG_CRYPTO_SHA1=m CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WHIRLPOOL=m +CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m @@ -1155,10 +1253,15 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m + +# +# Hardware crypto devices +# # # Library routines diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig --- a/arch/ppc64/defconfig 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/defconfig 2005-03-07 14:54:16 -08:00 @@ -1,9 +1,12 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.11-rc3-bk6 +# Wed Feb 9 23:34:51 2005 # CONFIG_64BIT=y CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_ISA_DMA=y CONFIG_HAVE_DEC_LOCK=y CONFIG_EARLY_PRINTK=y @@ -16,27 +19,35 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y +CONFIG_LOCK_KERNEL=y # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # 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 -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -45,28 +56,40 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_KMOD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y CONFIG_STOP_MACHINE=y +CONFIG_SYSVIPC_COMPAT=y # # Platform support # # CONFIG_PPC_ISERIES is not set +CONFIG_PPC_MULTIPLATFORM=y CONFIG_PPC_PSERIES=y +CONFIG_PPC_PMAC=y +CONFIG_PPC_MAPLE=y CONFIG_PPC=y CONFIG_PPC64=y CONFIG_PPC_OF=y CONFIG_ALTIVEC=y -# CONFIG_PPC_PMAC is not set -# CONFIG_BOOTX_TEXT is not set +CONFIG_PPC_SPLPAR=y +CONFIG_IBMVIO=y +CONFIG_U3_DART=y +CONFIG_MPIC_BROKEN_U3=y +CONFIG_PPC_PMAC64=y +CONFIG_BOOTX_TEXT=y # 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_HMT is not set -# CONFIG_DISCONTIGMEM is not set +CONFIG_DISCONTIGMEM=y +# CONFIG_NUMA is not set +# CONFIG_SCHED_SMT is not set +# CONFIG_PREEMPT is not set +CONFIG_EEH=y +CONFIG_GENERIC_HARDIRQS=y CONFIG_PPC_RTAS=y CONFIG_RTAS_FLASH=m CONFIG_SCANLOG=m @@ -78,14 +101,19 @@ CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y +CONFIG_BINFMT_MISC=m +# CONFIG_PCI_LEGACY_PROC is not set +# CONFIG_PCI_NAMES is not set +CONFIG_HOTPLUG_CPU=y # -# PCMCIA/CardBus support +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges # -# CONFIG_PCMCIA is not set # # PCI Hotplug Support @@ -93,7 +121,6 @@ CONFIG_HOTPLUG_PCI=m # CONFIG_HOTPLUG_PCI_FAKE is not set # CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_PCIE is not set # CONFIG_HOTPLUG_PCI_SHPC is not set CONFIG_HOTPLUG_PCI_RPA=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m @@ -107,7 +134,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 # @@ -118,7 +147,14 @@ # # Parallel port support # -# CONFIG_PARPORT is not set +CONFIG_PARPORT=m +CONFIG_PARPORT_PC=m +CONFIG_PARPORT_PC_CML1=m +# CONFIG_PARPORT_SERIAL is not set +# CONFIG_PARPORT_PC_FIFO is not set +# CONFIG_PARPORT_PC_SUPERIO is not set +# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_1284 is not set # # Plug and Play support @@ -128,17 +164,32 @@ # Block devices # CONFIG_BLK_DEV_FD=y +# CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set 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_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=65536 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_ATA_OVER_ETH is not set # # ATA/ATAPI/MFM/RLL support @@ -149,15 +200,14 @@ # # 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 # 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 @@ -173,7 +223,6 @@ # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set -CONFIG_BLK_DEV_ADMA=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set CONFIG_BLK_DEV_AMD74XX=y @@ -194,6 +243,11 @@ # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set +CONFIG_BLK_DEV_IDE_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y +CONFIG_BLK_DEV_IDEDMA_PMAC=y +# CONFIG_BLK_DEV_IDE_PMAC_BLINK 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 +273,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 @@ -228,33 +281,52 @@ # CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y +CONFIG_SCSI_ISCSI_ATTRS=m # # 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_SCSI_SATA is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set +CONFIG_SCSI_SATA_SVW=y +# CONFIG_SCSI_ATA_PIIX is not set +# 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 +# CONFIG_SCSI_SATA_SIS is not set +# CONFIG_SCSI_SATA_ULI is not set +# CONFIG_SCSI_SATA_VIA is not set +# 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 # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set +CONFIG_SCSI_IBMVSCSI=y +# CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_PPA is not set +# CONFIG_SCSI_IMM is not set CONFIG_SCSI_SYM53C8XX_2=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=y +CONFIG_SCSI_IPR_DUMP=y # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set @@ -264,10 +336,9 @@ CONFIG_SCSI_QLA2300=m CONFIG_SCSI_QLA2322=m CONFIG_SCSI_QLA6312=m -CONFIG_SCSI_QLA6322=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set +CONFIG_SCSI_DEBUG=m # # Multi-device support (RAID and LVM) @@ -277,11 +348,16 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y +CONFIG_MD_RAID10=y CONFIG_MD_RAID5=y -CONFIG_MD_RAID6=y -# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID6=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=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 @@ -291,15 +367,48 @@ # # IEEE 1394 (FireWire) support # -# CONFIG_IEEE1394 is not set +CONFIG_IEEE1394=y + +# +# Subsystem Options +# +# CONFIG_IEEE1394_VERBOSEDEBUG is not set +# CONFIG_IEEE1394_OUI_DB is not set +CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y +CONFIG_IEEE1394_CONFIG_ROM_IP1394=y + +# +# Device Drivers +# +# CONFIG_IEEE1394_PCILYNX is not set +CONFIG_IEEE1394_OHCI1394=y + +# +# Protocol Drivers +# +CONFIG_IEEE1394_VIDEO1394=m +CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set +CONFIG_IEEE1394_ETH1394=m +CONFIG_IEEE1394_DV1394=m +CONFIG_IEEE1394_RAWIO=y +CONFIG_IEEE1394_CMP=m +CONFIG_IEEE1394_AMDTP=m # # I2O device support # +# CONFIG_I2O is not set # # Macintosh device drivers # +CONFIG_ADB=y +CONFIG_ADB_PMU=y +# CONFIG_PMAC_PBOOK is not set +# CONFIG_PMAC_BACKLIGHT is not set +# CONFIG_INPUT_ADBHID is not set +CONFIG_THERM_PM72=y # # Networking support @@ -322,19 +431,19 @@ # 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 +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # # 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 @@ -342,6 +451,9 @@ # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m @@ -366,8 +478,17 @@ CONFIG_IP_NF_MATCH_STATE=m CONFIG_IP_NF_MATCH_CONNTRACK=m CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=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 @@ -385,24 +506,24 @@ 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_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=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_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 @@ -412,36 +533,42 @@ # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set -# CONFIG_NET_HW_FLOWCONTROL is not set # # 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_SUNGEM=y CONFIG_NET_VENDOR_3COM=y CONFIG_VORTEX=y # CONFIG_TYPHOON is not set @@ -451,6 +578,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 @@ -483,8 +611,8 @@ # 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_VIA_VELOCITY is not set CONFIG_TIGON3=y # @@ -492,59 +620,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 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_PLIP 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 @@ -565,12 +674,12 @@ # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 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_EVDEV=m # CONFIG_INPUT_EVBUG is not set # @@ -582,7 +691,10 @@ CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -590,15 +702,17 @@ 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_PCSPKR=m # CONFIG_INPUT_UINPUT is not set # @@ -623,16 +737,16 @@ 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_PRINTER=m +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set CONFIG_HVC_CONSOLE=y - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_QIC02_TAPE is not set +CONFIG_HVCS=m # # IPMI @@ -652,7 +766,6 @@ # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 @@ -661,25 +774,30 @@ # I2C support # CONFIG_I2C=y -# CONFIG_I2C_CHARDEV is not set +CONFIG_I2C_CHARDEV=y # # I2C Algorithms # 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 +CONFIG_I2C_AMD8111=y # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_ISA is not set +CONFIG_I2C_KEYWEST=y +# CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -687,33 +805,61 @@ # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_STUB is not set # 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_ADM1026 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_LM63 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_LM87 is not set # CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SMSC47B397 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 # @@ -731,20 +877,28 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=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_CONTROL is not set +# CONFIG_FB_PLATINUM is not set +# CONFIG_FB_VALKYRIE is not set # 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_RIVA=y +CONFIG_FB_RIVA_I2C=y +# CONFIG_FB_RIVA_DEBUG is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G450=y -CONFIG_FB_MATROX_G100=y -# CONFIG_FB_MATROX_I2C is not set +CONFIG_FB_MATROX_G=y +CONFIG_FB_MATROX_I2C=m +CONFIG_FB_MATROX_MAVEN=m CONFIG_FB_MATROX_MULTIHEAD=y # CONFIG_FB_RADEON_OLD is not set CONFIG_FB_RADEON=y @@ -752,6 +906,7 @@ # CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set +# CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set @@ -764,10 +919,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 @@ -779,6 +932,11 @@ CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_DEVICE=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_DEVICE=y # # Sound @@ -797,13 +955,19 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y # # 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 +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -811,8 +975,13 @@ # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set -CONFIG_USB_STORAGE=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_RW_DETECT=y # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set @@ -823,7 +992,7 @@ # CONFIG_USB_STORAGE_JUMPSHOT is not set # -# USB Human Interface Devices (HID) +# USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y @@ -833,14 +1002,16 @@ # 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 # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set -# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -852,17 +1023,18 @@ # # -# USB Network adaptors +# USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set +CONFIG_USB_PEGASUS=y # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # # USB port drivers # +# CONFIG_USB_USS720 is not set # # USB Serial Converter support @@ -874,50 +1046,81 @@ # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # 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_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # CONFIG_USB_TEST is not set # +# USB ATM/DSL drivers +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_MTHCA=m +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set +CONFIG_INFINIBAND_IPOIB=m +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set + +# # File systems # CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -# CONFIG_EXT2_FS_SECURITY is not set +CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y CONFIG_EXT3_FS_POSIX_ACL=y -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT3_FS_SECURITY=y CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=y # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y CONFIG_JFS_FS=y CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set +CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=m +CONFIG_DNOTIFY=y +CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # @@ -927,6 +1130,7 @@ # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -934,6 +1138,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 # @@ -941,10 +1147,13 @@ # 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 +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y @@ -954,8 +1163,8 @@ # # 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_HFS_FS=m +CONFIG_HFSPLUS_FS=m # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -973,18 +1182,23 @@ 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_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -992,51 +1206,66 @@ # # Partition Types # -# CONFIG_PARTITION_ADVANCED is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set # # 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 -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# 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_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=m # # Profiling support @@ -1048,19 +1277,26 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_FS=y CONFIG_DEBUG_STACKOVERFLOW=y +# CONFIG_KPROBES is not set 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_XMON_DEFAULT is not set # CONFIG_PPCDBG is not set -# CONFIG_DEBUG_INFO is not set +CONFIG_IRQSTACKS=y # # Security options # +# CONFIG_KEYS is not set # CONFIG_SECURITY is not set # @@ -1070,24 +1306,36 @@ 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_WP512=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_ANUBIS=m CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_CRC32C=m CONFIG_CRYPTO_TEST=m # +# Hardware crypto devices +# + +# # 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/LparData.c b/arch/ppc64/kernel/LparData.c --- a/arch/ppc64/kernel/LparData.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/LparData.c 2005-03-07 14:54:16 -08:00 @@ -45,7 +45,7 @@ .xSize = sizeof(struct HvReleaseData), .xVpdAreasPtrOffset = offsetof(struct naca_struct, xItVpdAreas), .xSlicNacaAddr = &naca, /* 64-bit Naca address */ - .xMsNucDataOffset = 0x6000, /* offset of LparMap within loadarea (see head.S) */ + .xMsNucDataOffset = 0x4800, /* offset of LparMap within loadarea (see head.S) */ .xTagsMode = 1, /* tags inactive */ .xAddressSize = 0, /* 64 bit */ .xNoSharedProcs = 0, /* shared processors */ @@ -224,6 +224,7 @@ }; struct msChunks msChunks; +EXPORT_SYMBOL(msChunks); /* Depending on whether this is called from iSeries or pSeries setup * code, the location of the msChunks struct may or may not have diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile --- a/arch/ppc64/kernel/Makefile 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/Makefile 2005-03-07 14:54:18 -08:00 @@ -11,7 +11,8 @@ udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \ ptrace32.o signal32.o rtc.o init_task.o \ lmb.o cputable.o cpu_setup_power4.o idle_power4.o \ - iommu.o sysfs.o + iommu.o sysfs.o vdso.o pmc.o +obj-y += vdso32/ vdso64/ obj-$(CONFIG_PPC_OF) += of_device.o diff -Nru a/arch/ppc64/kernel/align.c b/arch/ppc64/kernel/align.c --- a/arch/ppc64/kernel/align.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/align.c 2005-03-07 14:54:18 -08:00 @@ -238,7 +238,7 @@ dsisr = regs->dsisr; - if (cur_cpu_spec->cpu_features & CPU_FTR_NODSISRALIGN) { + if (cpu_has_feature(CPU_FTR_NODSISRALIGN)) { unsigned int real_instr; if (__get_user(real_instr, (unsigned int __user *)regs->nip)) return 0; diff -Nru a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c --- a/arch/ppc64/kernel/asm-offsets.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/asm-offsets.c 2005-03-07 14:54:17 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,8 @@ #include #include #include +#include +#include #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -166,6 +169,25 @@ DEFINE(CPU_SPEC_PVR_VALUE, offsetof(struct cpu_spec, pvr_value)); DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features)); DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup)); + + /* systemcfg offsets for use by vdso */ + DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct systemcfg, tb_orig_stamp)); + DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct systemcfg, tb_ticks_per_sec)); + DEFINE(CFG_TB_TO_XS, offsetof(struct systemcfg, tb_to_xs)); + DEFINE(CFG_STAMP_XSEC, offsetof(struct systemcfg, stamp_xsec)); + DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct systemcfg, tb_update_count)); + DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct systemcfg, tz_minuteswest)); + DEFINE(CFG_TZ_DSTTIME, offsetof(struct systemcfg, tz_dsttime)); + DEFINE(CFG_SYSCALL_MAP32, offsetof(struct systemcfg, syscall_map_32)); + DEFINE(CFG_SYSCALL_MAP64, offsetof(struct systemcfg, syscall_map_64)); + + /* timeval/timezone offsets for use by vdso */ + DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); + DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec)); + DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec)); + DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec)); + DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest)); + DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime)); return 0; } diff -Nru a/arch/ppc64/kernel/cputable.c b/arch/ppc64/kernel/cputable.c --- a/arch/ppc64/kernel/cputable.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/cputable.c 2005-03-07 14:54:16 -08:00 @@ -17,9 +17,12 @@ #include #include #include +#include + #include struct cpu_spec* cur_cpu_spec = NULL; +EXPORT_SYMBOL(cur_cpu_spec); /* NOTE: * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's diff -Nru a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S --- a/arch/ppc64/kernel/head.S 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/head.S 2005-03-07 14:54:17 -08:00 @@ -54,7 +54,6 @@ * 0x0100 - 0x2fff : pSeries Interrupt prologs * 0x3000 - 0x3fff : Interrupt support * 0x4000 - 0x4fff : NACA - * 0x5000 - 0x5fff : SystemCfg * 0x6000 : iSeries and common interrupt prologs * 0x9000 - 0x9fff : Initial segment table */ @@ -517,16 +516,7 @@ .globl naca naca: .llong itVpdAreas -#endif - - . = SYSTEMCFG_PHYS_ADDR - .globl __start_systemcfg -__start_systemcfg: - . = (SYSTEMCFG_PHYS_ADDR + PAGE_SIZE) - .globl __end_systemcfg -__end_systemcfg: -#ifdef CONFIG_PPC_ISERIES /* * The iSeries LPAR map is at this fixed address * so that the HvReleaseData structure can address @@ -536,6 +526,8 @@ * VSID generation algorithm. See include/asm/mmu_context.h. */ + . = 0x4800 + .llong 2 /* # ESIDs to be mapped by hypervisor */ .llong 1 /* # memory ranges to be mapped by hypervisor */ .llong STAB0_PAGE /* Page # of segment table within load area */ @@ -1264,10 +1256,6 @@ addi r2,r2,0x4000 addi r2,r2,0x4000 - LOADADDR(r9,systemcfg) - SET_REG_TO_CONST(r4, SYSTEMCFG_VIRT_ADDR) - std r4,0(r9) /* set the systemcfg pointer */ - bl .iSeries_early_setup /* relocation is on at this point */ @@ -1772,7 +1760,7 @@ sc /* HvCall_setASR */ #else /* set the ASR */ - li r3,SYSTEMCFG_PHYS_ADDR /* r3 = ptr to systemcfg */ + ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ lwz r3,PLATFORM(r3) /* r3 = platform flags */ cmpldi r3,PLATFORM_PSERIES_LPAR bne 98f @@ -1861,12 +1849,6 @@ ori r6,r6,MSR_RI mtmsrd r6 /* RI on */ - /* setup the systemcfg pointer which is needed by *tab_initialize */ - LOADADDR(r6,systemcfg) - sub r6,r6,r26 /* addr of the variable systemcfg */ - li r27,SYSTEMCFG_PHYS_ADDR - std r27,0(r6) /* set the value of systemcfg */ - #ifdef CONFIG_HMT /* Start up the second thread on cpu 0 */ mfspr r3,PVR @@ -1941,7 +1923,7 @@ /* set the ASR */ ld r3,PACASTABREAL(r13) ori r4,r3,1 /* turn on valid bit */ - li r3,SYSTEMCFG_PHYS_ADDR /* r3 = ptr to systemcfg */ + ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ lwz r3,PLATFORM(r3) /* r3 = platform flags */ cmpldi r3,PLATFORM_PSERIES_LPAR bne 98f @@ -1960,7 +1942,7 @@ mtasr r4 /* set the stab location */ 99: /* Set SDR1 (hash table pointer) */ - li r3,SYSTEMCFG_PHYS_ADDR /* r3 = ptr to systemcfg */ + ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ lwz r3,PLATFORM(r3) /* r3 = platform flags */ /* Test if bit 0 is set (LPAR bit) */ andi. r3,r3,0x1 @@ -1997,11 +1979,6 @@ */ li r3,0 bl .do_cpu_ftr_fixups - - /* setup the systemcfg pointer */ - LOADADDR(r9,systemcfg) - SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR) - std r8,0(r9) LOADADDR(r26, boot_cpuid) lwz r26,0(r26) diff -Nru a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c --- a/arch/ppc64/kernel/iSeries_setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/iSeries_setup.c 2005-03-07 14:54:17 -08:00 @@ -267,7 +267,7 @@ unsigned long i; unsigned long mem_blocks = 0; - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) + if (cpu_has_feature(CPU_FTR_SLB)) mem_blocks = iSeries_process_Regatta_mainstore_vpd(mb_array, max_entries); else diff -Nru a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c --- a/arch/ppc64/kernel/idle.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/idle.c 2005-03-07 14:54:17 -08:00 @@ -293,6 +293,10 @@ power4_idle(); if (need_resched()) schedule(); + + if (cpu_is_offline(_smp_processor_id()) && + system_state == SYSTEM_RUNNING) + cpu_die(); } return 0; } diff -Nru a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c --- a/arch/ppc64/kernel/irq.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/irq.c 2005-03-07 14:54:17 -08:00 @@ -61,6 +61,7 @@ #endif extern irq_desc_t irq_desc[NR_IRQS]; +EXPORT_SYMBOL(irq_desc); int distribute_irqs = 1; int __irq_offset_value; @@ -114,6 +115,35 @@ seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts); return 0; } + +#ifdef CONFIG_HOTPLUG_CPU +void fixup_irqs(cpumask_t map) +{ + unsigned int irq; + static int warned; + + for_each_irq(irq) { + cpumask_t mask; + + if (irq_desc[irq].status & IRQ_PER_CPU) + continue; + + cpus_and(mask, irq_affinity[irq], map); + if (any_online_cpu(mask) == NR_CPUS) { + printk("Breaking affinity for irq %i\n", irq); + mask = map; + } + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); + else if (irq_desc[irq].action && !(warned++)) + printk("Cannot set affinity for irq %i\n", irq); + } + + local_irq_enable(); + mdelay(1); + local_irq_disable(); +} +#endif extern int noirqdebug; diff -Nru a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c --- a/arch/ppc64/kernel/lparcfg.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/lparcfg.c 2005-03-07 14:54:16 -08:00 @@ -33,8 +33,9 @@ #include #include #include +#include -#define MODULE_VERS "1.5" +#define MODULE_VERS "1.6" #define MODULE_NAME "lparcfg" /* #define LPARCFG_DEBUG */ @@ -214,13 +215,20 @@ } static unsigned long get_purr(void); -/* ToDo: get sum of purr across all processors. The purr collection code - * is coming, but at this time is still problematic, so for now this - * function will return 0. - */ + +/* Track sum of all purrs across all processors. This is used to further */ +/* calculate usage values by different applications */ + static unsigned long get_purr(void) { unsigned long sum_purr = 0; + int cpu; + struct cpu_usage *cu; + + for_each_cpu(cpu) { + cu = &per_cpu(cpu_usage_array, cpu); + sum_purr += cu->current_tb; + } return sum_purr; } diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S --- a/arch/ppc64/kernel/misc.S 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/misc.S 2005-03-07 14:54:18 -08:00 @@ -939,6 +939,7 @@ .llong .sys32_add_key .llong .sys32_request_key .llong .compat_sys_keyctl + .llong .compat_sys_waitid .balign 8 _GLOBAL(sys_call_table) @@ -1214,3 +1215,4 @@ .llong .sys_add_key .llong .sys_request_key /* 270 */ .llong .sys_keyctl + .llong .sys_waitid diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c --- a/arch/ppc64/kernel/pSeries_lpar.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/pSeries_lpar.c 2005-03-07 14:54:18 -08:00 @@ -505,7 +505,7 @@ int i; unsigned long flags = 0; struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (lock_tlbie) spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags); diff -Nru a/arch/ppc64/kernel/pSeries_nvram.c b/arch/ppc64/kernel/pSeries_nvram.c --- a/arch/ppc64/kernel/pSeries_nvram.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/pSeries_nvram.c 2005-03-07 14:54:17 -08:00 @@ -11,14 +11,9 @@ * This perhaps should live in drivers/char */ -#include #include #include -#include -#include -#include -#include #include #include #include diff -Nru a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c --- a/arch/ppc64/kernel/pSeries_setup.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/pSeries_setup.c 2005-03-07 14:54:16 -08:00 @@ -320,8 +320,9 @@ } } -static void pSeries_cpu_die(void) +static void pSeries_mach_cpu_die(void) { + idle_task_exit(); local_irq_disable(); /* Some hardware requires clearing the CPPR, while other hardware does not * it is safe either way @@ -599,7 +600,7 @@ .power_off = rtas_power_off, .halt = rtas_halt, .panic = rtas_os_term, - .cpu_die = pSeries_cpu_die, + .cpu_die = pSeries_mach_cpu_die, .get_boot_time = pSeries_get_boot_time, .get_rtc_time = pSeries_get_rtc_time, .set_rtc_time = pSeries_set_rtc_time, diff -Nru a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c --- a/arch/ppc64/kernel/pacaData.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/pacaData.c 2005-03-07 14:54:17 -08:00 @@ -20,9 +20,14 @@ #include #include -struct systemcfg *systemcfg; +static union { + struct systemcfg data; + u8 page[PAGE_SIZE]; +} systemcfg_store __page_aligned; +struct systemcfg *systemcfg = &systemcfg_store.data; EXPORT_SYMBOL(systemcfg); + /* This symbol is provided by the linker - let it fill in the paca * field correctly */ extern unsigned long __toc_start; @@ -216,3 +221,4 @@ #endif #endif }; +EXPORT_SYMBOL(paca); diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/pci.c 2005-03-07 14:54:18 -08:00 @@ -63,7 +63,9 @@ * page is mapped and isa_io_limit prevents access to it. */ unsigned long isa_io_base; /* NULL if no ISA bus */ +EXPORT_SYMBOL(isa_io_base); unsigned long pci_io_base; +EXPORT_SYMBOL(pci_io_base); void iSeries_pcibios_init(void); @@ -300,19 +302,15 @@ EXPORT_SYMBOL(pci_domain_nr); -/* Set the name of the bus as it appears in /proc/bus/pci */ -int pci_name_bus(char *name, struct pci_bus *bus) +/* Decide whether to display the domain number in /proc */ +int pci_proc_domain(struct pci_bus *bus) { -#ifndef CONFIG_PPC_ISERIES +#ifdef CONFIG_PPC_ISERIES + return 0; +#else struct pci_controller *hose = pci_bus_to_host(bus); - - if (hose->buid) - sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number); - else + return hose->buid; #endif - sprintf(name, "%02x", bus->number); - - return 0; } /* diff -Nru a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c --- a/arch/ppc64/kernel/pmac_setup.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/pmac_setup.c 2005-03-07 14:54:16 -08:00 @@ -439,6 +439,9 @@ } struct machdep_calls __initdata pmac_md = { +#ifdef CONFIG_HOTPLUG_CPU + .cpu_die = generic_mach_cpu_die, +#endif .probe = pmac_probe, .setup_arch = pmac_setup_arch, .init_early = pmac_init_early, diff -Nru a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c --- a/arch/ppc64/kernel/pmac_smp.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/pmac_smp.c 2005-03-07 14:54:16 -08:00 @@ -308,4 +308,9 @@ void __init pmac_setup_smp(void) { smp_ops = &core99_smp_ops; +#ifdef CONFIG_HOTPLUG_CPU + smp_ops->cpu_enable = generic_cpu_enable; + smp_ops->cpu_disable = generic_cpu_disable; + smp_ops->cpu_die = generic_cpu_die; +#endif } diff -Nru a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/pmc.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,64 @@ +/* + * linux/arch/ppc64/kernel/pmc.c + * + * Copyright (C) 2004 David Gibson, 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. + */ + +#include +#include +#include + +#include +#include + +/* Ensure exceptions are disabled */ +static void dummy_perf(struct pt_regs *regs) +{ + unsigned int mmcr0 = mfspr(SPRN_MMCR0); + + mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO); + mtspr(SPRN_MMCR0, mmcr0); +} + +static spinlock_t pmc_owner_lock = SPIN_LOCK_UNLOCKED; +static void *pmc_owner_caller; /* mostly for debugging */ +perf_irq_t perf_irq = dummy_perf; + +int reserve_pmc_hardware(perf_irq_t new_perf_irq) +{ + int err = 0; + + spin_lock(&pmc_owner_lock); + + if (pmc_owner_caller) { + printk(KERN_WARNING "reserve_pmc_hardware: " + "PMC hardware busy (reserved by caller %p)\n", + pmc_owner_caller); + err = -EBUSY; + goto out; + } + + pmc_owner_caller = __builtin_return_address(0); + perf_irq = new_perf_irq ? : dummy_perf; + + out: + spin_unlock(&pmc_owner_lock); + return err; +} + +void release_pmc_hardware(void) +{ + spin_lock(&pmc_owner_lock); + + WARN_ON(! pmc_owner_caller); + + pmc_owner_caller = NULL; + perf_irq = dummy_perf; + + spin_unlock(&pmc_owner_lock); +} diff -Nru a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c --- a/arch/ppc64/kernel/ppc_ksyms.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/ppc_ksyms.c 2005-03-07 14:54:16 -08:00 @@ -8,49 +8,18 @@ */ #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 #include #include -#ifdef CONFIG_PPC_ISERIES #include -#include -#endif - -extern int do_signal(sigset_t *, struct pt_regs *); - -EXPORT_SYMBOL(do_signal); - -EXPORT_SYMBOL(isa_io_base); -EXPORT_SYMBOL(pci_io_base); EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strncpy); @@ -65,10 +34,6 @@ EXPORT_SYMBOL(strcmp); EXPORT_SYMBOL(strncmp); -EXPORT_SYMBOL(__down_interruptible); -EXPORT_SYMBOL(__up); -EXPORT_SYMBOL(__down); - EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(ip_fast_csum); @@ -79,11 +44,6 @@ EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -EXPORT_SYMBOL(clear_user_page); - -#ifdef CONFIG_MSCHUNKS -EXPORT_SYMBOL(msChunks); -#endif EXPORT_SYMBOL(reloc_offset); #ifdef CONFIG_PPC_ISERIES @@ -107,11 +67,7 @@ EXPORT_SYMBOL(_outsw_ns); EXPORT_SYMBOL(_insl_ns); EXPORT_SYMBOL(_outsl_ns); -EXPORT_SYMBOL(ioremap); -EXPORT_SYMBOL(__ioremap); -EXPORT_SYMBOL(iounmap); -EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(giveup_fpu); @@ -119,8 +75,7 @@ EXPORT_SYMBOL(giveup_altivec); #endif EXPORT_SYMBOL(flush_icache_range); -EXPORT_SYMBOL(flush_icache_user_range); -EXPORT_SYMBOL(flush_dcache_page); + #ifdef CONFIG_SMP #ifdef CONFIG_PPC_ISERIES EXPORT_SYMBOL(local_get_flags); @@ -129,19 +84,6 @@ #endif #endif -EXPORT_SYMBOL(ppc_md); - -#ifdef CONFIG_PPC_MULTIPLATFORM -EXPORT_SYMBOL(find_devices); -EXPORT_SYMBOL(find_type_devices); -EXPORT_SYMBOL(find_compatible_devices); -EXPORT_SYMBOL(find_path_device); -EXPORT_SYMBOL(device_is_compatible); -EXPORT_SYMBOL(machine_is_compatible); -EXPORT_SYMBOL(find_all_nodes); -EXPORT_SYMBOL(get_property); -#endif - EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memmove); @@ -150,10 +92,4 @@ EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(timer_interrupt); -EXPORT_SYMBOL(irq_desc); -EXPORT_SYMBOL(get_wchan); EXPORT_SYMBOL(console_drivers); - -EXPORT_SYMBOL(tb_ticks_per_usec); -EXPORT_SYMBOL(paca); -EXPORT_SYMBOL(cur_cpu_spec); diff -Nru a/arch/ppc64/kernel/proc_ppc64.c b/arch/ppc64/kernel/proc_ppc64.c --- a/arch/ppc64/kernel/proc_ppc64.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/proc_ppc64.c 2005-03-07 14:54:17 -08:00 @@ -89,7 +89,7 @@ return 1; pde->nlink = 1; pde->data = systemcfg; - pde->size = 4096; + pde->size = PAGE_SIZE; pde->proc_fops = &page_map_fops; #ifdef CONFIG_PPC_PSERIES diff -Nru a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c --- a/arch/ppc64/kernel/process.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/process.c 2005-03-07 14:54:17 -08:00 @@ -51,6 +51,7 @@ #include #include #include +#include #ifndef CONFIG_SMP struct task_struct *last_task_used_math = NULL; @@ -168,6 +169,8 @@ #endif /* CONFIG_ALTIVEC */ +DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); + struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *new) { @@ -206,6 +209,21 @@ new_thread = &new->thread; old_thread = ¤t->thread; +/* Collect purr utilization data per process and per processor wise */ +/* purr is nothing but processor time base */ + +#if defined(CONFIG_PPC_PSERIES) + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { + struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); + long unsigned start_tb, current_tb; + start_tb = old_thread->start_tb; + cu->current_tb = current_tb = mfspr(SPRN_PURR); + old_thread->accum_tb += (current_tb - start_tb); + new_thread->start_tb = current_tb; + } +#endif + + local_irq_save(flags); last = _switch(old_thread, new_thread); @@ -388,12 +406,12 @@ kregs = (struct pt_regs *) sp; sp -= STACK_FRAME_OVERHEAD; p->thread.ksp = sp; - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) { + if (cpu_has_feature(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) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) sp_vsid |= SLB_VSID_L; p->thread.ksp_vsid = sp_vsid; @@ -469,6 +487,7 @@ current->thread.used_vr = 0; #endif /* CONFIG_ALTIVEC */ } +EXPORT_SYMBOL(start_thread); int set_fpexc_mode(struct task_struct *tsk, unsigned int val) { @@ -607,6 +626,7 @@ } while (count++ < 16); return 0; } +EXPORT_SYMBOL(get_wchan); void show_stack(struct task_struct *p, unsigned long *_sp) { diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/prom.c 2005-03-07 14:54:17 -08:00 @@ -32,6 +32,8 @@ #include #include #include +#include + #include #include #include @@ -1138,6 +1140,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_devices); /** * Construct and return a list of the device_nodes with a given type. @@ -1157,6 +1160,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_type_devices); /** * Returns all nodes linked together @@ -1174,6 +1178,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_all_nodes); /** Checks if the given "compat" string matches one of the strings in * the device's "compatible" property @@ -1197,6 +1202,7 @@ return 0; } +EXPORT_SYMBOL(device_is_compatible); /** @@ -1216,6 +1222,7 @@ } return rc; } +EXPORT_SYMBOL(machine_is_compatible); /** * Construct and return a list of the device_nodes with a given type @@ -1239,6 +1246,7 @@ *prevp = NULL; return head; } +EXPORT_SYMBOL(find_compatible_devices); /** * Find the device_node with a given full_name. @@ -1253,6 +1261,7 @@ return np; return NULL; } +EXPORT_SYMBOL(find_path_device); /******* * @@ -1872,6 +1881,7 @@ } return NULL; } +EXPORT_SYMBOL(get_property); /* * Add a property to a node diff -Nru a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c --- a/arch/ppc64/kernel/prom_init.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/prom_init.c 2005-03-07 14:54:18 -08:00 @@ -151,7 +151,6 @@ extern void __start(unsigned long r3, unsigned long r4, unsigned long r5); -extern unsigned long reloc_offset(void); extern void enter_prom(struct prom_args *args, unsigned long entry); extern void copy_and_flush(unsigned long dest, unsigned long src, unsigned long size, unsigned long offset); @@ -679,8 +678,7 @@ * point to after it */ if (RELOC(prom_initrd_start)) { - if ((RELOC(prom_initrd_start) + RELOC(prom_initrd_end)) - > RELOC(alloc_bottom)) + if (RELOC(prom_initrd_end) > RELOC(alloc_bottom)) RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); } diff -Nru a/arch/ppc64/kernel/semaphore.c b/arch/ppc64/kernel/semaphore.c --- a/arch/ppc64/kernel/semaphore.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/semaphore.c 2005-03-07 14:54:16 -08:00 @@ -18,6 +18,8 @@ #include #include +#include + #include #include #include @@ -62,6 +64,7 @@ __sem_update_count(sem, 1); wake_up(&sem->wait); } +EXPORT_SYMBOL(__up); /* * Note that when we come in to __down or __down_interruptible, @@ -99,6 +102,7 @@ */ wake_up(&sem->wait); } +EXPORT_SYMBOL(__down); int __sched __down_interruptible(struct semaphore * sem) { @@ -129,3 +133,4 @@ wake_up(&sem->wait); return retval; } +EXPORT_SYMBOL(__down_interruptible); diff -Nru a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c --- a/arch/ppc64/kernel/setup.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/setup.c 2005-03-07 14:54:17 -08:00 @@ -129,6 +129,7 @@ /* The main machine-dep calls structure */ struct machdep_calls ppc_md; +EXPORT_SYMBOL(ppc_md); #ifdef CONFIG_MAGIC_SYSRQ unsigned long SYSRQ_KEY; @@ -315,7 +316,7 @@ 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) + if (cpu_has_feature(CPU_FTR_SMT)) maxcpus *= 2; if (maxcpus > NR_CPUS) { @@ -339,7 +340,7 @@ */ for_each_cpu(cpu) { cpu_set(cpu, cpu_sibling_map[cpu]); - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); } @@ -767,7 +768,7 @@ seq_printf(m, "unknown (%08x)", pvr); #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) seq_printf(m, ", altivec supported"); #endif /* CONFIG_ALTIVEC */ @@ -990,6 +991,34 @@ } /* + * Called from setup_arch to initialize the bitmap of available + * syscalls in the systemcfg page + */ +void __init setup_syscall_map(void) +{ + unsigned int i, count64 = 0, count32 = 0; + extern unsigned long *sys_call_table; + extern unsigned long *sys_call_table32; + extern unsigned long sys_ni_syscall; + + + for (i = 0; i < __NR_syscalls; i++) { + if (sys_call_table[i] == sys_ni_syscall) + continue; + count64++; + systemcfg->syscall_map_64[i >> 5] |= 0x80000000UL >> (i & 0x1f); + } + for (i = 0; i < __NR_syscalls; i++) { + if (sys_call_table32[i] == sys_ni_syscall) + continue; + count32++; + systemcfg->syscall_map_32[i >> 5] |= 0x80000000UL >> (i & 0x1f); + } + printk(KERN_INFO "Syscall map setup, %d 32 bits and %d 64 bits syscalls\n", + count32, count64); +} + +/* * 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. @@ -1027,6 +1056,9 @@ /* set up the bootmem stuff with available memory */ do_init_bootmem(); + /* initialize the syscall map in systemcfg */ + setup_syscall_map(); + ppc_md.setup_arch(); /* Select the correct idle loop for the platform. */ @@ -1345,9 +1377,6 @@ void cpu_die(void) { - idle_task_exit(); if (ppc_md.cpu_die) ppc_md.cpu_die(); - local_irq_disable(); - for (;;); } diff -Nru a/arch/ppc64/kernel/signal.c b/arch/ppc64/kernel/signal.c --- a/arch/ppc64/kernel/signal.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/signal.c 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,8 @@ #include #include #include +#include + #include #include #include @@ -34,6 +36,7 @@ #include #include #include +#include #define DEBUG_SIG 0 @@ -426,10 +429,14 @@ goto badframe; /* Set up to return from userspace. */ - err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); - if (err) - goto badframe; - + if (vdso64_rt_sigtramp && current->thread.vdso_base) { + regs->link = current->thread.vdso_base + vdso64_rt_sigtramp; + } else { + err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); + if (err) + goto badframe; + regs->link = (unsigned long) &frame->tramp[0]; + } funct_desc_ptr = (func_descr_t __user *) ka->sa.sa_handler; /* Allocate a dummy caller frame for the signal handler. */ @@ -438,7 +445,6 @@ /* Set up "regs" so we "return" to the signal handler. */ err |= get_user(regs->nip, &funct_desc_ptr->entry); - regs->link = (unsigned long) &frame->tramp[0]; regs->gpr[1] = newsp; err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); regs->gpr[3] = signr; @@ -566,6 +572,4 @@ return 0; } - - - +EXPORT_SYMBOL(do_signal); diff -Nru a/arch/ppc64/kernel/signal32.c b/arch/ppc64/kernel/signal32.c --- a/arch/ppc64/kernel/signal32.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/signal32.c 2005-03-07 14:54:18 -08:00 @@ -31,6 +31,7 @@ #include #include #include +#include #define DEBUG_SIG 0 @@ -656,18 +657,24 @@ /* Save user registers on the stack */ frame = &rt_sf->uc.uc_mcontext; - if (save_user_regs(regs, frame, __NR_rt_sigreturn)) - goto badframe; - if (put_user(regs->gpr[1], (unsigned long __user *)newsp)) goto badframe; + + if (vdso32_rt_sigtramp && current->thread.vdso_base) { + if (save_user_regs(regs, frame, 0)) + goto badframe; + regs->link = current->thread.vdso_base + vdso32_rt_sigtramp; + } else { + if (save_user_regs(regs, frame, __NR_rt_sigreturn)) + goto badframe; + regs->link = (unsigned long) frame->tramp; + } regs->gpr[1] = (unsigned long) newsp; regs->gpr[3] = sig; regs->gpr[4] = (unsigned long) &rt_sf->info; regs->gpr[5] = (unsigned long) &rt_sf->uc; regs->gpr[6] = (unsigned long) rt_sf; regs->nip = (unsigned long) ka->sa.sa_handler; - regs->link = (unsigned long) frame->tramp; regs->trap = 0; regs->result = 0; @@ -825,8 +832,15 @@ || __put_user(sig, &sc->signal)) goto badframe; - if (save_user_regs(regs, &frame->mctx, __NR_sigreturn)) - goto badframe; + if (vdso32_sigtramp && current->thread.vdso_base) { + if (save_user_regs(regs, &frame->mctx, 0)) + goto badframe; + regs->link = current->thread.vdso_base + vdso32_sigtramp; + } else { + if (save_user_regs(regs, &frame->mctx, __NR_sigreturn)) + goto badframe; + regs->link = (unsigned long) frame->mctx.tramp; + } if (put_user(regs->gpr[1], (unsigned long __user *)newsp)) goto badframe; @@ -834,7 +848,6 @@ regs->gpr[3] = sig; regs->gpr[4] = (unsigned long) sc; regs->nip = (unsigned long) ka->sa.sa_handler; - regs->link = (unsigned long) frame->mctx.tramp; regs->trap = 0; regs->result = 0; diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c --- a/arch/ppc64/kernel/smp.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/smp.c 2005-03-07 14:54:17 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -383,7 +384,7 @@ * For now we leave it which means the time can be some * number of msecs off until someone does a settimeofday() */ - do_gtod.tb_orig_stamp = tb_last_stamp; + do_gtod.varp->tb_orig_stamp = tb_last_stamp; systemcfg->tb_orig_stamp = tb_last_stamp; #endif @@ -406,17 +407,96 @@ current_set[boot_cpuid] = current->thread_info; } +#ifdef CONFIG_HOTPLUG_CPU +/* State of each CPU during hotplug phases */ +DEFINE_PER_CPU(int, cpu_state) = { 0 }; + +int generic_cpu_disable(void) +{ + unsigned int cpu = smp_processor_id(); + + if (cpu == boot_cpuid) + return -EBUSY; + + systemcfg->processorCount--; + cpu_clear(cpu, cpu_online_map); + fixup_irqs(cpu_online_map); + return 0; +} + +int generic_cpu_enable(unsigned int cpu) +{ + /* Do the normal bootup if we haven't + * already bootstrapped. */ + if (system_state != SYSTEM_RUNNING) + return -ENOSYS; + + /* get the target out of it's holding state */ + per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; + wmb(); + + while (!cpu_online(cpu)) + cpu_relax(); + + fixup_irqs(cpu_online_map); + /* counter the irq disable in fixup_irqs */ + local_irq_enable(); + return 0; +} + +void generic_cpu_die(unsigned int cpu) +{ + int i; + + for (i = 0; i < 100; i++) { + rmb(); + if (per_cpu(cpu_state, cpu) == CPU_DEAD) + return; + msleep(100); + } + printk(KERN_ERR "CPU%d didn't die...\n", cpu); +} + +void generic_mach_cpu_die(void) +{ + unsigned int cpu; + + local_irq_disable(); + cpu = smp_processor_id(); + printk(KERN_DEBUG "CPU%d offline\n", cpu); + __get_cpu_var(cpu_state) = CPU_DEAD; + wmb(); + while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) + cpu_relax(); + + flush_tlb_pending(); + cpu_set(cpu, cpu_online_map); + local_irq_enable(); +} +#endif + +static int __devinit cpu_enable(unsigned int cpu) +{ + if (smp_ops->cpu_enable) + return smp_ops->cpu_enable(cpu); + + return -ENOSYS; +} + int __devinit __cpu_up(unsigned int cpu) { int c; + if (!cpu_enable(cpu)) + return 0; + /* At boot, don't bother with non-present cpus -JSCHOPP */ if (system_state < SYSTEM_RUNNING && !cpu_present(cpu)) return -ENOENT; paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock; - if (!(cur_cpu_spec->cpu_features & CPU_FTR_SLB)) { + if (!cpu_has_feature(CPU_FTR_SLB)) { void *tmp; /* maximum of 48 CPUs on machines with a segment table */ diff -Nru a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c --- a/arch/ppc64/kernel/sysfs.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/kernel/sysfs.c 2005-03-07 14:54:16 -08:00 @@ -18,7 +18,7 @@ #include #include #include - +#include static DEFINE_PER_CPU(struct cpu, cpu_devices); @@ -63,7 +63,7 @@ unsigned int *val; unsigned int cpu; - if (!cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (!cpu_has_feature(CPU_FTR_SMT)) return 1; options = find_path_device("/options"); @@ -86,7 +86,7 @@ unsigned int cpu; int snooze; - if (!cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (!cpu_has_feature(CPU_FTR_SMT)) return 1; smt_snooze_cmdline = 1; @@ -167,7 +167,7 @@ * On SMT machines we have to set the run latch in the ctrl register * in order to make PMC6 spin. */ - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) { + if (cpu_has_feature(CPU_FTR_SMT)) { ctrl = mfspr(CTRLF); ctrl |= RUNLATCH; mtspr(CTRLT, ctrl); @@ -266,7 +266,7 @@ struct sys_device *s = &c->sysdev; #ifndef CONFIG_PPC_ISERIES - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_create_file(s, &attr_smt_snooze_delay); #endif @@ -275,7 +275,7 @@ sysdev_create_file(s, &attr_mmcr0); sysdev_create_file(s, &attr_mmcr1); - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA) + if (cpu_has_feature(CPU_FTR_MMCRA)) sysdev_create_file(s, &attr_mmcra); sysdev_create_file(s, &attr_pmc1); @@ -285,12 +285,12 @@ sysdev_create_file(s, &attr_pmc5); sysdev_create_file(s, &attr_pmc6); - if (cur_cpu_spec->cpu_features & CPU_FTR_PMC8) { + if (cpu_has_feature(CPU_FTR_PMC8)) { sysdev_create_file(s, &attr_pmc7); sysdev_create_file(s, &attr_pmc8); } - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_create_file(s, &attr_purr); } @@ -303,7 +303,7 @@ BUG_ON(c->no_control); #ifndef CONFIG_PPC_ISERIES - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_remove_file(s, &attr_smt_snooze_delay); #endif @@ -312,7 +312,7 @@ sysdev_remove_file(s, &attr_mmcr0); sysdev_remove_file(s, &attr_mmcr1); - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA) + if (cpu_has_feature(CPU_FTR_MMCRA)) sysdev_remove_file(s, &attr_mmcra); sysdev_remove_file(s, &attr_pmc1); @@ -322,12 +322,12 @@ sysdev_remove_file(s, &attr_pmc5); sysdev_remove_file(s, &attr_pmc6); - if (cur_cpu_spec->cpu_features & CPU_FTR_PMC8) { + if (cpu_has_feature(CPU_FTR_PMC8)) { sysdev_remove_file(s, &attr_pmc7); sysdev_remove_file(s, &attr_pmc8); } - if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) + if (cpu_has_feature(CPU_FTR_SMT)) sysdev_remove_file(s, &attr_purr); } #endif /* CONFIG_HOTPLUG_CPU */ @@ -413,9 +413,7 @@ * CPU. For instance, the boot cpu might never be valid * for hotplugging. */ -#ifdef CONFIG_HOTPLUG_CPU - if (systemcfg->platform != PLATFORM_PSERIES_LPAR) -#endif + if (!ppc_md.cpu_die) c->no_control = 1; if (cpu_online(cpu) || (c->no_control == 0)) { diff -Nru a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c --- a/arch/ppc64/kernel/time.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/kernel/time.c 2005-03-07 14:54:18 -08:00 @@ -85,9 +85,8 @@ unsigned long tb_ticks_per_jiffy; unsigned long tb_ticks_per_usec = 100; /* sane default */ +EXPORT_SYMBOL(tb_ticks_per_usec); unsigned long tb_ticks_per_sec; -unsigned long next_xtime_sync_tb; -unsigned long xtime_sync_interval; unsigned long tb_to_xs; unsigned tb_to_us; unsigned long processor_freq; @@ -158,8 +157,8 @@ * The conversion to microseconds at the end is done * without a divide (and in fact, without a multiply) */ - tb_ticks = tb_val - do_gtod.tb_orig_stamp; temp_varp = do_gtod.varp; + tb_ticks = tb_val - temp_varp->tb_orig_stamp; temp_tb_to_xs = temp_varp->tb_to_xs; temp_stamp_xsec = temp_varp->stamp_xsec; tb_xsec = mulhdu( tb_ticks, temp_tb_to_xs ); @@ -185,17 +184,55 @@ { struct timeval my_tv; - if (cur_tb > next_xtime_sync_tb) { - next_xtime_sync_tb = cur_tb + xtime_sync_interval; - __do_gettimeofday(&my_tv, cur_tb); - - if (xtime.tv_sec <= my_tv.tv_sec) { - xtime.tv_sec = my_tv.tv_sec; - xtime.tv_nsec = my_tv.tv_usec * 1000; - } + __do_gettimeofday(&my_tv, cur_tb); + + if (xtime.tv_sec <= my_tv.tv_sec) { + xtime.tv_sec = my_tv.tv_sec; + xtime.tv_nsec = my_tv.tv_usec * 1000; } } +/* + * When the timebase - tb_orig_stamp gets too big, we do a manipulation + * between tb_orig_stamp and stamp_xsec. The goal here is to keep the + * difference tb - tb_orig_stamp small enough to always fit inside a + * 32 bits number. This is a requirement of our fast 32 bits userland + * implementation in the vdso. If we "miss" a call to this function + * (interrupt latency, CPU locked in a spinlock, ...) and we end up + * with a too big difference, then the vdso will fallback to calling + * the syscall + */ +static __inline__ void timer_recalc_offset(unsigned long cur_tb) +{ + struct gettimeofday_vars * temp_varp; + unsigned temp_idx; + unsigned long offset, new_stamp_xsec, new_tb_orig_stamp; + + if (((cur_tb - do_gtod.varp->tb_orig_stamp) & 0x80000000u) == 0) + return; + + temp_idx = (do_gtod.var_idx == 0); + temp_varp = &do_gtod.vars[temp_idx]; + + new_tb_orig_stamp = cur_tb; + offset = new_tb_orig_stamp - do_gtod.varp->tb_orig_stamp; + new_stamp_xsec = do_gtod.varp->stamp_xsec + mulhdu(offset, do_gtod.varp->tb_to_xs); + + temp_varp->tb_to_xs = do_gtod.varp->tb_to_xs; + temp_varp->tb_orig_stamp = new_tb_orig_stamp; + temp_varp->stamp_xsec = new_stamp_xsec; + mb(); + do_gtod.varp = temp_varp; + do_gtod.var_idx = temp_idx; + + ++(systemcfg->tb_update_count); + wmb(); + systemcfg->tb_orig_stamp = new_tb_orig_stamp; + systemcfg->stamp_xsec = new_stamp_xsec; + wmb(); + ++(systemcfg->tb_update_count); +} + #ifdef CONFIG_SMP unsigned long profile_pc(struct pt_regs *regs) { @@ -311,6 +348,7 @@ if (cpu == boot_cpuid) { write_seqlock(&xtime_lock); tb_last_stamp = lpaca->next_jiffy_update_tb; + timer_recalc_offset(lpaca->next_jiffy_update_tb); do_timer(regs); timer_sync_xtime(lpaca->next_jiffy_update_tb); timer_check_rtc(); @@ -334,6 +372,14 @@ } #endif +/* collect purr register values often, for accurate calculations */ +#if defined(CONFIG_PPC_PSERIES) + if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { + struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); + cu->current_tb = mfspr(SPRN_PURR); + } +#endif + irq_exit(); return 1; @@ -398,7 +444,9 @@ time_maxerror = NTP_PHASE_LIMIT; time_esterror = NTP_PHASE_LIMIT; - delta_xsec = mulhdu( (tb_last_stamp-do_gtod.tb_orig_stamp), do_gtod.varp->tb_to_xs ); + delta_xsec = mulhdu( (tb_last_stamp-do_gtod.varp->tb_orig_stamp), + do_gtod.varp->tb_to_xs ); + new_xsec = (new_nsec * XSEC_PER_SEC) / NSEC_PER_SEC; new_xsec += new_sec * XSEC_PER_SEC; if ( new_xsec > delta_xsec ) { @@ -411,7 +459,7 @@ * before 1970 ... eg. we booted ten days ago, and we are setting * the time to Jan 5, 1970 */ do_gtod.varp->stamp_xsec = new_xsec; - do_gtod.tb_orig_stamp = tb_last_stamp; + do_gtod.varp->tb_orig_stamp = tb_last_stamp; systemcfg->stamp_xsec = new_xsec; systemcfg->tb_orig_stamp = tb_last_stamp; } @@ -464,9 +512,9 @@ xtime.tv_sec = mktime(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); tb_last_stamp = get_tb(); - do_gtod.tb_orig_stamp = tb_last_stamp; do_gtod.varp = &do_gtod.vars[0]; do_gtod.var_idx = 0; + do_gtod.varp->tb_orig_stamp = tb_last_stamp; do_gtod.varp->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC; do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; do_gtod.varp->tb_to_xs = tb_to_xs; @@ -477,9 +525,6 @@ systemcfg->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC; systemcfg->tb_to_xs = tb_to_xs; - xtime_sync_interval = tb_ticks_per_sec - (tb_ticks_per_sec/8); - next_xtime_sync_tb = tb_last_stamp + xtime_sync_interval; - time_freq = 0; xtime.tv_nsec = 0; @@ -584,12 +629,12 @@ stamp_xsec which is the time (in 1/2^20 second units) corresponding to tb_orig_stamp. This new value of stamp_xsec compensates for the change in frequency (implied by the new tb_to_xs) which guarantees that the current time remains the same */ - tb_ticks = get_tb() - do_gtod.tb_orig_stamp; + write_seqlock_irqsave( &xtime_lock, flags ); + tb_ticks = get_tb() - do_gtod.varp->tb_orig_stamp; div128_by_32( 1024*1024, 0, new_tb_ticks_per_sec, &divres ); new_tb_to_xs = divres.result_low; new_xsec = mulhdu( tb_ticks, new_tb_to_xs ); - write_seqlock_irqsave( &xtime_lock, flags ); old_xsec = mulhdu( tb_ticks, do_gtod.varp->tb_to_xs ); new_stamp_xsec = do_gtod.varp->stamp_xsec + old_xsec - new_xsec; @@ -597,16 +642,12 @@ values in do_gettimeofday. We alternate the copies and as long as a reasonable time elapses between changes, there will never be inconsistent values. ntpd has a minimum of one minute between updates */ - if (do_gtod.var_idx == 0) { - temp_varp = &do_gtod.vars[1]; - temp_idx = 1; - } - else { - temp_varp = &do_gtod.vars[0]; - temp_idx = 0; - } + temp_idx = (do_gtod.var_idx == 0); + temp_varp = &do_gtod.vars[temp_idx]; + temp_varp->tb_to_xs = new_tb_to_xs; temp_varp->stamp_xsec = new_stamp_xsec; + temp_varp->tb_orig_stamp = do_gtod.varp->tb_orig_stamp; mb(); do_gtod.varp = temp_varp; do_gtod.var_idx = temp_idx; diff -Nru a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c --- a/arch/ppc64/kernel/traps.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/kernel/traps.c 2005-03-07 14:54:17 -08:00 @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef CONFIG_DEBUGGER int (*__debugger)(struct pt_regs *regs); @@ -450,18 +451,7 @@ die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); } -/* Ensure exceptions are disabled */ -static void dummy_perf(struct pt_regs *regs) -{ - unsigned int mmcr0 = mfspr(SPRN_MMCR0); - - mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO); - mtspr(SPRN_MMCR0, mmcr0); -} - -void (*perf_irq)(struct pt_regs *) = dummy_perf; - -EXPORT_SYMBOL(perf_irq); +extern perf_irq_t perf_irq; void performance_monitor_exception(struct pt_regs *regs) { diff -Nru a/arch/ppc64/kernel/vdso.c b/arch/ppc64/kernel/vdso.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,614 @@ +/* + * linux/arch/ppc64/kernel/vdso.c + * + * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. + * + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef DEBUG + +#ifdef DEBUG +#define DBG(fmt...) printk(fmt) +#else +#define DBG(fmt...) +#endif + + +/* + * The vDSOs themselves are here + */ +extern char vdso64_start, vdso64_end; +extern char vdso32_start, vdso32_end; + +static void *vdso64_kbase = &vdso64_start; +static void *vdso32_kbase = &vdso32_start; + +unsigned int vdso64_pages; +unsigned int vdso32_pages; + +/* Signal trampolines user addresses */ + +unsigned long vdso64_rt_sigtramp; +unsigned long vdso32_sigtramp; +unsigned long vdso32_rt_sigtramp; + +/* Format of the patch table */ +struct vdso_patch_def +{ + u32 pvr_mask, pvr_value; + const char *gen_name; + const char *fix_name; +}; + +/* Table of functions to patch based on the CPU type/revision + * + * TODO: Improve by adding whole lists for each entry + */ +static struct vdso_patch_def vdso_patches[] = { + { + 0xffff0000, 0x003a0000, /* POWER5 */ + "__kernel_sync_dicache", "__kernel_sync_dicache_p5" + }, + { + 0xffff0000, 0x003b0000, /* POWER5 */ + "__kernel_sync_dicache", "__kernel_sync_dicache_p5" + }, +}; + +/* + * Some infos carried around for each of them during parsing at + * boot time. + */ +struct lib32_elfinfo +{ + Elf32_Ehdr *hdr; /* ptr to ELF */ + Elf32_Sym *dynsym; /* ptr to .dynsym section */ + unsigned long dynsymsize; /* size of .dynsym section */ + char *dynstr; /* ptr to .dynstr section */ + unsigned long text; /* offset of .text section in .so */ +}; + +struct lib64_elfinfo +{ + Elf64_Ehdr *hdr; + Elf64_Sym *dynsym; + unsigned long dynsymsize; + char *dynstr; + unsigned long text; +}; + + +#ifdef __DEBUG +static void dump_one_vdso_page(struct page *pg, struct page *upg) +{ + printk("kpg: %p (c:%d,f:%08lx)", __va(page_to_pfn(pg) << PAGE_SHIFT), + page_count(pg), + pg->flags); + if (upg/* && pg != upg*/) { + printk(" upg: %p (c:%d,f:%08lx)", __va(page_to_pfn(upg) << PAGE_SHIFT), + page_count(upg), + upg->flags); + } + printk("\n"); +} + +static void dump_vdso_pages(struct vm_area_struct * vma) +{ + int i; + + if (!vma || test_thread_flag(TIF_32BIT)) { + printk("vDSO32 @ %016lx:\n", (unsigned long)vdso32_kbase); + for (i=0; ivm_mm) ? + follow_page(vma->vm_mm, vma->vm_start + i*PAGE_SIZE, 0) + : NULL; + dump_one_vdso_page(pg, upg); + } + } + if (!vma || !test_thread_flag(TIF_32BIT)) { + printk("vDSO64 @ %016lx:\n", (unsigned long)vdso64_kbase); + for (i=0; ivm_mm) ? + follow_page(vma->vm_mm, vma->vm_start + i*PAGE_SIZE, 0) + : NULL; + dump_one_vdso_page(pg, upg); + } + } +} +#endif /* DEBUG */ + +/* + * Keep a dummy vma_close for now, it will prevent VMA merging. + */ +static void vdso_vma_close(struct vm_area_struct * vma) +{ +} + +/* + * Our nopage() function, maps in the actual vDSO kernel pages, they will + * be mapped read-only by do_no_page(), and eventually COW'ed, either + * right away for an initial write access, or by do_wp_page(). + */ +static struct page * vdso_vma_nopage(struct vm_area_struct * vma, + unsigned long address, int *type) +{ + unsigned long offset = address - vma->vm_start; + struct page *pg; + void *vbase = test_thread_flag(TIF_32BIT) ? vdso32_kbase : vdso64_kbase; + + DBG("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n", + current->comm, address, offset); + + if (address < vma->vm_start || address > vma->vm_end) + return NOPAGE_SIGBUS; + + /* + * Last page is systemcfg, special handling here, no get_page() a + * this is a reserved page + */ + if ((vma->vm_end - address) <= PAGE_SIZE) + return virt_to_page(systemcfg); + + pg = virt_to_page(vbase + offset); + get_page(pg); + DBG(" ->page count: %d\n", page_count(pg)); + + return pg; +} + +static struct vm_operations_struct vdso_vmops = { + .close = vdso_vma_close, + .nopage = vdso_vma_nopage, +}; + +/* + * This is called from binfmt_elf, we create the special vma for the + * vDSO and insert it into the mm struct tree + */ +int arch_setup_additional_pages(struct linux_binprm *bprm, int executable_stack) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + unsigned long vdso_pages; + unsigned long vdso_base; + + if (test_thread_flag(TIF_32BIT)) { + vdso_pages = vdso32_pages; + vdso_base = VDSO32_MBASE; + } else { + vdso_pages = vdso64_pages; + vdso_base = VDSO64_MBASE; + } + + /* vDSO has a problem and was disabled, just don't "enable" it for the + * process + */ + if (vdso_pages == 0) { + current->thread.vdso_base = 0; + return 0; + } + vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); + if (vma == NULL) + return -ENOMEM; + if (security_vm_enough_memory(vdso_pages)) { + kmem_cache_free(vm_area_cachep, vma); + return -ENOMEM; + } + memset(vma, 0, sizeof(*vma)); + + /* + * pick a base address for the vDSO in process space. We have a default + * base of 1Mb on which we had a random offset up to 1Mb. + * XXX: Add possibility for a program header to specify that location + */ + current->thread.vdso_base = vdso_base; + /* + ((unsigned long)vma & 0x000ff000); */ + + vma->vm_mm = mm; + vma->vm_start = current->thread.vdso_base; + + /* + * the VMA size is one page more than the vDSO since systemcfg + * is mapped in the last one + */ + vma->vm_end = vma->vm_start + ((vdso_pages + 1) << PAGE_SHIFT); + + /* + * our vma flags don't have VM_WRITE so by default, the process isn't allowed + * to write those pages. + * gdb can break that with ptrace interface, and thus trigger COW on those + * pages but it's then your responsibility to never do that on the "data" page + * of the vDSO or you'll stop getting kernel updates and your nice userland + * gettimeofday will be totally dead. It's fine to use that for setting + * breakpoints in the vDSO code pages though + */ + vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; + vma->vm_flags |= mm->def_flags; + vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; + vma->vm_ops = &vdso_vmops; + + down_write(&mm->mmap_sem); + insert_vm_struct(mm, vma); + mm->total_vm += (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; + up_write(&mm->mmap_sem); + + return 0; +} + +static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname, + unsigned long *size) +{ + Elf32_Shdr *sechdrs; + unsigned int i; + char *secnames; + + /* Grab section headers and strings so we can tell who is who */ + sechdrs = (void *)ehdr + ehdr->e_shoff; + secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; + + /* Find the section they want */ + for (i = 1; i < ehdr->e_shnum; i++) { + if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { + if (size) + *size = sechdrs[i].sh_size; + return (void *)ehdr + sechdrs[i].sh_offset; + } + } + *size = 0; + return NULL; +} + +static void * __init find_section64(Elf64_Ehdr *ehdr, const char *secname, + unsigned long *size) +{ + Elf64_Shdr *sechdrs; + unsigned int i; + char *secnames; + + /* Grab section headers and strings so we can tell who is who */ + sechdrs = (void *)ehdr + ehdr->e_shoff; + secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset; + + /* Find the section they want */ + for (i = 1; i < ehdr->e_shnum; i++) { + if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) { + if (size) + *size = sechdrs[i].sh_size; + return (void *)ehdr + sechdrs[i].sh_offset; + } + } + if (size) + *size = 0; + return NULL; +} + +static Elf32_Sym * __init find_symbol32(struct lib32_elfinfo *lib, const char *symname) +{ + unsigned int i; + char name[32], *c; + + for (i = 0; i < (lib->dynsymsize / sizeof(Elf32_Sym)); i++) { + if (lib->dynsym[i].st_name == 0) + continue; + strlcpy(name, lib->dynstr + lib->dynsym[i].st_name, 32); + c = strchr(name, '@'); + if (c) + *c = 0; + if (strcmp(symname, name) == 0) + return &lib->dynsym[i]; + } + return NULL; +} + +static Elf64_Sym * __init find_symbol64(struct lib64_elfinfo *lib, const char *symname) +{ + unsigned int i; + char name[32], *c; + + for (i = 0; i < (lib->dynsymsize / sizeof(Elf64_Sym)); i++) { + if (lib->dynsym[i].st_name == 0) + continue; + strlcpy(name, lib->dynstr + lib->dynsym[i].st_name, 32); + c = strchr(name, '@'); + if (c) + *c = 0; + if (strcmp(symname, name) == 0) + return &lib->dynsym[i]; + } + return NULL; +} + +/* Note that we assume the section is .text and the symbol is relative to + * the library base + */ +static unsigned long __init find_function32(struct lib32_elfinfo *lib, const char *symname) +{ + Elf32_Sym *sym = find_symbol32(lib, symname); + + if (sym == NULL) { + printk(KERN_WARNING "vDSO32: function %s not found !\n", symname); + return 0; + } + return sym->st_value - VDSO32_LBASE; +} + +/* Note that we assume the section is .text and the symbol is relative to + * the library base + */ +static unsigned long __init find_function64(struct lib64_elfinfo *lib, const char *symname) +{ + Elf64_Sym *sym = find_symbol64(lib, symname); + + if (sym == NULL) { + printk(KERN_WARNING "vDSO64: function %s not found !\n", symname); + return 0; + } +#ifdef VDS64_HAS_DESCRIPTORS + return *((u64 *)(vdso64_kbase + sym->st_value - VDSO64_LBASE)) - VDSO64_LBASE; +#else + return sym->st_value - VDSO64_LBASE; +#endif +} + + +static __init int vdso_do_find_sections(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + void *sect; + + /* + * Locate symbol tables & text section + */ + + v32->dynsym = find_section32(v32->hdr, ".dynsym", &v32->dynsymsize); + v32->dynstr = find_section32(v32->hdr, ".dynstr", NULL); + if (v32->dynsym == NULL || v32->dynstr == NULL) { + printk(KERN_ERR "vDSO32: a required symbol section was not found\n"); + return -1; + } + sect = find_section32(v32->hdr, ".text", NULL); + if (sect == NULL) { + printk(KERN_ERR "vDSO32: the .text section was not found\n"); + return -1; + } + v32->text = sect - vdso32_kbase; + + v64->dynsym = find_section64(v64->hdr, ".dynsym", &v64->dynsymsize); + v64->dynstr = find_section64(v64->hdr, ".dynstr", NULL); + if (v64->dynsym == NULL || v64->dynstr == NULL) { + printk(KERN_ERR "vDSO64: a required symbol section was not found\n"); + return -1; + } + sect = find_section64(v64->hdr, ".text", NULL); + if (sect == NULL) { + printk(KERN_ERR "vDSO64: the .text section was not found\n"); + return -1; + } + v64->text = sect - vdso64_kbase; + + return 0; +} + +static __init void vdso_setup_trampolines(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + /* + * Find signal trampolines + */ + + vdso64_rt_sigtramp = find_function64(v64, "__kernel_sigtramp_rt64"); + vdso32_sigtramp = find_function32(v32, "__kernel_sigtramp32"); + vdso32_rt_sigtramp = find_function32(v32, "__kernel_sigtramp_rt32"); +} + +static __init int vdso_fixup_datapage(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + Elf32_Sym *sym32; + Elf64_Sym *sym64; + + sym32 = find_symbol32(v32, "__kernel_datapage_offset"); + if (sym32 == NULL) { + printk(KERN_ERR "vDSO32: Can't find symbol __kernel_datapage_offset !\n"); + return -1; + } + *((int *)(vdso32_kbase + (sym32->st_value - VDSO32_LBASE))) = + (vdso32_pages << PAGE_SHIFT) - (sym32->st_value - VDSO32_LBASE); + + sym64 = find_symbol64(v64, "__kernel_datapage_offset"); + if (sym64 == NULL) { + printk(KERN_ERR "vDSO64: Can't find symbol __kernel_datapage_offset !\n"); + return -1; + } + *((int *)(vdso64_kbase + sym64->st_value - VDSO64_LBASE)) = + (vdso64_pages << PAGE_SHIFT) - (sym64->st_value - VDSO64_LBASE); + + return 0; +} + +static int vdso_do_func_patch32(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64, + const char *orig, const char *fix) +{ + Elf32_Sym *sym32_gen, *sym32_fix; + + sym32_gen = find_symbol32(v32, orig); + if (sym32_gen == NULL) { + printk(KERN_ERR "vDSO32: Can't find symbol %s !\n", orig); + return -1; + } + sym32_fix = find_symbol32(v32, fix); + if (sym32_fix == NULL) { + printk(KERN_ERR "vDSO32: Can't find symbol %s !\n", fix); + return -1; + } + sym32_gen->st_value = sym32_fix->st_value; + sym32_gen->st_size = sym32_fix->st_size; + sym32_gen->st_info = sym32_fix->st_info; + sym32_gen->st_other = sym32_fix->st_other; + sym32_gen->st_shndx = sym32_fix->st_shndx; + + return 0; +} + +static int vdso_do_func_patch64(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64, + const char *orig, const char *fix) +{ + Elf64_Sym *sym64_gen, *sym64_fix; + + sym64_gen = find_symbol64(v64, orig); + if (sym64_gen == NULL) { + printk(KERN_ERR "vDSO64: Can't find symbol %s !\n", orig); + return -1; + } + sym64_fix = find_symbol64(v64, fix); + if (sym64_fix == NULL) { + printk(KERN_ERR "vDSO64: Can't find symbol %s !\n", fix); + return -1; + } + sym64_gen->st_value = sym64_fix->st_value; + sym64_gen->st_size = sym64_fix->st_size; + sym64_gen->st_info = sym64_fix->st_info; + sym64_gen->st_other = sym64_fix->st_other; + sym64_gen->st_shndx = sym64_fix->st_shndx; + + return 0; +} + +static __init int vdso_fixup_alt_funcs(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64) +{ + u32 pvr; + int i; + + pvr = mfspr(SPRN_PVR); + for (i = 0; i < ARRAY_SIZE(vdso_patches); i++) { + struct vdso_patch_def *patch = &vdso_patches[i]; + int match = (pvr & patch->pvr_mask) == patch->pvr_value; + + DBG("patch %d (mask: %x, pvr: %x) : %s\n", + i, patch->pvr_mask, patch->pvr_value, match ? "match" : "skip"); + + if (!match) + continue; + + DBG("replacing %s with %s...\n", patch->gen_name, patch->fix_name); + + /* + * Patch the 32 bits and 64 bits symbols. Note that we do not patch + * the "." symbol on 64 bits. It would be easy to do, but doesn't + * seem to be necessary, patching the OPD symbol is enough. + */ + vdso_do_func_patch32(v32, v64, patch->gen_name, patch->fix_name); + vdso_do_func_patch64(v32, v64, patch->gen_name, patch->fix_name); + } + + return 0; +} + + +static __init int vdso_setup(void) +{ + struct lib32_elfinfo v32; + struct lib64_elfinfo v64; + + v32.hdr = vdso32_kbase; + v64.hdr = vdso64_kbase; + + if (vdso_do_find_sections(&v32, &v64)) + return -1; + + if (vdso_fixup_datapage(&v32, &v64)) + return -1; + + if (vdso_fixup_alt_funcs(&v32, &v64)) + return -1; + + vdso_setup_trampolines(&v32, &v64); + + return 0; +} + +void __init vdso_init(void) +{ + int i; + + vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; + vdso32_pages = (&vdso32_end - &vdso32_start) >> PAGE_SHIFT; + + DBG("vdso64_kbase: %p, 0x%x pages, vdso32_kbase: %p, 0x%x pages\n", + vdso64_kbase, vdso64_pages, vdso32_kbase, vdso32_pages); + + /* + * Initialize the vDSO images in memory, that is do necessary + * fixups of vDSO symbols, locate trampolines, etc... + */ + if (vdso_setup()) { + printk(KERN_ERR "vDSO setup failure, not enabled !\n"); + /* XXX should free pages here ? */ + vdso64_pages = vdso32_pages = 0; + return; + } + + /* Make sure pages are in the correct state */ + for (i = 0; i < vdso64_pages; i++) { + struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); + ClearPageReserved(pg); + get_page(pg); + } + for (i = 0; i < vdso32_pages; i++) { + struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); + ClearPageReserved(pg); + get_page(pg); + } +} + +int in_gate_area_no_task(unsigned long addr) +{ + return 0; +} + +int in_gate_area(struct task_struct *task, unsigned long addr) +{ + return 0; +} + +struct vm_area_struct *get_gate_vma(struct task_struct *tsk) +{ + return NULL; +} + diff -Nru a/arch/ppc64/kernel/vdso32/Makefile b/arch/ppc64/kernel/vdso32/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,36 @@ + +# List of files in the vdso, has to be asm only for now + +obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o + +# Build rules + +targets := $(obj-vdso32) vdso32.so +obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) + + +EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin +EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 +EXTRA_AFLAGS := -D__VDSO32__ -s + +obj-y += vdso32_wrapper.o +extra-y += vdso32.lds +CPPFLAGS_vdso32.lds += -P -C -U$(ARCH) + +# Force dependency (incbin is bad) +$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so + +# link rule for the .so file, .lds has to be first +$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) + $(call if_changed,vdso32ld) + +# assembly rules for the .S files +$(obj-vdso32): %.o: %.S + $(call if_changed_dep,vdso32as) + +# actual build commands +quiet_cmd_vdso32ld = VDSO32L $@ + cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ +quiet_cmd_vdso32as = VDSO32A $@ + cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< + diff -Nru a/arch/ppc64/kernel/vdso32/cacheflush.S b/arch/ppc64/kernel/vdso32/cacheflush.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/cacheflush.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,65 @@ +/* + * vDSO provided cache flush routines + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * 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 + + .text + +/* + * Default "generic" version of __kernel_sync_dicache. + * + * void __kernel_sync_dicache(unsigned long start, unsigned long end) + * + * Flushes the data cache & invalidate the instruction cache for the + * provided range [start, end[ + * + * Note: all CPUs supported by this kernel have a 128 bytes cache + * line size so we don't have to peek that info from the datapage + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache) + .cfi_startproc + li r5,127 + andc r6,r3,r5 /* round low to line bdy */ + subf r8,r6,r4 /* compute length */ + add r8,r8,r5 /* ensure we get enough */ + srwi. r8,r8,7 /* compute line count */ + beqlr /* nothing to do? */ + mtctr r8 + mr r3,r6 +1: dcbst 0,r3 + addi r3,r3,128 + bdnz 1b + sync + mtctr r8 +1: icbi 0,r6 + addi r6,r6,128 + bdnz 1b + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache) + + +/* + * POWER5 version of __kernel_sync_dicache + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache_p5) + .cfi_startproc + sync + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache_p5) + diff -Nru a/arch/ppc64/kernel/vdso32/datapage.S b/arch/ppc64/kernel/vdso32/datapage.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/datapage.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,68 @@ +/* + * Access to the shared data page by the vDSO & syscall map + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * + * 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 +#include + + .text +V_FUNCTION_BEGIN(__get_datapage) + .cfi_startproc + /* We don't want that exposed or overridable as we want other objects + * to be able to bl directly to here + */ + .protected __get_datapage + .hidden __get_datapage + + mflr r0 + .cfi_register lr,r0 + + bcl 20,31,1f + .global __kernel_datapage_offset; +__kernel_datapage_offset: + .long 0 +1: + mflr r3 + mtlr r0 + lwz r0,0(r3) + add r3,r0,r3 + blr + .cfi_endproc +V_FUNCTION_END(__get_datapage) + +/* + * void *__kernel_get_syscall_map(unsigned int *syscall_count) ; + * + * returns a pointer to the syscall map. the map is agnostic to the + * size of "long", unlike kernel bitops, it stores bits from top to + * bottom so that memory actually contains a linear bitmap + * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of + * 32 bits int at N >> 5. + */ +V_FUNCTION_BEGIN(__kernel_get_syscall_map) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r4,r3 + bl __get_datapage + mtlr r12 + addi r3,r3,CFG_SYSCALL_MAP32 + cmpli cr0,r4,0 + beqlr + li r0,__NR_syscalls + stw r0,0(r4) + blr + .cfi_endproc +V_FUNCTION_END(__kernel_get_syscall_map) diff -Nru a/arch/ppc64/kernel/vdso32/gettimeofday.S b/arch/ppc64/kernel/vdso32/gettimeofday.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/gettimeofday.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,139 @@ +/* + * Userland implementation of gettimeofday() for 32 bits processes in a + * ppc64 kernel for use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * + * 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 +#include + + .text +/* + * Exact prototype of gettimeofday + * + * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz); + * + */ +V_FUNCTION_BEGIN(__kernel_gettimeofday) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r10,r3 /* r10 saves tv */ + mr r11,r4 /* r11 saves tz */ + bl __get_datapage /* get data page */ + mr r9, r3 /* datapage ptr in r9 */ + bl __do_get_xsec /* get xsec from tb & kernel */ + bne- 2f /* out of line -> do syscall */ + + /* seconds are xsec >> 20 */ + rlwinm r5,r4,12,20,31 + rlwimi r5,r3,12,0,19 + stw r5,TVAL32_TV_SEC(r10) + + /* get remaining xsec and convert to usec. we scale + * up remaining xsec by 12 bits and get the top 32 bits + * of the multiplication + */ + rlwinm r5,r4,12,0,19 + lis r6,1000000@h + ori r6,r6,1000000@l + mulhwu r5,r5,r6 + stw r5,TVAL32_TV_USEC(r10) + + cmpli cr0,r11,0 /* check if tz is NULL */ + beq 1f + lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */ + lwz r5,CFG_TZ_DSTTIME(r9) + stw r4,TZONE_TZ_MINWEST(r11) + stw r5,TZONE_TZ_DSTTIME(r11) + +1: mtlr r12 + blr + +2: mr r3,r10 + mr r4,r11 + li r0,__NR_gettimeofday + sc + b 1b + .cfi_endproc +V_FUNCTION_END(__kernel_gettimeofday) + +/* + * This is the core of gettimeofday(), it returns the xsec + * value in r3 & r4 and expects the datapage ptr (non clobbered) + * in r9. clobbers r0,r4,r5,r6,r7,r8 +*/ +__do_get_xsec: + .cfi_startproc + /* Check for update count & load values. We use the low + * order 32 bits of the update count + */ +1: lwz r8,(CFG_TB_UPDATE_COUNT+4)(r9) + andi. r0,r8,1 /* pending update ? loop */ + bne- 1b + xor r0,r8,r8 /* create dependency */ + add r9,r9,r0 + + /* Load orig stamp (offset to TB) */ + lwz r5,CFG_TB_ORIG_STAMP(r9) + lwz r6,(CFG_TB_ORIG_STAMP+4)(r9) + + /* Get a stable TB value */ +2: mftbu r3 + mftbl r4 + mftbu r0 + cmpl cr0,r3,r0 + bne- 2b + + /* Substract tb orig stamp. If the high part is non-zero, we jump to the + * slow path which call the syscall. If it's ok, then we have our 32 bits + * tb_ticks value in r7 + */ + subfc r7,r6,r4 + subfe. r0,r5,r3 + bne- 3f + + /* Load scale factor & do multiplication */ + lwz r5,CFG_TB_TO_XS(r9) /* load values */ + lwz r6,(CFG_TB_TO_XS+4)(r9) + mulhwu r4,r7,r5 + mulhwu r6,r7,r6 + mullw r6,r7,r5 + addc r6,r6,r0 + + /* At this point, we have the scaled xsec value in r4 + XER:CA + * we load & add the stamp since epoch + */ + lwz r5,CFG_STAMP_XSEC(r9) + lwz r6,(CFG_STAMP_XSEC+4)(r9) + adde r4,r4,r6 + addze r3,r5 + + /* We now have our result in r3,r4. We create a fake dependency + * on that result and re-check the counter + */ + xor r0,r4,r4 + add r9,r9,r0 + lwz r0,(CFG_TB_UPDATE_COUNT+4)(r9) + cmpl cr0,r8,r0 /* check if updated */ + bne- 1b + + /* Warning ! The caller expects CR:EQ to be set to indicate a + * successful calculation (so it won't fallback to the syscall + * method). We have overriden that CR bit in the counter check, + * but fortunately, the loop exit condition _is_ CR:EQ set, so + * we can exit safely here. If you change this code, be careful + * of that side effect. + */ +3: blr + .cfi_endproc diff -Nru a/arch/ppc64/kernel/vdso32/sigtramp.S b/arch/ppc64/kernel/vdso32/sigtramp.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/sigtramp.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,300 @@ +/* + * Signal trampolines for 32 bits processes in a ppc64 kernel for + * use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * Copyright (C) 2004 Alan Modra (amodra@au.ibm.com)), IBM Corp. + * + * 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 + + .text + +/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from + the return address to get an address in the middle of the presumed + call instruction. Since we don't have a call here, we artifically + extend the range covered by the unwind info by adding a nop before + the real start. */ + nop +V_FUNCTION_BEGIN(__kernel_sigtramp32) +.Lsig_start = . - 4 + li r0,__NR_sigreturn + sc +.Lsig_end: +V_FUNCTION_END(__kernel_sigtramp32) + +.Lsigrt_start: + nop +V_FUNCTION_BEGIN(__kernel_sigtramp_rt32) + li r0,__NR_rt_sigreturn + sc +.Lsigrt_end: +V_FUNCTION_END(__kernel_sigtramp_rt32) + + .section .eh_frame,"a",@progbits + +/* Register r1 can be found at offset 4 of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define cfa_save \ + .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 RSIZE; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ +9: + +/* Register REGNO can be found at offset OFS of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define rsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .ifne ofs; \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ + .endif; \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. The VMX reg struct is at offset VREGS of + the pt_regs struct. This macro is for REGNO == 0, and contains + 'subroutines' that the other macros jump to. */ +#define vsave_msr0(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit0 */ \ +2: \ + .byte 0x40; /* DW_OP_lit16 */ \ + .byte 0x1e; /* DW_OP_mul */ \ +3: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x12; /* DW_OP_dup */ \ + .byte 0x23; /* DW_OP_plus_uconst */ \ + .uleb128 33*RSIZE; /* msr offset */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x0c; .long 1 << 25; /* DW_OP_const4u */ \ + .byte 0x1a; /* DW_OP_and */ \ + .byte 0x12; /* DW_OP_dup, ret 0 if bra taken */ \ + .byte 0x30; /* DW_OP_lit0 */ \ + .byte 0x29; /* DW_OP_eq */ \ + .byte 0x28; .short 0x7fff; /* DW_OP_bra to end */ \ + .byte 0x13; /* DW_OP_drop, pop the 0 */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x22; /* DW_OP_plus */ \ + .byte 0x2f; .short 0x7fff; /* DW_OP_skip to end */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. REGNO is 1 thru 31. */ +#define vsave_msr1(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit n */ \ + .byte 0x2f; .short 2b - 9f; /* DW_OP_skip */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset OFS of + the VMX save block. */ +#define vsave_msr2(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x0a; .short ofs; /* DW_OP_const2u */ \ + .byte 0x2f; .short 3b - 9f; /* DW_OP_skip */ \ +9: + +/* VMX register REGNO is at offset OFS of the VMX save area. */ +#define vsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ +9: + +/* This is where the pt_regs pointer can be found on the stack. */ +#define PTREGS 64+28 + +/* Size of regs. */ +#define RSIZE 4 + +/* This is the offset of the VMX regs. */ +#define VREGS 48*RSIZE+34*8 + +/* Describe where general purpose regs are saved. */ +#define EH_FRAME_GEN \ + cfa_save; \ + rsave ( 0, 0*RSIZE); \ + rsave ( 2, 2*RSIZE); \ + rsave ( 3, 3*RSIZE); \ + rsave ( 4, 4*RSIZE); \ + rsave ( 5, 5*RSIZE); \ + rsave ( 6, 6*RSIZE); \ + rsave ( 7, 7*RSIZE); \ + rsave ( 8, 8*RSIZE); \ + rsave ( 9, 9*RSIZE); \ + rsave (10, 10*RSIZE); \ + rsave (11, 11*RSIZE); \ + rsave (12, 12*RSIZE); \ + rsave (13, 13*RSIZE); \ + rsave (14, 14*RSIZE); \ + rsave (15, 15*RSIZE); \ + rsave (16, 16*RSIZE); \ + rsave (17, 17*RSIZE); \ + rsave (18, 18*RSIZE); \ + rsave (19, 19*RSIZE); \ + rsave (20, 20*RSIZE); \ + rsave (21, 21*RSIZE); \ + rsave (22, 22*RSIZE); \ + rsave (23, 23*RSIZE); \ + rsave (24, 24*RSIZE); \ + rsave (25, 25*RSIZE); \ + rsave (26, 26*RSIZE); \ + rsave (27, 27*RSIZE); \ + rsave (28, 28*RSIZE); \ + rsave (29, 29*RSIZE); \ + rsave (30, 30*RSIZE); \ + rsave (31, 31*RSIZE); \ + rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ + rsave (65, 36*RSIZE); /* lr */ \ + rsave (70, 38*RSIZE) /* cr */ + +/* Describe where the FP regs are saved. */ +#define EH_FRAME_FP \ + rsave (32, 48*RSIZE + 0*8); \ + rsave (33, 48*RSIZE + 1*8); \ + rsave (34, 48*RSIZE + 2*8); \ + rsave (35, 48*RSIZE + 3*8); \ + rsave (36, 48*RSIZE + 4*8); \ + rsave (37, 48*RSIZE + 5*8); \ + rsave (38, 48*RSIZE + 6*8); \ + rsave (39, 48*RSIZE + 7*8); \ + rsave (40, 48*RSIZE + 8*8); \ + rsave (41, 48*RSIZE + 9*8); \ + rsave (42, 48*RSIZE + 10*8); \ + rsave (43, 48*RSIZE + 11*8); \ + rsave (44, 48*RSIZE + 12*8); \ + rsave (45, 48*RSIZE + 13*8); \ + rsave (46, 48*RSIZE + 14*8); \ + rsave (47, 48*RSIZE + 15*8); \ + rsave (48, 48*RSIZE + 16*8); \ + rsave (49, 48*RSIZE + 17*8); \ + rsave (50, 48*RSIZE + 18*8); \ + rsave (51, 48*RSIZE + 19*8); \ + rsave (52, 48*RSIZE + 20*8); \ + rsave (53, 48*RSIZE + 21*8); \ + rsave (54, 48*RSIZE + 22*8); \ + rsave (55, 48*RSIZE + 23*8); \ + rsave (56, 48*RSIZE + 24*8); \ + rsave (57, 48*RSIZE + 25*8); \ + rsave (58, 48*RSIZE + 26*8); \ + rsave (59, 48*RSIZE + 27*8); \ + rsave (60, 48*RSIZE + 28*8); \ + rsave (61, 48*RSIZE + 29*8); \ + rsave (62, 48*RSIZE + 30*8); \ + rsave (63, 48*RSIZE + 31*8) + +/* Describe where the VMX regs are saved. */ +#ifdef CONFIG_ALTIVEC +#define EH_FRAME_VMX \ + vsave_msr0 ( 0); \ + vsave_msr1 ( 1); \ + vsave_msr1 ( 2); \ + vsave_msr1 ( 3); \ + vsave_msr1 ( 4); \ + vsave_msr1 ( 5); \ + vsave_msr1 ( 6); \ + vsave_msr1 ( 7); \ + vsave_msr1 ( 8); \ + vsave_msr1 ( 9); \ + vsave_msr1 (10); \ + vsave_msr1 (11); \ + vsave_msr1 (12); \ + vsave_msr1 (13); \ + vsave_msr1 (14); \ + vsave_msr1 (15); \ + vsave_msr1 (16); \ + vsave_msr1 (17); \ + vsave_msr1 (18); \ + vsave_msr1 (19); \ + vsave_msr1 (20); \ + vsave_msr1 (21); \ + vsave_msr1 (22); \ + vsave_msr1 (23); \ + vsave_msr1 (24); \ + vsave_msr1 (25); \ + vsave_msr1 (26); \ + vsave_msr1 (27); \ + vsave_msr1 (28); \ + vsave_msr1 (29); \ + vsave_msr1 (30); \ + vsave_msr1 (31); \ + vsave_msr2 (33, 32*16+12); \ + vsave (32, 32*16) +#else +#define EH_FRAME_VMX +#endif + +.Lcie: + .long .Lcie_end - .Lcie_start +.Lcie_start: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NUL-terminated augmentation string */ + .uleb128 4 /* Code alignment factor */ + .sleb128 -4 /* Data alignment factor */ + .byte 67 /* Return address register column, ap */ + .uleb128 1 /* Augmentation value length */ + .byte 0x1b /* DW_EH_PE_pcrel | DW_EH_PE_sdata4. */ + .byte 0x0c,1,0 /* DW_CFA_def_cfa: r1 ofs 0 */ + .balign 4 +.Lcie_end: + + .long .Lfde0_end - .Lfde0_start +.Lfde0_start: + .long .Lfde0_start - .Lcie /* CIE pointer. */ + .long .Lsig_start - . /* PC start, length */ + .long .Lsig_end - .Lsig_start + .uleb128 0 /* Augmentation */ + EH_FRAME_GEN + EH_FRAME_FP + EH_FRAME_VMX + .balign 4 +.Lfde0_end: + +/* We have a different stack layout for rt_sigreturn. */ +#undef PTREGS +#define PTREGS 64+16+128+20+28 + + .long .Lfde1_end - .Lfde1_start +.Lfde1_start: + .long .Lfde1_start - .Lcie /* CIE pointer. */ + .long .Lsigrt_start - . /* PC start, length */ + .long .Lsigrt_end - .Lsigrt_start + .uleb128 0 /* Augmentation */ + EH_FRAME_GEN + EH_FRAME_FP + EH_FRAME_VMX + .balign 4 +.Lfde1_end: diff -Nru a/arch/ppc64/kernel/vdso32/vdso32.lds.S b/arch/ppc64/kernel/vdso32/vdso32.lds.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/vdso32.lds.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,111 @@ + +/* + * This is the infamous ld script for the 32 bits vdso + * library + */ +#include + +/* Default link addresses for the vDSOs */ +OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") +OUTPUT_ARCH(powerpc:common) +ENTRY(_start) + +SECTIONS +{ + . = VDSO32_LBASE + SIZEOF_HEADERS; + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + + . = ALIGN (16); + .text : + { + *(.text .stub .text.* .gnu.linkonce.t.*) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + + /* Other stuff is appended to the text segment: */ + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + + .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr + .eh_frame : { KEEP (*(.eh_frame)) } :text + .gcc_except_table : { *(.gcc_except_table) } + .fixup : { *(.fixup) } + + .got ALIGN(4) : { *(.got.plt) *(.got) } + + .dynamic : { *(.dynamic) } :text :dynamic + + _end = .; + __end = .; + PROVIDE (end = .); + + + /* Stabs debugging sections are here too + */ + .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) } + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + + /DISCARD/ : { *(.note.GNU-stack) } + /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) } + /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } +} + + +PHDRS +{ + text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ + dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ + eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ +} + + +/* + * This controls what symbols we export from the DSO. + */ +VERSION +{ + VDSO_VERSION_STRING { + global: + __kernel_datapage_offset; /* Has to be there for the kernel to find it */ + __kernel_get_syscall_map; + __kernel_gettimeofday; + __kernel_sync_dicache; + __kernel_sync_dicache_p5; + __kernel_sigtramp32; + __kernel_sigtramp_rt32; + local: *; + }; +} diff -Nru a/arch/ppc64/kernel/vdso32/vdso32_wrapper.S b/arch/ppc64/kernel/vdso32/vdso32_wrapper.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso32/vdso32_wrapper.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,13 @@ +#include +#include + + .section ".data.page_aligned" + + .globl vdso32_start, vdso32_end + .balign PAGE_SIZE +vdso32_start: + .incbin "arch/ppc64/kernel/vdso32/vdso32.so" + .balign PAGE_SIZE +vdso32_end: + + .previous diff -Nru a/arch/ppc64/kernel/vdso64/Makefile b/arch/ppc64/kernel/vdso64/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,35 @@ +# List of files in the vdso, has to be asm only for now + +obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o + +# Build rules + +targets := $(obj-vdso64) vdso64.so +obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) + +EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin +EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 +EXTRA_AFLAGS := -D__VDSO64__ -s + +obj-y += vdso64_wrapper.o +extra-y += vdso64.lds +CPPFLAGS_vdso64.lds += -P -C -U$(ARCH) + +# Force dependency (incbin is bad) +$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so + +# link rule for the .so file, .lds has to be first +$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) + $(call if_changed,vdso64ld) + +# assembly rules for the .S files +$(obj-vdso64): %.o: %.S + $(call if_changed_dep,vdso64as) + +# actual build commands +quiet_cmd_vdso64ld = VDSO64L $@ + cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ +quiet_cmd_vdso64as = VDSO64A $@ + cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< + + diff -Nru a/arch/ppc64/kernel/vdso64/cacheflush.S b/arch/ppc64/kernel/vdso64/cacheflush.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/cacheflush.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,64 @@ +/* + * vDSO provided cache flush routines + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * 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 + + .text + +/* + * Default "generic" version of __kernel_sync_dicache. + * + * void __kernel_sync_dicache(unsigned long start, unsigned long end) + * + * Flushes the data cache & invalidate the instruction cache for the + * provided range [start, end[ + * + * Note: all CPUs supported by this kernel have a 128 bytes cache + * line size so we don't have to peek that info from the datapage + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache) + .cfi_startproc + li r5,127 + andc r6,r3,r5 /* round low to line bdy */ + subf r8,r6,r4 /* compute length */ + add r8,r8,r5 /* ensure we get enough */ + srwi. r8,r8,7 /* compute line count */ + beqlr /* nothing to do? */ + mtctr r8 + mr r3,r6 +1: dcbst 0,r3 + addi r3,r3,128 + bdnz 1b + sync + mtctr r8 +1: icbi 0,r6 + addi r6,r6,128 + bdnz 1b + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache) + + +/* + * POWER5 version of __kernel_sync_dicache + */ +V_FUNCTION_BEGIN(__kernel_sync_dicache_p5) + .cfi_startproc + sync + isync + blr + .cfi_endproc +V_FUNCTION_END(__kernel_sync_dicache_p5) diff -Nru a/arch/ppc64/kernel/vdso64/datapage.S b/arch/ppc64/kernel/vdso64/datapage.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/datapage.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,68 @@ +/* + * Access to the shared data page by the vDSO & syscall map + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * + * 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 +#include + + .text +V_FUNCTION_BEGIN(__get_datapage) + .cfi_startproc + /* We don't want that exposed or overridable as we want other objects + * to be able to bl directly to here + */ + .protected __get_datapage + .hidden __get_datapage + + mflr r0 + .cfi_register lr,r0 + + bcl 20,31,1f + .global __kernel_datapage_offset; +__kernel_datapage_offset: + .long 0 +1: + mflr r3 + mtlr r0 + lwz r0,0(r3) + add r3,r0,r3 + blr + .cfi_endproc +V_FUNCTION_END(__get_datapage) + +/* + * void *__kernel_get_syscall_map(unsigned int *syscall_count) ; + * + * returns a pointer to the syscall map. the map is agnostic to the + * size of "long", unlike kernel bitops, it stores bits from top to + * bottom so that memory actually contains a linear bitmap + * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of + * 32 bits int at N >> 5. + */ +V_FUNCTION_BEGIN(__kernel_get_syscall_map) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r4,r3 + bl V_LOCAL_FUNC(__get_datapage) + mtlr r12 + addi r3,r3,CFG_SYSCALL_MAP64 + cmpli cr0,r4,0 + beqlr + li r0,__NR_syscalls + stw r0,0(r4) + blr + .cfi_endproc +V_FUNCTION_END(__kernel_get_syscall_map) diff -Nru a/arch/ppc64/kernel/vdso64/gettimeofday.S b/arch/ppc64/kernel/vdso64/gettimeofday.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/gettimeofday.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,91 @@ +/* + * Userland implementation of gettimeofday() for 64 bits processes in a + * ppc64 kernel for use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), + * IBM Corp. + * + * 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 + + .text +/* + * Exact prototype of gettimeofday + * + * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz); + * + */ +V_FUNCTION_BEGIN(__kernel_gettimeofday) + .cfi_startproc + mflr r12 + .cfi_register lr,r12 + + mr r11,r3 /* r11 holds tv */ + mr r10,r4 /* r10 holds tz */ + bl V_LOCAL_FUNC(__get_datapage) /* get data page */ + bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */ + lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */ + ori r7,r7,16960 + rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */ + rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */ + std r5,TVAL64_TV_SEC(r11) /* store sec in tv */ + subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */ + mulld r0,r0,r7 /* usec = (xsec * USEC_PER_SEC) / XSEC_PER_SEC */ + rldicl r0,r0,44,20 + cmpldi cr0,r10,0 /* check if tz is NULL */ + std r0,TVAL64_TV_USEC(r11) /* store usec in tv */ + beq 1f + lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */ + lwz r5,CFG_TZ_DSTTIME(r3) + stw r4,TZONE_TZ_MINWEST(r10) + stw r5,TZONE_TZ_DSTTIME(r10) +1: mtlr r12 + li r3,0 /* always success */ + blr + .cfi_endproc +V_FUNCTION_END(__kernel_gettimeofday) + + +/* + * This is the core of gettimeofday(), it returns the xsec + * value in r4 and expects the datapage ptr (non clobbered) + * in r3. clobbers r0,r4,r5,r6,r7,r8 +*/ +V_FUNCTION_BEGIN(__do_get_xsec) + .cfi_startproc + /* check for update count & load values */ +1: ld r7,CFG_TB_UPDATE_COUNT(r3) + andi. r0,r4,1 /* pending update ? loop */ + bne- 1b + xor r0,r4,r4 /* create dependency */ + add r3,r3,r0 + + /* Get TB & offset it */ + mftb r8 + ld r9,CFG_TB_ORIG_STAMP(r3) + subf r8,r9,r8 + + /* Scale result */ + ld r5,CFG_TB_TO_XS(r3) + mulhdu r8,r8,r5 + + /* Add stamp since epoch */ + ld r6,CFG_STAMP_XSEC(r3) + add r4,r6,r8 + + xor r0,r4,r4 + add r3,r3,r0 + ld r0,CFG_TB_UPDATE_COUNT(r3) + cmpld cr0,r0,r7 /* check if updated */ + bne- 1b + blr + .cfi_endproc +V_FUNCTION_END(__do_get_xsec) diff -Nru a/arch/ppc64/kernel/vdso64/sigtramp.S b/arch/ppc64/kernel/vdso64/sigtramp.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/sigtramp.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,294 @@ +/* + * Signal trampoline for 64 bits processes in a ppc64 kernel for + * use in the vDSO + * + * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp. + * Copyright (C) 2004 Alan Modra (amodra@au.ibm.com)), IBM Corp. + * + * 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 + + .text + +/* The nop here is a hack. The dwarf2 unwind routines subtract 1 from + the return address to get an address in the middle of the presumed + call instruction. Since we don't have a call here, we artifically + extend the range covered by the unwind info by padding before the + real start. */ + nop + .balign 8 +V_FUNCTION_BEGIN(__kernel_sigtramp_rt64) +.Lsigrt_start = . - 4 + addi r1, r1, __SIGNAL_FRAMESIZE + li r0,__NR_rt_sigreturn + sc +.Lsigrt_end: +V_FUNCTION_END(__kernel_sigtramp_rt64) +/* The ".balign 8" above and the following zeros mimic the old stack + trampoline layout. The last magic value is the ucontext pointer, + chosen in such a way that older libgcc unwind code returns a zero + for a sigcontext pointer. */ + .long 0,0,0 + .quad 0,-21*8 + +/* Register r1 can be found at offset 8 of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define cfa_save \ + .byte 0x0f; /* DW_CFA_def_cfa_expression */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 RSIZE; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ +9: + +/* Register REGNO can be found at offset OFS of a pt_regs structure. + A pointer to the pt_regs is stored in memory at the old sp plus PTREGS. */ +#define rsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .ifne ofs; \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ + .endif; \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. A pointer to the VMX reg struct is at VREGS in + the pt_regs struct. This macro is for REGNO == 0, and contains + 'subroutines' that the other macros jump to. */ +#define vsave_msr0(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit0 */ \ +2: \ + .byte 0x40; /* DW_OP_lit16 */ \ + .byte 0x1e; /* DW_OP_mul */ \ +3: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x12; /* DW_OP_dup */ \ + .byte 0x23; /* DW_OP_plus_uconst */ \ + .uleb128 33*RSIZE; /* msr offset */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x0c; .long 1 << 25; /* DW_OP_const4u */ \ + .byte 0x1a; /* DW_OP_and */ \ + .byte 0x12; /* DW_OP_dup, ret 0 if bra taken */ \ + .byte 0x30; /* DW_OP_lit0 */ \ + .byte 0x29; /* DW_OP_eq */ \ + .byte 0x28; .short 0x7fff; /* DW_OP_bra to end */ \ + .byte 0x13; /* DW_OP_drop, pop the 0 */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x22; /* DW_OP_plus */ \ + .byte 0x2f; .short 0x7fff; /* DW_OP_skip to end */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset REGNO*16 + of the VMX reg struct. REGNO is 1 thru 31. */ +#define vsave_msr1(regno) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x30 + regno; /* DW_OP_lit n */ \ + .byte 0x2f; .short 2b - 9f; /* DW_OP_skip */ \ +9: + +/* If msr bit 1<<25 is set, then VMX register REGNO is at offset OFS of + the VMX save block. */ +#define vsave_msr2(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x0a; .short ofs; /* DW_OP_const2u */ \ + .byte 0x2f; .short 3b - 9f; /* DW_OP_skip */ \ +9: + +/* VMX register REGNO is at offset OFS of the VMX save area. */ +#define vsave(regno, ofs) \ + .byte 0x10; /* DW_CFA_expression */ \ + .uleb128 regno + 77; /* regno */ \ + .uleb128 9f - 1f; /* length */ \ +1: \ + .byte 0x71; .sleb128 PTREGS; /* DW_OP_breg1 */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 VREGS; /* DW_OP_plus_uconst */ \ + .byte 0x06; /* DW_OP_deref */ \ + .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \ +9: + +/* This is where the pt_regs pointer can be found on the stack. */ +#define PTREGS 128+168+56 + +/* Size of regs. */ +#define RSIZE 8 + +/* This is the offset of the VMX reg pointer. */ +#define VREGS 48*RSIZE+33*8 + +/* Describe where general purpose regs are saved. */ +#define EH_FRAME_GEN \ + cfa_save; \ + rsave ( 0, 0*RSIZE); \ + rsave ( 2, 2*RSIZE); \ + rsave ( 3, 3*RSIZE); \ + rsave ( 4, 4*RSIZE); \ + rsave ( 5, 5*RSIZE); \ + rsave ( 6, 6*RSIZE); \ + rsave ( 7, 7*RSIZE); \ + rsave ( 8, 8*RSIZE); \ + rsave ( 9, 9*RSIZE); \ + rsave (10, 10*RSIZE); \ + rsave (11, 11*RSIZE); \ + rsave (12, 12*RSIZE); \ + rsave (13, 13*RSIZE); \ + rsave (14, 14*RSIZE); \ + rsave (15, 15*RSIZE); \ + rsave (16, 16*RSIZE); \ + rsave (17, 17*RSIZE); \ + rsave (18, 18*RSIZE); \ + rsave (19, 19*RSIZE); \ + rsave (20, 20*RSIZE); \ + rsave (21, 21*RSIZE); \ + rsave (22, 22*RSIZE); \ + rsave (23, 23*RSIZE); \ + rsave (24, 24*RSIZE); \ + rsave (25, 25*RSIZE); \ + rsave (26, 26*RSIZE); \ + rsave (27, 27*RSIZE); \ + rsave (28, 28*RSIZE); \ + rsave (29, 29*RSIZE); \ + rsave (30, 30*RSIZE); \ + rsave (31, 31*RSIZE); \ + rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ + rsave (65, 36*RSIZE); /* lr */ \ + rsave (70, 38*RSIZE) /* cr */ + +/* Describe where the FP regs are saved. */ +#define EH_FRAME_FP \ + rsave (32, 48*RSIZE + 0*8); \ + rsave (33, 48*RSIZE + 1*8); \ + rsave (34, 48*RSIZE + 2*8); \ + rsave (35, 48*RSIZE + 3*8); \ + rsave (36, 48*RSIZE + 4*8); \ + rsave (37, 48*RSIZE + 5*8); \ + rsave (38, 48*RSIZE + 6*8); \ + rsave (39, 48*RSIZE + 7*8); \ + rsave (40, 48*RSIZE + 8*8); \ + rsave (41, 48*RSIZE + 9*8); \ + rsave (42, 48*RSIZE + 10*8); \ + rsave (43, 48*RSIZE + 11*8); \ + rsave (44, 48*RSIZE + 12*8); \ + rsave (45, 48*RSIZE + 13*8); \ + rsave (46, 48*RSIZE + 14*8); \ + rsave (47, 48*RSIZE + 15*8); \ + rsave (48, 48*RSIZE + 16*8); \ + rsave (49, 48*RSIZE + 17*8); \ + rsave (50, 48*RSIZE + 18*8); \ + rsave (51, 48*RSIZE + 19*8); \ + rsave (52, 48*RSIZE + 20*8); \ + rsave (53, 48*RSIZE + 21*8); \ + rsave (54, 48*RSIZE + 22*8); \ + rsave (55, 48*RSIZE + 23*8); \ + rsave (56, 48*RSIZE + 24*8); \ + rsave (57, 48*RSIZE + 25*8); \ + rsave (58, 48*RSIZE + 26*8); \ + rsave (59, 48*RSIZE + 27*8); \ + rsave (60, 48*RSIZE + 28*8); \ + rsave (61, 48*RSIZE + 29*8); \ + rsave (62, 48*RSIZE + 30*8); \ + rsave (63, 48*RSIZE + 31*8) + +/* Describe where the VMX regs are saved. */ +#ifdef CONFIG_ALTIVEC +#define EH_FRAME_VMX \ + vsave_msr0 ( 0); \ + vsave_msr1 ( 1); \ + vsave_msr1 ( 2); \ + vsave_msr1 ( 3); \ + vsave_msr1 ( 4); \ + vsave_msr1 ( 5); \ + vsave_msr1 ( 6); \ + vsave_msr1 ( 7); \ + vsave_msr1 ( 8); \ + vsave_msr1 ( 9); \ + vsave_msr1 (10); \ + vsave_msr1 (11); \ + vsave_msr1 (12); \ + vsave_msr1 (13); \ + vsave_msr1 (14); \ + vsave_msr1 (15); \ + vsave_msr1 (16); \ + vsave_msr1 (17); \ + vsave_msr1 (18); \ + vsave_msr1 (19); \ + vsave_msr1 (20); \ + vsave_msr1 (21); \ + vsave_msr1 (22); \ + vsave_msr1 (23); \ + vsave_msr1 (24); \ + vsave_msr1 (25); \ + vsave_msr1 (26); \ + vsave_msr1 (27); \ + vsave_msr1 (28); \ + vsave_msr1 (29); \ + vsave_msr1 (30); \ + vsave_msr1 (31); \ + vsave_msr2 (33, 32*16+12); \ + vsave (32, 33*16) +#else +#define EH_FRAME_VMX +#endif + + .section .eh_frame,"a",@progbits +.Lcie: + .long .Lcie_end - .Lcie_start +.Lcie_start: + .long 0 /* CIE ID */ + .byte 1 /* Version number */ + .string "zR" /* NUL-terminated augmentation string */ + .uleb128 4 /* Code alignment factor */ + .sleb128 -8 /* Data alignment factor */ + .byte 67 /* Return address register column, ap */ + .uleb128 1 /* Augmentation value length */ + .byte 0x14 /* DW_EH_PE_pcrel | DW_EH_PE_udata8. */ + .byte 0x0c,1,0 /* DW_CFA_def_cfa: r1 ofs 0 */ + .balign 8 +.Lcie_end: + + .long .Lfde0_end - .Lfde0_start +.Lfde0_start: + .long .Lfde0_start - .Lcie /* CIE pointer. */ + .quad .Lsigrt_start - . /* PC start, length */ + .quad .Lsigrt_end - .Lsigrt_start + .uleb128 0 /* Augmentation */ + EH_FRAME_GEN + EH_FRAME_FP + EH_FRAME_VMX +# Do we really need to describe the frame at this point? ie. will +# we ever have some call chain that returns somewhere past the addi? +# I don't think so, since gcc doesn't support async signals. +# .byte 0x41 /* DW_CFA_advance_loc 1*4 */ +#undef PTREGS +#define PTREGS 168+56 +# EH_FRAME_GEN +# EH_FRAME_FP +# EH_FRAME_VMX + .balign 8 +.Lfde0_end: diff -Nru a/arch/ppc64/kernel/vdso64/vdso64.lds.S b/arch/ppc64/kernel/vdso64/vdso64.lds.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/vdso64.lds.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,110 @@ +/* + * This is the infamous ld script for the 64 bits vdso + * library + */ +#include + +OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc", "elf64-powerpc") +OUTPUT_ARCH(powerpc:common64) +ENTRY(_start) + +SECTIONS +{ + . = VDSO64_LBASE + SIZEOF_HEADERS; + .hash : { *(.hash) } :text + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + + . = ALIGN (16); + .text : + { + *(.text .stub .text.* .gnu.linkonce.t.*) + *(.sfpr .glink) + } + PROVIDE (__etext = .); + PROVIDE (_etext = .); + PROVIDE (etext = .); + + /* Other stuff is appended to the text segment: */ + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr + .eh_frame : { KEEP (*(.eh_frame)) } :text + .gcc_except_table : { *(.gcc_except_table) } + + .opd ALIGN(8) : { KEEP (*(.opd)) } + .got ALIGN(8) : { *(.got .toc) } + .rela.dyn ALIGN(8) : { *(.rela.dyn) } + + .dynamic : { *(.dynamic) } :text :dynamic + + _end = .; + PROVIDE (end = .); + + /* Stabs debugging sections are here too + */ + .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) } + /* DWARF debug sectio/ns. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + + /DISCARD/ : { *(.note.GNU-stack) } + /DISCARD/ : { *(.branch_lt) } + /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) } + /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } +} + +PHDRS +{ + text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ + dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ + eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ +} + +/* + * This controls what symbols we export from the DSO. + */ +VERSION +{ + VDSO_VERSION_STRING { + global: + __kernel_datapage_offset; /* Has to be there for the kernel to find it */ + __kernel_get_syscall_map; + __kernel_gettimeofday; + __kernel_sync_dicache; + __kernel_sync_dicache_p5; + __kernel_sigtramp_rt64; + local: *; + }; +} diff -Nru a/arch/ppc64/kernel/vdso64/vdso64_wrapper.S b/arch/ppc64/kernel/vdso64/vdso64_wrapper.S --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/ppc64/kernel/vdso64/vdso64_wrapper.S 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,13 @@ +#include +#include + + .section ".data.page_aligned" + + .globl vdso64_start, vdso64_end + .balign PAGE_SIZE +vdso64_start: + .incbin "arch/ppc64/kernel/vdso64/vdso64.so" + .balign PAGE_SIZE +vdso64_end: + + .previous diff -Nru a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c --- a/arch/ppc64/mm/hash_native.c 2005-03-07 14:54:16 -08:00 +++ b/arch/ppc64/mm/hash_native.c 2005-03-07 14:54:16 -08:00 @@ -217,10 +217,10 @@ } /* Ensure it is out of the tlb too */ - if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) { + if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { tlbiel(va); } else { - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (lock_tlbie) spin_lock(&native_tlbie_lock); @@ -245,7 +245,7 @@ unsigned long vsid, va, vpn, flags = 0; long slot; HPTE *hptep; - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); vsid = get_kernel_vsid(ea); va = (vsid << 28) | (ea & 0x0fffffff); @@ -273,7 +273,7 @@ Hpte_dword0 dw0; unsigned long avpn = va >> 23; unsigned long flags; - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (large) avpn &= ~0x1UL; @@ -292,7 +292,7 @@ } /* Invalidate the tlb */ - if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) { + if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { tlbiel(va); } else { if (lock_tlbie) @@ -360,7 +360,7 @@ j++; } - if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) { + if (cpu_has_feature(CPU_FTR_TLBIEL) && !large && local) { asm volatile("ptesync":::"memory"); for (i = 0; i < j; i++) @@ -368,7 +368,7 @@ asm volatile("ptesync":::"memory"); } else { - int lock_tlbie = !(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE); + int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); if (lock_tlbie) spin_lock(&native_tlbie_lock); diff -Nru a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c --- a/arch/ppc64/mm/hash_utils.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/hash_utils.c 2005-03-07 14:54:17 -08:00 @@ -190,7 +190,7 @@ * _NOT_ map it to avoid cache paradoxes as it's remapped non * cacheable later on */ - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) use_largepages = 1; /* create bolted the linear mapping in the hash table */ diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c --- a/arch/ppc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -149,7 +149,8 @@ } static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, - struct page *page, pte_t *ptep, int write_access) + unsigned long addr, struct page *page, + pte_t *ptep, int write_access) { pte_t entry; @@ -163,7 +164,7 @@ entry = pte_mkyoung(entry); entry = pte_mkhuge(entry); - set_pte(ptep, entry); + set_pte_at(mm, addr, ptep, entry); } /* @@ -316,7 +317,7 @@ ptepage = pte_page(entry); get_page(ptepage); dst->rss += (HPAGE_SIZE / PAGE_SIZE); - set_pte(dst_pte, entry); + set_pte_at(dst, addr, dst_pte, entry); addr += HPAGE_SIZE; } @@ -421,7 +422,7 @@ pte = *ptep; page = pte_page(pte); - pte_clear(ptep); + pte_clear(mm, addr, ptep); put_page(page); } @@ -486,7 +487,7 @@ goto out; } } - set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); + set_huge_pte(mm, vma, addr, page, pte, vma->vm_flags & VM_WRITE); } out: spin_unlock(&mm->page_table_lock); @@ -709,7 +710,7 @@ if (len & ~HPAGE_MASK) return -EINVAL; - if (!(cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE)) + if (!cpu_has_feature(CPU_FTR_16M_PAGE)) return -EINVAL; if (test_thread_flag(TIF_32BIT)) { diff -Nru a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c --- a/arch/ppc64/mm/init.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/init.c 2005-03-07 14:54:17 -08:00 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -62,6 +63,7 @@ #include #include #include +#include int mem_init_done; unsigned long ioremap_bot = IMALLOC_BASE; @@ -153,7 +155,7 @@ ptep = pte_alloc_kernel(&ioremap_mm, pmdp, ea); pa = abs_to_phys(pa); - set_pte(ptep, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); + set_pte_at(&ioremap_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); spin_unlock(&ioremap_mm.page_table_lock); } else { unsigned long va, vpn, hash, hpteg; @@ -305,7 +307,7 @@ do { pte_t page; - page = ptep_get_and_clear(pte); + page = ptep_get_and_clear(&ioremap_mm, address, pte); address += PAGE_SIZE; pte++; if (pte_none(page)) @@ -441,6 +443,10 @@ #endif +EXPORT_SYMBOL(ioremap); +EXPORT_SYMBOL(__ioremap); +EXPORT_SYMBOL(iounmap); + void free_initmem(void) { unsigned long addr; @@ -743,6 +749,8 @@ #ifdef CONFIG_PPC_ISERIES iommu_vio_init(); #endif + /* Initialize the vDSO */ + vdso_init(); } /* @@ -752,18 +760,19 @@ */ void flush_dcache_page(struct page *page) { - if (cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) + if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) return; /* avoid an atomic op if possible */ if (test_bit(PG_arch_1, &page->flags)) clear_bit(PG_arch_1, &page->flags); } +EXPORT_SYMBOL(flush_dcache_page); void clear_user_page(void *page, unsigned long vaddr, struct page *pg) { clear_page(page); - if (cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) + if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) return; /* * We shouldnt have to do this, but some versions of glibc @@ -775,6 +784,7 @@ if (test_bit(PG_arch_1, &pg->flags)) clear_bit(PG_arch_1, &pg->flags); } +EXPORT_SYMBOL(clear_user_page); void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, struct page *pg) @@ -796,7 +806,7 @@ return; #endif - if (cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) + if (cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) return; /* avoid an atomic op if possible */ @@ -812,6 +822,7 @@ maddr = (unsigned long)page_address(page) + (addr & ~PAGE_MASK); flush_icache_range(maddr, maddr + len); } +EXPORT_SYMBOL(flush_icache_user_range); /* * This is called at the end of handling a user page fault, when the @@ -832,8 +843,8 @@ unsigned long flags; /* handle i-cache coherency */ - if (!(cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE) && - !(cur_cpu_spec->cpu_features & CPU_FTR_NOEXECUTE)) { + if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE) && + !cpu_has_feature(CPU_FTR_NOEXECUTE)) { unsigned long pfn = pte_pfn(pte); if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); diff -Nru a/arch/ppc64/mm/slb.c b/arch/ppc64/mm/slb.c --- a/arch/ppc64/mm/slb.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/slb.c 2005-03-07 14:54:17 -08:00 @@ -51,7 +51,7 @@ WARN_ON(!irqs_disabled()); - if (cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) ksp_flags |= SLB_VSID_L; ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); @@ -139,7 +139,7 @@ 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) + if (cpu_has_feature(CPU_FTR_16M_PAGE)) flags |= SLB_VSID_L; asm volatile("isync":::"memory"); diff -Nru a/arch/ppc64/mm/stab.c b/arch/ppc64/mm/stab.c --- a/arch/ppc64/mm/stab.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/mm/stab.c 2005-03-07 14:54:18 -08:00 @@ -227,7 +227,7 @@ { unsigned long vsid = get_kernel_vsid(KERNELBASE); - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) { + if (cpu_has_feature(CPU_FTR_SLB)) { slb_initialize(); } else { asm volatile("isync; slbia; isync":::"memory"); diff -Nru a/arch/ppc64/mm/tlb.c b/arch/ppc64/mm/tlb.c --- a/arch/ppc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 @@ -74,23 +74,12 @@ * change the existing HPTE to read-only rather than removing it * (if we remove it we should clear the _PTE_HPTEFLAGS bits). */ -void hpte_update(pte_t *ptep, unsigned long pte, int wrprot) +void hpte_update(struct mm_struct *mm, unsigned long addr, + unsigned long pte, int wrprot) { - struct page *ptepage; - struct mm_struct *mm; - unsigned long addr; int i; unsigned long context = 0; struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); - - ptepage = virt_to_page(ptep); - mm = (struct mm_struct *) ptepage->mapping; - addr = ptepage->index; - if (pte_huge(pte)) - addr += ((unsigned long)ptep & ~PAGE_MASK) - / sizeof(*ptep) * HPAGE_SIZE; - else - addr += ((unsigned long)ptep & ~PAGE_MASK) * PTRS_PER_PTE; if (REGION_ID(addr) == USER_REGION_ID) context = mm->context.id; diff -Nru a/arch/ppc64/oprofile/common.c b/arch/ppc64/oprofile/common.c --- a/arch/ppc64/oprofile/common.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/oprofile/common.c 2005-03-07 14:54:18 -08:00 @@ -15,6 +15,7 @@ #include #include #include +#include #include "op_impl.h" @@ -22,9 +23,6 @@ extern struct op_ppc64_model op_model_power4; static struct op_ppc64_model *model; -extern void (*perf_irq)(struct pt_regs *); -static void (*save_perf_irq)(struct pt_regs *); - static struct op_counter_config ctr[OP_MAX_COUNTER]; static struct op_system_config sys; @@ -35,11 +33,12 @@ static int op_ppc64_setup(void) { - /* Install our interrupt handler into the existing hook. */ - save_perf_irq = perf_irq; - perf_irq = op_handle_interrupt; + int err; - mb(); + /* Grab the hardware */ + err = reserve_pmc_hardware(op_handle_interrupt); + if (err) + return err; /* Pre-compute the values to stuff in the hardware registers. */ model->reg_setup(ctr, &sys, model->num_counters); @@ -52,10 +51,7 @@ static void op_ppc64_shutdown(void) { - mb(); - - /* Remove our interrupt handler. We may be removing this module. */ - perf_irq = save_perf_irq; + release_pmc_hardware(); } static void op_ppc64_cpu_start(void *dummy) diff -Nru a/arch/ppc64/oprofile/op_model_power4.c b/arch/ppc64/oprofile/op_model_power4.c --- a/arch/ppc64/oprofile/op_model_power4.c 2005-03-07 14:54:17 -08:00 +++ b/arch/ppc64/oprofile/op_model_power4.c 2005-03-07 14:54:17 -08:00 @@ -54,7 +54,7 @@ * * It has been verified to work on POWER5 so we enable it there. */ - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA_SIHV) + if (cpu_has_feature(CPU_FTR_MMCRA_SIHV)) mmcra_has_sihv = 1; /* diff -Nru a/arch/ppc64/oprofile/op_model_rs64.c b/arch/ppc64/oprofile/op_model_rs64.c --- a/arch/ppc64/oprofile/op_model_rs64.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/oprofile/op_model_rs64.c 2005-03-07 14:54:18 -08:00 @@ -114,7 +114,7 @@ /* reset MMCR1, MMCRA */ mtspr(SPRN_MMCR1, 0); - if (cur_cpu_spec->cpu_features & CPU_FTR_MMCRA) + if (cpu_has_feature(CPU_FTR_MMCRA)) mtspr(SPRN_MMCRA, 0); mmcr0 |= MMCR0_FCM1|MMCR0_PMXE|MMCR0_FCECE; diff -Nru a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c --- a/arch/ppc64/xmon/xmon.c 2005-03-07 14:54:18 -08:00 +++ b/arch/ppc64/xmon/xmon.c 2005-03-07 14:54:18 -08:00 @@ -725,7 +725,7 @@ { if (dabr.enabled) set_controlled_dabr(dabr.address | (dabr.enabled & 7)); - if (iabr && (cur_cpu_spec->cpu_features & CPU_FTR_IABR)) + if (iabr && cpu_has_feature(CPU_FTR_IABR)) set_iabr(iabr->address | (iabr->enabled & (BP_IABR|BP_IABR_TE))); } @@ -753,7 +753,7 @@ static void remove_cpu_bpts(void) { set_controlled_dabr(0); - if ((cur_cpu_spec->cpu_features & CPU_FTR_IABR)) + if (cpu_has_feature(CPU_FTR_IABR)) set_iabr(0); } @@ -1100,7 +1100,7 @@ break; case 'i': /* bi - hardware instr breakpoint */ - if (!(cur_cpu_spec->cpu_features & CPU_FTR_IABR)) { + if (!cpu_has_feature(CPU_FTR_IABR)) { printf("Hardware instruction breakpoint " "not supported on this cpu\n"); break; @@ -2498,7 +2498,7 @@ void dump_segments(void) { - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) + if (cpu_has_feature(CPU_FTR_SLB)) dump_slb(); else dump_stab(); diff -Nru a/arch/s390/mm/init.c b/arch/s390/mm/init.c --- a/arch/s390/mm/init.c 2005-03-07 14:54:17 -08:00 +++ b/arch/s390/mm/init.c 2005-03-07 14:54:17 -08:00 @@ -145,7 +145,7 @@ for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { pte = pfn_pte(pfn, PAGE_KERNEL); if (pfn >= max_low_pfn) - pte_clear(&pte); + pte_clear(&init_mm, 0, &pte); set_pte(pg_table, pte); pfn++; } @@ -229,7 +229,7 @@ for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { pte = pfn_pte(pfn, PAGE_KERNEL); if (pfn >= max_low_pfn) { - pte_clear(&pte); + pte_clear(&init_mm, 0, &pte); continue; } set_pte(pt_dir, pte); diff -Nru a/arch/sh/drivers/pci/fixups-sh03.c b/arch/sh/drivers/pci/fixups-sh03.c --- a/arch/sh/drivers/pci/fixups-sh03.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/drivers/pci/fixups-sh03.c 2005-03-07 14:54:16 -08:00 @@ -46,11 +46,11 @@ /* now lookup the actual IRQ on a platform specific basis (pci-'platform'.c) */ irq = pcibios_map_platform_irq(slot, pin, dev); if( irq < 0 ) { - pr_debug("PCI: Error mapping IRQ on device %s\n", dev->slot_name); + pr_debug("PCI: Error mapping IRQ on device %s\n", pci_name(dev)); return irq; } - pr_debug("Setting IRQ for slot %s to %d\n", dev->slot_name, irq); + pr_debug("Setting IRQ for slot %s to %d\n", pci_name(dev), irq); return irq; } diff -Nru a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c --- a/arch/sh/drivers/pci/pci-sh7751.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/drivers/pci/pci-sh7751.c 2005-03-07 14:54:17 -08:00 @@ -169,7 +169,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - pr_debug("PCI: IDE base address fixup for %s\n", d->slot_name); + pr_debug("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { @@ -401,11 +401,11 @@ /* now lookup the actual IRQ on a platform specific basis (pci-'platform'.c) */ irq = pcibios_map_platform_irq(slot,pin); if( irq < 0 ) { - pr_debug("PCI: Error mapping IRQ on device %s\n", dev->slot_name); + pr_debug("PCI: Error mapping IRQ on device %s\n", pci_name(dev)); return irq; } - - pr_debug("Setting IRQ for slot %s to %d\n", dev->slot_name, irq); + + pr_debug("Setting IRQ for slot %s to %d\n", pci_name(dev), irq); return irq; } diff -Nru a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c --- a/arch/sh/drivers/pci/pci-st40.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/drivers/pci/pci-st40.c 2005-03-07 14:54:17 -08:00 @@ -246,7 +246,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - printk("PCI: IDE base address fixup for %s\n", d->slot_name); + printk("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { diff -Nru a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c --- a/arch/sh/mm/cache-sh4.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/mm/cache-sh4.c 2005-03-07 14:54:16 -08:00 @@ -258,10 +258,16 @@ flush_cache_all(); } -static void __flush_cache_page(struct vm_area_struct *vma, - unsigned long address, - unsigned long phys) +/* + * Write back and invalidate I/D-caches for the page. + * + * ADDR: Virtual Address (U0 address) + * PFN: Physical page number + */ +void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn) { + unsigned long phys = pfn << PAGE_SHIFT; + /* We only need to flush D-cache when we have alias */ if ((address^phys) & CACHE_ALIAS) { /* Loop 4K of the D-cache */ @@ -342,32 +348,6 @@ } /* - * Write back and invalidate I/D-caches for the page. - * - * ADDR: Virtual Address (U0 address) - */ -void flush_cache_page(struct vm_area_struct *vma, unsigned long address) -{ - pgd_t *dir; - pmd_t *pmd; - pte_t *pte; - pte_t entry; - unsigned long phys; - - dir = pgd_offset(vma->vm_mm, address); - pmd = pmd_offset(dir, address); - if (pmd_none(*pmd) || pmd_bad(*pmd)) - return; - pte = pte_offset_kernel(pmd, address); - entry = *pte; - if (!(pte_val(entry) & _PAGE_PRESENT)) - return; - - phys = pte_val(entry)&PTE_PHYS_MASK; - __flush_cache_page(vma, address, phys); -} - -/* * flush_icache_user_range * @vma: VMA of the process * @page: page @@ -377,6 +357,6 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len) { - __flush_cache_page(vma, addr, PHYSADDR(page_address(page))); + flush_cache_page(vma, addr, page_to_pfn(page)); } diff -Nru a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c --- a/arch/sh/mm/cache-sh7705.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/mm/cache-sh7705.c 2005-03-07 14:54:16 -08:00 @@ -186,25 +186,9 @@ * * ADDRESS: Virtual Address (U0 address) */ -void flush_cache_page(struct vm_area_struct *vma, unsigned long address) +void flush_cache_page(struct vm_area_struct *vma, unsigned long address, unsigned long pfn) { - pgd_t *dir; - pmd_t *pmd; - pte_t *pte; - pte_t entry; - unsigned long phys; - - dir = pgd_offset(vma->vm_mm, address); - pmd = pmd_offset(dir, address); - if (pmd_none(*pmd) || pmd_bad(*pmd)) - return; - pte = pte_offset(pmd, address); - entry = *pte; - if (pte_none(entry) || !pte_present(entry)) - return; - - phys = pte_val(entry)&PTE_PHYS_MASK; - __flush_dcache_page(phys); + __flush_dcache_page(pfn << PAGE_SHIFT); } /* diff -Nru a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c --- a/arch/sh/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -202,7 +202,7 @@ page = pte_page(*pte); put_page(page); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - pte_clear(pte); + pte_clear(mm, address+(i*PAGE_SIZE), pte); pte++; } } diff -Nru a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c --- a/arch/sh/mm/pg-sh4.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh/mm/pg-sh4.c 2005-03-07 14:54:16 -08:00 @@ -56,7 +56,7 @@ local_irq_restore(flags); update_mmu_cache(NULL, p3_addr, entry); __clear_user_page((void *)p3_addr, to); - pte_clear(pte); + pte_clear(&init_mm, p3_addr, pte); up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } @@ -95,7 +95,7 @@ local_irq_restore(flags); update_mmu_cache(NULL, p3_addr, entry); __copy_user_page((void *)p3_addr, from, to); - pte_clear(pte); + pte_clear(&init_mm, p3_addr, pte); up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } @@ -103,11 +103,11 @@ /* * For SH-4, we have our own implementation for ptep_get_and_clear */ -inline pte_t ptep_get_and_clear(pte_t *ptep) +inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t pte = *ptep; - pte_clear(ptep); + pte_clear(mm, addr, ptep); if (!pte_not_present(pte)) { unsigned long pfn = pte_pfn(pte); if (pfn_valid(pfn)) { diff -Nru a/arch/sh/mm/pg-sh7705.c b/arch/sh/mm/pg-sh7705.c --- a/arch/sh/mm/pg-sh7705.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh/mm/pg-sh7705.c 2005-03-07 14:54:17 -08:00 @@ -117,11 +117,11 @@ * For SH7705, we have our own implementation for ptep_get_and_clear * Copied from pg-sh4.c */ -inline pte_t ptep_get_and_clear(pte_t *ptep) +inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t pte = *ptep; - pte_clear(ptep); + pte_clear(mm, addr, ptep); if (!pte_not_present(pte)) { unsigned long pfn = pte_pfn(pte); if (pfn_valid(pfn)) { diff -Nru a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c --- a/arch/sh64/kernel/pci_sh5.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sh64/kernel/pci_sh5.c 2005-03-07 14:54:18 -08:00 @@ -39,7 +39,7 @@ */ if ((d->class >> 8) != PCI_CLASS_STORAGE_IDE) return; - printk("PCI: IDE base address fixup for %s\n", d->slot_name); + printk("PCI: IDE base address fixup for %s\n", pci_name(d)); for(i=0; i<4; i++) { struct resource *r = &d->resource[i]; if ((r->start & ~0x80) == 0x374) { diff -Nru a/arch/sh64/kernel/pcibios.c b/arch/sh64/kernel/pcibios.c --- a/arch/sh64/kernel/pcibios.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh64/kernel/pcibios.c 2005-03-07 14:54:17 -08:00 @@ -57,7 +57,7 @@ pci_read_config_dword(dev, reg, &check); if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) { printk(KERN_ERR "PCI: Error while updating region " - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, + "%s/%d (%08x != %08x)\n", pci_name(dev), resource, new, check); } } @@ -125,7 +125,7 @@ continue; r = &dev->resource[idx]; if (!r->start && r->end) { - printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name); + printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); return -EINVAL; } if (r->flags & IORESOURCE_IO) diff -Nru a/arch/sh64/mm/cache.c b/arch/sh64/mm/cache.c --- a/arch/sh64/mm/cache.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sh64/mm/cache.c 2005-03-07 14:54:18 -08:00 @@ -573,31 +573,6 @@ } } -static void sh64_dcache_purge_virt_page(struct mm_struct *mm, unsigned long eaddr) -{ - unsigned long phys; - pgd_t *pgd; - pmd_t *pmd; - pte_t *pte; - pte_t entry; - - pgd = pgd_offset(mm, eaddr); - pmd = pmd_offset(pgd, eaddr); - - if (pmd_none(*pmd) || pmd_bad(*pmd)) - return; - - pte = pte_offset_kernel(pmd, eaddr); - entry = *pte; - - if (pte_none(entry) || !pte_present(entry)) - return; - - phys = pte_val(entry) & PAGE_MASK; - - sh64_dcache_purge_phy_page(phys); -} - static void sh64_dcache_purge_user_page(struct mm_struct *mm, unsigned long eaddr) { pgd_t *pgd; @@ -904,7 +879,7 @@ /****************************************************************************/ -void flush_cache_page(struct vm_area_struct *vma, unsigned long eaddr) +void flush_cache_page(struct vm_area_struct *vma, unsigned long eaddr, unsigned long pfn) { /* Invalidate any entries in either cache for the vma within the user address space vma->vm_mm for the page starting at virtual address @@ -915,7 +890,7 @@ Note(1), this is called with mm->page_table_lock held. */ - sh64_dcache_purge_virt_page(vma->vm_mm, eaddr); + sh64_dcache_purge_phy_page(pfn << PAGE_SHIFT); if (vma->vm_flags & VM_EXEC) { sh64_icache_inv_user_page(vma, eaddr); diff -Nru a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c --- a/arch/sh64/mm/hugetlbpage.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sh64/mm/hugetlbpage.c 2005-03-07 14:54:16 -08:00 @@ -202,7 +202,7 @@ page = pte_page(*pte); put_page(page); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - pte_clear(pte); + pte_clear(mm, address+(i*PAGE_SIZE), pte); pte++; } } diff -Nru a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c --- a/arch/sh64/mm/ioremap.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sh64/mm/ioremap.c 2005-03-07 14:54:17 -08:00 @@ -400,7 +400,7 @@ return; clear_page((void *)ptep); - pte_clear(ptep); + pte_clear(&init_mm, vaddr, ptep); } unsigned long onchip_remap(unsigned long phys, unsigned long size, const char *name) diff -Nru a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c --- a/arch/sparc/mm/generic.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sparc/mm/generic.c 2005-03-07 14:54:18 -08:00 @@ -47,7 +47,7 @@ * They use a pgprot that sets PAGE_IO and does not check the * mem_map table as this is independent of normal memory. */ -static inline void io_remap_pte_range(pte_t * pte, unsigned long address, unsigned long size, +static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -58,7 +58,7 @@ end = PMD_SIZE; do { pte_t oldpage = *pte; - pte_clear(pte); + pte_clear(mm, address, pte); set_pte(pte, mk_pte_io(offset, prot, space)); forget_pte(oldpage); address += PAGE_SIZE; @@ -67,7 +67,7 @@ } while (address < end); } -static inline int io_remap_pmd_range(pmd_t * pmd, unsigned long address, unsigned long size, +static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -78,10 +78,10 @@ end = PGDIR_SIZE; offset -= address; do { - pte_t * pte = pte_alloc_map(current->mm, pmd, address); + pte_t * pte = pte_alloc_map(mm, pmd, address); if (!pte) return -ENOMEM; - io_remap_pte_range(pte, address, end - address, address + offset, prot, space); + io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); address = (address + PMD_SIZE) & PMD_MASK; pmd++; } while (address < end); @@ -107,7 +107,7 @@ error = -ENOMEM; if (!pmd) break; - error = io_remap_pmd_range(pmd, from, end - from, offset + from, prot, space); + error = io_remap_pmd_range(mm, pmd, from, end - from, offset + from, prot, space); if (error) break; from = (from + PGDIR_SIZE) & PGDIR_MASK; diff -Nru a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c --- a/arch/sparc/mm/highmem.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sparc/mm/highmem.c 2005-03-07 14:54:16 -08:00 @@ -88,7 +88,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte-idx); + pte_clear(&init_mm, vaddr, kmap_pte-idx); /* XXX Fix - Anton */ #if 0 __flush_tlb_one(vaddr); diff -Nru a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c --- a/arch/sparc/mm/srmmu.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc/mm/srmmu.c 2005-03-07 14:54:17 -08:00 @@ -1003,8 +1003,7 @@ extern void viking_flush_cache_mm(struct mm_struct *mm); extern void viking_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); -extern void viking_flush_cache_page(struct vm_area_struct *vma, - unsigned long page); +extern void viking_flush_cache_page(struct vm_area_struct *vma, unsigned long page); extern void viking_flush_page_to_ram(unsigned long page); extern void viking_flush_page_for_dma(unsigned long page); extern void viking_flush_sig_insns(struct mm_struct *mm, unsigned long addr); diff -Nru a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c --- a/arch/sparc64/kernel/pci.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sparc64/kernel/pci.c 2005-03-07 14:54:16 -08:00 @@ -794,12 +794,6 @@ } EXPORT_SYMBOL(pci_domain_nr); -int pci_name_bus(char *name, struct pci_bus *bus) -{ - sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number); - return 0; -} - int pcibios_prep_mwi(struct pci_dev *dev) { /* We set correct PCI_CACHE_LINE_SIZE register values for every diff -Nru a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c --- a/arch/sparc64/kernel/pci_schizo.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/kernel/pci_schizo.c 2005-03-07 14:54:17 -08:00 @@ -326,9 +326,9 @@ return ret; } -static unsigned int __init schizo_irq_build(struct pci_pbm_info *pbm, - struct pci_dev *pdev, - unsigned int ino) +static unsigned int schizo_irq_build(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int ino) { struct ino_bucket *bucket; unsigned long imap, iclr; @@ -382,19 +382,57 @@ static unsigned long stc_tag_buf[16]; static unsigned long stc_line_buf[16]; -/* These offsets look weird because I keep in pbm->controller_regs - * the second PROM register property minus 0x10000 which is the - * base of the Safari and UPA64S registers of SCHIZO. - */ -#define SCHIZO_PBM_A_REGS_OFF (0x600000UL - 0x400000UL) -#define SCHIZO_PBM_B_REGS_OFF (0x700000UL - 0x400000UL) +#define SCHIZO_UE_INO 0x30 /* Uncorrectable ECC error */ +#define SCHIZO_CE_INO 0x31 /* Correctable ECC error */ +#define SCHIZO_PCIERR_A_INO 0x32 /* PBM A PCI bus error */ +#define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */ +#define SCHIZO_SERR_INO 0x34 /* Safari interface error */ -static void schizo_clear_other_err_intr(int irq) +struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino) { - struct ino_bucket *bucket = __bucket(irq); - unsigned long iclr = bucket->iclr; + ino &= IMAP_INO; + if (p->pbm_A.ino_bitmap & (1UL << ino)) + return &p->pbm_A; + if (p->pbm_B.ino_bitmap & (1UL << ino)) + return &p->pbm_B; + + printk("PCI%d: No ino_bitmap entry for ino[%x], bitmaps " + "PBM_A[%016lx] PBM_B[%016lx]", + p->index, ino, + p->pbm_A.ino_bitmap, + p->pbm_B.ino_bitmap); + printk("PCI%d: Using PBM_A, report this problem immediately.\n", + p->index); + + return &p->pbm_A; +} + +static void schizo_clear_other_err_intr(struct pci_controller_info *p, int irq) +{ + struct pci_pbm_info *pbm; + struct ino_bucket *bucket; + unsigned long iclr; + + /* Do not clear the interrupt for the other PCI bus. + * + * This "ACK both PBM IRQs" only needs to be performed + * for chip-wide error interrupts. + */ + if ((irq & IMAP_INO) == SCHIZO_PCIERR_A_INO || + (irq & IMAP_INO) == SCHIZO_PCIERR_B_INO) + return; + + pbm = pbm_for_ino(p, irq); + if (pbm == &p->pbm_A) + pbm = &p->pbm_B; + else + pbm = &p->pbm_A; + + irq = schizo_irq_build(pbm, NULL, + (pbm->portid << 6) | (irq & IMAP_INO)); + bucket = __bucket(irq); + iclr = bucket->iclr; - iclr += (SCHIZO_PBM_B_REGS_OFF - SCHIZO_PBM_A_REGS_OFF); upa_writel(ICLR_IDLE, iclr); } @@ -728,7 +766,7 @@ /* Interrogate IOMMU for error status. */ schizo_check_iommu_error(p, UE_ERR); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -819,7 +857,7 @@ printk("(none)"); printk("]\n"); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -856,9 +894,9 @@ #define SCHIZO_PCICTRL_SBH_ERR (1UL << 35UL) /* Safari */ #define SCHIZO_PCICTRL_SERR (1UL << 34UL) /* Safari/Tomatillo */ #define SCHIZO_PCICTRL_PCISPD (1UL << 33UL) /* Safari */ -#define SCHIZO_PCICTRL_MRM_PREF (1UL << 28UL) /* Tomatillo */ -#define SCHIZO_PCICTRL_RDO_PREF (1UL << 27UL) /* Tomatillo */ -#define SCHIZO_PCICTRL_RDL_PREF (1UL << 26UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_MRM_PREF (1UL << 30UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_RDO_PREF (1UL << 29UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_RDL_PREF (1UL << 28UL) /* Tomatillo */ #define SCHIZO_PCICTRL_PTO (3UL << 24UL) /* Safari/Tomatillo */ #define SCHIZO_PCICTRL_PTO_SHIFT 24UL #define SCHIZO_PCICTRL_TRWSW (7UL << 21UL) /* Tomatillo */ @@ -1040,7 +1078,7 @@ if (error_bits & (SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_SPERR)) pci_scan_for_parity_error(p, pbm, pbm->pci_bus); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -1097,7 +1135,7 @@ printk("PCI%d: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", p->index, errlog); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -1105,7 +1143,7 @@ p->index); schizo_check_iommu_error(p, SAFARI_ERR); - schizo_clear_other_err_intr(irq); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -1120,26 +1158,6 @@ #define SCHIZO_SAFARI_IRQCTRL 0x10010UL #define SCHIZO_SAFIRQCTRL_EN 0x8000000000000000UL -#define SCHIZO_UE_INO 0x30 /* Uncorrectable ECC error */ -#define SCHIZO_CE_INO 0x31 /* Correctable ECC error */ -#define SCHIZO_PCIERR_A_INO 0x32 /* PBM A PCI bus error */ -#define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */ -#define SCHIZO_SERR_INO 0x34 /* Safari interface error */ - -struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino) -{ - ino &= IMAP_INO; - if (p->pbm_A.ino_bitmap & (1UL << ino)) - return &p->pbm_A; - if (p->pbm_B.ino_bitmap & (1UL << ino)) - return &p->pbm_B; - prom_printf("TOMATILLO%d: No entry in ino bitmap for %d\n", - p->index, ino); - prom_halt(); - /* NOTREACHED */ - return NULL; -} - /* How the Tomatillo IRQs are routed around is pure guesswork here. * * All the Tomatillo devices I see in prtconf dumps seem to have only @@ -1887,7 +1905,7 @@ tmp &= ~SCHIZO_PCICTRL_PTO; if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && - pbm->chip_version == 0x2) + pbm->chip_version >= 0x2) tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; else tmp |= 0x1UL << SCHIZO_PCICTRL_PTO_SHIFT; @@ -1895,8 +1913,16 @@ if (!prom_getbool(pbm->prom_node, "no-bus-parking")) tmp |= SCHIZO_PCICTRL_PARK; + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && + pbm->chip_version <= 0x1) + tmp |= (1UL << 61); + else + tmp &= ~(1UL << 61); + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) - tmp |= SCHIZO_PCICTRL_MRM_PREF; + tmp |= (SCHIZO_PCICTRL_MRM_PREF | + SCHIZO_PCICTRL_RDO_PREF | + SCHIZO_PCICTRL_RDL_PREF); schizo_write(pbm->pbm_regs + SCHIZO_PCI_CTRL, tmp); diff -Nru a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c --- a/arch/sparc64/kernel/sys_sparc32.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/kernel/sys_sparc32.c 2005-03-07 14:54:17 -08:00 @@ -1121,34 +1121,3 @@ return err; } - -asmlinkage long compat_sys_waitid(u32 which, u32 pid, - struct compat_siginfo __user *uinfo, - u32 options, struct compat_rusage __user *uru) -{ - siginfo_t info; - struct rusage ru; - long ret; - mm_segment_t old_fs = get_fs(); - - memset(&info, 0, sizeof(info)); - - set_fs (KERNEL_DS); - ret = sys_waitid(which, pid, (siginfo_t __user *) &info, - options, - uru ? (struct rusage __user *) &ru : NULL); - set_fs (old_fs); - - if (ret < 0 || info.si_signo == 0) - return ret; - - if (uru) { - ret = put_compat_rusage(&ru, uru); - if (ret) - 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/time.c b/arch/sparc64/kernel/time.c --- a/arch/sparc64/kernel/time.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/kernel/time.c 2005-03-07 14:54:17 -08:00 @@ -779,6 +779,7 @@ strcmp(model, "mk48t59") && strcmp(model, "m5819") && strcmp(model, "m5819p") && + strcmp(model, "m5823") && strcmp(model, "ds1287")) { if (cbus != NULL) { prom_printf("clock_probe: Central bus lacks timer chip.\n"); @@ -838,7 +839,8 @@ if (!strcmp(model, "ds1287") || !strcmp(model, "m5819") || - !strcmp(model, "m5819p")) { + !strcmp(model, "m5819p") || + !strcmp(model, "m5823")) { ds1287_regs = edev->resource[0].start; } else { mstk48t59_regs = edev->resource[0].start; @@ -859,7 +861,8 @@ } if (!strcmp(model, "ds1287") || !strcmp(model, "m5819") || - !strcmp(model, "m5819p")) { + !strcmp(model, "m5819p") || + !strcmp(model, "m5823")) { ds1287_regs = isadev->resource.start; } else { mstk48t59_regs = isadev->resource.start; diff -Nru a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c --- a/arch/sparc64/mm/generic.c 2005-03-07 14:54:18 -08:00 +++ b/arch/sparc64/mm/generic.c 2005-03-07 14:54:18 -08:00 @@ -25,8 +25,11 @@ * side-effect bit will be turned off. This is used as a * performance improvement on FFB/AFB. -DaveM */ -static inline void io_remap_pte_range(pte_t * pte, unsigned long address, unsigned long size, - unsigned long offset, pgprot_t prot, int space) +static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, + unsigned long address, + unsigned long size, + unsigned long offset, pgprot_t prot, + int space) { unsigned long end; @@ -67,14 +70,14 @@ pte_val(entry) &= ~(_PAGE_E); do { BUG_ON(!pte_none(*pte)); - set_pte(pte, entry); + set_pte_at(mm, address, pte, entry); address += PAGE_SIZE; pte++; } while (address < curend); } while (address < end); } -static inline int io_remap_pmd_range(pmd_t * pmd, unsigned long address, unsigned long size, +static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -85,10 +88,10 @@ end = PGDIR_SIZE; offset -= address; do { - pte_t * pte = pte_alloc_map(current->mm, pmd, address); + pte_t * pte = pte_alloc_map(mm, pmd, address); if (!pte) return -ENOMEM; - io_remap_pte_range(pte, address, end - address, address + offset, prot, space); + io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); pte_unmap(pte); address = (address + PMD_SIZE) & PMD_MASK; pmd++; @@ -96,7 +99,7 @@ return 0; } -static inline int io_remap_pud_range(pud_t * pud, unsigned long address, unsigned long size, +static inline int io_remap_pud_range(struct mm_struct *mm, pud_t * pud, unsigned long address, unsigned long size, unsigned long offset, pgprot_t prot, int space) { unsigned long end; @@ -107,10 +110,10 @@ end = PUD_SIZE; offset -= address; do { - pmd_t *pmd = pmd_alloc(current->mm, pud, address); + pmd_t *pmd = pmd_alloc(mm, pud, address); if (!pud) return -ENOMEM; - io_remap_pmd_range(pmd, address, end - address, address + offset, prot, space); + io_remap_pmd_range(mm, pmd, address, end - address, address + offset, prot, space); address = (address + PUD_SIZE) & PUD_MASK; pud++; } while (address < end); @@ -132,11 +135,11 @@ spin_lock(&mm->page_table_lock); while (from < end) { - pud_t *pud = pud_alloc(current->mm, dir, from); + pud_t *pud = pud_alloc(mm, dir, from); error = -ENOMEM; if (!pud) break; - error = io_remap_pud_range(pud, from, end - from, offset + from, prot, space); + error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space); if (error) break; from = (from + PGDIR_SIZE) & PGDIR_MASK; diff -Nru a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c --- a/arch/sparc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/mm/hugetlbpage.c 2005-03-07 14:54:17 -08:00 @@ -62,6 +62,7 @@ #define mk_pte_huge(entry) do { pte_val(entry) |= _PAGE_SZHUGE; } while (0) static void set_huge_pte(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long addr, struct page *page, pte_t * page_table, int write_access) { unsigned long i; @@ -78,8 +79,9 @@ mk_pte_huge(entry); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - set_pte(page_table, entry); + set_pte_at(mm, addr, page_table, entry); page_table++; + addr += PAGE_SIZE; pte_val(entry) += PAGE_SIZE; } @@ -116,12 +118,12 @@ ptepage = pte_page(entry); get_page(ptepage); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - set_pte(dst_pte, entry); + set_pte_at(dst, addr, dst_pte, entry); pte_val(entry) += PAGE_SIZE; dst_pte++; + addr += PAGE_SIZE; } dst->rss += (HPAGE_SIZE / PAGE_SIZE); - addr += HPAGE_SIZE; } return 0; @@ -207,7 +209,7 @@ page = pte_page(*pte); put_page(page); for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { - pte_clear(pte); + pte_clear(mm, address+(i*PAGE_SIZE), pte); pte++; } } @@ -261,7 +263,7 @@ goto out; } } - set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE); + set_huge_pte(mm, vma, addr, page, pte, vma->vm_flags & VM_WRITE); } out: spin_unlock(&mm->page_table_lock); diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c --- a/arch/sparc64/mm/init.c 2005-03-07 14:54:16 -08:00 +++ b/arch/sparc64/mm/init.c 2005-03-07 14:54:16 -08:00 @@ -431,7 +431,8 @@ if (tlb_type == spitfire) val &= ~0x0003fe0000000000UL; - set_pte (ptep, __pte(val | _PAGE_MODIFIED)); + set_pte_at(&init_mm, vaddr, + ptep, __pte(val | _PAGE_MODIFIED)); trans[i].data += BASE_PAGE_SIZE; } } diff -Nru a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c --- a/arch/sparc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 +++ b/arch/sparc64/mm/tlb.c 2005-03-07 14:54:17 -08:00 @@ -41,24 +41,12 @@ } } -void tlb_batch_add(pte_t *ptep, pte_t orig) +void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig) { struct mmu_gather *mp = &__get_cpu_var(mmu_gathers); - struct page *ptepage; - struct mm_struct *mm; - unsigned long vaddr, nr; + unsigned long nr; - ptepage = virt_to_page(ptep); - mm = (struct mm_struct *) ptepage->mapping; - - /* It is more efficient to let flush_tlb_kernel_range() - * handle these cases. - */ - if (mm == &init_mm) - return; - - vaddr = ptepage->index + - (((unsigned long)ptep & ~PAGE_MASK) * PTRS_PER_PTE); + vaddr &= PAGE_MASK; if (pte_exec(orig)) vaddr |= 0x1UL; diff -Nru a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c --- a/arch/um/kernel/process_kern.c 2005-03-07 14:54:17 -08:00 +++ b/arch/um/kernel/process_kern.c 2005-03-07 14:54:17 -08:00 @@ -21,6 +21,7 @@ #include "linux/spinlock.h" #include "linux/proc_fs.h" #include "linux/ptrace.h" +#include "linux/random.h" #include "asm/unistd.h" #include "asm/mman.h" #include "asm/segment.h" @@ -478,6 +479,14 @@ return 2; } + +unsigned long arch_align_stack(unsigned long sp) +{ + if (randomize_va_space) + sp -= get_random_int() % 8192; + return sp & ~0xf; +} + /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/defconfig 2005-03-07 14:54:17 -08:00 @@ -672,7 +672,6 @@ # CONFIG_AGP=y CONFIG_AGP_AMD64=y -# CONFIG_AGP_INTEL_MCH is not set # CONFIG_DRM is not set # CONFIG_MWAVE is not set CONFIG_RAW_DRIVER=y diff -Nru a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S --- a/arch/x86_64/ia32/ia32entry.S 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/ia32/ia32entry.S 2005-03-07 14:54:17 -08:00 @@ -590,7 +590,7 @@ .quad compat_sys_mq_notify .quad compat_sys_mq_getsetattr .quad quiet_ni_syscall /* reserved for kexec */ - .quad sys32_waitid + .quad compat_sys_waitid .quad quiet_ni_syscall /* sys_altroot */ .quad sys_add_key .quad sys_request_key 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 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/ia32/sys_ia32.c 2005-03-07 14:54:17 -08:00 @@ -955,32 +955,6 @@ return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); } -asmlinkage long sys32_waitid(int which, compat_pid_t pid, - compat_siginfo_t __user *uinfo, int options, - struct compat_rusage __user *uru) -{ - siginfo_t info; - struct rusage ru; - 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, - uru ? &ru : NULL); - set_fs (old_fs); - - if (ret < 0 || info.si_signo == 0) - return ret; - - if (uru && (ret = put_compat_rusage(&ru, uru))) - return ret; - - BUG_ON(info.si_code & __SI_MASK); - info.si_code |= __SI_CHLD; - return copy_siginfo_to_user32(uinfo, &info); -} - /* * Some system calls that need sign extended arguments. This could be done by a generic wrapper. */ 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 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/kernel/pci-gart.c 2005-03-07 14:54:17 -08:00 @@ -789,7 +789,7 @@ /* Add other K8 AGP bridge drivers here */ no_agp = no_agp || (agp_amd64_init() < 0) || - (agp_copy_info(&info) < 0); + (agp_copy_info(agp_bridge, &info) < 0); #endif if (swiotlb) { diff -Nru a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c --- a/arch/x86_64/kernel/process.c 2005-03-07 14:54:17 -08:00 +++ b/arch/x86_64/kernel/process.c 2005-03-07 14:54:17 -08:00 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -748,4 +749,11 @@ elf_core_copy_regs(regs, &ptregs); return 1; +} + +unsigned long arch_align_stack(unsigned long sp) +{ + if (randomize_va_space) + sp -= get_random_int() % 8192; + return sp & ~0xf; } diff -Nru a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c --- a/arch/x86_64/pci/mmconfig.c 2005-03-07 14:54:16 -08:00 +++ b/arch/x86_64/pci/mmconfig.c 2005-03-07 14:54:16 -08:00 @@ -17,12 +17,13 @@ /* Static virtual mapping of the MMCONFIG aperture */ char *pci_mmcfg_virt; -static inline char *pci_dev_base(int bus, int devfn) +static inline char *pci_dev_base(unsigned int bus, unsigned int devfn) { return pci_mmcfg_virt + ((bus << 20) | (devfn << 12)); } -static int pci_mmcfg_read(int seg, int bus, int devfn, int reg, int len, u32 *value) +static int pci_mmcfg_read(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *value) { char *addr = pci_dev_base(bus, devfn); @@ -44,7 +45,8 @@ return 0; } -static int pci_mmcfg_write(int seg, int bus, int devfn, int reg, int len, u32 value) +static int pci_mmcfg_write(unsigned int seg, unsigned int bus, + unsigned int devfn, int reg, int len, u32 value) { char *addr = pci_dev_base(bus,devfn); diff -Nru a/crypto/Kconfig b/crypto/Kconfig --- a/crypto/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/crypto/Kconfig 2005-03-07 14:54:18 -08:00 @@ -79,6 +79,19 @@ See also: +config CRYPTO_TGR192 + tristate "Tiger digest algorithms" + depends on CRYPTO + help + Tiger hash algorithm 192, 160 and 128-bit hashes + + Tiger is a hash function optimized for 64-bit processors while + still having decent performance on 32-bit processors. + Tiger was developed by Ross Anderson and Eli Biham. + + See also: + . + config CRYPTO_DES tristate "DES and Triple DES EDE cipher algorithms" depends on CRYPTO diff -Nru a/crypto/Makefile b/crypto/Makefile --- a/crypto/Makefile 2005-03-07 14:54:18 -08:00 +++ b/crypto/Makefile 2005-03-07 14:54:18 -08:00 @@ -15,6 +15,7 @@ obj-$(CONFIG_CRYPTO_SHA256) += sha256.o obj-$(CONFIG_CRYPTO_SHA512) += sha512.o obj-$(CONFIG_CRYPTO_WP512) += wp512.o +obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o obj-$(CONFIG_CRYPTO_DES) += des.o obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o diff -Nru a/crypto/tcrypt.c b/crypto/tcrypt.c --- a/crypto/tcrypt.c 2005-03-07 14:54:18 -08:00 +++ b/crypto/tcrypt.c 2005-03-07 14:54:18 -08:00 @@ -695,6 +695,9 @@ test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS); test_hash("wp384", wp384_tv_template, WP384_TEST_VECTORS); test_hash("wp256", wp256_tv_template, WP256_TEST_VECTORS); + test_hash("tgr192", tgr192_tv_template, TGR192_TEST_VECTORS); + test_hash("tgr160", tgr160_tv_template, TGR160_TEST_VECTORS); + test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS); test_deflate(); test_crc32c(); #ifdef CONFIG_CRYPTO_HMAC @@ -830,6 +833,19 @@ test_cipher ("anubis", MODE_ECB, DECRYPT, anubis_dec_tv_template, ANUBIS_DEC_TEST_VECTORS); test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); + break; + + case 27: + test_hash("tgr192", tgr192_tv_template, TGR192_TEST_VECTORS); + break; + + case 28: + + test_hash("tgr160", tgr160_tv_template, TGR160_TEST_VECTORS); + break; + + case 29: + test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS); break; #ifdef CONFIG_CRYPTO_HMAC diff -Nru a/crypto/tcrypt.h b/crypto/tcrypt.h --- a/crypto/tcrypt.h 2005-03-07 14:54:18 -08:00 +++ b/crypto/tcrypt.h 2005-03-07 14:54:18 -08:00 @@ -553,6 +553,137 @@ }, }; +/* + * TIGER test vectors from Tiger website + */ +#define TGR192_TEST_VECTORS 6 + +static struct hash_testvec tgr192_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, + 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f, + 0xf3, 0x73, 0xde, 0x2d, 0x49, 0x58, 0x4e, 0x7a }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, + 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf, + 0x93, 0x5f, 0x7b, 0x95, 0x1c, 0x13, 0x29, 0x51 }, + }, { + .plaintext = "Tiger", + .psize = 5, + .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, + 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec, + 0x37, 0x79, 0x0c, 0x11, 0x6f, 0x9d, 0x2b, 0xdf }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", + .psize = 64, + .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, + 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e, + 0xb5, 0x86, 0x44, 0x50, 0x34, 0xa5, 0xa3, 0x86 }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", + .psize = 64, + .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, + 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9, + 0x57, 0x89, 0x65, 0x65, 0x97, 0x5f, 0x91, 0x97 }, + }, { + .plaintext = "Tiger - A Fast New Hash Function, " + "by Ross Anderson and Eli Biham, " + "proceedings of Fast Software Encryption 3, " + "Cambridge, 1996.", + .psize = 125, + .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, + 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24, + 0xdd, 0x68, 0x15, 0x1d, 0x50, 0x39, 0x74, 0xfc }, + }, +}; + +#define TGR160_TEST_VECTORS 6 + +static struct hash_testvec tgr160_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, + 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f, + 0xf3, 0x73, 0xde, 0x2d }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, + 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf, + 0x93, 0x5f, 0x7b, 0x95 }, + }, { + .plaintext = "Tiger", + .psize = 5, + .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, + 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec, + 0x37, 0x79, 0x0c, 0x11 }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", + .psize = 64, + .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, + 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e, + 0xb5, 0x86, 0x44, 0x50 }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", + .psize = 64, + .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, + 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9, + 0x57, 0x89, 0x65, 0x65 }, + }, { + .plaintext = "Tiger - A Fast New Hash Function, " + "by Ross Anderson and Eli Biham, " + "proceedings of Fast Software Encryption 3, " + "Cambridge, 1996.", + .psize = 125, + .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, + 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24, + 0xdd, 0x68, 0x15, 0x1d }, + }, +}; + +#define TGR128_TEST_VECTORS 6 + +static struct hash_testvec tgr128_tv_template[] = { + { + .plaintext = "", + .psize = 0, + .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32, + 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f }, + }, { + .plaintext = "abc", + .psize = 3, + .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a, + 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf }, + }, { + .plaintext = "Tiger", + .psize = 5, + .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd, + 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-", + .psize = 64, + .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7, + 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e }, + }, { + .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789", + .psize = 64, + .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48, + 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9 }, + }, { + .plaintext = "Tiger - A Fast New Hash Function, " + "by Ross Anderson and Eli Biham, " + "proceedings of Fast Software Encryption 3, " + "Cambridge, 1996.", + .psize = 125, + .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63, + 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24 }, + }, +}; #ifdef CONFIG_CRYPTO_HMAC /* diff -Nru a/crypto/tgr192.c b/crypto/tgr192.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/crypto/tgr192.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,735 @@ +/* + * Cryptographic API. + * + * Tiger hashing Algorithm + * + * Copyright (C) 1998 Free Software Foundation, Inc. + * + * The Tiger algorithm was developed by Ross Anderson and Eli Biham. + * It was optimized for 64-bit processors while still delievering + * decent performance on 32 and 16-bit processors. + * + * This version is derived from the GnuPG implementation and the + * Tiger-Perl interface written by Rafael Sevilla + * + * Adapted for Linux Kernel Crypto by Aaron Grothe + * ajgrothe@yahoo.com, February 22, 2005 + * + * 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 TGR192_DIGEST_SIZE 24 +#define TGR160_DIGEST_SIZE 20 +#define TGR128_DIGEST_SIZE 16 + +#define TGR192_BLOCK_SIZE 64 + +struct tgr192_ctx { + u64 a, b, c; + u8 hash[64]; + int count; + u32 nblocks; +}; + +static const u64 sbox1[256] = { + 0x02aab17cf7e90c5eULL, 0xac424b03e243a8ecULL, 0x72cd5be30dd5fcd3ULL, + 0x6d019b93f6f97f3aULL, 0xcd9978ffd21f9193ULL, 0x7573a1c9708029e2ULL, + 0xb164326b922a83c3ULL, 0x46883eee04915870ULL, 0xeaace3057103ece6ULL, + 0xc54169b808a3535cULL, 0x4ce754918ddec47cULL, 0x0aa2f4dfdc0df40cULL, + 0x10b76f18a74dbefaULL, 0xc6ccb6235ad1ab6aULL, 0x13726121572fe2ffULL, + 0x1a488c6f199d921eULL, 0x4bc9f9f4da0007caULL, 0x26f5e6f6e85241c7ULL, + 0x859079dbea5947b6ULL, 0x4f1885c5c99e8c92ULL, 0xd78e761ea96f864bULL, + 0x8e36428c52b5c17dULL, 0x69cf6827373063c1ULL, 0xb607c93d9bb4c56eULL, + 0x7d820e760e76b5eaULL, 0x645c9cc6f07fdc42ULL, 0xbf38a078243342e0ULL, + 0x5f6b343c9d2e7d04ULL, 0xf2c28aeb600b0ec6ULL, 0x6c0ed85f7254bcacULL, + 0x71592281a4db4fe5ULL, 0x1967fa69ce0fed9fULL, 0xfd5293f8b96545dbULL, + 0xc879e9d7f2a7600bULL, 0x860248920193194eULL, 0xa4f9533b2d9cc0b3ULL, + 0x9053836c15957613ULL, 0xdb6dcf8afc357bf1ULL, 0x18beea7a7a370f57ULL, + 0x037117ca50b99066ULL, 0x6ab30a9774424a35ULL, 0xf4e92f02e325249bULL, + 0x7739db07061ccae1ULL, 0xd8f3b49ceca42a05ULL, 0xbd56be3f51382f73ULL, + 0x45faed5843b0bb28ULL, 0x1c813d5c11bf1f83ULL, 0x8af0e4b6d75fa169ULL, + 0x33ee18a487ad9999ULL, 0x3c26e8eab1c94410ULL, 0xb510102bc0a822f9ULL, + 0x141eef310ce6123bULL, 0xfc65b90059ddb154ULL, 0xe0158640c5e0e607ULL, + 0x884e079826c3a3cfULL, 0x930d0d9523c535fdULL, 0x35638d754e9a2b00ULL, + 0x4085fccf40469dd5ULL, 0xc4b17ad28be23a4cULL, 0xcab2f0fc6a3e6a2eULL, + 0x2860971a6b943fcdULL, 0x3dde6ee212e30446ULL, 0x6222f32ae01765aeULL, + 0x5d550bb5478308feULL, 0xa9efa98da0eda22aULL, 0xc351a71686c40da7ULL, + 0x1105586d9c867c84ULL, 0xdcffee85fda22853ULL, 0xccfbd0262c5eef76ULL, + 0xbaf294cb8990d201ULL, 0xe69464f52afad975ULL, 0x94b013afdf133e14ULL, + 0x06a7d1a32823c958ULL, 0x6f95fe5130f61119ULL, 0xd92ab34e462c06c0ULL, + 0xed7bde33887c71d2ULL, 0x79746d6e6518393eULL, 0x5ba419385d713329ULL, + 0x7c1ba6b948a97564ULL, 0x31987c197bfdac67ULL, 0xde6c23c44b053d02ULL, + 0x581c49fed002d64dULL, 0xdd474d6338261571ULL, 0xaa4546c3e473d062ULL, + 0x928fce349455f860ULL, 0x48161bbacaab94d9ULL, 0x63912430770e6f68ULL, + 0x6ec8a5e602c6641cULL, 0x87282515337ddd2bULL, 0x2cda6b42034b701bULL, + 0xb03d37c181cb096dULL, 0xe108438266c71c6fULL, 0x2b3180c7eb51b255ULL, + 0xdf92b82f96c08bbcULL, 0x5c68c8c0a632f3baULL, 0x5504cc861c3d0556ULL, + 0xabbfa4e55fb26b8fULL, 0x41848b0ab3baceb4ULL, 0xb334a273aa445d32ULL, + 0xbca696f0a85ad881ULL, 0x24f6ec65b528d56cULL, 0x0ce1512e90f4524aULL, + 0x4e9dd79d5506d35aULL, 0x258905fac6ce9779ULL, 0x2019295b3e109b33ULL, + 0xf8a9478b73a054ccULL, 0x2924f2f934417eb0ULL, 0x3993357d536d1bc4ULL, + 0x38a81ac21db6ff8bULL, 0x47c4fbf17d6016bfULL, 0x1e0faadd7667e3f5ULL, + 0x7abcff62938beb96ULL, 0xa78dad948fc179c9ULL, 0x8f1f98b72911e50dULL, + 0x61e48eae27121a91ULL, 0x4d62f7ad31859808ULL, 0xeceba345ef5ceaebULL, + 0xf5ceb25ebc9684ceULL, 0xf633e20cb7f76221ULL, 0xa32cdf06ab8293e4ULL, + 0x985a202ca5ee2ca4ULL, 0xcf0b8447cc8a8fb1ULL, 0x9f765244979859a3ULL, + 0xa8d516b1a1240017ULL, 0x0bd7ba3ebb5dc726ULL, 0xe54bca55b86adb39ULL, + 0x1d7a3afd6c478063ULL, 0x519ec608e7669eddULL, 0x0e5715a2d149aa23ULL, + 0x177d4571848ff194ULL, 0xeeb55f3241014c22ULL, 0x0f5e5ca13a6e2ec2ULL, + 0x8029927b75f5c361ULL, 0xad139fabc3d6e436ULL, 0x0d5df1a94ccf402fULL, + 0x3e8bd948bea5dfc8ULL, 0xa5a0d357bd3ff77eULL, 0xa2d12e251f74f645ULL, + 0x66fd9e525e81a082ULL, 0x2e0c90ce7f687a49ULL, 0xc2e8bcbeba973bc5ULL, + 0x000001bce509745fULL, 0x423777bbe6dab3d6ULL, 0xd1661c7eaef06eb5ULL, + 0xa1781f354daacfd8ULL, 0x2d11284a2b16affcULL, 0xf1fc4f67fa891d1fULL, + 0x73ecc25dcb920adaULL, 0xae610c22c2a12651ULL, 0x96e0a810d356b78aULL, + 0x5a9a381f2fe7870fULL, 0xd5ad62ede94e5530ULL, 0xd225e5e8368d1427ULL, + 0x65977b70c7af4631ULL, 0x99f889b2de39d74fULL, 0x233f30bf54e1d143ULL, + 0x9a9675d3d9a63c97ULL, 0x5470554ff334f9a8ULL, 0x166acb744a4f5688ULL, + 0x70c74caab2e4aeadULL, 0xf0d091646f294d12ULL, 0x57b82a89684031d1ULL, + 0xefd95a5a61be0b6bULL, 0x2fbd12e969f2f29aULL, 0x9bd37013feff9fe8ULL, + 0x3f9b0404d6085a06ULL, 0x4940c1f3166cfe15ULL, 0x09542c4dcdf3defbULL, + 0xb4c5218385cd5ce3ULL, 0xc935b7dc4462a641ULL, 0x3417f8a68ed3b63fULL, + 0xb80959295b215b40ULL, 0xf99cdaef3b8c8572ULL, 0x018c0614f8fcb95dULL, + 0x1b14accd1a3acdf3ULL, 0x84d471f200bb732dULL, 0xc1a3110e95e8da16ULL, + 0x430a7220bf1a82b8ULL, 0xb77e090d39df210eULL, 0x5ef4bd9f3cd05e9dULL, + 0x9d4ff6da7e57a444ULL, 0xda1d60e183d4a5f8ULL, 0xb287c38417998e47ULL, + 0xfe3edc121bb31886ULL, 0xc7fe3ccc980ccbefULL, 0xe46fb590189bfd03ULL, + 0x3732fd469a4c57dcULL, 0x7ef700a07cf1ad65ULL, 0x59c64468a31d8859ULL, + 0x762fb0b4d45b61f6ULL, 0x155baed099047718ULL, 0x68755e4c3d50baa6ULL, + 0xe9214e7f22d8b4dfULL, 0x2addbf532eac95f4ULL, 0x32ae3909b4bd0109ULL, + 0x834df537b08e3450ULL, 0xfa209da84220728dULL, 0x9e691d9b9efe23f7ULL, + 0x0446d288c4ae8d7fULL, 0x7b4cc524e169785bULL, 0x21d87f0135ca1385ULL, + 0xcebb400f137b8aa5ULL, 0x272e2b66580796beULL, 0x3612264125c2b0deULL, + 0x057702bdad1efbb2ULL, 0xd4babb8eacf84be9ULL, 0x91583139641bc67bULL, + 0x8bdc2de08036e024ULL, 0x603c8156f49f68edULL, 0xf7d236f7dbef5111ULL, + 0x9727c4598ad21e80ULL, 0xa08a0896670a5fd7ULL, 0xcb4a8f4309eba9cbULL, + 0x81af564b0f7036a1ULL, 0xc0b99aa778199abdULL, 0x959f1ec83fc8e952ULL, + 0x8c505077794a81b9ULL, 0x3acaaf8f056338f0ULL, 0x07b43f50627a6778ULL, + 0x4a44ab49f5eccc77ULL, 0x3bc3d6e4b679ee98ULL, 0x9cc0d4d1cf14108cULL, + 0x4406c00b206bc8a0ULL, 0x82a18854c8d72d89ULL, 0x67e366b35c3c432cULL, + 0xb923dd61102b37f2ULL, 0x56ab2779d884271dULL, 0xbe83e1b0ff1525afULL, + 0xfb7c65d4217e49a9ULL, 0x6bdbe0e76d48e7d4ULL, 0x08df828745d9179eULL, + 0x22ea6a9add53bd34ULL, 0xe36e141c5622200aULL, 0x7f805d1b8cb750eeULL, + 0xafe5c7a59f58e837ULL, 0xe27f996a4fb1c23cULL, 0xd3867dfb0775f0d0ULL, + 0xd0e673de6e88891aULL, 0x123aeb9eafb86c25ULL, 0x30f1d5d5c145b895ULL, + 0xbb434a2dee7269e7ULL, 0x78cb67ecf931fa38ULL, 0xf33b0372323bbf9cULL, + 0x52d66336fb279c74ULL, 0x505f33ac0afb4eaaULL, 0xe8a5cd99a2cce187ULL, + 0x534974801e2d30bbULL, 0x8d2d5711d5876d90ULL, 0x1f1a412891bc038eULL, + 0xd6e2e71d82e56648ULL, 0x74036c3a497732b7ULL, 0x89b67ed96361f5abULL, + 0xffed95d8f1ea02a2ULL, 0xe72b3bd61464d43dULL, 0xa6300f170bdc4820ULL, + 0xebc18760ed78a77aULL +}; + +static const u64 sbox2[256] = { + 0xe6a6be5a05a12138ULL, 0xb5a122a5b4f87c98ULL, 0x563c6089140b6990ULL, + 0x4c46cb2e391f5dd5ULL, 0xd932addbc9b79434ULL, 0x08ea70e42015aff5ULL, + 0xd765a6673e478cf1ULL, 0xc4fb757eab278d99ULL, 0xdf11c6862d6e0692ULL, + 0xddeb84f10d7f3b16ULL, 0x6f2ef604a665ea04ULL, 0x4a8e0f0ff0e0dfb3ULL, + 0xa5edeef83dbcba51ULL, 0xfc4f0a2a0ea4371eULL, 0xe83e1da85cb38429ULL, + 0xdc8ff882ba1b1ce2ULL, 0xcd45505e8353e80dULL, 0x18d19a00d4db0717ULL, + 0x34a0cfeda5f38101ULL, 0x0be77e518887caf2ULL, 0x1e341438b3c45136ULL, + 0xe05797f49089ccf9ULL, 0xffd23f9df2591d14ULL, 0x543dda228595c5cdULL, + 0x661f81fd99052a33ULL, 0x8736e641db0f7b76ULL, 0x15227725418e5307ULL, + 0xe25f7f46162eb2faULL, 0x48a8b2126c13d9feULL, 0xafdc541792e76eeaULL, + 0x03d912bfc6d1898fULL, 0x31b1aafa1b83f51bULL, 0xf1ac2796e42ab7d9ULL, + 0x40a3a7d7fcd2ebacULL, 0x1056136d0afbbcc5ULL, 0x7889e1dd9a6d0c85ULL, + 0xd33525782a7974aaULL, 0xa7e25d09078ac09bULL, 0xbd4138b3eac6edd0ULL, + 0x920abfbe71eb9e70ULL, 0xa2a5d0f54fc2625cULL, 0xc054e36b0b1290a3ULL, + 0xf6dd59ff62fe932bULL, 0x3537354511a8ac7dULL, 0xca845e9172fadcd4ULL, + 0x84f82b60329d20dcULL, 0x79c62ce1cd672f18ULL, 0x8b09a2add124642cULL, + 0xd0c1e96a19d9e726ULL, 0x5a786a9b4ba9500cULL, 0x0e020336634c43f3ULL, + 0xc17b474aeb66d822ULL, 0x6a731ae3ec9baac2ULL, 0x8226667ae0840258ULL, + 0x67d4567691caeca5ULL, 0x1d94155c4875adb5ULL, 0x6d00fd985b813fdfULL, + 0x51286efcb774cd06ULL, 0x5e8834471fa744afULL, 0xf72ca0aee761ae2eULL, + 0xbe40e4cdaee8e09aULL, 0xe9970bbb5118f665ULL, 0x726e4beb33df1964ULL, + 0x703b000729199762ULL, 0x4631d816f5ef30a7ULL, 0xb880b5b51504a6beULL, + 0x641793c37ed84b6cULL, 0x7b21ed77f6e97d96ULL, 0x776306312ef96b73ULL, + 0xae528948e86ff3f4ULL, 0x53dbd7f286a3f8f8ULL, 0x16cadce74cfc1063ULL, + 0x005c19bdfa52c6ddULL, 0x68868f5d64d46ad3ULL, 0x3a9d512ccf1e186aULL, + 0x367e62c2385660aeULL, 0xe359e7ea77dcb1d7ULL, 0x526c0773749abe6eULL, + 0x735ae5f9d09f734bULL, 0x493fc7cc8a558ba8ULL, 0xb0b9c1533041ab45ULL, + 0x321958ba470a59bdULL, 0x852db00b5f46c393ULL, 0x91209b2bd336b0e5ULL, + 0x6e604f7d659ef19fULL, 0xb99a8ae2782ccb24ULL, 0xccf52ab6c814c4c7ULL, + 0x4727d9afbe11727bULL, 0x7e950d0c0121b34dULL, 0x756f435670ad471fULL, + 0xf5add442615a6849ULL, 0x4e87e09980b9957aULL, 0x2acfa1df50aee355ULL, + 0xd898263afd2fd556ULL, 0xc8f4924dd80c8fd6ULL, 0xcf99ca3d754a173aULL, + 0xfe477bacaf91bf3cULL, 0xed5371f6d690c12dULL, 0x831a5c285e687094ULL, + 0xc5d3c90a3708a0a4ULL, 0x0f7f903717d06580ULL, 0x19f9bb13b8fdf27fULL, + 0xb1bd6f1b4d502843ULL, 0x1c761ba38fff4012ULL, 0x0d1530c4e2e21f3bULL, + 0x8943ce69a7372c8aULL, 0xe5184e11feb5ce66ULL, 0x618bdb80bd736621ULL, + 0x7d29bad68b574d0bULL, 0x81bb613e25e6fe5bULL, 0x071c9c10bc07913fULL, + 0xc7beeb7909ac2d97ULL, 0xc3e58d353bc5d757ULL, 0xeb017892f38f61e8ULL, + 0xd4effb9c9b1cc21aULL, 0x99727d26f494f7abULL, 0xa3e063a2956b3e03ULL, + 0x9d4a8b9a4aa09c30ULL, 0x3f6ab7d500090fb4ULL, 0x9cc0f2a057268ac0ULL, + 0x3dee9d2dedbf42d1ULL, 0x330f49c87960a972ULL, 0xc6b2720287421b41ULL, + 0x0ac59ec07c00369cULL, 0xef4eac49cb353425ULL, 0xf450244eef0129d8ULL, + 0x8acc46e5caf4deb6ULL, 0x2ffeab63989263f7ULL, 0x8f7cb9fe5d7a4578ULL, + 0x5bd8f7644e634635ULL, 0x427a7315bf2dc900ULL, 0x17d0c4aa2125261cULL, + 0x3992486c93518e50ULL, 0xb4cbfee0a2d7d4c3ULL, 0x7c75d6202c5ddd8dULL, + 0xdbc295d8e35b6c61ULL, 0x60b369d302032b19ULL, 0xce42685fdce44132ULL, + 0x06f3ddb9ddf65610ULL, 0x8ea4d21db5e148f0ULL, 0x20b0fce62fcd496fULL, + 0x2c1b912358b0ee31ULL, 0xb28317b818f5a308ULL, 0xa89c1e189ca6d2cfULL, + 0x0c6b18576aaadbc8ULL, 0xb65deaa91299fae3ULL, 0xfb2b794b7f1027e7ULL, + 0x04e4317f443b5bebULL, 0x4b852d325939d0a6ULL, 0xd5ae6beefb207ffcULL, + 0x309682b281c7d374ULL, 0xbae309a194c3b475ULL, 0x8cc3f97b13b49f05ULL, + 0x98a9422ff8293967ULL, 0x244b16b01076ff7cULL, 0xf8bf571c663d67eeULL, + 0x1f0d6758eee30da1ULL, 0xc9b611d97adeb9b7ULL, 0xb7afd5887b6c57a2ULL, + 0x6290ae846b984fe1ULL, 0x94df4cdeacc1a5fdULL, 0x058a5bd1c5483affULL, + 0x63166cc142ba3c37ULL, 0x8db8526eb2f76f40ULL, 0xe10880036f0d6d4eULL, + 0x9e0523c9971d311dULL, 0x45ec2824cc7cd691ULL, 0x575b8359e62382c9ULL, + 0xfa9e400dc4889995ULL, 0xd1823ecb45721568ULL, 0xdafd983b8206082fULL, + 0xaa7d29082386a8cbULL, 0x269fcd4403b87588ULL, 0x1b91f5f728bdd1e0ULL, + 0xe4669f39040201f6ULL, 0x7a1d7c218cf04adeULL, 0x65623c29d79ce5ceULL, + 0x2368449096c00bb1ULL, 0xab9bf1879da503baULL, 0xbc23ecb1a458058eULL, + 0x9a58df01bb401eccULL, 0xa070e868a85f143dULL, 0x4ff188307df2239eULL, + 0x14d565b41a641183ULL, 0xee13337452701602ULL, 0x950e3dcf3f285e09ULL, + 0x59930254b9c80953ULL, 0x3bf299408930da6dULL, 0xa955943f53691387ULL, + 0xa15edecaa9cb8784ULL, 0x29142127352be9a0ULL, 0x76f0371fff4e7afbULL, + 0x0239f450274f2228ULL, 0xbb073af01d5e868bULL, 0xbfc80571c10e96c1ULL, + 0xd267088568222e23ULL, 0x9671a3d48e80b5b0ULL, 0x55b5d38ae193bb81ULL, + 0x693ae2d0a18b04b8ULL, 0x5c48b4ecadd5335fULL, 0xfd743b194916a1caULL, + 0x2577018134be98c4ULL, 0xe77987e83c54a4adULL, 0x28e11014da33e1b9ULL, + 0x270cc59e226aa213ULL, 0x71495f756d1a5f60ULL, 0x9be853fb60afef77ULL, + 0xadc786a7f7443dbfULL, 0x0904456173b29a82ULL, 0x58bc7a66c232bd5eULL, + 0xf306558c673ac8b2ULL, 0x41f639c6b6c9772aULL, 0x216defe99fda35daULL, + 0x11640cc71c7be615ULL, 0x93c43694565c5527ULL, 0xea038e6246777839ULL, + 0xf9abf3ce5a3e2469ULL, 0x741e768d0fd312d2ULL, 0x0144b883ced652c6ULL, + 0xc20b5a5ba33f8552ULL, 0x1ae69633c3435a9dULL, 0x97a28ca4088cfdecULL, + 0x8824a43c1e96f420ULL, 0x37612fa66eeea746ULL, 0x6b4cb165f9cf0e5aULL, + 0x43aa1c06a0abfb4aULL, 0x7f4dc26ff162796bULL, 0x6cbacc8e54ed9b0fULL, + 0xa6b7ffefd2bb253eULL, 0x2e25bc95b0a29d4fULL, 0x86d6a58bdef1388cULL, + 0xded74ac576b6f054ULL, 0x8030bdbc2b45805dULL, 0x3c81af70e94d9289ULL, + 0x3eff6dda9e3100dbULL, 0xb38dc39fdfcc8847ULL, 0x123885528d17b87eULL, + 0xf2da0ed240b1b642ULL, 0x44cefadcd54bf9a9ULL, 0x1312200e433c7ee6ULL, + 0x9ffcc84f3a78c748ULL, 0xf0cd1f72248576bbULL, 0xec6974053638cfe4ULL, + 0x2ba7b67c0cec4e4cULL, 0xac2f4df3e5ce32edULL, 0xcb33d14326ea4c11ULL, + 0xa4e9044cc77e58bcULL, 0x5f513293d934fcefULL, 0x5dc9645506e55444ULL, + 0x50de418f317de40aULL, 0x388cb31a69dde259ULL, 0x2db4a83455820a86ULL, + 0x9010a91e84711ae9ULL, 0x4df7f0b7b1498371ULL, 0xd62a2eabc0977179ULL, + 0x22fac097aa8d5c0eULL +}; + +static const u64 sbox3[256] = { + 0xf49fcc2ff1daf39bULL, 0x487fd5c66ff29281ULL, 0xe8a30667fcdca83fULL, + 0x2c9b4be3d2fcce63ULL, 0xda3ff74b93fbbbc2ULL, 0x2fa165d2fe70ba66ULL, + 0xa103e279970e93d4ULL, 0xbecdec77b0e45e71ULL, 0xcfb41e723985e497ULL, + 0xb70aaa025ef75017ULL, 0xd42309f03840b8e0ULL, 0x8efc1ad035898579ULL, + 0x96c6920be2b2abc5ULL, 0x66af4163375a9172ULL, 0x2174abdcca7127fbULL, + 0xb33ccea64a72ff41ULL, 0xf04a4933083066a5ULL, 0x8d970acdd7289af5ULL, + 0x8f96e8e031c8c25eULL, 0xf3fec02276875d47ULL, 0xec7bf310056190ddULL, + 0xf5adb0aebb0f1491ULL, 0x9b50f8850fd58892ULL, 0x4975488358b74de8ULL, + 0xa3354ff691531c61ULL, 0x0702bbe481d2c6eeULL, 0x89fb24057deded98ULL, + 0xac3075138596e902ULL, 0x1d2d3580172772edULL, 0xeb738fc28e6bc30dULL, + 0x5854ef8f63044326ULL, 0x9e5c52325add3bbeULL, 0x90aa53cf325c4623ULL, + 0xc1d24d51349dd067ULL, 0x2051cfeea69ea624ULL, 0x13220f0a862e7e4fULL, + 0xce39399404e04864ULL, 0xd9c42ca47086fcb7ULL, 0x685ad2238a03e7ccULL, + 0x066484b2ab2ff1dbULL, 0xfe9d5d70efbf79ecULL, 0x5b13b9dd9c481854ULL, + 0x15f0d475ed1509adULL, 0x0bebcd060ec79851ULL, 0xd58c6791183ab7f8ULL, + 0xd1187c5052f3eee4ULL, 0xc95d1192e54e82ffULL, 0x86eea14cb9ac6ca2ULL, + 0x3485beb153677d5dULL, 0xdd191d781f8c492aULL, 0xf60866baa784ebf9ULL, + 0x518f643ba2d08c74ULL, 0x8852e956e1087c22ULL, 0xa768cb8dc410ae8dULL, + 0x38047726bfec8e1aULL, 0xa67738b4cd3b45aaULL, 0xad16691cec0dde19ULL, + 0xc6d4319380462e07ULL, 0xc5a5876d0ba61938ULL, 0x16b9fa1fa58fd840ULL, + 0x188ab1173ca74f18ULL, 0xabda2f98c99c021fULL, 0x3e0580ab134ae816ULL, + 0x5f3b05b773645abbULL, 0x2501a2be5575f2f6ULL, 0x1b2f74004e7e8ba9ULL, + 0x1cd7580371e8d953ULL, 0x7f6ed89562764e30ULL, 0xb15926ff596f003dULL, + 0x9f65293da8c5d6b9ULL, 0x6ecef04dd690f84cULL, 0x4782275fff33af88ULL, + 0xe41433083f820801ULL, 0xfd0dfe409a1af9b5ULL, 0x4325a3342cdb396bULL, + 0x8ae77e62b301b252ULL, 0xc36f9e9f6655615aULL, 0x85455a2d92d32c09ULL, + 0xf2c7dea949477485ULL, 0x63cfb4c133a39ebaULL, 0x83b040cc6ebc5462ULL, + 0x3b9454c8fdb326b0ULL, 0x56f56a9e87ffd78cULL, 0x2dc2940d99f42bc6ULL, + 0x98f7df096b096e2dULL, 0x19a6e01e3ad852bfULL, 0x42a99ccbdbd4b40bULL, + 0xa59998af45e9c559ULL, 0x366295e807d93186ULL, 0x6b48181bfaa1f773ULL, + 0x1fec57e2157a0a1dULL, 0x4667446af6201ad5ULL, 0xe615ebcacfb0f075ULL, + 0xb8f31f4f68290778ULL, 0x22713ed6ce22d11eULL, 0x3057c1a72ec3c93bULL, + 0xcb46acc37c3f1f2fULL, 0xdbb893fd02aaf50eULL, 0x331fd92e600b9fcfULL, + 0xa498f96148ea3ad6ULL, 0xa8d8426e8b6a83eaULL, 0xa089b274b7735cdcULL, + 0x87f6b3731e524a11ULL, 0x118808e5cbc96749ULL, 0x9906e4c7b19bd394ULL, + 0xafed7f7e9b24a20cULL, 0x6509eadeeb3644a7ULL, 0x6c1ef1d3e8ef0edeULL, + 0xb9c97d43e9798fb4ULL, 0xa2f2d784740c28a3ULL, 0x7b8496476197566fULL, + 0x7a5be3e6b65f069dULL, 0xf96330ed78be6f10ULL, 0xeee60de77a076a15ULL, + 0x2b4bee4aa08b9bd0ULL, 0x6a56a63ec7b8894eULL, 0x02121359ba34fef4ULL, + 0x4cbf99f8283703fcULL, 0x398071350caf30c8ULL, 0xd0a77a89f017687aULL, + 0xf1c1a9eb9e423569ULL, 0x8c7976282dee8199ULL, 0x5d1737a5dd1f7abdULL, + 0x4f53433c09a9fa80ULL, 0xfa8b0c53df7ca1d9ULL, 0x3fd9dcbc886ccb77ULL, + 0xc040917ca91b4720ULL, 0x7dd00142f9d1dcdfULL, 0x8476fc1d4f387b58ULL, + 0x23f8e7c5f3316503ULL, 0x032a2244e7e37339ULL, 0x5c87a5d750f5a74bULL, + 0x082b4cc43698992eULL, 0xdf917becb858f63cULL, 0x3270b8fc5bf86ddaULL, + 0x10ae72bb29b5dd76ULL, 0x576ac94e7700362bULL, 0x1ad112dac61efb8fULL, + 0x691bc30ec5faa427ULL, 0xff246311cc327143ULL, 0x3142368e30e53206ULL, + 0x71380e31e02ca396ULL, 0x958d5c960aad76f1ULL, 0xf8d6f430c16da536ULL, + 0xc8ffd13f1be7e1d2ULL, 0x7578ae66004ddbe1ULL, 0x05833f01067be646ULL, + 0xbb34b5ad3bfe586dULL, 0x095f34c9a12b97f0ULL, 0x247ab64525d60ca8ULL, + 0xdcdbc6f3017477d1ULL, 0x4a2e14d4decad24dULL, 0xbdb5e6d9be0a1eebULL, + 0x2a7e70f7794301abULL, 0xdef42d8a270540fdULL, 0x01078ec0a34c22c1ULL, + 0xe5de511af4c16387ULL, 0x7ebb3a52bd9a330aULL, 0x77697857aa7d6435ULL, + 0x004e831603ae4c32ULL, 0xe7a21020ad78e312ULL, 0x9d41a70c6ab420f2ULL, + 0x28e06c18ea1141e6ULL, 0xd2b28cbd984f6b28ULL, 0x26b75f6c446e9d83ULL, + 0xba47568c4d418d7fULL, 0xd80badbfe6183d8eULL, 0x0e206d7f5f166044ULL, + 0xe258a43911cbca3eULL, 0x723a1746b21dc0bcULL, 0xc7caa854f5d7cdd3ULL, + 0x7cac32883d261d9cULL, 0x7690c26423ba942cULL, 0x17e55524478042b8ULL, + 0xe0be477656a2389fULL, 0x4d289b5e67ab2da0ULL, 0x44862b9c8fbbfd31ULL, + 0xb47cc8049d141365ULL, 0x822c1b362b91c793ULL, 0x4eb14655fb13dfd8ULL, + 0x1ecbba0714e2a97bULL, 0x6143459d5cde5f14ULL, 0x53a8fbf1d5f0ac89ULL, + 0x97ea04d81c5e5b00ULL, 0x622181a8d4fdb3f3ULL, 0xe9bcd341572a1208ULL, + 0x1411258643cce58aULL, 0x9144c5fea4c6e0a4ULL, 0x0d33d06565cf620fULL, + 0x54a48d489f219ca1ULL, 0xc43e5eac6d63c821ULL, 0xa9728b3a72770dafULL, + 0xd7934e7b20df87efULL, 0xe35503b61a3e86e5ULL, 0xcae321fbc819d504ULL, + 0x129a50b3ac60bfa6ULL, 0xcd5e68ea7e9fb6c3ULL, 0xb01c90199483b1c7ULL, + 0x3de93cd5c295376cULL, 0xaed52edf2ab9ad13ULL, 0x2e60f512c0a07884ULL, + 0xbc3d86a3e36210c9ULL, 0x35269d9b163951ceULL, 0x0c7d6e2ad0cdb5faULL, + 0x59e86297d87f5733ULL, 0x298ef221898db0e7ULL, 0x55000029d1a5aa7eULL, + 0x8bc08ae1b5061b45ULL, 0xc2c31c2b6c92703aULL, 0x94cc596baf25ef42ULL, + 0x0a1d73db22540456ULL, 0x04b6a0f9d9c4179aULL, 0xeffdafa2ae3d3c60ULL, + 0xf7c8075bb49496c4ULL, 0x9cc5c7141d1cd4e3ULL, 0x78bd1638218e5534ULL, + 0xb2f11568f850246aULL, 0xedfabcfa9502bc29ULL, 0x796ce5f2da23051bULL, + 0xaae128b0dc93537cULL, 0x3a493da0ee4b29aeULL, 0xb5df6b2c416895d7ULL, + 0xfcabbd25122d7f37ULL, 0x70810b58105dc4b1ULL, 0xe10fdd37f7882a90ULL, + 0x524dcab5518a3f5cULL, 0x3c9e85878451255bULL, 0x4029828119bd34e2ULL, + 0x74a05b6f5d3ceccbULL, 0xb610021542e13ecaULL, 0x0ff979d12f59e2acULL, + 0x6037da27e4f9cc50ULL, 0x5e92975a0df1847dULL, 0xd66de190d3e623feULL, + 0x5032d6b87b568048ULL, 0x9a36b7ce8235216eULL, 0x80272a7a24f64b4aULL, + 0x93efed8b8c6916f7ULL, 0x37ddbff44cce1555ULL, 0x4b95db5d4b99bd25ULL, + 0x92d3fda169812fc0ULL, 0xfb1a4a9a90660bb6ULL, 0x730c196946a4b9b2ULL, + 0x81e289aa7f49da68ULL, 0x64669a0f83b1a05fULL, 0x27b3ff7d9644f48bULL, + 0xcc6b615c8db675b3ULL, 0x674f20b9bcebbe95ULL, 0x6f31238275655982ULL, + 0x5ae488713e45cf05ULL, 0xbf619f9954c21157ULL, 0xeabac46040a8eae9ULL, + 0x454c6fe9f2c0c1cdULL, 0x419cf6496412691cULL, 0xd3dc3bef265b0f70ULL, + 0x6d0e60f5c3578a9eULL +}; + +static const u64 sbox4[256] = { + 0x5b0e608526323c55ULL, 0x1a46c1a9fa1b59f5ULL, 0xa9e245a17c4c8ffaULL, + 0x65ca5159db2955d7ULL, 0x05db0a76ce35afc2ULL, 0x81eac77ea9113d45ULL, + 0x528ef88ab6ac0a0dULL, 0xa09ea253597be3ffULL, 0x430ddfb3ac48cd56ULL, + 0xc4b3a67af45ce46fULL, 0x4ececfd8fbe2d05eULL, 0x3ef56f10b39935f0ULL, + 0x0b22d6829cd619c6ULL, 0x17fd460a74df2069ULL, 0x6cf8cc8e8510ed40ULL, + 0xd6c824bf3a6ecaa7ULL, 0x61243d581a817049ULL, 0x048bacb6bbc163a2ULL, + 0xd9a38ac27d44cc32ULL, 0x7fddff5baaf410abULL, 0xad6d495aa804824bULL, + 0xe1a6a74f2d8c9f94ULL, 0xd4f7851235dee8e3ULL, 0xfd4b7f886540d893ULL, + 0x247c20042aa4bfdaULL, 0x096ea1c517d1327cULL, 0xd56966b4361a6685ULL, + 0x277da5c31221057dULL, 0x94d59893a43acff7ULL, 0x64f0c51ccdc02281ULL, + 0x3d33bcc4ff6189dbULL, 0xe005cb184ce66af1ULL, 0xff5ccd1d1db99beaULL, + 0xb0b854a7fe42980fULL, 0x7bd46a6a718d4b9fULL, 0xd10fa8cc22a5fd8cULL, + 0xd31484952be4bd31ULL, 0xc7fa975fcb243847ULL, 0x4886ed1e5846c407ULL, + 0x28cddb791eb70b04ULL, 0xc2b00be2f573417fULL, 0x5c9590452180f877ULL, + 0x7a6bddfff370eb00ULL, 0xce509e38d6d9d6a4ULL, 0xebeb0f00647fa702ULL, + 0x1dcc06cf76606f06ULL, 0xe4d9f28ba286ff0aULL, 0xd85a305dc918c262ULL, + 0x475b1d8732225f54ULL, 0x2d4fb51668ccb5feULL, 0xa679b9d9d72bba20ULL, + 0x53841c0d912d43a5ULL, 0x3b7eaa48bf12a4e8ULL, 0x781e0e47f22f1ddfULL, + 0xeff20ce60ab50973ULL, 0x20d261d19dffb742ULL, 0x16a12b03062a2e39ULL, + 0x1960eb2239650495ULL, 0x251c16fed50eb8b8ULL, 0x9ac0c330f826016eULL, + 0xed152665953e7671ULL, 0x02d63194a6369570ULL, 0x5074f08394b1c987ULL, + 0x70ba598c90b25ce1ULL, 0x794a15810b9742f6ULL, 0x0d5925e9fcaf8c6cULL, + 0x3067716cd868744eULL, 0x910ab077e8d7731bULL, 0x6a61bbdb5ac42f61ULL, + 0x93513efbf0851567ULL, 0xf494724b9e83e9d5ULL, 0xe887e1985c09648dULL, + 0x34b1d3c675370cfdULL, 0xdc35e433bc0d255dULL, 0xd0aab84234131be0ULL, + 0x08042a50b48b7eafULL, 0x9997c4ee44a3ab35ULL, 0x829a7b49201799d0ULL, + 0x263b8307b7c54441ULL, 0x752f95f4fd6a6ca6ULL, 0x927217402c08c6e5ULL, + 0x2a8ab754a795d9eeULL, 0xa442f7552f72943dULL, 0x2c31334e19781208ULL, + 0x4fa98d7ceaee6291ULL, 0x55c3862f665db309ULL, 0xbd0610175d53b1f3ULL, + 0x46fe6cb840413f27ULL, 0x3fe03792df0cfa59ULL, 0xcfe700372eb85e8fULL, + 0xa7be29e7adbce118ULL, 0xe544ee5cde8431ddULL, 0x8a781b1b41f1873eULL, + 0xa5c94c78a0d2f0e7ULL, 0x39412e2877b60728ULL, 0xa1265ef3afc9a62cULL, + 0xbcc2770c6a2506c5ULL, 0x3ab66dd5dce1ce12ULL, 0xe65499d04a675b37ULL, + 0x7d8f523481bfd216ULL, 0x0f6f64fcec15f389ULL, 0x74efbe618b5b13c8ULL, + 0xacdc82b714273e1dULL, 0xdd40bfe003199d17ULL, 0x37e99257e7e061f8ULL, + 0xfa52626904775aaaULL, 0x8bbbf63a463d56f9ULL, 0xf0013f1543a26e64ULL, + 0xa8307e9f879ec898ULL, 0xcc4c27a4150177ccULL, 0x1b432f2cca1d3348ULL, + 0xde1d1f8f9f6fa013ULL, 0x606602a047a7ddd6ULL, 0xd237ab64cc1cb2c7ULL, + 0x9b938e7225fcd1d3ULL, 0xec4e03708e0ff476ULL, 0xfeb2fbda3d03c12dULL, + 0xae0bced2ee43889aULL, 0x22cb8923ebfb4f43ULL, 0x69360d013cf7396dULL, + 0x855e3602d2d4e022ULL, 0x073805bad01f784cULL, 0x33e17a133852f546ULL, + 0xdf4874058ac7b638ULL, 0xba92b29c678aa14aULL, 0x0ce89fc76cfaadcdULL, + 0x5f9d4e0908339e34ULL, 0xf1afe9291f5923b9ULL, 0x6e3480f60f4a265fULL, + 0xeebf3a2ab29b841cULL, 0xe21938a88f91b4adULL, 0x57dfeff845c6d3c3ULL, + 0x2f006b0bf62caaf2ULL, 0x62f479ef6f75ee78ULL, 0x11a55ad41c8916a9ULL, + 0xf229d29084fed453ULL, 0x42f1c27b16b000e6ULL, 0x2b1f76749823c074ULL, + 0x4b76eca3c2745360ULL, 0x8c98f463b91691bdULL, 0x14bcc93cf1ade66aULL, + 0x8885213e6d458397ULL, 0x8e177df0274d4711ULL, 0xb49b73b5503f2951ULL, + 0x10168168c3f96b6bULL, 0x0e3d963b63cab0aeULL, 0x8dfc4b5655a1db14ULL, + 0xf789f1356e14de5cULL, 0x683e68af4e51dac1ULL, 0xc9a84f9d8d4b0fd9ULL, + 0x3691e03f52a0f9d1ULL, 0x5ed86e46e1878e80ULL, 0x3c711a0e99d07150ULL, + 0x5a0865b20c4e9310ULL, 0x56fbfc1fe4f0682eULL, 0xea8d5de3105edf9bULL, + 0x71abfdb12379187aULL, 0x2eb99de1bee77b9cULL, 0x21ecc0ea33cf4523ULL, + 0x59a4d7521805c7a1ULL, 0x3896f5eb56ae7c72ULL, 0xaa638f3db18f75dcULL, + 0x9f39358dabe9808eULL, 0xb7defa91c00b72acULL, 0x6b5541fd62492d92ULL, + 0x6dc6dee8f92e4d5bULL, 0x353f57abc4beea7eULL, 0x735769d6da5690ceULL, + 0x0a234aa642391484ULL, 0xf6f9508028f80d9dULL, 0xb8e319a27ab3f215ULL, + 0x31ad9c1151341a4dULL, 0x773c22a57bef5805ULL, 0x45c7561a07968633ULL, + 0xf913da9e249dbe36ULL, 0xda652d9b78a64c68ULL, 0x4c27a97f3bc334efULL, + 0x76621220e66b17f4ULL, 0x967743899acd7d0bULL, 0xf3ee5bcae0ed6782ULL, + 0x409f753600c879fcULL, 0x06d09a39b5926db6ULL, 0x6f83aeb0317ac588ULL, + 0x01e6ca4a86381f21ULL, 0x66ff3462d19f3025ULL, 0x72207c24ddfd3bfbULL, + 0x4af6b6d3e2ece2ebULL, 0x9c994dbec7ea08deULL, 0x49ace597b09a8bc4ULL, + 0xb38c4766cf0797baULL, 0x131b9373c57c2a75ULL, 0xb1822cce61931e58ULL, + 0x9d7555b909ba1c0cULL, 0x127fafdd937d11d2ULL, 0x29da3badc66d92e4ULL, + 0xa2c1d57154c2ecbcULL, 0x58c5134d82f6fe24ULL, 0x1c3ae3515b62274fULL, + 0xe907c82e01cb8126ULL, 0xf8ed091913e37fcbULL, 0x3249d8f9c80046c9ULL, + 0x80cf9bede388fb63ULL, 0x1881539a116cf19eULL, 0x5103f3f76bd52457ULL, + 0x15b7e6f5ae47f7a8ULL, 0xdbd7c6ded47e9ccfULL, 0x44e55c410228bb1aULL, + 0xb647d4255edb4e99ULL, 0x5d11882bb8aafc30ULL, 0xf5098bbb29d3212aULL, + 0x8fb5ea14e90296b3ULL, 0x677b942157dd025aULL, 0xfb58e7c0a390acb5ULL, + 0x89d3674c83bd4a01ULL, 0x9e2da4df4bf3b93bULL, 0xfcc41e328cab4829ULL, + 0x03f38c96ba582c52ULL, 0xcad1bdbd7fd85db2ULL, 0xbbb442c16082ae83ULL, + 0xb95fe86ba5da9ab0ULL, 0xb22e04673771a93fULL, 0x845358c9493152d8ULL, + 0xbe2a488697b4541eULL, 0x95a2dc2dd38e6966ULL, 0xc02c11ac923c852bULL, + 0x2388b1990df2a87bULL, 0x7c8008fa1b4f37beULL, 0x1f70d0c84d54e503ULL, + 0x5490adec7ece57d4ULL, 0x002b3c27d9063a3aULL, 0x7eaea3848030a2bfULL, + 0xc602326ded2003c0ULL, 0x83a7287d69a94086ULL, 0xc57a5fcb30f57a8aULL, + 0xb56844e479ebe779ULL, 0xa373b40f05dcbce9ULL, 0xd71a786e88570ee2ULL, + 0x879cbacdbde8f6a0ULL, 0x976ad1bcc164a32fULL, 0xab21e25e9666d78bULL, + 0x901063aae5e5c33cULL, 0x9818b34448698d90ULL, 0xe36487ae3e1e8abbULL, + 0xafbdf931893bdcb4ULL, 0x6345a0dc5fbbd519ULL, 0x8628fe269b9465caULL, + 0x1e5d01603f9c51ecULL, 0x4de44006a15049b7ULL, 0xbf6c70e5f776cbb1ULL, + 0x411218f2ef552bedULL, 0xcb0c0708705a36a3ULL, 0xe74d14754f986044ULL, + 0xcd56d9430ea8280eULL, 0xc12591d7535f5065ULL, 0xc83223f1720aef96ULL, + 0xc3a0396f7363a51fULL +}; + + +static void tgr192_round(u64 * ra, u64 * rb, u64 * rc, u64 x, int mul) +{ + u64 a = *ra; + u64 b = *rb; + u64 c = *rc; + + c ^= x; + a -= sbox1[c & 0xff] ^ sbox2[(c >> 16) & 0xff] + ^ sbox3[(c >> 32) & 0xff] ^ sbox4[(c >> 48) & 0xff]; + b += sbox4[(c >> 8) & 0xff] ^ sbox3[(c >> 24) & 0xff] + ^ sbox2[(c >> 40) & 0xff] ^ sbox1[(c >> 56) & 0xff]; + b *= mul; + + *ra = a; + *rb = b; + *rc = c; +} + + +static void tgr192_pass(u64 * ra, u64 * rb, u64 * rc, u64 * x, int mul) +{ + u64 a = *ra; + u64 b = *rb; + u64 c = *rc; + + tgr192_round(&a, &b, &c, x[0], mul); + tgr192_round(&b, &c, &a, x[1], mul); + tgr192_round(&c, &a, &b, x[2], mul); + tgr192_round(&a, &b, &c, x[3], mul); + tgr192_round(&b, &c, &a, x[4], mul); + tgr192_round(&c, &a, &b, x[5], mul); + tgr192_round(&a, &b, &c, x[6], mul); + tgr192_round(&b, &c, &a, x[7], mul); + + *ra = a; + *rb = b; + *rc = c; +} + + +static void tgr192_key_schedule(u64 * x) +{ + x[0] -= x[7] ^ 0xa5a5a5a5a5a5a5a5ULL; + x[1] ^= x[0]; + x[2] += x[1]; + x[3] -= x[2] ^ ((~x[1]) << 19); + x[4] ^= x[3]; + x[5] += x[4]; + x[6] -= x[5] ^ ((~x[4]) >> 23); + x[7] ^= x[6]; + x[0] += x[7]; + x[1] -= x[0] ^ ((~x[7]) << 19); + x[2] ^= x[1]; + x[3] += x[2]; + x[4] -= x[3] ^ ((~x[2]) >> 23); + x[5] ^= x[4]; + x[6] += x[5]; + x[7] -= x[6] ^ 0x0123456789abcdefULL; +} + + +/**************** + * Transform the message DATA which consists of 512 bytes (8 words) + */ + +static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data) +{ + u64 a, b, c, aa, bb, cc; + u64 x[8]; + int i; + const u8 *ptr = data; + + for (i = 0; i < 8; i++, ptr += 8) { + x[i] = (((u64)ptr[7] ) << 56) ^ + (((u64)ptr[6] & 0xffL) << 48) ^ + (((u64)ptr[5] & 0xffL) << 40) ^ + (((u64)ptr[4] & 0xffL) << 32) ^ + (((u64)ptr[3] & 0xffL) << 24) ^ + (((u64)ptr[2] & 0xffL) << 16) ^ + (((u64)ptr[1] & 0xffL) << 8) ^ + (((u64)ptr[0] & 0xffL) ); + } + + /* save */ + a = aa = tctx->a; + b = bb = tctx->b; + c = cc = tctx->c; + + tgr192_pass(&a, &b, &c, x, 5); + tgr192_key_schedule(x); + tgr192_pass(&c, &a, &b, x, 7); + tgr192_key_schedule(x); + tgr192_pass(&b, &c, &a, x, 9); + + + /* feedforward */ + a ^= aa; + b -= bb; + c += cc; + /* store */ + tctx->a = a; + tctx->b = b; + tctx->c = c; +} + +static void tgr192_init(void *ctx) +{ + struct tgr192_ctx *tctx = ctx; + + memset (tctx->hash, 0, 64); + tctx->a = 0x0123456789abcdefULL; + tctx->b = 0xfedcba9876543210ULL; + tctx->c = 0xf096a5b4c3b2e187ULL; + tctx->nblocks = 0; + tctx->count = 0; +} + + +/* Update the message digest with the contents + * of INBUF with length INLEN. */ +static void tgr192_update(void *ctx, const u8 * inbuf, unsigned int len) +{ + struct tgr192_ctx *tctx = ctx; + + if (tctx->count == 64) { /* flush the buffer */ + tgr192_transform(tctx, tctx->hash); + tctx->count = 0; + tctx->nblocks++; + } + if (!inbuf) { + return; + } + if (tctx->count) { + for (; len && tctx->count < 64; len--) { + tctx->hash[tctx->count++] = *inbuf++; + } + tgr192_update(tctx, NULL, 0); + if (!len) { + return; + } + + } + + while (len >= 64) { + tgr192_transform(tctx, inbuf); + tctx->count = 0; + tctx->nblocks++; + len -= 64; + inbuf += 64; + } + for (; len && tctx->count < 64; len--) { + tctx->hash[tctx->count++] = *inbuf++; + } +} + + + +/* The routine terminates the computation */ +static void tgr192_final(void *ctx, u8 * out) +{ + struct tgr192_ctx *tctx = ctx; + u32 t, msb, lsb; + u8 *p; + int i, j; + + tgr192_update(tctx, NULL, 0); /* flush */ ; + + msb = 0; + t = tctx->nblocks; + if ((lsb = t << 6) < t) { /* multiply by 64 to make a byte count */ + msb++; + } + msb += t >> 26; + t = lsb; + if ((lsb = t + tctx->count) < t) { /* add the count */ + msb++; + } + t = lsb; + if ((lsb = t << 3) < t) { /* multiply by 8 to make a bit count */ + msb++; + } + msb += t >> 29; + + if (tctx->count < 56) { /* enough room */ + tctx->hash[tctx->count++] = 0x01; /* pad */ + while (tctx->count < 56) { + tctx->hash[tctx->count++] = 0; /* pad */ + } + } else { /* need one extra block */ + tctx->hash[tctx->count++] = 0x01; /* pad character */ + while (tctx->count < 64) { + tctx->hash[tctx->count++] = 0; + } + tgr192_update(tctx, NULL, 0); /* flush */ ; + memset(tctx->hash, 0, 56); /* fill next block with zeroes */ + } + /* append the 64 bit count */ + tctx->hash[56] = lsb; + tctx->hash[57] = lsb >> 8; + tctx->hash[58] = lsb >> 16; + tctx->hash[59] = lsb >> 24; + tctx->hash[60] = msb; + tctx->hash[61] = msb >> 8; + tctx->hash[62] = msb >> 16; + tctx->hash[63] = msb >> 24; + tgr192_transform(tctx, tctx->hash); + + p = tctx->hash; + *p++ = tctx->a >> 56; *p++ = tctx->a >> 48; *p++ = tctx->a >> 40; + *p++ = tctx->a >> 32; *p++ = tctx->a >> 24; *p++ = tctx->a >> 16; + *p++ = tctx->a >> 8; *p++ = tctx->a;\ + *p++ = tctx->b >> 56; *p++ = tctx->b >> 48; *p++ = tctx->b >> 40; + *p++ = tctx->b >> 32; *p++ = tctx->b >> 24; *p++ = tctx->b >> 16; + *p++ = tctx->b >> 8; *p++ = tctx->b; + *p++ = tctx->c >> 56; *p++ = tctx->c >> 48; *p++ = tctx->c >> 40; + *p++ = tctx->c >> 32; *p++ = tctx->c >> 24; *p++ = tctx->c >> 16; + *p++ = tctx->c >> 8; *p++ = tctx->c; + + + /* unpack the hash */ + j = 7; + for (i = 0; i < 8; i++) { + out[j--] = (tctx->a >> 8 * i) & 0xff; + } + j = 15; + for (i = 0; i < 8; i++) { + out[j--] = (tctx->b >> 8 * i) & 0xff; + } + j = 23; + for (i = 0; i < 8; i++) { + out[j--] = (tctx->c >> 8 * i) & 0xff; + } +} + +static void tgr160_final(void *ctx, u8 * out) +{ + struct tgr192_ctx *wctx = ctx; + u8 D[64]; + + tgr192_final(wctx, D); + memcpy(out, D, TGR160_DIGEST_SIZE); + memset(D, 0, TGR192_DIGEST_SIZE); +} + +static void tgr128_final(void *ctx, u8 * out) +{ + struct tgr192_ctx *wctx = ctx; + u8 D[64]; + + tgr192_final(wctx, D); + memcpy(out, D, TGR128_DIGEST_SIZE); + memset(D, 0, TGR192_DIGEST_SIZE); +} + +static struct crypto_alg tgr192 = { + .cra_name = "tgr192", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = TGR192_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct tgr192_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(tgr192.cra_list), + .cra_u = {.digest = { + .dia_digestsize = TGR192_DIGEST_SIZE, + .dia_init = tgr192_init, + .dia_update = tgr192_update, + .dia_final = tgr192_final}} +}; + +static struct crypto_alg tgr160 = { + .cra_name = "tgr160", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = TGR192_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct tgr192_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(tgr160.cra_list), + .cra_u = {.digest = { + .dia_digestsize = TGR160_DIGEST_SIZE, + .dia_init = tgr192_init, + .dia_update = tgr192_update, + .dia_final = tgr160_final}} +}; + +static struct crypto_alg tgr128 = { + .cra_name = "tgr128", + .cra_flags = CRYPTO_ALG_TYPE_DIGEST, + .cra_blocksize = TGR192_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct tgr192_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(tgr128.cra_list), + .cra_u = {.digest = { + .dia_digestsize = TGR128_DIGEST_SIZE, + .dia_init = tgr192_init, + .dia_update = tgr192_update, + .dia_final = tgr128_final}} +}; + +static int __init init(void) +{ + int ret = 0; + + ret = crypto_register_alg(&tgr192); + + if (ret < 0) { + goto out; + } + + ret = crypto_register_alg(&tgr160); + if (ret < 0) { + crypto_unregister_alg(&tgr192); + goto out; + } + + ret = crypto_register_alg(&tgr128); + if (ret < 0) { + crypto_unregister_alg(&tgr192); + crypto_unregister_alg(&tgr160); + } + out: + return ret; +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&tgr192); + crypto_unregister_alg(&tgr160); + crypto_unregister_alg(&tgr128); +} + +MODULE_ALIAS("tgr160"); +MODULE_ALIAS("tgr128"); + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Tiger Message Digest Algorithm"); diff -Nru a/drivers/acorn/char/i2c.c b/drivers/acorn/char/i2c.c --- a/drivers/acorn/char/i2c.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/acorn/char/i2c.c 2005-03-07 14:54:18 -08:00 @@ -313,7 +313,7 @@ static int ioc_client_reg(struct i2c_client *client) { - if (client->id == I2C_DRIVERID_PCF8583 && + if (client->driver->id == I2C_DRIVERID_PCF8583 && client->addr == 0x50) { struct rtc_tm rtctm; unsigned int year; diff -Nru a/drivers/acorn/char/pcf8583.c b/drivers/acorn/char/pcf8583.c --- a/drivers/acorn/char/pcf8583.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/acorn/char/pcf8583.c 2005-03-07 14:54:18 -08:00 @@ -51,7 +51,6 @@ return -ENOMEM; memset(c, 0, sizeof(*c)); - c->id = pcf8583_driver.id; c->addr = addr; c->adapter = adap; c->driver = &pcf8583_driver; diff -Nru a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c --- a/drivers/atm/atmtcp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/atm/atmtcp.c 2005-03-07 14:54:17 -08:00 @@ -67,7 +67,7 @@ *(struct atm_vcc **) &new_msg->vcc = vcc; old_test = test_bit(flag,&vcc->flags); out_vcc->push(out_vcc,skb); - add_wait_queue(vcc->sk->sk_sleep, &wait); + add_wait_queue(sk_atm(vcc)->sk_sleep, &wait); while (test_bit(flag,&vcc->flags) == old_test) { mb(); out_vcc = PRIV(vcc->dev) ? PRIV(vcc->dev)->vcc : NULL; @@ -79,7 +79,7 @@ schedule(); } set_current_state(TASK_RUNNING); - remove_wait_queue(vcc->sk->sk_sleep, &wait); + remove_wait_queue(sk_atm(vcc)->sk_sleep, &wait); return error; } @@ -91,7 +91,7 @@ vcc->vpi = msg->addr.sap_addr.vpi; vcc->vci = msg->addr.sap_addr.vci; vcc->qos = msg->qos; - vcc->sk->sk_err = -msg->result; + sk_atm(vcc)->sk_err = -msg->result; switch (msg->type) { case ATMTCP_CTRL_OPEN: change_bit(ATM_VF_READY,&vcc->flags); @@ -104,7 +104,7 @@ msg->type); return -EINVAL; } - wake_up(vcc->sk->sk_sleep); + wake_up(sk_atm(vcc)->sk_sleep); return 0; } @@ -135,7 +135,7 @@ clear_bit(ATM_VF_READY,&vcc->flags); /* just in case ... */ error = atmtcp_send_control(vcc,ATMTCP_CTRL_OPEN,&msg,ATM_VF_READY); if (error) return error; - return -vcc->sk->sk_err; + return -sk_atm(vcc)->sk_err; } @@ -267,7 +267,7 @@ walk = atm_sk(s); if (walk->dev != atmtcp_dev) continue; - wake_up(walk->sk->sk_sleep); + wake_up(s->sk_sleep); } } read_unlock(&vcc_sklist_lock); @@ -417,7 +417,7 @@ } PRIV(dev)->vcc = vcc; vcc->dev = &atmtcp_control_dev; - vcc_insert_socket(vcc->sk); + vcc_insert_socket(sk_atm(vcc)); set_bit(ATM_VF_META,&vcc->flags); set_bit(ATM_VF_READY,&vcc->flags); vcc->dev_data = dev; diff -Nru a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c --- a/drivers/atm/fore200e.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/atm/fore200e.c 2005-03-07 14:54:18 -08:00 @@ -1027,7 +1027,7 @@ /* when a vcc is closed, some PDUs may be still pending in the tx queue. if the same vcc is immediately re-opened, those pending PDUs must not be popped after the completion of their emission, as they refer - to the prior incarnation of that vcc. otherwise, vcc->sk->sk_wmem_alloc + to the prior incarnation of that vcc. otherwise, sk_atm(vcc)->sk_wmem_alloc would be decremented by the size of the (unrelated) skb, possibly leading to a negative sk->sk_wmem_alloc count, ultimately freezing the vcc. we thus bind the tx entry to the current incarnation of the vcc @@ -1054,8 +1054,8 @@ } #if 1 /* race fixed by the above incarnation mechanism, but... */ - if (atomic_read(&vcc->sk->sk_wmem_alloc) < 0) { - atomic_set(&vcc->sk->sk_wmem_alloc, 0); + if (atomic_read(&sk_atm(vcc)->sk_wmem_alloc) < 0) { + atomic_set(&sk_atm(vcc)->sk_wmem_alloc, 0); } #endif /* check error condition */ @@ -1258,12 +1258,12 @@ return -ENOMEM; } - ASSERT(atomic_read(&vcc->sk->sk_wmem_alloc) >= 0); + ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); vcc->push(vcc, skb); atomic_inc(&vcc->stats->rx); - ASSERT(atomic_read(&vcc->sk->sk_wmem_alloc) >= 0); + ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); return 0; } @@ -1700,7 +1700,7 @@ unsigned long flags; ASSERT(vcc); - ASSERT(atomic_read(&vcc->sk->sk_wmem_alloc) >= 0); + ASSERT(atomic_read(&sk_atm(vcc)->sk_wmem_alloc) >= 0); ASSERT(fore200e); ASSERT(fore200e_vcc); diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c --- a/drivers/atm/he.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/atm/he.c 2005-03-07 14:54:16 -08:00 @@ -2610,7 +2610,7 @@ * TBRQ, the host issues the close command to the adapter. */ - while (((tx_inuse = atomic_read(&vcc->sk->sk_wmem_alloc)) > 0) && + while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 0) && (retry < MAX_RETRY)) { msleep(sleep); if (sleep < 250) diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c --- a/drivers/atm/idt77252.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/atm/idt77252.c 2005-03-07 14:54:17 -08:00 @@ -727,10 +727,11 @@ spin_lock_irqsave(&vc->lock, flags); if (vc->estimator) { struct atm_vcc *vcc = vc->tx_vcc; + struct sock *sk = sk_atm(vcc); vc->estimator->cells += (skb->len + 47) / 48; - if (atomic_read(&vcc->sk->sk_wmem_alloc) > - (vcc->sk->sk_sndbuf >> 1)) { + if (atomic_read(&sk->sk_wmem_alloc) > + (sk->sk_sndbuf >> 1)) { u32 cps = vc->estimator->maxcps; vc->estimator->cps = cps; @@ -1325,7 +1326,7 @@ goto drop; } - if ((vcc->sk != NULL) && !atm_charge(vcc, sb->truesize)) { + if (!atm_charge(vcc, sb->truesize)) { RXPRINTK("%s: atm_charge() dropped AAL0 packets.\n", card->name); dev_kfree_skb(sb); @@ -2029,7 +2030,7 @@ atomic_inc(&vcc->stats->tx_err); return -ENOMEM; } - atomic_add(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); memcpy(skb_put(skb, 52), cell, 52); diff -Nru a/drivers/atm/iphase.c b/drivers/atm/iphase.c --- a/drivers/atm/iphase.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/atm/iphase.c 2005-03-07 14:54:18 -08:00 @@ -1778,16 +1778,18 @@ if (ia_vcc->pcr < iadev->rate_limit) skb_queue_head_init (&ia_vcc->txing_skb); if (ia_vcc->pcr < iadev->rate_limit) { - if (vcc->qos.txtp.max_sdu != 0) { + struct sock *sk = sk_atm(vcc); + + if (vcc->qos.txtp.max_sdu != 0) { if (ia_vcc->pcr > 60000) - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 5; else if (ia_vcc->pcr > 2000) - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 4; else - vcc->sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3; + sk->sk_sndbuf = vcc->qos.txtp.max_sdu * 3; } else - vcc->sk->sk_sndbuf = 24576; + sk->sk_sndbuf = 24576; } vc = (struct main_vc *)iadev->MAIN_VC_TABLE_ADDR; diff -Nru a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c --- a/drivers/block/aoe/aoeblk.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/block/aoe/aoeblk.c 2005-03-07 14:54:16 -08:00 @@ -28,7 +28,8 @@ { struct aoedev *d = disk->private_data; - return snprintf(page, PAGE_SIZE, "%012llx\n", mac_addr(d->addr)); + return snprintf(page, PAGE_SIZE, "%012llx\n", + (unsigned long long)mac_addr(d->addr)); } static ssize_t aoedisk_show_netif(struct gendisk * disk, char *page) { @@ -241,7 +242,8 @@ aoedisk_add_sysfs(d); printk(KERN_INFO "aoe: %012llx e%lu.%lu v%04x has %llu " - "sectors\n", mac_addr(d->addr), d->aoemajor, d->aoeminor, + "sectors\n", (unsigned long long)mac_addr(d->addr), + d->aoemajor, d->aoeminor, d->fw_ver, (long long)d->ssize); } diff -Nru a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c --- a/drivers/bluetooth/bluecard_cs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/bluetooth/bluecard_cs.c 2005-03-07 14:54:17 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -289,8 +290,9 @@ clear_bit(ready_bit, &(info->tx_state)); if (skb->pkt_type & 0x80) { + DECLARE_WAIT_QUEUE_HEAD(wq); + DEFINE_WAIT(wait); - wait_queue_head_t wait; unsigned char baud_reg; switch (skb->pkt_type) { @@ -311,8 +313,9 @@ } /* Wait until the command reaches the baseband */ - init_waitqueue_head(&wait); - interruptible_sleep_on_timeout(&wait, HZ / 10); + prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + finish_wait(&wq, &wait); /* Set baud on baseband */ info->ctrl_reg &= ~0x03; @@ -324,8 +327,9 @@ outb(info->ctrl_reg, iobase + REG_CONTROL); /* Wait before the next HCI packet can be send */ - interruptible_sleep_on_timeout(&wait, HZ); - + prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + finish_wait(&wq, &wait); } if (len == skb->len) { diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c --- a/drivers/bluetooth/hci_usb.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/bluetooth/hci_usb.c 2005-03-07 14:54:18 -08:00 @@ -888,7 +888,7 @@ isoc_ifnum = 1; #ifdef CONFIG_BT_HCIUSB_SCO - if (isoc && !(id->driver_info & HCI_BROKEN_ISOC)) + if (isoc && !(id->driver_info & (HCI_BROKEN_ISOC | HCI_SNIFFER))) isoc_iface = usb_ifnum_to_if(udev, isoc_ifnum); if (isoc_iface) { diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig --- a/drivers/char/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/Kconfig 2005-03-07 14:54:16 -08:00 @@ -839,6 +839,10 @@ To compile this driver as a module, choose M here: the module will be called sonypi. +config TANBAC_TB0219 + tristate "TANBAC TB0219 base board support" + depends TANBAC_TB0229 + menu "Ftape, the floppy tape device driver" diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile --- a/drivers/char/Makefile 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/Makefile 2005-03-07 14:54:18 -08:00 @@ -80,6 +80,7 @@ obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o +obj-$(CONFIG_TANBAC_TB0219) += tb0219.o obj-$(CONFIG_WATCHDOG) += watchdog/ obj-$(CONFIG_MWAVE) += mwave/ diff -Nru a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig --- a/drivers/char/agp/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/Kconfig 2005-03-07 14:54:17 -08:00 @@ -89,16 +89,6 @@ use GLX or DRI, or if you have any Intel integrated graphics chipsets. If unsure, say Y. -config AGP_INTEL_MCH - tristate "Intel i865 chipset support" - depends on AGP && X86 - help - This option gives you AGP support for the GLX component of XFree86 4.x - on Intel chipsets that support Intel EM64T processors. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say Y. - config AGP_NVIDIA tristate "NVIDIA nForce/nForce2 chipset support" depends on AGP && X86 && !X86_64 diff -Nru a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile --- a/drivers/char/agp/Makefile 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/Makefile 2005-03-07 14:54:16 -08:00 @@ -9,7 +9,6 @@ obj-$(CONFIG_AGP_EFFICEON) += efficeon-agp.o obj-$(CONFIG_AGP_HP_ZX1) += hp-agp.o obj-$(CONFIG_AGP_I460) += i460-agp.o -obj-$(CONFIG_AGP_INTEL_MCH) += intel-mch-agp.o obj-$(CONFIG_AGP_INTEL) += intel-agp.o obj-$(CONFIG_AGP_NVIDIA) += nvidia-agp.o obj-$(CONFIG_AGP_SIS) += sis-agp.o diff -Nru a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h --- a/drivers/char/agp/agp.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/agp.h 2005-03-07 14:54:17 -08:00 @@ -1,5 +1,6 @@ /* * AGPGART + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2004 Dave Jones * Copyright (C) 1999 Jeff Hartmann * Copyright (C) 1999 Precision Insight, Inc. @@ -100,18 +101,19 @@ struct gatt_mask *masks; int (*fetch_size)(void); int (*configure)(void); - void (*agp_enable)(u32); + void (*agp_enable)(struct agp_bridge_data *, u32); void (*cleanup)(void); void (*tlb_flush)(struct agp_memory *); - unsigned long (*mask_memory)(unsigned long, int); + unsigned long (*mask_memory)(struct agp_bridge_data *, + unsigned long, int); void (*cache_flush)(void); - int (*create_gatt_table)(void); - int (*free_gatt_table)(void); + int (*create_gatt_table)(struct agp_bridge_data *); + int (*free_gatt_table)(struct agp_bridge_data *); int (*insert_memory)(struct agp_memory *, off_t, int); int (*remove_memory)(struct agp_memory *, off_t, int); struct agp_memory *(*alloc_by_type) (size_t, int); void (*free_by_type)(struct agp_memory *); - void *(*agp_alloc_page)(void); + void *(*agp_alloc_page)(struct agp_bridge_data *); void (*agp_destroy_page)(void *); }; @@ -137,8 +139,10 @@ int max_memory_agp; /* in number of pages */ int aperture_size_idx; int capndx; + int flags; char major_version; char minor_version; + struct list_head list; }; #define KB(x) ((x) * 1024) @@ -243,24 +247,26 @@ void agp_frontend_cleanup(void); /* Generic routines. */ -void agp_generic_enable(u32 mode); -int agp_generic_create_gatt_table(void); -int agp_generic_free_gatt_table(void); +void agp_generic_enable(struct agp_bridge_data *bridge, u32 mode); +int agp_generic_create_gatt_table(struct agp_bridge_data *bridge); +int agp_generic_free_gatt_table(struct agp_bridge_data *bridge); struct agp_memory *agp_create_memory(int scratch_pages); int agp_generic_insert_memory(struct agp_memory *mem, off_t pg_start, int type); int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type); struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type); void agp_generic_free_by_type(struct agp_memory *curr); -void *agp_generic_alloc_page(void); +void *agp_generic_alloc_page(struct agp_bridge_data *bridge); void agp_generic_destroy_page(void *addr); void agp_free_key(int key); int agp_num_entries(void); -u32 agp_collect_device_status(u32 mode, u32 command); +u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command); void agp_device_command(u32 command, int agp_v3); int agp_3_5_enable(struct agp_bridge_data *bridge); void global_cache_flush(void); void get_agp_version(struct agp_bridge_data *bridge); -unsigned long agp_generic_mask_memory(unsigned long addr, int type); +unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, + unsigned long addr, int type); +struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev); /* generic routines for agp>=3 */ int agp3_generic_fetch_size(void); @@ -314,5 +320,12 @@ #define AGPCTRL_APERENB (1<<8) #define AGPCTRL_GTLBEN (1<<7) + +#define AGP2_RESERVED_MASK 0x00fffcc8 +#define AGP3_RESERVED_MASK 0x00ff00cc + +#define AGP_ERRATA_FASTWRITES 1<<0 +#define AGP_ERRATA_SBA 1<<1 +#define AGP_ERRATA_1X 1<<2 #endif /* _AGP_BACKEND_PRIV_H */ diff -Nru a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c --- a/drivers/char/agp/ali-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/ali-agp.c 2005-03-07 14:54:17 -08:00 @@ -139,9 +139,9 @@ } } -static void *m1541_alloc_page(void) +static void *m1541_alloc_page(struct agp_bridge_data *bridge) { - void *addr = agp_generic_alloc_page(); + void *addr = agp_generic_alloc_page(agp_bridge); u32 temp; if (!addr) @@ -398,7 +398,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_ali_pci_driver); + return pci_register_driver(&agp_ali_pci_driver); } static void __exit agp_ali_cleanup(void) diff -Nru a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c --- a/drivers/char/agp/alpha-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/alpha-agp.c 2005-03-07 14:54:17 -08:00 @@ -76,11 +76,12 @@ alpha_mv.mv_pci_tbi(agp->hose, 0, -1); } -static void alpha_core_agp_enable(u32 mode) +static void alpha_core_agp_enable(struct agp_bridge_data *bridge, u32 mode) { - alpha_agp_info *agp = agp_bridge->dev_private_data; + alpha_agp_info *agp = bridge->dev_private_data; - agp->mode.lw = agp_collect_device_status(mode, agp->capability.lw); + agp->mode.lw = agp_collect_device_status(bridge, mode, + agp->capability.lw); agp->mode.bits.enable = 1; agp->ops->configure(agp); diff -Nru a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c --- a/drivers/char/agp/amd-k7-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/amd-k7-agp.c 2005-03-07 14:54:18 -08:00 @@ -132,7 +132,7 @@ #define GET_GATT(addr) (amd_irongate_private.gatt_pages[\ GET_PAGE_DIR_IDX(addr)]->remapped) -static int amd_create_gatt_table(void) +static int amd_create_gatt_table(struct agp_bridge_data *bridge) { struct aper_size_info_lvl2 *value; struct amd_page_map page_dir; @@ -175,7 +175,7 @@ return 0; } -static int amd_free_gatt_table(void) +static int amd_free_gatt_table(struct agp_bridge_data *bridge) { struct amd_page_map page_dir; @@ -314,7 +314,8 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = GET_GATT(addr); - writel(agp_generic_mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); + writel(agp_generic_mask_memory(agp_bridge, + mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */ } amd_irongate_tlbflush(mem); @@ -421,6 +422,53 @@ bridge->dev = pdev; bridge->capndx = cap_ptr; + /* 751 Errata (22564_B-1.PDF) + erratum 20: strobe glitch with Nvidia NV10 GeForce cards. + system controller may experience noise due to strong drive strengths + */ + if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_7006) { + u8 cap_ptr=0; + struct pci_dev *gfxcard=NULL; + while (!cap_ptr) { + gfxcard = pci_get_class(PCI_CLASS_DISPLAY_VGA<<8, gfxcard); + if (!gfxcard) { + printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); + return -ENODEV; + } + cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP); + if (!cap_ptr) { + pci_dev_put(gfxcard); + continue; + } + } + + /* With so many variants of NVidia cards, it's simpler just + to blacklist them all, and then whitelist them as needed + (if necessary at all). */ + if (gfxcard->vendor == PCI_VENDOR_ID_NVIDIA) { + agp_bridge->flags |= AGP_ERRATA_1X; + printk (KERN_INFO PFX "AMD 751 chipset with NVidia GeForce detected. Forcing to 1X due to errata.\n"); + } + pci_dev_put(gfxcard); + } + + /* 761 Errata (23613_F.pdf) + * Revisions B0/B1 were a disaster. + * erratum 44: SYSCLK/AGPCLK skew causes 2X failures -- Force mode to 1X + * erratum 45: Timing problem prevents fast writes -- Disable fast write. + * erratum 46: Setup violation on AGP SBA pins - Disable side band addressing. + * With this lot disabled, we should prevent lockups. */ + if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_700E) { + u8 revision=0; + pci_read_config_byte(pdev, PCI_REVISION_ID, &revision); + if (revision == 0x10 || revision == 0x11) { + agp_bridge->flags = AGP_ERRATA_FASTWRITES; + agp_bridge->flags |= AGP_ERRATA_SBA; + agp_bridge->flags |= AGP_ERRATA_1X; + printk (KERN_INFO PFX "AMD 761 chipset with errata detected - disabling AGP fast writes & SBA and forcing to 1X.\n"); + } + } + /* Fill in the mode register */ pci_read_config_dword(pdev, bridge->capndx+PCI_AGP_STATUS, @@ -480,7 +528,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_amdk7_pci_driver); + return pci_register_driver(&agp_amdk7_pci_driver); } static void __exit agp_amdk7_cleanup(void) diff -Nru a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c --- a/drivers/char/agp/amd64-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/amd64-agp.c 2005-03-07 14:54:17 -08:00 @@ -106,7 +106,8 @@ } for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - tmp = agp_bridge->driver->mask_memory(mem->memory[i], mem->type); + tmp = agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type); BUG_ON(tmp & 0xffffff0000000ffcULL); pte = (tmp & 0x000000ff00000000ULL) >> 28; @@ -709,7 +710,7 @@ if (agp_off) return -EINVAL; - if (pci_module_init(&agp_amd64_pci_driver) > 0) { + if (pci_register_driver(&agp_amd64_pci_driver) > 0) { struct pci_dev *dev; if (!agp_try_unsupported && !agp_try_unsupported_boot) { printk(KERN_INFO PFX "No supported AGP bridge found.\n"); diff -Nru a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c --- a/drivers/char/agp/ati-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/ati-agp.c 2005-03-07 14:54:17 -08:00 @@ -291,7 +291,8 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = GET_GATT(addr); - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */ } agp_bridge->driver->tlb_flush(mem); @@ -319,7 +320,7 @@ return 0; } -static int ati_create_gatt_table(void) +static int ati_create_gatt_table(struct agp_bridge_data *bridge) { struct aper_size_info_lvl2 *value; ati_page_map page_dir; @@ -380,7 +381,7 @@ return 0; } -static int ati_free_gatt_table(void) +static int ati_free_gatt_table(struct agp_bridge_data *bridge) { ati_page_map page_dir; @@ -531,7 +532,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_ati_pci_driver); + return pci_register_driver(&agp_ati_pci_driver); } static void __exit agp_ati_cleanup(void) diff -Nru a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c --- a/drivers/char/agp/backend.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/backend.c 2005-03-07 14:54:17 -08:00 @@ -1,5 +1,6 @@ /* * AGPGART driver backend routines. + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2003 Dave Jones. * Copyright (C) 1999 Jeff Hartmann. * Copyright (C) 1999 Precision Insight, Inc. @@ -18,12 +19,12 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * JEFF HARTMANN, DAVE JONES, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * TODO: + * TODO: * - Allocate more than order 0 pages to avoid too much linear map splitting. */ #include @@ -42,34 +43,38 @@ * fix some real stupidity. It's only by chance we can bump * past 0.99 at all due to some boolean logic error. */ #define AGPGART_VERSION_MAJOR 0 -#define AGPGART_VERSION_MINOR 100 +#define AGPGART_VERSION_MINOR 101 static struct agp_version agp_current_version = { .major = AGPGART_VERSION_MAJOR, .minor = AGPGART_VERSION_MINOR, }; -static int agp_count=0; +struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *) = + &agp_generic_find_bridge; -struct agp_bridge_data agp_bridge_dummy = { .type = NOT_SUPPORTED }; -struct agp_bridge_data *agp_bridge = &agp_bridge_dummy; +struct agp_bridge_data *agp_bridge; +LIST_HEAD(agp_bridges); EXPORT_SYMBOL(agp_bridge); - +EXPORT_SYMBOL(agp_bridges); /** - * agp_backend_acquire - attempt to acquire the agp backend. + * agp_backend_acquire - attempt to acquire an agp backend. * - * returns -EBUSY if agp is in use, - * returns 0 if the caller owns the agp backend */ -int agp_backend_acquire(void) +struct agp_bridge_data *agp_backend_acquire(struct pci_dev *pdev) { - if (agp_bridge->type == NOT_SUPPORTED) - return -EINVAL; - if (atomic_read(&agp_bridge->agp_in_use)) - return -EBUSY; - atomic_inc(&agp_bridge->agp_in_use); - return 0; + struct agp_bridge_data *bridge; + + bridge = agp_find_bridge(pdev); + + if (!bridge) + return NULL; + + if (atomic_read(&bridge->agp_in_use)) + return NULL; + atomic_inc(&bridge->agp_in_use); + return bridge; } EXPORT_SYMBOL(agp_backend_acquire); @@ -82,10 +87,11 @@ * * (Ensure that all memory it bound is unbound.) */ -void agp_backend_release(void) +void agp_backend_release(struct agp_bridge_data *bridge) { - if (agp_bridge->type != NOT_SUPPORTED) - atomic_dec(&agp_bridge->agp_in_use); + + if (bridge) + atomic_dec(&bridge->agp_in_use); } EXPORT_SYMBOL(agp_backend_release); @@ -121,7 +127,6 @@ (maxes_table[index].agp - maxes_table[index - 1].agp)) / (maxes_table[index].mem - maxes_table[index - 1].mem); - printk(KERN_INFO PFX "Maximum main memory to use for agp memory: %ldM\n", result); result = result << (20 - PAGE_SHIFT); return result; } @@ -135,7 +140,7 @@ bridge->version = &agp_current_version; if (bridge->driver->needs_scratch_page) { - void *addr = bridge->driver->agp_alloc_page(); + void *addr = bridge->driver->agp_alloc_page(bridge); if (!addr) { printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); @@ -144,7 +149,7 @@ bridge->scratch_page_real = virt_to_phys(addr); bridge->scratch_page = - bridge->driver->mask_memory(bridge->scratch_page_real, 0); + bridge->driver->mask_memory(bridge, bridge->scratch_page_real, 0); } size_value = bridge->driver->fetch_size(); @@ -153,14 +158,14 @@ rc = -EINVAL; goto err_out; } - if (bridge->driver->create_gatt_table()) { + if (bridge->driver->create_gatt_table(bridge)) { printk(KERN_ERR PFX "unable to get memory for graphics translation table.\n"); rc = -ENOMEM; goto err_out; } got_gatt = 1; - + bridge->key_list = vmalloc(PAGE_SIZE * 4); if (bridge->key_list == NULL) { printk(KERN_ERR PFX "error allocating memory for key lists.\n"); @@ -168,7 +173,7 @@ goto err_out; } got_keylist = 1; - + /* FIXME vmalloc'd memory not guaranteed contiguous */ memset(bridge->key_list, 0, PAGE_SIZE * 4); @@ -178,9 +183,6 @@ goto err_out; } - printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", - size_value, bridge->gart_bus_addr); - return 0; err_out: @@ -188,7 +190,7 @@ bridge->driver->agp_destroy_page( phys_to_virt(bridge->scratch_page_real)); if (got_gatt) - bridge->driver->free_gatt_table(); + bridge->driver->free_gatt_table(bridge); if (got_keylist) { vfree(bridge->key_list); bridge->key_list = NULL; @@ -202,7 +204,7 @@ if (bridge->driver->cleanup) bridge->driver->cleanup(); if (bridge->driver->free_gatt_table) - bridge->driver->free_gatt_table(); + bridge->driver->free_gatt_table(bridge); if (bridge->key_list) { vfree(bridge->key_list); bridge->key_list = NULL; @@ -214,16 +216,35 @@ phys_to_virt(bridge->scratch_page_real)); } -/* XXX Kludge alert: agpgart isn't ready for multiple bridges yet */ +/* When we remove the global variable agp_bridge from all drivers + * then agp_alloc_bridge and agp_generic_find_bridge need to be updated + */ + struct agp_bridge_data *agp_alloc_bridge(void) { - return agp_bridge; + struct agp_bridge_data *bridge = kmalloc(sizeof(*bridge), GFP_KERNEL); + + if (!bridge) + return NULL; + + memset(bridge, 0, sizeof(*bridge)); + atomic_set(&bridge->agp_in_use, 0); + atomic_set(&bridge->current_memory_agp, 0); + + if (list_empty(&agp_bridges)) + agp_bridge = bridge; + + return bridge; } EXPORT_SYMBOL(agp_alloc_bridge); void agp_put_bridge(struct agp_bridge_data *bridge) { + kfree(bridge); + + if (list_empty(&agp_bridges)) + agp_bridge = NULL; } EXPORT_SYMBOL(agp_put_bridge); @@ -240,40 +261,38 @@ return -EINVAL; } - if (agp_count) { - printk (KERN_INFO PFX - "Only one agpgart device currently supported.\n"); - return -ENODEV; - } - /* Grab reference on the chipset driver. */ if (!try_module_get(bridge->driver->owner)) { printk (KERN_INFO PFX "Couldn't lock chipset driver.\n"); return -EINVAL; } - bridge->type = SUPPORTED; - - error = agp_backend_initialize(agp_bridge); + error = agp_backend_initialize(bridge); if (error) { printk (KERN_INFO PFX "agp_backend_initialize() failed.\n"); goto err_out; } - error = agp_frontend_initialize(); - if (error) { - printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); - goto frontend_err; + if (list_empty(&agp_bridges)) { + error = agp_frontend_initialize(); + if (error) { + printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); + goto frontend_err; + } + + printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", + bridge->driver->fetch_size(), bridge->gart_bus_addr); + } - agp_count++; + list_add(&bridge->list, &agp_bridges); return 0; frontend_err: - agp_backend_cleanup(agp_bridge); + agp_backend_cleanup(bridge); err_out: - bridge->type = NOT_SUPPORTED; module_put(bridge->driver->owner); + agp_put_bridge(bridge); return error; } EXPORT_SYMBOL_GPL(agp_add_bridge); @@ -281,10 +300,10 @@ void agp_remove_bridge(struct agp_bridge_data *bridge) { - bridge->type = NOT_SUPPORTED; - agp_frontend_cleanup(); agp_backend_cleanup(bridge); - agp_count--; + list_del(&bridge->list); + if (list_empty(&agp_bridges)) + agp_frontend_cleanup(); module_put(bridge->driver->owner); } EXPORT_SYMBOL_GPL(agp_remove_bridge); diff -Nru a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c --- a/drivers/char/agp/efficeon-agp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/efficeon-agp.c 2005-03-07 14:54:16 -08:00 @@ -148,7 +148,7 @@ return 0; } -static int efficeon_free_gatt_table(void) +static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) { int index, freed = 0; @@ -183,7 +183,7 @@ #define GET_GATT(addr) (efficeon_private.gatt_pages[\ GET_PAGE_DIR_IDX(addr)]->remapped) -static int efficeon_create_gatt_table(void) +static int efficeon_create_gatt_table(struct agp_bridge_data *bridge) { int index; const int pati = EFFICEON_PATI; @@ -209,7 +209,7 @@ page = get_zeroed_page(GFP_KERNEL); if (!page) { - efficeon_free_gatt_table(); + efficeon_free_gatt_table(agp_bridge); return -ENOMEM; } SetPageReserved(virt_to_page((char *)page)); @@ -448,7 +448,7 @@ return 0; agp_initialised=1; - return pci_module_init(&agp_efficeon_pci_driver); + return pci_register_driver(&agp_efficeon_pci_driver); } static void __exit agp_efficeon_cleanup(void) diff -Nru a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c --- a/drivers/char/agp/frontend.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/frontend.c 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,6 @@ /* * AGPGART driver frontend + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2003 Dave Jones * Copyright (C) 1999 Jeff Hartmann * Copyright (C) 1999 Precision Insight, Inc. @@ -18,9 +19,9 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ @@ -152,8 +153,8 @@ /* Originally taken from linux/mm/mmap.c from the array * protection_map. - * The original really should be exported to modules, or - * some routine which does the conversion for you + * The original really should be exported to modules, or + * some routine which does the conversion for you */ static const pgprot_t my_protect_map[16] = @@ -285,8 +286,8 @@ /* End - File flag list routines */ -/* - * Wrappers for agp_free_memory & agp_allocate_memory +/* + * Wrappers for agp_free_memory & agp_allocate_memory * These make sure that internal lists are kept updated. */ static void agp_free_memory_wrap(struct agp_memory *memory) @@ -299,7 +300,7 @@ { struct agp_memory *memory; - memory = agp_allocate_memory(pg_count, type); + memory = agp_allocate_memory(agp_bridge, pg_count, type); if (memory == NULL) return NULL; @@ -420,7 +421,7 @@ if (agp_fe.current_controller == controller) { agp_fe.current_controller = NULL; agp_fe.backend_acquired = FALSE; - agp_backend_release(); + agp_backend_release(agp_bridge); } kfree(controller); return 0; @@ -468,10 +469,10 @@ agp_fe.current_controller = NULL; agp_fe.used_by_controller = FALSE; - agp_backend_release(); + agp_backend_release(agp_bridge); } -/* +/* * Routines for managing client lists - * These routines are for managing the list of auth'ed clients. */ @@ -605,7 +606,7 @@ if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags))) goto out_eperm; - agp_copy_info(&kerninfo); + agp_copy_info(agp_bridge, &kerninfo); size = vma->vm_end - vma->vm_start; current_size = kerninfo.aper_size; current_size = current_size * 0x100000; @@ -757,7 +758,7 @@ struct agp_info userinfo; struct agp_kern_info kerninfo; - agp_copy_info(&kerninfo); + agp_copy_info(agp_bridge, &kerninfo); userinfo.version.major = kerninfo.version.major; userinfo.version.minor = kerninfo.version.minor; @@ -777,7 +778,6 @@ static int agpioc_acquire_wrap(struct agp_file_private *priv) { - int ret; struct agp_controller *controller; DBG(""); @@ -788,11 +788,15 @@ if (agp_fe.current_controller != NULL) return -EBUSY; - ret = agp_backend_acquire(); - if (ret == 0) - agp_fe.backend_acquired = TRUE; - else - return ret; + if(!agp_bridge) + return -ENODEV; + + if (atomic_read(&agp_bridge->agp_in_use)) + return -EBUSY; + + atomic_inc(&agp_bridge->agp_in_use); + + agp_fe.backend_acquired = TRUE; controller = agp_find_controller_by_pid(priv->my_pid); @@ -803,7 +807,7 @@ if (controller == NULL) { agp_fe.backend_acquired = FALSE; - agp_backend_release(); + agp_backend_release(agp_bridge); return -ENOMEM; } agp_insert_controller(controller); @@ -830,7 +834,7 @@ if (copy_from_user(&mode, arg, sizeof(struct agp_setup))) return -EFAULT; - agp_enable(mode.agp_mode); + agp_enable(agp_bridge, mode.agp_mode); return 0; } @@ -993,24 +997,24 @@ if ((agp_fe.current_controller == NULL) && (cmd != AGPIOC_ACQUIRE)) { ret_val = -EINVAL; - goto ioctl_out; + goto ioctl_out; } if ((agp_fe.backend_acquired != TRUE) && (cmd != AGPIOC_ACQUIRE)) { ret_val = -EBUSY; - goto ioctl_out; + goto ioctl_out; } if (cmd != AGPIOC_ACQUIRE) { if (!(test_bit(AGP_FF_IS_CONTROLLER, &curr_priv->access_flags))) { ret_val = -EPERM; - goto ioctl_out; + goto ioctl_out; } /* Use the original pid of the controller, * in case it's threaded */ if (agp_fe.current_controller->pid != curr_priv->my_pid) { ret_val = -EBUSY; - goto ioctl_out; + goto ioctl_out; } } @@ -1022,35 +1026,35 @@ case AGPIOC_ACQUIRE: ret_val = agpioc_acquire_wrap(curr_priv); break; - + case AGPIOC_RELEASE: ret_val = agpioc_release_wrap(curr_priv); break; - + case AGPIOC_SETUP: ret_val = agpioc_setup_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_RESERVE: ret_val = agpioc_reserve_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_PROTECT: ret_val = agpioc_protect_wrap(curr_priv); break; - + case AGPIOC_ALLOCATE: ret_val = agpioc_allocate_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_DEALLOCATE: ret_val = agpioc_deallocate_wrap(curr_priv, (int) arg); break; - + case AGPIOC_BIND: ret_val = agpioc_bind_wrap(curr_priv, (void __user *) arg); break; - + case AGPIOC_UNBIND: ret_val = agpioc_unbind_wrap(curr_priv, (void __user *) arg); break; diff -Nru a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c --- a/drivers/char/agp/generic.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/generic.c 2005-03-07 14:54:16 -08:00 @@ -1,6 +1,7 @@ /* * AGPGART driver. - * Copyright (C) 2002-2004 Dave Jones. + * Copyright (C) 2004 Silicon Graphics, Inc. + * Copyright (C) 2002-2005 Dave Jones. * Copyright (C) 1999 Jeff Hartmann. * Copyright (C) 1999 Precision Insight, Inc. * Copyright (C) 1999 Xi Graphics, Inc. @@ -139,19 +140,19 @@ { size_t i; - if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL)) + if (curr == NULL) return; if (curr->is_bound == TRUE) agp_unbind_memory(curr); if (curr->type != 0) { - agp_bridge->driver->free_by_type(curr); + curr->bridge->driver->free_by_type(curr); return; } if (curr->page_count != 0) { for (i = 0; i < curr->page_count; i++) { - agp_bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i])); + curr->bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[i])); } } agp_free_key(curr->key); @@ -173,20 +174,23 @@ * * It returns NULL whenever memory is unavailable. */ -struct agp_memory *agp_allocate_memory(size_t page_count, u32 type) +struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge, + size_t page_count, u32 type) { int scratch_pages; struct agp_memory *new; size_t i; - if (agp_bridge->type == NOT_SUPPORTED) + if (!bridge) return NULL; - if ((atomic_read(&agp_bridge->current_memory_agp) + page_count) > agp_bridge->max_memory_agp) + if ((atomic_read(&bridge->current_memory_agp) + page_count) > bridge->max_memory_agp) return NULL; if (type != 0) { - new = agp_bridge->driver->alloc_by_type(page_count, type); + new = bridge->driver->alloc_by_type(page_count, type); + if (new) + new->bridge = bridge; return new; } @@ -198,7 +202,7 @@ return NULL; for (i = 0; i < page_count; i++) { - void *addr = agp_bridge->driver->agp_alloc_page(); + void *addr = bridge->driver->agp_alloc_page(bridge); if (addr == NULL) { agp_free_memory(new); @@ -207,6 +211,7 @@ new->memory[i] = virt_to_phys(addr); new->page_count++; } + new->bridge = bridge; flush_agp_mappings(); @@ -289,6 +294,19 @@ EXPORT_SYMBOL_GPL(agp_num_entries); +static int check_bridge_mode(struct pci_dev *dev) +{ + u32 agp3; + u8 cap_ptr; + + cap_ptr = pci_find_capability(dev, PCI_CAP_ID_AGP); + pci_read_config_dword(dev, cap_ptr+AGPSTAT, &agp3); + if (agp3 & AGPSTAT_MODE_3_0) + return 1; + return 0; +} + + /** * agp_copy_info - copy bridge state information * @@ -297,35 +315,36 @@ * This function copies information about the agp bridge device and the state of * the agp backend into an agp_kern_info pointer. */ -int agp_copy_info(struct agp_kern_info *info) +int agp_copy_info(struct agp_bridge_data *bridge, struct agp_kern_info *info) { memset(info, 0, sizeof(struct agp_kern_info)); - if (!agp_bridge || agp_bridge->type == NOT_SUPPORTED || - !agp_bridge->version) { + if (!bridge) { info->chipset = NOT_SUPPORTED; return -EIO; } - info->version.major = agp_bridge->version->major; - info->version.minor = agp_bridge->version->minor; - info->chipset = agp_bridge->type; - info->device = agp_bridge->dev; - info->mode = agp_bridge->mode; - info->aper_base = agp_bridge->gart_bus_addr; + info->version.major = bridge->version->major; + info->version.minor = bridge->version->minor; + info->chipset = SUPPORTED; + info->device = bridge->dev; + if (check_bridge_mode(bridge->dev)) + info->mode = bridge->mode & ~AGP3_RESERVED_MASK; + else + info->mode = bridge->mode & ~AGP2_RESERVED_MASK; + info->mode = bridge->mode; + info->aper_base = bridge->gart_bus_addr; info->aper_size = agp_return_size(); - info->max_memory = agp_bridge->max_memory_agp; - info->current_memory = atomic_read(&agp_bridge->current_memory_agp); - info->cant_use_aperture = agp_bridge->driver->cant_use_aperture; - info->vm_ops = agp_bridge->vm_ops; + info->max_memory = bridge->max_memory_agp; + info->current_memory = atomic_read(&bridge->current_memory_agp); + info->cant_use_aperture = bridge->driver->cant_use_aperture; + info->vm_ops = bridge->vm_ops; info->page_mask = ~0UL; return 0; } EXPORT_SYMBOL(agp_copy_info); - /* End - Routine to copy over information structure */ - /* * Routines for handling swapping of agp_memory into the GATT - * These routines take agp_memory and insert them into the GATT. @@ -345,7 +364,7 @@ { int ret_val; - if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL)) + if (curr == NULL) return -EINVAL; if (curr->is_bound == TRUE) { @@ -353,10 +372,10 @@ return -EINVAL; } if (curr->is_flushed == FALSE) { - agp_bridge->driver->cache_flush(); + curr->bridge->driver->cache_flush(); curr->is_flushed = TRUE; } - ret_val = agp_bridge->driver->insert_memory(curr, pg_start, curr->type); + ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); if (ret_val != 0) return ret_val; @@ -380,7 +399,7 @@ { int ret_val; - if ((agp_bridge->type == NOT_SUPPORTED) || (curr == NULL)) + if (curr == NULL) return -EINVAL; if (curr->is_bound != TRUE) { @@ -388,7 +407,7 @@ return -EINVAL; } - ret_val = agp_bridge->driver->remove_memory(curr, curr->pg_start, curr->type); + ret_val = curr->bridge->driver->remove_memory(curr, curr->pg_start, curr->type); if (ret_val != 0) return ret_val; @@ -403,71 +422,137 @@ /* Generic Agp routines - Start */ -static void agp_v2_parse_one(u32 *mode, u32 *cmd, u32 *tmp) +static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_agpstat) { + u32 tmp; + + if (*requested_mode & AGP2_RESERVED_MASK) { + printk (KERN_INFO PFX "reserved bits set in mode 0x%x. Fixed.\n", *requested_mode); + *requested_mode &= ~AGP2_RESERVED_MASK; + } + + /* Check the speed bits make sense. Only one should be set. */ + tmp = *requested_mode & 7; + switch (tmp) { + case 0: + printk (KERN_INFO PFX "%s tried to set rate=x0. Setting to x1 mode.\n", current->comm); + *requested_mode |= AGPSTAT2_1X; + break; + case 1: + case 2: + break; + case 3: + *requested_mode &= ~(AGPSTAT2_1X); /* rate=2 */ + break; + case 4: + break; + case 5: + case 6: + case 7: + *requested_mode &= ~(AGPSTAT2_1X|AGPSTAT2_2X); /* rate=4*/ + break; + } + /* disable SBA if it's not supported */ - if (!((*cmd & AGPSTAT_SBA) && (*tmp & AGPSTAT_SBA) && (*mode & AGPSTAT_SBA))) - *cmd &= ~AGPSTAT_SBA; + if (!((*bridge_agpstat & AGPSTAT_SBA) && (*vga_agpstat & AGPSTAT_SBA) && (*requested_mode & AGPSTAT_SBA))) + *bridge_agpstat &= ~AGPSTAT_SBA; - /* Set speed */ - if (!((*cmd & AGPSTAT2_4X) && (*tmp & AGPSTAT2_4X) && (*mode & AGPSTAT2_4X))) - *cmd &= ~AGPSTAT2_4X; + /* Set rate */ + if (!((*bridge_agpstat & AGPSTAT2_4X) && (*vga_agpstat & AGPSTAT2_4X) && (*requested_mode & AGPSTAT2_4X))) + *bridge_agpstat &= ~AGPSTAT2_4X; - if (!((*cmd & AGPSTAT2_2X) && (*tmp & AGPSTAT2_2X) && (*mode & AGPSTAT2_2X))) - *cmd &= ~AGPSTAT2_2X; + if (!((*bridge_agpstat & AGPSTAT2_2X) && (*vga_agpstat & AGPSTAT2_2X) && (*requested_mode & AGPSTAT2_2X))) + *bridge_agpstat &= ~AGPSTAT2_2X; - if (!((*cmd & AGPSTAT2_1X) && (*tmp & AGPSTAT2_1X) && (*mode & AGPSTAT2_1X))) - *cmd &= ~AGPSTAT2_1X; + if (!((*bridge_agpstat & AGPSTAT2_1X) && (*vga_agpstat & AGPSTAT2_1X) && (*requested_mode & AGPSTAT2_1X))) + *bridge_agpstat &= ~AGPSTAT2_1X; /* Now we know what mode it should be, clear out the unwanted bits. */ - if (*cmd & AGPSTAT2_4X) - *cmd &= ~(AGPSTAT2_1X | AGPSTAT2_2X); /* 4X */ + if (*bridge_agpstat & AGPSTAT2_4X) + *bridge_agpstat &= ~(AGPSTAT2_1X | AGPSTAT2_2X); /* 4X */ + + if (*bridge_agpstat & AGPSTAT2_2X) + *bridge_agpstat &= ~(AGPSTAT2_1X | AGPSTAT2_4X); /* 2X */ + + if (*bridge_agpstat & AGPSTAT2_1X) + *bridge_agpstat &= ~(AGPSTAT2_2X | AGPSTAT2_4X); /* 1X */ + + /* Apply any errata. */ + if (agp_bridge->flags & AGP_ERRATA_FASTWRITES) + *bridge_agpstat &= ~AGPSTAT_FW; - if (*cmd & AGPSTAT2_2X) - *cmd &= ~(AGPSTAT2_1X | AGPSTAT2_4X); /* 2X */ + if (agp_bridge->flags & AGP_ERRATA_SBA) + *bridge_agpstat &= ~AGPSTAT_SBA; - if (*cmd & AGPSTAT2_1X) - *cmd &= ~(AGPSTAT2_2X | AGPSTAT2_4X); /* 1X */ + if (agp_bridge->flags & AGP_ERRATA_1X) { + *bridge_agpstat &= ~(AGPSTAT2_2X | AGPSTAT2_4X); + *bridge_agpstat |= AGPSTAT2_1X; + } + + /* If we've dropped down to 1X, disable fast writes. */ + if (*bridge_agpstat & AGPSTAT2_1X) + *bridge_agpstat &= ~AGPSTAT_FW; } /* - * mode = requested mode. - * cmd = PCI_AGP_STATUS from agp bridge. - * tmp = PCI_AGP_STATUS from graphic card. + * requested_mode = Mode requested by (typically) X. + * bridge_agpstat = PCI_AGP_STATUS from agp bridge. + * vga_agpstat = PCI_AGP_STATUS from graphic card. */ -static void agp_v3_parse_one(u32 *mode, u32 *cmd, u32 *tmp) +static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_agpstat) { - u32 origcmd=*cmd, origtmp=*tmp; + u32 origbridge=*bridge_agpstat, origvga=*vga_agpstat; + u32 tmp; + + if (*requested_mode & AGP3_RESERVED_MASK) { + printk (KERN_INFO PFX "reserved bits set in mode 0x%x. Fixed.\n", *requested_mode); + *requested_mode &= ~AGP3_RESERVED_MASK; + } + + /* Check the speed bits make sense. */ + tmp = *requested_mode & 7; + if (tmp == 0) { + printk (KERN_INFO PFX "%s tried to set rate=x0. Setting to AGP3 x4 mode.\n", current->comm); + *requested_mode |= AGPSTAT3_4X; + } + if (tmp == 3) { + printk (KERN_INFO PFX "%s tried to set rate=x3. Setting to AGP3 x4 mode.\n", current->comm); + *requested_mode |= AGPSTAT3_4X; + } + if (tmp >3) { + printk (KERN_INFO PFX "%s tried to set rate=x%d. Setting to AGP3 x8 mode.\n", current->comm, tmp); + *requested_mode |= AGPSTAT3_8X; + } /* ARQSZ - Set the value to the maximum one. * Don't allow the mode register to override values. */ - *cmd = ((*cmd & ~AGPSTAT_ARQSZ) | - max_t(u32,(*cmd & AGPSTAT_ARQSZ),(*tmp & AGPSTAT_ARQSZ))); + *bridge_agpstat = ((*bridge_agpstat & ~AGPSTAT_ARQSZ) | + max_t(u32,(*bridge_agpstat & AGPSTAT_ARQSZ),(*vga_agpstat & AGPSTAT_ARQSZ))); /* Calibration cycle. * Don't allow the mode register to override values. */ - *cmd = ((*cmd & ~AGPSTAT_CAL_MASK) | - min_t(u32,(*cmd & AGPSTAT_CAL_MASK),(*tmp & AGPSTAT_CAL_MASK))); + *bridge_agpstat = ((*bridge_agpstat & ~AGPSTAT_CAL_MASK) | + min_t(u32,(*bridge_agpstat & AGPSTAT_CAL_MASK),(*vga_agpstat & AGPSTAT_CAL_MASK))); /* SBA *must* be supported for AGP v3 */ - *cmd |= AGPSTAT_SBA; + *bridge_agpstat |= AGPSTAT_SBA; /* * Set speed. * Check for invalid speeds. This can happen when applications * written before the AGP 3.0 standard pass AGP2.x modes to AGP3 hardware */ - if (*mode & AGPSTAT_MODE_3_0) { + if (*requested_mode & AGPSTAT_MODE_3_0) { /* - * Caller hasn't a clue what its doing. We are in 3.0 mode, + * Caller hasn't a clue what it is doing. Bridge is in 3.0 mode, * have been passed a 3.0 mode, but with 2.x speed bits set. * AGP2.x 4x -> AGP3.0 4x. */ - if (*mode & AGPSTAT2_4X) { + if (*requested_mode & AGPSTAT2_4X) { printk (KERN_INFO PFX "%s passes broken AGP3 flags (%x). Fixed.\n", - current->comm, *mode); - *mode &= ~AGPSTAT2_4X; - *mode |= AGPSTAT3_4X; + current->comm, *requested_mode); + *requested_mode &= ~AGPSTAT2_4X; + *requested_mode |= AGPSTAT3_4X; } } else { /* @@ -476,27 +561,27 @@ * Convert AGP 1x,2x,4x -> AGP 3.0 4x. */ printk (KERN_INFO PFX "%s passes broken AGP2 flags (%x) in AGP3 mode. Fixed.\n", - current->comm, *mode); - *mode &= ~(AGPSTAT2_4X | AGPSTAT2_2X | AGPSTAT2_1X); - *mode |= AGPSTAT3_4X; + current->comm, *requested_mode); + *requested_mode &= ~(AGPSTAT2_4X | AGPSTAT2_2X | AGPSTAT2_1X); + *requested_mode |= AGPSTAT3_4X; } - if (*mode & AGPSTAT3_8X) { - if (!(*cmd & AGPSTAT3_8X)) { - *cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *cmd |= AGPSTAT3_4X; + if (*requested_mode & AGPSTAT3_8X) { + if (!(*bridge_agpstat & AGPSTAT3_8X)) { + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + *bridge_agpstat |= AGPSTAT3_4X; printk ("%s requested AGPx8 but bridge not capable.\n", current->comm); return; } - if (!(*tmp & AGPSTAT3_8X)) { - *cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *cmd |= AGPSTAT3_4X; + if (!(*vga_agpstat & AGPSTAT3_8X)) { + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + *bridge_agpstat |= AGPSTAT3_4X; printk ("%s requested AGPx8 but graphic card not capable.\n", current->comm); return; } /* All set, bridge & device can do AGP x8*/ - *cmd &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); - return; + *bridge_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); + goto done; } else { @@ -505,71 +590,105 @@ * If the hardware can't do x4, we're up shit creek, and never * should have got this far. */ - *cmd &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - if ((*cmd & AGPSTAT3_4X) && (*tmp & AGPSTAT3_4X)) - *cmd |= AGPSTAT3_4X; + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + if ((*bridge_agpstat & AGPSTAT3_4X) && (*vga_agpstat & AGPSTAT3_4X)) + *bridge_agpstat |= AGPSTAT3_4X; else { printk (KERN_INFO PFX "Badness. Don't know which AGP mode to set. " - "[cmd:%x tmp:%x fell back to:- cmd:%x tmp:%x]\n", - origcmd, origtmp, *cmd, *tmp); - if (!(*cmd & AGPSTAT3_4X)) + "[bridge_agpstat:%x vga_agpstat:%x fell back to:- bridge_agpstat:%x vga_agpstat:%x]\n", + origbridge, origvga, *bridge_agpstat, *vga_agpstat); + if (!(*bridge_agpstat & AGPSTAT3_4X)) printk (KERN_INFO PFX "Bridge couldn't do AGP x4.\n"); - if (!(*tmp & AGPSTAT3_4X)) + if (!(*vga_agpstat & AGPSTAT3_4X)) printk (KERN_INFO PFX "Graphic card couldn't do AGP x4.\n"); + return; } } + +done: + /* Apply any errata. */ + if (agp_bridge->flags & AGP_ERRATA_FASTWRITES) + *bridge_agpstat &= ~AGPSTAT_FW; + + if (agp_bridge->flags & AGP_ERRATA_SBA) + *bridge_agpstat &= ~AGPSTAT_SBA; + + if (agp_bridge->flags & AGP_ERRATA_1X) { + *bridge_agpstat &= ~(AGPSTAT2_2X | AGPSTAT2_4X); + *bridge_agpstat |= AGPSTAT2_1X; + } } -//FIXME: This doesn't smell right. -//We need a function we pass an agp_device to. -u32 agp_collect_device_status(u32 mode, u32 cmd) + +/** + * agp_collect_device_status - determine correct agp_cmd from various agp_stat's + * @bridge: an agp_bridge_data struct allocated for the AGP host bridge. + * @requested_mode: requested agp_stat from userspace (Typically from X) + * @bridge_agpstat: current agp_stat from AGP bridge. + * + * This function will hunt for an AGP graphics card, and try to match + * the requested mode to the capabilities of both the bridge and the card. + */ +u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode, u32 bridge_agpstat) { struct pci_dev *device = NULL; - u8 cap_ptr; - u32 tmp; - u32 agp3; + u8 cap_ptr = 0; + u32 vga_agpstat; - for_each_pci_dev(device) { + while (!cap_ptr) { + device = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, device); + if (!device) { + printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); + return 0; + } cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP); - if (!cap_ptr) + if (!cap_ptr) { + pci_dev_put(device); + continue; + } + if ((device->bus->self->vendor != bridge->dev->vendor) && + (device->bus->self->device != bridge->dev->device)) { + pci_dev_put(device); + cap_ptr = 0; continue; - - //FIXME: We should probably skip anything here that - // isn't an AGP graphic card. - /* - * Ok, here we have a AGP device. Disable impossible - * settings, and adjust the readqueue to the minimum. - */ - pci_read_config_dword(device, cap_ptr+PCI_AGP_STATUS, &tmp); - - /* adjust RQ depth */ - cmd = ((cmd & ~AGPSTAT_RQ_DEPTH) | - min_t(u32, (mode & AGPSTAT_RQ_DEPTH), - min_t(u32, (cmd & AGPSTAT_RQ_DEPTH), (tmp & AGPSTAT_RQ_DEPTH)))); - - /* disable FW if it's not supported */ - if (!((cmd & AGPSTAT_FW) && (tmp & AGPSTAT_FW) && (mode & AGPSTAT_FW))) - cmd &= ~AGPSTAT_FW; - - /* Check to see if we are operating in 3.0 mode */ - pci_read_config_dword(device, cap_ptr+AGPSTAT, &agp3); - if (agp3 & AGPSTAT_MODE_3_0) { - agp_v3_parse_one(&mode, &cmd, &tmp); - } else { - agp_v2_parse_one(&mode, &cmd, &tmp); } } - return cmd; + + /* + * Ok, here we have a AGP device. Disable impossible + * settings, and adjust the readqueue to the minimum. + */ + pci_read_config_dword(device, cap_ptr+PCI_AGP_STATUS, &vga_agpstat); + + /* adjust RQ depth */ + bridge_agpstat = ((bridge_agpstat & ~AGPSTAT_RQ_DEPTH) | + min_t(u32, (requested_mode & AGPSTAT_RQ_DEPTH), + min_t(u32, (bridge_agpstat & AGPSTAT_RQ_DEPTH), (vga_agpstat & AGPSTAT_RQ_DEPTH)))); + + /* disable FW if it's not supported */ + if (!((bridge_agpstat & AGPSTAT_FW) && + (vga_agpstat & AGPSTAT_FW) && + (requested_mode & AGPSTAT_FW))) + bridge_agpstat &= ~AGPSTAT_FW; + + /* Check to see if we are operating in 3.0 mode */ + if (check_bridge_mode(agp_bridge->dev)) + agp_v3_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat); + else + agp_v2_parse_one(&requested_mode, &bridge_agpstat, &vga_agpstat); + + pci_dev_put(device); + return bridge_agpstat; } EXPORT_SYMBOL(agp_collect_device_status); -void agp_device_command(u32 command, int agp_v3) +void agp_device_command(u32 bridge_agpstat, int agp_v3) { struct pci_dev *device = NULL; int mode; - mode = command & 0x7; + mode = bridge_agpstat & 0x7; if (agp_v3) mode *= 4; @@ -580,7 +699,7 @@ printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n", agp_v3 ? 3 : 2, pci_name(device), mode); - pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command); + pci_write_config_dword(device, agp + PCI_AGP_COMMAND, bridge_agpstat); } } EXPORT_SYMBOL(agp_device_command); @@ -591,52 +710,53 @@ u32 ncapid; /* Exit early if already set by errata workarounds. */ - if (agp_bridge->major_version != 0) + if (bridge->major_version != 0) return; - pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx, &ncapid); - agp_bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; - agp_bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf; + pci_read_config_dword(bridge->dev, bridge->capndx, &ncapid); + bridge->major_version = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; + bridge->minor_version = (ncapid >> AGP_MINOR_VERSION_SHIFT) & 0xf; } EXPORT_SYMBOL(get_agp_version); -void agp_generic_enable(u32 mode) +void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) { - u32 command, temp; - u32 agp3; + u32 bridge_agpstat, temp; get_agp_version(agp_bridge); printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", agp_bridge->major_version, agp_bridge->minor_version, - agp_bridge->dev->slot_name); + pci_name(agp_bridge->dev)); pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_STATUS, &command); + agp_bridge->capndx + PCI_AGP_STATUS, &bridge_agpstat); + + bridge_agpstat = agp_collect_device_status(agp_bridge, requested_mode, bridge_agpstat); + if (bridge_agpstat == 0) + /* Something bad happened. FIXME: Return error code? */ + return; - command = agp_collect_device_status(mode, command); - command |= AGPSTAT_AGP_ENABLE; + bridge_agpstat |= AGPSTAT_AGP_ENABLE; /* Do AGP version specific frobbing. */ - if(agp_bridge->major_version >= 3) { - pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx+AGPSTAT, &agp3); - - /* Check to see if we are operating in 3.0 mode */ - if (agp3 & AGPSTAT_MODE_3_0) { + if (bridge->major_version >= 3) { + if (check_bridge_mode(bridge->dev)) { /* If we have 3.5, we can do the isoch stuff. */ - if (agp_bridge->minor_version >= 5) - agp_3_5_enable(agp_bridge); - agp_device_command(command, TRUE); + if (bridge->minor_version >= 5) + agp_3_5_enable(bridge); + agp_device_command(bridge_agpstat, TRUE); return; } else { /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/ - command &= ~(7<<10) ; - pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx+AGPCTRL, &temp); + bridge_agpstat &= ~(7<<10) ; + pci_read_config_dword(bridge->dev, + bridge->capndx+AGPCTRL, &temp); temp |= (1<<9); - pci_write_config_dword(agp_bridge->dev, agp_bridge->capndx+AGPCTRL, temp); + pci_write_config_dword(bridge->dev, + bridge->capndx+AGPCTRL, temp); printk (KERN_INFO PFX "Device is in legacy mode," " falling back to 2.x\n"); @@ -644,12 +764,12 @@ } /* AGP v<3 */ - agp_device_command(command, FALSE); + agp_device_command(bridge_agpstat, FALSE); } EXPORT_SYMBOL(agp_generic_enable); -int agp_generic_create_gatt_table(void) +int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) { char *table; char *table_end; @@ -661,17 +781,17 @@ struct page *page; /* The generic routines can't handle 2 level gatt's */ - if (agp_bridge->driver->size_type == LVL2_APER_SIZE) + if (bridge->driver->size_type == LVL2_APER_SIZE) return -EINVAL; table = NULL; - i = agp_bridge->aperture_size_idx; - temp = agp_bridge->current_size; + i = bridge->aperture_size_idx; + temp = bridge->current_size; size = page_order = num_entries = 0; - if (agp_bridge->driver->size_type != FIXED_APER_SIZE) { + if (bridge->driver->size_type != FIXED_APER_SIZE) { do { - switch (agp_bridge->driver->size_type) { + switch (bridge->driver->size_type) { case U8_APER_SIZE: size = A_SIZE_8(temp)->size; page_order = @@ -702,29 +822,29 @@ if (table == NULL) { i++; - switch (agp_bridge->driver->size_type) { + switch (bridge->driver->size_type) { case U8_APER_SIZE: - agp_bridge->current_size = A_IDX8(agp_bridge); + bridge->current_size = A_IDX8(bridge); break; case U16_APER_SIZE: - agp_bridge->current_size = A_IDX16(agp_bridge); + bridge->current_size = A_IDX16(bridge); break; case U32_APER_SIZE: - agp_bridge->current_size = A_IDX32(agp_bridge); + bridge->current_size = A_IDX32(bridge); break; /* This case will never really happen. */ case FIXED_APER_SIZE: case LVL2_APER_SIZE: default: - agp_bridge->current_size = - agp_bridge->current_size; + bridge->current_size = + bridge->current_size; break; } - temp = agp_bridge->current_size; + temp = bridge->current_size; } else { - agp_bridge->aperture_size_idx = i; + bridge->aperture_size_idx = i; } - } while (!table && (i < agp_bridge->driver->num_aperture_sizes)); + } while (!table && (i < bridge->driver->num_aperture_sizes)); } else { size = ((struct aper_size_info_fixed *) temp)->size; page_order = ((struct aper_size_info_fixed *) temp)->page_order; @@ -740,15 +860,15 @@ for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) SetPageReserved(page); - agp_bridge->gatt_table_real = (u32 *) table; + bridge->gatt_table_real = (u32 *) table; agp_gatt_table = (void *)table; - agp_bridge->driver->cache_flush(); - agp_bridge->gatt_table = ioremap_nocache(virt_to_phys(table), + bridge->driver->cache_flush(); + bridge->gatt_table = ioremap_nocache(virt_to_phys(table), (PAGE_SIZE * (1 << page_order))); - agp_bridge->driver->cache_flush(); + bridge->driver->cache_flush(); - if (agp_bridge->gatt_table == NULL) { + if (bridge->gatt_table == NULL) { for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) ClearPageReserved(page); @@ -756,28 +876,28 @@ return -ENOMEM; } - agp_bridge->gatt_bus_addr = virt_to_phys(agp_bridge->gatt_table_real); + bridge->gatt_bus_addr = virt_to_phys(bridge->gatt_table_real); /* AK: bogus, should encode addresses > 4GB */ for (i = 0; i < num_entries; i++) { - writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i); - readl(agp_bridge->gatt_table+i); /* PCI Posting. */ + writel(bridge->scratch_page, bridge->gatt_table+i); + readl(bridge->gatt_table+i); /* PCI Posting. */ } return 0; } EXPORT_SYMBOL(agp_generic_create_gatt_table); -int agp_generic_free_gatt_table(void) +int agp_generic_free_gatt_table(struct agp_bridge_data *bridge) { int page_order; char *table, *table_end; void *temp; struct page *page; - temp = agp_bridge->current_size; + temp = bridge->current_size; - switch (agp_bridge->driver->size_type) { + switch (bridge->driver->size_type) { case U8_APER_SIZE: page_order = A_SIZE_8(temp)->page_order; break; @@ -803,19 +923,19 @@ * called, then all agp memory is deallocated and removed * from the table. */ - iounmap(agp_bridge->gatt_table); - table = (char *) agp_bridge->gatt_table_real; + iounmap(bridge->gatt_table); + table = (char *) bridge->gatt_table_real; table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); for (page = virt_to_page(table); page <= virt_to_page(table_end); page++) ClearPageReserved(page); - free_pages((unsigned long) agp_bridge->gatt_table_real, page_order); + free_pages((unsigned long) bridge->gatt_table_real, page_order); agp_gatt_table = NULL; - agp_bridge->gatt_table = NULL; - agp_bridge->gatt_table_real = NULL; - agp_bridge->gatt_bus_addr = 0; + bridge->gatt_table = NULL; + bridge->gatt_table_real = NULL; + bridge->gatt_bus_addr = 0; return 0; } @@ -828,10 +948,15 @@ size_t i; off_t j; void *temp; + struct agp_bridge_data *bridge; - temp = agp_bridge->current_size; + bridge = mem->bridge; + if (!bridge) + return -EINVAL; - switch (agp_bridge->driver->size_type) { + temp = bridge->current_size; + + switch (bridge->driver->size_type) { case U8_APER_SIZE: num_entries = A_SIZE_8(temp)->num_entries; break; @@ -868,22 +993,22 @@ j = pg_start; while (j < (pg_start + mem->page_count)) { - if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j))) + if (!PGE_EMPTY(bridge, readl(bridge->gatt_table+j))) return -EBUSY; j++; } if (mem->is_flushed == FALSE) { - agp_bridge->driver->cache_flush(); + bridge->driver->cache_flush(); mem->is_flushed = TRUE; } for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), agp_bridge->gatt_table+j); - readl(agp_bridge->gatt_table+j); /* PCI Posting. */ + writel(bridge->driver->mask_memory(bridge, mem->memory[i], mem->type), bridge->gatt_table+j); + readl(bridge->gatt_table+j); /* PCI Posting. */ } - agp_bridge->driver->tlb_flush(mem); + bridge->driver->tlb_flush(mem); return 0; } EXPORT_SYMBOL(agp_generic_insert_memory); @@ -892,6 +1017,11 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type) { size_t i; + struct agp_bridge_data *bridge; + + bridge = mem->bridge; + if (!bridge) + return -EINVAL; if (type != 0 || mem->type != 0) { /* The generic routines know nothing of memory types */ @@ -900,12 +1030,12 @@ /* AK: bogus, should encode addresses > 4GB */ for (i = pg_start; i < (mem->page_count + pg_start); i++) { - writel(agp_bridge->scratch_page, agp_bridge->gatt_table+i); - readl(agp_bridge->gatt_table+i); /* PCI Posting. */ + writel(bridge->scratch_page, bridge->gatt_table+i); + readl(bridge->gatt_table+i); /* PCI Posting. */ } global_cache_flush(); - agp_bridge->driver->tlb_flush(mem); + bridge->driver->tlb_flush(mem); return 0; } EXPORT_SYMBOL(agp_generic_remove_memory); @@ -920,9 +1050,7 @@ void agp_generic_free_by_type(struct agp_memory *curr) { - if (curr->memory != NULL) - vfree(curr->memory); - + vfree(curr->memory); agp_free_key(curr->key); kfree(curr); } @@ -936,7 +1064,7 @@ * against a maximum value. */ -void *agp_generic_alloc_page(void) +void *agp_generic_alloc_page(struct agp_bridge_data *bridge) { struct page * page; @@ -978,14 +1106,25 @@ * * @mode: agp mode register value to configure with. */ -void agp_enable(u32 mode) +void agp_enable(struct agp_bridge_data *bridge, u32 mode) { - if (agp_bridge->type == NOT_SUPPORTED) + if (!bridge) return; - agp_bridge->driver->agp_enable(mode); + bridge->driver->agp_enable(bridge, mode); } EXPORT_SYMBOL(agp_enable); +/* When we remove the global variable agp_bridge from all drivers + * then agp_alloc_bridge and agp_generic_find_bridge need to be updated + */ + +struct agp_bridge_data *agp_generic_find_bridge(struct pci_dev *pdev) +{ + if (list_empty(&agp_bridges)) + return NULL; + + return agp_bridge; +} static void ipi_handler(void *null) { @@ -999,11 +1138,12 @@ } EXPORT_SYMBOL(global_cache_flush); -unsigned long agp_generic_mask_memory(unsigned long addr, int type) +unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, + unsigned long addr, int type) { /* memory type is ignored in the generic routine */ - if (agp_bridge->driver->masks) - return addr | agp_bridge->driver->masks[0].mask; + if (bridge->driver->masks) + return addr | bridge->driver->masks[0].mask; else return addr; } diff -Nru a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c --- a/drivers/char/agp/hp-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/hp-agp.c 2005-03-07 14:54:18 -08:00 @@ -289,7 +289,7 @@ } static int -hp_zx1_create_gatt_table (void) +hp_zx1_create_gatt_table (struct agp_bridge_data *bridge) { struct _hp_private *hp = &hp_private; int i; @@ -317,7 +317,7 @@ } static int -hp_zx1_free_gatt_table (void) +hp_zx1_free_gatt_table (struct agp_bridge_data *bridge) { struct _hp_private *hp = &hp_private; @@ -367,7 +367,9 @@ for (k = 0; k < hp->io_pages_per_kpage; k++, j++, paddr += hp->io_page_size) { - hp->gatt[j] = agp_bridge->driver->mask_memory(paddr, type); + hp->gatt[j] = + agp_bridge->driver->mask_memory(agp_bridge, + paddr, type); } } @@ -396,19 +398,20 @@ } static unsigned long -hp_zx1_mask_memory (unsigned long addr, int type) +hp_zx1_mask_memory (struct agp_bridge_data *bridge, + unsigned long addr, int type) { return HP_ZX1_PDIR_VALID_BIT | addr; } static void -hp_zx1_enable (u32 mode) +hp_zx1_enable (struct agp_bridge_data *bridge, u32 mode) { struct _hp_private *hp = &hp_private; u32 command; command = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command |= 0x00000100; writel(command, hp->lba_regs+hp->lba_cap_offset+PCI_AGP_COMMAND); diff -Nru a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c --- a/drivers/char/agp/i460-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/i460-agp.c 2005-03-07 14:54:17 -08:00 @@ -233,7 +233,7 @@ return 0; } -static int i460_create_gatt_table (void) +static int i460_create_gatt_table (struct agp_bridge_data *bridge) { int page_order, num_entries, i; void *temp; @@ -258,7 +258,7 @@ return 0; } -static int i460_free_gatt_table (void) +static int i460_free_gatt_table (struct agp_bridge_data *bridge) { int num_entries, i; void *temp; @@ -314,7 +314,8 @@ for (i = 0, j = io_pg_start; i < mem->page_count; i++) { paddr = mem->memory[i]; for (k = 0; k < I460_IOPAGES_PER_KPAGE; k++, j++, paddr += io_page_size) - WR_GATT(j, agp_bridge->driver->mask_memory(paddr, mem->type)); + WR_GATT(j, agp_bridge->driver->mask_memory(agp_bridge, + paddr, mem->type)); } WR_FLUSH_GATT(j - 1); return 0; @@ -427,7 +428,8 @@ if (i460_alloc_large_page(lp) < 0) return -ENOMEM; pg = lp - i460.lp_desc; - WR_GATT(pg, agp_bridge->driver->mask_memory(lp->paddr, 0)); + WR_GATT(pg, agp_bridge->driver->mask_memory(agp_bridge, + lp->paddr, 0)); WR_FLUSH_GATT(pg); } @@ -508,12 +510,12 @@ * Let's just hope nobody counts on the allocated AGP memory being there before bind time * (I don't think current drivers do)... */ -static void *i460_alloc_page (void) +static void *i460_alloc_page (struct agp_bridge_data *bridge) { void *page; if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) - page = agp_generic_alloc_page(); + page = agp_generic_alloc_page(agp_bridge); else /* Returning NULL would cause problems */ /* AK: really dubious code. */ @@ -529,10 +531,11 @@ #endif /* I460_LARGE_IO_PAGES */ -static unsigned long i460_mask_memory (unsigned long addr, int type) +static unsigned long i460_mask_memory (struct agp_bridge_data *bridge, + unsigned long addr, int type) { /* Make sure the returned address is a valid GATT entry */ - return agp_bridge->driver->masks[0].mask + return bridge->driver->masks[0].mask | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12); } @@ -624,7 +627,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_intel_i460_pci_driver); + return pci_register_driver(&agp_intel_i460_pci_driver); } static void __exit agp_intel_i460_cleanup(void) diff -Nru a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c --- a/drivers/char/agp/intel-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/intel-agp.c 2005-03-07 14:54:17 -08:00 @@ -150,7 +150,7 @@ return; } -static void intel_i810_agp_enable(u32 mode) +static void intel_i810_agp_enable(struct agp_bridge_data *bridge, u32 mode) { return; } @@ -229,8 +229,9 @@ insert: global_cache_flush(); for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), - intel_i810_private.registers+I810_PTE_BASE+(j*4)); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), + intel_i810_private.registers+I810_PTE_BASE+(j*4)); readl(intel_i810_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ } global_cache_flush(); @@ -268,7 +269,7 @@ return NULL; switch (pg_count) { - case 1: addr = agp_bridge->driver->agp_alloc_page(); + case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge); break; case 4: /* kludge to get 4 physical pages for ARGB cursor */ @@ -337,10 +338,11 @@ kfree(curr); } -static unsigned long intel_i810_mask_memory(unsigned long addr, int type) +static unsigned long intel_i810_mask_memory(struct agp_bridge_data *bridge, + unsigned long addr, int type) { /* Type checking must be done elsewhere */ - return addr | agp_bridge->driver->masks[type].mask; + return addr | bridge->driver->masks[type].mask; } static struct aper_size_info_fixed intel_i830_sizes[] = @@ -447,7 +449,7 @@ /* The intel i830 automatically initializes the agp aperture during POST. * Use the memory already set aside for in the GTT. */ -static int intel_i830_create_gatt_table(void) +static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge) { int page_order; struct aper_size_info_fixed *size; @@ -482,7 +484,7 @@ /* Return the gatt table to a sane state. Use the top of stolen * memory for the GTT. */ -static int intel_i830_free_gatt_table(void) +static int intel_i830_free_gatt_table(struct agp_bridge_data *bridge) { return 0; } @@ -582,8 +584,9 @@ global_cache_flush(); /* FIXME: Necessary ?*/ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), - intel_i830_private.registers+I810_PTE_BASE+(j*4)); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), + intel_i830_private.registers+I810_PTE_BASE+(j*4)); readl(intel_i830_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ } @@ -691,7 +694,8 @@ global_cache_flush(); for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), intel_i830_private.gtt+j); + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), intel_i830_private.gtt+j); readl(intel_i830_private.gtt+j); /* PCI Posting. */ } @@ -743,7 +747,7 @@ /* The intel i915 automatically initializes the agp aperture during POST. * Use the memory already set aside for in the GTT. */ -static int intel_i915_create_gatt_table(void) +static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge) { int page_order; struct aper_size_info_fixed *size; @@ -1758,6 +1762,8 @@ intel_i915_configure(); else if (bridge->driver == &intel_830_driver) intel_i830_configure(); + else if (bridge->driver == &intel_810_driver) + intel_i810_configure(); return 0; } @@ -1810,7 +1816,9 @@ static int __init agp_intel_init(void) { - return pci_module_init(&agp_intel_pci_driver); + if (agp_off) + return -EINVAL; + return pci_register_driver(&agp_intel_pci_driver); } static void __exit agp_intel_cleanup(void) diff -Nru a/drivers/char/agp/intel-mch-agp.c b/drivers/char/agp/intel-mch-agp.c --- a/drivers/char/agp/intel-mch-agp.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,643 +0,0 @@ -/* - * Intel MCH AGPGART routines. - */ - -#include -#include -#include -#include -#include "agp.h" - - -#define AGP_DCACHE_MEMORY 1 -#define AGP_PHYS_MEMORY 2 - -static struct gatt_mask intel_i810_masks[] = -{ - {.mask = I810_PTE_VALID, .type = 0}, - {.mask = (I810_PTE_VALID | I810_PTE_LOCAL), .type = AGP_DCACHE_MEMORY}, - {.mask = I810_PTE_VALID, .type = 0} -}; - -static void intel_i810_tlbflush(struct agp_memory *mem) -{ - return; -} - -static void intel_i810_agp_enable(u32 mode) -{ - return; -} - - -/* - * The i810/i830 requires a physical address to program its mouse - * pointer into hardware. - * However the Xserver still writes to it through the agp aperture. - */ -static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type) -{ - struct agp_memory *new; - void *addr; - - if (pg_count != 1) - return NULL; - - addr = agp_bridge->driver->agp_alloc_page(); - if (addr == NULL) - return NULL; - - new = agp_create_memory(1); - if (new == NULL) - return NULL; - - new->memory[0] = virt_to_phys(addr); - new->page_count = 1; - new->num_scratch_pages = 1; - new->type = AGP_PHYS_MEMORY; - new->physical = new->memory[0]; - return new; -} - -static void intel_i810_free_by_type(struct agp_memory *curr) -{ - agp_free_key(curr->key); - if(curr->type == AGP_PHYS_MEMORY) { - agp_bridge->driver->agp_destroy_page(phys_to_virt(curr->memory[0])); - vfree(curr->memory); - } - kfree(curr); -} - -static unsigned long intel_i810_mask_memory(unsigned long addr, int type) -{ - /* Type checking must be done elsewhere */ - return addr | agp_bridge->driver->masks[type].mask; -} - -static struct aper_size_info_fixed intel_i830_sizes[] = -{ - {128, 32768, 5}, - /* The 64M mode still requires a 128k gatt */ - {64, 16384, 5} -}; - -static struct _intel_i830_private { - struct pci_dev *i830_dev; /* device one */ - volatile u8 __iomem *registers; - int gtt_entries; -} intel_i830_private; - -static void intel_i830_init_gtt_entries(void) -{ - u16 gmch_ctrl; - int gtt_entries; - u8 rdct; - int local = 0; - static const int ddt[4] = { 0, 16, 32, 64 }; - - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); - - if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB || - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) { - switch (gmch_ctrl & I830_GMCH_GMS_MASK) { - case I830_GMCH_GMS_STOLEN_512: - gtt_entries = KB(512) - KB(132); - break; - case I830_GMCH_GMS_STOLEN_1024: - gtt_entries = MB(1) - KB(132); - break; - case I830_GMCH_GMS_STOLEN_8192: - gtt_entries = MB(8) - KB(132); - break; - case I830_GMCH_GMS_LOCAL: - rdct = readb(intel_i830_private.registers+I830_RDRAM_CHANNEL_TYPE); - gtt_entries = (I830_RDRAM_ND(rdct) + 1) * - MB(ddt[I830_RDRAM_DDT(rdct)]); - local = 1; - break; - default: - gtt_entries = 0; - break; - } - } else { - switch (gmch_ctrl & I830_GMCH_GMS_MASK) { - case I855_GMCH_GMS_STOLEN_1M: - gtt_entries = MB(1) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_4M: - gtt_entries = MB(4) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_8M: - gtt_entries = MB(8) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_16M: - gtt_entries = MB(16) - KB(132); - break; - case I855_GMCH_GMS_STOLEN_32M: - gtt_entries = MB(32) - KB(132); - break; - default: - gtt_entries = 0; - break; - } - } - if (gtt_entries > 0) - printk(KERN_INFO PFX "Detected %dK %s memory.\n", - gtt_entries / KB(1), local ? "local" : "stolen"); - else - printk(KERN_INFO PFX - "No pre-allocated video memory detected.\n"); - gtt_entries /= KB(4); - - intel_i830_private.gtt_entries = gtt_entries; -} - -/* The intel i830 automatically initializes the agp aperture during POST. - * Use the memory already set aside for in the GTT. - */ -static int intel_i830_create_gatt_table(void) -{ - int page_order; - struct aper_size_info_fixed *size; - int num_entries; - u32 temp; - - size = agp_bridge->current_size; - page_order = size->page_order; - num_entries = size->num_entries; - agp_bridge->gatt_table_real = NULL; - - pci_read_config_dword(intel_i830_private.i830_dev,I810_MMADDR,&temp); - temp &= 0xfff80000; - - intel_i830_private.registers = (volatile u8 __iomem*) ioremap(temp,128 * 4096); - if (!intel_i830_private.registers) - return -ENOMEM; - - temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000; - global_cache_flush(); /* FIXME: ?? */ - - /* we have to call this as early as possible after the MMIO base address is known */ - intel_i830_init_gtt_entries(); - - agp_bridge->gatt_table = NULL; - - agp_bridge->gatt_bus_addr = temp; - - return 0; -} - -/* Return the gatt table to a sane state. Use the top of stolen - * memory for the GTT. - */ -static int intel_i830_free_gatt_table(void) -{ - return 0; -} - -static int intel_i830_fetch_size(void) -{ - u16 gmch_ctrl; - struct aper_size_info_fixed *values; - - values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); - - if (agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82830_HB && - agp_bridge->dev->device != PCI_DEVICE_ID_INTEL_82845G_HB) { - /* 855GM/852GM/865G has 128MB aperture size */ - agp_bridge->previous_size = agp_bridge->current_size = (void *) values; - agp_bridge->aperture_size_idx = 0; - return values[0].size; - } - - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); - - if ((gmch_ctrl & I830_GMCH_MEM_MASK) == I830_GMCH_MEM_128M) { - agp_bridge->previous_size = agp_bridge->current_size = (void *) values; - agp_bridge->aperture_size_idx = 0; - return values[0].size; - } else { - agp_bridge->previous_size = agp_bridge->current_size = (void *) values; - agp_bridge->aperture_size_idx = 1; - return values[1].size; - } - - return 0; -} - -static int intel_i830_configure(void) -{ - struct aper_size_info_fixed *current_size; - u32 temp; - u16 gmch_ctrl; - int i; - - current_size = A_SIZE_FIX(agp_bridge->current_size); - - pci_read_config_dword(intel_i830_private.i830_dev,I810_GMADDR,&temp); - agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); - - pci_read_config_word(agp_bridge->dev,I830_GMCH_CTRL,&gmch_ctrl); - gmch_ctrl |= I830_GMCH_ENABLED; - pci_write_config_word(agp_bridge->dev,I830_GMCH_CTRL,gmch_ctrl); - - writel(agp_bridge->gatt_bus_addr|I810_PGETBL_ENABLED, intel_i830_private.registers+I810_PGETBL_CTL); - readl(intel_i830_private.registers+I810_PGETBL_CTL); /* PCI Posting. */ - - if (agp_bridge->driver->needs_scratch_page) { - for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++) { - writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4)); - readl(intel_i830_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ - } - } - global_cache_flush(); - return 0; -} - -static void intel_i830_cleanup(void) -{ - iounmap((void __iomem *) intel_i830_private.registers); -} - -static int intel_i830_insert_entries(struct agp_memory *mem,off_t pg_start, - int type) -{ - int i,j,num_entries; - void *temp; - - temp = agp_bridge->current_size; - num_entries = A_SIZE_FIX(temp)->num_entries; - - if (pg_start < intel_i830_private.gtt_entries) { - printk (KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_i830_private.gtt_entries == 0x%.8x\n", - pg_start,intel_i830_private.gtt_entries); - - printk (KERN_INFO PFX "Trying to insert into local/stolen memory\n"); - return -EINVAL; - } - - if ((pg_start + mem->page_count) > num_entries) - return -EINVAL; - - /* The i830 can't check the GTT for entries since its read only, - * depend on the caller to make the correct offset decisions. - */ - - if ((type != 0 && type != AGP_PHYS_MEMORY) || - (mem->type != 0 && mem->type != AGP_PHYS_MEMORY)) - return -EINVAL; - - global_cache_flush(); /* FIXME: ?? */ - - for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), - intel_i830_private.registers+I810_PTE_BASE+(j*4)); - readl(intel_i830_private.registers+I810_PTE_BASE+(j*4)); /* PCI Posting. */ - } - - global_cache_flush(); - - agp_bridge->driver->tlb_flush(mem); - - return 0; -} - -static int intel_i830_remove_entries(struct agp_memory *mem,off_t pg_start, - int type) -{ - int i; - - global_cache_flush(); - - if (pg_start < intel_i830_private.gtt_entries) { - printk (KERN_INFO PFX "Trying to disable local/stolen memory\n"); - return -EINVAL; - } - - for (i = pg_start; i < (mem->page_count + pg_start); i++) { - writel(agp_bridge->scratch_page, intel_i830_private.registers+I810_PTE_BASE+(i*4)); - readl(intel_i830_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ - } - - global_cache_flush(); - agp_bridge->driver->tlb_flush(mem); - return 0; -} - -static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type) -{ - if (type == AGP_PHYS_MEMORY) - return alloc_agpphysmem_i8xx(pg_count, type); - - /* always return NULL for other allocation types for now */ - return NULL; -} - -static int intel_8xx_fetch_size(void) -{ - u8 temp; - int i; - struct aper_size_info_8 *values; - - pci_read_config_byte(agp_bridge->dev, INTEL_APSIZE, &temp); - - values = A_SIZE_8(agp_bridge->driver->aperture_sizes); - - for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { - if (temp == values[i].size_value) { - agp_bridge->previous_size = - agp_bridge->current_size = (void *) (values + i); - agp_bridge->aperture_size_idx = i; - return values[i].size; - } - } - return 0; -} - -static void intel_8xx_tlbflush(struct agp_memory *mem) -{ - u32 temp; - pci_read_config_dword(agp_bridge->dev, INTEL_AGPCTRL, &temp); - pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, temp & ~(1 << 7)); - pci_read_config_dword(agp_bridge->dev, INTEL_AGPCTRL, &temp); - pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, temp | (1 << 7)); -} - -static void intel_8xx_cleanup(void) -{ - u16 temp; - struct aper_size_info_8 *previous_size; - - previous_size = A_SIZE_8(agp_bridge->previous_size); - pci_read_config_word(agp_bridge->dev, INTEL_NBXCFG, &temp); - pci_write_config_word(agp_bridge->dev, INTEL_NBXCFG, temp & ~(1 << 9)); - pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, previous_size->size_value); -} - -static int intel_845_configure(void) -{ - u32 temp; - u8 temp2; - struct aper_size_info_8 *current_size; - - current_size = A_SIZE_8(agp_bridge->current_size); - - /* aperture size */ - pci_write_config_byte(agp_bridge->dev, INTEL_APSIZE, current_size->size_value); - - /* address to map to */ - pci_read_config_dword(agp_bridge->dev, AGP_APBASE, &temp); - agp_bridge->gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); - - /* attbase - aperture base */ - pci_write_config_dword(agp_bridge->dev, INTEL_ATTBASE, agp_bridge->gatt_bus_addr); - - /* agpctrl */ - pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, 0x0000); - - /* agpm */ - pci_read_config_byte(agp_bridge->dev, INTEL_I845_AGPM, &temp2); - pci_write_config_byte(agp_bridge->dev, INTEL_I845_AGPM, temp2 | (1 << 1)); - /* clear any possible error conditions */ - pci_write_config_word(agp_bridge->dev, INTEL_I845_ERRSTS, 0x001c); - return 0; -} - - -/* Setup function */ -static struct gatt_mask intel_generic_masks[] = -{ - {.mask = 0x00000017, .type = 0} -}; - -static struct aper_size_info_8 intel_8xx_sizes[7] = -{ - {256, 65536, 6, 0}, - {128, 32768, 5, 32}, - {64, 16384, 4, 48}, - {32, 8192, 3, 56}, - {16, 4096, 2, 60}, - {8, 2048, 1, 62}, - {4, 1024, 0, 63} -}; - -static struct agp_bridge_driver intel_830_driver = { - .owner = THIS_MODULE, - .aperture_sizes = intel_i830_sizes, - .size_type = FIXED_APER_SIZE, - .num_aperture_sizes = 2, - .needs_scratch_page = TRUE, - .configure = intel_i830_configure, - .fetch_size = intel_i830_fetch_size, - .cleanup = intel_i830_cleanup, - .tlb_flush = intel_i810_tlbflush, - .mask_memory = intel_i810_mask_memory, - .masks = intel_i810_masks, - .agp_enable = intel_i810_agp_enable, - .cache_flush = global_cache_flush, - .create_gatt_table = intel_i830_create_gatt_table, - .free_gatt_table = intel_i830_free_gatt_table, - .insert_memory = intel_i830_insert_entries, - .remove_memory = intel_i830_remove_entries, - .alloc_by_type = intel_i830_alloc_by_type, - .free_by_type = intel_i810_free_by_type, - .agp_alloc_page = agp_generic_alloc_page, - .agp_destroy_page = agp_generic_destroy_page, -}; - -static struct agp_bridge_driver intel_845_driver = { - .owner = THIS_MODULE, - .aperture_sizes = intel_8xx_sizes, - .size_type = U8_APER_SIZE, - .num_aperture_sizes = 7, - .configure = intel_845_configure, - .fetch_size = intel_8xx_fetch_size, - .cleanup = intel_8xx_cleanup, - .tlb_flush = intel_8xx_tlbflush, - .mask_memory = agp_generic_mask_memory, - .masks = intel_generic_masks, - .agp_enable = agp_generic_enable, - .cache_flush = global_cache_flush, - .create_gatt_table = agp_generic_create_gatt_table, - .free_gatt_table = agp_generic_free_gatt_table, - .insert_memory = agp_generic_insert_memory, - .remove_memory = agp_generic_remove_memory, - .alloc_by_type = agp_generic_alloc_by_type, - .free_by_type = agp_generic_free_by_type, - .agp_alloc_page = agp_generic_alloc_page, - .agp_destroy_page = agp_generic_destroy_page, -}; - - -static int find_i830(u16 device) -{ - struct pci_dev *i830_dev; - - i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, device, NULL); - if (i830_dev && PCI_FUNC(i830_dev->devfn) != 0) { - i830_dev = pci_get_device(PCI_VENDOR_ID_INTEL, - device, i830_dev); - } - - if (!i830_dev) - return 0; - - intel_i830_private.i830_dev = i830_dev; - return 1; -} - -static int __devinit agp_intelmch_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) -{ - struct agp_bridge_data *bridge; - struct resource *r; - char *name = "(unknown)"; - u8 cap_ptr = 0; - - cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); - if (!cap_ptr) - return -ENODEV; - - bridge = agp_alloc_bridge(); - if (!bridge) - return -ENOMEM; - - switch (pdev->device) { - case PCI_DEVICE_ID_INTEL_82865_HB: - if (find_i830(PCI_DEVICE_ID_INTEL_82865_IG)) { - bridge->driver = &intel_830_driver; - } else { - bridge->driver = &intel_845_driver; - } - name = "865"; - break; - case PCI_DEVICE_ID_INTEL_82875_HB: - bridge->driver = &intel_845_driver; - name = "i875"; - break; - - default: - printk(KERN_ERR PFX "Unsupported Intel chipset (device id: %04x)\n", - pdev->device); - return -ENODEV; - }; - - bridge->dev = pdev; - bridge->capndx = cap_ptr; - - if (bridge->driver == &intel_830_driver) - bridge->dev_private_data = &intel_i830_private; - - printk(KERN_INFO PFX "Detected an Intel %s Chipset.\n", name); - - /* - * The following fixes the case where the BIOS has "forgotten" to - * provide an address range for the GART. - * 20030610 - hamish@zot.org - */ - r = &pdev->resource[0]; - if (!r->start && r->end) { - if(pci_assign_resource(pdev, 0)) { - printk(KERN_ERR PFX "could not assign resource 0\n"); - return -ENODEV; - } - } - - /* - * If the device has not been properly setup, the following will catch - * the problem and should stop the system from crashing. - * 20030610 - hamish@zot.org - */ - if (pci_enable_device(pdev)) { - printk(KERN_ERR PFX "Unable to Enable PCI device\n"); - return -ENODEV; - } - - /* Fill in the mode register */ - if (cap_ptr) { - pci_read_config_dword(pdev, - bridge->capndx+PCI_AGP_STATUS, - &bridge->mode); - } - - pci_set_drvdata(pdev, bridge); - return agp_add_bridge(bridge); -} - -static void __devexit agp_intelmch_remove(struct pci_dev *pdev) -{ - struct agp_bridge_data *bridge = pci_get_drvdata(pdev); - - agp_remove_bridge(bridge); - if (intel_i830_private.i830_dev) - pci_dev_put(intel_i830_private.i830_dev); - agp_put_bridge(bridge); -} - -static int agp_intelmch_resume(struct pci_dev *pdev) -{ - struct agp_bridge_data *bridge = pci_get_drvdata(pdev); - - pci_restore_state(pdev); - - if (bridge->driver == &intel_845_driver) - intel_845_configure(); - - return 0; -} - -static struct pci_device_id agp_intelmch_pci_table[] = { - { - .class = (PCI_CLASS_BRIDGE_HOST << 8), - .class_mask = ~0, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82865_HB, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, - { - .class = (PCI_CLASS_BRIDGE_HOST << 8), - .class_mask = ~0, - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82875_HB, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - }, - { } -}; - -MODULE_DEVICE_TABLE(pci, agp_intelmch_pci_table); - -static struct pci_driver agp_intelmch_pci_driver = { - .name = "agpgart-intel-mch", - .id_table = agp_intelmch_pci_table, - .probe = agp_intelmch_probe, - .remove = agp_intelmch_remove, - .resume = agp_intelmch_resume, -}; - -/* intel_agp_init() must not be declared static for explicit - early initialization to work (ie i810fb) */ -int __init agp_intelmch_init(void) -{ - static int agp_initialised=0; - - if (agp_initialised == 1) - return 0; - agp_initialised=1; - - return pci_module_init(&agp_intelmch_pci_driver); -} - -static void __exit agp_intelmch_cleanup(void) -{ - pci_unregister_driver(&agp_intelmch_pci_driver); -} - -module_init(agp_intelmch_init); -module_exit(agp_intelmch_cleanup); - -MODULE_AUTHOR("Dave Jones "); -MODULE_LICENSE("GPL"); - diff -Nru a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c --- a/drivers/char/agp/nvidia-agp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/nvidia-agp.c 2005-03-07 14:54:16 -08:00 @@ -215,7 +215,8 @@ mem->is_flushed = TRUE; } for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), + writel(agp_bridge->driver->mask_memory(agp_bridge, + mem->memory[i], mem->type), agp_bridge->gatt_table+nvidia_private.pg_offset+j); readl(agp_bridge->gatt_table+nvidia_private.pg_offset+j); /* PCI Posting. */ } @@ -407,7 +408,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_nvidia_pci_driver); + return pci_register_driver(&agp_nvidia_pci_driver); } static void __exit agp_nvidia_cleanup(void) diff -Nru a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c --- a/drivers/char/agp/sis-agp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/agp/sis-agp.c 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,5 @@ /* - * SiS AGPGART routines. + * SiS AGPGART routines. */ #include @@ -70,7 +70,7 @@ (previous_size->size_value & ~(0x03))); } -static void sis_delayed_enable(u32 mode) +static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode) { struct pci_dev *device = NULL; u32 command; @@ -79,10 +79,10 @@ printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", agp_bridge->major_version, agp_bridge->minor_version, - agp_bridge->dev->slot_name); + pci_name(agp_bridge->dev)); pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &command); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command |= AGPSTAT_AGP_ENABLE; rate = (command & 0x7) << 2; @@ -99,9 +99,9 @@ /* * Weird: on some sis chipsets any rate change in the target * command register triggers a 5ms screwup during which the master - * cannot be configured + * cannot be configured */ - if (device->device == agp_bridge->dev->device) { + if (device->device == bridge->dev->device) { printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n"); msleep(10); } @@ -342,7 +342,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_sis_pci_driver); + return pci_register_driver(&agp_sis_pci_driver); } static void __exit agp_sis_cleanup(void) diff -Nru a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c --- a/drivers/char/agp/sworks-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/sworks-agp.c 2005-03-07 14:54:18 -08:00 @@ -141,7 +141,7 @@ #define GET_GATT_OFF(addr) ((addr & 0x003ff000) >> 12) #endif -static int serverworks_create_gatt_table(void) +static int serverworks_create_gatt_table(struct agp_bridge_data *bridge) { struct aper_size_info_lvl2 *value; struct serverworks_page_map page_dir; @@ -192,7 +192,7 @@ return 0; } -static int serverworks_free_gatt_table(void) +static int serverworks_free_gatt_table(struct agp_bridge_data *bridge) { struct serverworks_page_map page_dir; @@ -341,7 +341,7 @@ for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = SVRWRKS_GET_GATT(addr); - writel(agp_bridge->driver->mask_memory(mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); + writel(agp_bridge->driver->mask_memory(agp_bridge, mem->memory[i], mem->type), cur_gatt+GET_GATT_OFF(addr)); } serverworks_tlbflush(mem); return 0; @@ -387,15 +387,15 @@ {32, 8192, 0xfe000000} }; -static void serverworks_agp_enable(u32 mode) +static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode) { u32 command; pci_read_config_dword(serverworks_private.svrwrks_dev, - agp_bridge->capndx + PCI_AGP_STATUS, + bridge->capndx + PCI_AGP_STATUS, &command); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command &= ~0x10; /* disable FW */ command &= ~0x08; @@ -403,7 +403,7 @@ command |= 0x100; pci_write_config_dword(serverworks_private.svrwrks_dev, - agp_bridge->capndx + PCI_AGP_COMMAND, + bridge->capndx + PCI_AGP_COMMAND, command); agp_device_command(command, 0); @@ -541,7 +541,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_serverworks_pci_driver); + return pci_register_driver(&agp_serverworks_pci_driver); } static void __exit agp_serverworks_cleanup(void) diff -Nru a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c --- a/drivers/char/agp/uninorth-agp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/agp/uninorth-agp.c 2005-03-07 14:54:17 -08:00 @@ -124,27 +124,27 @@ return 0; } -static void uninorth_agp_enable(u32 mode) +static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode) { u32 command, scratch; int timeout; - pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_STATUS, + pci_read_config_dword(bridge->dev, + bridge->capndx + PCI_AGP_STATUS, &command); - command = agp_collect_device_status(mode, command); + command = agp_collect_device_status(bridge, mode, command); command |= 0x100; uninorth_tlbflush(NULL); timeout = 0; do { - pci_write_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_COMMAND, + pci_write_config_dword(bridge->dev, + bridge->capndx + PCI_AGP_COMMAND, command); - pci_read_config_dword(agp_bridge->dev, - agp_bridge->capndx + PCI_AGP_COMMAND, + pci_read_config_dword(bridge->dev, + bridge->capndx + PCI_AGP_COMMAND, &scratch); } while ((scratch & 0x100) == 0 && ++timeout < 1000); if ((scratch & 0x100) == 0) @@ -155,7 +155,7 @@ uninorth_tlbflush(NULL); } -static int uninorth_create_gatt_table(void) +static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) { char *table; char *table_end; @@ -212,7 +212,7 @@ return 0; } -static int uninorth_free_gatt_table(void) +static int uninorth_free_gatt_table(struct agp_bridge_data *bridge) { int page_order; char *table, *table_end; @@ -375,7 +375,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_uninorth_pci_driver); + return pci_register_driver(&agp_uninorth_pci_driver); } static void __exit agp_uninorth_cleanup(void) diff -Nru a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c --- a/drivers/char/agp/via-agp.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/agp/via-agp.c 2005-03-07 14:54:18 -08:00 @@ -1,5 +1,5 @@ /* - * VIA AGPGART routines. + * VIA AGPGART routines. */ #include @@ -36,6 +36,7 @@ return values[i].size; } } + printk(KERN_ERR PFX "Unknown aperture size from AGP bridge (0x%x)\n", temp); return 0; } @@ -78,12 +79,19 @@ static void via_tlbflush(struct agp_memory *mem) { - pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, 0x0000008f); - pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, 0x0000000f); + u32 temp; + + pci_read_config_dword(agp_bridge->dev, VIA_GARTCTRL, &temp); + temp |= (1<<7); + temp &= ~0x7f; + pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, temp); + temp &= ~(1<<7); + temp &= ~0x7f; + pci_write_config_dword(agp_bridge->dev, VIA_GARTCTRL, temp); } -static struct aper_size_info_8 via_generic_sizes[7] = +static struct aper_size_info_8 via_generic_sizes[9] = { {256, 65536, 6, 0}, {128, 32768, 5, 128}, @@ -91,7 +99,9 @@ {32, 8192, 3, 224}, {16, 4096, 2, 240}, {8, 2048, 1, 248}, - {4, 1024, 0, 252} + {4, 1024, 0, 252}, + {2, 512, 0, 254}, + {1, 256, 0, 255} }; @@ -121,7 +131,7 @@ { u32 temp; struct aper_size_info_16 *current_size; - + current_size = A_SIZE_16(agp_bridge->current_size); /* address to map too */ @@ -132,13 +142,13 @@ pci_write_config_dword(agp_bridge->dev, VIA_AGP3_ATTBASE, agp_bridge->gatt_bus_addr & 0xfffff000); - /* 1. Enable GTLB in RX90<7>, all AGP aperture access needs to fetch + /* 1. Enable GTLB in RX90<7>, all AGP aperture access needs to fetch * translation table first. * 2. Enable AGP aperture in RX91<0>. This bit controls the enabling of the * graphics AGP aperture for the AGP3.0 port. */ pci_read_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, &temp); - pci_write_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, temp | (3<<7)); + pci_write_config_dword(agp_bridge->dev, VIA_AGP3_GARTCTRL, temp | (3<<7)); return 0; } @@ -189,7 +199,7 @@ .owner = THIS_MODULE, .aperture_sizes = via_generic_sizes, .size_type = U8_APER_SIZE, - .num_aperture_sizes = 7, + .num_aperture_sizes = 9, .configure = via_configure, .fetch_size = via_fetch_size, .cleanup = via_cleanup, @@ -525,7 +535,7 @@ { if (agp_off) return -EINVAL; - return pci_module_init(&agp_via_pci_driver); + return pci_register_driver(&agp_via_pci_driver); } static void __exit agp_via_cleanup(void) diff -Nru a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h --- a/drivers/char/drm/drmP.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/drm/drmP.h 2005-03-07 14:54:17 -08:00 @@ -497,6 +497,7 @@ DRM_AGP_KERN agp_info; /**< AGP device information */ drm_agp_mem_t *memory; /**< memory entries */ unsigned long mode; /**< AGP mode */ + struct agp_bridge_data *bridge; int enabled; /**< whether the AGP bus as been enabled */ int acquired; /**< whether the AGP device has been acquired */ unsigned long base; @@ -807,7 +808,7 @@ drm_device_t *dev); extern void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *dev); -extern DRM_AGP_MEM *drm_alloc_agp(int pages, u32 type); +extern DRM_AGP_MEM *drm_alloc_agp(struct agp_bridge_data *bridge, 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); @@ -930,10 +931,10 @@ extern void drm_vbl_send_signals( drm_device_t *dev ); /* AGP/GART support (drm_agpsupport.h) */ -extern drm_agp_head_t *drm_agp_init(void); +extern drm_agp_head_t *drm_agp_init(drm_device_t *dev); extern int drm_agp_acquire(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); -extern void drm_agp_do_release(void); +extern void drm_agp_do_release(drm_device_t *dev); extern int drm_agp_release(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int drm_agp_enable(struct inode *inode, struct file *filp, @@ -948,7 +949,7 @@ unsigned int cmd, unsigned long arg); extern int drm_agp_bind(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); -extern DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type); +extern DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size_t pages, u32 type); 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); diff -Nru a/drivers/char/drm/drm_agpsupport.c b/drivers/char/drm/drm_agpsupport.c --- a/drivers/char/drm/drm_agpsupport.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/drm/drm_agpsupport.c 2005-03-07 14:54:16 -08:00 @@ -92,14 +92,13 @@ { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; - int retcode; if (!dev->agp) return -ENODEV; if (dev->agp->acquired) return -EBUSY; - if ((retcode = agp_backend_acquire())) - return retcode; + if (!(dev->agp->bridge = agp_backend_acquire(dev->pdev))) + return -ENODEV; dev->agp->acquired = 1; return 0; } @@ -123,7 +122,7 @@ if (!dev->agp || !dev->agp->acquired) return -EINVAL; - agp_backend_release(); + agp_backend_release(dev->agp->bridge); dev->agp->acquired = 0; return 0; @@ -134,9 +133,9 @@ * * Calls agp_backend_release(). */ -void drm_agp_do_release(void) +void drm_agp_do_release(drm_device_t *dev) { - agp_backend_release(); + agp_backend_release(dev->agp->bridge); } /** @@ -165,7 +164,7 @@ return -EFAULT; dev->agp->mode = mode.mode; - agp_enable(mode.mode); + agp_enable(dev->agp->bridge, mode.mode); dev->agp->base = dev->agp->agp_info.aper_base; dev->agp->enabled = 1; return 0; @@ -207,7 +206,7 @@ pages = (request.size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request.type; - if (!(memory = drm_alloc_agp(pages, type))) { + if (!(memory = drm_alloc_agp(dev->agp->bridge, pages, type))) { drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); return -ENOMEM; } @@ -381,14 +380,19 @@ * \return pointer to a drm_agp_head structure. * */ -drm_agp_head_t *drm_agp_init(void) +drm_agp_head_t *drm_agp_init(drm_device_t *dev) { drm_agp_head_t *head = NULL; if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) return NULL; memset((void *)head, 0, sizeof(*head)); - agp_copy_info(&head->agp_info); + if (!(head->bridge = agp_backend_acquire(dev->pdev))) { + drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); + return NULL; + } + agp_copy_info(head->bridge, &head->agp_info); + agp_backend_release(head->bridge); if (head->agp_info.chipset == NOT_SUPPORTED) { drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); return NULL; @@ -406,9 +410,9 @@ } /** Calls agp_allocate_memory() */ -DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type) +DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data *bridge, size_t pages, u32 type) { - return agp_allocate_memory(pages, type); + return agp_allocate_memory(bridge, pages, type); } /** Calls agp_free_memory() */ diff -Nru a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c --- a/drivers/char/drm/drm_drv.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/drm/drm_drv.c 2005-03-07 14:54:18 -08:00 @@ -185,7 +185,7 @@ } dev->agp->memory = NULL; - if ( dev->agp->acquired ) drm_agp_do_release(); + if ( dev->agp->acquired ) drm_agp_do_release(dev); dev->agp->acquired = 0; dev->agp->enabled = 0; diff -Nru a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c --- a/drivers/char/drm/drm_memory.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/drm/drm_memory.c 2005-03-07 14:54:17 -08:00 @@ -155,9 +155,9 @@ #if __OS_HAS_AGP /** Wrapper around agp_allocate_memory() */ -DRM_AGP_MEM *drm_alloc_agp(int pages, u32 type) +DRM_AGP_MEM *drm_alloc_agp(struct agp_bridge_data *bridge, int pages, u32 type) { - return drm_agp_allocate_memory(pages, type); + return drm_agp_allocate_memory(bridge, pages, type); } /** Wrapper around agp_free_memory() */ diff -Nru a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c --- a/drivers/char/drm/drm_stub.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/char/drm/drm_stub.c 2005-03-07 14:54:18 -08:00 @@ -91,7 +91,7 @@ goto error_out_unreg; if (drm_core_has_AGP(dev)) { - dev->agp = drm_agp_init(); + dev->agp = drm_agp_init(dev); if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) { DRM_ERROR( "Cannot initialize the agpgart module.\n" ); retcode = -EINVAL; diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/char/random.c 2005-03-07 14:54:16 -08:00 @@ -1965,7 +1965,6 @@ * ********************************************************************/ -#ifdef CONFIG_INET /* * TCP initial sequence number picking. This uses the random number * generator to pick an initial secret value. This value is hashed @@ -2202,6 +2201,31 @@ EXPORT_SYMBOL(secure_tcpv6_sequence_number); #endif +/* The code below is shamelessly stolen from secure_tcp_sequence_number(). + * All blames to Andrey V. Savochkin . + */ +__u32 secure_ip_id(__u32 daddr) +{ + struct keydata *keyptr; + __u32 hash[4]; + + keyptr = get_keyptr(); + + /* + * Pick a unique starting offset for each IP destination. + * The dest ip address is placed in the starting vector, + * which is then hashed with random data. + */ + hash[0] = daddr; + hash[1] = keyptr->secret[9]; + hash[2] = keyptr->secret[10]; + hash[3] = keyptr->secret[11]; + + return halfMD4Transform(hash, keyptr->secret); +} + +#ifdef CONFIG_INET + __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport) { @@ -2242,28 +2266,7 @@ EXPORT_SYMBOL(secure_tcp_sequence_number); -/* The code below is shamelessly stolen from secure_tcp_sequence_number(). - * All blames to Andrey V. Savochkin . - */ -__u32 secure_ip_id(__u32 daddr) -{ - struct keydata *keyptr; - __u32 hash[4]; - keyptr = get_keyptr(); - - /* - * Pick a unique starting offset for each IP destination. - * The dest ip address is placed in the starting vector, - * which is then hashed with random data. - */ - hash[0] = daddr; - hash[1] = keyptr->secret[9]; - hash[2] = keyptr->secret[10]; - hash[3] = keyptr->secret[11]; - - return halfMD4Transform(hash, keyptr->secret); -} /* Generate secure starting point for ephemeral TCP port search */ u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport) @@ -2283,6 +2286,21 @@ return halfMD4Transform(hash, keyptr->secret); } +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) +u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport) +{ + struct keydata *keyptr = get_keyptr(); + u32 hash[12]; + + memcpy(hash, saddr, 16); + hash[4] = dport; + memcpy(&hash[5],keyptr->secret,sizeof(__u32) * 7); + + return twothirdsMD4Transform(daddr, hash); +} +EXPORT_SYMBOL(secure_tcpv6_port_ephemeral); +#endif + #ifdef CONFIG_SYN_COOKIES /* * Secure SYN cookie computation. This is the algorithm worked out by @@ -2383,3 +2401,40 @@ } #endif #endif /* CONFIG_INET */ + + +/* + * Get a random word for internal kernel use only. Similar to urandom but + * with the goal of minimal entropy pool depletion. As a result, the random + * value is not cryptographically secure but for several uses the cost of + * depleting entropy is too high + */ +unsigned int get_random_int(void) +{ + /* + * Use IP's RNG. It suits our purpose perfectly: it re-keys itself + * every second, from the entropy pool (and thus creates a limited + * drain on it), and uses halfMD4Transform within the second. We + * also mix it with jiffies and the PID: + */ + return secure_ip_id(current->pid + jiffies); +} + +/* + * randomize_range() returns a start address such that + * + * [...... .....] + * start end + * + * a with size "len" starting at the return value is inside in the + * area defined by [start, end], but is otherwise randomized. + */ +unsigned long +randomize_range(unsigned long start, unsigned long end, unsigned long len) +{ + unsigned long range = end - len - start; + + if (end <= start + len) + return 0; + return PAGE_ALIGN(get_random_int() % range + start); +} diff -Nru a/drivers/char/stallion.c b/drivers/char/stallion.c --- a/drivers/char/stallion.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/stallion.c 2005-03-07 14:54:17 -08:00 @@ -174,14 +174,6 @@ */ static char stl_unwanted[SC26198_RXFIFOSIZE]; -/* - * Keep track of what interrupts we have requested for us. - * We don't need to request an interrupt twice if it is being - * shared with another Stallion board. - */ -static int stl_gotintrs[STL_MAXBRDS]; -static int stl_numintrs; - /*****************************************************************************/ static stlbrd_t *stl_brds[STL_MAXBRDS]; @@ -504,7 +496,6 @@ static int stl_brdinit(stlbrd_t *brdp); static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp); -static int stl_mapirq(int irq, char *name); static int stl_getserial(stlport_t *portp, struct serial_struct __user *sp); static int stl_setserial(stlport_t *portp, struct serial_struct __user *sp); static int stl_getbrdstats(combrd_t __user *bp); @@ -513,11 +504,11 @@ static int stl_getportstruct(stlport_t __user *arg); static int stl_getbrdstruct(stlbrd_t __user *arg); static int stl_waitcarrier(stlport_t *portp, struct file *filp); -static void stl_eiointr(stlbrd_t *brdp); -static void stl_echatintr(stlbrd_t *brdp); -static void stl_echmcaintr(stlbrd_t *brdp); -static void stl_echpciintr(stlbrd_t *brdp); -static void stl_echpci64intr(stlbrd_t *brdp); +static int stl_eiointr(stlbrd_t *brdp); +static int stl_echatintr(stlbrd_t *brdp); +static int stl_echmcaintr(stlbrd_t *brdp); +static int stl_echpciintr(stlbrd_t *brdp); +static int stl_echpci64intr(stlbrd_t *brdp); static void stl_offintr(void *private); static void *stl_memalloc(int len); static stlbrd_t *stl_allocbrd(void); @@ -807,6 +798,9 @@ for (i = 0; (i < stl_nrbrds); i++) { if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) continue; + + free_irq(brdp->irq, brdp); + for (j = 0; (j < STL_MAXPANELS); j++) { panelp = brdp->panels[j]; if (panelp == (stlpanel_t *) NULL) @@ -832,9 +826,6 @@ stl_brds[i] = (stlbrd_t *) NULL; } - for (i = 0; (i < stl_numintrs); i++) - free_irq(stl_gotintrs[i], NULL); - restore_flags(flags); } @@ -1992,23 +1983,14 @@ static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs) { - stlbrd_t *brdp; - int i; - int handled = 0; + stlbrd_t *brdp = (stlbrd_t *) dev_id; #ifdef DEBUG - printk("stl_intr(irq=%d,regs=%x)\n", irq, (int) regs); + printk("stl_intr(brdp=%x,irq=%d,regs=%x)\n", (int) brdp, irq, + (int) regs); #endif - for (i = 0; (i < stl_nrbrds); i++) { - if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) - continue; - if (brdp->state == 0) - continue; - handled = 1; - (* brdp->isr)(brdp); - } - return IRQ_RETVAL(handled); + return IRQ_RETVAL((* brdp->isr)(brdp)); } /*****************************************************************************/ @@ -2017,15 +1999,19 @@ * Interrupt service routine for EasyIO board types. */ -static void stl_eiointr(stlbrd_t *brdp) +static int stl_eiointr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int iobase; + int handled = 0; panelp = brdp->panels[0]; iobase = panelp->iobase; - while (inb(brdp->iostatus) & EIO_INTRPEND) + while (inb(brdp->iostatus) & EIO_INTRPEND) { + handled = 1; (* panelp->isr)(panelp, iobase); + } + return handled; } /*****************************************************************************/ @@ -2034,15 +2020,17 @@ * Interrupt service routine for ECH-AT board types. */ -static void stl_echatintr(stlbrd_t *brdp) +static int stl_echatintr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr; + int handled = 0; outb((brdp->ioctrlval | ECH_BRDENABLE), brdp->ioctrl); while (inb(brdp->iostatus) & ECH_INTRPEND) { + handled = 1; for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; if (inb(ioaddr) & ECH_PNLINTRPEND) { @@ -2053,6 +2041,8 @@ } outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); + + return handled; } /*****************************************************************************/ @@ -2061,13 +2051,15 @@ * Interrupt service routine for ECH-MCA board types. */ -static void stl_echmcaintr(stlbrd_t *brdp) +static int stl_echmcaintr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr; + int handled = 0; while (inb(brdp->iostatus) & ECH_INTRPEND) { + handled = 1; for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; if (inb(ioaddr) & ECH_PNLINTRPEND) { @@ -2076,6 +2068,7 @@ } } } + return handled; } /*****************************************************************************/ @@ -2084,11 +2077,12 @@ * Interrupt service routine for ECH-PCI board types. */ -static void stl_echpciintr(stlbrd_t *brdp) +static int stl_echpciintr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr, recheck; + int handled = 0; while (1) { recheck = 0; @@ -2099,11 +2093,13 @@ panelp = brdp->bnk2panel[bnknr]; (* panelp->isr)(panelp, (ioaddr & 0xfffc)); recheck++; + handled = 1; } } if (! recheck) break; } + return handled; } /*****************************************************************************/ @@ -2112,13 +2108,15 @@ * Interrupt service routine for ECH-8/64-PCI board types. */ -static void stl_echpci64intr(stlbrd_t *brdp) +static int stl_echpci64intr(stlbrd_t *brdp) { stlpanel_t *panelp; unsigned int ioaddr; int bnknr; + int handled = 0; while (inb(brdp->ioctrl) & 0x1) { + handled = 1; for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; if (inb(ioaddr) & ECH_PNLINTRPEND) { @@ -2127,6 +2125,8 @@ } } } + + return handled; } /*****************************************************************************/ @@ -2174,39 +2174,6 @@ /*****************************************************************************/ /* - * Map in interrupt vector to this driver. Check that we don't - * already have this vector mapped, we might be sharing this - * interrupt across multiple boards. - */ - -static int __init stl_mapirq(int irq, char *name) -{ - int rc, i; - -#ifdef DEBUG - printk("stl_mapirq(irq=%d,name=%s)\n", irq, name); -#endif - - rc = 0; - for (i = 0; (i < stl_numintrs); i++) { - if (stl_gotintrs[i] == irq) - break; - } - if (i >= stl_numintrs) { - if (request_irq(irq, stl_intr, SA_SHIRQ, name, NULL) != 0) { - printk("STALLION: failed to register interrupt " - "routine for %s irq=%d\n", name, irq); - rc = -ENODEV; - } else { - stl_gotintrs[stl_numintrs++] = irq; - } - } - return(rc); -} - -/*****************************************************************************/ - -/* * Initialize all the ports on a panel. */ @@ -2389,7 +2356,13 @@ brdp->nrpanels = 1; brdp->state |= BRD_FOUND; brdp->hwid = status; - rc = stl_mapirq(brdp->irq, name); + if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { + printk("STALLION: failed to register interrupt " + "routine for %s irq=%d\n", name, brdp->irq); + rc = -ENODEV; + } else { + rc = 0; + } return(rc); } @@ -2594,7 +2567,14 @@ outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); brdp->state |= BRD_FOUND; - i = stl_mapirq(brdp->irq, name); + if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { + printk("STALLION: failed to register interrupt " + "routine for %s irq=%d\n", name, brdp->irq); + i = -ENODEV; + } else { + i = 0; + } + return(i); } diff -Nru a/drivers/char/tb0219.c b/drivers/char/tb0219.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/char/tb0219.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,347 @@ +/* + * Driver for TANBAC TB0219 base board. + * + * Copyright (C) 2005 Yoichi Yuasa + * + * 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 + +MODULE_AUTHOR("Yoichi Yuasa "); +MODULE_DESCRIPTION("TANBAC TB0219 base board driver"); +MODULE_LICENSE("GPL"); + +static int major; /* default is dynamic major device number */ +module_param(major, int, 0); +MODULE_PARM_DESC(major, "Major device number"); + +static void (*old_machine_restart)(char *command); +static void __iomem *tb0219_base; +static spinlock_t tb0219_lock; + +#define tb0219_read(offset) readw(tb0219_base + (offset)) +#define tb0219_write(offset, value) writew((value), tb0219_base + (offset)) + +#define TB0219_START 0x0a000000UL +#define TB0219_SIZE 0x20UL + +#define TB0219_LED 0x00 +#define TB0219_GPIO_INPUT 0x02 +#define TB0219_GPIO_OUTPUT 0x04 +#define TB0219_DIP_SWITCH 0x06 +#define TB0219_MISC 0x08 +#define TB0219_RESET 0x0e +#define TB0219_PCI_SLOT1_IRQ_STATUS 0x10 +#define TB0219_PCI_SLOT2_IRQ_STATUS 0x12 +#define TB0219_PCI_SLOT3_IRQ_STATUS 0x14 + +typedef enum { + TYPE_LED, + TYPE_GPIO_OUTPUT, +} tb0219_type_t; + +/* + * Minor device number + * 0 = 7 segment LED + * + * 16 = GPIO IN 0 + * 17 = GPIO IN 1 + * 18 = GPIO IN 2 + * 19 = GPIO IN 3 + * 20 = GPIO IN 4 + * 21 = GPIO IN 5 + * 22 = GPIO IN 6 + * 23 = GPIO IN 7 + * + * 32 = GPIO OUT 0 + * 33 = GPIO OUT 1 + * 34 = GPIO OUT 2 + * 35 = GPIO OUT 3 + * 36 = GPIO OUT 4 + * 37 = GPIO OUT 5 + * 38 = GPIO OUT 6 + * 39 = GPIO OUT 7 + * + * 48 = DIP switch 1 + * 49 = DIP switch 2 + * 50 = DIP switch 3 + * 51 = DIP switch 4 + * 52 = DIP switch 5 + * 53 = DIP switch 6 + * 54 = DIP switch 7 + * 55 = DIP switch 8 + */ + +static inline char get_led(void) +{ + return (char)tb0219_read(TB0219_LED); +} + +static inline char get_gpio_input_pin(unsigned int pin) +{ + uint16_t values; + + values = tb0219_read(TB0219_GPIO_INPUT); + if (values & (1 << pin)) + return '1'; + + return '0'; +} + +static inline char get_gpio_output_pin(unsigned int pin) +{ + uint16_t values; + + values = tb0219_read(TB0219_GPIO_OUTPUT); + if (values & (1 << pin)) + return '1'; + + return '0'; +} + +static inline char get_dip_switch(unsigned int pin) +{ + uint16_t values; + + values = tb0219_read(TB0219_DIP_SWITCH); + if (values & (1 << pin)) + return '1'; + + return '0'; +} + +static inline int set_led(char command) +{ + tb0219_write(TB0219_LED, command); + + return 0; +} + +static inline int set_gpio_output_pin(unsigned int pin, char command) +{ + unsigned long flags; + uint16_t value; + + if (command != '0' && command != '1') + return -EINVAL; + + spin_lock_irqsave(&tb0219_lock, flags); + value = tb0219_read(TB0219_GPIO_OUTPUT); + if (command == '0') + value &= ~(1 << pin); + else + value |= 1 << pin; + tb0219_write(TB0219_GPIO_OUTPUT, value); + spin_unlock_irqrestore(&tb0219_lock, flags); + + return 0; + +} + +static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t len, + loff_t *ppos) +{ + unsigned int minor; + char value; + + minor = iminor(file->f_dentry->d_inode); + switch (minor) { + case 0: + value = get_led(); + break; + case 16 ... 23: + value = get_gpio_input_pin(minor - 16); + break; + case 32 ... 39: + value = get_gpio_output_pin(minor - 32); + break; + case 48 ... 55: + value = get_dip_switch(minor - 48); + break; + default: + return -EBADF; + } + + if (len <= 0) + return -EFAULT; + + if (put_user(value, buf)) + return -EFAULT; + + return 1; +} + +static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data, + size_t len, loff_t *ppos) +{ + unsigned int minor; + tb0219_type_t type; + size_t i; + int retval = 0; + char c; + + minor = iminor(file->f_dentry->d_inode); + switch (minor) { + case 0: + type = TYPE_LED; + break; + case 32 ... 39: + type = TYPE_GPIO_OUTPUT; + break; + default: + return -EBADF; + } + + for (i = 0; i < len; i++) { + if (get_user(c, data + i)) + return -EFAULT; + + switch (type) { + case TYPE_LED: + retval = set_led(c); + break; + case TYPE_GPIO_OUTPUT: + retval = set_gpio_output_pin(minor - 32, c); + break; + } + + if (retval < 0) + break; + } + + return i; +} + +static int tanbac_tb0219_open(struct inode *inode, struct file *file) +{ + unsigned int minor; + + minor = iminor(inode); + switch (minor) { + case 0: + case 16 ... 23: + case 32 ... 39: + case 48 ... 55: + return nonseekable_open(inode, file); + default: + break; + } + + return -EBADF; +} + +static int tanbac_tb0219_release(struct inode *inode, struct file *file) +{ + return 0; +} + +static struct file_operations tb0219_fops = { + .owner = THIS_MODULE, + .read = tanbac_tb0219_read, + .write = tanbac_tb0219_write, + .open = tanbac_tb0219_open, + .release = tanbac_tb0219_release, +}; + +static void tb0219_restart(char *command) +{ + tb0219_write(TB0219_RESET, 0); +} + +static int tb0219_probe(struct device *dev) +{ + int retval; + + if (request_mem_region(TB0219_START, TB0219_SIZE, "TB0219") == NULL) + return -EBUSY; + + tb0219_base = ioremap(TB0219_START, TB0219_SIZE); + if (tb0219_base == NULL) { + release_mem_region(TB0219_START, TB0219_SIZE); + return -ENOMEM; + } + + retval = register_chrdev(major, "TB0219", &tb0219_fops); + if (retval < 0) { + iounmap(tb0219_base); + tb0219_base = NULL; + release_mem_region(TB0219_START, TB0219_SIZE); + return retval; + } + + spin_lock_init(&tb0219_lock); + + old_machine_restart = _machine_restart; + _machine_restart = tb0219_restart; + + if (major == 0) { + major = retval; + printk(KERN_INFO "TB0219: major number %d\n", major); + } + + return 0; +} + +static int tb0219_remove(struct device *dev) +{ + _machine_restart = old_machine_restart; + + iounmap(tb0219_base); + tb0219_base = NULL; + + release_mem_region(TB0219_START, TB0219_SIZE); + + return 0; +} + +static struct platform_device *tb0219_platform_device; + +static struct device_driver tb0219_device_driver = { + .name = "TB0219", + .bus = &platform_bus_type, + .probe = tb0219_probe, + .remove = tb0219_remove, +}; + +static int __devinit tanbac_tb0219_init(void) +{ + int retval; + + tb0219_platform_device = platform_device_register_simple("TB0219", -1, NULL, 0); + if (IS_ERR(tb0219_platform_device)) + return PTR_ERR(tb0219_platform_device); + + retval = driver_register(&tb0219_device_driver); + if (retval < 0) + platform_device_unregister(tb0219_platform_device); + + return retval; +} + +static void __devexit tanbac_tb0219_exit(void) +{ + driver_unregister(&tb0219_device_driver); + + platform_device_unregister(tb0219_platform_device); +} + +module_init(tanbac_tb0219_init); +module_exit(tanbac_tb0219_exit); diff -Nru a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c --- a/drivers/char/watchdog/sa1100_wdt.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/char/watchdog/sa1100_wdt.c 2005-03-07 14:54:17 -08:00 @@ -35,7 +35,7 @@ #include #include -#define OSCR_FREQ 3686400 +#define OSCR_FREQ CLOCK_TICK_RATE #define SA1100_CLOSE_MAGIC (0x5afc4453) static unsigned long sa1100wdt_users; diff -Nru a/drivers/i2c/algos/i2c-algo-ite.c b/drivers/i2c/algos/i2c-algo-ite.c --- a/drivers/i2c/algos/i2c-algo-ite.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/algos/i2c-algo-ite.c 2005-03-07 14:54:18 -08:00 @@ -490,7 +490,7 @@ * condition. */ #if 0 -static int iic_combined_transaction(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +static int iic_combined_transaction(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { int i; struct i2c_msg *pmsg; @@ -600,7 +600,7 @@ * verify that the bus is not busy or in some unknown state. */ static int iic_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct i2c_algo_iic_data *adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c --- a/drivers/i2c/algos/i2c-algo-pca.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/algos/i2c-algo-pca.c 2005-03-07 14:54:17 -08:00 @@ -178,7 +178,7 @@ } static int pca_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct i2c_algo_pca_data *adap = i2c_adap->algo_data; @@ -186,6 +186,7 @@ int curmsg; int numbytes = 0; int state; + int ret; state = pca_status(adap); if ( state != 0xF8 ) { @@ -218,6 +219,7 @@ } curmsg = 0; + ret = -EREMOTEIO; while (curmsg < num) { state = pca_status(adap); @@ -251,7 +253,7 @@ case 0x20: /* SLA+W has been transmitted; NOT ACK has been received */ DEB2("NOT ACK received after SLA+W\n"); pca_stop(adap); - return -EREMOTEIO; + goto out; case 0x40: /* SLA+R has been transmitted; ACK has been received */ pca_rx_ack(adap, msg->len > 1); @@ -263,7 +265,7 @@ numbytes++; pca_rx_ack(adap, numbytes < msg->len - 1); break; - } + } curmsg++; numbytes = 0; if (curmsg == num) pca_stop(adap); @@ -274,15 +276,15 @@ case 0x48: /* SLA+R has been transmitted; NOT ACK has been received */ DEB2("NOT ACK received after SLA+R\n"); pca_stop(adap); - return -EREMOTEIO; + goto out; case 0x30: /* Data byte in I2CDAT has been transmitted; NOT ACK has been received */ DEB2("NOT ACK received after data byte\n"); - return -EREMOTEIO; + goto out; case 0x38: /* Arbitration lost during SLA+W, SLA+R or data bytes */ DEB2("Arbitration lost\n"); - return -EREMOTEIO; + goto out; case 0x58: /* Data byte has been received; NOT ACK has been returned */ if ( numbytes == msg->len - 1 ) { @@ -297,21 +299,21 @@ "Not final byte. numbytes %d. len %d\n", numbytes, msg->len); pca_stop(adap); - return -EREMOTEIO; + goto out; } break; case 0x70: /* Bus error - SDA stuck low */ DEB2("BUS ERROR - SDA Stuck low\n"); pca_reset(adap); - return -EREMOTEIO; + goto out; case 0x90: /* Bus error - SCL stuck low */ DEB2("BUS ERROR - SCL Stuck low\n"); pca_reset(adap); - return -EREMOTEIO; + goto out; case 0x00: /* Bus error during master or slave mode due to illegal START or STOP condition */ DEB2("BUS ERROR - Illegal START or STOP\n"); pca_reset(adap); - return -EREMOTEIO; + goto out; default: printk(KERN_ERR DRIVER ": unhandled SIO state 0x%02x\n", state); break; @@ -319,11 +321,13 @@ } - DEB1(KERN_CRIT "}}} transfered %d messages. " + ret = curmsg; + out: + DEB1(KERN_CRIT "}}} transfered %d/%d messages. " "status is %#04x. control is %#04x\n", - num, pca_status(adap), + curmsg, num, pca_status(adap), pca_get_con(adap)); - return curmsg; + return ret; } static u32 pca_func(struct i2c_adapter *adap) diff -Nru a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c --- a/drivers/i2c/algos/i2c-algo-pcf.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/algos/i2c-algo-pcf.c 2005-03-07 14:54:17 -08:00 @@ -332,7 +332,7 @@ } static int pcf_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/algos/i2c-algo-sgi.c b/drivers/i2c/algos/i2c-algo-sgi.c --- a/drivers/i2c/algos/i2c-algo-sgi.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/algos/i2c-algo-sgi.c 2005-03-07 14:54:16 -08:00 @@ -131,7 +131,7 @@ return 0; } -static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], +static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct i2c_algo_sgi_data *adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig --- a/drivers/i2c/busses/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/busses/Kconfig 2005-03-07 14:54:18 -08:00 @@ -287,7 +287,7 @@ config I2C_PIIX4 tristate "Intel PIIX4" - depends on I2C && PCI && EXPERIMENTAL && !64BIT + depends on I2C && PCI && EXPERIMENTAL help If you say yes to this option, support will be included for the Intel PIIX4 family of mainboard I2C interfaces. Specifically, the following @@ -485,5 +485,15 @@ This driver can also be built as a module. If so, the module will be called i2c-pca-isa. + +config I2C_MV64XXX + tristate "Marvell mv64xxx I2C Controller" + depends on I2C && MV64X60 && EXPERIMENTAL + help + If you say yes to this option, support will be included for the + built-in I2C interface on the Marvell 64xxx line of host bridges. + + This driver can also be built as a module. If so, the module + will be called i2c-mv64xxx. endmenu diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile --- a/drivers/i2c/busses/Makefile 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/busses/Makefile 2005-03-07 14:54:18 -08:00 @@ -21,6 +21,7 @@ obj-$(CONFIG_I2C_IXP4XX) += i2c-ixp4xx.o obj-$(CONFIG_I2C_KEYWEST) += i2c-keywest.o obj-$(CONFIG_I2C_MPC) += i2c-mpc.o +obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o diff -Nru a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c --- a/drivers/i2c/busses/i2c-au1550.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/busses/i2c-au1550.c 2005-03-07 14:54:18 -08:00 @@ -253,7 +253,7 @@ } static int -au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct i2c_au1550_data *adap = i2c_adap->algo_data; struct i2c_msg *p; diff -Nru a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c --- a/drivers/i2c/busses/i2c-elektor.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/busses/i2c-elektor.c 2005-03-07 14:54:16 -08:00 @@ -183,6 +183,7 @@ static struct i2c_adapter pcf_isa_ops = { .owner = THIS_MODULE, + .class = I2C_CLASS_HWMON, .id = I2C_HW_P_ELEK, .algo_data = &pcf_isa_data, .name = "PCF8584 ISA adapter", diff -Nru a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c --- a/drivers/i2c/busses/i2c-ibm_iic.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-ibm_iic.c 2005-03-07 14:54:17 -08:00 @@ -549,7 +549,7 @@ * Generic master transfer entrypoint. * Returns the number of processed messages or error (<0) */ -static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) +static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct ibm_iic_private* dev = (struct ibm_iic_private*)(i2c_get_adapdata(adap)); volatile struct iic_regs __iomem *iic = dev->vaddr; diff -Nru a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c --- a/drivers/i2c/busses/i2c-iop3xx.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-iop3xx.c 2005-03-07 14:54:17 -08:00 @@ -361,7 +361,7 @@ * master_xfer() - main read/write entry */ static int -iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], +iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data; diff -Nru a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c --- a/drivers/i2c/busses/i2c-ixp4xx.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-ixp4xx.c 2005-03-07 14:54:17 -08:00 @@ -133,8 +133,8 @@ drv_data->algo_data.mdelay = 10; drv_data->algo_data.timeout = 100; - drv_data->adapter.id = I2C_HW_B_IXP4XX, - drv_data->adapter.algo_data = &drv_data->algo_data, + drv_data->adapter.id = I2C_HW_B_IXP4XX; + drv_data->adapter.algo_data = &drv_data->algo_data; drv_data->adapter.dev.parent = &plat_dev->dev; diff -Nru a/drivers/i2c/busses/i2c-keywest.c b/drivers/i2c/busses/i2c-keywest.c --- a/drivers/i2c/busses/i2c-keywest.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-keywest.c 2005-03-07 14:54:17 -08:00 @@ -399,7 +399,7 @@ */ static int keywest_xfer( struct i2c_adapter *adap, - struct i2c_msg msgs[], + struct i2c_msg *msgs, int num) { struct keywest_chan* chan = i2c_get_adapdata(adap); diff -Nru a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c --- a/drivers/i2c/busses/i2c-mpc.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/busses/i2c-mpc.c 2005-03-07 14:54:17 -08:00 @@ -233,7 +233,7 @@ return length; } -static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) +static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct i2c_msg *pmsg; int i; diff -Nru a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/busses/i2c-mv64xxx.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,596 @@ +/* + * drivers/i2c/busses/i2c-mv64xxx.c + * + * Driver for the i2c controller on the Marvell line of host bridges for MIPS + * and PPC (e.g, gt642[46]0, mv643[46]0, mv644[46]0). + * + * Author: Mark A. Greer + * + * 2005 (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 + +/* Register defines */ +#define MV64XXX_I2C_REG_SLAVE_ADDR 0x00 +#define MV64XXX_I2C_REG_DATA 0x04 +#define MV64XXX_I2C_REG_CONTROL 0x08 +#define MV64XXX_I2C_REG_STATUS 0x0c +#define MV64XXX_I2C_REG_BAUD 0x0c +#define MV64XXX_I2C_REG_EXT_SLAVE_ADDR 0x10 +#define MV64XXX_I2C_REG_SOFT_RESET 0x1c + +#define MV64XXX_I2C_REG_CONTROL_ACK 0x00000004 +#define MV64XXX_I2C_REG_CONTROL_IFLG 0x00000008 +#define MV64XXX_I2C_REG_CONTROL_STOP 0x00000010 +#define MV64XXX_I2C_REG_CONTROL_START 0x00000020 +#define MV64XXX_I2C_REG_CONTROL_TWSIEN 0x00000040 +#define MV64XXX_I2C_REG_CONTROL_INTEN 0x00000080 + +/* Ctlr status values */ +#define MV64XXX_I2C_STATUS_BUS_ERR 0x00 +#define MV64XXX_I2C_STATUS_MAST_START 0x08 +#define MV64XXX_I2C_STATUS_MAST_REPEAT_START 0x10 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_ACK 0x18 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_NO_ACK 0x20 +#define MV64XXX_I2C_STATUS_MAST_WR_ACK 0x28 +#define MV64XXX_I2C_STATUS_MAST_WR_NO_ACK 0x30 +#define MV64XXX_I2C_STATUS_MAST_LOST_ARB 0x38 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_ACK 0x40 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_NO_ACK 0x48 +#define MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK 0x50 +#define MV64XXX_I2C_STATUS_MAST_RD_DATA_NO_ACK 0x58 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_ACK 0xd0 +#define MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_NO_ACK 0xd8 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_ACK 0xe0 +#define MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_NO_ACK 0xe8 +#define MV64XXX_I2C_STATUS_NO_STATUS 0xf8 + +/* Driver states */ +enum { + MV64XXX_I2C_STATE_INVALID, + MV64XXX_I2C_STATE_IDLE, + MV64XXX_I2C_STATE_WAITING_FOR_START_COND, + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK, + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK, + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK, + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA, + MV64XXX_I2C_STATE_ABORTING, +}; + +/* Driver actions */ +enum { + MV64XXX_I2C_ACTION_INVALID, + MV64XXX_I2C_ACTION_CONTINUE, + MV64XXX_I2C_ACTION_SEND_START, + MV64XXX_I2C_ACTION_SEND_ADDR_1, + MV64XXX_I2C_ACTION_SEND_ADDR_2, + MV64XXX_I2C_ACTION_SEND_DATA, + MV64XXX_I2C_ACTION_RCV_DATA, + MV64XXX_I2C_ACTION_RCV_DATA_STOP, + MV64XXX_I2C_ACTION_SEND_STOP, +}; + +struct mv64xxx_i2c_data { + int irq; + u32 state; + u32 action; + u32 cntl_bits; + void __iomem *reg_base; + u32 reg_base_p; + u32 addr1; + u32 addr2; + u32 bytes_left; + u32 byte_posn; + u32 block; + int rc; + u32 freq_m; + u32 freq_n; + wait_queue_head_t waitq; + spinlock_t lock; + struct i2c_msg *msg; + struct i2c_adapter adapter; +}; + +/* + ***************************************************************************** + * + * Finite State Machine & Interrupt Routines + * + ***************************************************************************** + */ +static void +mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status) +{ + /* + * If state is idle, then this is likely the remnants of an old + * operation that driver has given up on or the user has killed. + * If so, issue the stop condition and go to idle. + */ + if (drv_data->state == MV64XXX_I2C_STATE_IDLE) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + return; + } + + if (drv_data->state == MV64XXX_I2C_STATE_ABORTING) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + return; + } + + /* The status from the ctlr [mostly] tells us what to do next */ + switch (status) { + /* Start condition interrupt */ + case MV64XXX_I2C_STATUS_MAST_START: /* 0x08 */ + case MV64XXX_I2C_STATUS_MAST_REPEAT_START: /* 0x10 */ + drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_1; + drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK; + break; + + /* Performing a write */ + case MV64XXX_I2C_STATUS_MAST_WR_ADDR_ACK: /* 0x18 */ + if (drv_data->msg->flags & I2C_M_TEN) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_2; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK; + break; + } + /* FALLTHRU */ + case MV64XXX_I2C_STATUS_MAST_WR_ADDR_2_ACK: /* 0xd0 */ + case MV64XXX_I2C_STATUS_MAST_WR_ACK: /* 0x28 */ + if (drv_data->bytes_left > 0) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_DATA; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK; + drv_data->bytes_left--; + } else { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + } + break; + + /* Performing a read */ + case MV64XXX_I2C_STATUS_MAST_RD_ADDR_ACK: /* 40 */ + if (drv_data->msg->flags & I2C_M_TEN) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_2; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_ADDR_2_ACK; + break; + } + /* FALLTHRU */ + case MV64XXX_I2C_STATUS_MAST_RD_ADDR_2_ACK: /* 0xe0 */ + if (drv_data->bytes_left == 0) { + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + break; + } + /* FALLTHRU */ + case MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK: /* 0x50 */ + if (status != MV64XXX_I2C_STATUS_MAST_RD_DATA_ACK) + drv_data->action = MV64XXX_I2C_ACTION_CONTINUE; + else { + drv_data->action = MV64XXX_I2C_ACTION_RCV_DATA; + drv_data->bytes_left--; + } + drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA; + + if (drv_data->bytes_left == 1) + drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_ACK; + break; + + case MV64XXX_I2C_STATUS_MAST_RD_DATA_NO_ACK: /* 0x58 */ + drv_data->action = MV64XXX_I2C_ACTION_RCV_DATA_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + break; + + case MV64XXX_I2C_STATUS_MAST_WR_ADDR_NO_ACK: /* 0x20 */ + case MV64XXX_I2C_STATUS_MAST_WR_NO_ACK: /* 30 */ + case MV64XXX_I2C_STATUS_MAST_RD_ADDR_NO_ACK: /* 48 */ + /* Doesn't seem to be a device at other end */ + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + drv_data->rc = -ENODEV; + break; + + default: + dev_err(&drv_data->adapter.dev, + "mv64xxx_i2c_fsm: Ctlr Error -- state: 0x%x, " + "status: 0x%x, addr: 0x%x, flags: 0x%x\n", + drv_data->state, status, drv_data->msg->addr, + drv_data->msg->flags); + drv_data->action = MV64XXX_I2C_ACTION_SEND_STOP; + drv_data->state = MV64XXX_I2C_STATE_IDLE; + drv_data->rc = -EIO; + } +} + +static void +mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data) +{ + switch(drv_data->action) { + case MV64XXX_I2C_ACTION_CONTINUE: + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_START: + writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_START, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_ADDR_1: + writel(drv_data->addr1, + drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_ADDR_2: + writel(drv_data->addr2, + drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_SEND_DATA: + writel(drv_data->msg->buf[drv_data->byte_posn++], + drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_RCV_DATA: + drv_data->msg->buf[drv_data->byte_posn++] = + readl(drv_data->reg_base + MV64XXX_I2C_REG_DATA); + writel(drv_data->cntl_bits, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + break; + + case MV64XXX_I2C_ACTION_RCV_DATA_STOP: + drv_data->msg->buf[drv_data->byte_posn++] = + readl(drv_data->reg_base + MV64XXX_I2C_REG_DATA); + drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN; + writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + drv_data->block = 0; + wake_up_interruptible(&drv_data->waitq); + break; + + case MV64XXX_I2C_ACTION_INVALID: + default: + dev_err(&drv_data->adapter.dev, + "mv64xxx_i2c_do_action: Invalid action: %d\n", + drv_data->action); + drv_data->rc = -EIO; + /* FALLTHRU */ + case MV64XXX_I2C_ACTION_SEND_STOP: + drv_data->cntl_bits &= ~MV64XXX_I2C_REG_CONTROL_INTEN; + writel(drv_data->cntl_bits | MV64XXX_I2C_REG_CONTROL_STOP, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + drv_data->block = 0; + wake_up_interruptible(&drv_data->waitq); + break; + } +} + +static int +mv64xxx_i2c_intr(int irq, void *dev_id, struct pt_regs *regs) +{ + struct mv64xxx_i2c_data *drv_data = dev_id; + unsigned long flags; + u32 status; + int rc = IRQ_NONE; + + spin_lock_irqsave(&drv_data->lock, flags); + while (readl(drv_data->reg_base + MV64XXX_I2C_REG_CONTROL) & + MV64XXX_I2C_REG_CONTROL_IFLG) { + status = readl(drv_data->reg_base + MV64XXX_I2C_REG_STATUS); + mv64xxx_i2c_fsm(drv_data, status); + mv64xxx_i2c_do_action(drv_data); + rc = IRQ_HANDLED; + } + spin_unlock_irqrestore(&drv_data->lock, flags); + + return rc; +} + +/* + ***************************************************************************** + * + * I2C Msg Execution Routines + * + ***************************************************************************** + */ +static void +mv64xxx_i2c_prepare_for_io(struct mv64xxx_i2c_data *drv_data, + struct i2c_msg *msg) +{ + u32 dir = 0; + + drv_data->msg = msg; + drv_data->byte_posn = 0; + drv_data->bytes_left = msg->len; + drv_data->rc = 0; + drv_data->cntl_bits = MV64XXX_I2C_REG_CONTROL_ACK | + MV64XXX_I2C_REG_CONTROL_INTEN | MV64XXX_I2C_REG_CONTROL_TWSIEN; + + if (msg->flags & I2C_M_RD) + dir = 1; + + if (msg->flags & I2C_M_REV_DIR_ADDR) + dir ^= 1; + + if (msg->flags & I2C_M_TEN) { + drv_data->addr1 = 0xf0 | (((u32)msg->addr & 0x300) >> 7) | dir; + drv_data->addr2 = (u32)msg->addr & 0xff; + } else { + drv_data->addr1 = ((u32)msg->addr & 0x7f) << 1 | dir; + drv_data->addr2 = 0; + } +} + +static void +mv64xxx_i2c_wait_for_completion(struct mv64xxx_i2c_data *drv_data) +{ + long time_left; + unsigned long flags; + char abort = 0; + + time_left = wait_event_interruptible_timeout(drv_data->waitq, + !drv_data->block, msecs_to_jiffies(drv_data->adapter.timeout)); + + spin_lock_irqsave(&drv_data->lock, flags); + if (!time_left) { /* Timed out */ + drv_data->rc = -ETIMEDOUT; + abort = 1; + } else if (time_left < 0) { /* Interrupted/Error */ + drv_data->rc = time_left; /* errno value */ + abort = 1; + } + + if (abort && drv_data->block) { + drv_data->state = MV64XXX_I2C_STATE_ABORTING; + spin_unlock_irqrestore(&drv_data->lock, flags); + + time_left = wait_event_timeout(drv_data->waitq, + !drv_data->block, + msecs_to_jiffies(drv_data->adapter.timeout)); + + if (time_left <= 0) { + drv_data->state = MV64XXX_I2C_STATE_IDLE; + dev_err(&drv_data->adapter.dev, + "mv64xxx: I2C bus locked\n"); + } + } else + spin_unlock_irqrestore(&drv_data->lock, flags); +} + +static int +mv64xxx_i2c_execute_msg(struct mv64xxx_i2c_data *drv_data, struct i2c_msg *msg) +{ + unsigned long flags; + + spin_lock_irqsave(&drv_data->lock, flags); + mv64xxx_i2c_prepare_for_io(drv_data, msg); + + if (unlikely(msg->flags & I2C_M_NOSTART)) { /* Skip start/addr phases */ + if (drv_data->msg->flags & I2C_M_RD) { + /* No action to do, wait for slave to send a byte */ + drv_data->action = MV64XXX_I2C_ACTION_CONTINUE; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA; + } else { + drv_data->action = MV64XXX_I2C_ACTION_SEND_DATA; + drv_data->state = + MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK; + drv_data->bytes_left--; + } + } else { + drv_data->action = MV64XXX_I2C_ACTION_SEND_START; + drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_START_COND; + } + + drv_data->block = 1; + mv64xxx_i2c_do_action(drv_data); + spin_unlock_irqrestore(&drv_data->lock, flags); + + mv64xxx_i2c_wait_for_completion(drv_data); + return drv_data->rc; +} + +/* + ***************************************************************************** + * + * I2C Core Support Routines (Interface to higher level I2C code) + * + ***************************************************************************** + */ +static u32 +mv64xxx_i2c_functionality(struct i2c_adapter *adap) +{ + return I2C_FUNC_I2C | I2C_FUNC_10BIT_ADDR | I2C_FUNC_SMBUS_EMUL; +} + +static int +mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) +{ + struct mv64xxx_i2c_data *drv_data = i2c_get_adapdata(adap); + int i, rc = 0; + + for (i=0; ireg_base + MV64XXX_I2C_REG_SOFT_RESET); + writel((((drv_data->freq_m & 0xf) << 3) | (drv_data->freq_n & 0x7)), + drv_data->reg_base + MV64XXX_I2C_REG_BAUD); + writel(0, drv_data->reg_base + MV64XXX_I2C_REG_SLAVE_ADDR); + writel(0, drv_data->reg_base + MV64XXX_I2C_REG_EXT_SLAVE_ADDR); + writel(MV64XXX_I2C_REG_CONTROL_TWSIEN | MV64XXX_I2C_REG_CONTROL_STOP, + drv_data->reg_base + MV64XXX_I2C_REG_CONTROL); + drv_data->state = MV64XXX_I2C_STATE_IDLE; +} + +static int __devinit +mv64xxx_i2c_map_regs(struct platform_device *pd, + struct mv64xxx_i2c_data *drv_data) +{ + struct resource *r; + + if ((r = platform_get_resource(pd, IORESOURCE_MEM, 0)) && + request_mem_region(r->start, MV64XXX_I2C_REG_BLOCK_SIZE, + drv_data->adapter.name)) { + + drv_data->reg_base = ioremap(r->start, + MV64XXX_I2C_REG_BLOCK_SIZE); + drv_data->reg_base_p = r->start; + } else + return -ENOMEM; + + return 0; +} + +static void __devexit +mv64xxx_i2c_unmap_regs(struct mv64xxx_i2c_data *drv_data) +{ + if (drv_data->reg_base) { + iounmap(drv_data->reg_base); + release_mem_region(drv_data->reg_base_p, + MV64XXX_I2C_REG_BLOCK_SIZE); + } + + drv_data->reg_base = NULL; + drv_data->reg_base_p = 0; +} + +static int __devinit +mv64xxx_i2c_probe(struct device *dev) +{ + struct platform_device *pd = to_platform_device(dev); + struct mv64xxx_i2c_data *drv_data; + struct mv64xxx_i2c_pdata *pdata = dev->platform_data; + int rc; + + if ((pd->id != 0) || !pdata) + return -ENODEV; + + drv_data = kmalloc(sizeof(struct mv64xxx_i2c_data), GFP_KERNEL); + + if (!drv_data) + return -ENOMEM; + + memset(drv_data, 0, sizeof(struct mv64xxx_i2c_data)); + + if (mv64xxx_i2c_map_regs(pd, drv_data)) { + rc = -ENODEV; + goto exit_kfree; + } + + strncpy(drv_data->adapter.name, MV64XXX_I2C_CTLR_NAME " adapter", + I2C_NAME_SIZE); + + init_waitqueue_head(&drv_data->waitq); + spin_lock_init(&drv_data->lock); + + drv_data->freq_m = pdata->freq_m; + drv_data->freq_n = pdata->freq_n; + drv_data->irq = platform_get_irq(pd, 0); + drv_data->adapter.id = I2C_ALGO_MV64XXX | I2C_HW_MV64XXX; + drv_data->adapter.algo = &mv64xxx_i2c_algo; + drv_data->adapter.timeout = pdata->timeout; + drv_data->adapter.retries = pdata->retries; + dev_set_drvdata(dev, drv_data); + i2c_set_adapdata(&drv_data->adapter, drv_data); + + if (request_irq(drv_data->irq, mv64xxx_i2c_intr, 0, + MV64XXX_I2C_CTLR_NAME, drv_data)) { + + dev_err(dev, "mv64xxx: Can't register intr handler " + "irq: %d\n", drv_data->irq); + rc = -EINVAL; + goto exit_unmap_regs; + } else if ((rc = i2c_add_adapter(&drv_data->adapter)) != 0) { + dev_err(dev, "mv64xxx: Can't add i2c adapter, rc: %d\n", -rc); + goto exit_free_irq; + } + + mv64xxx_i2c_hw_init(drv_data); + + return 0; + + exit_free_irq: + free_irq(drv_data->irq, drv_data); + exit_unmap_regs: + mv64xxx_i2c_unmap_regs(drv_data); + exit_kfree: + kfree(drv_data); + return rc; +} + +static int __devexit +mv64xxx_i2c_remove(struct device *dev) +{ + struct mv64xxx_i2c_data *drv_data = dev_get_drvdata(dev); + int rc; + + rc = i2c_del_adapter(&drv_data->adapter); + free_irq(drv_data->irq, drv_data); + mv64xxx_i2c_unmap_regs(drv_data); + kfree(drv_data); + + return rc; +} + +static struct device_driver mv64xxx_i2c_driver = { + .name = MV64XXX_I2C_CTLR_NAME, + .bus = &platform_bus_type, + .probe = mv64xxx_i2c_probe, + .remove = mv64xxx_i2c_remove, +}; + +static int __init +mv64xxx_i2c_init(void) +{ + return driver_register(&mv64xxx_i2c_driver); +} + +static void __exit +mv64xxx_i2c_exit(void) +{ + driver_unregister(&mv64xxx_i2c_driver); +} + +module_init(mv64xxx_i2c_init); +module_exit(mv64xxx_i2c_exit); + +MODULE_AUTHOR("Mark A. Greer "); +MODULE_DESCRIPTION("Marvell mv64xxx host bridge i2c ctlr driver"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c --- a/drivers/i2c/busses/i2c-nforce2.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/busses/i2c-nforce2.c 2005-03-07 14:54:16 -08:00 @@ -29,9 +29,10 @@ nForce2 Ultra 400 MCP 0084 nForce3 Pro150 MCP 00D4 nForce3 250Gb MCP 00E4 + nForce4 MCP 0052 - This driver supports the 2 SMBuses that are included in the MCP2 of the - nForce2 chipset. + This driver supports the 2 SMBuses that are included in the MCP of the + nForce2/3/4 chipsets. */ /* Note: we assume there can only be one nForce2, with two SMBus interfaces */ @@ -295,6 +296,7 @@ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS) }, { 0 } }; diff -Nru a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c --- a/drivers/i2c/busses/i2c-s3c2410.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/busses/i2c-s3c2410.c 2005-03-07 14:54:16 -08:00 @@ -483,7 +483,7 @@ * this starts an i2c transfer */ -static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg msgs[], int num) +static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int num) { unsigned long timeout; int ret; @@ -534,7 +534,7 @@ */ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, - struct i2c_msg msgs[], int num) + struct i2c_msg *msgs, int num) { struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data; int retry; @@ -569,6 +569,7 @@ .name = "s3c2410-i2c", .algo = &s3c24xx_i2c_algorithm, .retries = 2, + .class = I2C_CLASS_HWMON, }, }; diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig --- a/drivers/i2c/chips/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/Kconfig 2005-03-07 14:54:17 -08:00 @@ -63,7 +63,7 @@ will be called asb100. config SENSORS_DS1621 - tristate "Dallas Semiconductor DS1621 and DS1625" + tristate "Dallas Semiconductor DS1621 and DS1625" depends on I2C && EXPERIMENTAL select I2C_SENSOR help @@ -84,6 +84,17 @@ This driver can also be built as a module. If so, the module will be called fscher. +config SENSORS_FSCPOS + tristate "FSC Poseidon" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for Fujitsu Siemens + Computers Poseidon sensor chips. + + This driver can also be built as a module. If so, the module + will be called fscpos. + config SENSORS_GL518SM tristate "Genesys Logic GL518SM" depends on I2C && EXPERIMENTAL @@ -95,6 +106,17 @@ This driver can also be built as a module. If so, the module will be called gl518sm. +config SENSORS_GL520SM + tristate "Genesys Logic GL520SM" + depends on I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for Genesys Logic GL520SM + sensor chips. + + This driver can also be built as a module. If so, the module + will be called gl520sm. + config SENSORS_IT87 tristate "ITE IT87xx and compatibles" depends on I2C && EXPERIMENTAL @@ -251,6 +273,18 @@ This driver can also be built as a module. If so, the module will be called smsc47b397. +config SENSORS_SIS5595 + tristate "Silicon Integrated Systems Corp. SiS5595" + depends on I2C && PCI && EXPERIMENTAL + select I2C_SENSOR + select I2C_ISA + help + If you say yes here you get support for the integrated sensors in + SiS5595 South Bridges. + + This driver can also be built as a module. If so, the module + will be called sis5595. + config SENSORS_SMSC47M1 tristate "SMSC LPC47M10x and compatibles" depends on I2C && EXPERIMENTAL @@ -304,6 +338,7 @@ tristate "Winbond W83627HF, W83627THF, W83637HF, W83697HF" depends on I2C && EXPERIMENTAL select I2C_SENSOR + select I2C_ISA help If you say yes here you get support for the Winbond W836X7 series of sensor chips: the W83627HF, W83627THF, W83637HF, and the W83697HF @@ -370,5 +405,14 @@ This driver can also be built as a module. If so, the module will be called isp1301_omap. + +config SENSORS_M41T00 + tristate "ST M41T00 RTC chip" + depends on I2C && PPC32 + help + If you say yes here you get support for the ST M41T00 RTC chip. + + This driver can also be built as a module. If so, the module + will be called m41t00. endmenu diff -Nru a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile --- a/drivers/i2c/chips/Makefile 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/Makefile 2005-03-07 14:54:18 -08:00 @@ -14,7 +14,9 @@ obj-$(CONFIG_SENSORS_DS1621) += ds1621.o obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o obj-$(CONFIG_SENSORS_FSCHER) += fscher.o +obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o +obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o obj-$(CONFIG_SENSORS_IT87) += it87.o obj-$(CONFIG_SENSORS_LM63) += lm63.o obj-$(CONFIG_SENSORS_LM75) += lm75.o @@ -26,10 +28,12 @@ obj-$(CONFIG_SENSORS_LM87) += lm87.o obj-$(CONFIG_SENSORS_LM90) += lm90.o obj-$(CONFIG_SENSORS_MAX1619) += max1619.o +obj-$(CONFIG_SENSORS_M41T00) += m41t00.o obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_PCF8574) += pcf8574.o obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o obj-$(CONFIG_SENSORS_RTC8564) += rtc8564.o +obj-$(CONFIG_SENSORS_SIS5595) += sis5595.o obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o diff -Nru a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c --- a/drivers/i2c/chips/adm1021.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/adm1021.c 2005-03-07 14:54:16 -08:00 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -147,8 +148,6 @@ .detach_client = adm1021_detach_client, }; -static int adm1021_id; - #define show(value) \ static ssize_t show_##value(struct device *dev, char *buf) \ { \ @@ -299,8 +298,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, type_name, I2C_NAME_SIZE); data->type = kind; - - new_client->id = adm1021_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -373,8 +370,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting adm1021 update\n"); data->temp_input = adm1021_read_value(client, ADM1021_REG_TEMP); diff -Nru a/drivers/i2c/chips/adm1025.c b/drivers/i2c/chips/adm1025.c --- a/drivers/i2c/chips/adm1025.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/adm1025.c 2005-03-07 14:54:16 -08:00 @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -148,12 +149,6 @@ }; /* - * Internal variables - */ - -static int adm1025_id; - -/* * Sysfs stuff */ @@ -397,7 +392,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = adm1025_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -512,9 +506,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { int i; dev_dbg(&client->dev, "Updating data.\n"); diff -Nru a/drivers/i2c/chips/adm1026.c b/drivers/i2c/chips/adm1026.c --- a/drivers/i2c/chips/adm1026.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/adm1026.c 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -313,8 +314,6 @@ .detach_client = adm1026_detach_client, }; -static int adm1026_id; - int adm1026_attach_adapter(struct i2c_adapter *adapter) { if (!(adapter->class & I2C_CLASS_HWMON)) { @@ -363,49 +362,47 @@ int value, i; struct adm1026_data *data = i2c_get_clientdata(client); - dev_dbg(&client->dev,"(%d): Initializing device\n", client->id); + dev_dbg(&client->dev, "Initializing device\n"); /* Read chip config */ data->config1 = adm1026_read_value(client, ADM1026_REG_CONFIG1); data->config2 = adm1026_read_value(client, ADM1026_REG_CONFIG2); data->config3 = adm1026_read_value(client, ADM1026_REG_CONFIG3); /* Inform user of chip config */ - dev_dbg(&client->dev, "(%d): ADM1026_REG_CONFIG1 is: 0x%02x\n", - client->id, data->config1); + dev_dbg(&client->dev, "ADM1026_REG_CONFIG1 is: 0x%02x\n", + data->config1); if ((data->config1 & CFG1_MONITOR) == 0) { - dev_dbg(&client->dev, "(%d): Monitoring not currently " - "enabled.\n", client->id); + dev_dbg(&client->dev, "Monitoring not currently " + "enabled.\n"); } if (data->config1 & CFG1_INT_ENABLE) { - dev_dbg(&client->dev, "(%d): SMBALERT interrupts are " - "enabled.\n", client->id); + dev_dbg(&client->dev, "SMBALERT interrupts are " + "enabled.\n"); } if (data->config1 & CFG1_AIN8_9) { - dev_dbg(&client->dev, "(%d): in8 and in9 enabled. " - "temp3 disabled.\n", client->id); + dev_dbg(&client->dev, "in8 and in9 enabled. " + "temp3 disabled.\n"); } else { - dev_dbg(&client->dev, "(%d): temp3 enabled. in8 and " - "in9 disabled.\n", client->id); + dev_dbg(&client->dev, "temp3 enabled. in8 and " + "in9 disabled.\n"); } if (data->config1 & CFG1_THERM_HOT) { - dev_dbg(&client->dev, "(%d): Automatic THERM, PWM, " - "and temp limits enabled.\n", client->id); + dev_dbg(&client->dev, "Automatic THERM, PWM, " + "and temp limits enabled.\n"); } value = data->config3; if (data->config3 & CFG3_GPIO16_ENABLE) { - dev_dbg(&client->dev, "(%d): GPIO16 enabled. THERM" - "pin disabled.\n", client->id); + dev_dbg(&client->dev, "GPIO16 enabled. THERM" + "pin disabled.\n"); } else { - dev_dbg(&client->dev, "(%d): THERM pin enabled. " - "GPIO16 disabled.\n", client->id); + dev_dbg(&client->dev, "THERM pin enabled. " + "GPIO16 disabled.\n"); } if (data->config3 & CFG3_VREF_250) { - dev_dbg(&client->dev, "(%d): Vref is 2.50 Volts.\n", - client->id); + dev_dbg(&client->dev, "Vref is 2.50 Volts.\n"); } else { - dev_dbg(&client->dev, "(%d): Vref is 1.82 Volts.\n", - client->id); + dev_dbg(&client->dev, "Vref is 1.82 Volts.\n"); } /* Read and pick apart the existing GPIO configuration */ value = 0; @@ -423,12 +420,11 @@ adm1026_print_gpio(client); /* If the user asks us to reprogram the GPIO config, then - * do it now. But only if this is the first ADM1026. + * do it now. */ - if (client->id == 0 - && (gpio_input[0] != -1 || gpio_output[0] != -1 + if (gpio_input[0] != -1 || gpio_output[0] != -1 || gpio_inverted[0] != -1 || gpio_normal[0] != -1 - || gpio_fan[0] != -1)) { + || gpio_fan[0] != -1) { adm1026_fixup_gpio(client); } @@ -448,8 +444,7 @@ value = adm1026_read_value(client, ADM1026_REG_CONFIG1); /* Set MONITOR, clear interrupt acknowledge and s/w reset */ value = (value | CFG1_MONITOR) & (~CFG1_INT_CLEAR & ~CFG1_RESET); - dev_dbg(&client->dev, "(%d): Setting CONFIG to: 0x%02x\n", - client->id, value); + dev_dbg(&client->dev, "Setting CONFIG to: 0x%02x\n", value); data->config1 = value; adm1026_write_value(client, ADM1026_REG_CONFIG1, value); @@ -467,31 +462,30 @@ struct adm1026_data *data = i2c_get_clientdata(client); int i; - dev_dbg(&client->dev, "(%d): GPIO config is:", client->id); + dev_dbg(&client->dev, "GPIO config is:"); for (i = 0;i <= 7;++i) { if (data->config2 & (1 << i)) { - dev_dbg(&client->dev, "\t(%d): %sGP%s%d\n", client->id, + dev_dbg(&client->dev, "\t%sGP%s%d\n", data->gpio_config[i] & 0x02 ? "" : "!", data->gpio_config[i] & 0x01 ? "OUT" : "IN", i); } else { - dev_dbg(&client->dev, "\t(%d): FAN%d\n", - client->id, i); + dev_dbg(&client->dev, "\tFAN%d\n", i); } } for (i = 8;i <= 15;++i) { - dev_dbg(&client->dev, "\t(%d): %sGP%s%d\n", client->id, + dev_dbg(&client->dev, "\t%sGP%s%d\n", data->gpio_config[i] & 0x02 ? "" : "!", data->gpio_config[i] & 0x01 ? "OUT" : "IN", i); } if (data->config3 & CFG3_GPIO16_ENABLE) { - dev_dbg(&client->dev, "\t(%d): %sGP%s16\n", client->id, + dev_dbg(&client->dev, "\t%sGP%s16\n", data->gpio_config[16] & 0x02 ? "" : "!", data->gpio_config[16] & 0x01 ? "OUT" : "IN"); } else { /* GPIO16 is THERM */ - dev_dbg(&client->dev, "\t(%d): THERM\n", client->id); + dev_dbg(&client->dev, "\tTHERM\n"); } } @@ -580,10 +574,9 @@ down(&data->update_lock); if (!data->valid - || (jiffies - data->last_reading > ADM1026_DATA_INTERVAL)) { + || time_after(jiffies, data->last_reading + ADM1026_DATA_INTERVAL)) { /* Things that change quickly */ - dev_dbg(&client->dev,"(%d): Reading sensor values\n", - client->id); + dev_dbg(&client->dev,"Reading sensor values\n"); for (i = 0;i <= 16;++i) { data->in[i] = adm1026_read_value(client, ADM1026_REG_IN[i]); @@ -628,11 +621,10 @@ data->last_reading = jiffies; }; /* last_reading */ - if (!data->valid || (jiffies - data->last_config > - ADM1026_CONFIG_INTERVAL)) { + if (!data->valid || + time_after(jiffies, data->last_config + ADM1026_CONFIG_INTERVAL)) { /* Things that don't change often */ - dev_dbg(&client->dev, "(%d): Reading config values\n", - client->id); + dev_dbg(&client->dev, "Reading config values\n"); for (i = 0;i <= 16;++i) { data->in_min[i] = adm1026_read_value(client, ADM1026_REG_IN_MIN[i]); @@ -712,8 +704,7 @@ data->last_config = jiffies; }; /* last_config */ - dev_dbg(&client->dev, "(%d): Setting VID from GPIO11-15.\n", - client->id); + dev_dbg(&client->dev, "Setting VID from GPIO11-15.\n"); data->vid = (data->gpio >> 11) & 0x1f; data->valid = 1; up(&data->update_lock); @@ -1608,15 +1599,9 @@ strlcpy(new_client->name, type_name, I2C_NAME_SIZE); /* Fill in the remaining client fields */ - new_client->id = adm1026_id++; data->type = kind; data->valid = 0; init_MUTEX(&data->update_lock); - - dev_dbg(&new_client->dev, "(%d): Assigning ID %d to %s at %d,0x%02x\n", - new_client->id, new_client->id, new_client->name, - i2c_adapter_id(new_client->adapter), - new_client->addr); /* Tell the I2C layer a new client has arrived */ if ((err = i2c_attach_client(new_client))) diff -Nru a/drivers/i2c/chips/adm1031.c b/drivers/i2c/chips/adm1031.c --- a/drivers/i2c/chips/adm1031.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/adm1031.c 2005-03-07 14:54:17 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -110,8 +111,6 @@ .detach_client = adm1031_detach_client, }; -static int adm1031_id; - static inline u8 adm1031_read_value(struct i2c_client *client, u8 reg) { return i2c_smbus_read_byte_data(client, reg); @@ -781,8 +780,6 @@ data->chip_type = kind; strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = adm1031_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -888,8 +885,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting adm1031 update\n"); for (chan = 0; diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c --- a/drivers/i2c/chips/asb100.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/asb100.c 2005-03-07 14:54:17 -08:00 @@ -36,17 +36,12 @@ asb100 7 3 1 4 0x31 0x0694 yes no */ -#include #include #include -#include -#include #include #include #include #include -#include -#include #include "lm75.h" /* @@ -970,8 +965,8 @@ down(&data->update_lock); - if (time_after(jiffies - data->last_updated, (unsigned long)(HZ+HZ/2)) - || time_before(jiffies, data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "starting device update...\n"); diff -Nru a/drivers/i2c/chips/ds1621.c b/drivers/i2c/chips/ds1621.c --- a/drivers/i2c/chips/ds1621.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/ds1621.c 2005-03-07 14:54:18 -08:00 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include "lm75.h" @@ -95,8 +96,6 @@ .detach_client = ds1621_detach_client, }; -static int ds1621_id; - /* All registers are word-sized, except for the configuration register. DS1621 uses a high-byte first convention, which is exactly opposite to the usual practice. */ @@ -236,8 +235,6 @@ /* Fill in remaining client fields and put it into the global list */ strlcpy(new_client->name, "ds1621", I2C_NAME_SIZE); - - new_client->id = ds1621_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -288,8 +285,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting ds1621 update\n"); diff -Nru a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c --- a/drivers/i2c/chips/eeprom.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/eeprom.c 2005-03-07 14:54:16 -08:00 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -86,8 +87,7 @@ down(&data->update_lock); if (!(data->valid & (1 << slice)) || - (jiffies - data->last_updated[slice] > 300 * HZ) || - (jiffies < data->last_updated[slice])) { + time_after(jiffies, data->last_updated[slice] + 300 * HZ)) { dev_dbg(&client->dev, "Starting eeprom update, slice %u\n", slice); if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { diff -Nru a/drivers/i2c/chips/fscher.c b/drivers/i2c/chips/fscher.c --- a/drivers/i2c/chips/fscher.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/fscher.c 2005-03-07 14:54:17 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -151,12 +152,6 @@ }; /* - * Internal variables - */ - -static int fscher_id; - -/* * Sysfs stuff */ @@ -337,7 +332,6 @@ /* Fill in the remaining client fields and put it into the * global list */ strlcpy(new_client->name, "fscher", I2C_NAME_SIZE); - new_client->id = fscher_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -418,8 +412,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > 2 * HZ) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) { dev_dbg(&client->dev, "Starting fscher update\n"); diff -Nru a/drivers/i2c/chips/fscpos.c b/drivers/i2c/chips/fscpos.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/fscpos.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,631 @@ +/* + fscpos.c - Kernel module for hardware monitoring with FSC Poseidon chips + Copyright (C) 2004, 2005 Stefan Ott + + 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. +*/ + +/* + fujitsu siemens poseidon chip, + module based on the old fscpos module by Hermann Jung and + the fscher module by Reinhard Nissl + + original module based on lm80.c + Copyright (C) 1998, 1999 Frodo Looijaard + and Philip Edelbrock + + Thanks to Jean Delvare for reviewing my code and suggesting a lot of + improvements. +*/ + +#include +#include +#include +#include +#include + +/* + * Addresses to scan + */ +static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; +static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; + +/* + * Insmod parameters + */ +SENSORS_INSMOD_1(fscpos); + +/* + * The FSCPOS registers + */ + +/* chip identification */ +#define FSCPOS_REG_IDENT_0 0x00 +#define FSCPOS_REG_IDENT_1 0x01 +#define FSCPOS_REG_IDENT_2 0x02 +#define FSCPOS_REG_REVISION 0x03 + +/* global control and status */ +#define FSCPOS_REG_EVENT_STATE 0x04 +#define FSCPOS_REG_CONTROL 0x05 + +/* watchdog */ +#define FSCPOS_REG_WDOG_PRESET 0x28 +#define FSCPOS_REG_WDOG_STATE 0x23 +#define FSCPOS_REG_WDOG_CONTROL 0x21 + +/* voltages */ +#define FSCPOS_REG_VOLT_12 0x45 +#define FSCPOS_REG_VOLT_5 0x42 +#define FSCPOS_REG_VOLT_BATT 0x48 + +/* fans - the chip does not support minimum speed for fan2 */ +static u8 FSCPOS_REG_PWM[] = { 0x55, 0x65 }; +static u8 FSCPOS_REG_FAN_ACT[] = { 0x0e, 0x6b, 0xab }; +static u8 FSCPOS_REG_FAN_STATE[] = { 0x0d, 0x62, 0xa2 }; +static u8 FSCPOS_REG_FAN_RIPPLE[] = { 0x0f, 0x6f, 0xaf }; + +/* temperatures */ +static u8 FSCPOS_REG_TEMP_ACT[] = { 0x64, 0x32, 0x35 }; +static u8 FSCPOS_REG_TEMP_STATE[] = { 0x71, 0x81, 0x91 }; + +/* + * Functions declaration + */ +static int fscpos_attach_adapter(struct i2c_adapter *adapter); +static int fscpos_detect(struct i2c_adapter *adapter, int address, int kind); +static int fscpos_detach_client(struct i2c_client *client); + +static int fscpos_read_value(struct i2c_client *client, u8 register); +static int fscpos_write_value(struct i2c_client *client, u8 register, u8 value); +static struct fscpos_data *fscpos_update_device(struct device *dev); +static void fscpos_init_client(struct i2c_client *client); + +static void reset_fan_alarm(struct i2c_client *client, int nr); + +/* + * Driver data (common to all clients) + */ +static struct i2c_driver fscpos_driver = { + .owner = THIS_MODULE, + .name = "fscpos", + .id = I2C_DRIVERID_FSCPOS, + .flags = I2C_DF_NOTIFY, + .attach_adapter = fscpos_attach_adapter, + .detach_client = fscpos_detach_client, +}; + +/* + * Client data (each client gets its own) + */ +struct fscpos_data { + struct i2c_client client; + struct semaphore update_lock; + char valid; /* 0 until following fields are valid */ + unsigned long last_updated; /* In jiffies */ + + /* register values */ + u8 revision; /* revision of chip */ + u8 global_event; /* global event status */ + u8 global_control; /* global control register */ + u8 wdog_control; /* watchdog control */ + u8 wdog_state; /* watchdog status */ + u8 wdog_preset; /* watchdog preset */ + u8 volt[3]; /* 12, 5, battery current */ + u8 temp_act[3]; /* temperature */ + u8 temp_status[3]; /* status of sensor */ + u8 fan_act[3]; /* fans revolutions per second */ + u8 fan_status[3]; /* fan status */ + u8 pwm[2]; /* fan min value for rps */ + u8 fan_ripple[3]; /* divider for rps */ +}; + +/* Temperature */ +#define TEMP_FROM_REG(val) (((val) - 128) * 1000) + +static ssize_t show_temp_input(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_act[nr - 1])); +} + +static ssize_t show_temp_status(struct fscpos_data *data, char *buf, int nr) +{ + /* bits 2..7 reserved => mask with 0x03 */ + return sprintf(buf, "%u\n", data->temp_status[nr - 1] & 0x03); +} + +static ssize_t show_temp_reset(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "1\n"); +} + +static ssize_t set_temp_reset(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int nr, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + if (v != 1) { + dev_err(&client->dev, "temp_reset value %ld not supported. " + "Use 1 to reset the alarm!\n", v); + return -EINVAL; + } + + dev_info(&client->dev, "You used the temp_reset feature which has not " + "been proplerly tested. Please report your " + "experience to the module author.\n"); + + /* Supported value: 2 (clears the status) */ + fscpos_write_value(client, FSCPOS_REG_TEMP_STATE[nr], 2); + return count; +} + +/* Fans */ +#define RPM_FROM_REG(val) ((val) * 60) + +static ssize_t show_fan_status(struct fscpos_data *data, char *buf, int nr) +{ + /* bits 0..1, 3..7 reserved => mask with 0x04 */ + return sprintf(buf, "%u\n", data->fan_status[nr - 1] & 0x04); +} + +static ssize_t show_fan_input(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "%u\n", RPM_FROM_REG(data->fan_act[nr - 1])); +} + +static ssize_t show_fan_ripple(struct fscpos_data *data, char *buf, int nr) +{ + /* bits 2..7 reserved => mask with 0x03 */ + return sprintf(buf, "%u\n", data->fan_ripple[nr - 1] & 0x03); +} + +static ssize_t set_fan_ripple(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int nr, int reg) +{ + /* supported values: 2, 4, 8 */ + unsigned long v = simple_strtoul(buf, NULL, 10); + + switch (v) { + case 2: v = 1; break; + case 4: v = 2; break; + case 8: v = 3; break; + default: + dev_err(&client->dev, "fan_ripple value %ld not supported. " + "Must be one of 2, 4 or 8!\n", v); + return -EINVAL; + } + + /* bits 2..7 reserved => mask with 0x03 */ + data->fan_ripple[nr - 1] &= ~0x03; + data->fan_ripple[nr - 1] |= v; + + fscpos_write_value(client, reg, data->fan_ripple[nr - 1]); + return count; +} + +static ssize_t show_pwm(struct fscpos_data *data, char *buf, int nr) +{ + return sprintf(buf, "%u\n", data->pwm[nr - 1]); +} + +static ssize_t set_pwm(struct i2c_client *client, struct fscpos_data *data, + const char *buf, size_t count, int nr, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + + /* Range: 0..255 */ + if (v < 0) v = 0; + if (v > 255) v = 255; + + data->pwm[nr - 1] = v; + fscpos_write_value(client, reg, data->pwm[nr - 1]); + return count; +} + +static void reset_fan_alarm(struct i2c_client *client, int nr) +{ + fscpos_write_value(client, FSCPOS_REG_FAN_STATE[nr], 4); +} + +/* Volts */ +#define VOLT_FROM_REG(val, mult) ((val) * (mult) / 255) + +static ssize_t show_volt_12(struct device *dev, char *buf) +{ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200)); +} + +static ssize_t show_volt_5(struct device *dev, char *buf) +{ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600)); +} + +static ssize_t show_volt_batt(struct device *dev, char *buf) +{ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 3300)); +} + +/* Watchdog */ +static ssize_t show_wdog_control(struct fscpos_data *data, char *buf) +{ + /* bits 0..3 reserved, bit 6 write only => mask with 0xb0 */ + return sprintf(buf, "%u\n", data->wdog_control & 0xb0); +} + +static ssize_t set_wdog_control(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int reg) +{ + /* bits 0..3 reserved => mask with 0xf0 */ + unsigned long v = simple_strtoul(buf, NULL, 10) & 0xf0; + data->wdog_control &= ~0xf0; + data->wdog_control |= v; + + fscpos_write_value(client, reg, data->wdog_control); + return count; +} + +static ssize_t show_wdog_state(struct fscpos_data *data, char *buf) +{ + /* bits 0, 2..7 reserved => mask with 0x02 */ + return sprintf(buf, "%u\n", data->wdog_state & 0x02); +} + +static ssize_t set_wdog_state(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10) & 0x02; + + /* Valid values: 2 (clear) */ + if (v != 2) { + dev_err(&client->dev, "wdog_state value %ld not supported. " + "Must be 2 to clear the state!\n", v); + return -EINVAL; + } + + data->wdog_state &= ~v; + + fscpos_write_value(client, reg, v); + return count; +} + +static ssize_t show_wdog_preset(struct fscpos_data *data, char *buf) +{ + return sprintf(buf, "%u\n", data->wdog_preset); +} + +static ssize_t set_wdog_preset(struct i2c_client *client, struct fscpos_data + *data, const char *buf, size_t count, int reg) +{ + data->wdog_preset = simple_strtoul(buf, NULL, 10) & 0xff; + + fscpos_write_value(client, reg, data->wdog_preset); + return count; +} + +/* Event */ +static ssize_t show_event(struct device *dev, char *buf) +{ + /* bits 5..7 reserved => mask with 0x1f */ + struct fscpos_data *data = fscpos_update_device(dev); + return sprintf(buf, "%u\n", data->global_event & 0x9b); +} + +/* + * Sysfs stuff + */ +#define create_getter(kind, sub) \ + static ssize_t sysfs_show_##kind##sub(struct device *dev, char *buf) \ + { \ + struct fscpos_data *data = fscpos_update_device(dev); \ + return show_##kind##sub(data, buf); \ + } + +#define create_getter_n(kind, offset, sub) \ + static ssize_t sysfs_show_##kind##offset##sub(struct device *dev, char\ + *buf) \ + { \ + struct fscpos_data *data = fscpos_update_device(dev); \ + return show_##kind##sub(data, buf, offset); \ + } + +#define create_setter(kind, sub, reg) \ + static ssize_t sysfs_set_##kind##sub (struct device *dev, const char \ + *buf, size_t count) \ + { \ + struct i2c_client *client = to_i2c_client(dev); \ + struct fscpos_data *data = i2c_get_clientdata(client); \ + return set_##kind##sub(client, data, buf, count, reg); \ + } + +#define create_setter_n(kind, offset, sub, reg) \ + static ssize_t sysfs_set_##kind##offset##sub (struct device *dev, \ + const char *buf, size_t count) \ + { \ + struct i2c_client *client = to_i2c_client(dev); \ + struct fscpos_data *data = i2c_get_clientdata(client); \ + return set_##kind##sub(client, data, buf, count, offset, reg);\ + } + +#define create_sysfs_device_ro(kind, sub, offset) \ + static DEVICE_ATTR(kind##offset##sub, S_IRUGO, \ + sysfs_show_##kind##offset##sub, NULL); + +#define create_sysfs_device_rw(kind, sub, offset) \ + static DEVICE_ATTR(kind##offset##sub, S_IRUGO | S_IWUSR, \ + sysfs_show_##kind##offset##sub, sysfs_set_##kind##offset##sub); + +#define sysfs_ro_n(kind, sub, offset) \ + create_getter_n(kind, offset, sub); \ + create_sysfs_device_ro(kind, sub, offset); + +#define sysfs_rw_n(kind, sub, offset, reg) \ + create_getter_n(kind, offset, sub); \ + create_setter_n(kind, offset, sub, reg); \ + create_sysfs_device_rw(kind, sub, offset); + +#define sysfs_rw(kind, sub, reg) \ + create_getter(kind, sub); \ + create_setter(kind, sub, reg); \ + create_sysfs_device_rw(kind, sub,); + +#define sysfs_fan_with_min(offset, reg_status, reg_ripple, reg_min) \ + sysfs_fan(offset, reg_status, reg_ripple); \ + sysfs_rw_n(pwm,, offset, reg_min); + +#define sysfs_fan(offset, reg_status, reg_ripple) \ + sysfs_ro_n(fan, _input, offset); \ + sysfs_ro_n(fan, _status, offset); \ + sysfs_rw_n(fan, _ripple, offset, reg_ripple); + +#define sysfs_temp(offset, reg_status) \ + sysfs_ro_n(temp, _input, offset); \ + sysfs_ro_n(temp, _status, offset); \ + sysfs_rw_n(temp, _reset, offset, reg_status); + +#define sysfs_watchdog(reg_wdog_preset, reg_wdog_state, reg_wdog_control) \ + sysfs_rw(wdog, _control, reg_wdog_control); \ + sysfs_rw(wdog, _preset, reg_wdog_preset); \ + sysfs_rw(wdog, _state, reg_wdog_state); + +sysfs_fan_with_min(1, FSCPOS_REG_FAN_STATE[0], FSCPOS_REG_FAN_RIPPLE[0], + FSCPOS_REG_PWM[0]); +sysfs_fan_with_min(2, FSCPOS_REG_FAN_STATE[1], FSCPOS_REG_FAN_RIPPLE[1], + FSCPOS_REG_PWM[1]); +sysfs_fan(3, FSCPOS_REG_FAN_STATE[2], FSCPOS_REG_FAN_RIPPLE[2]); + +sysfs_temp(1, FSCPOS_REG_TEMP_STATE[0]); +sysfs_temp(2, FSCPOS_REG_TEMP_STATE[1]); +sysfs_temp(3, FSCPOS_REG_TEMP_STATE[2]); + +sysfs_watchdog(FSCPOS_REG_WDOG_PRESET, FSCPOS_REG_WDOG_STATE, + FSCPOS_REG_WDOG_CONTROL); + +static DEVICE_ATTR(event, S_IRUGO, show_event, NULL); +static DEVICE_ATTR(in0_input, S_IRUGO, show_volt_12, NULL); +static DEVICE_ATTR(in1_input, S_IRUGO, show_volt_5, NULL); +static DEVICE_ATTR(in2_input, S_IRUGO, show_volt_batt, NULL); + +static int fscpos_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, fscpos_detect); +} + +int fscpos_detect(struct i2c_adapter *adapter, int address, int kind) +{ + struct i2c_client *new_client; + struct fscpos_data *data; + int err = 0; + + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) + goto exit; + + /* + * OK. For now, we presume we have a valid client. We now create the + * client structure, even though we cannot fill it completely yet. + * But it allows us to access fscpos_{read,write}_value. + */ + + if (!(data = kmalloc(sizeof(struct fscpos_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit; + } + memset(data, 0, sizeof(struct fscpos_data)); + + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &fscpos_driver; + new_client->flags = 0; + + /* Do the remaining detection unless force or force_fscpos parameter */ + if (kind < 0) { + if ((fscpos_read_value(new_client, FSCPOS_REG_IDENT_0) + != 0x50) /* 'P' */ + || (fscpos_read_value(new_client, FSCPOS_REG_IDENT_1) + != 0x45) /* 'E' */ + || (fscpos_read_value(new_client, FSCPOS_REG_IDENT_2) + != 0x47))/* 'G' */ + { + dev_dbg(&new_client->dev, "fscpos detection failed\n"); + goto exit_free; + } + } + + /* Fill in the remaining client fields and put it in the global list */ + strlcpy(new_client->name, "fscpos", I2C_NAME_SIZE); + + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Inizialize the fscpos chip */ + fscpos_init_client(new_client); + + /* Announce that the chip was found */ + dev_info(&new_client->dev, "Found fscpos chip, rev %u\n", data->revision); + + /* Register sysfs hooks */ + device_create_file(&new_client->dev, &dev_attr_event); + device_create_file(&new_client->dev, &dev_attr_in0_input); + device_create_file(&new_client->dev, &dev_attr_in1_input); + device_create_file(&new_client->dev, &dev_attr_in2_input); + device_create_file(&new_client->dev, &dev_attr_wdog_control); + device_create_file(&new_client->dev, &dev_attr_wdog_preset); + device_create_file(&new_client->dev, &dev_attr_wdog_state); + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp1_status); + device_create_file(&new_client->dev, &dev_attr_temp1_reset); + device_create_file(&new_client->dev, &dev_attr_temp2_input); + device_create_file(&new_client->dev, &dev_attr_temp2_status); + device_create_file(&new_client->dev, &dev_attr_temp2_reset); + device_create_file(&new_client->dev, &dev_attr_temp3_input); + device_create_file(&new_client->dev, &dev_attr_temp3_status); + device_create_file(&new_client->dev, &dev_attr_temp3_reset); + device_create_file(&new_client->dev, &dev_attr_fan1_input); + device_create_file(&new_client->dev, &dev_attr_fan1_status); + device_create_file(&new_client->dev, &dev_attr_fan1_ripple); + device_create_file(&new_client->dev, &dev_attr_pwm1); + device_create_file(&new_client->dev, &dev_attr_fan2_input); + device_create_file(&new_client->dev, &dev_attr_fan2_status); + device_create_file(&new_client->dev, &dev_attr_fan2_ripple); + device_create_file(&new_client->dev, &dev_attr_pwm2); + device_create_file(&new_client->dev, &dev_attr_fan3_input); + device_create_file(&new_client->dev, &dev_attr_fan3_status); + device_create_file(&new_client->dev, &dev_attr_fan3_ripple); + + return 0; + +exit_free: + kfree(data); +exit: + return err; +} + +static int fscpos_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, "Client deregistration failed, client" + " not detached.\n"); + return err; + } + kfree(i2c_get_clientdata(client)); + return 0; +} + +static int fscpos_read_value(struct i2c_client *client, u8 reg) +{ + dev_dbg(&client->dev, "Read reg 0x%02x\n", reg); + return i2c_smbus_read_byte_data(client, reg); +} + +static int fscpos_write_value(struct i2c_client *client, u8 reg, u8 value) +{ + dev_dbg(&client->dev, "Write reg 0x%02x, val 0x%02x\n", reg, value); + return i2c_smbus_write_byte_data(client, reg, value); +} + +/* Called when we have found a new FSCPOS chip */ +static void fscpos_init_client(struct i2c_client *client) +{ + struct fscpos_data *data = i2c_get_clientdata(client); + + /* read revision from chip */ + data->revision = fscpos_read_value(client, FSCPOS_REG_REVISION); +} + +static struct fscpos_data *fscpos_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct fscpos_data *data = i2c_get_clientdata(client); + + down(&data->update_lock); + + if ((jiffies - data->last_updated > 2 * HZ) || + (jiffies < data->last_updated) || !data->valid) { + int i; + + dev_dbg(&client->dev, "Starting fscpos update\n"); + + for (i = 0; i < 3; i++) { + data->temp_act[i] = fscpos_read_value(client, + FSCPOS_REG_TEMP_ACT[i]); + data->temp_status[i] = fscpos_read_value(client, + FSCPOS_REG_TEMP_STATE[i]); + data->fan_act[i] = fscpos_read_value(client, + FSCPOS_REG_FAN_ACT[i]); + data->fan_status[i] = fscpos_read_value(client, + FSCPOS_REG_FAN_STATE[i]); + data->fan_ripple[i] = fscpos_read_value(client, + FSCPOS_REG_FAN_RIPPLE[i]); + if (i < 2) { + /* fan2_min is not supported by the chip */ + data->pwm[i] = fscpos_read_value(client, + FSCPOS_REG_PWM[i]); + } + /* reset fan status if speed is back to > 0 */ + if (data->fan_status[i] != 0 && data->fan_act[i] > 0) { + reset_fan_alarm(client, i); + } + } + + data->volt[0] = fscpos_read_value(client, FSCPOS_REG_VOLT_12); + data->volt[1] = fscpos_read_value(client, FSCPOS_REG_VOLT_5); + data->volt[2] = fscpos_read_value(client, FSCPOS_REG_VOLT_BATT); + + data->wdog_preset = fscpos_read_value(client, + FSCPOS_REG_WDOG_PRESET); + data->wdog_state = fscpos_read_value(client, + FSCPOS_REG_WDOG_STATE); + data->wdog_control = fscpos_read_value(client, + FSCPOS_REG_WDOG_CONTROL); + + data->global_event = fscpos_read_value(client, + FSCPOS_REG_EVENT_STATE); + + data->last_updated = jiffies; + data->valid = 1; + } + up(&data->update_lock); + return data; +} + +static int __init sm_fscpos_init(void) +{ + return i2c_add_driver(&fscpos_driver); +} + +static void __exit sm_fscpos_exit(void) +{ + i2c_del_driver(&fscpos_driver); +} + +MODULE_AUTHOR("Stefan Ott based on work from Hermann Jung " + ", Frodo Looijaard " + " and Philip Edelbrock "); +MODULE_DESCRIPTION("fujitsu siemens poseidon chip driver"); +MODULE_LICENSE("GPL"); + +module_init(sm_fscpos_init); +module_exit(sm_fscpos_exit); diff -Nru a/drivers/i2c/chips/gl518sm.c b/drivers/i2c/chips/gl518sm.c --- a/drivers/i2c/chips/gl518sm.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/gl518sm.c 2005-03-07 14:54:18 -08:00 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -159,12 +160,6 @@ }; /* - * Internal variables - */ - -static int gl518_id; - -/* * Sysfs stuff */ @@ -396,7 +391,6 @@ /* Fill in the remaining client fields */ strlcpy(new_client->name, "gl518sm", I2C_NAME_SIZE); - new_client->id = gl518_id++; data->type = kind; data->valid = 0; init_MUTEX(&data->update_lock); @@ -512,8 +506,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting gl518 update\n"); data->alarms = gl518_read_value(client, GL518_REG_INT); diff -Nru a/drivers/i2c/chips/gl520sm.c b/drivers/i2c/chips/gl520sm.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/gl520sm.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,754 @@ +/* + gl520sm.c - Part of lm_sensors, Linux kernel modules for hardware + monitoring + Copyright (c) 1998, 1999 Frodo Looijaard , + Kyösti Mälkki + Copyright (c) 2005 Maarten Deprez + + 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. + +*/ + +#include +#include +#include +#include +#include +#include + +/* Type of the extra sensor */ +static unsigned short extra_sensor_type; +module_param(extra_sensor_type, ushort, 0); +MODULE_PARM_DESC(extra_sensor_type, "Type of extra sensor (0=autodetect, 1=temperature, 2=voltage)"); + +/* Addresses to scan */ +static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; +static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END }; + +/* Insmod parameters */ +SENSORS_INSMOD_1(gl520sm); + +/* Many GL520 constants specified below +One of the inputs can be configured as either temp or voltage. +That's why _TEMP2 and _IN4 access the same register +*/ + +/* The GL520 registers */ +#define GL520_REG_CHIP_ID 0x00 +#define GL520_REG_REVISION 0x01 +#define GL520_REG_CONF 0x03 +#define GL520_REG_MASK 0x11 + +#define GL520_REG_VID_INPUT 0x02 + +#define GL520_REG_IN0_INPUT 0x15 +#define GL520_REG_IN0_LIMIT 0x0c +#define GL520_REG_IN0_MIN GL520_REG_IN0_LIMIT +#define GL520_REG_IN0_MAX GL520_REG_IN0_LIMIT + +#define GL520_REG_IN1_INPUT 0x14 +#define GL520_REG_IN1_LIMIT 0x09 +#define GL520_REG_IN1_MIN GL520_REG_IN1_LIMIT +#define GL520_REG_IN1_MAX GL520_REG_IN1_LIMIT + +#define GL520_REG_IN2_INPUT 0x13 +#define GL520_REG_IN2_LIMIT 0x0a +#define GL520_REG_IN2_MIN GL520_REG_IN2_LIMIT +#define GL520_REG_IN2_MAX GL520_REG_IN2_LIMIT + +#define GL520_REG_IN3_INPUT 0x0d +#define GL520_REG_IN3_LIMIT 0x0b +#define GL520_REG_IN3_MIN GL520_REG_IN3_LIMIT +#define GL520_REG_IN3_MAX GL520_REG_IN3_LIMIT + +#define GL520_REG_IN4_INPUT 0x0e +#define GL520_REG_IN4_MAX 0x17 +#define GL520_REG_IN4_MIN 0x18 + +#define GL520_REG_TEMP1_INPUT 0x04 +#define GL520_REG_TEMP1_MAX 0x05 +#define GL520_REG_TEMP1_MAX_HYST 0x06 + +#define GL520_REG_TEMP2_INPUT 0x0e +#define GL520_REG_TEMP2_MAX 0x17 +#define GL520_REG_TEMP2_MAX_HYST 0x18 + +#define GL520_REG_FAN_INPUT 0x07 +#define GL520_REG_FAN_MIN 0x08 +#define GL520_REG_FAN_DIV 0x0f +#define GL520_REG_FAN_OFF GL520_REG_FAN_DIV + +#define GL520_REG_ALARMS 0x12 +#define GL520_REG_BEEP_MASK 0x10 +#define GL520_REG_BEEP_ENABLE GL520_REG_CONF + +/* + * Function declarations + */ + +static int gl520_attach_adapter(struct i2c_adapter *adapter); +static int gl520_detect(struct i2c_adapter *adapter, int address, int kind); +static void gl520_init_client(struct i2c_client *client); +static int gl520_detach_client(struct i2c_client *client); +static int gl520_read_value(struct i2c_client *client, u8 reg); +static int gl520_write_value(struct i2c_client *client, u8 reg, u16 value); +static struct gl520_data *gl520_update_device(struct device *dev); + +/* Driver data */ +static struct i2c_driver gl520_driver = { + .owner = THIS_MODULE, + .name = "gl520sm", + .id = I2C_DRIVERID_GL520, + .flags = I2C_DF_NOTIFY, + .attach_adapter = gl520_attach_adapter, + .detach_client = gl520_detach_client, +}; + +/* Client data */ +struct gl520_data { + struct i2c_client client; + struct semaphore update_lock; + char valid; /* zero until the following fields are valid */ + unsigned long last_updated; /* in jiffies */ + + u8 vid; + u8 vrm; + u8 in_input[5]; /* [0] = VVD */ + u8 in_min[5]; /* [0] = VDD */ + u8 in_max[5]; /* [0] = VDD */ + u8 fan_input[2]; + u8 fan_min[2]; + u8 fan_div[2]; + u8 fan_off; + u8 temp_input[2]; + u8 temp_max[2]; + u8 temp_max_hyst[2]; + u8 alarms; + u8 beep_enable; + u8 beep_mask; + u8 alarm_mask; + u8 two_temps; +}; + +/* + * Sysfs stuff + */ + +#define sysfs_r(type, n, item, reg) \ +static ssize_t get_##type##item (struct gl520_data *, char *, int); \ +static ssize_t get_##type##n##item (struct device *, char *); \ +static ssize_t get_##type##n##item (struct device *dev, char *buf) \ +{ \ + struct gl520_data *data = gl520_update_device(dev); \ + return get_##type##item(data, buf, (n)); \ +} + +#define sysfs_w(type, n, item, reg) \ +static ssize_t set_##type##item (struct i2c_client *, struct gl520_data *, const char *, size_t, int, int); \ +static ssize_t set_##type##n##item (struct device *, const char *, size_t); \ +static ssize_t set_##type##n##item (struct device *dev, const char *buf, size_t count) \ +{ \ + struct i2c_client *client = to_i2c_client(dev); \ + struct gl520_data *data = i2c_get_clientdata(client); \ + return set_##type##item(client, data, buf, count, (n), reg); \ +} + +#define sysfs_rw_n(type, n, item, reg) \ +sysfs_r(type, n, item, reg) \ +sysfs_w(type, n, item, reg) \ +static DEVICE_ATTR(type##n##item, S_IRUGO | S_IWUSR, get_##type##n##item, set_##type##n##item); + +#define sysfs_ro_n(type, n, item, reg) \ +sysfs_r(type, n, item, reg) \ +static DEVICE_ATTR(type##n##item, S_IRUGO, get_##type##n##item, NULL); + +#define sysfs_rw(type, item, reg) \ +sysfs_r(type, 0, item, reg) \ +sysfs_w(type, 0, item, reg) \ +static DEVICE_ATTR(type##item, S_IRUGO | S_IWUSR, get_##type##0##item, set_##type##0##item); + +#define sysfs_ro(type, item, reg) \ +sysfs_r(type, 0, item, reg) \ +static DEVICE_ATTR(type##item, S_IRUGO, get_##type##0##item, NULL); + + +#define sysfs_vid(n) \ +sysfs_ro_n(cpu, n, _vid, GL520_REG_VID_INPUT) + +#define device_create_file_vid(client, n) \ +device_create_file(&client->dev, &dev_attr_cpu##n##_vid) + +#define sysfs_in(n) \ +sysfs_ro_n(in, n, _input, GL520_REG_IN##n##INPUT) \ +sysfs_rw_n(in, n, _min, GL520_REG_IN##n##_MIN) \ +sysfs_rw_n(in, n, _max, GL520_REG_IN##n##_MAX) \ + +#define device_create_file_in(client, n) \ +({device_create_file(&client->dev, &dev_attr_in##n##_input); \ +device_create_file(&client->dev, &dev_attr_in##n##_min); \ +device_create_file(&client->dev, &dev_attr_in##n##_max);}) + +#define sysfs_fan(n) \ +sysfs_ro_n(fan, n, _input, GL520_REG_FAN_INPUT) \ +sysfs_rw_n(fan, n, _min, GL520_REG_FAN_MIN) \ +sysfs_rw_n(fan, n, _div, GL520_REG_FAN_DIV) + +#define device_create_file_fan(client, n) \ +({device_create_file(&client->dev, &dev_attr_fan##n##_input); \ +device_create_file(&client->dev, &dev_attr_fan##n##_min); \ +device_create_file(&client->dev, &dev_attr_fan##n##_div);}) + +#define sysfs_fan_off(n) \ +sysfs_rw_n(fan, n, _off, GL520_REG_FAN_OFF) \ + +#define device_create_file_fan_off(client, n) \ +device_create_file(&client->dev, &dev_attr_fan##n##_off) + +#define sysfs_temp(n) \ +sysfs_ro_n(temp, n, _input, GL520_REG_TEMP##n##_INPUT) \ +sysfs_rw_n(temp, n, _max, GL520_REG_TEMP##n##_MAX) \ +sysfs_rw_n(temp, n, _max_hyst, GL520_REG_TEMP##n##_MAX_HYST) + +#define device_create_file_temp(client, n) \ +({device_create_file(&client->dev, &dev_attr_temp##n##_input); \ +device_create_file(&client->dev, &dev_attr_temp##n##_max); \ +device_create_file(&client->dev, &dev_attr_temp##n##_max_hyst);}) + +#define sysfs_alarms() \ +sysfs_ro(alarms, , GL520_REG_ALARMS) \ +sysfs_rw(beep_enable, , GL520_REG_BEEP_ENABLE) \ +sysfs_rw(beep_mask, , GL520_REG_BEEP_MASK) + +#define device_create_file_alarms(client) \ +({device_create_file(&client->dev, &dev_attr_alarms); \ +device_create_file(&client->dev, &dev_attr_beep_enable); \ +device_create_file(&client->dev, &dev_attr_beep_mask);}) + + +sysfs_vid(0) + +sysfs_in(0) +sysfs_in(1) +sysfs_in(2) +sysfs_in(3) +sysfs_in(4) + +sysfs_fan(1) +sysfs_fan(2) +sysfs_fan_off(1) + +sysfs_temp(1) +sysfs_temp(2) + +sysfs_alarms() + + +static ssize_t get_cpu_vid(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%u\n", vid_from_reg(data->vid, data->vrm)); +} + +#define VDD_FROM_REG(val) (((val)*95+2)/4) +#define VDD_TO_REG(val) (SENSORS_LIMIT((((val)*4+47)/95),0,255)) + +#define IN_FROM_REG(val) ((val)*19) +#define IN_TO_REG(val) (SENSORS_LIMIT((((val)+9)/19),0,255)) + +static ssize_t get_in_input(struct gl520_data *data, char *buf, int n) +{ + u8 r = data->in_input[n]; + + if (n == 0) + return sprintf(buf, "%d\n", VDD_FROM_REG(r)); + else + return sprintf(buf, "%d\n", IN_FROM_REG(r)); +} + +static ssize_t get_in_min(struct gl520_data *data, char *buf, int n) +{ + u8 r = data->in_min[n]; + + if (n == 0) + return sprintf(buf, "%d\n", VDD_FROM_REG(r)); + else + return sprintf(buf, "%d\n", IN_FROM_REG(r)); +} + +static ssize_t get_in_max(struct gl520_data *data, char *buf, int n) +{ + u8 r = data->in_max[n]; + + if (n == 0) + return sprintf(buf, "%d\n", VDD_FROM_REG(r)); + else + return sprintf(buf, "%d\n", IN_FROM_REG(r)); +} + +static ssize_t set_in_min(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r; + + if (n == 0) + r = VDD_TO_REG(v); + else + r = IN_TO_REG(v); + + data->in_min[n] = r; + + if (n < 4) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff) | r); + else + gl520_write_value(client, reg, r); + + return count; +} + +static ssize_t set_in_max(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r; + + if (n == 0) + r = VDD_TO_REG(v); + else + r = IN_TO_REG(v); + + data->in_max[n] = r; + + if (n < 4) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff00) | (r << 8)); + else + gl520_write_value(client, reg, r); + + return count; +} + +#define DIV_FROM_REG(val) (1 << (val)) +#define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (480000/((val) << (div)))) +#define FAN_TO_REG(val,div) ((val)<=0?0:SENSORS_LIMIT((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255)); + +static ssize_t get_fan_input(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_input[n - 1], data->fan_div[n - 1])); +} + +static ssize_t get_fan_min(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan_min[n - 1], data->fan_div[n - 1])); +} + +static ssize_t get_fan_div(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[n - 1])); +} + +static ssize_t get_fan_off(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->fan_off); +} + +static ssize_t set_fan_min(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + u8 r = FAN_TO_REG(v, data->fan_div[n - 1]); + + data->fan_min[n - 1] = r; + + if (n == 1) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff00) | (r << 8)); + else + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xff) | r); + + data->beep_mask = gl520_read_value(client, GL520_REG_BEEP_MASK); + if (data->fan_min[n - 1] == 0) + data->alarm_mask &= (n == 1) ? ~0x20 : ~0x40; + else + data->alarm_mask |= (n == 1) ? 0x20 : 0x40; + data->beep_mask &= data->alarm_mask; + gl520_write_value(client, GL520_REG_BEEP_MASK, data->beep_mask); + + return count; +} + +static ssize_t set_fan_div(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + unsigned long v = simple_strtoul(buf, NULL, 10); + u8 r; + + switch (v) { + case 1: r = 0; break; + case 2: r = 1; break; + case 4: r = 2; break; + case 8: r = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n", v); + return -EINVAL; + } + + data->fan_div[n - 1] = r; + + if (n == 1) + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0xc0) | (r << 6)); + else + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0x30) | (r << 4)); + + return count; +} + +static ssize_t set_fan_off(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + u8 r = simple_strtoul(buf, NULL, 10)?1:0; + + data->fan_off = r; + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0x0c) | (r << 2)); + + return count; +} + +#define TEMP_FROM_REG(val) (((val) - 130) * 1000) +#define TEMP_TO_REG(val) (SENSORS_LIMIT(((((val)<0?(val)-500:(val)+500) / 1000)+130),0,255)) + +static ssize_t get_temp_input(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_input[n - 1])); +} + +static ssize_t get_temp_max(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[n - 1])); +} + +static ssize_t get_temp_max_hyst(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max_hyst[n - 1])); +} + +static ssize_t set_temp_max(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r = TEMP_TO_REG(v); + + data->temp_max[n - 1] = r; + gl520_write_value(client, reg, r); + + return count; +} + +static ssize_t set_temp_max_hyst(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + long v = simple_strtol(buf, NULL, 10); + u8 r = TEMP_TO_REG(v); + + data->temp_max_hyst[n - 1] = r; + gl520_write_value(client, reg, r); + + return count; +} + +static ssize_t get_alarms(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->alarms); +} + +static ssize_t get_beep_enable(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->beep_enable); +} + +static ssize_t get_beep_mask(struct gl520_data *data, char *buf, int n) +{ + return sprintf(buf, "%d\n", data->beep_mask); +} + +static ssize_t set_beep_enable(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + u8 r = simple_strtoul(buf, NULL, 10)?0:1; + + data->beep_enable = !r; + gl520_write_value(client, reg, (gl520_read_value(client, reg) & ~0x04) | (r << 2)); + + return count; +} + +static ssize_t set_beep_mask(struct i2c_client *client, struct gl520_data *data, const char *buf, size_t count, int n, int reg) +{ + u8 r = simple_strtoul(buf, NULL, 10) & data->alarm_mask; + + data->beep_mask = r; + gl520_write_value(client, reg, r); + + return count; +} + + +/* + * Real code + */ + +static int gl520_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, gl520_detect); +} + +static int gl520_detect(struct i2c_adapter *adapter, int address, int kind) +{ + struct i2c_client *new_client; + struct gl520_data *data; + int err = 0; + + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | + I2C_FUNC_SMBUS_WORD_DATA)) + goto exit; + + /* OK. For now, we presume we have a valid client. We now create the + client structure, even though we cannot fill it completely yet. + But it allows us to access gl520_{read,write}_value. */ + + if (!(data = kmalloc(sizeof(struct gl520_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit; + } + memset(data, 0, sizeof(struct gl520_data)); + + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &gl520_driver; + new_client->flags = 0; + + /* Determine the chip type. */ + if (kind < 0) { + if ((gl520_read_value(new_client, GL520_REG_CHIP_ID) != 0x20) || + ((gl520_read_value(new_client, GL520_REG_REVISION) & 0x7f) != 0x00) || + ((gl520_read_value(new_client, GL520_REG_CONF) & 0x80) != 0x00)) { + dev_dbg(&new_client->dev, "Unknown chip type, skipping\n"); + goto exit_free; + } + } + + /* Fill in the remaining client fields */ + strlcpy(new_client->name, "gl520sm", I2C_NAME_SIZE); + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Initialize the GL520SM chip */ + gl520_init_client(new_client); + + /* Register sysfs hooks */ + device_create_file_vid(new_client, 0); + + device_create_file_in(new_client, 0); + device_create_file_in(new_client, 1); + device_create_file_in(new_client, 2); + device_create_file_in(new_client, 3); + if (!data->two_temps) + device_create_file_in(new_client, 4); + + device_create_file_fan(new_client, 1); + device_create_file_fan(new_client, 2); + device_create_file_fan_off(new_client, 1); + + device_create_file_temp(new_client, 1); + if (data->two_temps) + device_create_file_temp(new_client, 2); + + device_create_file_alarms(new_client); + + return 0; + +exit_free: + kfree(data); +exit: + return err; +} + + +/* Called when we have found a new GL520SM. */ +static void gl520_init_client(struct i2c_client *client) +{ + struct gl520_data *data = i2c_get_clientdata(client); + u8 oldconf, conf; + + conf = oldconf = gl520_read_value(client, GL520_REG_CONF); + + data->alarm_mask = 0xff; + data->vrm = i2c_which_vrm(); + + if (extra_sensor_type == 1) + conf &= ~0x10; + else if (extra_sensor_type == 2) + conf |= 0x10; + data->two_temps = !(conf & 0x10); + + /* If IRQ# is disabled, we can safely force comparator mode */ + if (!(conf & 0x20)) + conf &= 0xf7; + + /* Enable monitoring if needed */ + conf |= 0x40; + + if (conf != oldconf) + gl520_write_value(client, GL520_REG_CONF, conf); + + gl520_update_device(&(client->dev)); + + if (data->fan_min[0] == 0) + data->alarm_mask &= ~0x20; + if (data->fan_min[1] == 0) + data->alarm_mask &= ~0x40; + + data->beep_mask &= data->alarm_mask; + gl520_write_value(client, GL520_REG_BEEP_MASK, data->beep_mask); +} + +static int gl520_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, "Client deregistration failed, " + "client not detached.\n"); + return err; + } + + kfree(i2c_get_clientdata(client)); + return 0; +} + + +/* Registers 0x07 to 0x0c are word-sized, others are byte-sized + GL520 uses a high-byte first convention */ +static int gl520_read_value(struct i2c_client *client, u8 reg) +{ + if ((reg >= 0x07) && (reg <= 0x0c)) + return swab16(i2c_smbus_read_word_data(client, reg)); + else + return i2c_smbus_read_byte_data(client, reg); +} + +static int gl520_write_value(struct i2c_client *client, u8 reg, u16 value) +{ + if ((reg >= 0x07) && (reg <= 0x0c)) + return i2c_smbus_write_word_data(client, reg, swab16(value)); + else + return i2c_smbus_write_byte_data(client, reg, value); +} + + +static struct gl520_data *gl520_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct gl520_data *data = i2c_get_clientdata(client); + int val; + + down(&data->update_lock); + + if ((jiffies - data->last_updated > 2 * HZ) || + (jiffies < data->last_updated) || !data->valid) { + + dev_dbg(&client->dev, "Starting gl520sm update\n"); + + data->alarms = gl520_read_value(client, GL520_REG_ALARMS); + data->beep_mask = gl520_read_value(client, GL520_REG_BEEP_MASK); + data->vid = gl520_read_value(client, GL520_REG_VID_INPUT) & 0x1f; + + val = gl520_read_value(client, GL520_REG_IN0_LIMIT); + data->in_min[0] = val & 0xff; + data->in_max[0] = (val >> 8) & 0xff; + val = gl520_read_value(client, GL520_REG_IN1_LIMIT); + data->in_min[1] = val & 0xff; + data->in_max[1] = (val >> 8) & 0xff; + val = gl520_read_value(client, GL520_REG_IN2_LIMIT); + data->in_min[2] = val & 0xff; + data->in_max[2] = (val >> 8) & 0xff; + val = gl520_read_value(client, GL520_REG_IN3_LIMIT); + data->in_min[3] = val & 0xff; + data->in_max[3] = (val >> 8) & 0xff; + + val = gl520_read_value(client, GL520_REG_FAN_INPUT); + data->fan_input[0] = (val >> 8) & 0xff; + data->fan_input[1] = val & 0xff; + + val = gl520_read_value(client, GL520_REG_FAN_MIN); + data->fan_min[0] = (val >> 8) & 0xff; + data->fan_min[1] = val & 0xff; + + data->temp_input[0] = gl520_read_value(client, GL520_REG_TEMP1_INPUT); + data->temp_max[0] = gl520_read_value(client, GL520_REG_TEMP1_MAX); + data->temp_max_hyst[0] = gl520_read_value(client, GL520_REG_TEMP1_MAX_HYST); + + val = gl520_read_value(client, GL520_REG_FAN_DIV); + data->fan_div[0] = (val >> 6) & 0x03; + data->fan_div[1] = (val >> 4) & 0x03; + data->fan_off = (val >> 2) & 0x01; + + data->alarms &= data->alarm_mask; + + val = gl520_read_value(client, GL520_REG_CONF); + data->beep_enable = !((val >> 2) & 1); + + data->in_input[0] = gl520_read_value(client, GL520_REG_IN0_INPUT); + data->in_input[1] = gl520_read_value(client, GL520_REG_IN1_INPUT); + data->in_input[2] = gl520_read_value(client, GL520_REG_IN2_INPUT); + data->in_input[3] = gl520_read_value(client, GL520_REG_IN3_INPUT); + + /* Temp1 and Vin4 are the same input */ + if (data->two_temps) { + data->temp_input[1] = gl520_read_value(client, GL520_REG_TEMP2_INPUT); + data->temp_max[1] = gl520_read_value(client, GL520_REG_TEMP2_MAX); + data->temp_max_hyst[1] = gl520_read_value(client, GL520_REG_TEMP2_MAX_HYST); + } else { + data->in_input[4] = gl520_read_value(client, GL520_REG_IN4_INPUT); + data->in_min[4] = gl520_read_value(client, GL520_REG_IN4_MIN); + data->in_max[4] = gl520_read_value(client, GL520_REG_IN4_MAX); + } + + data->last_updated = jiffies; + data->valid = 1; + } + + up(&data->update_lock); + + return data; +} + + +static int __init sensors_gl520sm_init(void) +{ + return i2c_add_driver(&gl520_driver); +} + +static void __exit sensors_gl520sm_exit(void) +{ + i2c_del_driver(&gl520_driver); +} + + +MODULE_AUTHOR("Frodo Looijaard , " + "Kyösti Mälkki , " + "Maarten Deprez "); +MODULE_DESCRIPTION("GL520SM driver"); +MODULE_LICENSE("GPL"); + +module_init(sensors_gl520sm_init); +module_exit(sensors_gl520sm_exit); diff -Nru a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c --- a/drivers/i2c/chips/isp1301_omap.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/isp1301_omap.c 2005-03-07 14:54:18 -08:00 @@ -1503,7 +1503,6 @@ 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; diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c --- a/drivers/i2c/chips/it87.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/it87.c 2005-03-07 14:54:17 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -104,6 +105,9 @@ /* Update battery voltage after every reading if true */ static int update_vbat; +/* Not all BIOSes properly configure the PWM registers */ +static int fix_pwm_polarity; + /* Chip Type */ static u16 chip_type; @@ -224,6 +228,7 @@ static int it87_write_value(struct i2c_client *client, u8 register, u8 value); static struct it87_data *it87_update_device(struct device *dev); +static int it87_check_pwm(struct i2c_client *client); static void it87_init_client(struct i2c_client *client, struct it87_data *data); @@ -718,7 +723,6 @@ const char *name = ""; int is_isa = i2c_is_isa_adapter(adapter); int enable_pwm_interface; - int tmp; if (!is_isa && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) @@ -822,20 +826,12 @@ if ((err = i2c_attach_client(new_client))) goto ERROR2; + /* Check PWM configuration */ + enable_pwm_interface = it87_check_pwm(new_client); + /* Initialize the IT87 chip */ it87_init_client(new_client, data); - /* Some BIOSes fail to correctly configure the IT87 fans. All fans off - * and polarity set to active low is sign that this is the case so we - * disable pwm control to protect the user. */ - enable_pwm_interface = 1; - tmp = it87_read_value(new_client, IT87_REG_FAN_CTL); - if ((tmp & 0x87) == 0) { - enable_pwm_interface = 0; - dev_info(&new_client->dev, - "detected broken BIOS defaults, disabling pwm interface"); - } - /* Register sysfs hooks */ device_create_file(&new_client->dev, &dev_attr_in0_input); device_create_file(&new_client->dev, &dev_attr_in1_input); @@ -966,6 +962,56 @@ return i2c_smbus_write_byte_data(client, reg, value); } +/* Return 1 if and only if the PWM interface is safe to use */ +static int it87_check_pwm(struct i2c_client *client) +{ + /* Some BIOSes fail to correctly configure the IT87 fans. All fans off + * and polarity set to active low is sign that this is the case so we + * disable pwm control to protect the user. */ + int tmp = it87_read_value(client, IT87_REG_FAN_CTL); + if ((tmp & 0x87) == 0) { + if (fix_pwm_polarity) { + /* The user asks us to attempt a chip reconfiguration. + * This means switching to active high polarity and + * inverting all fan speed values. */ + int i; + u8 pwm[3]; + + for (i = 0; i < 3; i++) + pwm[i] = it87_read_value(client, + IT87_REG_PWM(i)); + + /* If any fan is in automatic pwm mode, the polarity + * might be correct, as suspicious as it seems, so we + * better don't change anything (but still disable the + * PWM interface). */ + if (!((pwm[0] | pwm[1] | pwm[2]) & 0x80)) { + dev_info(&client->dev, "Reconfiguring PWM to " + "active high polarity\n"); + it87_write_value(client, IT87_REG_FAN_CTL, + tmp | 0x87); + for (i = 0; i < 3; i++) + it87_write_value(client, + IT87_REG_PWM(i), + 0x7f & ~pwm[i]); + return 1; + } + + dev_info(&client->dev, "PWM configuration is " + "too broken to be fixed\n"); + } + + dev_info(&client->dev, "Detected broken BIOS " + "defaults, disabling PWM interface\n"); + return 0; + } else if (fix_pwm_polarity) { + dev_info(&client->dev, "PWM configuration looks " + "sane, won't touch\n"); + } + + return 1; +} + /* Called when we have found a new IT87. */ static void it87_init_client(struct i2c_client *client, struct it87_data *data) { @@ -1038,8 +1084,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { if (update_vbat) { /* Cleared after each update, so reenable. Value @@ -1126,6 +1172,8 @@ MODULE_DESCRIPTION("IT8705F, IT8712F, Sis950 driver"); module_param(update_vbat, bool, 0); MODULE_PARM_DESC(update_vbat, "Update vbat if set else return powerup value"); +module_param(fix_pwm_polarity, bool, 0); +MODULE_PARM_DESC(fix_pwm_polarity, "Force PWM polarity to active high (DANGEROUS)"); MODULE_LICENSE("GPL"); module_init(sm_it87_init); diff -Nru a/drivers/i2c/chips/lm63.c b/drivers/i2c/chips/lm63.c --- a/drivers/i2c/chips/lm63.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm63.c 2005-03-07 14:54:18 -08:00 @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -492,9 +493,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { if (data->config & 0x04) { /* tachometer enabled */ /* order matters for fan1_input */ data->fan1_input = i2c_smbus_read_byte_data(client, diff -Nru a/drivers/i2c/chips/lm75.c b/drivers/i2c/chips/lm75.c --- a/drivers/i2c/chips/lm75.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm75.c 2005-03-07 14:54:18 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include "lm75.h" @@ -73,8 +74,6 @@ .detach_client = lm75_detach_client, }; -static int lm75_id; - #define show(value) \ static ssize_t show_##value(struct device *dev, char *buf) \ { \ @@ -196,8 +195,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = lm75_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -263,8 +260,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting lm75 update\n"); data->temp_input = lm75_read_value(client, LM75_REG_TEMP); diff -Nru a/drivers/i2c/chips/lm77.c b/drivers/i2c/chips/lm77.c --- a/drivers/i2c/chips/lm77.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm77.c 2005-03-07 14:54:18 -08:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -81,8 +82,6 @@ .detach_client = lm77_detach_client, }; -static int lm77_id; - /* straight from the datasheet */ #define LM77_TEMP_MIN (-55000) #define LM77_TEMP_MAX 125000 @@ -295,8 +294,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = lm77_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -364,8 +361,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting lm77 update\n"); data->temp_input = LM77_TEMP_FROM_REG(lm77_read_value(client, diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c --- a/drivers/i2c/chips/lm78.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm78.c 2005-03-07 14:54:18 -08:00 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -81,9 +82,8 @@ static inline u8 FAN_TO_REG(long rpm, int div) { - if (rpm == 0) + if (rpm <= 0) return 255; - rpm = SENSORS_LIMIT(rpm, 1, 1000000); return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254); } @@ -94,15 +94,15 @@ /* TEMP: mC (-128C to +127C) REG: 1C/bit, two's complement */ -static inline u8 TEMP_TO_REG(int val) +static inline s8 TEMP_TO_REG(int val) { int nval = SENSORS_LIMIT(val, -128000, 127000) ; - return nval<0 ? (nval-500)/1000+0x100 : (nval+500)/1000; + return nval<0 ? (nval-500)/1000 : (nval+500)/1000; } -static inline int TEMP_FROM_REG(u8 val) +static inline int TEMP_FROM_REG(s8 val) { - return (val>=0x80 ? val-0x100 : val) * 1000; + return val * 1000; } /* VID: mV @@ -112,16 +112,6 @@ return val==0x1f ? 0 : val>=0x10 ? 5100-val*100 : 2050-val*50; } -/* ALARMS: chip-specific bitmask - REG: (same) */ -#define ALARMS_FROM_REG(val) (val) - -/* FAN DIV: 1, 2, 4, or 8 (defaults to 2) - REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ -static inline u8 DIV_TO_REG(int val) -{ - return val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1; -} #define DIV_FROM_REG(val) (1 << (val)) /* There are some complications in a module like this. First off, LM78 chips @@ -157,9 +147,9 @@ u8 in_min[7]; /* Register value */ u8 fan[3]; /* Register value */ u8 fan_min[3]; /* Register value */ - u8 temp; /* Register value */ - u8 temp_over; /* Register value */ - u8 temp_hyst; /* Register value */ + s8 temp; /* Register value */ + s8 temp_over; /* Register value */ + s8 temp_hyst; /* Register value */ u8 fan_div[3]; /* Register encoding, shifted right */ u8 vid; /* Register encoding, combined */ u16 alarms; /* Register encoding, combined */ @@ -357,7 +347,17 @@ DIV_FROM_REG(data->fan_div[nr])); unsigned long val = simple_strtoul(buf, NULL, 10); int reg = lm78_read_value(client, LM78_REG_VID_FANDIV); - data->fan_div[nr] = DIV_TO_REG(val); + switch (val) { + case 1: data->fan_div[nr] = 0; break; + case 2: data->fan_div[nr] = 1; break; + case 4: data->fan_div[nr] = 2; break; + case 8: data->fan_div[nr] = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not " + "supported. Choose one of 1, 2, 4 or 8!\n", val); + return -EINVAL; + } + switch (nr) { case 0: reg = (reg & 0xcf) | (data->fan_div[nr] << 4); @@ -430,7 +430,7 @@ static ssize_t show_alarms(struct device *dev, char *buf) { struct lm78_data *data = lm78_update_device(dev); - return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms)); + return sprintf(buf, "%u\n", data->alarms); } static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); @@ -633,17 +633,15 @@ { int err; - /* release ISA region first */ - if(i2c_is_isa_client(client)) - release_region(client->addr, LM78_EXTENT); - - /* now it's safe to scrap the rest */ if ((err = i2c_detach_client(client))) { dev_err(&client->dev, "Client deregistration failed, client not detached.\n"); return err; } + if(i2c_is_isa_client(client)) + release_region(client->addr, LM78_EXTENT); + kfree(i2c_get_clientdata(client)); return 0; @@ -653,9 +651,7 @@ We don't want to lock the whole ISA bus, so we lock each client separately. We ignore the LM78 BUSY flag at this moment - it could lead to deadlocks, - would slow down the LM78 access and should not be necessary. - There are some ugly typecasts here, but the good new is - they should - nowhere else be necessary! */ + would slow down the LM78 access and should not be necessary. */ static int lm78_read_value(struct i2c_client *client, u8 reg) { int res; @@ -709,8 +705,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(&client->dev, "Starting lm78 update\n"); diff -Nru a/drivers/i2c/chips/lm80.c b/drivers/i2c/chips/lm80.c --- a/drivers/i2c/chips/lm80.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/lm80.c 2005-03-07 14:54:16 -08:00 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -99,10 +100,7 @@ #define TEMP_LIMIT_TO_REG(val) SENSORS_LIMIT((val)<0?\ ((val)-500)/1000:((val)+500)/1000,0,255) -#define ALARMS_FROM_REG(val) (val) - #define DIV_FROM_REG(val) (1 << (val)) -#define DIV_TO_REG(val) ((val)==8?3:(val)==4?2:(val)==1?0:1) /* * Client data (each client gets its own) @@ -141,12 +139,6 @@ static int lm80_write_value(struct i2c_client *client, u8 reg, u8 value); /* - * Internal variables - */ - -static int lm80_id; - -/* * Driver data (common to all clients) */ @@ -269,7 +261,17 @@ DIV_FROM_REG(data->fan_div[nr])); val = simple_strtoul(buf, NULL, 10); - data->fan_div[nr] = DIV_TO_REG(val); + + switch (val) { + case 1: data->fan_div[nr] = 0; break; + case 2: data->fan_div[nr] = 1; break; + case 4: data->fan_div[nr] = 2; break; + case 8: data->fan_div[nr] = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not " + "supported. Choose one of 1, 2, 4 or 8!\n", val); + return -EINVAL; + } reg = (lm80_read_value(client, LM80_REG_FANDIV) & ~(3 << (2 * (nr + 1)))) | (data->fan_div[nr] << (2 * (nr + 1))); @@ -327,7 +329,7 @@ static ssize_t show_alarms(struct device *dev, char *buf) { struct lm80_data *data = lm80_update_device(dev); - return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms)); + return sprintf(buf, "%u\n", data->alarms); } static DEVICE_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min0, set_in_min0); @@ -425,8 +427,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - - new_client->id = lm80_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -530,9 +530,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > 2 * HZ) || - (jiffies < data->last_updated) || !data->valid) { - + if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) { dev_dbg(&client->dev, "Starting lm80 update\n"); for (i = 0; i <= 6; i++) { data->in[i] = diff -Nru a/drivers/i2c/chips/lm83.c b/drivers/i2c/chips/lm83.c --- a/drivers/i2c/chips/lm83.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/lm83.c 2005-03-07 14:54:17 -08:00 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -150,12 +151,6 @@ }; /* - * Internal variables - */ - -static int lm83_id; - -/* * Sysfs stuff */ @@ -312,7 +307,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = lm83_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -369,9 +363,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { int nr; dev_dbg(&client->dev, "Updating lm83 data.\n"); diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c --- a/drivers/i2c/chips/lm85.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/lm85.c 2005-03-07 14:54:16 -08:00 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -389,9 +390,6 @@ .detach_client = lm85_detach_client, }; -/* Unique ID assigned to each LM85 detected */ -static int lm85_id; - /* 4 Fans */ static ssize_t show_fan(struct device *dev, char *buf, int nr) @@ -1148,16 +1146,10 @@ strlcpy(new_client->name, type_name, I2C_NAME_SIZE); /* Fill in the remaining client fields */ - new_client->id = lm85_id++; data->type = kind; data->valid = 0; init_MUTEX(&data->update_lock); - dev_dbg(&adapter->dev, "Assigning ID %d to %s at %d,0x%02x\n", - new_client->id, new_client->name, - i2c_adapter_id(new_client->adapter), - new_client->addr); - /* Tell the I2C layer a new client has arrived */ if ((err = i2c_attach_client(new_client))) goto ERROR1; @@ -1363,7 +1355,7 @@ down(&data->update_lock); if ( !data->valid || - (jiffies - data->last_reading > LM85_DATA_INTERVAL ) ) { + time_after(jiffies, data->last_reading + LM85_DATA_INTERVAL) ) { /* Things that change quickly */ dev_dbg(&client->dev, "Reading sensor values\n"); @@ -1417,7 +1409,7 @@ }; /* last_reading */ if ( !data->valid || - (jiffies - data->last_config > LM85_CONFIG_INTERVAL) ) { + time_after(jiffies, data->last_config + LM85_CONFIG_INTERVAL) ) { /* Things that don't change often */ dev_dbg(&client->dev, "Reading config values\n"); diff -Nru a/drivers/i2c/chips/lm87.c b/drivers/i2c/chips/lm87.c --- a/drivers/i2c/chips/lm87.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/lm87.c 2005-03-07 14:54:18 -08:00 @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -203,12 +204,6 @@ }; /* - * Internal variables - */ - -static int lm87_id; - -/* * Sysfs stuff */ @@ -569,7 +564,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, "lm87", I2C_NAME_SIZE); - new_client->id = lm87_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -720,9 +714,7 @@ down(&data->update_lock); - if (jiffies - data->last_updated > HZ - || jiffies < data->last_updated - || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { int i, j; dev_dbg(&client->dev, "Updating data.\n"); diff -Nru a/drivers/i2c/chips/lm90.c b/drivers/i2c/chips/lm90.c --- a/drivers/i2c/chips/lm90.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/lm90.c 2005-03-07 14:54:16 -08:00 @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -190,12 +191,6 @@ }; /* - * Internal variables - */ - -static int lm90_id; - -/* * Sysfs stuff */ @@ -427,7 +422,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = lm90_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -495,9 +489,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { u8 oldh, newh; dev_dbg(&client->dev, "Updating lm90 data.\n"); diff -Nru a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/m41t00.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,247 @@ +/* + * drivers/i2c/chips/m41t00.c + * + * I2C client/driver for the ST M41T00 Real-Time Clock chip. + * + * Author: Mark A. Greer + * + * 2005 (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. + */ +/* + * This i2c client/driver wedges between the drivers/char/genrtc.c RTC + * interface and the SMBus interface of the i2c subsystem. + * It would be more efficient to use i2c msgs/i2c_transfer directly but, as + * recommened in .../Documentation/i2c/writing-clients section + * "Sending and receiving", using SMBus level communication is preferred. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#define M41T00_DRV_NAME "m41t00" + +static DECLARE_MUTEX(m41t00_mutex); + +static struct i2c_driver m41t00_driver; +static struct i2c_client *save_client; + +static unsigned short ignore[] = { I2C_CLIENT_END }; +static unsigned short normal_addr[] = { 0x68, I2C_CLIENT_END }; + +static struct i2c_client_address_data addr_data = { + .normal_i2c = normal_addr, + .normal_i2c_range = ignore, + .probe = ignore, + .probe_range = ignore, + .ignore = ignore, + .ignore_range = ignore, + .force = ignore, +}; + +ulong +m41t00_get_rtc_time(void) +{ + s32 sec, min, hour, day, mon, year; + s32 sec1, min1, hour1, day1, mon1, year1; + ulong limit = 10; + + sec = min = hour = day = mon = year = 0; + sec1 = min1 = hour1 = day1 = mon1 = year1 = 0; + + down(&m41t00_mutex); + do { + if (((sec = i2c_smbus_read_byte_data(save_client, 0)) >= 0) + && ((min = i2c_smbus_read_byte_data(save_client, 1)) + >= 0) + && ((hour = i2c_smbus_read_byte_data(save_client, 2)) + >= 0) + && ((day = i2c_smbus_read_byte_data(save_client, 4)) + >= 0) + && ((mon = i2c_smbus_read_byte_data(save_client, 5)) + >= 0) + && ((year = i2c_smbus_read_byte_data(save_client, 6)) + >= 0) + && ((sec == sec1) && (min == min1) && (hour == hour1) + && (day == day1) && (mon == mon1) + && (year == year1))) + + break; + + sec1 = sec; + min1 = min; + hour1 = hour; + day1 = day; + mon1 = mon; + year1 = year; + } while (--limit > 0); + up(&m41t00_mutex); + + if (limit == 0) { + dev_warn(&save_client->dev, + "m41t00: can't read rtc chip\n"); + sec = min = hour = day = mon = year = 0; + } + + sec &= 0x7f; + min &= 0x7f; + hour &= 0x3f; + day &= 0x3f; + mon &= 0x1f; + year &= 0xff; + + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); + + year += 1900; + if (year < 1970) + year += 100; + + return mktime(year, mon, day, hour, min, sec); +} + +static void +m41t00_set_tlet(ulong arg) +{ + struct rtc_time tm; + ulong nowtime = *(ulong *)arg; + + to_tm(nowtime, &tm); + tm.tm_year = (tm.tm_year - 1900) % 100; + + BIN_TO_BCD(tm.tm_sec); + BIN_TO_BCD(tm.tm_min); + BIN_TO_BCD(tm.tm_hour); + BIN_TO_BCD(tm.tm_mon); + BIN_TO_BCD(tm.tm_mday); + BIN_TO_BCD(tm.tm_year); + + down(&m41t00_mutex); + if ((i2c_smbus_write_byte_data(save_client, 0, tm.tm_sec & 0x7f) < 0) + || (i2c_smbus_write_byte_data(save_client, 1, tm.tm_min & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 2, tm.tm_hour & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 4, tm.tm_mday & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 5, tm.tm_mon & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 6, tm.tm_year & 0x7f) + < 0)) + + dev_warn(&save_client->dev,"m41t00: can't write to rtc chip\n"); + + up(&m41t00_mutex); + return; +} + +ulong new_time; + +DECLARE_TASKLET_DISABLED(m41t00_tasklet, m41t00_set_tlet, (ulong)&new_time); + +int +m41t00_set_rtc_time(ulong nowtime) +{ + new_time = nowtime; + + if (in_interrupt()) + tasklet_schedule(&m41t00_tasklet); + else + m41t00_set_tlet((ulong)&new_time); + + return 0; +} + +/* + ***************************************************************************** + * + * Driver Interface + * + ***************************************************************************** + */ +static int +m41t00_probe(struct i2c_adapter *adap, int addr, int kind) +{ + struct i2c_client *client; + int rc; + + client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + if (!client) + return -ENOMEM; + + memset(client, 0, sizeof(struct i2c_client)); + strncpy(client->name, M41T00_DRV_NAME, I2C_NAME_SIZE); + client->id = m41t00_driver.id; + client->flags = I2C_DF_NOTIFY; + client->addr = addr; + client->adapter = adap; + client->driver = &m41t00_driver; + + if ((rc = i2c_attach_client(client)) != 0) { + kfree(client); + return rc; + } + + save_client = client; + return 0; +} + +static int +m41t00_attach(struct i2c_adapter *adap) +{ + return i2c_probe(adap, &addr_data, m41t00_probe); +} + +static int +m41t00_detach(struct i2c_client *client) +{ + int rc; + + if ((rc = i2c_detach_client(client)) == 0) { + kfree(i2c_get_clientdata(client)); + tasklet_kill(&m41t00_tasklet); + } + return rc; +} + +static struct i2c_driver m41t00_driver = { + .owner = THIS_MODULE, + .name = M41T00_DRV_NAME, + .id = I2C_DRIVERID_STM41T00, + .flags = I2C_DF_NOTIFY, + .attach_adapter = m41t00_attach, + .detach_client = m41t00_detach, +}; + +static int __init +m41t00_init(void) +{ + return i2c_add_driver(&m41t00_driver); +} + +static void __exit +m41t00_exit(void) +{ + i2c_del_driver(&m41t00_driver); + return; +} + +module_init(m41t00_init); +module_exit(m41t00_exit); + +MODULE_AUTHOR("Mark A. Greer "); +MODULE_DESCRIPTION("ST Microelectronics M41T00 RTC I2C Client Driver"); +MODULE_LICENSE("GPL"); diff -Nru a/drivers/i2c/chips/max1619.c b/drivers/i2c/chips/max1619.c --- a/drivers/i2c/chips/max1619.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/max1619.c 2005-03-07 14:54:18 -08:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -117,12 +118,6 @@ }; /* - * Internal variables - */ - -static int max1619_id; - -/* * Sysfs stuff */ @@ -267,7 +262,6 @@ /* We can fill in the remaining client fields */ strlcpy(new_client->name, name, I2C_NAME_SIZE); - new_client->id = max1619_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -331,10 +325,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) || - (jiffies < data->last_updated) || - !data->valid) { - + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { dev_dbg(&client->dev, "Updating max1619 data.\n"); data->temp_input1 = i2c_smbus_read_byte_data(client, MAX1619_REG_R_LOCAL_TEMP); diff -Nru a/drivers/i2c/chips/pc87360.c b/drivers/i2c/chips/pc87360.c --- a/drivers/i2c/chips/pc87360.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/pc87360.c 2005-03-07 14:54:16 -08:00 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1174,8 +1175,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ * 2) - || (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) { dev_dbg(&client->dev, "Data update\n"); /* Fans */ diff -Nru a/drivers/i2c/chips/pcf8574.c b/drivers/i2c/chips/pcf8574.c --- a/drivers/i2c/chips/pcf8574.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/pcf8574.c 2005-03-07 14:54:16 -08:00 @@ -77,8 +77,6 @@ .detach_client = pcf8574_detach_client, }; -static int pcf8574_id; - /* following are the sysfs callback functions */ static ssize_t show_read(struct device *dev, char *buf) { @@ -159,8 +157,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, client_name, I2C_NAME_SIZE); - - new_client->id = pcf8574_id++; init_MUTEX(&data->update_lock); /* Tell the I2C layer a new client has arrived */ diff -Nru a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c --- a/drivers/i2c/chips/pcf8591.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/pcf8591.c 2005-03-07 14:54:18 -08:00 @@ -98,8 +98,6 @@ .detach_client = pcf8591_detach_client, }; -static int pcf8591_id; - /* following are the sysfs callback functions */ #define show_in_channel(channel) \ static ssize_t show_in##channel##_input(struct device *dev, char *buf) \ @@ -201,8 +199,6 @@ /* Fill in the remaining client fields and put it into the global list */ strlcpy(new_client->name, "pcf8591", I2C_NAME_SIZE); - - new_client->id = pcf8591_id++; init_MUTEX(&data->update_lock); /* Tell the I2C layer a new client has arrived */ diff -Nru a/drivers/i2c/chips/rtc8564.c b/drivers/i2c/chips/rtc8564.c --- a/drivers/i2c/chips/rtc8564.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/rtc8564.c 2005-03-07 14:54:16 -08:00 @@ -89,7 +89,7 @@ _DBG(1, "client=%p, adr=%d, buf=%p, len=%d", client, adr, buf, len); - if (!buf || !client) { + if (!buf) { ret = -EINVAL; goto done; } @@ -111,7 +111,7 @@ struct i2c_msg wr; int i; - if (!client || !data || len > 15) { + if (!data || len > 15) { ret = -EINVAL; goto done; } @@ -163,14 +163,12 @@ strlcpy(new_client->name, "RTC8564", I2C_NAME_SIZE); i2c_set_clientdata(new_client, d); - new_client->id = rtc8564_driver.id; new_client->flags = I2C_CLIENT_ALLOW_USE | I2C_DF_NOTIFY; new_client->addr = addr; new_client->adapter = adap; new_client->driver = &rtc8564_driver; _DBG(1, "client=%p", new_client); - _DBG(1, "client.id=%d", new_client->id); /* init ctrl1 reg */ data[0] = 0; @@ -222,7 +220,7 @@ _DBG(1, "client=%p, dt=%p", client, dt); - if (!dt || !client) + if (!dt) return -EINVAL; memset(buf, 0, sizeof(buf)); @@ -256,7 +254,7 @@ _DBG(1, "client=%p, dt=%p", client, dt); - if (!dt || !client) + if (!dt) return -EINVAL; _DBGRTCTM(2, *dt); @@ -295,7 +293,7 @@ { struct rtc8564_data *data = i2c_get_clientdata(client); - if (!ctrl || !client) + if (!ctrl) return -1; *ctrl = data->ctrl; @@ -307,7 +305,7 @@ struct rtc8564_data *data = i2c_get_clientdata(client); unsigned char buf[2]; - if (!ctrl || !client) + if (!ctrl) return -1; buf[0] = *ctrl & 0xff; @@ -320,7 +318,7 @@ static int rtc8564_read_mem(struct i2c_client *client, struct mem *mem) { - if (!mem || !client) + if (!mem) return -EINVAL; return rtc8564_read(client, mem->loc, mem->data, mem->nr); @@ -329,7 +327,7 @@ static int rtc8564_write_mem(struct i2c_client *client, struct mem *mem) { - if (!mem || !client) + if (!mem) return -EINVAL; return rtc8564_write(client, mem->loc, mem->data, mem->nr); diff -Nru a/drivers/i2c/chips/sis5595.c b/drivers/i2c/chips/sis5595.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/i2c/chips/sis5595.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,794 @@ +/* + sis5595.c - Part of lm_sensors, Linux kernel modules + for hardware monitoring + + Copyright (C) 1998 - 2001 Frodo Looijaard , + Kyösti Mälkki , and + Mark D. Studebaker + Ported to Linux 2.6 by Aurelien Jarno with + the help of Jean Delvare + + 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. +*/ + +/* + SiS southbridge has a LM78-like chip integrated on the same IC. + This driver is a customized copy of lm78.c + + Supports following revisions: + Version PCI ID PCI Revision + 1 1039/0008 AF or less + 2 1039/0008 B0 or greater + + Note: these chips contain a 0008 device which is incompatible with the + 5595. We recognize these by the presence of the listed + "blacklist" PCI ID and refuse to load. + + NOT SUPPORTED PCI ID BLACKLIST PCI ID + 540 0008 0540 + 550 0008 0550 + 5513 0008 5511 + 5581 0008 5597 + 5582 0008 5597 + 5597 0008 5597 + 5598 0008 5597/5598 + 630 0008 0630 + 645 0008 0645 + 730 0008 0730 + 735 0008 0735 +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* If force_addr is set to anything different from 0, we forcibly enable + the device at the given address. */ +static u16 force_addr; +module_param(force_addr, ushort, 0); +MODULE_PARM_DESC(force_addr, + "Initialize the base address of the sensors"); + +/* Addresses to scan. + Note that we can't determine the ISA address until we have initialized + our module */ +static unsigned short normal_i2c[] = { I2C_CLIENT_END }; +static unsigned int normal_isa[] = { 0x0000, I2C_CLIENT_ISA_END }; + +/* Insmod parameters */ +SENSORS_INSMOD_1(sis5595); + +/* Many SIS5595 constants specified below */ + +/* Length of ISA address segment */ +#define SIS5595_EXTENT 8 +/* PCI Config Registers */ +#define SIS5595_REVISION_REG 0x08 +#define SIS5595_BASE_REG 0x68 +#define SIS5595_PIN_REG 0x7A +#define SIS5595_ENABLE_REG 0x7B + +/* Where are the ISA address/data registers relative to the base address */ +#define SIS5595_ADDR_REG_OFFSET 5 +#define SIS5595_DATA_REG_OFFSET 6 + +/* The SIS5595 registers */ +#define SIS5595_REG_IN_MAX(nr) (0x2b + (nr) * 2) +#define SIS5595_REG_IN_MIN(nr) (0x2c + (nr) * 2) +#define SIS5595_REG_IN(nr) (0x20 + (nr)) + +#define SIS5595_REG_FAN_MIN(nr) (0x3b + (nr)) +#define SIS5595_REG_FAN(nr) (0x28 + (nr)) + +/* On the first version of the chip, the temp registers are separate. + On the second version, + TEMP pin is shared with IN4, configured in PCI register 0x7A. + The registers are the same as well. + OVER and HYST are really MAX and MIN. */ + +#define REV2MIN 0xb0 +#define SIS5595_REG_TEMP (( data->revision) >= REV2MIN) ? \ + SIS5595_REG_IN(4) : 0x27 +#define SIS5595_REG_TEMP_OVER (( data->revision) >= REV2MIN) ? \ + SIS5595_REG_IN_MAX(4) : 0x39 +#define SIS5595_REG_TEMP_HYST (( data->revision) >= REV2MIN) ? \ + SIS5595_REG_IN_MIN(4) : 0x3a + +#define SIS5595_REG_CONFIG 0x40 +#define SIS5595_REG_ALARM1 0x41 +#define SIS5595_REG_ALARM2 0x42 +#define SIS5595_REG_FANDIV 0x47 + +/* Conversions. Limit checking is only done on the TO_REG + variants. */ + +/* IN: mV, (0V to 4.08V) + REG: 16mV/bit */ +static inline u8 IN_TO_REG(unsigned long val) +{ + unsigned long nval = SENSORS_LIMIT(val, 0, 4080); + return (nval + 8) / 16; +} +#define IN_FROM_REG(val) ((val) * 16) + +static inline u8 FAN_TO_REG(long rpm, int div) +{ + if (rpm <= 0) + return 255; + return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254); +} + +static inline int FAN_FROM_REG(u8 val, int div) +{ + return val==0 ? -1 : val==255 ? 0 : 1350000/(val*div); +} + +/* TEMP: mC (-54.12C to +157.53C) + REG: 0.83C/bit + 52.12, two's complement */ +static inline int TEMP_FROM_REG(s8 val) +{ + return val * 830 + 52120; +} +static inline s8 TEMP_TO_REG(int val) +{ + int nval = SENSORS_LIMIT(val, -54120, 157530) ; + return nval<0 ? (nval-5212-415)/830 : (nval-5212+415)/830; +} + +/* FAN DIV: 1, 2, 4, or 8 (defaults to 2) + REG: 0, 1, 2, or 3 (respectively) (defaults to 1) */ +static inline u8 DIV_TO_REG(int val) +{ + return val==8 ? 3 : val==4 ? 2 : val==1 ? 0 : 1; +} +#define DIV_FROM_REG(val) (1 << (val)) + +/* For the SIS5595, we need to keep some data in memory. That + data is pointed to by sis5595_list[NR]->data. The structure itself is + dynamically allocated, at the time when the new sis5595 client is + allocated. */ +struct sis5595_data { + struct i2c_client client; + struct semaphore lock; + + struct semaphore update_lock; + char valid; /* !=0 if following fields are valid */ + unsigned long last_updated; /* In jiffies */ + char maxins; /* == 3 if temp enabled, otherwise == 4 */ + u8 revision; /* Reg. value */ + + u8 in[5]; /* Register value */ + u8 in_max[5]; /* Register value */ + u8 in_min[5]; /* Register value */ + u8 fan[2]; /* Register value */ + u8 fan_min[2]; /* Register value */ + s8 temp; /* Register value */ + s8 temp_over; /* Register value */ + s8 temp_hyst; /* Register value */ + u8 fan_div[2]; /* Register encoding, shifted right */ + u16 alarms; /* Register encoding, combined */ +}; + +static struct pci_dev *s_bridge; /* pointer to the (only) sis5595 */ + +static int sis5595_attach_adapter(struct i2c_adapter *adapter); +static int sis5595_detect(struct i2c_adapter *adapter, int address, int kind); +static int sis5595_detach_client(struct i2c_client *client); + +static int sis5595_read_value(struct i2c_client *client, u8 register); +static int sis5595_write_value(struct i2c_client *client, u8 register, u8 value); +static struct sis5595_data *sis5595_update_device(struct device *dev); +static void sis5595_init_client(struct i2c_client *client); + +static struct i2c_driver sis5595_driver = { + .owner = THIS_MODULE, + .name = "sis5595", + .id = I2C_DRIVERID_SIS5595, + .flags = I2C_DF_NOTIFY, + .attach_adapter = sis5595_attach_adapter, + .detach_client = sis5595_detach_client, +}; + +/* 4 Voltages */ +static ssize_t show_in(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr])); +} + +static ssize_t show_in_min(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[nr])); +} + +static ssize_t show_in_max(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", IN_FROM_REG(data->in_max[nr])); +} + +static ssize_t set_in_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->in_min[nr] = IN_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_IN_MIN(nr), data->in_min[nr]); + return count; +} + +static ssize_t set_in_max(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->in_max[nr] = IN_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_IN_MAX(nr), data->in_max[nr]); + return count; +} + +#define show_in_offset(offset) \ +static ssize_t \ + show_in##offset (struct device *dev, char *buf) \ +{ \ + return show_in(dev, buf, offset); \ +} \ +static DEVICE_ATTR(in##offset##_input, S_IRUGO, \ + show_in##offset, NULL); \ +static ssize_t \ + show_in##offset##_min (struct device *dev, char *buf) \ +{ \ + return show_in_min(dev, buf, offset); \ +} \ +static ssize_t \ + show_in##offset##_max (struct device *dev, char *buf) \ +{ \ + return show_in_max(dev, buf, offset); \ +} \ +static ssize_t set_in##offset##_min (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_in_min(dev, buf, count, offset); \ +} \ +static ssize_t set_in##offset##_max (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_in_max(dev, buf, count, offset); \ +} \ +static DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, \ + show_in##offset##_min, set_in##offset##_min); \ +static DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, \ + show_in##offset##_max, set_in##offset##_max); + +show_in_offset(0); +show_in_offset(1); +show_in_offset(2); +show_in_offset(3); +show_in_offset(4); + +/* Temperature */ +static ssize_t show_temp(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp)); +} + +static ssize_t show_temp_over(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over)); +} + +static ssize_t set_temp_over(struct device *dev, const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + long val = simple_strtol(buf, NULL, 10); + data->temp_over = TEMP_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_TEMP_OVER, data->temp_over); + return count; +} + +static ssize_t show_temp_hyst(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_hyst)); +} + +static ssize_t set_temp_hyst(struct device *dev, const char *buf, size_t count) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + long val = simple_strtol(buf, NULL, 10); + data->temp_hyst = TEMP_TO_REG(val); + sis5595_write_value(client, SIS5595_REG_TEMP_HYST, data->temp_hyst); + return count; +} + +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); +static DEVICE_ATTR(temp1_max, S_IRUGO | S_IWUSR, + show_temp_over, set_temp_over); +static DEVICE_ATTR(temp1_max_hyst, S_IRUGO | S_IWUSR, + show_temp_hyst, set_temp_hyst); + +/* 2 Fans */ +static ssize_t show_fan(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], + DIV_FROM_REG(data->fan_div[nr])) ); +} + +static ssize_t show_fan_min(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf,"%d\n", FAN_FROM_REG(data->fan_min[nr], + DIV_FROM_REG(data->fan_div[nr])) ); +} + +static ssize_t set_fan_min(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long val = simple_strtoul(buf, NULL, 10); + data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); + sis5595_write_value(client, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); + return count; +} + +static ssize_t show_fan_div(struct device *dev, char *buf, int nr) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", DIV_FROM_REG(data->fan_div[nr]) ); +} + +/* Note: we save and restore the fan minimum here, because its value is + determined in part by the fan divisor. This follows the principle of + least suprise; the user doesn't expect the fan minimum to change just + because the divisor changed. */ +static ssize_t set_fan_div(struct device *dev, const char *buf, + size_t count, int nr) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + unsigned long min = FAN_FROM_REG(data->fan_min[nr], + DIV_FROM_REG(data->fan_div[nr])); + unsigned long val = simple_strtoul(buf, NULL, 10); + int reg = sis5595_read_value(client, SIS5595_REG_FANDIV); + switch (val) { + case 1: data->fan_div[nr] = 0; break; + case 2: data->fan_div[nr] = 1; break; + case 4: data->fan_div[nr] = 2; break; + case 8: data->fan_div[nr] = 3; break; + default: + dev_err(&client->dev, "fan_div value %ld not " + "supported. Choose one of 1, 2, 4 or 8!\n", val); + return -EINVAL; + } + + switch (nr) { + case 0: + reg = (reg & 0xcf) | (data->fan_div[nr] << 4); + break; + case 1: + reg = (reg & 0x3f) | (data->fan_div[nr] << 6); + break; + } + sis5595_write_value(client, SIS5595_REG_FANDIV, reg); + data->fan_min[nr] = + FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); + sis5595_write_value(client, SIS5595_REG_FAN_MIN(nr), data->fan_min[nr]); + return count; +} + +#define show_fan_offset(offset) \ +static ssize_t show_fan_##offset (struct device *dev, char *buf) \ +{ \ + return show_fan(dev, buf, offset - 1); \ +} \ +static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ +{ \ + return show_fan_min(dev, buf, offset - 1); \ +} \ +static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ +{ \ + return show_fan_div(dev, buf, offset - 1); \ +} \ +static ssize_t set_fan_##offset##_min (struct device *dev, \ + const char *buf, size_t count) \ +{ \ + return set_fan_min(dev, buf, count, offset - 1); \ +} \ +static DEVICE_ATTR(fan##offset##_input, S_IRUGO, show_fan_##offset, NULL);\ +static DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \ + show_fan_##offset##_min, set_fan_##offset##_min); + +show_fan_offset(1); +show_fan_offset(2); + +static ssize_t set_fan_1_div(struct device *dev, const char *buf, + size_t count) +{ + return set_fan_div(dev, buf, count, 0) ; +} + +static ssize_t set_fan_2_div(struct device *dev, const char *buf, + size_t count) +{ + return set_fan_div(dev, buf, count, 1) ; +} +static DEVICE_ATTR(fan1_div, S_IRUGO | S_IWUSR, + show_fan_1_div, set_fan_1_div); +static DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR, + show_fan_2_div, set_fan_2_div); + +/* Alarms */ +static ssize_t show_alarms(struct device *dev, char *buf) +{ + struct sis5595_data *data = sis5595_update_device(dev); + return sprintf(buf, "%d\n", data->alarms); +} +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); + +/* This is called when the module is loaded */ +static int sis5595_attach_adapter(struct i2c_adapter *adapter) +{ + if (!(adapter->class & I2C_CLASS_HWMON)) + return 0; + return i2c_detect(adapter, &addr_data, sis5595_detect); +} + +int sis5595_detect(struct i2c_adapter *adapter, int address, int kind) +{ + int err = 0; + int i; + struct i2c_client *new_client; + struct sis5595_data *data; + char val; + u16 a; + + /* Make sure we are probing the ISA bus!! */ + if (!i2c_is_isa_adapter(adapter)) + goto exit; + + if (force_addr) + address = force_addr & ~(SIS5595_EXTENT - 1); + /* Reserve the ISA region */ + if (!request_region(address, SIS5595_EXTENT, sis5595_driver.name)) { + err = -EBUSY; + goto exit; + } + if (force_addr) { + dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n", address); + if (PCIBIOS_SUCCESSFUL != + pci_write_config_word(s_bridge, SIS5595_BASE_REG, address)) + goto exit_release; + if (PCIBIOS_SUCCESSFUL != + pci_read_config_word(s_bridge, SIS5595_BASE_REG, &a)) + goto exit_release; + if ((a & ~(SIS5595_EXTENT - 1)) != address) + /* doesn't work for some chips? */ + goto exit_release; + } + + if (PCIBIOS_SUCCESSFUL != + pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) { + goto exit_release; + } + if ((val & 0x80) == 0) { + if (PCIBIOS_SUCCESSFUL != + pci_write_config_byte(s_bridge, SIS5595_ENABLE_REG, + val | 0x80)) + goto exit_release; + if (PCIBIOS_SUCCESSFUL != + pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &val)) + goto exit_release; + if ((val & 0x80) == 0) + /* doesn't work for some chips! */ + goto exit_release; + } + + if (!(data = kmalloc(sizeof(struct sis5595_data), GFP_KERNEL))) { + err = -ENOMEM; + goto exit_release; + } + memset(data, 0, sizeof(struct sis5595_data)); + + new_client = &data->client; + new_client->addr = address; + init_MUTEX(&data->lock); + i2c_set_clientdata(new_client, data); + new_client->adapter = adapter; + new_client->driver = &sis5595_driver; + new_client->flags = 0; + + /* Check revision and pin registers to determine whether 4 or 5 voltages */ + pci_read_config_byte(s_bridge, SIS5595_REVISION_REG, &(data->revision)); + /* 4 voltages, 1 temp */ + data->maxins = 3; + if (data->revision >= REV2MIN) { + pci_read_config_byte(s_bridge, SIS5595_PIN_REG, &val); + if (!(val & 0x80)) + /* 5 voltages, no temps */ + data->maxins = 4; + } + + /* Fill in the remaining client fields and put it into the global list */ + strlcpy(new_client->name, "sis5595", I2C_NAME_SIZE); + + data->valid = 0; + init_MUTEX(&data->update_lock); + + /* Tell the I2C layer a new client has arrived */ + if ((err = i2c_attach_client(new_client))) + goto exit_free; + + /* Initialize the SIS5595 chip */ + sis5595_init_client(new_client); + + /* A few vars need to be filled upon startup */ + for (i = 0; i < 2; i++) { + data->fan_min[i] = sis5595_read_value(new_client, + SIS5595_REG_FAN_MIN(i)); + } + + /* Register sysfs hooks */ + device_create_file(&new_client->dev, &dev_attr_in0_input); + device_create_file(&new_client->dev, &dev_attr_in0_min); + device_create_file(&new_client->dev, &dev_attr_in0_max); + device_create_file(&new_client->dev, &dev_attr_in1_input); + device_create_file(&new_client->dev, &dev_attr_in1_min); + device_create_file(&new_client->dev, &dev_attr_in1_max); + device_create_file(&new_client->dev, &dev_attr_in2_input); + device_create_file(&new_client->dev, &dev_attr_in2_min); + device_create_file(&new_client->dev, &dev_attr_in2_max); + device_create_file(&new_client->dev, &dev_attr_in3_input); + device_create_file(&new_client->dev, &dev_attr_in3_min); + device_create_file(&new_client->dev, &dev_attr_in3_max); + if (data->maxins == 4) { + device_create_file(&new_client->dev, &dev_attr_in4_input); + device_create_file(&new_client->dev, &dev_attr_in4_min); + device_create_file(&new_client->dev, &dev_attr_in4_max); + } + device_create_file(&new_client->dev, &dev_attr_fan1_input); + device_create_file(&new_client->dev, &dev_attr_fan1_min); + device_create_file(&new_client->dev, &dev_attr_fan1_div); + device_create_file(&new_client->dev, &dev_attr_fan2_input); + device_create_file(&new_client->dev, &dev_attr_fan2_min); + device_create_file(&new_client->dev, &dev_attr_fan2_div); + device_create_file(&new_client->dev, &dev_attr_alarms); + if (data->maxins == 3) { + device_create_file(&new_client->dev, &dev_attr_temp1_input); + device_create_file(&new_client->dev, &dev_attr_temp1_max); + device_create_file(&new_client->dev, &dev_attr_temp1_max_hyst); + } + return 0; + +exit_free: + kfree(data); +exit_release: + release_region(address, SIS5595_EXTENT); +exit: + return err; +} + +static int sis5595_detach_client(struct i2c_client *client) +{ + int err; + + if ((err = i2c_detach_client(client))) { + dev_err(&client->dev, + "Client deregistration failed, client not detached.\n"); + return err; + } + + if (i2c_is_isa_client(client)) + release_region(client->addr, SIS5595_EXTENT); + + kfree(i2c_get_clientdata(client)); + + return 0; +} + + +/* ISA access must be locked explicitly. */ +static int sis5595_read_value(struct i2c_client *client, u8 reg) +{ + int res; + + struct sis5595_data *data = i2c_get_clientdata(client); + down(&data->lock); + outb_p(reg, client->addr + SIS5595_ADDR_REG_OFFSET); + res = inb_p(client->addr + SIS5595_DATA_REG_OFFSET); + up(&data->lock); + return res; +} + +static int sis5595_write_value(struct i2c_client *client, u8 reg, u8 value) +{ + struct sis5595_data *data = i2c_get_clientdata(client); + down(&data->lock); + outb_p(reg, client->addr + SIS5595_ADDR_REG_OFFSET); + outb_p(value, client->addr + SIS5595_DATA_REG_OFFSET); + up(&data->lock); + return 0; +} + +/* Called when we have found a new SIS5595. */ +static void sis5595_init_client(struct i2c_client *client) +{ + u8 config = sis5595_read_value(client, SIS5595_REG_CONFIG); + if (!(config & 0x01)) + sis5595_write_value(client, SIS5595_REG_CONFIG, + (config & 0xf7) | 0x01); +} + +static struct sis5595_data *sis5595_update_device(struct device *dev) +{ + struct i2c_client *client = to_i2c_client(dev); + struct sis5595_data *data = i2c_get_clientdata(client); + int i; + + down(&data->update_lock); + + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { + + for (i = 0; i <= data->maxins; i++) { + data->in[i] = + sis5595_read_value(client, SIS5595_REG_IN(i)); + data->in_min[i] = + sis5595_read_value(client, + SIS5595_REG_IN_MIN(i)); + data->in_max[i] = + sis5595_read_value(client, + SIS5595_REG_IN_MAX(i)); + } + for (i = 0; i < 2; i++) { + data->fan[i] = + sis5595_read_value(client, SIS5595_REG_FAN(i)); + data->fan_min[i] = + sis5595_read_value(client, + SIS5595_REG_FAN_MIN(i)); + } + if (data->maxins == 3) { + data->temp = + sis5595_read_value(client, SIS5595_REG_TEMP); + data->temp_over = + sis5595_read_value(client, SIS5595_REG_TEMP_OVER); + data->temp_hyst = + sis5595_read_value(client, SIS5595_REG_TEMP_HYST); + } + i = sis5595_read_value(client, SIS5595_REG_FANDIV); + data->fan_div[0] = (i >> 4) & 0x03; + data->fan_div[1] = i >> 6; + data->alarms = + sis5595_read_value(client, SIS5595_REG_ALARM1) | + (sis5595_read_value(client, SIS5595_REG_ALARM2) << 8); + data->last_updated = jiffies; + data->valid = 1; + } + + up(&data->update_lock); + + return data; +} + +static struct pci_device_id sis5595_pci_ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) }, + { 0, } +}; + +MODULE_DEVICE_TABLE(pci, sis5595_pci_ids); + +static int blacklist[] __devinitdata = { + PCI_DEVICE_ID_SI_540, + PCI_DEVICE_ID_SI_550, + PCI_DEVICE_ID_SI_630, + PCI_DEVICE_ID_SI_645, + PCI_DEVICE_ID_SI_730, + PCI_DEVICE_ID_SI_735, + PCI_DEVICE_ID_SI_5511, /* 5513 chip has the 0008 device but + that ID shows up in other chips so we + use the 5511 ID for recognition */ + PCI_DEVICE_ID_SI_5597, + PCI_DEVICE_ID_SI_5598, + 0 }; + +static int __devinit sis5595_pci_probe(struct pci_dev *dev, + const struct pci_device_id *id) +{ + u16 val; + int *i; + int addr = 0; + + for (i = blacklist; *i != 0; i++) { + struct pci_dev *dev; + dev = pci_get_device(PCI_VENDOR_ID_SI, *i, NULL); + if (dev) { + dev_err(&dev->dev, "Looked for SIS5595 but found unsupported device %.4x\n", *i); + pci_dev_put(dev); + return -ENODEV; + } + } + + if (PCIBIOS_SUCCESSFUL != + pci_read_config_word(dev, SIS5595_BASE_REG, &val)) + return -ENODEV; + + addr = val & ~(SIS5595_EXTENT - 1); + if (addr == 0 && force_addr == 0) { + dev_err(&dev->dev, "Base address not set - upgrade BIOS or use force_addr=0xaddr\n"); + return -ENODEV; + } + if (force_addr) + addr = force_addr; /* so detect will get called */ + + if (!addr) { + dev_err(&dev->dev,"No SiS 5595 sensors found.\n"); + return -ENODEV; + } + normal_isa[0] = addr; + + s_bridge = pci_dev_get(dev); + if (i2c_add_driver(&sis5595_driver)) { + pci_dev_put(s_bridge); + s_bridge = NULL; + } + + /* Always return failure here. This is to allow other drivers to bind + * to this pci device. We don't really want to have control over the + * pci device, we only wanted to read as few register values from it. + */ + return -ENODEV; +} + +static struct pci_driver sis5595_pci_driver = { + .name = "sis5595", + .id_table = sis5595_pci_ids, + .probe = sis5595_pci_probe, +}; + +static int __init sm_sis5595_init(void) +{ + return pci_register_driver(&sis5595_pci_driver); +} + +static void __exit sm_sis5595_exit(void) +{ + pci_unregister_driver(&sis5595_pci_driver); + if (s_bridge != NULL) { + i2c_del_driver(&sis5595_driver); + pci_dev_put(s_bridge); + s_bridge = NULL; + } +} + +MODULE_AUTHOR("Aurelien Jarno "); +MODULE_DESCRIPTION("SiS 5595 Sensor device"); +MODULE_LICENSE("GPL"); + +module_init(sm_sis5595_init); +module_exit(sm_sis5595_exit); diff -Nru a/drivers/i2c/chips/smsc47b397.c b/drivers/i2c/chips/smsc47b397.c --- a/drivers/i2c/chips/smsc47b397.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/i2c/chips/smsc47b397.c 2005-03-07 14:54:18 -08:00 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -130,9 +131,7 @@ down(&data->update_lock); - if (time_after(jiffies - data->last_updated, (unsigned long)HZ) - || time_before(jiffies, data->last_updated) || !data->valid) { - + if (time_after(jiffies, data->last_updated + HZ) || !data->valid) { dev_dbg(&client->dev, "starting device update...\n"); /* 4 temperature inputs, 4 fan inputs */ diff -Nru a/drivers/i2c/chips/smsc47m1.c b/drivers/i2c/chips/smsc47m1.c --- a/drivers/i2c/chips/smsc47m1.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/smsc47m1.c 2005-03-07 14:54:16 -08:00 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -108,7 +109,6 @@ struct smsc47m1_data { struct i2c_client client; struct semaphore lock; - int sysctl_id; struct semaphore update_lock; unsigned long last_updated; /* In jiffies */ @@ -133,8 +133,6 @@ int init); -static int smsc47m1_id; - static struct i2c_driver smsc47m1_driver = { .owner = THIS_MODULE, .name = "smsc47m1", @@ -420,8 +418,6 @@ new_client->flags = 0; strlcpy(new_client->name, "smsc47m1", I2C_NAME_SIZE); - - new_client->id = smsc47m1_id++; init_MUTEX(&data->update_lock); /* If no function is properly configured, there's no point in @@ -532,8 +528,7 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || init) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) || init) { int i; for (i = 0; i < 2; i++) { diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c --- a/drivers/i2c/chips/via686a.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/via686a.c 2005-03-07 14:54:16 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -726,9 +727,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { - + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { for (i = 0; i <= 4; i++) { data->in[i] = via686a_read_value(client, VIA686A_REG_IN(i)); diff -Nru a/drivers/i2c/chips/w83627hf.c b/drivers/i2c/chips/w83627hf.c --- a/drivers/i2c/chips/w83627hf.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/chips/w83627hf.c 2005-03-07 14:54:17 -08:00 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -1321,6 +1322,27 @@ data->pwmenable[2] = 1; if(init) { + /* Enable temp2 */ + tmp = w83627hf_read_value(client, W83781D_REG_TEMP2_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp2, readings " + "might not make sense\n"); + w83627hf_write_value(client, W83781D_REG_TEMP2_CONFIG, + tmp & 0xfe); + } + + /* Enable temp3 */ + if (type != w83697hf) { + tmp = w83627hf_read_value(client, + W83781D_REG_TEMP3_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp3, " + "readings might not make sense\n"); + w83627hf_write_value(client, + W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); + } + } + if (type == w83627hf) { /* enable PWM2 control (can't hurt since PWM reg should have been reset to 0xff) */ @@ -1350,8 +1372,8 @@ down(&data->update_lock); - if ((jiffies - data->last_updated > HZ + HZ / 2) || - (jiffies < data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { for (i = 0; i <= 8; i++) { /* skip missing sensors */ if (((data->type == w83697hf) && (i == 1)) || diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c --- a/drivers/i2c/chips/w83781d.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/w83781d.c 2005-03-07 14:54:16 -08:00 @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1562,11 +1563,28 @@ } #endif /* W83781D_RT */ - if (init) { + if (init && type != as99127f) { + /* Enable temp2 */ + tmp = w83781d_read_value(client, W83781D_REG_TEMP2_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp2, readings " + "might not make sense\n"); + w83781d_write_value(client, W83781D_REG_TEMP2_CONFIG, + tmp & 0xfe); + } + + /* Enable temp3 */ if (type != w83783s && type != w83697hf) { - w83781d_write_value(client, W83781D_REG_TEMP3_CONFIG, - 0x00); + tmp = w83781d_read_value(client, + W83781D_REG_TEMP3_CONFIG); + if (tmp & 0x01) { + dev_warn(&client->dev, "Enabling temp3, " + "readings might not make sense\n"); + w83781d_write_value(client, + W83781D_REG_TEMP3_CONFIG, tmp & 0xfe); + } } + if (type != w83781d) { /* enable comparator mode for temp2 and temp3 so alarm indication will work correctly */ @@ -1592,9 +1610,8 @@ down(&data->update_lock); - if (time_after - (jiffies - data->last_updated, (unsigned long) (HZ + HZ / 2)) - || time_before(jiffies, data->last_updated) || !data->valid) { + if (time_after(jiffies, data->last_updated + HZ + HZ / 2) + || !data->valid) { dev_dbg(dev, "Starting device update\n"); for (i = 0; i <= 8; i++) { diff -Nru a/drivers/i2c/chips/w83l785ts.c b/drivers/i2c/chips/w83l785ts.c --- a/drivers/i2c/chips/w83l785ts.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/chips/w83l785ts.c 2005-03-07 14:54:16 -08:00 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -114,12 +115,6 @@ }; /* - * Internal variables - */ - -static int w83l785ts_id = 0; - -/* * Sysfs stuff */ @@ -229,7 +224,6 @@ /* We can fill in the remaining client fields. */ strlcpy(new_client->name, "w83l785ts", I2C_NAME_SIZE); - new_client->id = w83l785ts_id++; data->valid = 0; init_MUTEX(&data->update_lock); @@ -301,9 +295,7 @@ down(&data->update_lock); - if (!data->valid - || (jiffies - data->last_updated > HZ * 2) - || (jiffies < data->last_updated)) { + if (!data->valid || time_after(jiffies, data->last_updated + HZ * 2)) { dev_dbg(&client->dev, "Updating w83l785ts data.\n"); data->temp = w83l785ts_read_value(client, W83L785TS_REG_TEMP, data->temp); diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c --- a/drivers/i2c/i2c-core.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/i2c/i2c-core.c 2005-03-07 14:54:16 -08:00 @@ -38,12 +38,43 @@ static DECLARE_MUTEX(core_lists); static DEFINE_IDR(i2c_adapter_idr); -int i2c_device_probe(struct device *dev) +/* match always succeeds, as we want the probe() to tell if we really accept this match */ +static int i2c_device_match(struct device *dev, struct device_driver *drv) +{ + return 1; +} + +static int i2c_bus_suspend(struct device * dev, pm_message_t state) +{ + int rc = 0; + + if (dev->driver && dev->driver->suspend) + rc = dev->driver->suspend(dev,state,0); + return rc; +} + +static int i2c_bus_resume(struct device * dev) +{ + int rc = 0; + + if (dev->driver && dev->driver->resume) + rc = dev->driver->resume(dev,0); + return rc; +} + +static struct bus_type i2c_bus_type = { + .name = "i2c", + .match = i2c_device_match, + .suspend = i2c_bus_suspend, + .resume = i2c_bus_resume, +}; + +static int i2c_device_probe(struct device *dev) { return -ENODEV; } -int i2c_device_remove(struct device *dev) +static int i2c_device_remove(struct device *dev) { return 0; } @@ -523,38 +554,6 @@ up(&adap->clist_lock); } - -/* match always succeeds, as we want the probe() to tell if we really accept this match */ -static int i2c_device_match(struct device *dev, struct device_driver *drv) -{ - return 1; -} - -static int i2c_bus_suspend(struct device * dev, u32 state) -{ - int rc = 0; - - if (dev->driver && dev->driver->suspend) - rc = dev->driver->suspend(dev,state,0); - return rc; -} - -static int i2c_bus_resume(struct device * dev) -{ - int rc = 0; - - if (dev->driver && dev->driver->resume) - rc = dev->driver->resume(dev,0); - return rc; -} - -struct bus_type i2c_bus_type = { - .name = "i2c", - .match = i2c_device_match, - .suspend = i2c_bus_suspend, - .resume = i2c_bus_resume, -}; - static int __init i2c_init(void) { int retval; @@ -583,7 +582,7 @@ * ---------------------------------------------------- */ -int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg msgs[],int num) +int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs, int num) { int ret; @@ -860,7 +859,7 @@ /* CRC over count bytes in the first array plus the bytes in the rest array if it is non-null. rest[0] is the (length of rest) - 1 and is included. */ -u8 i2c_smbus_partial_pec(u8 crc, int count, u8 *first, u8 *rest) +static u8 i2c_smbus_partial_pec(u8 crc, int count, u8 *first, u8 *rest) { int i; @@ -872,7 +871,7 @@ return crc; } -u8 i2c_smbus_pec(int count, u8 *first, u8 *rest) +static u8 i2c_smbus_pec(int count, u8 *first, u8 *rest) { return i2c_smbus_partial_pec(0, count, first, rest); } @@ -880,8 +879,8 @@ /* Returns new "size" (transaction type) Note that we convert byte to byte_data and byte_data to word_data rather than invent new xxx_PEC transactions. */ -int i2c_smbus_add_pec(u16 addr, u8 command, int size, - union i2c_smbus_data *data) +static int i2c_smbus_add_pec(u16 addr, u8 command, int size, + union i2c_smbus_data *data) { u8 buf[3]; @@ -910,8 +909,8 @@ return size; } -int i2c_smbus_check_pec(u16 addr, u8 command, int size, u8 partial, - union i2c_smbus_data *data) +static int i2c_smbus_check_pec(u16 addr, u8 command, int size, u8 partial, + union i2c_smbus_data *data) { u8 buf[3], rpec, cpec; diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c --- a/drivers/i2c/i2c-dev.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/i2c-dev.c 2005-03-07 14:54:17 -08:00 @@ -55,7 +55,7 @@ static struct i2c_dev *i2c_dev_array[I2C_MINORS]; static DEFINE_SPINLOCK(i2c_dev_array_lock); -struct i2c_dev *i2c_dev_get_by_minor(unsigned index) +static struct i2c_dev *i2c_dev_get_by_minor(unsigned index) { struct i2c_dev *i2c_dev; @@ -65,7 +65,7 @@ return i2c_dev; } -struct i2c_dev *i2c_dev_get_by_adapter(struct i2c_adapter *adap) +static struct i2c_dev *i2c_dev_get_by_adapter(struct i2c_adapter *adap) { struct i2c_dev *i2c_dev = NULL; @@ -173,8 +173,8 @@ return ret; } -int i2cdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +static int i2cdev_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { struct i2c_client *client = (struct i2c_client *)file->private_data; struct i2c_rdwr_ioctl_data rdwr_arg; @@ -507,7 +507,6 @@ static struct i2c_client i2cdev_client_template = { .name = "I2C /dev entry", - .id = 1, .addr = -1, .driver = &i2cdev_driver, }; diff -Nru a/drivers/i2c/i2c-sensor-detect.c b/drivers/i2c/i2c-sensor-detect.c --- a/drivers/i2c/i2c-sensor-detect.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/i2c/i2c-sensor-detect.c 2005-03-07 14:54:17 -08:00 @@ -19,17 +19,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include -#include -#include -#include -#include -#include #include #include -#include static unsigned short empty[] = {I2C_CLIENT_END}; static unsigned int empty_isa[] = {I2C_CLIENT_ISA_END}; diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c --- a/drivers/ide/arm/icside.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ide/arm/icside.c 2005-03-07 14:54:17 -08:00 @@ -713,7 +713,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id) { struct icside_state *state; - void *idmem; + void __iomem *idmem; int ret; ret = ecard_request_resources(ec); diff -Nru a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c --- a/drivers/ide/arm/rapide.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/ide/arm/rapide.c 2005-03-07 14:54:18 -08:00 @@ -17,7 +17,7 @@ * Something like this really should be in generic code, but isn't. */ static ide_hwif_t * -rapide_locate_hwif(void __iomem *base, void *ctrl, unsigned int sz, int irq) +rapide_locate_hwif(void __iomem *base, void __iomem *ctrl, unsigned int sz, int irq) { unsigned long port = (unsigned long)base; ide_hwif_t *hwif; diff -Nru a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c --- a/drivers/ide/pci/sgiioc4.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ide/pci/sgiioc4.c 2005-03-07 14:54:17 -08:00 @@ -688,7 +688,7 @@ if (ret < 0) { printk(KERN_ERR "Failed to enable device %s at slot %s\n", - d->name, dev->slot_name); + d->name, pci_name(dev)); goto out; } pci_set_master(dev); @@ -696,11 +696,11 @@ pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); class_rev &= 0xff; printk(KERN_INFO "%s: IDE controller at PCI slot %s, revision %d\n", - d->name, dev->slot_name, class_rev); + d->name, pci_name(dev), class_rev); if (class_rev < IOC4_SUPPORTED_FIRMWARE_REV) { printk(KERN_ERR "Skipping %s IDE controller in slot %s: " "firmware is obsolete - please upgrade to revision" - "46 or higher\n", d->name, dev->slot_name); + "46 or higher\n", d->name, pci_name(dev)); ret = -EAGAIN; goto out; } diff -Nru a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig --- a/drivers/ieee1394/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/Kconfig 2005-03-07 14:54:16 -08:00 @@ -5,6 +5,7 @@ config IEEE1394 tristate "IEEE 1394 (FireWire) support" depends on PCI || BROKEN + select NET help IEEE 1394 describes a high performance serial bus, which is also known as FireWire(tm) or i.Link(tm) and is used for connecting all diff -Nru a/drivers/ieee1394/amdtp.c b/drivers/ieee1394/amdtp.c --- a/drivers/ieee1394/amdtp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/amdtp.c 2005-03-07 14:54:17 -08:00 @@ -286,7 +286,7 @@ #define OHCI1394_CONTEXT_DEAD 0x00000800 #define OHCI1394_CONTEXT_ACTIVE 0x00000400 -void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx, +static void ohci1394_start_it_ctx(struct ti_ohci *ohci, int ctx, dma_addr_t first_cmd, int z, int cycle_match) { reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << ctx); @@ -298,13 +298,13 @@ OHCI1394_CONTEXT_RUN); } -void ohci1394_wake_it_ctx(struct ti_ohci *ohci, int ctx) +static void ohci1394_wake_it_ctx(struct ti_ohci *ohci, int ctx) { reg_write(ohci, OHCI1394_IsoXmitContextControlSet + ctx * 16, OHCI1394_CONTEXT_WAKE); } -void ohci1394_stop_it_ctx(struct ti_ohci *ohci, int ctx, int synchronous) +static void ohci1394_stop_it_ctx(struct ti_ohci *ohci, int ctx, int synchronous) { u32 control; int wait; @@ -530,7 +530,7 @@ return frac->integer + (frac->numerator > 0 ? 1 : 0); } -void packet_initialize(struct packet *p, struct packet *next) +static void packet_initialize(struct packet *p, struct packet *next) { /* Here we initialize the dma descriptor block for * transferring one iso packet. We use two descriptors per @@ -559,7 +559,7 @@ p->db->payload_desc.status = 0; } -struct packet_list *packet_list_alloc(struct stream *s) +static struct packet_list *packet_list_alloc(struct stream *s) { int i; struct packet_list *pl; @@ -588,7 +588,7 @@ return pl; } -void packet_list_free(struct packet_list *pl, struct stream *s) +static void packet_list_free(struct packet_list *pl, struct stream *s) { int i; @@ -1010,7 +1010,7 @@ return 0; } -struct stream *stream_alloc(struct amdtp_host *host) +static struct stream *stream_alloc(struct amdtp_host *host) { struct stream *s; unsigned long flags; @@ -1062,7 +1062,7 @@ return s; } -void stream_free(struct stream *s) +static void stream_free(struct stream *s) { unsigned long flags; diff -Nru a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c --- a/drivers/ieee1394/config_roms.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/config_roms.c 2005-03-07 14:54:16 -08:00 @@ -67,8 +67,8 @@ ret = csr1212_associate_keyval(vend_id, text); csr1212_release_keyval(text); ret |= csr1212_attach_keyval_to_directory(root, vend_id); + csr1212_release_keyval(vend_id); if (ret != CSR1212_SUCCESS) { - csr1212_release_keyval(vend_id); csr1212_destroy_csr(host->csr.rom); return -ENOMEM; } diff -Nru a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c --- a/drivers/ieee1394/csr1212.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/csr1212.c 2005-03-07 14:54:17 -08:00 @@ -87,7 +87,8 @@ static inline void free_keyval(struct csr1212_keyval *kv) { - if (kv->key.type == CSR1212_KV_TYPE_LEAF) + if ((kv->key.type == CSR1212_KV_TYPE_LEAF) && + (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM)) CSR1212_FREE(kv->value.leaf.data); CSR1212_FREE(kv); @@ -155,7 +156,7 @@ { struct csr1212_keyval *kv; - for (kv = kv_list; kv != NULL; kv = kv->next) { + for (kv = kv_list->next; kv && (kv != kv_list); kv = kv->next) { if (kv->offset == offset) return kv; } @@ -181,9 +182,9 @@ return NULL; } - /* The keyval key id is not used for the root node, but a valid key id - * that can be used for a directory needs to be passed to - * csr1212_new_directory(). */ + /* The keyval key id is not used for the root node, but a valid key id + * that can be used for a directory needs to be passed to + * csr1212_new_directory(). */ csr->root_kv = csr1212_new_directory(CSR1212_KV_ID_VENDOR); if (!csr->root_kv) { CSR1212_FREE(csr->cache_head); @@ -709,7 +710,7 @@ tail->next = k->value.directory.dentries_head; k->value.directory.dentries_head->prev = tail; tail = k->value.directory.dentries_tail; - } + } } free_keyval(k); k = a; @@ -796,7 +797,8 @@ return CSR1212_ENOMEM; } cache->ext_rom->offset = csr_addr - CSR1212_REGISTER_SPACE_BASE; - cache->ext_rom->value.leaf.len = 0; + cache->ext_rom->value.leaf.len = -1; + cache->ext_rom->value.leaf.data = cache->data; /* Add cache to tail of cache list */ cache->prev = csr->cache_tail; @@ -864,20 +866,20 @@ default: case CSR1212_KV_TYPE_IMMEDIATE: case CSR1212_KV_TYPE_CSR_OFFSET: - continue; + break; case CSR1212_KV_TYPE_LEAF: case CSR1212_KV_TYPE_DIRECTORY: /* Remove from list */ - if (dkv->prev) + if (dkv->prev && (dkv->prev->next == dkv)) dkv->prev->next = dkv->next; - if (dkv->next) + if (dkv->next && (dkv->next->prev == dkv)) dkv->next->prev = dkv->prev; - if (dkv == *layout_tail) - *layout_tail = dkv->prev; + //if (dkv == *layout_tail) + // *layout_tail = dkv->prev; /* Special case: Extended ROM leafs */ if (dkv->key.id == CSR1212_KV_ID_EXTENDED_ROM) { - dkv->value.leaf.len = 0; /* initialize to zero */ + dkv->value.leaf.len = -1; /* Don't add Extended ROM leafs in the layout list, * they are handled differently. */ break; @@ -919,8 +921,8 @@ } struct csr1212_keyval *csr1212_generate_positions(struct csr1212_csr_rom_cache *cache, - struct csr1212_keyval *start_kv, - int start_pos) + struct csr1212_keyval *start_kv, + int start_pos) { struct csr1212_keyval *kv = start_kv; struct csr1212_keyval *okv = start_kv; @@ -930,7 +932,10 @@ cache->layout_head = kv; while(kv && pos < cache->size) { - kv->offset = cache->offset + pos; + /* Special case: Extended ROM leafs */ + if (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM) { + kv->offset = cache->offset + pos; + } switch(kv->key.type) { case CSR1212_KV_TYPE_LEAF: @@ -1090,6 +1095,9 @@ bi->crc_length = bi->length; bi->crc = csr1212_crc16(bi->data, bi->crc_length); + csr->root_kv->next = NULL; + csr->root_kv->prev = NULL; + agg_size = csr1212_generate_layout_order(csr->root_kv); init_offset = csr->bus_info_len; @@ -1158,6 +1166,17 @@ /* Copy the data into the cache buffer */ csr1212_fill_cache(cache); + + if (cache != csr->cache_head) { + /* Set the length and CRC of the extended ROM. */ + struct csr1212_keyval_img *kvi = + (struct csr1212_keyval_img*)cache->data; + + kvi->length = CSR1212_CPU_TO_BE16(bytes_to_quads(cache->len) - 1); + kvi->crc = csr1212_crc16(kvi->data, + bytes_to_quads(cache->len) - 1); + + } } return CSR1212_SUCCESS; @@ -1174,11 +1193,6 @@ &cache->data[bytes_to_quads(offset - cache->offset)], len); return CSR1212_SUCCESS; - } else if (((offset < cache->offset) && - ((offset + len) >= cache->offset)) || - ((offset >= cache->offset) && - ((offset + len) > (cache->offset + cache->size)))) { - return CSR1212_EINVAL; } } return CSR1212_ENOENT; @@ -1227,8 +1241,8 @@ return CSR1212_EINVAL; #if 0 - /* Apparently there are too many differnt wrong implementations of the - * CRC algorithm that verifying them is moot. */ + /* Apparently there are too many differnt wrong implementations of the + * CRC algorithm that verifying them is moot. */ if ((csr1212_crc16(bi->data, bi->crc_length) != bi->crc) && (csr1212_msft_crc16(bi->data, bi->crc_length) != bi->crc)) return CSR1212_EINVAL; @@ -1249,10 +1263,9 @@ return CSR1212_SUCCESS; } -static inline int csr1212_parse_dir_entry(struct csr1212_keyval *dir, - csr1212_quad_t ki, - u_int32_t kv_pos, - struct csr1212_csr_rom_cache *cache) +static int csr1212_parse_dir_entry(struct csr1212_keyval *dir, + csr1212_quad_t ki, + u_int32_t kv_pos) { int ret = CSR1212_SUCCESS; struct csr1212_keyval *k = NULL; @@ -1291,7 +1304,7 @@ goto fail; } - k = csr1212_find_keyval_offset(cache->layout_head, offset); + k = csr1212_find_keyval_offset(dir, offset); if (k) break; /* Found it. */ @@ -1309,11 +1322,10 @@ k->valid = 0; /* Contents not read yet so it's not valid. */ k->offset = offset; - k->prev = cache->layout_tail; - k->next = NULL; - if (cache->layout_tail) - cache->layout_tail->next = k; - cache->layout_tail = k; + k->prev = dir; + k->next = dir->next; + dir->next->prev = k; + dir->next = k; } ret = csr1212_attach_keyval_to_directory(dir, k); @@ -1325,6 +1337,7 @@ return ret; } + int csr1212_parse_keyval(struct csr1212_keyval *kv, struct csr1212_csr_rom_cache *cache) { @@ -1338,8 +1351,8 @@ kvi_len = CSR1212_BE16_TO_CPU(kvi->length); #if 0 - /* Apparently there are too many differnt wrong implementations of the - * CRC algorithm that verifying them is moot. */ + /* Apparently there are too many differnt wrong implementations of the + * CRC algorithm that verifying them is moot. */ if ((csr1212_crc16(kvi->data, kvi_len) != kvi->crc) && (csr1212_msft_crc16(kvi->data, kvi_len) != kvi->crc)) { ret = CSR1212_EINVAL; @@ -1353,22 +1366,19 @@ csr1212_quad_t ki = kvi->data[i]; /* Some devices put null entries in their unit - * directories. If we come across such and entry, + * directories. If we come across such an entry, * then skip it. */ if (ki == 0x0) continue; ret = csr1212_parse_dir_entry(kv, ki, (kv->offset + - quads_to_bytes(i + 1)), - cache); + quads_to_bytes(i + 1))); } kv->value.directory.len = kvi_len; break; case CSR1212_KV_TYPE_LEAF: - if (kv->key.id == CSR1212_KV_ID_EXTENDED_ROM) { - kv->value.leaf.data = cache->data; - } else { + if (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM) { kv->value.leaf.data = CSR1212_MALLOC(quads_to_bytes(kvi_len)); if (!kv->value.leaf.data) { @@ -1399,7 +1409,6 @@ u_int32_t *cache_ptr; u_int16_t kv_len = 0; - if (!csr || !kv) return CSR1212_EINVAL; @@ -1413,7 +1422,7 @@ if (!cache) { csr1212_quad_t q; - struct csr1212_csr_rom_cache *nc; + u_int32_t cache_size; /* Only create a new cache for Extended ROM leaves. */ if (kv->key.id != CSR1212_KV_ID_EXTENDED_ROM) @@ -1425,12 +1434,20 @@ return CSR1212_EIO; } - kv->value.leaf.len = quads_to_bytes(CSR1212_BE32_TO_CPU(q)>>16); + kv->value.leaf.len = CSR1212_BE32_TO_CPU(q) >> 16; + + cache_size = (quads_to_bytes(kv->value.leaf.len + 1) + + (csr->max_rom - 1)) & ~(csr->max_rom - 1); - nc = csr1212_rom_cache_malloc(kv->offset, kv->value.leaf.len); - cache->next = nc; - nc->prev = cache; - csr->cache_tail = nc; + cache = csr1212_rom_cache_malloc(kv->offset, cache_size); + if (!cache) + return CSR1212_ENOMEM; + + kv->value.leaf.data = &cache->data[1]; + csr->cache_tail->next = cache; + cache->prev = csr->cache_tail; + cache->next = NULL; + csr->cache_tail = cache; cache->filled_head = CSR1212_MALLOC(sizeof(struct csr1212_cache_region)); if (!cache->filled_head) { @@ -1443,6 +1460,10 @@ cache->filled_head->next = NULL; cache->filled_head->prev = NULL; cache->data[0] = q; + + /* Don't read the entire extended ROM now. Pieces of it will + * be read when entries inside it are read. */ + return csr1212_parse_keyval(kv, cache); } cache_index = kv->offset - cache->offset; @@ -1548,6 +1569,7 @@ int csr1212_parse_csr(struct csr1212_csr *csr) { static const int mr_map[] = { 4, 64, 1024, 0 }; + struct csr1212_dentry *dentry; int ret; if (!csr || !csr->ops->bus_read) @@ -1570,7 +1592,21 @@ csr->bus_info_len; csr->root_kv->valid = 0; + csr->root_kv->next = csr->root_kv; + csr->root_kv->prev = csr->root_kv; csr1212_get_keyval(csr, csr->root_kv); + + /* Scan through the Root directory finding all extended ROM regions + * and make cache regions for them */ + for (dentry = csr->root_kv->value.directory.dentries_head; + dentry; dentry = dentry->next) { + if (dentry->kv->key.id == CSR1212_KV_ID_EXTENDED_ROM) { + csr1212_get_keyval(csr, dentry->kv); + + if (ret != CSR1212_SUCCESS) + return ret; + } + } return CSR1212_SUCCESS; } diff -Nru a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c --- a/drivers/ieee1394/dma.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/dma.c 2005-03-07 14:54:17 -08:00 @@ -127,16 +127,12 @@ dma->dev = NULL; } - if (dma->sglist) { - vfree(dma->sglist); - dma->sglist = NULL; - } + vfree(dma->sglist); + dma->sglist = NULL; - if (dma->kvirt) { - vfree(dma->kvirt); - dma->kvirt = NULL; - dma->n_pages = 0; - } + vfree(dma->kvirt); + dma->kvirt = NULL; + dma->n_pages = 0; } /* find the scatterlist index and remaining offset corresponding to a diff -Nru a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c --- a/drivers/ieee1394/dv1394.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/dv1394.c 2005-03-07 14:54:17 -08:00 @@ -1277,7 +1277,7 @@ error-prone code in dv1394. */ -int dv1394_mmap(struct file *file, struct vm_area_struct *vma) +static int dv1394_mmap(struct file *file, struct vm_area_struct *vma) { struct video_card *video = file_to_video_card(file); int retval = -EINVAL; @@ -2343,6 +2343,8 @@ dv1394_un_init(video); } while (video != NULL); + class_simple_device_remove(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); devfs_remove("ieee1394/dv/host%d/NTSC", id); devfs_remove("ieee1394/dv/host%d/PAL", id); devfs_remove("ieee1394/dv/host%d", id); @@ -2359,6 +2361,9 @@ ohci = (struct ti_ohci *)host->hostdata; + class_simple_device_add(hpsb_protocol_class, MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), + NULL, "dv1394-%d", id); devfs_mk_dir("ieee1394/dv/host%d", id); devfs_mk_dir("ieee1394/dv/host%d/NTSC", id); devfs_mk_dir("ieee1394/dv/host%d/PAL", id); diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/eth1394.c 2005-03-07 14:54:17 -08:00 @@ -89,7 +89,7 @@ #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) static char version[] __devinitdata = - "$Rev: 1224 $ Ben Collins "; + "$Rev: 1247 $ Ben Collins "; struct fragment_info { struct list_head list; @@ -165,8 +165,7 @@ /* The max_partial_datagrams parameter is the maximum number of fragmented * datagrams per node that eth1394 will keep in memory. Providing an upper * bound allows us to limit the amount of memory that partial datagrams - * consume in the event that some partial datagrams are never completed. This - * should probably change to a sysctl item or the like if possible. + * consume in the event that some partial datagrams are never completed. */ static int max_partial_datagrams = 25; module_param(max_partial_datagrams, int, S_IRUGO | S_IWUSR); @@ -186,7 +185,7 @@ unsigned char * haddr); static int ether1394_mac_addr(struct net_device *dev, void *p); -static inline void purge_partial_datagram(struct list_head *old); +static void purge_partial_datagram(struct list_head *old); static int ether1394_tx(struct sk_buff *skb, struct net_device *dev); static void ether1394_iso(struct hpsb_iso *iso); @@ -289,7 +288,7 @@ return 0; } -static inline void purge_partial_datagram(struct list_head *old) +static void purge_partial_datagram(struct list_head *old) { struct partial_datagram *pd = list_entry(old, struct partial_datagram, list); struct list_head *lh, *n; @@ -449,7 +448,7 @@ if (!node_info) { kfree(node); return -ENOMEM; - } + } spin_lock_init(&node_info->pdg.lock); INIT_LIST_HEAD(&node_info->pdg.list); @@ -1187,7 +1186,7 @@ lh = find_partial_datagram(pdgl, dgl); if (lh == NULL) { - if (pdg->sz == max_partial_datagrams) { + while (pdg->sz >= max_partial_datagrams) { /* remove the oldest */ purge_partial_datagram(pdgl->prev); pdg->sz--; @@ -1583,7 +1582,7 @@ struct sk_buff *skb = ptask->skb; struct net_device *dev = skb->dev; struct eth1394_priv *priv = netdev_priv(dev); - unsigned long flags; + unsigned long flags; /* Statistics */ spin_lock_irqsave(&priv->lock, flags); @@ -1771,7 +1770,7 @@ static void ether1394_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { strcpy (info->driver, driver_name); - strcpy (info->version, "$Rev: 1224 $"); + strcpy (info->version, "$Rev: 1247 $"); /* FIXME XXX provide sane businfo */ strcpy (info->bus_info, "ieee1394"); } diff -Nru a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c --- a/drivers/ieee1394/highlevel.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/ieee1394/highlevel.c 2005-03-07 14:54:18 -08:00 @@ -173,18 +173,6 @@ } -unsigned long hpsb_get_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host) -{ - struct hl_host_info *hi; - - hi = hl_get_hostinfo(hl, host); - if (hi) - return hi->key; - - return 0; -} - - void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key) { struct hl_host_info *hi; @@ -206,26 +194,6 @@ } -struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key) -{ - struct hl_host_info *hi; - struct hpsb_host *host = NULL; - - if (!hl) - return NULL; - - read_lock(&hl->host_info_lock); - list_for_each_entry(hi, &hl->host_info_list, list) { - if (hi->key == key) { - host = hi->host; - break; - } - } - read_unlock(&hl->host_info_lock); - - return host; -} - static int highlevel_for_each_host_reg(struct hpsb_host *host, void *__data) { struct hpsb_highlevel *hl = __data; @@ -416,7 +384,7 @@ } as = (struct hpsb_address_serve *) - kmalloc(sizeof(struct hpsb_address_serve), GFP_KERNEL); + kmalloc(sizeof(struct hpsb_address_serve), GFP_ATOMIC); if (as == NULL) { return 0; } diff -Nru a/drivers/ieee1394/ieee1394.h b/drivers/ieee1394/ieee1394.h --- a/drivers/ieee1394/ieee1394.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394.h 2005-03-07 14:54:16 -08:00 @@ -77,6 +77,30 @@ #define SELFID_PORT_NONE 0x0 +/* 1394a PHY bitmasks */ +#define PHY_00_PHYSICAL_ID 0xFC +#define PHY_00_R 0x02 /* Root */ +#define PHY_00_PS 0x01 /* Power Status*/ +#define PHY_01_RHB 0x80 /* Root Hold-Off */ +#define PHY_01_IBR 0x80 /* Initiate Bus Reset */ +#define PHY_01_GAP_COUNT 0x3F +#define PHY_02_EXTENDED 0xE0 /* 0x7 for 1394a-compliant PHY */ +#define PHY_02_TOTAL_PORTS 0x1F +#define PHY_03_MAX_SPEED 0xE0 +#define PHY_03_DELAY 0x0F +#define PHY_04_LCTRL 0x80 /* Link Active Report Control */ +#define PHY_04_CONTENDER 0x40 +#define PHY_04_JITTER 0x38 +#define PHY_04_PWR_CLASS 0x07 /* Power Class */ +#define PHY_05_WATCHDOG 0x80 +#define PHY_05_ISBR 0x40 /* Initiate Short Bus Reset */ +#define PHY_05_LOOP 0x20 /* Loop Detect */ +#define PHY_05_PWR_FAIL 0x10 /* Cable Power Failure Detect */ +#define PHY_05_TIMEOUT 0x08 /* Arbitration State Machine Timeout */ +#define PHY_05_PORT_EVENT 0x04 /* Port Event Detect */ +#define PHY_05_ENAB_ACCEL 0x02 /* Enable Arbitration Acceleration */ +#define PHY_05_ENAB_MULTI 0x01 /* Ena. Multispeed Packet Concatenation */ + #include #ifdef __BIG_ENDIAN_BITFIELD diff -Nru a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c --- a/drivers/ieee1394/ieee1394_core.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394_core.c 2005-03-07 14:54:16 -08:00 @@ -56,11 +56,18 @@ module_param(disable_nodemgr, int, 0444); MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); +/* Disable Isochronous Resource Manager functionality */ +int hpsb_disable_irm = 0; +module_param_named(disable_irm, hpsb_disable_irm, bool, 0); +MODULE_PARM_DESC(disable_irm, + "Disable Isochronous Resource Manager functionality."); + /* We are GPL, so treat us special */ MODULE_LICENSE("GPL"); /* Some globals used */ const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" }; +struct class_simple *hpsb_protocol_class; #ifdef CONFIG_IEEE1394_VERBOSEDEBUG static void dump_packet(const char *text, quadlet_t *data, int size) @@ -79,6 +86,7 @@ #define dump_packet(x,y,z) #endif +static void abort_requests(struct hpsb_host *host); static void queue_packet_complete(struct hpsb_packet *packet); @@ -512,6 +520,7 @@ if (!packet->no_waiter || packet->expect_response) { atomic_inc(&packet->refcnt); + packet->sendtime = jiffies; skb_queue_tail(&host->pending_packet_queue, packet->skb); } @@ -939,7 +948,7 @@ } -void abort_requests(struct hpsb_host *host) +static void abort_requests(struct hpsb_host *host) { struct hpsb_packet *packet; struct sk_buff *skb; @@ -1002,7 +1011,7 @@ * the stack. */ static int khpsbpkt_pid = -1, khpsbpkt_kill; static DECLARE_COMPLETION(khpsbpkt_complete); -struct sk_buff_head hpsbpkt_queue; +static struct sk_buff_head hpsbpkt_queue; static DECLARE_MUTEX_LOCKED(khpsbpkt_sig); @@ -1030,15 +1039,19 @@ daemonize("khpsbpkt"); - while (!down_interruptible(&khpsbpkt_sig)) { - if (khpsbpkt_kill) + while (1) { + if (down_interruptible(&khpsbpkt_sig)) { + if (current->flags & PF_FREEZE) { + refrigerator(0); + continue; + } + printk("khpsbpkt: received unexpected signal?!\n" ); break; - - if (current->flags & PF_FREEZE) { - refrigerator(0); - continue; } + if (khpsbpkt_kill) + break; + while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) { packet = (struct hpsb_packet *)skb->data; @@ -1054,7 +1067,6 @@ complete_and_exit(&khpsbpkt_complete, 0); } - static int __init ieee1394_init(void) { int i, ret; @@ -1109,18 +1121,33 @@ if (ret < 0) goto release_all_bus; + hpsb_protocol_class = class_simple_create(THIS_MODULE, "ieee1394_protocol"); + if (IS_ERR(hpsb_protocol_class)) { + ret = PTR_ERR(hpsb_protocol_class); + goto release_class_host; + } + ret = init_csr(); if (ret) { HPSB_INFO("init csr failed"); ret = -ENOMEM; - goto release_class; + goto release_class_protocol; } if (disable_nodemgr) { - HPSB_INFO("nodemgr functionality disabled"); + HPSB_INFO("nodemgr and IRM functionality disabled"); + /* We shouldn't contend for IRM with nodemgr disabled, since + nodemgr implements functionality required of ieee1394a-2000 + IRMs */ + hpsb_disable_irm = 1; + return 0; } + if (hpsb_disable_irm) { + HPSB_INFO("IRM functionality disabled"); + } + ret = init_ieee1394_nodemgr(); if (ret < 0) { HPSB_INFO("init nodemgr failed"); @@ -1131,7 +1158,9 @@ cleanup_csr: cleanup_csr(); -release_class: +release_class_protocol: + class_simple_destroy(hpsb_protocol_class); +release_class_host: class_unregister(&hpsb_host_class); release_all_bus: for (i = 0; fw_bus_attrs[i]; i++) @@ -1160,6 +1189,7 @@ cleanup_csr(); + class_simple_destroy(hpsb_protocol_class); class_unregister(&hpsb_host_class); for (i = 0; fw_bus_attrs[i]; i++) bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); @@ -1191,6 +1221,7 @@ /** ieee1394_core.c **/ EXPORT_SYMBOL(hpsb_speedto_str); +EXPORT_SYMBOL(hpsb_protocol_class); EXPORT_SYMBOL(hpsb_set_packet_complete_task); EXPORT_SYMBOL(hpsb_alloc_packet); EXPORT_SYMBOL(hpsb_free_packet); @@ -1203,6 +1234,7 @@ EXPORT_SYMBOL(hpsb_selfid_complete); EXPORT_SYMBOL(hpsb_packet_sent); EXPORT_SYMBOL(hpsb_packet_received); +EXPORT_SYMBOL_GPL(hpsb_disable_irm); /** ieee1394_transactions.c **/ EXPORT_SYMBOL(hpsb_get_tlabel); @@ -1217,8 +1249,6 @@ EXPORT_SYMBOL(hpsb_read); EXPORT_SYMBOL(hpsb_write); EXPORT_SYMBOL(hpsb_lock); -EXPORT_SYMBOL(hpsb_lock64); -EXPORT_SYMBOL(hpsb_send_gasp); EXPORT_SYMBOL(hpsb_packet_success); /** highlevel.c **/ @@ -1230,28 +1260,18 @@ EXPORT_SYMBOL(hpsb_listen_channel); EXPORT_SYMBOL(hpsb_unlisten_channel); EXPORT_SYMBOL(hpsb_get_hostinfo); -EXPORT_SYMBOL(hpsb_get_host_bykey); EXPORT_SYMBOL(hpsb_create_hostinfo); EXPORT_SYMBOL(hpsb_destroy_hostinfo); EXPORT_SYMBOL(hpsb_set_hostinfo_key); -EXPORT_SYMBOL(hpsb_get_hostinfo_key); EXPORT_SYMBOL(hpsb_get_hostinfo_bykey); EXPORT_SYMBOL(hpsb_set_hostinfo); -EXPORT_SYMBOL(highlevel_read); -EXPORT_SYMBOL(highlevel_write); -EXPORT_SYMBOL(highlevel_lock); -EXPORT_SYMBOL(highlevel_lock64); EXPORT_SYMBOL(highlevel_add_host); EXPORT_SYMBOL(highlevel_remove_host); EXPORT_SYMBOL(highlevel_host_reset); /** nodemgr.c **/ -EXPORT_SYMBOL(hpsb_guid_get_entry); -EXPORT_SYMBOL(hpsb_nodeid_get_entry); EXPORT_SYMBOL(hpsb_node_fill_packet); -EXPORT_SYMBOL(hpsb_node_read); EXPORT_SYMBOL(hpsb_node_write); -EXPORT_SYMBOL(hpsb_node_lock); EXPORT_SYMBOL(hpsb_register_protocol); EXPORT_SYMBOL(hpsb_unregister_protocol); EXPORT_SYMBOL(ieee1394_bus_type); @@ -1295,27 +1315,14 @@ EXPORT_SYMBOL(csr1212_create_csr); EXPORT_SYMBOL(csr1212_init_local_csr); EXPORT_SYMBOL(csr1212_new_immediate); -EXPORT_SYMBOL(csr1212_new_leaf); -EXPORT_SYMBOL(csr1212_new_csr_offset); EXPORT_SYMBOL(csr1212_new_directory); EXPORT_SYMBOL(csr1212_associate_keyval); EXPORT_SYMBOL(csr1212_attach_keyval_to_directory); -EXPORT_SYMBOL(csr1212_new_extended_immediate); -EXPORT_SYMBOL(csr1212_new_extended_leaf); -EXPORT_SYMBOL(csr1212_new_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_textual_descriptor_leaf); EXPORT_SYMBOL(csr1212_new_string_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_icon_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_modifiable_descriptor_leaf); -EXPORT_SYMBOL(csr1212_new_keyword_leaf); EXPORT_SYMBOL(csr1212_detach_keyval_from_directory); -EXPORT_SYMBOL(csr1212_disassociate_keyval); EXPORT_SYMBOL(csr1212_release_keyval); EXPORT_SYMBOL(csr1212_destroy_csr); EXPORT_SYMBOL(csr1212_read); -EXPORT_SYMBOL(csr1212_generate_positions); -EXPORT_SYMBOL(csr1212_generate_layout_order); -EXPORT_SYMBOL(csr1212_fill_cache); EXPORT_SYMBOL(csr1212_generate_csr_image); EXPORT_SYMBOL(csr1212_parse_keyval); EXPORT_SYMBOL(csr1212_parse_csr); diff -Nru a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h --- a/drivers/ieee1394/ieee1394_core.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394_core.h 2005-03-07 14:54:16 -08:00 @@ -89,7 +89,6 @@ } void abort_timedouts(unsigned long __opaque); -void abort_requests(struct hpsb_host *host); struct hpsb_packet *hpsb_alloc_packet(size_t data_size); void hpsb_free_packet(struct hpsb_packet *packet); @@ -219,9 +218,11 @@ return file->f_dentry->d_inode->i_cindex; } +extern int hpsb_disable_irm; /* Our sysfs bus entry */ extern struct bus_type ieee1394_bus_type; extern struct class hpsb_host_class; +extern struct class_simple *hpsb_protocol_class; #endif /* _IEEE1394_CORE_H */ diff -Nru a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c --- a/drivers/ieee1394/ieee1394_transactions.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/ieee1394_transactions.c 2005-03-07 14:54:16 -08:00 @@ -566,34 +566,6 @@ return retval; } -int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation, - u64 addr, int extcode, octlet_t *data, octlet_t arg) -{ - struct hpsb_packet *packet; - int retval = 0; - - BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet - - packet = hpsb_make_lock64packet(host, node, addr, extcode, data, arg); - if (!packet) - return -ENOMEM; - - packet->generation = generation; - retval = hpsb_send_packet_and_wait(packet); - if (retval < 0) - goto hpsb_lock64_fail; - - retval = hpsb_packet_success(packet); - - if (retval == 0) - *data = (u64)packet->data[1] << 32 | packet->data[0]; - -hpsb_lock64_fail: - hpsb_free_tlabel(packet); - hpsb_free_packet(packet); - - return retval; -} int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation, quadlet_t *buffer, size_t length, u32 specifier_id, diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c --- a/drivers/ieee1394/nodemgr.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/nodemgr.c 2005-03-07 14:54:17 -08:00 @@ -23,6 +23,7 @@ #include "ieee1394_types.h" #include "ieee1394.h" +#include "ieee1394_core.h" #include "hosts.h" #include "ieee1394_transactions.h" #include "highlevel.h" @@ -146,7 +147,7 @@ put_device(&container_of((class_dev), struct node_entry, class_dev)->device); } -struct class nodemgr_ne_class = { +static struct class nodemgr_ne_class = { .name = "ieee1394_node", .release = ne_cls_release, }; @@ -158,7 +159,7 @@ /* The name here is only so that unit directory hotplug works with old * style hotplug, which only ever did unit directories anyway. */ -struct class nodemgr_ud_class = { +static struct class nodemgr_ud_class = { .name = "ieee1394", .release = ud_cls_release, .hotplug = nodemgr_hotplug, @@ -831,6 +832,31 @@ } +static void nodemgr_register_device(struct node_entry *ne, + struct unit_directory *ud, struct device *parent) +{ + memcpy(&ud->device, &nodemgr_dev_template_ud, + sizeof(ud->device)); + + ud->device.parent = parent; + + snprintf(ud->device.bus_id, BUS_ID_SIZE, "%s-%u", + ne->device.bus_id, ud->id); + + ud->class_dev.dev = &ud->device; + ud->class_dev.class = &nodemgr_ud_class; + snprintf(ud->class_dev.class_id, BUS_ID_SIZE, "%s-%u", + ne->device.bus_id, ud->id); + + device_register(&ud->device); + class_device_register(&ud->class_dev); + get_device(&ud->device); + + if (ud->vendor_oui) + device_create_file(&ud->device, &dev_attr_ud_vendor_oui); + nodemgr_create_ud_dev_files(ud); +} + /* This implementation currently only scans the config rom and its * immediate unit directories looking for software_id and @@ -840,7 +866,7 @@ unsigned int *id, struct unit_directory *parent) { struct unit_directory *ud; - struct unit_directory *ud_temp = NULL; + struct unit_directory *ud_child = NULL; struct csr1212_dentry *dentry; struct csr1212_keyval *kv; u8 last_key_id = 0; @@ -907,42 +933,61 @@ break; case CSR1212_KV_ID_DEPENDENT_INFO: - if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) { + /* Logical Unit Number */ + if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { + if (ud->flags & UNIT_DIRECTORY_HAS_LUN) { + ud_child = kmalloc(sizeof(struct unit_directory), GFP_KERNEL); + if (!ud_child) + goto unit_directory_error; + memcpy(ud_child, ud, sizeof(struct unit_directory)); + nodemgr_register_device(ne, ud_child, &ne->device); + ud_child = NULL; + + ud->id = (*id)++; + } + ud->lun = kv->value.immediate; + ud->flags |= UNIT_DIRECTORY_HAS_LUN; + + /* Logical Unit Directory */ + } else if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) { /* This should really be done in SBP2 as this is - * doing SBP2 specific parsing. */ + * doing SBP2 specific parsing. + */ + + /* first register the parent unit */ ud->flags |= UNIT_DIRECTORY_HAS_LUN_DIRECTORY; - ud_temp = nodemgr_process_unit_directory(hi, ne, kv, id, - parent); + if (ud->device.bus != &ieee1394_bus_type) + nodemgr_register_device(ne, ud, &ne->device); + + /* process the child unit */ + ud_child = nodemgr_process_unit_directory(hi, ne, kv, id, ud); - if (ud_temp == NULL) + if (ud_child == NULL) break; - - /* inherit unspecified values */ - if ((ud->flags & UNIT_DIRECTORY_VENDOR_ID) && - !(ud_temp->flags & UNIT_DIRECTORY_VENDOR_ID)) - { - ud_temp->flags |= UNIT_DIRECTORY_VENDOR_ID; - ud_temp->vendor_id = ud->vendor_id; - ud_temp->vendor_oui = ud->vendor_oui; - } + + /* inherit unspecified values so hotplug picks it up */ if ((ud->flags & UNIT_DIRECTORY_MODEL_ID) && - !(ud_temp->flags & UNIT_DIRECTORY_MODEL_ID)) + !(ud_child->flags & UNIT_DIRECTORY_MODEL_ID)) { - ud_temp->flags |= UNIT_DIRECTORY_MODEL_ID; - ud_temp->model_id = ud->model_id; + ud_child->flags |= UNIT_DIRECTORY_MODEL_ID; + ud_child->model_id = ud->model_id; } if ((ud->flags & UNIT_DIRECTORY_SPECIFIER_ID) && - !(ud_temp->flags & UNIT_DIRECTORY_SPECIFIER_ID)) + !(ud_child->flags & UNIT_DIRECTORY_SPECIFIER_ID)) { - ud_temp->flags |= UNIT_DIRECTORY_SPECIFIER_ID; - ud_temp->specifier_id = ud->specifier_id; + ud_child->flags |= UNIT_DIRECTORY_SPECIFIER_ID; + ud_child->specifier_id = ud->specifier_id; } if ((ud->flags & UNIT_DIRECTORY_VERSION) && - !(ud_temp->flags & UNIT_DIRECTORY_VERSION)) + !(ud_child->flags & UNIT_DIRECTORY_VERSION)) { - ud_temp->flags |= UNIT_DIRECTORY_VERSION; - ud_temp->version = ud->version; + ud_child->flags |= UNIT_DIRECTORY_VERSION; + ud_child->version = ud->version; } + + /* register the child unit */ + ud_child->flags |= UNIT_DIRECTORY_LUN_DIRECTORY; + nodemgr_register_device(ne, ud_child, &ud->device); } break; @@ -952,31 +997,10 @@ } last_key_id = kv->key.id; } - - memcpy(&ud->device, &nodemgr_dev_template_ud, - sizeof(ud->device)); - - if (parent) { - ud->flags |= UNIT_DIRECTORY_LUN_DIRECTORY; - ud->device.parent = &parent->device; - } else - ud->device.parent = &ne->device; - - snprintf(ud->device.bus_id, BUS_ID_SIZE, "%s-%u", - ne->device.bus_id, ud->id); - - ud->class_dev.dev = &ud->device; - ud->class_dev.class = &nodemgr_ud_class; - snprintf(ud->class_dev.class_id, BUS_ID_SIZE, "%s-%u", - ne->device.bus_id, ud->id); - - device_register(&ud->device); - class_device_register(&ud->class_dev); - get_device(&ud->device); - - if (ud->vendor_oui) - device_create_file(&ud->device, &dev_attr_ud_vendor_oui); - nodemgr_create_ud_dev_files(ud); + + /* do not process child units here and only if not already registered */ + if (!parent && ud->device.bus != &ieee1394_bus_type) + nodemgr_register_device(ne, ud, &ne->device); return ud; @@ -1141,6 +1165,13 @@ /* Mark the node as new, so it gets re-probed */ ne->needs_probe = 1; + } else { + /* old cache is valid, so update its generation */ + struct nodemgr_csr_info *ci = ne->csr->private; + ci->generation = generation; + /* free the partially filled now unneeded new cache */ + kfree(csr->private); + csr1212_destroy_csr(csr); } if (ne->in_limbo) @@ -1431,7 +1462,7 @@ quadlet_t bc; int status; - if (host->is_irm) + if (hpsb_disable_irm || host->is_irm) return 1; status = hpsb_read(host, LOCAL_BUS | (host->irm_id), @@ -1553,29 +1584,6 @@ complete_and_exit(&hi->exited, 0); } -struct node_entry *hpsb_guid_get_entry(u64 guid) -{ - struct node_entry *ne; - - down(&nodemgr_serialize); - ne = find_entry_by_guid(guid); - up(&nodemgr_serialize); - - return ne; -} - -struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid) -{ - struct node_entry *ne; - - down(&nodemgr_serialize); - ne = find_entry_by_nodeid(host, nodeid); - up(&nodemgr_serialize); - - return ne; -} - - int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *)) { struct class *class = &hpsb_host_class; @@ -1618,16 +1626,6 @@ pkt->node_id = ne->nodeid; } -int hpsb_node_read(struct node_entry *ne, u64 addr, - quadlet_t *buffer, size_t length) -{ - unsigned int generation = ne->generation; - - barrier(); - return hpsb_read(ne->host, ne->nodeid, generation, - addr, buffer, length); -} - int hpsb_node_write(struct node_entry *ne, u64 addr, quadlet_t *buffer, size_t length) { @@ -1636,16 +1634,6 @@ barrier(); return hpsb_write(ne->host, ne->nodeid, generation, addr, buffer, length); -} - -int hpsb_node_lock(struct node_entry *ne, u64 addr, - int extcode, quadlet_t *data, quadlet_t arg) -{ - unsigned int generation = ne->generation; - - barrier(); - return hpsb_lock(ne->host, ne->nodeid, generation, - addr, extcode, data, arg); } static void nodemgr_add_host(struct hpsb_host *host) diff -Nru a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h --- a/drivers/ieee1394/nodemgr.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/ieee1394/nodemgr.h 2005-03-07 14:54:17 -08:00 @@ -51,6 +51,7 @@ #define UNIT_DIRECTORY_VERSION 0x08 #define UNIT_DIRECTORY_HAS_LUN_DIRECTORY 0x10 #define UNIT_DIRECTORY_LUN_DIRECTORY 0x20 +#define UNIT_DIRECTORY_HAS_LUN 0x40 /* * A unit directory corresponds to a protocol supported by the @@ -82,6 +83,7 @@ struct class_device class_dev; struct csr1212_keyval *ud_kv; + u32 lun; /* logical unit number immediate value */ }; struct node_entry { diff -Nru a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c --- a/drivers/ieee1394/ohci1394.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/ieee1394/ohci1394.c 2005-03-07 14:54:18 -08:00 @@ -162,7 +162,7 @@ printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) static char version[] __devinitdata = - "$Rev: 1223 $ Ben Collins "; + "$Rev: 1250 $ Ben Collins "; /* Module Parameters */ static int phys_dma = 1; @@ -482,7 +482,9 @@ /* Put some defaults to these undefined bus options */ buf = reg_read(ohci, OHCI1394_BusOptions); - buf |= 0xE0000000; /* Enable IRMC, CMC and ISC */ + buf |= 0x60000000; /* Enable CMC and ISC */ + if (!hpsb_disable_irm) + buf |= 0x80000000; /* Enable IRMC */ buf &= ~0x00ff0000; /* XXX: Set cyc_clk_acc to zero for now */ buf &= ~0x18000000; /* Disable PMC and BMC */ reg_write(ohci, OHCI1394_BusOptions, buf); @@ -497,10 +499,12 @@ reg_write(ohci, OHCI1394_LinkControlClear, 0xffffffff); /* Enable cycle timer and cycle master and set the IRM - * contender bit in our self ID packets. */ - reg_write(ohci, OHCI1394_LinkControlSet, OHCI1394_LinkControl_CycleTimerEnable | + * contender bit in our self ID packets if appropriate. */ + reg_write(ohci, OHCI1394_LinkControlSet, + OHCI1394_LinkControl_CycleTimerEnable | OHCI1394_LinkControl_CycleMaster); - set_phy_reg_mask(ohci, 4, 0xc0); + set_phy_reg_mask(ohci, 4, PHY_04_LCTRL | + (hpsb_disable_irm ? 0 : PHY_04_CONTENDER)); /* Set up self-id dma buffer */ reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->selfid_buf_bus); @@ -515,12 +519,6 @@ /* Now get our max packet size */ ohci->max_packet_size = 1<<(((reg_read(ohci, OHCI1394_BusOptions)>>12)&0xf)+1); - - if (ohci->max_packet_size < 512) { - HPSB_ERR("warning: Invalid max packet size of %d, setting to 512", - ohci->max_packet_size); - ohci->max_packet_size = 512; - } /* Don't accept phy packets into AR request context */ reg_write(ohci, OHCI1394_LinkControlClear, 0x00000400); @@ -2545,6 +2543,10 @@ idx = (idx + d->num_desc - 1 ) % d->num_desc; d->prg_cpu[idx]->branchAddress |= le32_to_cpu(0x00000001); + /* To avoid a race, ensure 1394 interface hardware sees the inserted + * context program descriptors before it sees the wakeup bit set. */ + wmb(); + /* wake up the dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { PRINT(KERN_INFO, diff -Nru a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c --- a/drivers/ieee1394/pcilynx.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/pcilynx.c 2005-03-07 14:54:16 -08:00 @@ -384,7 +384,8 @@ lsid = 0x80400000 | ((phyreg[0] & 0xfc) << 22); lsid |= (phyreg[1] & 0x3f) << 16; /* gap count */ lsid |= (phyreg[2] & 0xc0) << 8; /* max speed */ - lsid |= (phyreg[6] & 0x01) << 11; /* contender (phy dependent) */ + if (!hpsb_disable_irm) + lsid |= (phyreg[6] & 0x01) << 11; /* contender (phy dependent) */ /* lsid |= 1 << 11; *//* set contender (hack) */ lsid |= (phyreg[6] & 0x10) >> 3; /* initiated reset */ @@ -500,7 +501,7 @@ pcl.async_error_next = PCL_NEXT_INVALID; pcl.pcl_status = 0; pcl.buffer[0].control = packet->speed_code << 14 | packet->header_size; -#ifdef __BIG_ENDIAN +#ifndef __BIG_ENDIAN pcl.buffer[0].control |= PCL_BIGENDIAN; #endif pcl.buffer[0].pointer = d->header_dma; @@ -1521,10 +1522,6 @@ int i; int error; - /* needed for i2c communication with serial eeprom */ - struct i2c_adapter i2c_adapter; - struct i2c_algo_bit_data i2c_adapter_data; - error = -ENXIO; if (pci_set_dma_mask(dev, 0xffffffff)) @@ -1697,7 +1694,7 @@ pcl.async_error_next = PCL_NEXT_INVALID; pcl.buffer[0].control = PCL_CMD_RCV | 16; -#ifdef __BIG_ENDIAN +#ifndef __BIG_ENDIAN pcl.buffer[0].control |= PCL_BIGENDIAN; #endif pcl.buffer[1].control = PCL_LAST_BUFF | 4080; @@ -1779,26 +1776,40 @@ | LINK_CONTROL_TX_ASYNC_EN | LINK_CONTROL_RX_ASYNC_EN | LINK_CONTROL_RESET_TX | LINK_CONTROL_RESET_RX); - if (!lynx->phyic.reg_1394a) { - /* attempt to enable contender bit -FIXME- would this work - * elsewhere? */ - reg_set_bits(lynx, GPIO_CTRL_A, 0x1); - reg_write(lynx, GPIO_DATA_BASE + 0x3c, 0x1); - } else { - /* set the contender and LCtrl bit in the extended PHY register - * set. (Should check that bis 0,1,2 (=0xE0) is set - * in register 2?) - */ - i = get_phy_reg(lynx, 4); - if (i != -1) set_phy_reg(lynx, 4, i | 0xc0); - } - - + if (!lynx->phyic.reg_1394a) { + if (!hpsb_disable_irm) { + /* attempt to enable contender bit -FIXME- would this + * work elsewhere? */ + reg_set_bits(lynx, GPIO_CTRL_A, 0x1); + reg_write(lynx, GPIO_DATA_BASE + 0x3c, 0x1); + } + } else { + /* set the contender (if appropriate) and LCtrl bit in the + * extended PHY register set. (Should check that PHY_02_EXTENDED + * is set in register 2?) + */ + i = get_phy_reg(lynx, 4); + i |= PHY_04_LCTRL; + if (hpsb_disable_irm) + i &= !PHY_04_CONTENDER; + else + i |= PHY_04_CONTENDER; + if (i != -1) set_phy_reg(lynx, 4, i); + } + if (!skip_eeprom) { - i2c_adapter = bit_ops; + /* needed for i2c communication with serial eeprom */ + struct i2c_adapter *i2c_ad; + struct i2c_algo_bit_data i2c_adapter_data; + + error = -ENOMEM; + i2c_ad = kmalloc(sizeof(struct i2c_adapter), SLAB_KERNEL); + if (!i2c_ad) FAIL("failed to allocate I2C adapter memory"); + + memcpy(i2c_ad, &bit_ops, sizeof(struct i2c_adapter)); i2c_adapter_data = bit_data; - i2c_adapter.algo_data = &i2c_adapter_data; + i2c_ad->algo_data = &i2c_adapter_data; i2c_adapter_data.data = lynx; PRINTD(KERN_DEBUG, lynx->id,"original eeprom control: %d", @@ -1808,8 +1819,9 @@ lynx->i2c_driven_state = 0x00000070; reg_write(lynx, SERIAL_EEPROM_CONTROL, lynx->i2c_driven_state); - if (i2c_bit_add_bus(&i2c_adapter) < 0) + if (i2c_bit_add_bus(i2c_ad) < 0) { + kfree(i2c_ad); error = -ENXIO; FAIL("unable to register i2c"); } @@ -1825,13 +1837,13 @@ #ifdef CONFIG_IEEE1394_VERBOSEDEBUG union i2c_smbus_data data; - if (i2c_smbus_xfer(&i2c_adapter, 80, 0, I2C_SMBUS_WRITE, 0, I2C_SMBUS_BYTE,NULL)) + if (i2c_smbus_xfer(i2c_ad, 80, 0, I2C_SMBUS_WRITE, 0, I2C_SMBUS_BYTE,NULL)) PRINT(KERN_ERR, lynx->id,"eeprom read start has failed"); else { u16 addr; for (addr=0x00; addr < 0x100; addr++) { - if (i2c_smbus_xfer(&i2c_adapter, 80, 0, I2C_SMBUS_READ, 0, I2C_SMBUS_BYTE,& data)) { + if (i2c_smbus_xfer(i2c_ad, 80, 0, I2C_SMBUS_READ, 0, I2C_SMBUS_BYTE,& data)) { PRINT(KERN_ERR, lynx->id, "unable to read i2c %x", addr); break; } @@ -1843,7 +1855,7 @@ /* we use i2c_transfer, because i2c_smbus_read_block_data does not work properly and we do it more efficiently in one transaction rather then using several reads */ - if (i2c_transfer(&i2c_adapter, msg, 2) < 0) { + if (i2c_transfer(i2c_ad, msg, 2) < 0) { PRINT(KERN_ERR, lynx->id, "unable to read bus info block from i2c"); } else { int i; @@ -1863,13 +1875,15 @@ { PRINT(KERN_DEBUG, lynx->id, "read a valid bus info block from"); } else { + kfree(i2c_ad); error = -ENXIO; FAIL("read something from serial eeprom, but it does not seem to be a valid bus info block"); } } - i2c_bit_del_bus(&i2c_adapter); + i2c_bit_del_bus(i2c_ad); + kfree(i2c_ad); } } diff -Nru a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c --- a/drivers/ieee1394/raw1394.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/raw1394.c 2005-03-07 14:54:16 -08:00 @@ -75,58 +75,60 @@ static atomic_t internal_generation = ATOMIC_INIT(0); static atomic_t iso_buffer_size; -static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */ +static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */ static struct hpsb_highlevel raw1394_highlevel; -static int arm_read (struct hpsb_host *host, int nodeid, quadlet_t *buffer, - u64 addr, size_t length, u16 flags); -static int arm_write (struct hpsb_host *host, int nodeid, int destid, - quadlet_t *data, u64 addr, size_t length, u16 flags); -static int arm_lock (struct hpsb_host *host, int nodeid, quadlet_t *store, - u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, u16 flags); -static int arm_lock64 (struct hpsb_host *host, int nodeid, octlet_t *store, - u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u16 flags); +static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, + u64 addr, size_t length, u16 flags); +static int arm_write(struct hpsb_host *host, int nodeid, int destid, + quadlet_t * data, u64 addr, size_t length, u16 flags); +static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, + u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, + u16 flags); +static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, + u64 addr, octlet_t data, octlet_t arg, int ext_tcode, + u16 flags); static struct hpsb_address_ops arm_ops = { - .read = arm_read, - .write = arm_write, - .lock = arm_lock, - .lock64 = arm_lock64, + .read = arm_read, + .write = arm_write, + .lock = arm_lock, + .lock64 = arm_lock64, }; static void queue_complete_cb(struct pending_request *req); static struct pending_request *__alloc_pending_request(int flags) { - struct pending_request *req; + struct pending_request *req; - req = (struct pending_request *)kmalloc(sizeof(struct pending_request), - flags); - if (req != NULL) { - memset(req, 0, sizeof(struct pending_request)); - INIT_LIST_HEAD(&req->list); - } + req = (struct pending_request *)kmalloc(sizeof(struct pending_request), + flags); + if (req != NULL) { + memset(req, 0, sizeof(struct pending_request)); + INIT_LIST_HEAD(&req->list); + } - return req; + return req; } static inline struct pending_request *alloc_pending_request(void) { - return __alloc_pending_request(SLAB_KERNEL); + return __alloc_pending_request(SLAB_KERNEL); } static void free_pending_request(struct pending_request *req) { - if (req->ibs) { - if (atomic_dec_and_test(&req->ibs->refcount)) { - atomic_sub(req->ibs->data_size, &iso_buffer_size); - kfree(req->ibs); - } - } else if (req->free_data) { - kfree(req->data); - } - hpsb_free_packet(req->packet); - kfree(req); + if (req->ibs) { + if (atomic_dec_and_test(&req->ibs->refcount)) { + atomic_sub(req->ibs->data_size, &iso_buffer_size); + kfree(req->ibs); + } + } else if (req->free_data) { + kfree(req->data); + } + hpsb_free_packet(req->packet); + kfree(req); } /* fi->reqlists_lock must be taken */ @@ -134,494 +136,505 @@ { struct file_info *fi = req->file_info; list_del(&req->list); - list_add_tail(&req->list, &fi->req_complete); + list_add_tail(&req->list, &fi->req_complete); up(&fi->complete_sem); - wake_up_interruptible(&fi->poll_wait_complete); + wake_up_interruptible(&fi->poll_wait_complete); } static void queue_complete_req(struct pending_request *req) { - unsigned long flags; - struct file_info *fi = req->file_info; + unsigned long flags; + struct file_info *fi = req->file_info; - spin_lock_irqsave(&fi->reqlists_lock, flags); + spin_lock_irqsave(&fi->reqlists_lock, flags); __queue_complete_req(req); - spin_unlock_irqrestore(&fi->reqlists_lock, flags); + spin_unlock_irqrestore(&fi->reqlists_lock, flags); } static void queue_complete_cb(struct pending_request *req) { - struct hpsb_packet *packet = req->packet; - int rcode = (packet->header[1] >> 12) & 0xf; + struct hpsb_packet *packet = req->packet; + int rcode = (packet->header[1] >> 12) & 0xf; - switch (packet->ack_code) { - case ACKX_NONE: - case ACKX_SEND_ERROR: - req->req.error = RAW1394_ERROR_SEND_ERROR; - break; - case ACKX_ABORTED: - req->req.error = RAW1394_ERROR_ABORTED; - break; - case ACKX_TIMEOUT: - req->req.error = RAW1394_ERROR_TIMEOUT; - break; - default: - req->req.error = (packet->ack_code << 16) | rcode; - break; - } - - if (!((packet->ack_code == ACK_PENDING) && (rcode == RCODE_COMPLETE))) { - req->req.length = 0; - } + switch (packet->ack_code) { + case ACKX_NONE: + case ACKX_SEND_ERROR: + req->req.error = RAW1394_ERROR_SEND_ERROR; + break; + case ACKX_ABORTED: + req->req.error = RAW1394_ERROR_ABORTED; + break; + case ACKX_TIMEOUT: + req->req.error = RAW1394_ERROR_TIMEOUT; + break; + default: + req->req.error = (packet->ack_code << 16) | rcode; + break; + } + + if (!((packet->ack_code == ACK_PENDING) && (rcode == RCODE_COMPLETE))) { + req->req.length = 0; + } - if ((req->req.type == RAW1394_REQ_ASYNC_READ) || + if ((req->req.type == RAW1394_REQ_ASYNC_READ) || (req->req.type == RAW1394_REQ_ASYNC_WRITE) || (req->req.type == RAW1394_REQ_ASYNC_STREAM) || (req->req.type == RAW1394_REQ_LOCK) || (req->req.type == RAW1394_REQ_LOCK64)) - hpsb_free_tlabel(packet); + hpsb_free_tlabel(packet); - queue_complete_req(req); + queue_complete_req(req); } - static void add_host(struct hpsb_host *host) { - struct host_info *hi; - unsigned long flags; + struct host_info *hi; + unsigned long flags; - hi = (struct host_info *)kmalloc(sizeof(struct host_info), GFP_KERNEL); + hi = (struct host_info *)kmalloc(sizeof(struct host_info), GFP_KERNEL); - if (hi != NULL) { - INIT_LIST_HEAD(&hi->list); - hi->host = host; - INIT_LIST_HEAD(&hi->file_info_list); - - spin_lock_irqsave(&host_info_lock, flags); - list_add_tail(&hi->list, &host_info_list); - host_count++; - spin_unlock_irqrestore(&host_info_lock, flags); - } + if (hi != NULL) { + INIT_LIST_HEAD(&hi->list); + hi->host = host; + INIT_LIST_HEAD(&hi->file_info_list); + + spin_lock_irqsave(&host_info_lock, flags); + list_add_tail(&hi->list, &host_info_list); + host_count++; + spin_unlock_irqrestore(&host_info_lock, flags); + } - atomic_inc(&internal_generation); + atomic_inc(&internal_generation); } - static struct host_info *find_host_info(struct hpsb_host *host) { - struct host_info *hi; + struct host_info *hi; - list_for_each_entry(hi, &host_info_list, list) - if (hi->host == host) - return hi; + list_for_each_entry(hi, &host_info_list, list) + if (hi->host == host) + return hi; - return NULL; + return NULL; } static void remove_host(struct hpsb_host *host) { - struct host_info *hi; - unsigned long flags; + struct host_info *hi; + unsigned long flags; + + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); + if (hi != NULL) { + list_del(&hi->list); + host_count--; + /* + FIXME: address ranges should be removed + and fileinfo states should be initialized + (including setting generation to + internal-generation ...) + */ + } + spin_unlock_irqrestore(&host_info_lock, flags); - if (hi != NULL) { - list_del(&hi->list); - host_count--; - /* - FIXME: address ranges should be removed - and fileinfo states should be initialized - (including setting generation to - internal-generation ...) - */ - } - spin_unlock_irqrestore(&host_info_lock, flags); - - if (hi == NULL) { - printk(KERN_ERR "raw1394: attempt to remove unknown host " - "0x%p\n", host); - return; - } + if (hi == NULL) { + printk(KERN_ERR "raw1394: attempt to remove unknown host " + "0x%p\n", host); + return; + } - kfree(hi); + kfree(hi); - atomic_inc(&internal_generation); + atomic_inc(&internal_generation); } static void host_reset(struct hpsb_host *host) { - unsigned long flags; - struct host_info *hi; - struct file_info *fi; - struct pending_request *req; - - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); - - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - if (fi->notification == RAW1394_NOTIFY_ON) { - req = __alloc_pending_request(SLAB_ATOMIC); - - if (req != NULL) { - req->file_info = fi; - req->req.type = RAW1394_REQ_BUS_RESET; - req->req.generation = get_hpsb_generation(host); - req->req.misc = (host->node_id << 16) - | host->node_count; - if (fi->protocol_version > 3) { - req->req.misc |= (NODEID_TO_NODE(host->irm_id) - << 8); - } - - queue_complete_req(req); - } - } - } - } - spin_unlock_irqrestore(&host_info_lock, flags); -} - -static void iso_receive(struct hpsb_host *host, int channel, quadlet_t *data, - size_t length) -{ - unsigned long flags; - struct host_info *hi; - struct file_info *fi; - struct pending_request *req, *req_next; - struct iso_block_store *ibs = NULL; - LIST_HEAD(reqs); - - if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { - HPSB_INFO("dropped iso packet"); - return; - } + unsigned long flags; + struct host_info *hi; + struct file_info *fi; + struct pending_request *req; + + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); + + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + if (fi->notification == RAW1394_NOTIFY_ON) { + req = __alloc_pending_request(SLAB_ATOMIC); + + if (req != NULL) { + req->file_info = fi; + req->req.type = RAW1394_REQ_BUS_RESET; + req->req.generation = + get_hpsb_generation(host); + req->req.misc = (host->node_id << 16) + | host->node_count; + if (fi->protocol_version > 3) { + req->req.misc |= + (NODEID_TO_NODE + (host->irm_id) + << 8); + } + + queue_complete_req(req); + } + } + } + } + spin_unlock_irqrestore(&host_info_lock, flags); +} + +static void iso_receive(struct hpsb_host *host, int channel, quadlet_t * data, + size_t length) +{ + unsigned long flags; + struct host_info *hi; + struct file_info *fi; + struct pending_request *req, *req_next; + struct iso_block_store *ibs = NULL; + LIST_HEAD(reqs); + + if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { + HPSB_INFO("dropped iso packet"); + return; + } - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); - if (hi != NULL) { + if (hi != NULL) { list_for_each_entry(fi, &hi->file_info_list, list) { - if (!(fi->listen_channels & (1ULL << channel))) - continue; + if (!(fi->listen_channels & (1ULL << channel))) + continue; + + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) + break; + + if (!ibs) { + ibs = kmalloc(sizeof(struct iso_block_store) + + length, SLAB_ATOMIC); + if (!ibs) { + kfree(req); + break; + } + + atomic_add(length, &iso_buffer_size); + atomic_set(&ibs->refcount, 0); + ibs->data_size = length; + memcpy(ibs->data, data, length); + } + + atomic_inc(&ibs->refcount); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) break; + req->file_info = fi; + req->ibs = ibs; + req->data = ibs->data; + req->req.type = RAW1394_REQ_ISO_RECEIVE; + req->req.generation = get_hpsb_generation(host); + req->req.misc = 0; + req->req.recvb = ptr2int(fi->iso_buffer); + req->req.length = min(length, fi->iso_buffer_length); - if (!ibs) { - ibs = kmalloc(sizeof(struct iso_block_store) - + length, SLAB_ATOMIC); - if (!ibs) { - kfree(req); - break; - } - - atomic_add(length, &iso_buffer_size); - atomic_set(&ibs->refcount, 0); - ibs->data_size = length; - memcpy(ibs->data, data, length); - } - - atomic_inc(&ibs->refcount); - - req->file_info = fi; - req->ibs = ibs; - req->data = ibs->data; - req->req.type = RAW1394_REQ_ISO_RECEIVE; - req->req.generation = get_hpsb_generation(host); - req->req.misc = 0; - req->req.recvb = ptr2int(fi->iso_buffer); - req->req.length = min(length, fi->iso_buffer_length); - - list_add_tail(&req->list, &reqs); - } - } - spin_unlock_irqrestore(&host_info_lock, flags); + list_add_tail(&req->list, &reqs); + } + } + spin_unlock_irqrestore(&host_info_lock, flags); list_for_each_entry_safe(req, req_next, &reqs, list) - queue_complete_req(req); + queue_complete_req(req); } static void fcp_request(struct hpsb_host *host, int nodeid, int direction, - int cts, u8 *data, size_t length) + int cts, u8 * data, size_t length) { - unsigned long flags; - struct host_info *hi; - struct file_info *fi; - struct pending_request *req, *req_next; - struct iso_block_store *ibs = NULL; - LIST_HEAD(reqs); - - if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { - HPSB_INFO("dropped fcp request"); - return; - } + unsigned long flags; + struct host_info *hi; + struct file_info *fi; + struct pending_request *req, *req_next; + struct iso_block_store *ibs = NULL; + LIST_HEAD(reqs); + + if ((atomic_read(&iso_buffer_size) + length) > iso_buffer_max) { + HPSB_INFO("dropped fcp request"); + return; + } - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(host); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(host); - if (hi != NULL) { + if (hi != NULL) { list_for_each_entry(fi, &hi->file_info_list, list) { - if (!fi->fcp_buffer) - continue; + if (!fi->fcp_buffer) + continue; - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) break; + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) + break; + + if (!ibs) { + ibs = kmalloc(sizeof(struct iso_block_store) + + length, SLAB_ATOMIC); + if (!ibs) { + kfree(req); + break; + } + + atomic_add(length, &iso_buffer_size); + atomic_set(&ibs->refcount, 0); + ibs->data_size = length; + memcpy(ibs->data, data, length); + } - if (!ibs) { - ibs = kmalloc(sizeof(struct iso_block_store) - + length, SLAB_ATOMIC); - if (!ibs) { - kfree(req); - break; - } - - atomic_add(length, &iso_buffer_size); - atomic_set(&ibs->refcount, 0); - ibs->data_size = length; - memcpy(ibs->data, data, length); - } - - atomic_inc(&ibs->refcount); - - req->file_info = fi; - req->ibs = ibs; - req->data = ibs->data; - req->req.type = RAW1394_REQ_FCP_REQUEST; - req->req.generation = get_hpsb_generation(host); - req->req.misc = nodeid | (direction << 16); - req->req.recvb = ptr2int(fi->fcp_buffer); - req->req.length = length; - - list_add_tail(&req->list, &reqs); - } - } - spin_unlock_irqrestore(&host_info_lock, flags); + atomic_inc(&ibs->refcount); + + req->file_info = fi; + req->ibs = ibs; + req->data = ibs->data; + req->req.type = RAW1394_REQ_FCP_REQUEST; + req->req.generation = get_hpsb_generation(host); + req->req.misc = nodeid | (direction << 16); + req->req.recvb = ptr2int(fi->fcp_buffer); + req->req.length = length; + + list_add_tail(&req->list, &reqs); + } + } + spin_unlock_irqrestore(&host_info_lock, flags); list_for_each_entry_safe(req, req_next, &reqs, list) - queue_complete_req(req); + queue_complete_req(req); } - -static ssize_t raw1394_read(struct file *file, char __user *buffer, size_t count, - loff_t *offset_is_ignored) +static ssize_t raw1394_read(struct file *file, char __user * buffer, + size_t count, loff_t * offset_is_ignored) { - struct file_info *fi = (struct file_info *)file->private_data; - struct list_head *lh; - struct pending_request *req; - - if (count != sizeof(struct raw1394_request)) { - return -EINVAL; - } - - if (!access_ok(VERIFY_WRITE, buffer, count)) { - return -EFAULT; - } - - if (file->f_flags & O_NONBLOCK) { - if (down_trylock(&fi->complete_sem)) { - return -EAGAIN; - } - } else { - if (down_interruptible(&fi->complete_sem)) { - return -ERESTARTSYS; - } - } - - spin_lock_irq(&fi->reqlists_lock); - lh = fi->req_complete.next; - list_del(lh); - spin_unlock_irq(&fi->reqlists_lock); - - req = list_entry(lh, struct pending_request, list); - - if (req->req.length) { - if (copy_to_user(int2ptr(req->req.recvb), req->data, - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - } - } - __copy_to_user(buffer, &req->req, sizeof(req->req)); + struct file_info *fi = (struct file_info *)file->private_data; + struct list_head *lh; + struct pending_request *req; + ssize_t ret; - free_pending_request(req); - return sizeof(struct raw1394_request); -} + if (count != sizeof(struct raw1394_request)) { + return -EINVAL; + } + if (!access_ok(VERIFY_WRITE, buffer, count)) { + return -EFAULT; + } + + if (file->f_flags & O_NONBLOCK) { + if (down_trylock(&fi->complete_sem)) { + return -EAGAIN; + } + } else { + if (down_interruptible(&fi->complete_sem)) { + return -ERESTARTSYS; + } + } + + spin_lock_irq(&fi->reqlists_lock); + lh = fi->req_complete.next; + list_del(lh); + spin_unlock_irq(&fi->reqlists_lock); + + req = list_entry(lh, struct pending_request, list); + + if (req->req.length) { + if (copy_to_user(int2ptr(req->req.recvb), req->data, + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + } + } + if (copy_to_user(buffer, &req->req, sizeof(req->req))) { + ret = -EFAULT; + goto out; + } + + ret = (ssize_t) sizeof(struct raw1394_request); + out: + free_pending_request(req); + return ret; +} static int state_opened(struct file_info *fi, struct pending_request *req) { - if (req->req.type == RAW1394_REQ_INITIALIZE) { - switch (req->req.misc) { - case RAW1394_KERNELAPI_VERSION: - case 3: - fi->state = initialized; - fi->protocol_version = req->req.misc; - req->req.error = RAW1394_ERROR_NONE; - req->req.generation = atomic_read(&internal_generation); - break; - - default: - req->req.error = RAW1394_ERROR_COMPAT; - req->req.misc = RAW1394_KERNELAPI_VERSION; - } - } else { - req->req.error = RAW1394_ERROR_STATE_ORDER; - } - - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); + if (req->req.type == RAW1394_REQ_INITIALIZE) { + switch (req->req.misc) { + case RAW1394_KERNELAPI_VERSION: + case 3: + fi->state = initialized; + fi->protocol_version = req->req.misc; + req->req.error = RAW1394_ERROR_NONE; + req->req.generation = atomic_read(&internal_generation); + break; + + default: + req->req.error = RAW1394_ERROR_COMPAT; + req->req.misc = RAW1394_KERNELAPI_VERSION; + } + } else { + req->req.error = RAW1394_ERROR_STATE_ORDER; + } + + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); } static int state_initialized(struct file_info *fi, struct pending_request *req) { - struct host_info *hi; - struct raw1394_khost_list *khl; + struct host_info *hi; + struct raw1394_khost_list *khl; + + if (req->req.generation != atomic_read(&internal_generation)) { + req->req.error = RAW1394_ERROR_GENERATION; + req->req.generation = atomic_read(&internal_generation); + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + switch (req->req.type) { + case RAW1394_REQ_LIST_CARDS: + spin_lock_irq(&host_info_lock); + khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, + SLAB_ATOMIC); + + if (khl != NULL) { + req->req.misc = host_count; + req->data = (quadlet_t *) khl; - if (req->req.generation != atomic_read(&internal_generation)) { - req->req.error = RAW1394_ERROR_GENERATION; - req->req.generation = atomic_read(&internal_generation); - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - switch (req->req.type) { - case RAW1394_REQ_LIST_CARDS: - spin_lock_irq(&host_info_lock); - khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, - SLAB_ATOMIC); - - if (khl != NULL) { - req->req.misc = host_count; - req->data = (quadlet_t *)khl; - - list_for_each_entry(hi, &host_info_list, list) { - khl->nodes = hi->host->node_count; - strcpy(khl->name, hi->host->driver->name); - khl++; - } - } - spin_unlock_irq(&host_info_lock); - - if (khl != NULL) { - req->req.error = RAW1394_ERROR_NONE; - req->req.length = min(req->req.length, - (u32)(sizeof(struct raw1394_khost_list) - * req->req.misc)); - req->free_data = 1; - } else { - return -ENOMEM; - } - break; - - case RAW1394_REQ_SET_CARD: - spin_lock_irq(&host_info_lock); - if (req->req.misc < host_count) { + list_for_each_entry(hi, &host_info_list, list) { + khl->nodes = hi->host->node_count; + strcpy(khl->name, hi->host->driver->name); + khl++; + } + } + spin_unlock_irq(&host_info_lock); + + if (khl != NULL) { + req->req.error = RAW1394_ERROR_NONE; + req->req.length = min(req->req.length, + (u32) (sizeof + (struct raw1394_khost_list) + * req->req.misc)); + req->free_data = 1; + } else { + return -ENOMEM; + } + break; + + case RAW1394_REQ_SET_CARD: + spin_lock_irq(&host_info_lock); + if (req->req.misc < host_count) { list_for_each_entry(hi, &host_info_list, list) { if (!req->req.misc--) break; } - get_device(&hi->host->device); // XXX Need to handle failure case - list_add_tail(&fi->list, &hi->file_info_list); - fi->host = hi->host; - fi->state = connected; - - req->req.error = RAW1394_ERROR_NONE; - req->req.generation = get_hpsb_generation(fi->host); - req->req.misc = (fi->host->node_id << 16) - | fi->host->node_count; - if (fi->protocol_version > 3) { - req->req.misc |= NODEID_TO_NODE(fi->host->irm_id) << 8; - } - } else { - req->req.error = RAW1394_ERROR_INVALID_ARG; - } + get_device(&hi->host->device); // XXX Need to handle failure case + list_add_tail(&fi->list, &hi->file_info_list); + fi->host = hi->host; + fi->state = connected; + + req->req.error = RAW1394_ERROR_NONE; + req->req.generation = get_hpsb_generation(fi->host); + req->req.misc = (fi->host->node_id << 16) + | fi->host->node_count; + if (fi->protocol_version > 3) { + req->req.misc |= + NODEID_TO_NODE(fi->host->irm_id) << 8; + } + } else { + req->req.error = RAW1394_ERROR_INVALID_ARG; + } spin_unlock_irq(&host_info_lock); - req->req.length = 0; - break; + req->req.length = 0; + break; - default: - req->req.error = RAW1394_ERROR_STATE_ORDER; - req->req.length = 0; - break; - } + default: + req->req.error = RAW1394_ERROR_STATE_ORDER; + req->req.length = 0; + break; + } - queue_complete_req(req); - return sizeof(struct raw1394_request); + queue_complete_req(req); + return sizeof(struct raw1394_request); } static void handle_iso_listen(struct file_info *fi, struct pending_request *req) { - int channel = req->req.misc; + int channel = req->req.misc; - spin_lock_irq(&host_info_lock); - if ((channel > 63) || (channel < -64)) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - } else if (channel >= 0) { - /* allocate channel req.misc */ - if (fi->listen_channels & (1ULL << channel)) { - req->req.error = RAW1394_ERROR_ALREADY; - } else { - if (hpsb_listen_channel(&raw1394_highlevel, fi->host, channel)) { + spin_lock_irq(&host_info_lock); + if ((channel > 63) || (channel < -64)) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + } else if (channel >= 0) { + /* allocate channel req.misc */ + if (fi->listen_channels & (1ULL << channel)) { + req->req.error = RAW1394_ERROR_ALREADY; + } else { + if (hpsb_listen_channel + (&raw1394_highlevel, fi->host, channel)) { req->req.error = RAW1394_ERROR_ALREADY; } else { fi->listen_channels |= 1ULL << channel; fi->iso_buffer = int2ptr(req->req.recvb); fi->iso_buffer_length = req->req.length; } - } - } else { - /* deallocate channel (one's complement neg) req.misc */ - channel = ~channel; - - if (fi->listen_channels & (1ULL << channel)) { - hpsb_unlisten_channel(&raw1394_highlevel, fi->host, channel); - fi->listen_channels &= ~(1ULL << channel); - } else { - req->req.error = RAW1394_ERROR_INVALID_ARG; - } - } - - req->req.length = 0; - queue_complete_req(req); - spin_unlock_irq(&host_info_lock); + } + } else { + /* deallocate channel (one's complement neg) req.misc */ + channel = ~channel; + + if (fi->listen_channels & (1ULL << channel)) { + hpsb_unlisten_channel(&raw1394_highlevel, fi->host, + channel); + fi->listen_channels &= ~(1ULL << channel); + } else { + req->req.error = RAW1394_ERROR_INVALID_ARG; + } + } + + req->req.length = 0; + queue_complete_req(req); + spin_unlock_irq(&host_info_lock); } static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) { - if (req->req.misc) { - if (fi->fcp_buffer) { - req->req.error = RAW1394_ERROR_ALREADY; - } else { - fi->fcp_buffer = int2ptr(req->req.recvb); - } - } else { - if (!fi->fcp_buffer) { - req->req.error = RAW1394_ERROR_ALREADY; - } else { - fi->fcp_buffer = NULL; - } - } + if (req->req.misc) { + if (fi->fcp_buffer) { + req->req.error = RAW1394_ERROR_ALREADY; + } else { + fi->fcp_buffer = int2ptr(req->req.recvb); + } + } else { + if (!fi->fcp_buffer) { + req->req.error = RAW1394_ERROR_ALREADY; + } else { + fi->fcp_buffer = NULL; + } + } - req->req.length = 0; - queue_complete_req(req); + req->req.length = 0; + queue_complete_req(req); } - static int handle_async_request(struct file_info *fi, - struct pending_request *req, int node) + struct pending_request *req, int node) { - struct hpsb_packet *packet = NULL; - u64 addr = req->req.address & 0xffffffffffffULL; + struct hpsb_packet *packet = NULL; + u64 addr = req->req.address & 0xffffffffffffULL; - switch (req->req.type) { - case RAW1394_REQ_ASYNC_READ: + switch (req->req.type) { + case RAW1394_REQ_ASYNC_READ: DBGMSG("read_request called"); - packet = hpsb_make_readpacket(fi->host, node, addr, req->req.length); + packet = + hpsb_make_readpacket(fi->host, node, addr, req->req.length); if (!packet) return -ENOMEM; @@ -631,7 +644,7 @@ else req->data = packet->data; - break; + break; case RAW1394_REQ_ASYNC_WRITE: DBGMSG("write_request called"); @@ -642,1105 +655,1207 @@ return -ENOMEM; if (req->req.length == 4) { - if (copy_from_user(&packet->header[3], int2ptr(req->req.sendb), - req->req.length)) + if (copy_from_user + (&packet->header[3], int2ptr(req->req.sendb), + req->req.length)) req->req.error = RAW1394_ERROR_MEMFAULT; } else { - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) + if (copy_from_user + (packet->data, int2ptr(req->req.sendb), + req->req.length)) req->req.error = RAW1394_ERROR_MEMFAULT; } req->req.length = 0; - break; + break; case RAW1394_REQ_ASYNC_STREAM: DBGMSG("stream_request called"); - packet = hpsb_make_streampacket(fi->host, NULL, req->req.length, node & 0x3f/*channel*/, - (req->req.misc >> 16) & 0x3, req->req.misc & 0xf); + packet = + hpsb_make_streampacket(fi->host, NULL, req->req.length, + node & 0x3f /*channel */ , + (req->req.misc >> 16) & 0x3, + req->req.misc & 0xf); if (!packet) return -ENOMEM; if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) + req->req.length)) req->req.error = RAW1394_ERROR_MEMFAULT; req->req.length = 0; break; - case RAW1394_REQ_LOCK: - DBGMSG("lock_request called"); - if ((req->req.misc == EXTCODE_FETCH_ADD) - || (req->req.misc == EXTCODE_LITTLE_ADD)) { - if (req->req.length != 4) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } else { - if (req->req.length != 8) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } - - packet = hpsb_make_lockpacket(fi->host, node, addr, - req->req.misc, NULL, 0); - if (!packet) return -ENOMEM; - - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - break; - } - - req->data = packet->data; - req->req.length = 4; - break; - - case RAW1394_REQ_LOCK64: - DBGMSG("lock64_request called"); - if ((req->req.misc == EXTCODE_FETCH_ADD) - || (req->req.misc == EXTCODE_LITTLE_ADD)) { - if (req->req.length != 8) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } else { - if (req->req.length != 16) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - break; - } - } - packet = hpsb_make_lock64packet(fi->host, node, addr, - req->req.misc, NULL, 0); - if (!packet) return -ENOMEM; - - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - break; - } - - req->data = packet->data; - req->req.length = 8; - break; - - default: - req->req.error = RAW1394_ERROR_STATE_ORDER; - } - - req->packet = packet; - - if (req->req.error) { - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); - - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); + case RAW1394_REQ_LOCK: + DBGMSG("lock_request called"); + if ((req->req.misc == EXTCODE_FETCH_ADD) + || (req->req.misc == EXTCODE_LITTLE_ADD)) { + if (req->req.length != 4) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } else { + if (req->req.length != 8) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } + + packet = hpsb_make_lockpacket(fi->host, node, addr, + req->req.misc, NULL, 0); + if (!packet) + return -ENOMEM; + + if (copy_from_user(packet->data, int2ptr(req->req.sendb), + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + break; + } + + req->data = packet->data; + req->req.length = 4; + break; + + case RAW1394_REQ_LOCK64: + DBGMSG("lock64_request called"); + if ((req->req.misc == EXTCODE_FETCH_ADD) + || (req->req.misc == EXTCODE_LITTLE_ADD)) { + if (req->req.length != 8) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } else { + if (req->req.length != 16) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + break; + } + } + packet = hpsb_make_lock64packet(fi->host, node, addr, + req->req.misc, NULL, 0); + if (!packet) + return -ENOMEM; + + if (copy_from_user(packet->data, int2ptr(req->req.sendb), + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + break; + } + + req->data = packet->data; + req->req.length = 8; + break; + + default: + req->req.error = RAW1394_ERROR_STATE_ORDER; + } + + req->packet = packet; + + if (req->req.error) { + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_cb, req); + + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); packet->generation = req->req.generation; - if (hpsb_send_packet(packet) < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - req->req.length = 0; - hpsb_free_tlabel(packet); - queue_complete_req(req); - } - return sizeof(struct raw1394_request); + if (hpsb_send_packet(packet) < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + req->req.length = 0; + hpsb_free_tlabel(packet); + queue_complete_req(req); + } + return sizeof(struct raw1394_request); } static int handle_iso_send(struct file_info *fi, struct pending_request *req, - int channel) + int channel) { - struct hpsb_packet *packet; + struct hpsb_packet *packet; packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f, - (req->req.misc >> 16) & 0x3, req->req.misc & 0xf); + (req->req.misc >> 16) & 0x3, + req->req.misc & 0xf); if (!packet) return -ENOMEM; - packet->speed_code = req->req.address & 0x3; + packet->speed_code = req->req.address & 0x3; req->packet = packet; - if (copy_from_user(packet->data, int2ptr(req->req.sendb), - req->req.length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - req->req.length = 0; - hpsb_set_packet_complete_task(packet, (void (*)(void*))queue_complete_req, req); - - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); + if (copy_from_user(packet->data, int2ptr(req->req.sendb), + req->req.length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + req->req.length = 0; + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_req, + req); + + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); /* Update the generation of the packet just before sending. */ packet->generation = req->req.generation; - if (hpsb_send_packet(packet) < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - queue_complete_req(req); - } + if (hpsb_send_packet(packet) < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + queue_complete_req(req); + } - return sizeof(struct raw1394_request); + return sizeof(struct raw1394_request); } static int handle_async_send(struct file_info *fi, struct pending_request *req) { - struct hpsb_packet *packet; - int header_length = req->req.misc & 0xffff; - int expect_response = req->req.misc >> 16; - - if ((header_length > req->req.length) || - (header_length < 12)) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - packet = hpsb_alloc_packet(req->req.length-header_length); - req->packet = packet; - if (!packet) return -ENOMEM; - - if (copy_from_user(packet->header, int2ptr(req->req.sendb), - header_length)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - if (copy_from_user(packet->data, int2ptr(req->req.sendb) + header_length, - packet->data_size)) { - req->req.error = RAW1394_ERROR_MEMFAULT; - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - packet->type = hpsb_async; - packet->node_id = packet->header[0] >> 16; - packet->tcode = (packet->header[0] >> 4) & 0xf; - packet->tlabel = (packet->header[0] >> 10) &0x3f; - packet->host = fi->host; - packet->expect_response = expect_response; - packet->header_size=header_length; - packet->data_size=req->req.length-header_length; - - req->req.length = 0; - hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); - - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); - - /* Update the generation of the packet just before sending. */ - packet->generation = req->req.generation; - - if (hpsb_send_packet(packet) < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - queue_complete_req(req); - } - - return sizeof(struct raw1394_request); -} - -static int arm_read (struct hpsb_host *host, int nodeid, quadlet_t *buffer, - u64 addr, size_t length, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1; - struct arm_request_response *arm_req_resp = NULL; - - DBGMSG("arm_read called by node: %X" - "addr: %4.4x %8.8x length: %Zu", nodeid, - (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - length); - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search address-entry */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+length))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_read addr_entry FOUND"); - } - if (arm_addr->rec_length < length) { - DBGMSG("arm_read blocklength too big -> rcode_data_error"); - rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_READ) { - if (!(arm_addr->client_transactions & ARM_READ)) { - memcpy(buffer,(arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - length); - DBGMSG("arm_read -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_read -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_READ) { - DBGMSG("arm_read -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - DBGMSG("arm_read -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - if (rcode == RCODE_COMPLETE) { - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - length * sizeof(byte_t) + - sizeof (struct arm_request_response); - } else { - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - sizeof (struct arm_request_response); - } - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - DBGMSG("arm_read -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( ((length << 16) & (0xFFFF0000)) | (ARM_READ & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - arm_req->buffer = NULL; - arm_resp->buffer = NULL; - if (rcode == RCODE_COMPLETE) { - byte_t *buf = (byte_t *)arm_resp + sizeof(struct arm_response); - memcpy (buf, - (arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - length); - arm_resp->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - } - arm_resp->buffer_length = (rcode == RCODE_COMPLETE) ? length : 0; - arm_resp->response_code = rcode; - arm_req->buffer_length = 0; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = 0; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = host->node_id; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); -} - -static int arm_write (struct hpsb_host *host, int nodeid, int destid, - quadlet_t *data, u64 addr, size_t length, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1, length_conflict=0; - struct arm_request_response *arm_req_resp = NULL; - - DBGMSG("arm_write called by node: %X" - "addr: %4.4x %8.8x length: %Zu", nodeid, - (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - length); - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search address-entry */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+length))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_write addr_entry FOUND"); - } - if (arm_addr->rec_length < length) { - DBGMSG("arm_write blocklength too big -> rcode_data_error"); - length_conflict = 1; - rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_WRITE) { - if (!(arm_addr->client_transactions & ARM_WRITE)) { - memcpy((arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - data, length); - DBGMSG("arm_write -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_write -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_WRITE) { - DBGMSG("arm_write -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - DBGMSG("arm_write -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request my be retried */ - } - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - (length) * sizeof(byte_t) + - sizeof (struct arm_request_response); - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - DBGMSG("arm_write -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( ((length << 16) & (0xFFFF0000)) | (ARM_WRITE & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - arm_resp->buffer = NULL; - memcpy ((byte_t *)arm_resp + sizeof(struct arm_response), - data, length); - arm_req->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - arm_req->buffer_length = length; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = 0; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = destid; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_resp->buffer_length = 0; - arm_resp->response_code = rcode; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); -} - -static int arm_lock (struct hpsb_host *host, int nodeid, quadlet_t *store, - u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1; - quadlet_t old, new; - struct arm_request_response *arm_req_resp = NULL; - - if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || - ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { - DBGMSG("arm_lock called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X", - nodeid, (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , be32_to_cpu(data)); - } else { - DBGMSG("arm_lock called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X arg: %8.8X", - nodeid, (u16) ((addr >>32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , be32_to_cpu(data), be32_to_cpu(arg)); - } - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search address-entry */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+sizeof(*store)))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_lock addr_entry FOUND"); - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_LOCK) { - if (!(arm_addr->client_transactions & ARM_LOCK)) { - memcpy(&old,(arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - sizeof(old)); - switch (ext_tcode) { - case (EXTCODE_MASK_SWAP): - new = data | (old & ~arg); - break; - case (EXTCODE_COMPARE_SWAP): - if (old == arg) { - new = data; - } else { - new = old; - } - break; - case (EXTCODE_FETCH_ADD): - new = cpu_to_be32(be32_to_cpu(data) + be32_to_cpu(old)); - break; - case (EXTCODE_LITTLE_ADD): - new = cpu_to_le32(le32_to_cpu(data) + le32_to_cpu(old)); - break; - case (EXTCODE_BOUNDED_ADD): - if (old != arg) { - new = cpu_to_be32(be32_to_cpu(data) + - be32_to_cpu(old)); - } else { - new = old; - } - break; - case (EXTCODE_WRAP_ADD): - if (old != arg) { - new = cpu_to_be32(be32_to_cpu(data) + - be32_to_cpu(old)); - } else { - new = data; - } - break; - default: - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - printk(KERN_ERR "raw1394: arm_lock FAILED " - "ext_tcode not allowed -> rcode_type_error\n"); - break; - } /*switch*/ - if (rcode == -1) { - DBGMSG("arm_lock -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - memcpy (store, &old, sizeof(*store)); - memcpy ((arm_addr->addr_space_buffer)+ - (addr-(arm_addr->start)), - &new, sizeof(*store)); - } - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_lock -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_LOCK) { + struct hpsb_packet *packet; + int header_length = req->req.misc & 0xffff; + int expect_response = req->req.misc >> 16; + + if ((header_length > req->req.length) || (header_length < 12)) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + packet = hpsb_alloc_packet(req->req.length - header_length); + req->packet = packet; + if (!packet) + return -ENOMEM; + + if (copy_from_user(packet->header, int2ptr(req->req.sendb), + header_length)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + if (copy_from_user + (packet->data, int2ptr(req->req.sendb) + header_length, + packet->data_size)) { + req->req.error = RAW1394_ERROR_MEMFAULT; + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + packet->type = hpsb_async; + packet->node_id = packet->header[0] >> 16; + packet->tcode = (packet->header[0] >> 4) & 0xf; + packet->tlabel = (packet->header[0] >> 10) & 0x3f; + packet->host = fi->host; + packet->expect_response = expect_response; + packet->header_size = header_length; + packet->data_size = req->req.length - header_length; + + req->req.length = 0; + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_cb, req); + + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); + + /* Update the generation of the packet just before sending. */ + packet->generation = req->req.generation; + + if (hpsb_send_packet(packet) < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + queue_complete_req(req); + } + + return sizeof(struct raw1394_request); +} + +static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, + u64 addr, size_t length, u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1; + struct arm_request_response *arm_req_resp = NULL; + + DBGMSG("arm_read called by node: %X" + "addr: %4.4x %8.8x length: %Zu", nodeid, + (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), + length); + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search address-entry */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= (addr + length))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_read addr_entry FOUND"); + } + if (arm_addr->rec_length < length) { + DBGMSG("arm_read blocklength too big -> rcode_data_error"); + rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_READ) { + if (!(arm_addr->client_transactions & ARM_READ)) { + memcpy(buffer, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + length); + DBGMSG("arm_read -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG("arm_read -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_READ) { + DBGMSG("arm_read -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + DBGMSG("arm_read -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + if (rcode == RCODE_COMPLETE) { + size = + sizeof(struct arm_request) + + sizeof(struct arm_response) + + length * sizeof(byte_t) + + sizeof(struct arm_request_response); + } else { + size = + sizeof(struct arm_request) + + sizeof(struct arm_response) + + sizeof(struct arm_request_response); + } + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + DBGMSG("arm_read -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = + (((length << 16) & (0xFFFF0000)) | (ARM_READ & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + arm_req->buffer = NULL; + arm_resp->buffer = NULL; + if (rcode == RCODE_COMPLETE) { + byte_t *buf = + (byte_t *) arm_resp + sizeof(struct arm_response); + memcpy(buf, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + length); + arm_resp->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + } + arm_resp->buffer_length = + (rcode == RCODE_COMPLETE) ? length : 0; + arm_resp->response_code = rcode; + arm_req->buffer_length = 0; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = 0; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = host->node_id; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); +} + +static int arm_write(struct hpsb_host *host, int nodeid, int destid, + quadlet_t * data, u64 addr, size_t length, u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1, length_conflict = 0; + struct arm_request_response *arm_req_resp = NULL; + + DBGMSG("arm_write called by node: %X" + "addr: %4.4x %8.8x length: %Zu", nodeid, + (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), + length); + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search address-entry */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= (addr + length))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_write addr_entry FOUND"); + } + if (arm_addr->rec_length < length) { + DBGMSG("arm_write blocklength too big -> rcode_data_error"); + length_conflict = 1; + rcode = RCODE_DATA_ERROR; /* hardware error, data is unavailable */ + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_WRITE) { + if (!(arm_addr->client_transactions & ARM_WRITE)) { + memcpy((arm_addr->addr_space_buffer) + + (addr - (arm_addr->start)), data, + length); + DBGMSG("arm_write -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG("arm_write -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_WRITE) { + DBGMSG("arm_write -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + DBGMSG("arm_write -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request my be retried */ + } + size = + sizeof(struct arm_request) + sizeof(struct arm_response) + + (length) * sizeof(byte_t) + + sizeof(struct arm_request_response); + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + DBGMSG("arm_write -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = + (((length << 16) & (0xFFFF0000)) | (ARM_WRITE & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + arm_resp->buffer = NULL; + memcpy((byte_t *) arm_resp + sizeof(struct arm_response), + data, length); + arm_req->buffer = int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + arm_req->buffer_length = length; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = 0; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = destid; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_resp->buffer_length = 0; + arm_resp->response_code = rcode; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); +} + +static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store, + u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, + u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1; + quadlet_t old, new; + struct arm_request_response *arm_req_resp = NULL; + + if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || + ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { + DBGMSG("arm_lock called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, + be32_to_cpu(data)); + } else { + DBGMSG("arm_lock called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X arg: %8.8X", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, + be32_to_cpu(data), be32_to_cpu(arg)); + } + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search address-entry */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= + (addr + sizeof(*store)))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_lock addr_entry FOUND"); + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_LOCK) { + if (!(arm_addr->client_transactions & ARM_LOCK)) { + memcpy(&old, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + sizeof(old)); + switch (ext_tcode) { + case (EXTCODE_MASK_SWAP): + new = data | (old & ~arg); + break; + case (EXTCODE_COMPARE_SWAP): + if (old == arg) { + new = data; + } else { + new = old; + } + break; + case (EXTCODE_FETCH_ADD): + new = + cpu_to_be32(be32_to_cpu(data) + + be32_to_cpu(old)); + break; + case (EXTCODE_LITTLE_ADD): + new = + cpu_to_le32(le32_to_cpu(data) + + le32_to_cpu(old)); + break; + case (EXTCODE_BOUNDED_ADD): + if (old != arg) { + new = + cpu_to_be32(be32_to_cpu + (data) + + be32_to_cpu + (old)); + } else { + new = old; + } + break; + case (EXTCODE_WRAP_ADD): + if (old != arg) { + new = + cpu_to_be32(be32_to_cpu + (data) + + be32_to_cpu + (old)); + } else { + new = data; + } + break; + default: + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + printk(KERN_ERR + "raw1394: arm_lock FAILED " + "ext_tcode not allowed -> rcode_type_error\n"); + break; + } /*switch */ + if (rcode == -1) { + DBGMSG("arm_lock -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + memcpy(store, &old, sizeof(*store)); + memcpy((arm_addr->addr_space_buffer) + + (addr - (arm_addr->start)), + &new, sizeof(*store)); + } + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG("arm_lock -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_LOCK) { byte_t *buf1, *buf2; - DBGMSG("arm_lock -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - DBGMSG("arm_lock -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - 3 * sizeof(*store) + - sizeof (struct arm_request_response); /* maximum */ - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - DBGMSG("arm_lock -> rcode_conflict_error"); - spin_unlock(&host_info_lock); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - buf1 = (byte_t *)arm_resp + sizeof(struct arm_response); + DBGMSG("arm_lock -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + DBGMSG("arm_lock -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + size = sizeof(struct arm_request) + sizeof(struct arm_response) + 3 * sizeof(*store) + sizeof(struct arm_request_response); /* maximum */ + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + DBGMSG("arm_lock -> rcode_conflict_error"); + spin_unlock(&host_info_lock); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + buf1 = (byte_t *) arm_resp + sizeof(struct arm_response); buf2 = buf1 + 2 * sizeof(*store); - if ((ext_tcode == EXTCODE_FETCH_ADD) || - (ext_tcode == EXTCODE_LITTLE_ADD)) { - arm_req->buffer_length = sizeof(*store); - memcpy (buf1, &data, sizeof(*store)); - - } else { - arm_req->buffer_length = 2 * sizeof(*store); - memcpy (buf1, &arg, sizeof(*store)); - memcpy (buf1 + sizeof(*store), &data, sizeof(*store)); - } - if (rcode == RCODE_COMPLETE) { - arm_resp->buffer_length = sizeof(*store); - memcpy (buf2, &old, sizeof(*store)); - } else { - arm_resp->buffer_length = 0; - } - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( (((sizeof(*store)) << 16) & (0xFFFF0000)) | - (ARM_LOCK & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = ext_tcode; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = host->node_id; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_resp->response_code = rcode; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - arm_req->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - arm_resp->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response) + - 2* sizeof (*store)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); -} - -static int arm_lock64 (struct hpsb_host *host, int nodeid, octlet_t *store, - u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u16 flags) -{ - struct pending_request *req; - struct host_info *hi; - struct file_info *fi = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - struct arm_request *arm_req = NULL; - struct arm_response *arm_resp = NULL; - int found=0, size=0, rcode=-1; - octlet_t old, new; - struct arm_request_response *arm_req_resp = NULL; - - if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || - ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { - DBGMSG("arm_lock64 called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X ", - nodeid, (u16) ((addr >>32) & 0xFFFF), - (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , - (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), - (u32) (be64_to_cpu(data) & 0xFFFFFFFF)); - } else { - DBGMSG("arm_lock64 called by node: %X " - "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X arg: " - "%8.8X %8.8X ", - nodeid, (u16) ((addr >>32) & 0xFFFF), - (u32) (addr & 0xFFFFFFFF), - ext_tcode & 0xFF , - (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), - (u32) (be64_to_cpu(data) & 0xFFFFFFFF), - (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), - (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); - } - spin_lock(&host_info_lock); - hi = find_host_info(host); /* search addressentry in file_info's for host */ - if (hi != NULL) { - list_for_each_entry(fi, &hi->file_info_list, list) { - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if (((arm_addr->start) <= (addr)) && - ((arm_addr->end) >= (addr+sizeof(*store)))) { - found = 1; - break; - } - entry = entry->next; - } - if (found) { - break; - } - } - } - rcode = -1; - if (!found) { - printk(KERN_ERR "raw1394: arm_lock64 FAILED addr_entry not found" - " -> rcode_address_error\n"); - spin_unlock(&host_info_lock); - return (RCODE_ADDRESS_ERROR); - } else { - DBGMSG("arm_lock64 addr_entry FOUND"); - } - if (rcode == -1) { - if (arm_addr->access_rights & ARM_LOCK) { - if (!(arm_addr->client_transactions & ARM_LOCK)) { - memcpy(&old,(arm_addr->addr_space_buffer)+(addr-(arm_addr->start)), - sizeof(old)); - switch (ext_tcode) { - case (EXTCODE_MASK_SWAP): - new = data | (old & ~arg); - break; - case (EXTCODE_COMPARE_SWAP): - if (old == arg) { - new = data; - } else { - new = old; - } - break; - case (EXTCODE_FETCH_ADD): - new = cpu_to_be64(be64_to_cpu(data) + be64_to_cpu(old)); - break; - case (EXTCODE_LITTLE_ADD): - new = cpu_to_le64(le64_to_cpu(data) + le64_to_cpu(old)); - break; - case (EXTCODE_BOUNDED_ADD): - if (old != arg) { - new = cpu_to_be64(be64_to_cpu(data) + - be64_to_cpu(old)); - } else { - new = old; - } - break; - case (EXTCODE_WRAP_ADD): - if (old != arg) { - new = cpu_to_be64(be64_to_cpu(data) + - be64_to_cpu(old)); - } else { - new = data; - } - break; - default: - printk(KERN_ERR "raw1394: arm_lock64 FAILED " - "ext_tcode not allowed -> rcode_type_error\n"); - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - break; - } /*switch*/ - if (rcode == -1) { - DBGMSG("arm_lock64 -> (rcode_complete)"); - rcode = RCODE_COMPLETE; - memcpy (store, &old, sizeof(*store)); - memcpy ((arm_addr->addr_space_buffer)+ - (addr-(arm_addr->start)), - &new, sizeof(*store)); - } - } - } else { - rcode = RCODE_TYPE_ERROR; /* function not allowed */ - DBGMSG("arm_lock64 -> rcode_type_error (access denied)"); - } - } - if (arm_addr->notification_options & ARM_LOCK) { + if ((ext_tcode == EXTCODE_FETCH_ADD) || + (ext_tcode == EXTCODE_LITTLE_ADD)) { + arm_req->buffer_length = sizeof(*store); + memcpy(buf1, &data, sizeof(*store)); + + } else { + arm_req->buffer_length = 2 * sizeof(*store); + memcpy(buf1, &arg, sizeof(*store)); + memcpy(buf1 + sizeof(*store), &data, sizeof(*store)); + } + if (rcode == RCODE_COMPLETE) { + arm_resp->buffer_length = sizeof(*store); + memcpy(buf2, &old, sizeof(*store)); + } else { + arm_resp->buffer_length = 0; + } + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = ((((sizeof(*store)) << 16) & (0xFFFF0000)) | + (ARM_LOCK & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = ext_tcode; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = host->node_id; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_resp->response_code = rcode; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + arm_req->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + arm_resp->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response) + 2 * sizeof(*store)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); +} + +static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store, + u64 addr, octlet_t data, octlet_t arg, int ext_tcode, + u16 flags) +{ + struct pending_request *req; + struct host_info *hi; + struct file_info *fi = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + struct arm_request *arm_req = NULL; + struct arm_response *arm_resp = NULL; + int found = 0, size = 0, rcode = -1; + octlet_t old, new; + struct arm_request_response *arm_req_resp = NULL; + + if (((ext_tcode & 0xFF) == EXTCODE_FETCH_ADD) || + ((ext_tcode & 0xFF) == EXTCODE_LITTLE_ADD)) { + DBGMSG("arm_lock64 called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X ", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), + ext_tcode & 0xFF, + (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), + (u32) (be64_to_cpu(data) & 0xFFFFFFFF)); + } else { + DBGMSG("arm_lock64 called by node: %X " + "addr: %4.4x %8.8x extcode: %2.2X data: %8.8X %8.8X arg: " + "%8.8X %8.8X ", + nodeid, (u16) ((addr >> 32) & 0xFFFF), + (u32) (addr & 0xFFFFFFFF), + ext_tcode & 0xFF, + (u32) ((be64_to_cpu(data) >> 32) & 0xFFFFFFFF), + (u32) (be64_to_cpu(data) & 0xFFFFFFFF), + (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), + (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); + } + spin_lock(&host_info_lock); + hi = find_host_info(host); /* search addressentry in file_info's for host */ + if (hi != NULL) { + list_for_each_entry(fi, &hi->file_info_list, list) { + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if (((arm_addr->start) <= (addr)) + && ((arm_addr->end) >= + (addr + sizeof(*store)))) { + found = 1; + break; + } + entry = entry->next; + } + if (found) { + break; + } + } + } + rcode = -1; + if (!found) { + printk(KERN_ERR + "raw1394: arm_lock64 FAILED addr_entry not found" + " -> rcode_address_error\n"); + spin_unlock(&host_info_lock); + return (RCODE_ADDRESS_ERROR); + } else { + DBGMSG("arm_lock64 addr_entry FOUND"); + } + if (rcode == -1) { + if (arm_addr->access_rights & ARM_LOCK) { + if (!(arm_addr->client_transactions & ARM_LOCK)) { + memcpy(&old, + (arm_addr->addr_space_buffer) + (addr - + (arm_addr-> + start)), + sizeof(old)); + switch (ext_tcode) { + case (EXTCODE_MASK_SWAP): + new = data | (old & ~arg); + break; + case (EXTCODE_COMPARE_SWAP): + if (old == arg) { + new = data; + } else { + new = old; + } + break; + case (EXTCODE_FETCH_ADD): + new = + cpu_to_be64(be64_to_cpu(data) + + be64_to_cpu(old)); + break; + case (EXTCODE_LITTLE_ADD): + new = + cpu_to_le64(le64_to_cpu(data) + + le64_to_cpu(old)); + break; + case (EXTCODE_BOUNDED_ADD): + if (old != arg) { + new = + cpu_to_be64(be64_to_cpu + (data) + + be64_to_cpu + (old)); + } else { + new = old; + } + break; + case (EXTCODE_WRAP_ADD): + if (old != arg) { + new = + cpu_to_be64(be64_to_cpu + (data) + + be64_to_cpu + (old)); + } else { + new = data; + } + break; + default: + printk(KERN_ERR + "raw1394: arm_lock64 FAILED " + "ext_tcode not allowed -> rcode_type_error\n"); + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + break; + } /*switch */ + if (rcode == -1) { + DBGMSG + ("arm_lock64 -> (rcode_complete)"); + rcode = RCODE_COMPLETE; + memcpy(store, &old, sizeof(*store)); + memcpy((arm_addr->addr_space_buffer) + + (addr - (arm_addr->start)), + &new, sizeof(*store)); + } + } + } else { + rcode = RCODE_TYPE_ERROR; /* function not allowed */ + DBGMSG + ("arm_lock64 -> rcode_type_error (access denied)"); + } + } + if (arm_addr->notification_options & ARM_LOCK) { byte_t *buf1, *buf2; - DBGMSG("arm_lock64 -> entering notification-section"); - req = __alloc_pending_request(SLAB_ATOMIC); - if (!req) { - spin_unlock(&host_info_lock); - DBGMSG("arm_lock64 -> rcode_conflict_error"); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - size = sizeof(struct arm_request)+sizeof(struct arm_response) + - 3 * sizeof(*store) + - sizeof (struct arm_request_response); /* maximum */ - req->data = kmalloc(size, SLAB_ATOMIC); - if (!(req->data)) { - free_pending_request(req); - spin_unlock(&host_info_lock); - DBGMSG("arm_lock64 -> rcode_conflict_error"); - return(RCODE_CONFLICT_ERROR); /* A resource conflict was detected. - The request may be retried */ - } - req->free_data=1; - arm_req_resp = (struct arm_request_response *) (req->data); - arm_req = (struct arm_request *) ((byte_t *)(req->data) + - (sizeof (struct arm_request_response))); - arm_resp = (struct arm_response *) ((byte_t *)(arm_req) + - (sizeof(struct arm_request))); - buf1 = (byte_t *)arm_resp + sizeof(struct arm_response); - buf2 = buf1 + 2 * sizeof(*store); - if ((ext_tcode == EXTCODE_FETCH_ADD) || - (ext_tcode == EXTCODE_LITTLE_ADD)) { - arm_req->buffer_length = sizeof(*store); - memcpy (buf1, &data, sizeof(*store)); - - } else { - arm_req->buffer_length = 2 * sizeof(*store); - memcpy (buf1, &arg, sizeof(*store)); - memcpy (buf1 + sizeof(*store), &data, sizeof(*store)); - } - if (rcode == RCODE_COMPLETE) { - arm_resp->buffer_length = sizeof(*store); - memcpy (buf2, &old, sizeof(*store)); - } else { - arm_resp->buffer_length = 0; - } - req->file_info = fi; - req->req.type = RAW1394_REQ_ARM; - req->req.generation = get_hpsb_generation(host); - req->req.misc = ( (((sizeof(*store)) << 16) & (0xFFFF0000)) | - (ARM_LOCK & 0xFF)); - req->req.tag = arm_addr->arm_tag; - req->req.recvb = arm_addr->recvb; - req->req.length = size; - arm_req->generation = req->req.generation; - arm_req->extended_transaction_code = ext_tcode; - arm_req->destination_offset = addr; - arm_req->source_nodeid = nodeid; - arm_req->destination_nodeid = host->node_id; - arm_req->tlabel = (flags >> 10) & 0x3f; - arm_req->tcode = (flags >> 4) & 0x0f; - arm_resp->response_code = rcode; - arm_req_resp->request = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response)); - arm_req_resp->response = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request)); - arm_req->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response)); - arm_resp->buffer = int2ptr((arm_addr->recvb) + - sizeof (struct arm_request_response) + - sizeof (struct arm_request) + - sizeof (struct arm_response) + - 2* sizeof (*store)); - queue_complete_req(req); - } - spin_unlock(&host_info_lock); - return(rcode); + DBGMSG("arm_lock64 -> entering notification-section"); + req = __alloc_pending_request(SLAB_ATOMIC); + if (!req) { + spin_unlock(&host_info_lock); + DBGMSG("arm_lock64 -> rcode_conflict_error"); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + size = sizeof(struct arm_request) + sizeof(struct arm_response) + 3 * sizeof(*store) + sizeof(struct arm_request_response); /* maximum */ + req->data = kmalloc(size, SLAB_ATOMIC); + if (!(req->data)) { + free_pending_request(req); + spin_unlock(&host_info_lock); + DBGMSG("arm_lock64 -> rcode_conflict_error"); + return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. + The request may be retried */ + } + req->free_data = 1; + arm_req_resp = (struct arm_request_response *)(req->data); + arm_req = (struct arm_request *)((byte_t *) (req->data) + + (sizeof + (struct + arm_request_response))); + arm_resp = + (struct arm_response *)((byte_t *) (arm_req) + + (sizeof(struct arm_request))); + buf1 = (byte_t *) arm_resp + sizeof(struct arm_response); + buf2 = buf1 + 2 * sizeof(*store); + if ((ext_tcode == EXTCODE_FETCH_ADD) || + (ext_tcode == EXTCODE_LITTLE_ADD)) { + arm_req->buffer_length = sizeof(*store); + memcpy(buf1, &data, sizeof(*store)); + + } else { + arm_req->buffer_length = 2 * sizeof(*store); + memcpy(buf1, &arg, sizeof(*store)); + memcpy(buf1 + sizeof(*store), &data, sizeof(*store)); + } + if (rcode == RCODE_COMPLETE) { + arm_resp->buffer_length = sizeof(*store); + memcpy(buf2, &old, sizeof(*store)); + } else { + arm_resp->buffer_length = 0; + } + req->file_info = fi; + req->req.type = RAW1394_REQ_ARM; + req->req.generation = get_hpsb_generation(host); + req->req.misc = ((((sizeof(*store)) << 16) & (0xFFFF0000)) | + (ARM_LOCK & 0xFF)); + req->req.tag = arm_addr->arm_tag; + req->req.recvb = arm_addr->recvb; + req->req.length = size; + arm_req->generation = req->req.generation; + arm_req->extended_transaction_code = ext_tcode; + arm_req->destination_offset = addr; + arm_req->source_nodeid = nodeid; + arm_req->destination_nodeid = host->node_id; + arm_req->tlabel = (flags >> 10) & 0x3f; + arm_req->tcode = (flags >> 4) & 0x0f; + arm_resp->response_code = rcode; + arm_req_resp->request = int2ptr((arm_addr->recvb) + + sizeof(struct + arm_request_response)); + arm_req_resp->response = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request)); + arm_req->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response)); + arm_resp->buffer = + int2ptr((arm_addr->recvb) + + sizeof(struct arm_request_response) + + sizeof(struct arm_request) + + sizeof(struct arm_response) + 2 * sizeof(*store)); + queue_complete_req(req); + } + spin_unlock(&host_info_lock); + return (rcode); } static int arm_register(struct file_info *fi, struct pending_request *req) { - int retval; - struct arm_addr *addr; - struct host_info *hi; - struct file_info *fi_hlp = NULL; - struct list_head *entry; - struct arm_addr *arm_addr = NULL; - int same_host, another_host; - unsigned long flags; - - DBGMSG("arm_register called " - "addr(Offset): %8.8x %8.8x length: %u " - "rights: %2.2X notify: %2.2X " - "max_blk_len: %4.4X", - (u32) ((req->req.address >>32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF), - req->req.length, ((req->req.misc >> 8) & 0xFF), - (req->req.misc & 0xFF),((req->req.misc >> 16) & 0xFFFF)); - /* check addressrange */ - if ((((req->req.address) & ~(0xFFFFFFFFFFFFULL)) != 0) || - (((req->req.address + req->req.length) & ~(0xFFFFFFFFFFFFULL)) != 0)) { - req->req.length = 0; - return (-EINVAL); - } - /* addr-list-entry for fileinfo */ - addr = (struct arm_addr *)kmalloc(sizeof(struct arm_addr), SLAB_KERNEL); - if (!addr) { - req->req.length = 0; - return (-ENOMEM); - } - /* allocation of addr_space_buffer */ - addr->addr_space_buffer = (u8 *)vmalloc(req->req.length); - if (!(addr->addr_space_buffer)) { - kfree(addr); - req->req.length = 0; - return (-ENOMEM); - } - /* initialization of addr_space_buffer */ - if ((req->req.sendb)== (unsigned long)NULL) { - /* init: set 0 */ - memset(addr->addr_space_buffer, 0,req->req.length); - } else { - /* init: user -> kernel */ - if (copy_from_user(addr->addr_space_buffer,int2ptr(req->req.sendb), - req->req.length)) { - vfree(addr->addr_space_buffer); - kfree(addr); - return (-EFAULT); - } - } - INIT_LIST_HEAD(&addr->addr_list); - addr->arm_tag = req->req.tag; - addr->start = req->req.address; - addr->end = req->req.address + req->req.length; - addr->access_rights = (u8) (req->req.misc & 0x0F); - addr->notification_options = (u8) ((req->req.misc >> 4) & 0x0F); - addr->client_transactions = (u8) ((req->req.misc >> 8) & 0x0F); - addr->access_rights |= addr->client_transactions; - addr->notification_options |= addr->client_transactions; - addr->recvb = req->req.recvb; - addr->rec_length = (u16) ((req->req.misc >> 16) & 0xFFFF); - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(fi->host); - same_host = 0; - another_host = 0; - /* same host with address-entry containing same addressrange ? */ - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if ( (arm_addr->start == addr->start) && - (arm_addr->end == addr->end)) { - DBGMSG("same host ownes same " - "addressrange -> EALREADY"); - same_host = 1; - break; - } - entry = entry->next; - } - if (same_host) { - break; - } - } - if (same_host) { - /* addressrange occupied by same host */ - vfree(addr->addr_space_buffer); - kfree(addr); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EALREADY); - } - /* another host with valid address-entry containing same addressrange */ - list_for_each_entry(hi, &host_info_list, list) { - if (hi->host != fi->host) { - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, struct arm_addr, addr_list); - if ( (arm_addr->start == addr->start) && - (arm_addr->end == addr->end)) { - DBGMSG("another host ownes same " - "addressrange"); - another_host = 1; - break; - } - entry = entry->next; - } - if (another_host) { - break; - } - } - } - } - if (another_host) { - DBGMSG("another hosts entry is valid -> SUCCESS"); - if (copy_to_user(int2ptr(req->req.recvb), - &addr->start,sizeof(u64))) { - printk(KERN_ERR "raw1394: arm_register failed " - " address-range-entry is invalid -> EFAULT !!!\n"); - vfree(addr->addr_space_buffer); - kfree(addr); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EFAULT); - } - free_pending_request(req); /* immediate success or fail */ - /* INSERT ENTRY */ - list_add_tail(&addr->addr_list, &fi->addr_list); - spin_unlock_irqrestore(&host_info_lock, flags); - return sizeof(struct raw1394_request); - } - retval = hpsb_register_addrspace(&raw1394_highlevel, fi->host, &arm_ops, req->req.address, - req->req.address + req->req.length); - if (retval) { - /* INSERT ENTRY */ - list_add_tail(&addr->addr_list, &fi->addr_list); - } else { - DBGMSG("arm_register failed errno: %d \n",retval); - vfree(addr->addr_space_buffer); - kfree(addr); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EALREADY); - } - spin_unlock_irqrestore(&host_info_lock, flags); - free_pending_request(req); /* immediate success or fail */ - return sizeof(struct raw1394_request); + int retval; + struct arm_addr *addr; + struct host_info *hi; + struct file_info *fi_hlp = NULL; + struct list_head *entry; + struct arm_addr *arm_addr = NULL; + int same_host, another_host; + unsigned long flags; + + DBGMSG("arm_register called " + "addr(Offset): %8.8x %8.8x length: %u " + "rights: %2.2X notify: %2.2X " + "max_blk_len: %4.4X", + (u32) ((req->req.address >> 32) & 0xFFFF), + (u32) (req->req.address & 0xFFFFFFFF), + req->req.length, ((req->req.misc >> 8) & 0xFF), + (req->req.misc & 0xFF), ((req->req.misc >> 16) & 0xFFFF)); + /* check addressrange */ + if ((((req->req.address) & ~(0xFFFFFFFFFFFFULL)) != 0) || + (((req->req.address + req->req.length) & ~(0xFFFFFFFFFFFFULL)) != + 0)) { + req->req.length = 0; + return (-EINVAL); + } + /* addr-list-entry for fileinfo */ + addr = (struct arm_addr *)kmalloc(sizeof(struct arm_addr), SLAB_KERNEL); + if (!addr) { + req->req.length = 0; + return (-ENOMEM); + } + /* allocation of addr_space_buffer */ + addr->addr_space_buffer = (u8 *) vmalloc(req->req.length); + if (!(addr->addr_space_buffer)) { + kfree(addr); + req->req.length = 0; + return (-ENOMEM); + } + /* initialization of addr_space_buffer */ + if ((req->req.sendb) == (unsigned long)NULL) { + /* init: set 0 */ + memset(addr->addr_space_buffer, 0, req->req.length); + } else { + /* init: user -> kernel */ + if (copy_from_user + (addr->addr_space_buffer, int2ptr(req->req.sendb), + req->req.length)) { + vfree(addr->addr_space_buffer); + kfree(addr); + return (-EFAULT); + } + } + INIT_LIST_HEAD(&addr->addr_list); + addr->arm_tag = req->req.tag; + addr->start = req->req.address; + addr->end = req->req.address + req->req.length; + addr->access_rights = (u8) (req->req.misc & 0x0F); + addr->notification_options = (u8) ((req->req.misc >> 4) & 0x0F); + addr->client_transactions = (u8) ((req->req.misc >> 8) & 0x0F); + addr->access_rights |= addr->client_transactions; + addr->notification_options |= addr->client_transactions; + addr->recvb = req->req.recvb; + addr->rec_length = (u16) ((req->req.misc >> 16) & 0xFFFF); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(fi->host); + same_host = 0; + another_host = 0; + /* same host with address-entry containing same addressrange ? */ + list_for_each_entry(fi_hlp, &hi->file_info_list, list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, addr_list); + if ((arm_addr->start == addr->start) + && (arm_addr->end == addr->end)) { + DBGMSG("same host ownes same " + "addressrange -> EALREADY"); + same_host = 1; + break; + } + entry = entry->next; + } + if (same_host) { + break; + } + } + if (same_host) { + /* addressrange occupied by same host */ + vfree(addr->addr_space_buffer); + kfree(addr); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EALREADY); + } + /* another host with valid address-entry containing same addressrange */ + list_for_each_entry(hi, &host_info_list, list) { + if (hi->host != fi->host) { + list_for_each_entry(fi_hlp, &hi->file_info_list, list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = + list_entry(entry, struct arm_addr, + addr_list); + if ((arm_addr->start == addr->start) + && (arm_addr->end == addr->end)) { + DBGMSG + ("another host ownes same " + "addressrange"); + another_host = 1; + break; + } + entry = entry->next; + } + if (another_host) { + break; + } + } + } + } + if (another_host) { + DBGMSG("another hosts entry is valid -> SUCCESS"); + if (copy_to_user(int2ptr(req->req.recvb), + &addr->start, sizeof(u64))) { + printk(KERN_ERR "raw1394: arm_register failed " + " address-range-entry is invalid -> EFAULT !!!\n"); + vfree(addr->addr_space_buffer); + kfree(addr); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EFAULT); + } + free_pending_request(req); /* immediate success or fail */ + /* INSERT ENTRY */ + list_add_tail(&addr->addr_list, &fi->addr_list); + spin_unlock_irqrestore(&host_info_lock, flags); + return sizeof(struct raw1394_request); + } + retval = + hpsb_register_addrspace(&raw1394_highlevel, fi->host, &arm_ops, + req->req.address, + req->req.address + req->req.length); + if (retval) { + /* INSERT ENTRY */ + list_add_tail(&addr->addr_list, &fi->addr_list); + } else { + DBGMSG("arm_register failed errno: %d \n", retval); + vfree(addr->addr_space_buffer); + kfree(addr); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EALREADY); + } + spin_unlock_irqrestore(&host_info_lock, flags); + free_pending_request(req); /* immediate success or fail */ + return sizeof(struct raw1394_request); } static int arm_unregister(struct file_info *fi, struct pending_request *req) { - int found = 0; - int retval = 0; - struct list_head *entry; - struct arm_addr *addr = NULL; - struct host_info *hi; - struct file_info *fi_hlp = NULL; - struct arm_addr *arm_addr = NULL; - int another_host; - unsigned long flags; - - DBGMSG("arm_Unregister called addr(Offset): " - "%8.8x %8.8x", - (u32) ((req->req.address >>32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF)); - spin_lock_irqsave(&host_info_lock, flags); - /* get addr */ - entry = fi->addr_list.next; - while (entry != &(fi->addr_list)) { - addr = list_entry(entry, struct arm_addr, addr_list); - if (addr->start == req->req.address) { - found = 1; - break; - } - entry = entry->next; - } - if (!found) { - DBGMSG("arm_Unregister addr not found"); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EINVAL); - } - DBGMSG("arm_Unregister addr found"); - another_host = 0; - /* another host with valid address-entry containing - same addressrange */ - list_for_each_entry(hi, &host_info_list, list) { - if (hi->host != fi->host) { - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, - struct arm_addr, addr_list); - if (arm_addr->start == - addr->start) { - DBGMSG("another host ownes " - "same addressrange"); - another_host = 1; - break; - } - entry = entry->next; - } - if (another_host) { - break; - } - } - } - } - if (another_host) { - DBGMSG("delete entry from list -> success"); - list_del(&addr->addr_list); - vfree(addr->addr_space_buffer); - kfree(addr); - free_pending_request(req); /* immediate success or fail */ - spin_unlock_irqrestore(&host_info_lock, flags); - return sizeof(struct raw1394_request); - } - retval = hpsb_unregister_addrspace(&raw1394_highlevel, fi->host, addr->start); - if (!retval) { - printk(KERN_ERR "raw1394: arm_Unregister failed -> EINVAL\n"); - spin_unlock_irqrestore(&host_info_lock, flags); - return (-EINVAL); - } - DBGMSG("delete entry from list -> success"); - list_del(&addr->addr_list); - spin_unlock_irqrestore(&host_info_lock, flags); - vfree(addr->addr_space_buffer); - kfree(addr); - free_pending_request(req); /* immediate success or fail */ - return sizeof(struct raw1394_request); + int found = 0; + int retval = 0; + struct list_head *entry; + struct arm_addr *addr = NULL; + struct host_info *hi; + struct file_info *fi_hlp = NULL; + struct arm_addr *arm_addr = NULL; + int another_host; + unsigned long flags; + + DBGMSG("arm_Unregister called addr(Offset): " + "%8.8x %8.8x", + (u32) ((req->req.address >> 32) & 0xFFFF), + (u32) (req->req.address & 0xFFFFFFFF)); + spin_lock_irqsave(&host_info_lock, flags); + /* get addr */ + entry = fi->addr_list.next; + while (entry != &(fi->addr_list)) { + addr = list_entry(entry, struct arm_addr, addr_list); + if (addr->start == req->req.address) { + found = 1; + break; + } + entry = entry->next; + } + if (!found) { + DBGMSG("arm_Unregister addr not found"); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EINVAL); + } + DBGMSG("arm_Unregister addr found"); + another_host = 0; + /* another host with valid address-entry containing + same addressrange */ + list_for_each_entry(hi, &host_info_list, list) { + if (hi->host != fi->host) { + list_for_each_entry(fi_hlp, &hi->file_info_list, list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = list_entry(entry, + struct arm_addr, + addr_list); + if (arm_addr->start == addr->start) { + DBGMSG("another host ownes " + "same addressrange"); + another_host = 1; + break; + } + entry = entry->next; + } + if (another_host) { + break; + } + } + } + } + if (another_host) { + DBGMSG("delete entry from list -> success"); + list_del(&addr->addr_list); + vfree(addr->addr_space_buffer); + kfree(addr); + free_pending_request(req); /* immediate success or fail */ + spin_unlock_irqrestore(&host_info_lock, flags); + return sizeof(struct raw1394_request); + } + retval = + hpsb_unregister_addrspace(&raw1394_highlevel, fi->host, + addr->start); + if (!retval) { + printk(KERN_ERR "raw1394: arm_Unregister failed -> EINVAL\n"); + spin_unlock_irqrestore(&host_info_lock, flags); + return (-EINVAL); + } + DBGMSG("delete entry from list -> success"); + list_del(&addr->addr_list); + spin_unlock_irqrestore(&host_info_lock, flags); + vfree(addr->addr_space_buffer); + kfree(addr); + free_pending_request(req); /* immediate success or fail */ + return sizeof(struct raw1394_request); } /* Copy data from ARM buffer(s) to user buffer. */ static int arm_get_buf(struct file_info *fi, struct pending_request *req) { - struct arm_addr *arm_addr = NULL; + struct arm_addr *arm_addr = NULL; unsigned long flags; unsigned long offset; @@ -1749,8 +1864,7 @@ DBGMSG("arm_get_buf " "addr(Offset): %04X %08X length: %u", (u32) ((req->req.address >> 32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF), - (u32) req->req.length); + (u32) (req->req.address & 0xFFFFFFFF), (u32) req->req.length); spin_lock_irqsave(&host_info_lock, flags); entry = fi->addr_list.next; @@ -1761,13 +1875,18 @@ if (req->req.address + req->req.length <= arm_addr->end) { offset = req->req.address - arm_addr->start; - DBGMSG("arm_get_buf copy_to_user( %08X, %p, %u )", - (u32) req->req.recvb, - arm_addr->addr_space_buffer+offset, - (u32) req->req.length); - - if (copy_to_user(int2ptr(req->req.recvb), arm_addr->addr_space_buffer+offset, req->req.length)) { - spin_unlock_irqrestore(&host_info_lock, flags); + DBGMSG + ("arm_get_buf copy_to_user( %08X, %p, %u )", + (u32) req->req.recvb, + arm_addr->addr_space_buffer + offset, + (u32) req->req.length); + + if (copy_to_user + (int2ptr(req->req.recvb), + arm_addr->addr_space_buffer + offset, + req->req.length)) { + spin_unlock_irqrestore(&host_info_lock, + flags); return (-EFAULT); } @@ -1789,11 +1908,10 @@ return (-EINVAL); } - /* Copy data from user buffer to ARM buffer(s). */ static int arm_set_buf(struct file_info *fi, struct pending_request *req) { - struct arm_addr *arm_addr = NULL; + struct arm_addr *arm_addr = NULL; unsigned long flags; unsigned long offset; @@ -1802,9 +1920,7 @@ DBGMSG("arm_set_buf " "addr(Offset): %04X %08X length: %u", (u32) ((req->req.address >> 32) & 0xFFFF), - (u32) (req->req.address & 0xFFFFFFFF), - (u32) req->req.length); - + (u32) (req->req.address & 0xFFFFFFFF), (u32) req->req.length); spin_lock_irqsave(&host_info_lock, flags); entry = fi->addr_list.next; @@ -1815,18 +1931,23 @@ if (req->req.address + req->req.length <= arm_addr->end) { offset = req->req.address - arm_addr->start; - DBGMSG("arm_set_buf copy_from_user( %p, %08X, %u )", - arm_addr->addr_space_buffer+offset, - (u32) req->req.sendb, - (u32) req->req.length); - - if (copy_from_user(arm_addr->addr_space_buffer+offset, int2ptr(req->req.sendb), req->req.length)) { - spin_unlock_irqrestore(&host_info_lock, flags); + DBGMSG + ("arm_set_buf copy_from_user( %p, %08X, %u )", + arm_addr->addr_space_buffer + offset, + (u32) req->req.sendb, + (u32) req->req.length); + + if (copy_from_user + (arm_addr->addr_space_buffer + offset, + int2ptr(req->req.sendb), + req->req.length)) { + spin_unlock_irqrestore(&host_info_lock, + flags); return (-EFAULT); } spin_unlock_irqrestore(&host_info_lock, flags); - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ return sizeof(struct raw1394_request); } else { DBGMSG("arm_set_buf request exceeded mapping"); @@ -1842,96 +1963,100 @@ static int reset_notification(struct file_info *fi, struct pending_request *req) { - DBGMSG("reset_notification called - switch %s ", - (req->req.misc == RAW1394_NOTIFY_OFF)?"OFF":"ON"); - if ((req->req.misc == RAW1394_NOTIFY_OFF) || - (req->req.misc == RAW1394_NOTIFY_ON)) { - fi->notification=(u8)req->req.misc; - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - return sizeof(struct raw1394_request); - } - /* error EINVAL (22) invalid argument */ - return (-EINVAL); + DBGMSG("reset_notification called - switch %s ", + (req->req.misc == RAW1394_NOTIFY_OFF) ? "OFF" : "ON"); + if ((req->req.misc == RAW1394_NOTIFY_OFF) || + (req->req.misc == RAW1394_NOTIFY_ON)) { + fi->notification = (u8) req->req.misc; + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + return sizeof(struct raw1394_request); + } + /* error EINVAL (22) invalid argument */ + return (-EINVAL); } static int write_phypacket(struct file_info *fi, struct pending_request *req) { - struct hpsb_packet *packet = NULL; - int retval=0; - quadlet_t data; - - data = be32_to_cpu((u32)req->req.sendb); - DBGMSG("write_phypacket called - quadlet 0x%8.8x ",data); - packet = hpsb_make_phypacket (fi->host, data); - if (!packet) return -ENOMEM; - req->req.length=0; - req->packet=packet; - hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req); - spin_lock_irq(&fi->reqlists_lock); - list_add_tail(&req->list, &fi->req_pending); - spin_unlock_irq(&fi->reqlists_lock); - packet->generation = req->req.generation; - retval = hpsb_send_packet(packet); - DBGMSG("write_phypacket send_packet called => retval: %d ", retval); - if (retval < 0) { - req->req.error = RAW1394_ERROR_SEND_ERROR; - req->req.length = 0; - queue_complete_req(req); - } - return sizeof(struct raw1394_request); + struct hpsb_packet *packet = NULL; + int retval = 0; + quadlet_t data; + + data = be32_to_cpu((u32) req->req.sendb); + DBGMSG("write_phypacket called - quadlet 0x%8.8x ", data); + packet = hpsb_make_phypacket(fi->host, data); + if (!packet) + return -ENOMEM; + req->req.length = 0; + req->packet = packet; + hpsb_set_packet_complete_task(packet, + (void (*)(void *))queue_complete_cb, req); + spin_lock_irq(&fi->reqlists_lock); + list_add_tail(&req->list, &fi->req_pending); + spin_unlock_irq(&fi->reqlists_lock); + packet->generation = req->req.generation; + retval = hpsb_send_packet(packet); + DBGMSG("write_phypacket send_packet called => retval: %d ", retval); + if (retval < 0) { + req->req.error = RAW1394_ERROR_SEND_ERROR; + req->req.length = 0; + queue_complete_req(req); + } + return sizeof(struct raw1394_request); } static int get_config_rom(struct file_info *fi, struct pending_request *req) { - int ret=sizeof(struct raw1394_request); - quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); - int status; - - if (!data) return -ENOMEM; - - status = csr1212_read(fi->host->csr.rom, CSR1212_CONFIG_ROM_SPACE_OFFSET, - data, req->req.length); - if (copy_to_user(int2ptr(req->req.recvb), data, - req->req.length)) - ret = -EFAULT; - if (copy_to_user(int2ptr(req->req.tag), &fi->host->csr.rom->cache_head->len, - sizeof(fi->host->csr.rom->cache_head->len))) - ret = -EFAULT; + int ret = sizeof(struct raw1394_request); + quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); + int status; + + if (!data) + return -ENOMEM; + + status = + csr1212_read(fi->host->csr.rom, CSR1212_CONFIG_ROM_SPACE_OFFSET, + data, req->req.length); + if (copy_to_user(int2ptr(req->req.recvb), data, req->req.length)) + ret = -EFAULT; + if (copy_to_user + (int2ptr(req->req.tag), &fi->host->csr.rom->cache_head->len, + sizeof(fi->host->csr.rom->cache_head->len))) + ret = -EFAULT; if (copy_to_user(int2ptr(req->req.address), &fi->host->csr.generation, sizeof(fi->host->csr.generation))) - ret = -EFAULT; - if (copy_to_user(int2ptr(req->req.sendb), &status, - sizeof(status))) - ret = -EFAULT; - kfree(data); - if (ret >= 0) { - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - } - return ret; + ret = -EFAULT; + if (copy_to_user(int2ptr(req->req.sendb), &status, sizeof(status))) + ret = -EFAULT; + kfree(data); + if (ret >= 0) { + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + } + return ret; } static int update_config_rom(struct file_info *fi, struct pending_request *req) { - int ret=sizeof(struct raw1394_request); - quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); - if (!data) return -ENOMEM; - if (copy_from_user(data,int2ptr(req->req.sendb), - req->req.length)) { - ret= -EFAULT; - } else { - int status = hpsb_update_config_rom(fi->host, - data, req->req.length, - (unsigned char) req->req.misc); - if (copy_to_user(int2ptr(req->req.recvb), - &status, sizeof(status))) - ret = -ENOMEM; - } - kfree(data); - if (ret >= 0) { - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + int ret = sizeof(struct raw1394_request); + quadlet_t *data = kmalloc(req->req.length, SLAB_KERNEL); + if (!data) + return -ENOMEM; + if (copy_from_user(data, int2ptr(req->req.sendb), req->req.length)) { + ret = -EFAULT; + } else { + int status = hpsb_update_config_rom(fi->host, + data, req->req.length, + (unsigned char)req->req. + misc); + if (copy_to_user + (int2ptr(req->req.recvb), &status, sizeof(status))) + ret = -ENOMEM; + } + kfree(data); + if (ret >= 0) { + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ fi->cfgrom_upd = 1; - } - return ret; + } + return ret; } static int modify_config_rom(struct file_info *fi, struct pending_request *req) @@ -1943,23 +2068,32 @@ int ret = 0; if (req->req.misc == ~0) { - if (req->req.length == 0) return -EINVAL; + if (req->req.length == 0) + return -EINVAL; /* Find an unused slot */ - for (dr = 0; dr < RAW1394_MAX_USER_CSR_DIRS && fi->csr1212_dirs[dr]; dr++); + for (dr = 0; + dr < RAW1394_MAX_USER_CSR_DIRS && fi->csr1212_dirs[dr]; + dr++) ; - if (dr == RAW1394_MAX_USER_CSR_DIRS) return -ENOMEM; + if (dr == RAW1394_MAX_USER_CSR_DIRS) + return -ENOMEM; - fi->csr1212_dirs[dr] = csr1212_new_directory(CSR1212_KV_ID_VENDOR); - if (!fi->csr1212_dirs[dr]) return -ENOMEM; + fi->csr1212_dirs[dr] = + csr1212_new_directory(CSR1212_KV_ID_VENDOR); + if (!fi->csr1212_dirs[dr]) + return -ENOMEM; } else { dr = req->req.misc; - if (!fi->csr1212_dirs[dr]) return -EINVAL; + if (!fi->csr1212_dirs[dr]) + return -EINVAL; /* Delete old stuff */ - for (dentry = fi->csr1212_dirs[dr]->value.directory.dentries_head; + for (dentry = + fi->csr1212_dirs[dr]->value.directory.dentries_head; dentry; dentry = dentry->next) { - csr1212_detach_keyval_from_directory(fi->host->csr.rom->root_kv, + csr1212_detach_keyval_from_directory(fi->host->csr.rom-> + root_kv, dentry->kv); } @@ -1980,7 +2114,8 @@ return -ENOMEM; } - cache->filled_head = kmalloc(sizeof(struct csr1212_cache_region), GFP_KERNEL); + cache->filled_head = + kmalloc(sizeof(struct csr1212_cache_region), GFP_KERNEL); if (!cache->filled_head) { csr1212_release_keyval(fi->csr1212_dirs[dr]); fi->csr1212_dirs[dr] = NULL; @@ -1994,11 +2129,11 @@ csr1212_release_keyval(fi->csr1212_dirs[dr]); fi->csr1212_dirs[dr] = NULL; CSR1212_FREE(cache); - ret= -EFAULT; + ret = -EFAULT; } else { cache->len = req->req.length; cache->filled_head->offset_start = 0; - cache->filled_head->offset_end = cache->size -1; + cache->filled_head->offset_end = cache->size - 1; cache->layout_head = cache->layout_tail = fi->csr1212_dirs[dr]; @@ -2010,17 +2145,20 @@ } /* attach top level items to the root directory */ - for (dentry = fi->csr1212_dirs[dr]->value.directory.dentries_head; + for (dentry = + fi->csr1212_dirs[dr]->value.directory.dentries_head; ret == CSR1212_SUCCESS && dentry; dentry = dentry->next) { - ret = csr1212_attach_keyval_to_directory(fi->host->csr.rom->root_kv, - dentry->kv); + ret = + csr1212_attach_keyval_to_directory(fi->host->csr. + rom->root_kv, + dentry->kv); } if (ret == CSR1212_SUCCESS) { ret = hpsb_update_config_rom_image(fi->host); if (ret >= 0 && copy_to_user(int2ptr(req->req.recvb), - &dr, sizeof(dr))) { + &dr, sizeof(dr))) { ret = -ENOMEM; } } @@ -2034,9 +2172,11 @@ free_pending_request(req); return sizeof(struct raw1394_request); } else { - for (dentry = fi->csr1212_dirs[dr]->value.directory.dentries_head; + for (dentry = + fi->csr1212_dirs[dr]->value.directory.dentries_head; dentry; dentry = dentry->next) { - csr1212_detach_keyval_from_directory(fi->host->csr.rom->root_kv, + csr1212_detach_keyval_from_directory(fi->host->csr.rom-> + root_kv, dentry->kv); } csr1212_release_keyval(fi->csr1212_dirs[dr]); @@ -2047,133 +2187,132 @@ static int state_connected(struct file_info *fi, struct pending_request *req) { - int node = req->req.address >> 48; + int node = req->req.address >> 48; + + req->req.error = RAW1394_ERROR_NONE; - req->req.error = RAW1394_ERROR_NONE; + switch (req->req.type) { - switch (req->req.type) { + case RAW1394_REQ_ECHO: + queue_complete_req(req); + return sizeof(struct raw1394_request); + + case RAW1394_REQ_ISO_SEND: + return handle_iso_send(fi, req, node); + + case RAW1394_REQ_ARM_REGISTER: + return arm_register(fi, req); + + case RAW1394_REQ_ARM_UNREGISTER: + return arm_unregister(fi, req); + + case RAW1394_REQ_ARM_SET_BUF: + return arm_set_buf(fi, req); - case RAW1394_REQ_ECHO: - queue_complete_req(req); - return sizeof(struct raw1394_request); - - case RAW1394_REQ_ISO_SEND: - return handle_iso_send(fi, req, node); - - case RAW1394_REQ_ARM_REGISTER: - return arm_register(fi, req); - - case RAW1394_REQ_ARM_UNREGISTER: - return arm_unregister(fi, req); - - case RAW1394_REQ_ARM_SET_BUF: - return arm_set_buf(fi, req); - - case RAW1394_REQ_ARM_GET_BUF: - return arm_get_buf(fi, req); - - case RAW1394_REQ_RESET_NOTIFY: - return reset_notification(fi, req); - - case RAW1394_REQ_ISO_LISTEN: - handle_iso_listen(fi, req); - return sizeof(struct raw1394_request); - - case RAW1394_REQ_FCP_LISTEN: - handle_fcp_listen(fi, req); - return sizeof(struct raw1394_request); - - case RAW1394_REQ_RESET_BUS: - if (req->req.misc == RAW1394_LONG_RESET) { - DBGMSG("busreset called (type: LONG)"); - hpsb_reset_bus(fi->host, LONG_RESET); - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - return sizeof(struct raw1394_request); - } - if (req->req.misc == RAW1394_SHORT_RESET) { - DBGMSG("busreset called (type: SHORT)"); - hpsb_reset_bus(fi->host, SHORT_RESET); - free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ - return sizeof(struct raw1394_request); - } - /* error EINVAL (22) invalid argument */ - return (-EINVAL); - case RAW1394_REQ_GET_ROM: - return get_config_rom(fi, req); + case RAW1394_REQ_ARM_GET_BUF: + return arm_get_buf(fi, req); - case RAW1394_REQ_UPDATE_ROM: - return update_config_rom(fi, req); + case RAW1394_REQ_RESET_NOTIFY: + return reset_notification(fi, req); + + case RAW1394_REQ_ISO_LISTEN: + handle_iso_listen(fi, req); + return sizeof(struct raw1394_request); + + case RAW1394_REQ_FCP_LISTEN: + handle_fcp_listen(fi, req); + return sizeof(struct raw1394_request); + + case RAW1394_REQ_RESET_BUS: + if (req->req.misc == RAW1394_LONG_RESET) { + DBGMSG("busreset called (type: LONG)"); + hpsb_reset_bus(fi->host, LONG_RESET); + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + return sizeof(struct raw1394_request); + } + if (req->req.misc == RAW1394_SHORT_RESET) { + DBGMSG("busreset called (type: SHORT)"); + hpsb_reset_bus(fi->host, SHORT_RESET); + free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */ + return sizeof(struct raw1394_request); + } + /* error EINVAL (22) invalid argument */ + return (-EINVAL); + case RAW1394_REQ_GET_ROM: + return get_config_rom(fi, req); + + case RAW1394_REQ_UPDATE_ROM: + return update_config_rom(fi, req); case RAW1394_REQ_MODIFY_ROM: return modify_config_rom(fi, req); - } + } - if (req->req.generation != get_hpsb_generation(fi->host)) { - req->req.error = RAW1394_ERROR_GENERATION; - req->req.generation = get_hpsb_generation(fi->host); - req->req.length = 0; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - switch (req->req.type) { - case RAW1394_REQ_PHYPACKET: - return write_phypacket(fi, req); - case RAW1394_REQ_ASYNC_SEND: - return handle_async_send(fi, req); - } - - if (req->req.length == 0) { - req->req.error = RAW1394_ERROR_INVALID_ARG; - queue_complete_req(req); - return sizeof(struct raw1394_request); - } - - return handle_async_request(fi, req, node); -} - - -static ssize_t raw1394_write(struct file *file, const char __user *buffer, size_t count, - loff_t *offset_is_ignored) -{ - struct file_info *fi = (struct file_info *)file->private_data; - struct pending_request *req; - ssize_t retval = 0; - - if (count != sizeof(struct raw1394_request)) { - return -EINVAL; - } - - req = alloc_pending_request(); - if (req == NULL) { - return -ENOMEM; - } - req->file_info = fi; - - if (copy_from_user(&req->req, buffer, sizeof(struct raw1394_request))) { - free_pending_request(req); - return -EFAULT; - } - - switch (fi->state) { - case opened: - retval = state_opened(fi, req); - break; - - case initialized: - retval = state_initialized(fi, req); - break; - - case connected: - retval = state_connected(fi, req); - break; - } - - if (retval < 0) { - free_pending_request(req); - } + if (req->req.generation != get_hpsb_generation(fi->host)) { + req->req.error = RAW1394_ERROR_GENERATION; + req->req.generation = get_hpsb_generation(fi->host); + req->req.length = 0; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + switch (req->req.type) { + case RAW1394_REQ_PHYPACKET: + return write_phypacket(fi, req); + case RAW1394_REQ_ASYNC_SEND: + return handle_async_send(fi, req); + } - return retval; + if (req->req.length == 0) { + req->req.error = RAW1394_ERROR_INVALID_ARG; + queue_complete_req(req); + return sizeof(struct raw1394_request); + } + + return handle_async_request(fi, req, node); +} + +static ssize_t raw1394_write(struct file *file, const char __user * buffer, + size_t count, loff_t * offset_is_ignored) +{ + struct file_info *fi = (struct file_info *)file->private_data; + struct pending_request *req; + ssize_t retval = 0; + + if (count != sizeof(struct raw1394_request)) { + return -EINVAL; + } + + req = alloc_pending_request(); + if (req == NULL) { + return -ENOMEM; + } + req->file_info = fi; + + if (copy_from_user(&req->req, buffer, sizeof(struct raw1394_request))) { + free_pending_request(req); + return -EFAULT; + } + + switch (fi->state) { + case opened: + retval = state_opened(fi, req); + break; + + case initialized: + retval = state_initialized(fi, req); + break; + + case connected: + retval = state_connected(fi, req); + break; + } + + if (retval < 0) { + free_pending_request(req); + } + + return retval; } /* rawiso operations */ @@ -2185,8 +2324,8 @@ struct pending_request *req; list_for_each_entry(req, &fi->req_complete, list) - if (req->req.type == RAW1394_REQ_RAWISO_ACTIVITY) - return 1; + if (req->req.type == RAW1394_REQ_RAWISO_ACTIVITY) + return 1; return 0; } @@ -2200,7 +2339,8 @@ /* only one ISO activity event may be in the queue */ if (!__rawiso_event_in_queue(fi)) { - struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC); + struct pending_request *req = + __alloc_pending_request(SLAB_ATOMIC); if (req) { req->file_info = fi; @@ -2220,11 +2360,11 @@ static void rawiso_activity_cb(struct hpsb_iso *iso) { unsigned long flags; - struct host_info *hi; + struct host_info *hi; struct file_info *fi; - spin_lock_irqsave(&host_info_lock, flags); - hi = find_host_info(iso->host); + spin_lock_irqsave(&host_info_lock, flags); + hi = find_host_info(iso->host); if (hi != NULL) { list_for_each_entry(fi, &hi->file_info_list, list) { @@ -2237,7 +2377,8 @@ } /* helper function - gather all the kernel iso status bits for returning to user-space */ -static void raw1394_iso_fill_status(struct hpsb_iso *iso, struct raw1394_iso_status *stat) +static void raw1394_iso_fill_status(struct hpsb_iso *iso, + struct raw1394_iso_status *stat) { stat->config.data_buf_size = iso->buf_size; stat->config.buf_packets = iso->buf_packets; @@ -2249,7 +2390,7 @@ stat->xmit_cycle = iso->xmit_cycle; } -static int raw1394_iso_xmit_init(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_xmit_init(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_status stat; @@ -2281,7 +2422,7 @@ return 0; } -static int raw1394_iso_recv_init(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_recv_init(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_status stat; @@ -2295,7 +2436,7 @@ stat.config.data_buf_size, stat.config.buf_packets, stat.config.channel, - stat.config.dma_mode, + stat.config.dma_mode, stat.config.irq_interval, rawiso_activity_cb); if (!fi->iso_handle) @@ -2309,7 +2450,7 @@ return 0; } -static int raw1394_iso_get_status(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_get_status(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_status stat; struct hpsb_iso *iso = fi->iso_handle; @@ -2325,7 +2466,7 @@ } /* copy N packet_infos out of the ringbuffer into user-supplied array */ -static int raw1394_iso_recv_packets(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_recv_packets(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_packets upackets; unsigned int packet = fi->iso_handle->first_packet; @@ -2339,14 +2480,15 @@ /* ensure user-supplied buffer is accessible and big enough */ if (verify_area(VERIFY_WRITE, upackets.infos, - upackets.n_packets * sizeof(struct raw1394_iso_packet_info))) + upackets.n_packets * + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; /* copy the packet_infos out */ for (i = 0; i < upackets.n_packets; i++) { if (__copy_to_user(&upackets.infos[i], - &fi->iso_handle->infos[packet], - sizeof(struct raw1394_iso_packet_info))) + &fi->iso_handle->infos[packet], + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; packet = (packet + 1) % fi->iso_handle->buf_packets; @@ -2356,7 +2498,7 @@ } /* copy N packet_infos from user to ringbuffer, and queue them for transmission */ -static int raw1394_iso_send_packets(struct file_info *fi, void __user *uaddr) +static int raw1394_iso_send_packets(struct file_info *fi, void __user * uaddr) { struct raw1394_iso_packets upackets; int i, rv; @@ -2369,7 +2511,8 @@ /* ensure user-supplied buffer is accessible and big enough */ if (verify_area(VERIFY_READ, upackets.infos, - upackets.n_packets * sizeof(struct raw1394_iso_packet_info))) + upackets.n_packets * + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; /* copy the infos structs in and queue the packets */ @@ -2377,7 +2520,7 @@ struct raw1394_iso_packet_info info; if (__copy_from_user(&info, &upackets.infos[i], - sizeof(struct raw1394_iso_packet_info))) + sizeof(struct raw1394_iso_packet_info))) return -EFAULT; rv = hpsb_iso_xmit_queue_packet(fi->iso_handle, info.offset, @@ -2410,14 +2553,15 @@ } /* ioctl is only used for rawiso operations */ -static int raw1394_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +static int raw1394_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { struct file_info *fi = file->private_data; void __user *argp = (void __user *)arg; - switch(fi->iso_state) { + switch (fi->iso_state) { case RAW1394_ISO_INACTIVE: - switch(cmd) { + switch (cmd) { case RAW1394_IOC_ISO_XMIT_INIT: return raw1394_iso_xmit_init(fi, argp); case RAW1394_IOC_ISO_RECV_INIT: @@ -2427,34 +2571,42 @@ } break; case RAW1394_ISO_RECV: - switch(cmd) { - case RAW1394_IOC_ISO_RECV_START: { - /* copy args from user-space */ - int args[3]; - if (copy_from_user(&args[0], argp, sizeof(args))) - return -EFAULT; - return hpsb_iso_recv_start(fi->iso_handle, args[0], args[1], args[2]); - } + switch (cmd) { + case RAW1394_IOC_ISO_RECV_START:{ + /* copy args from user-space */ + int args[3]; + if (copy_from_user + (&args[0], argp, sizeof(args))) + return -EFAULT; + return hpsb_iso_recv_start(fi->iso_handle, + args[0], args[1], + args[2]); + } case RAW1394_IOC_ISO_XMIT_RECV_STOP: hpsb_iso_stop(fi->iso_handle); return 0; case RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL: - return hpsb_iso_recv_listen_channel(fi->iso_handle, arg); + return hpsb_iso_recv_listen_channel(fi->iso_handle, + arg); case RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL: - return hpsb_iso_recv_unlisten_channel(fi->iso_handle, arg); - case RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK: { - /* copy the u64 from user-space */ - u64 mask; - if (copy_from_user(&mask, argp, sizeof(mask))) - return -EFAULT; - return hpsb_iso_recv_set_channel_mask(fi->iso_handle, mask); - } + return hpsb_iso_recv_unlisten_channel(fi->iso_handle, + arg); + case RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK:{ + /* copy the u64 from user-space */ + u64 mask; + if (copy_from_user(&mask, argp, sizeof(mask))) + return -EFAULT; + return hpsb_iso_recv_set_channel_mask(fi-> + iso_handle, + mask); + } case RAW1394_IOC_ISO_GET_STATUS: return raw1394_iso_get_status(fi, argp); case RAW1394_IOC_ISO_RECV_PACKETS: return raw1394_iso_recv_packets(fi, argp); case RAW1394_IOC_ISO_RECV_RELEASE_PACKETS: - return hpsb_iso_recv_release_packets(fi->iso_handle, arg); + return hpsb_iso_recv_release_packets(fi->iso_handle, + arg); case RAW1394_IOC_ISO_RECV_FLUSH: return hpsb_iso_recv_flush(fi->iso_handle); case RAW1394_IOC_ISO_SHUTDOWN: @@ -2466,14 +2618,16 @@ } break; case RAW1394_ISO_XMIT: - switch(cmd) { - case RAW1394_IOC_ISO_XMIT_START: { - /* copy two ints from user-space */ - int args[2]; - if (copy_from_user(&args[0], argp, sizeof(args))) - return -EFAULT; - return hpsb_iso_xmit_start(fi->iso_handle, args[0], args[1]); - } + switch (cmd) { + case RAW1394_IOC_ISO_XMIT_START:{ + /* copy two ints from user-space */ + int args[2]; + if (copy_from_user + (&args[0], argp, sizeof(args))) + return -EFAULT; + return hpsb_iso_xmit_start(fi->iso_handle, + args[0], args[1]); + } case RAW1394_IOC_ISO_XMIT_SYNC: return hpsb_iso_xmit_sync(fi->iso_handle); case RAW1394_IOC_ISO_XMIT_RECV_STOP: @@ -2498,270 +2652,303 @@ return -EINVAL; } -static unsigned int raw1394_poll(struct file *file, poll_table *pt) +static unsigned int raw1394_poll(struct file *file, poll_table * pt) { - struct file_info *fi = file->private_data; - unsigned int mask = POLLOUT | POLLWRNORM; + struct file_info *fi = file->private_data; + unsigned int mask = POLLOUT | POLLWRNORM; - poll_wait(file, &fi->poll_wait_complete, pt); + poll_wait(file, &fi->poll_wait_complete, pt); - spin_lock_irq(&fi->reqlists_lock); - if (!list_empty(&fi->req_complete)) { - mask |= POLLIN | POLLRDNORM; - } - spin_unlock_irq(&fi->reqlists_lock); + spin_lock_irq(&fi->reqlists_lock); + if (!list_empty(&fi->req_complete)) { + mask |= POLLIN | POLLRDNORM; + } + spin_unlock_irq(&fi->reqlists_lock); - return mask; + return mask; } static int raw1394_open(struct inode *inode, struct file *file) { - struct file_info *fi; + struct file_info *fi; + + fi = kmalloc(sizeof(struct file_info), SLAB_KERNEL); + if (fi == NULL) + return -ENOMEM; + + memset(fi, 0, sizeof(struct file_info)); + fi->notification = (u8) RAW1394_NOTIFY_ON; /* busreset notification */ - fi = kmalloc(sizeof(struct file_info), SLAB_KERNEL); - if (fi == NULL) - return -ENOMEM; - - memset(fi, 0, sizeof(struct file_info)); - fi->notification = (u8) RAW1394_NOTIFY_ON; /* busreset notification */ - - INIT_LIST_HEAD(&fi->list); - fi->state = opened; - INIT_LIST_HEAD(&fi->req_pending); - INIT_LIST_HEAD(&fi->req_complete); - sema_init(&fi->complete_sem, 0); - spin_lock_init(&fi->reqlists_lock); - init_waitqueue_head(&fi->poll_wait_complete); - INIT_LIST_HEAD(&fi->addr_list); + INIT_LIST_HEAD(&fi->list); + fi->state = opened; + INIT_LIST_HEAD(&fi->req_pending); + INIT_LIST_HEAD(&fi->req_complete); + sema_init(&fi->complete_sem, 0); + spin_lock_init(&fi->reqlists_lock); + init_waitqueue_head(&fi->poll_wait_complete); + INIT_LIST_HEAD(&fi->addr_list); - file->private_data = fi; + file->private_data = fi; - return 0; + return 0; } static int raw1394_release(struct inode *inode, struct file *file) { - struct file_info *fi = file->private_data; - struct list_head *lh; - struct pending_request *req; - int done = 0, i, fail = 0; - int retval = 0; - struct list_head *entry; - struct arm_addr *addr = NULL; - struct host_info *hi; - struct file_info *fi_hlp = NULL; - struct arm_addr *arm_addr = NULL; - int another_host; + struct file_info *fi = file->private_data; + struct list_head *lh; + struct pending_request *req; + int done = 0, i, fail = 0; + int retval = 0; + struct list_head *entry; + struct arm_addr *addr = NULL; + struct host_info *hi; + struct file_info *fi_hlp = NULL; + struct arm_addr *arm_addr = NULL; + int another_host; int csr_mod = 0; if (fi->iso_state != RAW1394_ISO_INACTIVE) raw1394_iso_shutdown(fi); - for (i = 0; i < 64; i++) { - if (fi->listen_channels & (1ULL << i)) { - hpsb_unlisten_channel(&raw1394_highlevel, fi->host, i); - } - } - - spin_lock_irq(&host_info_lock); - fi->listen_channels = 0; - spin_unlock_irq(&host_info_lock); - - fail = 0; - /* set address-entries invalid */ - spin_lock_irq(&host_info_lock); - - while (!list_empty(&fi->addr_list)) { - another_host = 0; - lh = fi->addr_list.next; - addr = list_entry(lh, struct arm_addr, addr_list); - /* another host with valid address-entry containing - same addressrange? */ - list_for_each_entry(hi, &host_info_list, list) { - if (hi->host != fi->host) { - list_for_each_entry(fi_hlp, &hi->file_info_list, list) { - entry = fi_hlp->addr_list.next; - while (entry != &(fi_hlp->addr_list)) { - arm_addr = list_entry(entry, - struct arm_addr, addr_list); - if (arm_addr->start == - addr->start) { - DBGMSG("raw1394_release: " - "another host ownes " - "same addressrange"); - another_host = 1; - break; - } - entry = entry->next; - } - if (another_host) { - break; - } - } - } - } - if (!another_host) { - DBGMSG("raw1394_release: call hpsb_arm_unregister"); - retval = hpsb_unregister_addrspace(&raw1394_highlevel, fi->host, addr->start); - if (!retval) { - ++fail; - printk(KERN_ERR "raw1394_release arm_Unregister failed\n"); - } - } - DBGMSG("raw1394_release: delete addr_entry from list"); - list_del(&addr->addr_list); - vfree(addr->addr_space_buffer); - kfree(addr); - } /* while */ - spin_unlock_irq(&host_info_lock); - if (fail > 0) { - printk(KERN_ERR "raw1394: during addr_list-release " - "error(s) occurred \n"); - } - - while (!done) { - spin_lock_irq(&fi->reqlists_lock); - - while (!list_empty(&fi->req_complete)) { - lh = fi->req_complete.next; - list_del(lh); - - req = list_entry(lh, struct pending_request, list); - - free_pending_request(req); - } + for (i = 0; i < 64; i++) { + if (fi->listen_channels & (1ULL << i)) { + hpsb_unlisten_channel(&raw1394_highlevel, fi->host, i); + } + } + + spin_lock_irq(&host_info_lock); + fi->listen_channels = 0; + spin_unlock_irq(&host_info_lock); + + fail = 0; + /* set address-entries invalid */ + spin_lock_irq(&host_info_lock); + + while (!list_empty(&fi->addr_list)) { + another_host = 0; + lh = fi->addr_list.next; + addr = list_entry(lh, struct arm_addr, addr_list); + /* another host with valid address-entry containing + same addressrange? */ + list_for_each_entry(hi, &host_info_list, list) { + if (hi->host != fi->host) { + list_for_each_entry(fi_hlp, &hi->file_info_list, + list) { + entry = fi_hlp->addr_list.next; + while (entry != &(fi_hlp->addr_list)) { + arm_addr = list_entry(entry, struct + arm_addr, + addr_list); + if (arm_addr->start == + addr->start) { + DBGMSG + ("raw1394_release: " + "another host ownes " + "same addressrange"); + another_host = 1; + break; + } + entry = entry->next; + } + if (another_host) { + break; + } + } + } + } + if (!another_host) { + DBGMSG("raw1394_release: call hpsb_arm_unregister"); + retval = + hpsb_unregister_addrspace(&raw1394_highlevel, + fi->host, addr->start); + if (!retval) { + ++fail; + printk(KERN_ERR + "raw1394_release arm_Unregister failed\n"); + } + } + DBGMSG("raw1394_release: delete addr_entry from list"); + list_del(&addr->addr_list); + vfree(addr->addr_space_buffer); + kfree(addr); + } /* while */ + spin_unlock_irq(&host_info_lock); + if (fail > 0) { + printk(KERN_ERR "raw1394: during addr_list-release " + "error(s) occurred \n"); + } + + while (!done) { + spin_lock_irq(&fi->reqlists_lock); + + while (!list_empty(&fi->req_complete)) { + lh = fi->req_complete.next; + list_del(lh); + + req = list_entry(lh, struct pending_request, list); - if (list_empty(&fi->req_pending)) done = 1; + free_pending_request(req); + } - spin_unlock_irq(&fi->reqlists_lock); + if (list_empty(&fi->req_pending)) + done = 1; - if (!done) down_interruptible(&fi->complete_sem); - } + spin_unlock_irq(&fi->reqlists_lock); + + if (!done) + down_interruptible(&fi->complete_sem); + } /* Remove any sub-trees left by user space programs */ for (i = 0; i < RAW1394_MAX_USER_CSR_DIRS; i++) { struct csr1212_dentry *dentry; - if (!fi->csr1212_dirs[i]) continue; - for (dentry = fi->csr1212_dirs[i]->value.directory.dentries_head; - dentry; dentry = dentry->next) { - csr1212_detach_keyval_from_directory(fi->host->csr.rom->root_kv, dentry->kv); + if (!fi->csr1212_dirs[i]) + continue; + for (dentry = + fi->csr1212_dirs[i]->value.directory.dentries_head; dentry; + dentry = dentry->next) { + csr1212_detach_keyval_from_directory(fi->host->csr.rom-> + root_kv, + dentry->kv); } csr1212_release_keyval(fi->csr1212_dirs[i]); fi->csr1212_dirs[i] = NULL; csr_mod = 1; } - if ((csr_mod || fi->cfgrom_upd) && hpsb_update_config_rom_image(fi->host) < 0) - HPSB_ERR("Failed to generate Configuration ROM image for host %d", fi->host->id); - - if (fi->state == connected) { - spin_lock_irq(&host_info_lock); - list_del(&fi->list); - spin_unlock_irq(&host_info_lock); + if ((csr_mod || fi->cfgrom_upd) + && hpsb_update_config_rom_image(fi->host) < 0) + HPSB_ERR + ("Failed to generate Configuration ROM image for host %d", + fi->host->id); + + if (fi->state == connected) { + spin_lock_irq(&host_info_lock); + list_del(&fi->list); + spin_unlock_irq(&host_info_lock); put_device(&fi->host->device); - } + } - kfree(fi); + kfree(fi); - return 0; + return 0; } - /*** HOTPLUG STUFF **********************************************************/ /* * Export information about protocols/devices supported by this driver. */ static struct ieee1394_device_id raw1394_id_table[] = { { - .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, - .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff, - .version = AVC_SW_VERSION_ENTRY & 0xffffff - }, + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = AVC_SW_VERSION_ENTRY & 0xffffff}, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = CAMERA_SW_VERSION_ENTRY & 0xffffff}, { - .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, - .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, - .version = CAMERA_SW_VERSION_ENTRY & 0xffffff - }, - { } + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 1) & 0xffffff}, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff}, + {} }; MODULE_DEVICE_TABLE(ieee1394, raw1394_id_table); static struct hpsb_protocol_driver raw1394_driver = { - .name = "raw1394 Driver", - .id_table = raw1394_id_table, - .driver = { - .name = "raw1394", - .bus = &ieee1394_bus_type, - }, + .name = "raw1394 Driver", + .id_table = raw1394_id_table, + .driver = { + .name = "raw1394", + .bus = &ieee1394_bus_type, + }, }; - /******************************************************************************/ - static struct hpsb_highlevel raw1394_highlevel = { - .name = RAW1394_DEVICE_NAME, - .add_host = add_host, - .remove_host = remove_host, - .host_reset = host_reset, - .iso_receive = iso_receive, - .fcp_request = fcp_request, + .name = RAW1394_DEVICE_NAME, + .add_host = add_host, + .remove_host = remove_host, + .host_reset = host_reset, + .iso_receive = iso_receive, + .fcp_request = fcp_request, }; static struct cdev raw1394_cdev; static struct file_operations raw1394_fops = { - .owner = THIS_MODULE, - .read = raw1394_read, - .write = raw1394_write, - .mmap = raw1394_mmap, - .ioctl = raw1394_ioctl, - .poll = raw1394_poll, - .open = raw1394_open, - .release = raw1394_release, + .owner = THIS_MODULE, + .read = raw1394_read, + .write = raw1394_write, + .mmap = raw1394_mmap, + .ioctl = raw1394_ioctl, + .poll = raw1394_poll, + .open = raw1394_open, + .release = raw1394_release, }; static int __init init_raw1394(void) { - int ret; + int ret = 0; hpsb_register_highlevel(&raw1394_highlevel); - devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), - S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); + if (IS_ERR(class_simple_device_add(hpsb_protocol_class, MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), + NULL, RAW1394_DEVICE_NAME))) { + ret = -EFAULT; + goto out_unreg; + } + + devfs_mk_cdev(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), + S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME); cdev_init(&raw1394_cdev, &raw1394_fops); raw1394_cdev.owner = THIS_MODULE; kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME); ret = cdev_add(&raw1394_cdev, IEEE1394_RAW1394_DEV, 1); if (ret) { - HPSB_ERR("raw1394 failed to register minor device block"); - devfs_remove(RAW1394_DEVICE_NAME); - hpsb_unregister_highlevel(&raw1394_highlevel); - return ret; - } + HPSB_ERR("raw1394 failed to register minor device block"); + goto out_dev; + } - HPSB_INFO("raw1394: /dev/%s device initialized", RAW1394_DEVICE_NAME); + HPSB_INFO("raw1394: /dev/%s device initialized", RAW1394_DEVICE_NAME); ret = hpsb_register_protocol(&raw1394_driver); if (ret) { HPSB_ERR("raw1394: failed to register protocol"); cdev_del(&raw1394_cdev); - devfs_remove(RAW1394_DEVICE_NAME); - hpsb_unregister_highlevel(&raw1394_highlevel); - return ret; + goto out_dev; } - return 0; + goto out; + +out_dev: + devfs_remove(RAW1394_DEVICE_NAME); + class_simple_device_remove(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); +out_unreg: + hpsb_unregister_highlevel(&raw1394_highlevel); +out: + return ret; } static void __exit cleanup_raw1394(void) { + class_simple_device_remove(MKDEV( + IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16)); hpsb_unregister_protocol(&raw1394_driver); cdev_del(&raw1394_cdev); - devfs_remove(RAW1394_DEVICE_NAME); - hpsb_unregister_highlevel(&raw1394_highlevel); + devfs_remove(RAW1394_DEVICE_NAME); + hpsb_unregister_highlevel(&raw1394_highlevel); } module_init(init_raw1394); diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c --- a/drivers/ieee1394/sbp2.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/sbp2.c 2005-03-07 14:54:16 -08:00 @@ -64,7 +64,10 @@ #include #include -#include "../scsi/scsi.h" +#include +#include +#include +#include #include #include "csr1212.h" @@ -224,12 +227,12 @@ u32 status); static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, - u32 scsi_status, Scsi_Cmnd *SCpnt, - void (*done)(Scsi_Cmnd *)); + u32 scsi_status, struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)); -static Scsi_Host_Template scsi_driver_template; +static struct scsi_host_template scsi_driver_template; -const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, 0xC }; +static const u8 sbp2_speedto_max_payload[] = { 0x7, 0x8, 0x9, 0xA, 0xB, 0xC }; static void sbp2_host_reset(struct hpsb_host *host); @@ -373,7 +376,7 @@ /* This is much like hpsb_node_write(), except it ignores the response * subaction and returns immediately. Can be used from interrupts. */ -int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr, +static int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr, quadlet_t *buffer, size_t length) { struct hpsb_packet *packet; @@ -520,8 +523,8 @@ */ static struct sbp2_command_info *sbp2util_allocate_command_orb( struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *Current_SCpnt, - void (*Current_done)(Scsi_Cmnd *)) + struct scsi_cmnd *Current_SCpnt, + void (*Current_done)(struct scsi_cmnd *)) { struct list_head *lh; struct sbp2_command_info *command = NULL; @@ -1521,8 +1524,9 @@ SBP2_DEBUG("sbp2_management_agent_addr = %x", (unsigned int) management_agent_addr); - } else + } else if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) { scsi_id->sbp2_device_type_and_lun = kv->value.immediate; + } break; case SBP2_COMMAND_SET_SPEC_ID_KEY: @@ -1613,6 +1617,8 @@ scsi_id->sbp2_unit_characteristics = unit_characteristics; scsi_id->sbp2_firmware_revision = firmware_revision; scsi_id->workarounds = workarounds; + if (ud->flags & UNIT_DIRECTORY_HAS_LUN) + scsi_id->sbp2_device_type_and_lun = ud->lun; } } @@ -1700,14 +1706,14 @@ unsigned int scsi_use_sg, unsigned int scsi_request_bufflen, void *scsi_request_buffer, - unsigned char scsi_dir) + enum dma_data_direction dma_dir) + { struct sbp2scsi_host_info *hi = scsi_id->hi; struct scatterlist *sgpnt = (struct scatterlist *) scsi_request_buffer; struct sbp2_command_orb *command_orb = &command->command_orb; struct sbp2_unrestricted_page_table *scatter_gather_element = &command->scatter_gather_element[0]; - int dma_dir = scsi_to_pci_dma_dir (scsi_dir); u32 sg_count, sg_len, orb_direction; dma_addr_t sg_addr; int i; @@ -1730,22 +1736,22 @@ * Get the direction of the transfer. If the direction is unknown, then use our * goofy table as a back-up. */ - switch (scsi_dir) { - case SCSI_DATA_NONE: + switch (dma_dir) { + case DMA_NONE: orb_direction = ORB_DIRECTION_NO_DATA_TRANSFER; break; - case SCSI_DATA_WRITE: + case DMA_TO_DEVICE: orb_direction = ORB_DIRECTION_WRITE_TO_MEDIA; break; - case SCSI_DATA_READ: + case DMA_FROM_DEVICE: orb_direction = ORB_DIRECTION_READ_FROM_MEDIA; break; - case SCSI_DATA_UNKNOWN: + case DMA_BIDIRECTIONAL: default: SBP2_ERR("SCSI data transfer direction not specified. " "Update the SBP2 direction table in sbp2.h if " "necessary for your application"); - print_command (scsi_cmd); + __scsi_print_command(scsi_cmd); orb_direction = sbp2scsi_direction_table[*scsi_cmd]; break; } @@ -2031,7 +2037,8 @@ * This function is called in order to begin a regular SBP-2 command. */ static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) + struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)) { unchar *cmd = (unchar *) SCpnt->cmnd; unsigned int request_bufflen = SCpnt->request_bufflen; @@ -2040,7 +2047,7 @@ SBP2_DEBUG("sbp2_send_command"); #if (CONFIG_IEEE1394_SBP2_DEBUG >= 2) || defined(CONFIG_IEEE1394_SBP2_PACKET_DUMP) printk("[scsi command]\n "); - print_command (cmd); + scsi_print_command(SCpnt); #endif SBP2_DEBUG("SCSI transfer size = %x", request_bufflen); SBP2_DEBUG("SCSI s/g elements = %x", (unsigned int)SCpnt->use_sg); @@ -2233,7 +2240,7 @@ * response data translations for the SCSI stack */ static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *SCpnt) + struct scsi_cmnd *SCpnt) { u8 *scsi_buf = SCpnt->request_buffer; u8 device_type = SBP2_DEVICE_TYPE (scsi_id->sbp2_device_type_and_lun); @@ -2312,7 +2319,7 @@ struct sbp2scsi_host_info *hi; struct scsi_id_instance_data *scsi_id = NULL, *scsi_id_tmp; u32 id; - Scsi_Cmnd *SCpnt = NULL; + struct scsi_cmnd *SCpnt = NULL; u32 scsi_status = SBP2_SCSI_STATUS_GOOD; struct sbp2_command_info *command; @@ -2454,7 +2461,8 @@ * This routine is the main request entry routine for doing I/O. It is * called from the scsi stack directly. */ -static int sbp2scsi_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) +static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)) { struct scsi_id_instance_data *scsi_id = (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; @@ -2550,9 +2558,8 @@ PCI_DMA_BIDIRECTIONAL); sbp2util_mark_command_completed(scsi_id, command); if (command->Current_SCpnt) { - void (*done)(Scsi_Cmnd *) = command->Current_done; command->Current_SCpnt->result = status << 16; - done (command->Current_SCpnt); + command->Current_done(command->Current_SCpnt); } } @@ -2565,8 +2572,8 @@ * This can be called in interrupt context. */ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, - u32 scsi_status, Scsi_Cmnd *SCpnt, - void (*done)(Scsi_Cmnd *)) + u32 scsi_status, struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)) { unsigned long flags; @@ -2611,8 +2618,8 @@ * Debug stuff */ #if CONFIG_IEEE1394_SBP2_DEBUG >= 1 - print_command (SCpnt->cmnd); - print_sense("bh", SCpnt); + scsi_print_command(SCpnt); + scsi_print_sense("bh", SCpnt); #endif break; @@ -2620,7 +2627,7 @@ case SBP2_SCSI_STATUS_SELECTION_TIMEOUT: SBP2_ERR("SBP2_SCSI_STATUS_SELECTION_TIMEOUT"); SCpnt->result = DID_NO_CONNECT << 16; - print_command (SCpnt->cmnd); + scsi_print_command(SCpnt); break; case SBP2_SCSI_STATUS_CONDITION_MET: @@ -2628,7 +2635,7 @@ case SBP2_SCSI_STATUS_COMMAND_TERMINATED: SBP2_ERR("Bad SCSI status = %x", scsi_status); SCpnt->result = DID_ERROR << 16; - print_command (SCpnt->cmnd); + scsi_print_command(SCpnt); break; default: @@ -2688,7 +2695,7 @@ * Called by scsi stack when something has really gone wrong. Usually * called when a command has timed-out for some reason. */ -static int sbp2scsi_abort (Scsi_Cmnd *SCpnt) +static int sbp2scsi_abort(struct scsi_cmnd *SCpnt) { struct scsi_id_instance_data *scsi_id = (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; @@ -2696,7 +2703,7 @@ struct sbp2_command_info *command; SBP2_ERR("aborting sbp2 command"); - print_command (SCpnt->cmnd); + scsi_print_command(SCpnt); if (scsi_id) { @@ -2717,9 +2724,8 @@ PCI_DMA_BIDIRECTIONAL); sbp2util_mark_command_completed(scsi_id, command); if (command->Current_SCpnt) { - void (*done)(Scsi_Cmnd *) = command->Current_done; command->Current_SCpnt->result = DID_ABORT << 16; - done (command->Current_SCpnt); + command->Current_done(command->Current_SCpnt); } } @@ -2736,7 +2742,7 @@ /* * Called by scsi stack when something has really gone wrong. */ -static int sbp2scsi_reset (Scsi_Cmnd *SCpnt) +static int sbp2scsi_reset(struct scsi_cmnd *SCpnt) { struct scsi_id_instance_data *scsi_id = (struct scsi_id_instance_data *)SCpnt->device->host->hostdata[0]; @@ -2789,7 +2795,7 @@ MODULE_LICENSE("GPL"); /* SCSI host template */ -static Scsi_Host_Template scsi_driver_template = { +static struct scsi_host_template scsi_driver_template = { .module = THIS_MODULE, .name = "SBP-2 IEEE-1394", .proc_name = SBP2_DEVICE_NAME, diff -Nru a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h --- a/drivers/ieee1394/sbp2.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/sbp2.h 2005-03-07 14:54:16 -08:00 @@ -324,8 +324,8 @@ struct list_head list; struct sbp2_command_orb command_orb ____cacheline_aligned; dma_addr_t command_orb_dma ____cacheline_aligned; - Scsi_Cmnd *Current_SCpnt; - void (*Current_done)(Scsi_Cmnd *); + struct scsi_cmnd *Current_SCpnt; + void (*Current_done)(struct scsi_cmnd *); /* Also need s/g structure for each sbp2 command */ struct sbp2_unrestricted_page_table scatter_gather_element[SG_ALL] ____cacheline_aligned; @@ -434,8 +434,8 @@ static struct sbp2_command_info *sbp2util_find_command_for_orb(struct scsi_id_instance_data *scsi_id, dma_addr_t orb); static struct sbp2_command_info *sbp2util_find_command_for_SCpnt(struct scsi_id_instance_data *scsi_id, void *SCpnt); static struct sbp2_command_info *sbp2util_allocate_command_orb(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *Current_SCpnt, - void (*Current_done)(Scsi_Cmnd *)); + struct scsi_cmnd *Current_SCpnt, + void (*Current_done)(struct scsi_cmnd *)); static void sbp2util_mark_command_completed(struct scsi_id_instance_data *scsi_id, struct sbp2_command_info *command); @@ -466,14 +466,16 @@ unsigned int scsi_use_sg, unsigned int scsi_request_bufflen, void *scsi_request_buffer, - unsigned char scsi_dir); + enum dma_data_direction dma_dir); static int sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id, struct sbp2_command_info *command); static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, - Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)); + struct scsi_cmnd *SCpnt, + void (*done)(struct scsi_cmnd *)); static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, unchar *sense_data); static void sbp2_check_sbp2_command(struct scsi_id_instance_data *scsi_id, unchar *cmd); -static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, Scsi_Cmnd *SCpnt); +static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, + struct scsi_cmnd *SCpnt); static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id, struct unit_directory *ud); static int sbp2_set_busy_timeout(struct scsi_id_instance_data *scsi_id); diff -Nru a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c --- a/drivers/ieee1394/video1394.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/ieee1394/video1394.c 2005-03-07 14:54:16 -08:00 @@ -16,14 +16,25 @@ * 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. + * + * NOTES: + * + * jds -- add private data to file to keep track of iso contexts associated + * with each open -- so release won't kill all iso transfers. + * + * Damien Douxchamps: Fix failure when the number of DMA pages per frame is + * one. + * + * ioctl return codes: + * EFAULT is only for invalid address for the argp + * EINVAL for out of range values + * EBUSY when trying to use an already used resource + * ESRCH when trying to free/stop a not used resource + * EAGAIN for resource allocation failure that could perhaps succeed later + * ENOTTY for unsupported ioctl request + * */ -/* jds -- add private data to file to keep track of iso contexts associated - with each open -- so release won't kill all iso transfers */ - -/* Damien Douxchamps: Fix failure when the number of DMA pages per frame is - one */ - #include #include #include @@ -146,8 +157,8 @@ #define PRINT(level, card, fmt, args...) \ printk(level "video1394_%d: " fmt "\n" , card , ## args) -void wakeup_dma_ir_ctx(unsigned long l); -void wakeup_dma_it_ctx(unsigned long l); +static void wakeup_dma_ir_ctx(unsigned long l); +static void wakeup_dma_it_ctx(unsigned long l); static struct hpsb_highlevel video1394_highlevel; @@ -487,7 +498,7 @@ return NULL; } -void wakeup_dma_ir_ctx(unsigned long l) +static void wakeup_dma_ir_ctx(unsigned long l) { struct dma_iso_ctx *d = (struct dma_iso_ctx *) l; int i; @@ -560,7 +571,7 @@ #endif } -void wakeup_dma_it_ctx(unsigned long l) +static void wakeup_dma_it_ctx(unsigned long l) { struct dma_iso_ctx *d = (struct dma_iso_ctx *) l; struct ti_ohci *ohci = d->ohci; @@ -723,7 +734,12 @@ /* if channel < 0, find lowest available one */ if (v.channel < 0) { mask = (u64)0x1; - for (i=0; ihost->id, + "No free channel found"); + return EAGAIN; + } if (!(ohci->ISO_channel_usage & mask)) { v.channel = i; PRINT(KERN_INFO, ohci->host->id, "Found free channel %d", i); @@ -731,42 +747,40 @@ } mask = mask << 1; } - } - - if (v.channel<0 || v.channel>(ISO_CHANNELS-1)) { + } else if (v.channel >= ISO_CHANNELS) { PRINT(KERN_ERR, ohci->host->id, "Iso channel %d out of bounds", v.channel); - return -EFAULT; + return -EINVAL; + } else { + mask = (u64)0x1<>32),(u32)(mask&0xffffffff), - (u32)(ohci->ISO_channel_usage>>32), - (u32)(ohci->ISO_channel_usage&0xffffffff)); + PRINT(KERN_INFO, ohci->host->id, "mask: %08X%08X usage: %08X%08X\n", + (u32)(mask>>32),(u32)(mask&0xffffffff), + (u32)(ohci->ISO_channel_usage>>32), + (u32)(ohci->ISO_channel_usage&0xffffffff)); if (ohci->ISO_channel_usage & mask) { PRINT(KERN_ERR, ohci->host->id, "Channel %d is already taken", v.channel); - return -EFAULT; + return -EBUSY; } - ohci->ISO_channel_usage |= mask; if (v.buf_size == 0 || v.buf_size > VIDEO1394_MAX_SIZE) { PRINT(KERN_ERR, ohci->host->id, "Invalid %d length buffer requested",v.buf_size); - return -EFAULT; + return -EINVAL; } if (v.nb_buffers == 0 || v.nb_buffers > VIDEO1394_MAX_SIZE) { PRINT(KERN_ERR, ohci->host->id, "Invalid %d buffers requested",v.nb_buffers); - return -EFAULT; + return -EINVAL; } if (v.nb_buffers * v.buf_size > VIDEO1394_MAX_SIZE) { PRINT(KERN_ERR, ohci->host->id, "%d buffers of size %d bytes is too big", v.nb_buffers, v.buf_size); - return -EFAULT; + return -EINVAL; } if (cmd == VIDEO1394_IOC_LISTEN_CHANNEL) { @@ -777,7 +791,7 @@ if (d == NULL) { PRINT(KERN_ERR, ohci->host->id, "Couldn't allocate ir context"); - return -EFAULT; + return -EAGAIN; } initialize_dma_ir_ctx(d, v.sync_tag, v.flags); @@ -798,7 +812,7 @@ if (d == NULL) { PRINT(KERN_ERR, ohci->host->id, "Couldn't allocate it context"); - return -EFAULT; + return -EAGAIN; } initialize_dma_it_ctx(d, v.sync_tag, v.syt_offset, v.flags); @@ -814,8 +828,12 @@ v.channel); } - if (copy_to_user(argp, &v, sizeof(v))) + if (copy_to_user((void *)arg, &v, sizeof(v))) { + /* FIXME : free allocated dma resources */ return -EFAULT; + } + + ohci->ISO_channel_usage |= mask; return 0; } @@ -829,16 +847,16 @@ if (copy_from_user(&channel, argp, sizeof(int))) return -EFAULT; - if (channel<0 || channel>(ISO_CHANNELS-1)) { + if (channel < 0 || channel >= ISO_CHANNELS) { PRINT(KERN_ERR, ohci->host->id, "Iso channel %d out of bound", channel); - return -EFAULT; + return -EINVAL; } mask = (u64)0x1<ISO_channel_usage & mask)) { PRINT(KERN_ERR, ohci->host->id, "Channel %d is not being used", channel); - return -EFAULT; + return -ESRCH; } /* Mark this channel as unused */ @@ -849,7 +867,7 @@ else d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, channel); - if (d == NULL) return -EFAULT; + if (d == NULL) return -ESRCH; PRINT(KERN_INFO, ohci->host->id, "Iso context %d " "stop talking on channel %d", d->ctx, channel); free_dma_iso_ctx(d); @@ -870,7 +888,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } spin_lock_irqsave(&d->lock,flags); @@ -879,7 +897,7 @@ PRINT(KERN_ERR, ohci->host->id, "Buffer %d is already used",v.buffer); spin_unlock_irqrestore(&d->lock,flags); - return -EFAULT; + return -EBUSY; } d->buffer_status[v.buffer]=VIDEO1394_BUFFER_QUEUED; @@ -933,7 +951,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } /* @@ -976,7 +994,7 @@ PRINT(KERN_ERR, ohci->host->id, "Buffer %d is not queued",v.buffer); spin_unlock_irqrestore(&d->lock, flags); - return -EFAULT; + return -ESRCH; } /* set time of buffer */ @@ -1015,7 +1033,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } if (d->flags & VIDEO1394_VARIABLE_PACKET_SIZE) { @@ -1044,7 +1062,7 @@ spin_unlock_irqrestore(&d->lock,flags); if (psizes) kfree(psizes); - return -EFAULT; + return -EBUSY; } if (d->flags & VIDEO1394_VARIABLE_PACKET_SIZE) { @@ -1118,7 +1136,7 @@ if ((v.buffer<0) || (v.buffer>d->num_desc)) { PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); - return -EFAULT; + return -EINVAL; } switch(d->buffer_status[v.buffer]) { @@ -1144,11 +1162,11 @@ default: PRINT(KERN_ERR, ohci->host->id, "Buffer %d is not queued",v.buffer); - return -EFAULT; + return -ESRCH; } } default: - return -EINVAL; + return -ENOTTY; } } @@ -1170,7 +1188,7 @@ * But e.g. pte_alloc() does not work in modules ... :-( */ -int video1394_mmap(struct file *file, struct vm_area_struct *vma) +static int video1394_mmap(struct file *file, struct vm_area_struct *vma) { struct file_ctx *ctx = (struct file_ctx *)file->private_data; int res = -EINVAL; @@ -1269,6 +1287,16 @@ .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, .version = CAMERA_SW_VERSION_ENTRY & 0xffffff }, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 1) & 0xffffff + }, + { + .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION, + .specifier_id = CAMERA_UNIT_SPEC_ID_ENTRY & 0xffffff, + .version = (CAMERA_SW_VERSION_ENTRY + 2) & 0xffffff + }, { } }; @@ -1304,6 +1332,9 @@ hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; + class_simple_device_add(hpsb_protocol_class, MKDEV( + IEEE1394_MAJOR, minor), + NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), S_IFCHR | S_IRUSR | S_IWUSR, "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); @@ -1314,9 +1345,12 @@ { struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); - if (ohci) + if (ohci) { + class_simple_device_remove(MKDEV(IEEE1394_MAJOR, + IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id)); devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); - + } + return; } diff -Nru a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c --- a/drivers/infiniband/core/agent.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/core/agent.c 2005-03-07 14:54:17 -08:00 @@ -45,14 +45,11 @@ #include "smi.h" #include "agent_priv.h" #include "mad_priv.h" - +#include "agent.h" spinlock_t ib_agent_port_list_lock; static LIST_HEAD(ib_agent_port_list); -extern kmem_cache_t *ib_mad_cache; - - /* * Caller must hold ib_agent_port_list_lock */ @@ -66,14 +63,13 @@ if (device) { list_for_each_entry(entry, &ib_agent_port_list, port_list) { - if (entry->dr_smp_agent->device == device && + if (entry->smp_agent->device == device && entry->port_num == port_num) return entry; } } else { list_for_each_entry(entry, &ib_agent_port_list, port_list) { - if ((entry->dr_smp_agent == mad_agent) || - (entry->lr_smp_agent == mad_agent) || + if ((entry->smp_agent == mad_agent) || (entry->perf_mgmt_agent == mad_agent)) return entry; } @@ -111,7 +107,7 @@ return 1; } - return smi_check_local_smp(port_priv->dr_smp_agent, smp); + return smi_check_local_smp(port_priv->smp_agent, smp); } static int agent_mad_send(struct ib_mad_agent *mad_agent, @@ -231,10 +227,8 @@ /* Get mad agent based on mgmt_class in MAD */ switch (mad->mad.mad.mad_hdr.mgmt_class) { case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: - mad_agent = port_priv->dr_smp_agent; - break; case IB_MGMT_CLASS_SUBN_LID_ROUTED: - mad_agent = port_priv->lr_smp_agent; + mad_agent = port_priv->smp_agent; break; case IB_MGMT_CLASS_PERF_MGMT: mad_agent = port_priv->perf_mgmt_agent; @@ -284,7 +278,6 @@ { int ret; struct ib_agent_port_private *port_priv; - struct ib_mad_reg_req reg_req; unsigned long flags; /* First, check if port already open for SMI */ @@ -308,35 +301,19 @@ spin_lock_init(&port_priv->send_list_lock); INIT_LIST_HEAD(&port_priv->send_posted_list); - /* Obtain MAD agent for directed route SM class */ - reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE; - reg_req.mgmt_class_version = 1; - - port_priv->dr_smp_agent = ib_register_mad_agent(device, port_num, - IB_QPT_SMI, - NULL, 0, - &agent_send_handler, - NULL, NULL); + /* Obtain send only MAD agent for SM class (SMI QP) */ + port_priv->smp_agent = ib_register_mad_agent(device, port_num, + IB_QPT_SMI, + NULL, 0, + &agent_send_handler, + NULL, NULL); - if (IS_ERR(port_priv->dr_smp_agent)) { - ret = PTR_ERR(port_priv->dr_smp_agent); + if (IS_ERR(port_priv->smp_agent)) { + ret = PTR_ERR(port_priv->smp_agent); goto error2; } - /* Obtain MAD agent for LID routed SM class */ - reg_req.mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED; - port_priv->lr_smp_agent = ib_register_mad_agent(device, port_num, - IB_QPT_SMI, - NULL, 0, - &agent_send_handler, - NULL, NULL); - if (IS_ERR(port_priv->lr_smp_agent)) { - ret = PTR_ERR(port_priv->lr_smp_agent); - goto error3; - } - - /* Obtain MAD agent for PerfMgmt class */ - reg_req.mgmt_class = IB_MGMT_CLASS_PERF_MGMT; + /* Obtain send only MAD agent for PerfMgmt class (GSI QP) */ port_priv->perf_mgmt_agent = ib_register_mad_agent(device, port_num, IB_QPT_GSI, NULL, 0, @@ -344,15 +321,15 @@ NULL, NULL); if (IS_ERR(port_priv->perf_mgmt_agent)) { ret = PTR_ERR(port_priv->perf_mgmt_agent); - goto error4; + goto error3; } - port_priv->mr = ib_get_dma_mr(port_priv->dr_smp_agent->qp->pd, + port_priv->mr = ib_get_dma_mr(port_priv->smp_agent->qp->pd, IB_ACCESS_LOCAL_WRITE); if (IS_ERR(port_priv->mr)) { printk(KERN_ERR SPFX "Couldn't get DMA MR\n"); ret = PTR_ERR(port_priv->mr); - goto error5; + goto error4; } spin_lock_irqsave(&ib_agent_port_list_lock, flags); @@ -361,12 +338,10 @@ return 0; -error5: - ib_unregister_mad_agent(port_priv->perf_mgmt_agent); error4: - ib_unregister_mad_agent(port_priv->lr_smp_agent); + ib_unregister_mad_agent(port_priv->perf_mgmt_agent); error3: - ib_unregister_mad_agent(port_priv->dr_smp_agent); + ib_unregister_mad_agent(port_priv->smp_agent); error2: kfree(port_priv); error1: @@ -391,8 +366,7 @@ ib_dereg_mr(port_priv->mr); ib_unregister_mad_agent(port_priv->perf_mgmt_agent); - ib_unregister_mad_agent(port_priv->lr_smp_agent); - ib_unregister_mad_agent(port_priv->dr_smp_agent); + ib_unregister_mad_agent(port_priv->smp_agent); kfree(port_priv); return 0; diff -Nru a/drivers/infiniband/core/agent_priv.h b/drivers/infiniband/core/agent_priv.h --- a/drivers/infiniband/core/agent_priv.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/core/agent_priv.h 2005-03-07 14:54:18 -08:00 @@ -55,8 +55,7 @@ struct list_head send_posted_list; spinlock_t send_list_lock; int port_num; - struct ib_mad_agent *dr_smp_agent; /* DR SM class */ - struct ib_mad_agent *lr_smp_agent; /* LR SM class */ + struct ib_mad_agent *smp_agent; /* SM class */ struct ib_mad_agent *perf_mgmt_agent; /* PerfMgmt class */ struct ib_mr *mr; }; diff -Nru a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c --- a/drivers/infiniband/core/cache.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/core/cache.c 2005-03-07 14:54:17 -08:00 @@ -37,6 +37,8 @@ #include #include +#include + #include "core_priv.h" struct ib_pkey_cache { @@ -112,7 +114,7 @@ cache = device->cache.gid_cache[p]; for (i = 0; i < cache->table_len; ++i) { if (!memcmp(gid, &cache->table[i], sizeof *gid)) { - *port_num = p; + *port_num = p + start_port(device); if (index) *index = i; ret = 0; diff -Nru a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c --- a/drivers/infiniband/core/mad.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/core/mad.c 2005-03-07 14:54:18 -08:00 @@ -41,7 +41,6 @@ #include "smi.h" #include "agent.h" - MODULE_LICENSE("Dual BSD/GPL"); MODULE_DESCRIPTION("kernel IB MAD API"); MODULE_AUTHOR("Hal Rosenstock"); @@ -69,6 +68,7 @@ static void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr, struct ib_mad_send_wc *mad_send_wc); static void timeout_sends(void *data); +static void cancel_sends(void *data); static void local_completions(void *data); static int solicited_mad(struct ib_mad *mad); static int add_nonoui_reg_req(struct ib_mad_reg_req *mad_reg_req, @@ -342,6 +342,8 @@ INIT_LIST_HEAD(&mad_agent_priv->local_list); INIT_WORK(&mad_agent_priv->local_work, local_completions, mad_agent_priv); + INIT_LIST_HEAD(&mad_agent_priv->canceled_list); + INIT_WORK(&mad_agent_priv->canceled_work, cancel_sends, mad_agent_priv); atomic_set(&mad_agent_priv->refcount, 1); init_waitqueue_head(&mad_agent_priv->wait); @@ -490,6 +492,7 @@ cancel_mads(mad_agent_priv); port_priv = mad_agent_priv->qp_info->port_priv; + cancel_delayed_work(&mad_agent_priv->timed_work); flush_workqueue(port_priv->wq); @@ -1266,12 +1269,12 @@ } port_priv = agent_priv->qp_info->port_priv; + mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); class = port_priv->version[ agent_priv->reg_req->mgmt_class_version].class; if (!class) goto vendor_check; - mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); method = class->method_table[mgmt_class]; if (method) { /* Remove any methods for this mad agent */ @@ -1293,16 +1296,21 @@ } vendor_check: + if (!is_vendor_class(mgmt_class)) + goto out; + + /* normalize mgmt_class to vendor range 2 */ + mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); vendor = port_priv->version[ agent_priv->reg_req->mgmt_class_version].vendor; + if (!vendor) goto out; - mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); vendor_class = vendor->vendor_class[mgmt_class]; if (vendor_class) { index = find_vendor_oui(vendor_class, agent_priv->reg_req->oui); - if (index == -1) + if (index < 0) goto out; method = vendor_class->method_table[index]; if (method) { @@ -1999,12 +2007,44 @@ return NULL; } +void cancel_sends(void *data) +{ + struct ib_mad_agent_private *mad_agent_priv; + struct ib_mad_send_wr_private *mad_send_wr; + struct ib_mad_send_wc mad_send_wc; + unsigned long flags; + + mad_agent_priv = data; + + mad_send_wc.status = IB_WC_WR_FLUSH_ERR; + mad_send_wc.vendor_err = 0; + + spin_lock_irqsave(&mad_agent_priv->lock, flags); + while (!list_empty(&mad_agent_priv->canceled_list)) { + mad_send_wr = list_entry(mad_agent_priv->canceled_list.next, + struct ib_mad_send_wr_private, + agent_list); + + list_del(&mad_send_wr->agent_list); + spin_unlock_irqrestore(&mad_agent_priv->lock, flags); + + mad_send_wc.wr_id = mad_send_wr->wr_id; + mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, + &mad_send_wc); + + kfree(mad_send_wr); + if (atomic_dec_and_test(&mad_agent_priv->refcount)) + wake_up(&mad_agent_priv->wait); + spin_lock_irqsave(&mad_agent_priv->lock, flags); + } + spin_unlock_irqrestore(&mad_agent_priv->lock, flags); +} + void ib_cancel_mad(struct ib_mad_agent *mad_agent, u64 wr_id) { struct ib_mad_agent_private *mad_agent_priv; struct ib_mad_send_wr_private *mad_send_wr; - struct ib_mad_send_wc mad_send_wc; unsigned long flags; mad_agent_priv = container_of(mad_agent, struct ib_mad_agent_private, @@ -2026,19 +2066,12 @@ } list_del(&mad_send_wr->agent_list); + list_add_tail(&mad_send_wr->agent_list, &mad_agent_priv->canceled_list); adjust_timeout(mad_agent_priv); spin_unlock_irqrestore(&mad_agent_priv->lock, flags); - mad_send_wc.status = IB_WC_WR_FLUSH_ERR; - mad_send_wc.vendor_err = 0; - mad_send_wc.wr_id = mad_send_wr->wr_id; - mad_agent_priv->agent.send_handler(&mad_agent_priv->agent, - &mad_send_wc); - - kfree(mad_send_wr); - if (atomic_dec_and_test(&mad_agent_priv->refcount)) - wake_up(&mad_agent_priv->wait); - + queue_work(mad_agent_priv->qp_info->port_priv->wq, + &mad_agent_priv->canceled_work); out: return; } @@ -2186,7 +2219,6 @@ recv_wr.next = NULL; recv_wr.sg_list = &sg_list; recv_wr.num_sge = 1; - recv_wr.recv_flags = IB_RECV_SIGNALED; do { /* Allocate and map receive buffer */ @@ -2381,7 +2413,6 @@ qp_init_attr.send_cq = qp_info->port_priv->cq; qp_init_attr.recv_cq = qp_info->port_priv->cq; qp_init_attr.sq_sig_type = IB_SIGNAL_ALL_WR; - qp_init_attr.rq_sig_type = IB_SIGNAL_ALL_WR; qp_init_attr.cap.max_send_wr = IB_MAD_QP_SEND_SIZE; qp_init_attr.cap.max_recv_wr = IB_MAD_QP_RECV_SIZE; qp_init_attr.cap.max_send_sge = IB_MAD_SEND_REQ_MAX_SG; diff -Nru a/drivers/infiniband/core/mad_priv.h b/drivers/infiniband/core/mad_priv.h --- a/drivers/infiniband/core/mad_priv.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/core/mad_priv.h 2005-03-07 14:54:18 -08:00 @@ -58,8 +58,8 @@ #define MAX_MGMT_CLASS 80 #define MAX_MGMT_VERSION 8 #define MAX_MGMT_OUI 8 -#define MAX_MGMT_VENDOR_RANGE2 IB_MGMT_CLASS_VENDOR_RANGE2_END - \ - IB_MGMT_CLASS_VENDOR_RANGE2_START + 1 +#define MAX_MGMT_VENDOR_RANGE2 (IB_MGMT_CLASS_VENDOR_RANGE2_END - \ + IB_MGMT_CLASS_VENDOR_RANGE2_START + 1) struct ib_mad_list_head { struct list_head list; @@ -95,6 +95,8 @@ unsigned long timeout; struct list_head local_list; struct work_struct local_work; + struct list_head canceled_list; + struct work_struct canceled_work; atomic_t refcount; wait_queue_head_t wait; @@ -191,5 +193,7 @@ struct work_struct work; struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE]; }; + +extern kmem_cache_t *ib_mad_cache; #endif /* __IB_MAD_PRIV_H__ */ diff -Nru a/drivers/infiniband/core/smi.c b/drivers/infiniband/core/smi.c --- a/drivers/infiniband/core/smi.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/core/smi.c 2005-03-07 14:54:17 -08:00 @@ -37,7 +37,7 @@ */ #include - +#include "smi.h" /* * Fixup a directed route SMP for sending diff -Nru a/drivers/infiniband/hw/mthca/Makefile b/drivers/infiniband/hw/mthca/Makefile --- a/drivers/infiniband/hw/mthca/Makefile 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/Makefile 2005-03-07 14:54:17 -08:00 @@ -9,4 +9,4 @@ ib_mthca-y := mthca_main.o mthca_cmd.o mthca_profile.o mthca_reset.o \ mthca_allocator.o mthca_eq.o mthca_pd.o mthca_cq.o \ mthca_mr.o mthca_qp.o mthca_av.o mthca_mcg.o mthca_mad.o \ - mthca_provider.o mthca_memfree.o + mthca_provider.o mthca_memfree.o mthca_uar.o diff -Nru a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c --- a/drivers/infiniband/hw/mthca/mthca_av.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_av.c 2005-03-07 14:54:18 -08:00 @@ -60,27 +60,34 @@ u32 index = -1; struct mthca_av *av = NULL; - ah->on_hca = 0; + ah->type = MTHCA_AH_PCI_POOL; - if (!atomic_read(&pd->sqp_count) && - !(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) { + if (dev->hca_type == ARBEL_NATIVE) { + ah->av = kmalloc(sizeof *ah->av, GFP_KERNEL); + if (!ah->av) + return -ENOMEM; + + ah->type = MTHCA_AH_KMALLOC; + av = ah->av; + } else if (!atomic_read(&pd->sqp_count) && + !(dev->mthca_flags & MTHCA_FLAG_DDR_HIDDEN)) { index = mthca_alloc(&dev->av_table.alloc); /* fall back to allocate in host memory */ if (index == -1) - goto host_alloc; + goto on_hca_fail; av = kmalloc(sizeof *av, GFP_KERNEL); if (!av) - goto host_alloc; + goto on_hca_fail; - ah->on_hca = 1; + ah->type = MTHCA_AH_ON_HCA; ah->avdma = dev->av_table.ddr_av_base + index * MTHCA_AV_SIZE; } - host_alloc: - if (!ah->on_hca) { +on_hca_fail: + if (ah->type == MTHCA_AH_PCI_POOL) { ah->av = pci_pool_alloc(dev->av_table.pool, SLAB_KERNEL, &ah->avdma); if (!ah->av) @@ -123,7 +130,7 @@ j * 4, be32_to_cpu(((u32 *) av)[j])); } - if (ah->on_hca) { + if (ah->type == MTHCA_AH_ON_HCA) { memcpy_toio(dev->av_table.av_map + index * MTHCA_AV_SIZE, av, MTHCA_AV_SIZE); kfree(av); @@ -134,12 +141,21 @@ int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah) { - if (ah->on_hca) + switch (ah->type) { + case MTHCA_AH_ON_HCA: mthca_free(&dev->av_table.alloc, (ah->avdma - dev->av_table.ddr_av_base) / MTHCA_AV_SIZE); - else + break; + + case MTHCA_AH_PCI_POOL: pci_pool_free(dev->av_table.pool, ah->av, ah->avdma); + break; + + case MTHCA_AH_KMALLOC: + kfree(ah->av); + break; + } return 0; } @@ -147,7 +163,7 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah, struct ib_ud_header *header) { - if (ah->on_hca) + if (ah->type == MTHCA_AH_ON_HCA) return -EINVAL; header->lrh.service_level = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28; @@ -176,6 +192,9 @@ { int err; + if (dev->hca_type == ARBEL_NATIVE) + return 0; + err = mthca_alloc_init(&dev->av_table.alloc, dev->av_table.num_ddr_avs, dev->av_table.num_ddr_avs - 1, @@ -212,6 +231,9 @@ void __devexit mthca_cleanup_av_table(struct mthca_dev *dev) { + if (dev->hca_type == ARBEL_NATIVE) + return; + if (dev->av_table.av_map) iounmap(dev->av_table.av_map); pci_pool_destroy(dev->av_table.pool); diff -Nru a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c --- a/drivers/infiniband/hw/mthca/mthca_cmd.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c 2005-03-07 14:54:17 -08:00 @@ -1290,7 +1290,7 @@ return -ENOMEM; inbox[0] = cpu_to_be64(virt); - inbox[1] = cpu_to_be64(dma_addr | (PAGE_SHIFT - 12)); + inbox[1] = cpu_to_be64(dma_addr); err = mthca_cmd(dev, indma, 1, 0, CMD_MAP_ICM, CMD_TIME_CLASS_B, status); @@ -1305,6 +1305,9 @@ int mthca_UNMAP_ICM(struct mthca_dev *dev, u64 virt, u32 page_count, u8 *status) { + mthca_dbg(dev, "Unmapping %d pages at %llx from ICM.\n", + page_count, (unsigned long long) virt); + return mthca_cmd(dev, virt, page_count, 0, CMD_UNMAP_ICM, CMD_TIME_CLASS_B, status); } @@ -1538,10 +1541,10 @@ if (0) { int i; mthca_dbg(dev, "Dumping QP context:\n"); - printk(" %08x\n", be32_to_cpup(qp_context)); + printk(" opt param mask: %08x\n", be32_to_cpup(qp_context)); for (i = 0; i < 0x100 / 4; ++i) { if (i % 8 == 0) - printk("[%02x] ", i * 4); + printk(" [%02x] ", i * 4); printk(" %08x", be32_to_cpu(((u32 *) qp_context)[i + 2])); if ((i + 1) % 8 == 0) printk("\n"); diff -Nru a/drivers/infiniband/hw/mthca/mthca_cmd.h b/drivers/infiniband/hw/mthca/mthca_cmd.h --- a/drivers/infiniband/hw/mthca/mthca_cmd.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_cmd.h 2005-03-07 14:54:16 -08:00 @@ -95,7 +95,21 @@ }; enum { - DEV_LIM_FLAG_SRQ = 1 << 6 + DEV_LIM_FLAG_RC = 1 << 0, + DEV_LIM_FLAG_UC = 1 << 1, + DEV_LIM_FLAG_UD = 1 << 2, + DEV_LIM_FLAG_RD = 1 << 3, + DEV_LIM_FLAG_RAW_IPV6 = 1 << 4, + DEV_LIM_FLAG_RAW_ETHER = 1 << 5, + DEV_LIM_FLAG_SRQ = 1 << 6, + DEV_LIM_FLAG_BAD_PKEY_CNTR = 1 << 8, + DEV_LIM_FLAG_BAD_QKEY_CNTR = 1 << 9, + DEV_LIM_FLAG_MW = 1 << 16, + DEV_LIM_FLAG_AUTO_PATH_MIG = 1 << 17, + DEV_LIM_FLAG_ATOMIC = 1 << 18, + DEV_LIM_FLAG_RAW_MULTI = 1 << 19, + DEV_LIM_FLAG_UD_AV_PORT_ENFORCE = 1 << 20, + DEV_LIM_FLAG_UD_MULTI = 1 << 21, }; struct mthca_dev_lim { diff -Nru a/drivers/infiniband/hw/mthca/mthca_config_reg.h b/drivers/infiniband/hw/mthca/mthca_config_reg.h --- a/drivers/infiniband/hw/mthca/mthca_config_reg.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_config_reg.h 2005-03-07 14:54:17 -08:00 @@ -46,5 +46,6 @@ #define MTHCA_MAP_ECR_SIZE (MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE) #define MTHCA_CLR_INT_BASE 0xf00d8 #define MTHCA_CLR_INT_SIZE 0x00008 +#define MTHCA_EQ_SET_CI_SIZE (8 * 32) #endif /* MTHCA_CONFIG_REG_H */ diff -Nru a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c --- a/drivers/infiniband/hw/mthca/mthca_cq.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_cq.c 2005-03-07 14:54:16 -08:00 @@ -33,11 +33,13 @@ */ #include +#include #include #include "mthca_dev.h" #include "mthca_cmd.h" +#include "mthca_memfree.h" enum { MTHCA_MAX_DIRECT_CQ_SIZE = 4 * PAGE_SIZE @@ -54,7 +56,7 @@ u32 flags; u64 start; u32 logsize_usrpage; - u32 error_eqn; + u32 error_eqn; /* Tavor only */ u32 comp_eqn; u32 pd; u32 lkey; @@ -63,7 +65,9 @@ u32 consumer_index; u32 producer_index; u32 cqn; - u32 reserved[3]; + u32 ci_db; /* Arbel only */ + u32 state_db; /* Arbel only */ + u32 reserved; } __attribute__((packed)); #define MTHCA_CQ_STATUS_OK ( 0 << 28) @@ -132,11 +136,15 @@ #define MTHCA_CQ_ENTRY_OWNER_SW (0 << 7) #define MTHCA_CQ_ENTRY_OWNER_HW (1 << 7) -#define MTHCA_CQ_DB_INC_CI (1 << 24) -#define MTHCA_CQ_DB_REQ_NOT (2 << 24) -#define MTHCA_CQ_DB_REQ_NOT_SOL (3 << 24) -#define MTHCA_CQ_DB_SET_CI (4 << 24) -#define MTHCA_CQ_DB_REQ_NOT_MULT (5 << 24) +#define MTHCA_TAVOR_CQ_DB_INC_CI (1 << 24) +#define MTHCA_TAVOR_CQ_DB_REQ_NOT (2 << 24) +#define MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL (3 << 24) +#define MTHCA_TAVOR_CQ_DB_SET_CI (4 << 24) +#define MTHCA_TAVOR_CQ_DB_REQ_NOT_MULT (5 << 24) + +#define MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL (1 << 24) +#define MTHCA_ARBEL_CQ_DB_REQ_NOT (2 << 24) +#define MTHCA_ARBEL_CQ_DB_REQ_NOT_MULT (3 << 24) static inline struct mthca_cqe *get_cqe(struct mthca_cq *cq, int entry) { @@ -147,54 +155,58 @@ + (entry * MTHCA_CQ_ENTRY_SIZE) % PAGE_SIZE; } -static inline int cqe_sw(struct mthca_cq *cq, int i) +static inline struct mthca_cqe *cqe_sw(struct mthca_cq *cq, int i) { - return !(MTHCA_CQ_ENTRY_OWNER_HW & - get_cqe(cq, i)->owner); + struct mthca_cqe *cqe = get_cqe(cq, i); + return MTHCA_CQ_ENTRY_OWNER_HW & cqe->owner ? NULL : cqe; } -static inline int next_cqe_sw(struct mthca_cq *cq) +static inline struct mthca_cqe *next_cqe_sw(struct mthca_cq *cq) { - return cqe_sw(cq, cq->cons_index); + return cqe_sw(cq, cq->cons_index & cq->ibcq.cqe); } -static inline void set_cqe_hw(struct mthca_cq *cq, int entry) +static inline void set_cqe_hw(struct mthca_cqe *cqe) { - get_cqe(cq, entry)->owner = MTHCA_CQ_ENTRY_OWNER_HW; + cqe->owner = MTHCA_CQ_ENTRY_OWNER_HW; } -static inline void inc_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, - int nent) +/* + * incr is ignored in native Arbel (mem-free) mode, so cq->cons_index + * should be correct before calling update_cons_index(). + */ +static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, + int incr) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32(MTHCA_CQ_DB_INC_CI | cq->cqn); - doorbell[1] = cpu_to_be32(nent - 1); + if (dev->hca_type == ARBEL_NATIVE) { + *cq->set_ci_db = cpu_to_be32(cq->cons_index); + wmb(); + } else { + doorbell[0] = cpu_to_be32(MTHCA_TAVOR_CQ_DB_INC_CI | cq->cqn); + doorbell[1] = cpu_to_be32(incr - 1); - mthca_write64(doorbell, - dev->kar + MTHCA_CQ_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + mthca_write64(doorbell, + dev->kar + MTHCA_CQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + } } void mthca_cq_event(struct mthca_dev *dev, u32 cqn) { struct mthca_cq *cq; - spin_lock(&dev->cq_table.lock); cq = mthca_array_get(&dev->cq_table.cq, cqn & (dev->limits.num_cqs - 1)); - if (cq) - atomic_inc(&cq->refcount); - spin_unlock(&dev->cq_table.lock); if (!cq) { mthca_warn(dev, "Completion event for bogus CQ %08x\n", cqn); return; } - cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); + ++cq->arm_sn; - if (atomic_dec_and_test(&cq->refcount)) - wake_up(&cq->wait); + cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); } void mthca_cq_clean(struct mthca_dev *dev, u32 cqn, u32 qpn) @@ -250,8 +262,8 @@ if (nfreed) { wmb(); - inc_cons_index(dev, cq, nfreed); - cq->cons_index = (cq->cons_index + nfreed) & cq->ibcq.cqe; + cq->cons_index += nfreed; + update_cons_index(dev, cq, nfreed); } spin_unlock_irq(&cq->lock); @@ -344,7 +356,7 @@ break; } - err = mthca_free_err_wqe(qp, is_send, wqe_index, &dbd, &new_wqe); + err = mthca_free_err_wqe(dev, qp, is_send, wqe_index, &dbd, &new_wqe); if (err) return err; @@ -383,12 +395,13 @@ struct mthca_wq *wq; struct mthca_cqe *cqe; int wqe_index; - int is_error = 0; + int is_error; int is_send; int free_cqe = 1; int err = 0; - if (!next_cqe_sw(cq)) + cqe = next_cqe_sw(cq); + if (!cqe) return -EAGAIN; /* @@ -397,8 +410,6 @@ */ rmb(); - cqe = get_cqe(cq, cq->cons_index); - if (0) { mthca_dbg(dev, "%x/%d: CQE -> QPN %06x, WQE @ %08x\n", cq->cqn, cq->cons_index, be32_to_cpu(cqe->my_qpn), @@ -407,39 +418,25 @@ dump_cqe(cqe); } - if ((cqe->opcode & MTHCA_ERROR_CQE_OPCODE_MASK) == - MTHCA_ERROR_CQE_OPCODE_MASK) { - is_error = 1; - is_send = cqe->opcode & 1; - } else - is_send = cqe->is_send & 0x80; + is_error = (cqe->opcode & MTHCA_ERROR_CQE_OPCODE_MASK) == + MTHCA_ERROR_CQE_OPCODE_MASK; + is_send = is_error ? cqe->opcode & 0x01 : cqe->is_send & 0x80; if (!*cur_qp || be32_to_cpu(cqe->my_qpn) != (*cur_qp)->qpn) { - if (*cur_qp) { - if (*freed) { - wmb(); - inc_cons_index(dev, cq, *freed); - *freed = 0; - } - spin_unlock(&(*cur_qp)->lock); - } - - spin_lock(&dev->qp_table.lock); + /* + * We do not have to take the QP table lock here, + * because CQs will be locked while QPs are removed + * from the table. + */ *cur_qp = mthca_array_get(&dev->qp_table.qp, be32_to_cpu(cqe->my_qpn) & (dev->limits.num_qps - 1)); - if (*cur_qp) - atomic_inc(&(*cur_qp)->refcount); - spin_unlock(&dev->qp_table.lock); - if (!*cur_qp) { mthca_warn(dev, "CQ entry for unknown QP %06x\n", be32_to_cpu(cqe->my_qpn) & 0xffffff); err = -EINVAL; goto out; } - - spin_lock(&(*cur_qp)->lock); } entry->qp_num = (*cur_qp)->qpn; @@ -457,9 +454,9 @@ } if (wq->last_comp < wqe_index) - wq->cur -= wqe_index - wq->last_comp; + wq->tail += wqe_index - wq->last_comp; else - wq->cur -= wq->max - wq->last_comp + wqe_index; + wq->tail += wqe_index + wq->max - wq->last_comp; wq->last_comp = wqe_index; @@ -509,10 +506,10 @@ entry->status = IB_WC_SUCCESS; out: - if (free_cqe) { - set_cqe_hw(cq, cq->cons_index); + if (likely(free_cqe)) { + set_cqe_hw(cqe); ++(*freed); - cq->cons_index = (cq->cons_index + 1) & cq->ibcq.cqe; + ++cq->cons_index; } return err; @@ -540,63 +537,101 @@ if (freed) { wmb(); - inc_cons_index(dev, cq, freed); + update_cons_index(dev, cq, freed); } - if (qp) { - spin_unlock(&qp->lock); - if (atomic_dec_and_test(&qp->refcount)) - wake_up(&qp->wait); - } - - spin_unlock_irqrestore(&cq->lock, flags); return err == 0 || err == -EAGAIN ? npolled : err; } -void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq, - int solicited) +int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32((solicited ? - MTHCA_CQ_DB_REQ_NOT_SOL : - MTHCA_CQ_DB_REQ_NOT) | - cq->cqn); + doorbell[0] = cpu_to_be32((notify == IB_CQ_SOLICITED ? + MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL : + MTHCA_TAVOR_CQ_DB_REQ_NOT) | + to_mcq(cq)->cqn); doorbell[1] = 0xffffffff; mthca_write64(doorbell, - dev->kar + MTHCA_CQ_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + to_mdev(cq->device)->kar + MTHCA_CQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&to_mdev(cq->device)->doorbell_lock)); + + return 0; } -int mthca_init_cq(struct mthca_dev *dev, int nent, - struct mthca_cq *cq) +int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) +{ + struct mthca_cq *cq = to_mcq(ibcq); + u32 doorbell[2]; + u32 sn; + u32 ci; + + sn = cq->arm_sn & 3; + ci = cpu_to_be32(cq->cons_index); + + doorbell[0] = ci; + doorbell[1] = cpu_to_be32((cq->cqn << 8) | (2 << 5) | (sn << 3) | + (notify == IB_CQ_SOLICITED ? 1 : 2)); + + mthca_write_db_rec(doorbell, cq->arm_db); + + /* + * Make sure that the doorbell record in host memory is + * written before ringing the doorbell via PCI MMIO. + */ + wmb(); + + doorbell[0] = cpu_to_be32((sn << 28) | + (notify == IB_CQ_SOLICITED ? + MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL : + MTHCA_ARBEL_CQ_DB_REQ_NOT) | + cq->cqn); + doorbell[1] = ci; + + mthca_write64(doorbell, + to_mdev(ibcq->device)->kar + MTHCA_CQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->doorbell_lock)); + + return 0; +} + +static void mthca_free_cq_buf(struct mthca_dev *dev, struct mthca_cq *cq) { - int size = nent * MTHCA_CQ_ENTRY_SIZE; - dma_addr_t t; - void *mailbox = NULL; - int npages, shift; - u64 *dma_list = NULL; - struct mthca_cq_context *cq_context; - int err = -ENOMEM; - u8 status; int i; + int size; - might_sleep(); + if (cq->is_direct) + pci_free_consistent(dev->pdev, + (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE, + cq->queue.direct.buf, + pci_unmap_addr(&cq->queue.direct, + mapping)); + else { + size = (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE; + for (i = 0; i < (size + PAGE_SIZE - 1) / PAGE_SIZE; ++i) + if (cq->queue.page_list[i].buf) + pci_free_consistent(dev->pdev, PAGE_SIZE, + cq->queue.page_list[i].buf, + pci_unmap_addr(&cq->queue.page_list[i], + mapping)); - mailbox = kmalloc(sizeof (struct mthca_cq_context) + MTHCA_CMD_MAILBOX_EXTRA, - GFP_KERNEL); - if (!mailbox) - goto err_out; + kfree(cq->queue.page_list); + } +} - cq_context = MAILBOX_ALIGN(mailbox); +static int mthca_alloc_cq_buf(struct mthca_dev *dev, int size, + struct mthca_cq *cq) +{ + int err = -ENOMEM; + int npages, shift; + u64 *dma_list = NULL; + dma_addr_t t; + int i; if (size <= MTHCA_MAX_DIRECT_CQ_SIZE) { - if (0) - mthca_dbg(dev, "Creating direct CQ of size %d\n", size); - cq->is_direct = 1; npages = 1; shift = get_order(size) + PAGE_SHIFT; @@ -604,7 +639,7 @@ cq->queue.direct.buf = pci_alloc_consistent(dev->pdev, size, &t); if (!cq->queue.direct.buf) - goto err_out; + return -ENOMEM; pci_unmap_addr_set(&cq->queue.direct, mapping, t); @@ -617,7 +652,7 @@ dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL); if (!dma_list) - goto err_out_free; + goto err_free; for (i = 0; i < npages; ++i) dma_list[i] = t + i * (1 << shift); @@ -626,12 +661,9 @@ npages = (size + PAGE_SIZE - 1) / PAGE_SIZE; shift = PAGE_SHIFT; - if (0) - mthca_dbg(dev, "Creating indirect CQ with %d pages\n", npages); - dma_list = kmalloc(npages * sizeof *dma_list, GFP_KERNEL); if (!dma_list) - goto err_out; + return -ENOMEM; cq->queue.page_list = kmalloc(npages * sizeof *cq->queue.page_list, GFP_KERNEL); @@ -645,7 +677,7 @@ cq->queue.page_list[i].buf = pci_alloc_consistent(dev->pdev, PAGE_SIZE, &t); if (!cq->queue.page_list[i].buf) - goto err_out_free; + goto err_free; dma_list[i] = t; pci_unmap_addr_set(&cq->queue.page_list[i], mapping, t); @@ -654,13 +686,6 @@ } } - for (i = 0; i < nent; ++i) - set_cqe_hw(cq, i); - - cq->cqn = mthca_alloc(&dev->cq_table.alloc); - if (cq->cqn == -1) - goto err_out_free; - err = mthca_mr_alloc_phys(dev, dev->driver_pd.pd_num, dma_list, shift, npages, 0, size, @@ -668,7 +693,72 @@ MTHCA_MPT_FLAG_LOCAL_READ, &cq->mr); if (err) - goto err_out_free_cq; + goto err_free; + + kfree(dma_list); + + return 0; + +err_free: + mthca_free_cq_buf(dev, cq); + +err_out: + kfree(dma_list); + + return err; +} + +int mthca_init_cq(struct mthca_dev *dev, int nent, + struct mthca_cq *cq) +{ + int size = nent * MTHCA_CQ_ENTRY_SIZE; + void *mailbox = NULL; + struct mthca_cq_context *cq_context; + int err = -ENOMEM; + u8 status; + int i; + + might_sleep(); + + cq->ibcq.cqe = nent - 1; + + cq->cqn = mthca_alloc(&dev->cq_table.alloc); + if (cq->cqn == -1) + return -ENOMEM; + + if (dev->hca_type == ARBEL_NATIVE) { + cq->arm_sn = 1; + + err = mthca_table_get(dev, dev->cq_table.table, cq->cqn); + if (err) + goto err_out; + + err = -ENOMEM; + + cq->set_ci_db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, + cq->cqn, &cq->set_ci_db); + if (cq->set_ci_db_index < 0) + goto err_out_icm; + + cq->arm_db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_CQ_ARM, + cq->cqn, &cq->arm_db); + if (cq->arm_db_index < 0) + goto err_out_ci; + } + + mailbox = kmalloc(sizeof (struct mthca_cq_context) + MTHCA_CMD_MAILBOX_EXTRA, + GFP_KERNEL); + if (!mailbox) + goto err_out_mailbox; + + cq_context = MAILBOX_ALIGN(mailbox); + + err = mthca_alloc_cq_buf(dev, size, cq); + if (err) + goto err_out_mailbox; + + for (i = 0; i < nent; ++i) + set_cqe_hw(get_cqe(cq, i)); spin_lock_init(&cq->lock); atomic_set(&cq->refcount, 1); @@ -680,13 +770,18 @@ MTHCA_CQ_FLAG_TR); cq_context->start = cpu_to_be64(0); cq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24 | - MTHCA_KAR_PAGE); + dev->driver_uar.index); cq_context->error_eqn = cpu_to_be32(dev->eq_table.eq[MTHCA_EQ_ASYNC].eqn); cq_context->comp_eqn = cpu_to_be32(dev->eq_table.eq[MTHCA_EQ_COMP].eqn); cq_context->pd = cpu_to_be32(dev->driver_pd.pd_num); cq_context->lkey = cpu_to_be32(cq->mr.ibmr.lkey); cq_context->cqn = cpu_to_be32(cq->cqn); + if (dev->hca_type == ARBEL_NATIVE) { + cq_context->ci_db = cpu_to_be32(cq->set_ci_db_index); + cq_context->state_db = cpu_to_be32(cq->arm_db_index); + } + err = mthca_SW2HW_CQ(dev, cq_context, cq->cqn, &status); if (err) { mthca_warn(dev, "SW2HW_CQ failed (%d)\n", err); @@ -711,36 +806,27 @@ cq->cons_index = 0; - kfree(dma_list); kfree(mailbox); return 0; - err_out_free_mr: +err_out_free_mr: mthca_free_mr(dev, &cq->mr); + mthca_free_cq_buf(dev, cq); - err_out_free_cq: - mthca_free(&dev->cq_table.alloc, cq->cqn); +err_out_mailbox: + kfree(mailbox); - err_out_free: - if (cq->is_direct) - pci_free_consistent(dev->pdev, size, - cq->queue.direct.buf, - pci_unmap_addr(&cq->queue.direct, mapping)); - else { - for (i = 0; i < npages; ++i) - if (cq->queue.page_list[i].buf) - pci_free_consistent(dev->pdev, PAGE_SIZE, - cq->queue.page_list[i].buf, - pci_unmap_addr(&cq->queue.page_list[i], - mapping)); + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index); - kfree(cq->queue.page_list); - } +err_out_ci: + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index); - err_out: - kfree(dma_list); - kfree(mailbox); +err_out_icm: + mthca_table_put(dev, dev->cq_table.table, cq->cqn); + +err_out: + mthca_free(&dev->cq_table.alloc, cq->cqn); return err; } @@ -773,7 +859,7 @@ int j; printk(KERN_ERR "context for CQN %x (cons index %x, next sw %d)\n", - cq->cqn, cq->cons_index, next_cqe_sw(cq)); + cq->cqn, cq->cons_index, !!next_cqe_sw(cq)); for (j = 0; j < 16; ++j) printk(KERN_ERR "[%2x] %08x\n", j * 4, be32_to_cpu(ctx[j])); } @@ -783,30 +869,21 @@ cq->cqn & (dev->limits.num_cqs - 1)); spin_unlock_irq(&dev->cq_table.lock); + if (dev->mthca_flags & MTHCA_FLAG_MSI_X) + synchronize_irq(dev->eq_table.eq[MTHCA_EQ_COMP].msi_x_vector); + else + synchronize_irq(dev->pdev->irq); + atomic_dec(&cq->refcount); wait_event(cq->wait, !atomic_read(&cq->refcount)); mthca_free_mr(dev, &cq->mr); + mthca_free_cq_buf(dev, cq); - if (cq->is_direct) - pci_free_consistent(dev->pdev, - (cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE, - cq->queue.direct.buf, - pci_unmap_addr(&cq->queue.direct, - mapping)); - else { - int i; - - for (i = 0; - i < ((cq->ibcq.cqe + 1) * MTHCA_CQ_ENTRY_SIZE + PAGE_SIZE - 1) / - PAGE_SIZE; - ++i) - pci_free_consistent(dev->pdev, PAGE_SIZE, - cq->queue.page_list[i].buf, - pci_unmap_addr(&cq->queue.page_list[i], - mapping)); - - kfree(cq->queue.page_list); + if (dev->hca_type == ARBEL_NATIVE) { + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_ARM, cq->arm_db_index); + mthca_free_db(dev, MTHCA_DB_TYPE_CQ_SET_CI, cq->set_ci_db_index); + mthca_table_put(dev, dev->cq_table.table, cq->cqn); } mthca_free(&dev->cq_table.alloc, cq->cqn); diff -Nru a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h --- a/drivers/infiniband/hw/mthca/mthca_dev.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_dev.h 2005-03-07 14:54:16 -08:00 @@ -65,7 +65,6 @@ }; enum { - MTHCA_KAR_PAGE = 1, MTHCA_MAX_PORTS = 2 }; @@ -108,6 +107,7 @@ int gid_table_len; int pkey_table_len; int local_ca_ack_delay; + int num_uars; int max_sg; int num_qps; int reserved_qps; @@ -148,6 +148,12 @@ } *page_list; }; +struct mthca_uar_table { + struct mthca_alloc alloc; + u64 uarc_base; + int uarc_size; +}; + struct mthca_pd_table { struct mthca_alloc alloc; }; @@ -165,6 +171,7 @@ struct mthca_alloc alloc; void __iomem *clr_int; u32 clr_mask; + u32 arm_mask; struct mthca_eq eq[MTHCA_NUM_EQ]; u64 icm_virt; struct page *icm_page; @@ -200,8 +207,9 @@ }; struct mthca_mcg_table { - struct semaphore sem; - struct mthca_alloc alloc; + struct semaphore sem; + struct mthca_alloc alloc; + struct mthca_icm_table *table; }; struct mthca_dev { @@ -210,6 +218,7 @@ int hca_type; unsigned long mthca_flags; + unsigned long device_cap_flags; u32 rev_id; @@ -237,13 +246,22 @@ struct semaphore cap_mask_mutex; void __iomem *hcr; - void __iomem *ecr_base; - void __iomem *clr_base; void __iomem *kar; + void __iomem *clr_base; + union { + struct { + void __iomem *ecr_base; + } tavor; + struct { + void __iomem *eq_arm; + void __iomem *eq_set_ci_base; + } arbel; + } eq_regs; struct mthca_cmd cmd; struct mthca_limits limits; + struct mthca_uar_table uar_table; struct mthca_pd_table pd_table; struct mthca_mr_table mr_table; struct mthca_eq_table eq_table; @@ -252,8 +270,10 @@ struct mthca_av_table av_table; struct mthca_mcg_table mcg_table; - struct mthca_pd driver_pd; - struct mthca_mr driver_mr; + struct mthca_uar driver_uar; + struct mthca_db_table *db_tab; + struct mthca_pd driver_pd; + struct mthca_mr driver_mr; struct ib_mad_agent *send_agent[MTHCA_MAX_PORTS][2]; struct ib_ah *sm_ah[MTHCA_MAX_PORTS]; @@ -310,6 +330,7 @@ int mthca_array_init(struct mthca_array *array, int nent); void mthca_array_cleanup(struct mthca_array *array, int nent); +int mthca_init_uar_table(struct mthca_dev *dev); int mthca_init_pd_table(struct mthca_dev *dev); int mthca_init_mr_table(struct mthca_dev *dev); int mthca_init_eq_table(struct mthca_dev *dev); @@ -318,6 +339,7 @@ int mthca_init_av_table(struct mthca_dev *dev); int mthca_init_mcg_table(struct mthca_dev *dev); +void mthca_cleanup_uar_table(struct mthca_dev *dev); void mthca_cleanup_pd_table(struct mthca_dev *dev); void mthca_cleanup_mr_table(struct mthca_dev *dev); void mthca_cleanup_eq_table(struct mthca_dev *dev); @@ -329,6 +351,9 @@ int mthca_register_device(struct mthca_dev *dev); void mthca_unregister_device(struct mthca_dev *dev); +int mthca_uar_alloc(struct mthca_dev *dev, struct mthca_uar *uar); +void mthca_uar_free(struct mthca_dev *dev, struct mthca_uar *uar); + int mthca_pd_alloc(struct mthca_dev *dev, struct mthca_pd *pd); void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd); @@ -345,8 +370,8 @@ int mthca_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry); -void mthca_arm_cq(struct mthca_dev *dev, struct mthca_cq *cq, - int solicited); +int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify); +int mthca_arbel_arm_cq(struct ib_cq *cq, enum ib_cq_notify notify); int mthca_init_cq(struct mthca_dev *dev, int nent, struct mthca_cq *cq); void mthca_free_cq(struct mthca_dev *dev, @@ -357,11 +382,15 @@ void mthca_qp_event(struct mthca_dev *dev, u32 qpn, enum ib_event_type event_type); int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask); -int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, - struct ib_send_wr **bad_wr); -int mthca_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, - struct ib_recv_wr **bad_wr); -int mthca_free_err_wqe(struct mthca_qp *qp, int is_send, +int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr); +int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr); +int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr); +int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr); +int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, int index, int *dbd, u32 *new_wqe); int mthca_alloc_qp(struct mthca_dev *dev, struct mthca_pd *pd, @@ -369,14 +398,12 @@ struct mthca_cq *recv_cq, enum ib_qp_type type, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, struct mthca_qp *qp); int mthca_alloc_sqp(struct mthca_dev *dev, struct mthca_pd *pd, struct mthca_cq *send_cq, struct mthca_cq *recv_cq, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, int qpn, int port, struct mthca_sqp *sqp); diff -Nru a/drivers/infiniband/hw/mthca/mthca_doorbell.h b/drivers/infiniband/hw/mthca/mthca_doorbell.h --- a/drivers/infiniband/hw/mthca/mthca_doorbell.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_doorbell.h 2005-03-07 14:54:17 -08:00 @@ -57,6 +57,11 @@ __raw_writeq(*(u64 *) val, dest); } +static inline void mthca_write_db_rec(u32 val[2], u32 *db) +{ + *(u64 *) db = *(u64 *) val; +} + #else /* @@ -78,6 +83,13 @@ __raw_writel(val[0], dest); __raw_writel(val[1], dest + 4); spin_unlock_irqrestore(doorbell_lock, flags); +} + +static inline void mthca_write_db_rec(u32 val[2], u32 *db) +{ + db[0] = val[0]; + wmb(); + db[1] = val[1]; } #endif diff -Nru a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c --- a/drivers/infiniband/hw/mthca/mthca_eq.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_eq.c 2005-03-07 14:54:17 -08:00 @@ -54,10 +54,10 @@ u32 flags; u64 start; u32 logsize_usrpage; - u32 pd; + u32 tavor_pd; /* reserved for Arbel */ u8 reserved1[3]; u8 intr; - u32 lost_count; + u32 arbel_pd; /* lost_count for Tavor */ u32 lkey; u32 reserved2[2]; u32 consumer_index; @@ -75,6 +75,7 @@ #define MTHCA_EQ_STATE_ARMED ( 1 << 8) #define MTHCA_EQ_STATE_FIRED ( 2 << 8) #define MTHCA_EQ_STATE_ALWAYS_ARMED ( 3 << 8) +#define MTHCA_EQ_STATE_ARBEL ( 8 << 8) enum { MTHCA_EVENT_TYPE_COMP = 0x00, @@ -164,19 +165,46 @@ MTHCA_ASYNC_EVENT_MASK; } -static inline void set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) +static inline void tavor_set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) { u32 doorbell[2]; doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_SET_CI | eq->eqn); doorbell[1] = cpu_to_be32(ci & (eq->nent - 1)); + /* + * This barrier makes sure that all updates to ownership bits + * done by set_eqe_hw() hit memory before the consumer index + * is updated. set_eq_ci() allows the HCA to possibly write + * more EQ entries, and we want to avoid the exceedingly + * unlikely possibility of the HCA writing an entry and then + * having set_eqe_hw() overwrite the owner field. + */ + wmb(); mthca_write64(doorbell, dev->kar + MTHCA_EQ_DOORBELL, MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } -static inline void eq_req_not(struct mthca_dev *dev, int eqn) +static inline void arbel_set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) +{ + /* See comment in tavor_set_eq_ci() above. */ + wmb(); + __raw_writel(cpu_to_be32(ci), dev->eq_regs.arbel.eq_set_ci_base + + eq->eqn * 8); + /* We still want ordering, just not swabbing, so add a barrier */ + mb(); +} + +static inline void set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci) +{ + if (dev->hca_type == ARBEL_NATIVE) + arbel_set_eq_ci(dev, eq, ci); + else + tavor_set_eq_ci(dev, eq, ci); +} + +static inline void tavor_eq_req_not(struct mthca_dev *dev, int eqn) { u32 doorbell[2]; @@ -188,16 +216,23 @@ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } +static inline void arbel_eq_req_not(struct mthca_dev *dev, u32 eqn_mask) +{ + writel(eqn_mask, dev->eq_regs.arbel.eq_arm); +} + static inline void disarm_cq(struct mthca_dev *dev, int eqn, int cqn) { - u32 doorbell[2]; + if (dev->hca_type != ARBEL_NATIVE) { + u32 doorbell[2]; - doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_DISARM_CQ | eqn); - doorbell[1] = cpu_to_be32(cqn); + doorbell[0] = cpu_to_be32(MTHCA_EQ_DB_DISARM_CQ | eqn); + doorbell[1] = cpu_to_be32(cqn); - mthca_write64(doorbell, - dev->kar + MTHCA_EQ_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + mthca_write64(doorbell, + dev->kar + MTHCA_EQ_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + } } static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, u32 entry) @@ -232,7 +267,7 @@ ib_dispatch_event(&record); } -static void mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq) +static int mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq) { struct mthca_eqe *eqe; int disarm_cqn; @@ -333,60 +368,93 @@ ++eq->cons_index; eqes_found = 1; - if (set_ci) { - wmb(); /* see comment below */ + if (unlikely(set_ci)) { + /* + * Conditional on hca_type is OK here because + * this is a rare case, not the fast path. + */ set_eq_ci(dev, eq, eq->cons_index); set_ci = 0; } } /* - * This barrier makes sure that all updates to - * ownership bits done by set_eqe_hw() hit memory - * before the consumer index is updated. set_eq_ci() - * allows the HCA to possibly write more EQ entries, - * and we want to avoid the exceedingly unlikely - * possibility of the HCA writing an entry and then - * having set_eqe_hw() overwrite the owner field. + * Rely on caller to set consumer index so that we don't have + * to test hca_type in our interrupt handling fast path. */ - if (likely(eqes_found)) { - wmb(); - set_eq_ci(dev, eq, eq->cons_index); - } - eq_req_not(dev, eq->eqn); + return eqes_found; } -static irqreturn_t mthca_interrupt(int irq, void *dev_ptr, struct pt_regs *regs) +static irqreturn_t mthca_tavor_interrupt(int irq, void *dev_ptr, struct pt_regs *regs) { struct mthca_dev *dev = dev_ptr; u32 ecr; - int work = 0; int i; if (dev->eq_table.clr_mask) writel(dev->eq_table.clr_mask, dev->eq_table.clr_int); - if ((ecr = readl(dev->ecr_base + 4)) != 0) { - work = 1; - - writel(ecr, dev->ecr_base + + ecr = readl(dev->eq_regs.tavor.ecr_base + 4); + if (ecr) { + writel(ecr, dev->eq_regs.tavor.ecr_base + MTHCA_ECR_CLR_BASE - MTHCA_ECR_BASE + 4); for (i = 0; i < MTHCA_NUM_EQ; ++i) - if (ecr & dev->eq_table.eq[i].ecr_mask) - mthca_eq_int(dev, &dev->eq_table.eq[i]); + if (ecr & dev->eq_table.eq[i].eqn_mask && + mthca_eq_int(dev, &dev->eq_table.eq[i])) { + tavor_set_eq_ci(dev, &dev->eq_table.eq[i], + dev->eq_table.eq[i].cons_index); + tavor_eq_req_not(dev, dev->eq_table.eq[i].eqn); + } } - return IRQ_RETVAL(work); + return IRQ_RETVAL(ecr); } -static irqreturn_t mthca_msi_x_interrupt(int irq, void *eq_ptr, +static irqreturn_t mthca_tavor_msi_x_interrupt(int irq, void *eq_ptr, struct pt_regs *regs) { struct mthca_eq *eq = eq_ptr; struct mthca_dev *dev = eq->dev; mthca_eq_int(dev, eq); + tavor_set_eq_ci(dev, eq, eq->cons_index); + tavor_eq_req_not(dev, eq->eqn); + + /* MSI-X vectors always belong to us */ + return IRQ_HANDLED; +} + +static irqreturn_t mthca_arbel_interrupt(int irq, void *dev_ptr, struct pt_regs *regs) +{ + struct mthca_dev *dev = dev_ptr; + int work = 0; + int i; + + if (dev->eq_table.clr_mask) + writel(dev->eq_table.clr_mask, dev->eq_table.clr_int); + + for (i = 0; i < MTHCA_NUM_EQ; ++i) + if (mthca_eq_int(dev, &dev->eq_table.eq[i])) { + work = 1; + arbel_set_eq_ci(dev, &dev->eq_table.eq[i], + dev->eq_table.eq[i].cons_index); + } + + arbel_eq_req_not(dev, dev->eq_table.arm_mask); + + return IRQ_RETVAL(work); +} + +static irqreturn_t mthca_arbel_msi_x_interrupt(int irq, void *eq_ptr, + struct pt_regs *regs) +{ + struct mthca_eq *eq = eq_ptr; + struct mthca_dev *dev = eq->dev; + + mthca_eq_int(dev, eq); + arbel_set_eq_ci(dev, eq, eq->cons_index); + arbel_eq_req_not(dev, eq->eqn_mask); /* MSI-X vectors always belong to us */ return IRQ_HANDLED; @@ -467,10 +535,16 @@ MTHCA_EQ_OWNER_HW | MTHCA_EQ_STATE_ARMED | MTHCA_EQ_FLAG_TR); - eq_context->start = cpu_to_be64(0); - eq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24 | - MTHCA_KAR_PAGE); - eq_context->pd = cpu_to_be32(dev->driver_pd.pd_num); + if (dev->hca_type == ARBEL_NATIVE) + eq_context->flags |= cpu_to_be32(MTHCA_EQ_STATE_ARBEL); + + eq_context->logsize_usrpage = cpu_to_be32((ffs(nent) - 1) << 24); + if (dev->hca_type == ARBEL_NATIVE) { + eq_context->arbel_pd = cpu_to_be32(dev->driver_pd.pd_num); + } else { + eq_context->logsize_usrpage |= cpu_to_be32(dev->driver_uar.index); + eq_context->tavor_pd = cpu_to_be32(dev->driver_pd.pd_num); + } eq_context->intr = intr; eq_context->lkey = cpu_to_be32(eq->mr.ibmr.lkey); @@ -489,10 +563,10 @@ kfree(dma_list); kfree(mailbox); - eq->ecr_mask = swab32(1 << eq->eqn); + eq->eqn_mask = swab32(1 << eq->eqn); eq->cons_index = 0; - eq_req_not(dev, eq->eqn); + dev->eq_table.arm_mask |= eq->eqn_mask; mthca_dbg(dev, "Allocated EQ %d with %d entries\n", eq->eqn, nent); @@ -544,6 +618,8 @@ mthca_warn(dev, "HW2SW_EQ returned status 0x%02x\n", status); + dev->eq_table.arm_mask &= ~eq->eqn_mask; + if (0) { mthca_dbg(dev, "Dumping EQ context %02x:\n", eq->eqn); for (i = 0; i < sizeof (struct mthca_eq_context) / 4; ++i) { @@ -555,7 +631,6 @@ } } - mthca_free_mr(dev, &eq->mr); for (i = 0; i < npages; ++i) pci_free_consistent(dev->pdev, PAGE_SIZE, @@ -578,6 +653,129 @@ dev->eq_table.eq + i); } +static int __devinit mthca_map_reg(struct mthca_dev *dev, + unsigned long offset, unsigned long size, + void __iomem **map) +{ + unsigned long base = pci_resource_start(dev->pdev, 0); + + if (!request_mem_region(base + offset, size, DRV_NAME)) + return -EBUSY; + + *map = ioremap(base + offset, size); + if (!*map) { + release_mem_region(base + offset, size); + return -ENOMEM; + } + + return 0; +} + +static void mthca_unmap_reg(struct mthca_dev *dev, unsigned long offset, + unsigned long size, void __iomem *map) +{ + unsigned long base = pci_resource_start(dev->pdev, 0); + + release_mem_region(base + offset, size); + iounmap(map); +} + +static int __devinit mthca_map_eq_regs(struct mthca_dev *dev) +{ + unsigned long mthca_base; + + mthca_base = pci_resource_start(dev->pdev, 0); + + if (dev->hca_type == ARBEL_NATIVE) { + /* + * We assume that the EQ arm and EQ set CI registers + * fall within the first BAR. We can't trust the + * values firmware gives us, since those addresses are + * valid on the HCA's side of the PCI bus but not + * necessarily the host side. + */ + if (mthca_map_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + &dev->clr_base)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + return -ENOMEM; + } + + /* + * Add 4 because we limit ourselves to EQs 0 ... 31, + * so we only need the low word of the register. + */ + if (mthca_map_reg(dev, ((pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_arm_base) + 4, 4, + &dev->eq_regs.arbel.eq_arm)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + dev->clr_base); + return -ENOMEM; + } + + if (mthca_map_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_set_ci_base, + MTHCA_EQ_SET_CI_SIZE, + &dev->eq_regs.arbel.eq_set_ci_base)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + mthca_unmap_reg(dev, ((pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_arm_base) + 4, 4, + dev->eq_regs.arbel.eq_arm); + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + dev->clr_base); + return -ENOMEM; + } + } else { + if (mthca_map_reg(dev, MTHCA_CLR_INT_BASE, MTHCA_CLR_INT_SIZE, + &dev->clr_base)) { + mthca_err(dev, "Couldn't map interrupt clear register, " + "aborting.\n"); + return -ENOMEM; + } + + if (mthca_map_reg(dev, MTHCA_ECR_BASE, + MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE, + &dev->eq_regs.tavor.ecr_base)) { + mthca_err(dev, "Couldn't map ecr register, " + "aborting.\n"); + mthca_unmap_reg(dev, MTHCA_CLR_INT_BASE, MTHCA_CLR_INT_SIZE, + dev->clr_base); + return -ENOMEM; + } + } + + return 0; + +} + +static void __devexit mthca_unmap_eq_regs(struct mthca_dev *dev) +{ + if (dev->hca_type == ARBEL_NATIVE) { + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_set_ci_base, + MTHCA_EQ_SET_CI_SIZE, + dev->eq_regs.arbel.eq_set_ci_base); + mthca_unmap_reg(dev, ((pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.eq_arm_base) + 4, 4, + dev->eq_regs.arbel.eq_arm); + mthca_unmap_reg(dev, (pci_resource_len(dev->pdev, 0) - 1) & + dev->fw.arbel.clr_int_base, MTHCA_CLR_INT_SIZE, + dev->clr_base); + } else { + mthca_unmap_reg(dev, MTHCA_ECR_BASE, + MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE, + dev->eq_regs.tavor.ecr_base); + mthca_unmap_reg(dev, MTHCA_CLR_INT_BASE, MTHCA_CLR_INT_SIZE, + dev->clr_base); + } +} + int __devinit mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt) { int ret; @@ -636,6 +834,10 @@ if (err) return err; + err = mthca_map_eq_regs(dev); + if (err) + goto err_out_free; + if (dev->mthca_flags & MTHCA_FLAG_MSI || dev->mthca_flags & MTHCA_FLAG_MSI_X) { dev->eq_table.clr_mask = 0; @@ -646,6 +848,8 @@ (dev->eq_table.inta_pin < 31 ? 4 : 0); } + dev->eq_table.arm_mask = 0; + intr = (dev->mthca_flags & MTHCA_FLAG_MSI) ? 128 : dev->eq_table.inta_pin; @@ -653,7 +857,7 @@ (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 128 : intr, &dev->eq_table.eq[MTHCA_EQ_COMP]); if (err) - goto err_out_free; + goto err_out_unmap; err = mthca_create_eq(dev, MTHCA_NUM_ASYNC_EQE, (dev->mthca_flags & MTHCA_FLAG_MSI_X) ? 129 : intr, @@ -676,15 +880,20 @@ for (i = 0; i < MTHCA_NUM_EQ; ++i) { err = request_irq(dev->eq_table.eq[i].msi_x_vector, - mthca_msi_x_interrupt, 0, - eq_name[i], dev->eq_table.eq + i); + dev->hca_type == ARBEL_NATIVE ? + mthca_arbel_msi_x_interrupt : + mthca_tavor_msi_x_interrupt, + 0, eq_name[i], dev->eq_table.eq + i); if (err) goto err_out_cmd; dev->eq_table.eq[i].have_irq = 1; } } else { - err = request_irq(dev->pdev->irq, mthca_interrupt, SA_SHIRQ, - DRV_NAME, dev); + err = request_irq(dev->pdev->irq, + dev->hca_type == ARBEL_NATIVE ? + mthca_arbel_interrupt : + mthca_tavor_interrupt, + SA_SHIRQ, DRV_NAME, dev); if (err) goto err_out_cmd; dev->eq_table.have_irq = 1; @@ -708,6 +917,12 @@ mthca_warn(dev, "MAP_EQ for cmd EQ %d returned status 0x%02x\n", dev->eq_table.eq[MTHCA_EQ_CMD].eqn, status); + for (i = 0; i < MTHCA_EQ_CMD; ++i) + if (dev->hca_type == ARBEL_NATIVE) + arbel_eq_req_not(dev, dev->eq_table.eq[i].eqn_mask); + else + tavor_eq_req_not(dev, dev->eq_table.eq[i].eqn); + return 0; err_out_cmd: @@ -720,6 +935,9 @@ err_out_comp: mthca_free_eq(dev, &dev->eq_table.eq[MTHCA_EQ_COMP]); +err_out_unmap: + mthca_unmap_eq_regs(dev); + err_out_free: mthca_alloc_cleanup(&dev->eq_table.alloc); return err; @@ -739,6 +957,8 @@ for (i = 0; i < MTHCA_NUM_EQ; ++i) mthca_free_eq(dev, &dev->eq_table.eq[i]); + + mthca_unmap_eq_regs(dev); mthca_alloc_cleanup(&dev->eq_table.alloc); } diff -Nru a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c --- a/drivers/infiniband/hw/mthca/mthca_main.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_main.c 2005-03-07 14:54:17 -08:00 @@ -171,6 +171,33 @@ mdev->limits.reserved_uars = dev_lim->reserved_uars; mdev->limits.reserved_pds = dev_lim->reserved_pds; + /* IB_DEVICE_RESIZE_MAX_WR not supported by driver. + May be doable since hardware supports it for SRQ. + + IB_DEVICE_N_NOTIFY_CQ is supported by hardware but not by driver. + + IB_DEVICE_SRQ_RESIZE is supported by hardware but SRQ is not + supported by driver. */ + mdev->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | + IB_DEVICE_PORT_ACTIVE_EVENT | + IB_DEVICE_SYS_IMAGE_GUID | + IB_DEVICE_RC_RNR_NAK_GEN; + + if (dev_lim->flags & DEV_LIM_FLAG_BAD_PKEY_CNTR) + mdev->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; + + if (dev_lim->flags & DEV_LIM_FLAG_BAD_QKEY_CNTR) + mdev->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR; + + if (dev_lim->flags & DEV_LIM_FLAG_RAW_MULTI) + mdev->device_cap_flags |= IB_DEVICE_RAW_MULTI; + + if (dev_lim->flags & DEV_LIM_FLAG_AUTO_PATH_MIG) + mdev->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG; + + if (dev_lim->flags & DEV_LIM_FLAG_UD_AV_PORT_ENFORCE) + mdev->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE; + if (dev_lim->flags & DEV_LIM_FLAG_SRQ) mdev->mthca_flags |= MTHCA_FLAG_SRQ; @@ -363,10 +390,9 @@ } mdev->mr_table.mtt_table = mthca_alloc_icm_table(mdev, init_hca->mtt_base, - mdev->limits.num_mtt_segs * init_hca->mtt_seg_sz, - mdev->limits.reserved_mtts * - init_hca->mtt_seg_sz, 1); + mdev->limits.num_mtt_segs, + mdev->limits.reserved_mtts, 1); if (!mdev->mr_table.mtt_table) { mthca_err(mdev, "Failed to map MTT context memory, aborting.\n"); err = -ENOMEM; @@ -374,10 +400,9 @@ } mdev->mr_table.mpt_table = mthca_alloc_icm_table(mdev, init_hca->mpt_base, - mdev->limits.num_mpts * dev_lim->mpt_entry_sz, - mdev->limits.reserved_mrws * - dev_lim->mpt_entry_sz, 1); + mdev->limits.num_mpts, + mdev->limits.reserved_mrws, 1); if (!mdev->mr_table.mpt_table) { mthca_err(mdev, "Failed to map MPT context memory, aborting.\n"); err = -ENOMEM; @@ -385,10 +410,9 @@ } mdev->qp_table.qp_table = mthca_alloc_icm_table(mdev, init_hca->qpc_base, - mdev->limits.num_qps * dev_lim->qpc_entry_sz, - mdev->limits.reserved_qps * - dev_lim->qpc_entry_sz, 1); + mdev->limits.num_qps, + mdev->limits.reserved_qps, 0); if (!mdev->qp_table.qp_table) { mthca_err(mdev, "Failed to map QP context memory, aborting.\n"); err = -ENOMEM; @@ -396,10 +420,9 @@ } mdev->qp_table.eqp_table = mthca_alloc_icm_table(mdev, init_hca->eqpc_base, - mdev->limits.num_qps * dev_lim->eqpc_entry_sz, - mdev->limits.reserved_qps * - dev_lim->eqpc_entry_sz, 1); + mdev->limits.num_qps, + mdev->limits.reserved_qps, 0); if (!mdev->qp_table.eqp_table) { mthca_err(mdev, "Failed to map EQP context memory, aborting.\n"); err = -ENOMEM; @@ -407,18 +430,38 @@ } mdev->cq_table.table = mthca_alloc_icm_table(mdev, init_hca->cqc_base, - mdev->limits.num_cqs * dev_lim->cqc_entry_sz, - mdev->limits.reserved_cqs * - dev_lim->cqc_entry_sz, 1); + mdev->limits.num_cqs, + mdev->limits.reserved_cqs, 0); if (!mdev->cq_table.table) { mthca_err(mdev, "Failed to map CQ context memory, aborting.\n"); err = -ENOMEM; goto err_unmap_eqp; } + /* + * It's not strictly required, but for simplicity just map the + * whole multicast group table now. The table isn't very big + * and it's a lot easier than trying to track ref counts. + */ + mdev->mcg_table.table = mthca_alloc_icm_table(mdev, init_hca->mc_base, + MTHCA_MGM_ENTRY_SIZE, + mdev->limits.num_mgms + + mdev->limits.num_amgms, + mdev->limits.num_mgms + + mdev->limits.num_amgms, + 0); + if (!mdev->mcg_table.table) { + mthca_err(mdev, "Failed to map MCG context memory, aborting.\n"); + err = -ENOMEM; + goto err_unmap_cq; + } + return 0; +err_unmap_cq: + mthca_free_icm_table(mdev, mdev->cq_table.table); + err_unmap_eqp: mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); @@ -570,11 +613,33 @@ MTHCA_INIT_DOORBELL_LOCK(&dev->doorbell_lock); + err = mthca_init_uar_table(dev); + if (err) { + mthca_err(dev, "Failed to initialize " + "user access region table, aborting.\n"); + return err; + } + + err = mthca_uar_alloc(dev, &dev->driver_uar); + if (err) { + mthca_err(dev, "Failed to allocate driver access region, " + "aborting.\n"); + goto err_uar_table_free; + } + + dev->kar = ioremap(dev->driver_uar.pfn << PAGE_SHIFT, PAGE_SIZE); + if (!dev->kar) { + mthca_err(dev, "Couldn't map kernel access region, " + "aborting.\n"); + err = -ENOMEM; + goto err_uar_free; + } + err = mthca_init_pd_table(dev); if (err) { mthca_err(dev, "Failed to initialize " "protection domain table, aborting.\n"); - return err; + goto err_kar_unmap; } err = mthca_init_mr_table(dev); @@ -591,13 +656,6 @@ goto err_mr_table_free; } - if (dev->hca_type == ARBEL_NATIVE) { - mthca_warn(dev, "Sorry, native MT25208 mode support is not done, " - "aborting.\n"); - err = -ENODEV; - goto err_pd_free; - } - err = mthca_init_eq_table(dev); if (err) { mthca_err(dev, "Failed to initialize " @@ -621,8 +679,9 @@ mthca_err(dev, "BIOS or ACPI interrupt routing problem?\n"); goto err_cmd_poll; - } else - mthca_dbg(dev, "NOP command IRQ test passed\n"); + } + + mthca_dbg(dev, "NOP command IRQ test passed\n"); err = mthca_init_cq_table(dev); if (err) { @@ -677,6 +736,15 @@ err_pd_table_free: mthca_cleanup_pd_table(dev); + +err_kar_unmap: + iounmap(dev->kar); + +err_uar_free: + mthca_uar_free(dev, &dev->driver_uar); + +err_uar_table_free: + mthca_cleanup_uar_table(dev); return err; } @@ -686,37 +754,18 @@ int err; /* - * We request our first BAR in two chunks, since the MSI-X - * vector table is right in the middle. + * We can't just use pci_request_regions() because the MSI-X + * table is right in the middle of the first BAR. If we did + * pci_request_region and grab all of the first BAR, then + * setting up MSI-X would fail, since the PCI core wants to do + * request_mem_region on the MSI-X vector table. * - * This is why we can't just use pci_request_regions() -- if - * we did then setting up MSI-X would fail, since the PCI core - * wants to do request_mem_region on the MSI-X vector table. + * So just request what we need right now, and request any + * other regions we need when setting up EQs. */ - if (!request_mem_region(pci_resource_start(pdev, 0) + - MTHCA_HCR_BASE, - MTHCA_HCR_SIZE, - DRV_NAME)) { - err = -EBUSY; - goto err_hcr_failed; - } - - if (!request_mem_region(pci_resource_start(pdev, 0) + - MTHCA_ECR_BASE, - MTHCA_MAP_ECR_SIZE, - DRV_NAME)) { - err = -EBUSY; - goto err_ecr_failed; - } - - if (!request_mem_region(pci_resource_start(pdev, 0) + - MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE, - DRV_NAME)) { - err = -EBUSY; - goto err_int_failed; - } - + if (!request_mem_region(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, + MTHCA_HCR_SIZE, DRV_NAME)) + return -EBUSY; err = pci_request_region(pdev, 2, DRV_NAME); if (err) @@ -731,24 +780,11 @@ return 0; err_bar4_failed: - pci_release_region(pdev, 2); -err_bar2_failed: - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE); -err_int_failed: - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_ECR_BASE, - MTHCA_MAP_ECR_SIZE); -err_ecr_failed: - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_HCR_BASE, +err_bar2_failed: + release_mem_region(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); -err_hcr_failed: return err; } @@ -761,16 +797,7 @@ pci_release_region(pdev, 2); - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE); - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_ECR_BASE, - MTHCA_MAP_ECR_SIZE); - - release_mem_region(pci_resource_start(pdev, 0) + - MTHCA_HCR_BASE, + release_mem_region(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); } @@ -828,9 +855,9 @@ const struct pci_device_id *id) { static int mthca_version_printed = 0; + static int mthca_memfree_warned = 0; int ddr_hidden = 0; int err; - unsigned long mthca_base; struct mthca_dev *mdev; if (!mthca_version_printed) { @@ -908,6 +935,10 @@ mdev->pdev = pdev; mdev->hca_type = id->driver_data; + if (mdev->hca_type == ARBEL_NATIVE && !mthca_memfree_warned++) + mthca_warn(mdev, "Warning: native MT25208 mode support is incomplete. " + "Your HCA may not work properly.\n"); + if (ddr_hidden) mdev->mthca_flags |= MTHCA_FLAG_DDR_HIDDEN; @@ -932,8 +963,7 @@ sema_init(&mdev->cmd.poll_sem, 1); mdev->cmd.use_events = 0; - mthca_base = pci_resource_start(pdev, 0); - mdev->hcr = ioremap(mthca_base + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); + mdev->hcr = ioremap(pci_resource_start(pdev, 0) + MTHCA_HCR_BASE, MTHCA_HCR_SIZE); if (!mdev->hcr) { mthca_err(mdev, "Couldn't map command register, " "aborting.\n"); @@ -941,40 +971,13 @@ goto err_free_dev; } - mdev->clr_base = ioremap(mthca_base + MTHCA_CLR_INT_BASE, - MTHCA_CLR_INT_SIZE); - if (!mdev->clr_base) { - mthca_err(mdev, "Couldn't map interrupt clear register, " - "aborting.\n"); - err = -ENOMEM; - goto err_iounmap; - } - - mdev->ecr_base = ioremap(mthca_base + MTHCA_ECR_BASE, - MTHCA_ECR_SIZE + MTHCA_ECR_CLR_SIZE); - if (!mdev->ecr_base) { - mthca_err(mdev, "Couldn't map ecr register, " - "aborting.\n"); - err = -ENOMEM; - goto err_iounmap_clr; - } - - mthca_base = pci_resource_start(pdev, 2); - mdev->kar = ioremap(mthca_base + PAGE_SIZE * MTHCA_KAR_PAGE, PAGE_SIZE); - if (!mdev->kar) { - mthca_err(mdev, "Couldn't map kernel access region, " - "aborting.\n"); - err = -ENOMEM; - goto err_iounmap_ecr; - } - err = mthca_tune_pci(mdev); if (err) - goto err_iounmap_kar; + goto err_iounmap; err = mthca_init_hca(mdev); if (err) - goto err_iounmap_kar; + goto err_iounmap; err = mthca_setup_hca(mdev); if (err) @@ -1007,19 +1010,11 @@ mthca_cleanup_mr_table(mdev); mthca_cleanup_pd_table(mdev); + mthca_cleanup_uar_table(mdev); err_close: mthca_close_hca(mdev); -err_iounmap_kar: - iounmap(mdev->kar); - -err_iounmap_ecr: - iounmap(mdev->ecr_base); - -err_iounmap_clr: - iounmap(mdev->clr_base); - err_iounmap: iounmap(mdev->hcr); @@ -1065,11 +1060,13 @@ mthca_cleanup_mr_table(mdev); mthca_cleanup_pd_table(mdev); + iounmap(mdev->kar); + mthca_uar_free(mdev, &mdev->driver_uar); + mthca_cleanup_uar_table(mdev); + mthca_close_hca(mdev); iounmap(mdev->hcr); - iounmap(mdev->ecr_base); - iounmap(mdev->clr_base); if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) pci_disable_msix(pdev); diff -Nru a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c --- a/drivers/infiniband/hw/mthca/mthca_memfree.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c 2005-03-07 14:54:16 -08:00 @@ -79,6 +79,7 @@ if (!icm) return icm; + icm->refcount = 0; INIT_LIST_HEAD(&icm->chunk_list); cur_order = get_order(MTHCA_ICM_ALLOC_SIZE); @@ -138,9 +139,62 @@ return NULL; } +int mthca_table_get(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) +{ + int i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; + int ret = 0; + u8 status; + + down(&table->mutex); + + if (table->icm[i]) { + ++table->icm[i]->refcount; + goto out; + } + + table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> PAGE_SHIFT, + (table->lowmem ? GFP_KERNEL : GFP_HIGHUSER) | + __GFP_NOWARN); + if (!table->icm[i]) { + ret = -ENOMEM; + goto out; + } + + if (mthca_MAP_ICM(dev, table->icm[i], table->virt + i * MTHCA_TABLE_CHUNK_SIZE, + &status) || status) { + mthca_free_icm(dev, table->icm[i]); + table->icm[i] = NULL; + ret = -ENOMEM; + goto out; + } + + ++table->icm[i]->refcount; + +out: + up(&table->mutex); + return ret; +} + +void mthca_table_put(struct mthca_dev *dev, struct mthca_icm_table *table, int obj) +{ + int i = (obj & (table->num_obj - 1)) * table->obj_size / MTHCA_TABLE_CHUNK_SIZE; + u8 status; + + down(&table->mutex); + + if (--table->icm[i]->refcount == 0) { + mthca_UNMAP_ICM(dev, table->virt + i * MTHCA_TABLE_CHUNK_SIZE, + MTHCA_TABLE_CHUNK_SIZE >> 12, &status); + mthca_free_icm(dev, table->icm[i]); + table->icm[i] = NULL; + } + + up(&table->mutex); +} + struct mthca_icm_table *mthca_alloc_icm_table(struct mthca_dev *dev, - u64 virt, unsigned size, - unsigned reserved, + u64 virt, int obj_size, + int nobj, int reserved, int use_lowmem) { struct mthca_icm_table *table; @@ -148,20 +202,23 @@ int i; u8 status; - num_icm = size / MTHCA_TABLE_CHUNK_SIZE; + num_icm = obj_size * nobj / MTHCA_TABLE_CHUNK_SIZE; table = kmalloc(sizeof *table + num_icm * sizeof *table->icm, GFP_KERNEL); if (!table) return NULL; - table->virt = virt; - table->num_icm = num_icm; - init_MUTEX(&table->sem); + table->virt = virt; + table->num_icm = num_icm; + table->num_obj = nobj; + table->obj_size = obj_size; + table->lowmem = use_lowmem; + init_MUTEX(&table->mutex); for (i = 0; i < num_icm; ++i) table->icm[i] = NULL; - for (i = 0; i < (reserved + MTHCA_TABLE_CHUNK_SIZE - 1) / MTHCA_TABLE_CHUNK_SIZE; ++i) { + for (i = 0; i * MTHCA_TABLE_CHUNK_SIZE < reserved * obj_size; ++i) { table->icm[i] = mthca_alloc_icm(dev, MTHCA_TABLE_CHUNK_SIZE >> PAGE_SHIFT, (use_lowmem ? GFP_KERNEL : GFP_HIGHUSER) | __GFP_NOWARN); @@ -173,6 +230,12 @@ table->icm[i] = NULL; goto err; } + + /* + * Add a reference to this ICM chunk so that it never + * gets freed (since it contains reserved firmware objects). + */ + ++table->icm[i]->refcount; } return table; @@ -203,4 +266,200 @@ } kfree(table); +} + +static u64 mthca_uarc_virt(struct mthca_dev *dev, int page) +{ + return dev->uar_table.uarc_base + + dev->driver_uar.index * dev->uar_table.uarc_size + + page * 4096; +} + +int mthca_alloc_db(struct mthca_dev *dev, int type, u32 qn, u32 **db) +{ + int group; + int start, end, dir; + int i, j; + struct mthca_db_page *page; + int ret = 0; + u8 status; + + down(&dev->db_tab->mutex); + + switch (type) { + case MTHCA_DB_TYPE_CQ_ARM: + case MTHCA_DB_TYPE_SQ: + group = 0; + start = 0; + end = dev->db_tab->max_group1; + dir = 1; + break; + + case MTHCA_DB_TYPE_CQ_SET_CI: + case MTHCA_DB_TYPE_RQ: + case MTHCA_DB_TYPE_SRQ: + group = 1; + start = dev->db_tab->npages - 1; + end = dev->db_tab->min_group2; + dir = -1; + break; + + default: + return -1; + } + + for (i = start; i != end; i += dir) + if (dev->db_tab->page[i].db_rec && + !bitmap_full(dev->db_tab->page[i].used, + MTHCA_DB_REC_PER_PAGE)) { + page = dev->db_tab->page + i; + goto found; + } + + if (dev->db_tab->max_group1 >= dev->db_tab->min_group2 - 1) { + ret = -ENOMEM; + goto out; + } + + page = dev->db_tab->page + end; + page->db_rec = dma_alloc_coherent(&dev->pdev->dev, 4096, + &page->mapping, GFP_KERNEL); + if (!page->db_rec) { + ret = -ENOMEM; + goto out; + } + memset(page->db_rec, 0, 4096); + + ret = mthca_MAP_ICM_page(dev, page->mapping, mthca_uarc_virt(dev, i), &status); + if (!ret && status) + ret = -EINVAL; + if (ret) { + dma_free_coherent(&dev->pdev->dev, 4096, + page->db_rec, page->mapping); + goto out; + } + + bitmap_zero(page->used, MTHCA_DB_REC_PER_PAGE); + if (group == 0) + ++dev->db_tab->max_group1; + else + --dev->db_tab->min_group2; + +found: + j = find_first_zero_bit(page->used, MTHCA_DB_REC_PER_PAGE); + set_bit(j, page->used); + + if (group == 1) + j = MTHCA_DB_REC_PER_PAGE - 1 - j; + + ret = i * MTHCA_DB_REC_PER_PAGE + j; + + page->db_rec[j] = cpu_to_be64((qn << 8) | (type << 5)); + + *db = (u32 *) &page->db_rec[j]; + +out: + up(&dev->db_tab->mutex); + + return ret; +} + +void mthca_free_db(struct mthca_dev *dev, int type, int db_index) +{ + int i, j; + struct mthca_db_page *page; + u8 status; + + i = db_index / MTHCA_DB_REC_PER_PAGE; + j = db_index % MTHCA_DB_REC_PER_PAGE; + + page = dev->db_tab->page + i; + + down(&dev->db_tab->mutex); + + page->db_rec[j] = 0; + if (i >= dev->db_tab->min_group2) + j = MTHCA_DB_REC_PER_PAGE - 1 - j; + clear_bit(j, page->used); + + if (bitmap_empty(page->used, MTHCA_DB_REC_PER_PAGE) && + i >= dev->db_tab->max_group1 - 1) { + mthca_UNMAP_ICM(dev, mthca_uarc_virt(dev, i), 1, &status); + + dma_free_coherent(&dev->pdev->dev, 4096, + page->db_rec, page->mapping); + page->db_rec = NULL; + + if (i == dev->db_tab->max_group1) { + --dev->db_tab->max_group1; + /* XXX may be able to unmap more pages now */ + } + if (i == dev->db_tab->min_group2) + ++dev->db_tab->min_group2; + } + + up(&dev->db_tab->mutex); +} + +int mthca_init_db_tab(struct mthca_dev *dev) +{ + int i; + + if (dev->hca_type != ARBEL_NATIVE) + return 0; + + dev->db_tab = kmalloc(sizeof *dev->db_tab, GFP_KERNEL); + if (!dev->db_tab) + return -ENOMEM; + + init_MUTEX(&dev->db_tab->mutex); + + dev->db_tab->npages = dev->uar_table.uarc_size / PAGE_SIZE; + dev->db_tab->max_group1 = 0; + dev->db_tab->min_group2 = dev->db_tab->npages - 1; + + dev->db_tab->page = kmalloc(dev->db_tab->npages * + sizeof *dev->db_tab->page, + GFP_KERNEL); + if (!dev->db_tab->page) { + kfree(dev->db_tab); + return -ENOMEM; + } + + for (i = 0; i < dev->db_tab->npages; ++i) + dev->db_tab->page[i].db_rec = NULL; + + return 0; +} + +void mthca_cleanup_db_tab(struct mthca_dev *dev) +{ + int i; + u8 status; + + if (dev->hca_type != ARBEL_NATIVE) + return; + + /* + * Because we don't always free our UARC pages when they + * become empty to make mthca_free_db() simpler we need to + * make a sweep through the doorbell pages and free any + * leftover pages now. + */ + for (i = 0; i < dev->db_tab->npages; ++i) { + if (!dev->db_tab->page[i].db_rec) + continue; + + if (!bitmap_empty(dev->db_tab->page[i].used, MTHCA_DB_REC_PER_PAGE)) + mthca_warn(dev, "Kernel UARC page %d not empty\n", i); + + mthca_UNMAP_ICM(dev, mthca_uarc_virt(dev, i), 1, &status); + + dma_free_coherent(&dev->pdev->dev, 4096, + dev->db_tab->page[i].db_rec, + dev->db_tab->page[i].mapping); + } + + kfree(dev->db_tab->page); + kfree(dev->db_tab); } diff -Nru a/drivers/infiniband/hw/mthca/mthca_memfree.h b/drivers/infiniband/hw/mthca/mthca_memfree.h --- a/drivers/infiniband/hw/mthca/mthca_memfree.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_memfree.h 2005-03-07 14:54:17 -08:00 @@ -53,12 +53,16 @@ struct mthca_icm { struct list_head chunk_list; + int refcount; }; struct mthca_icm_table { u64 virt; int num_icm; - struct semaphore sem; + int num_obj; + int obj_size; + int lowmem; + struct semaphore mutex; struct mthca_icm *icm[0]; }; @@ -75,10 +79,12 @@ void mthca_free_icm(struct mthca_dev *dev, struct mthca_icm *icm); struct mthca_icm_table *mthca_alloc_icm_table(struct mthca_dev *dev, - u64 virt, unsigned size, - unsigned reserved, + u64 virt, int obj_size, + int nobj, int reserved, int use_lowmem); void mthca_free_icm_table(struct mthca_dev *dev, struct mthca_icm_table *table); +int mthca_table_get(struct mthca_dev *dev, struct mthca_icm_table *table, int obj); +void mthca_table_put(struct mthca_dev *dev, struct mthca_icm_table *table, int obj); static inline void mthca_icm_first(struct mthca_icm *icm, struct mthca_icm_iter *iter) @@ -118,5 +124,38 @@ { return sg_dma_len(&iter->chunk->mem[iter->page_idx]); } + +enum { + MTHCA_DB_REC_PER_PAGE = 4096 / 8 +}; + +struct mthca_db_page { + DECLARE_BITMAP(used, MTHCA_DB_REC_PER_PAGE); + u64 *db_rec; + dma_addr_t mapping; +}; + +struct mthca_db_table { + int npages; + int max_group1; + int min_group2; + struct mthca_db_page *page; + struct semaphore mutex; +}; + +enum { + MTHCA_DB_TYPE_INVALID = 0x0, + MTHCA_DB_TYPE_CQ_SET_CI = 0x1, + MTHCA_DB_TYPE_CQ_ARM = 0x2, + MTHCA_DB_TYPE_SQ = 0x3, + MTHCA_DB_TYPE_RQ = 0x4, + MTHCA_DB_TYPE_SRQ = 0x5, + MTHCA_DB_TYPE_GROUP_SEP = 0x7 +}; + +int mthca_init_db_tab(struct mthca_dev *dev); +void mthca_cleanup_db_tab(struct mthca_dev *dev); +int mthca_alloc_db(struct mthca_dev *dev, int type, u32 qn, u32 **db); +void mthca_free_db(struct mthca_dev *dev, int type, int db_index); #endif /* MTHCA_MEMFREE_H */ diff -Nru a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c --- a/drivers/infiniband/hw/mthca/mthca_mr.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_mr.c 2005-03-07 14:54:18 -08:00 @@ -53,7 +53,8 @@ u32 window_count; u32 window_count_limit; u64 mtt_seg; - u32 reserved[3]; + u32 mtt_sz; /* Arbel only */ + u32 reserved[2]; } __attribute__((packed)); #define MTHCA_MPT_FLAG_SW_OWNS (0xfUL << 28) @@ -121,21 +122,38 @@ spin_unlock(&dev->mr_table.mpt_alloc.lock); } +static inline u32 hw_index_to_key(struct mthca_dev *dev, u32 ind) +{ + if (dev->hca_type == ARBEL_NATIVE) + return (ind >> 24) | (ind << 8); + else + return ind; +} + +static inline u32 key_to_hw_index(struct mthca_dev *dev, u32 key) +{ + if (dev->hca_type == ARBEL_NATIVE) + return (key << 24) | (key >> 8); + else + return key; +} + int mthca_mr_alloc_notrans(struct mthca_dev *dev, u32 pd, u32 access, struct mthca_mr *mr) { void *mailbox; struct mthca_mpt_entry *mpt_entry; + u32 key; int err; u8 status; might_sleep(); mr->order = -1; - mr->ibmr.lkey = mthca_alloc(&dev->mr_table.mpt_alloc); - if (mr->ibmr.lkey == -1) + key = mthca_alloc(&dev->mr_table.mpt_alloc); + if (key == -1) return -ENOMEM; - mr->ibmr.rkey = mr->ibmr.lkey; + mr->ibmr.rkey = mr->ibmr.lkey = hw_index_to_key(dev, key); mailbox = kmalloc(sizeof *mpt_entry + MTHCA_CMD_MAILBOX_EXTRA, GFP_KERNEL); @@ -151,7 +169,7 @@ MTHCA_MPT_FLAG_REGION | access); mpt_entry->page_size = 0; - mpt_entry->key = cpu_to_be32(mr->ibmr.lkey); + mpt_entry->key = cpu_to_be32(key); mpt_entry->pd = cpu_to_be32(pd); mpt_entry->start = 0; mpt_entry->length = ~0ULL; @@ -160,7 +178,7 @@ sizeof *mpt_entry - offsetof(struct mthca_mpt_entry, lkey)); err = mthca_SW2HW_MPT(dev, mpt_entry, - mr->ibmr.lkey & (dev->limits.num_mpts - 1), + key & (dev->limits.num_mpts - 1), &status); if (err) mthca_warn(dev, "SW2HW_MPT failed (%d)\n", err); @@ -182,6 +200,7 @@ void *mailbox; u64 *mtt_entry; struct mthca_mpt_entry *mpt_entry; + u32 key; int err = -ENOMEM; u8 status; int i; @@ -189,10 +208,10 @@ might_sleep(); WARN_ON(buffer_size_shift >= 32); - mr->ibmr.lkey = mthca_alloc(&dev->mr_table.mpt_alloc); - if (mr->ibmr.lkey == -1) + key = mthca_alloc(&dev->mr_table.mpt_alloc); + if (key == -1) return -ENOMEM; - mr->ibmr.rkey = mr->ibmr.lkey; + mr->ibmr.rkey = mr->ibmr.lkey = hw_index_to_key(dev, key); for (i = dev->limits.mtt_seg_size / 8, mr->order = 0; i < list_len; @@ -254,7 +273,7 @@ access); mpt_entry->page_size = cpu_to_be32(buffer_size_shift - 12); - mpt_entry->key = cpu_to_be32(mr->ibmr.lkey); + mpt_entry->key = cpu_to_be32(key); mpt_entry->pd = cpu_to_be32(pd); mpt_entry->start = cpu_to_be64(iova); mpt_entry->length = cpu_to_be64(total_size); @@ -275,7 +294,7 @@ } err = mthca_SW2HW_MPT(dev, mpt_entry, - mr->ibmr.lkey & (dev->limits.num_mpts - 1), + key & (dev->limits.num_mpts - 1), &status); if (err) mthca_warn(dev, "SW2HW_MPT failed (%d)\n", err); @@ -307,7 +326,8 @@ might_sleep(); err = mthca_HW2SW_MPT(dev, NULL, - mr->ibmr.lkey & (dev->limits.num_mpts - 1), + key_to_hw_index(dev, mr->ibmr.lkey) & + (dev->limits.num_mpts - 1), &status); if (err) mthca_warn(dev, "HW2SW_MPT failed (%d)\n", err); @@ -318,7 +338,7 @@ if (mr->order >= 0) mthca_free_mtt(dev, mr->first_seg, mr->order); - mthca_free(&dev->mr_table.mpt_alloc, mr->ibmr.lkey); + mthca_free(&dev->mr_table.mpt_alloc, key_to_hw_index(dev, mr->ibmr.lkey)); } int __devinit mthca_init_mr_table(struct mthca_dev *dev) diff -Nru a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c --- a/drivers/infiniband/hw/mthca/mthca_profile.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_profile.c 2005-03-07 14:54:18 -08:00 @@ -236,15 +236,20 @@ init_hca->mtt_seg_sz = ffs(dev_lim->mtt_seg_sz) - 7; break; case MTHCA_RES_UAR: + dev->limits.num_uars = profile[i].num; init_hca->uar_scratch_base = profile[i].start; break; case MTHCA_RES_UDAV: dev->av_table.ddr_av_base = profile[i].start; dev->av_table.num_ddr_avs = profile[i].num; + break; case MTHCA_RES_UARC: - init_hca->uarc_base = profile[i].start; - init_hca->log_uarc_sz = ffs(request->uarc_size) - 13; - init_hca->log_uar_sz = ffs(request->num_uar) - 1; + dev->uar_table.uarc_size = request->uarc_size; + dev->uar_table.uarc_base = profile[i].start; + init_hca->uarc_base = profile[i].start; + init_hca->log_uarc_sz = ffs(request->uarc_size) - 13; + init_hca->log_uar_sz = ffs(request->num_uar) - 1; + break; default: break; } diff -Nru a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c --- a/drivers/infiniband/hw/mthca/mthca_provider.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_provider.c 2005-03-07 14:54:18 -08:00 @@ -43,6 +43,8 @@ struct ib_smp *in_mad = NULL; struct ib_smp *out_mad = NULL; int err = -ENOMEM; + struct mthca_dev* mdev = to_mdev(ibdev); + u8 status; in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL); @@ -50,7 +52,7 @@ if (!in_mad || !out_mad) goto out; - props->fw_ver = to_mdev(ibdev)->fw_ver; + props->fw_ver = mdev->fw_ver; memset(in_mad, 0, sizeof *in_mad); in_mad->base_version = 1; @@ -59,7 +61,7 @@ in_mad->method = IB_MGMT_METHOD_GET; in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; - err = mthca_MAD_IFC(to_mdev(ibdev), 1, 1, + err = mthca_MAD_IFC(mdev, 1, 1, 1, NULL, NULL, in_mad, out_mad, &status); if (err) @@ -69,10 +71,11 @@ goto out; } - props->vendor_id = be32_to_cpup((u32 *) (out_mad->data + 36)) & + props->device_cap_flags = mdev->device_cap_flags; + props->vendor_id = be32_to_cpup((u32 *) (out_mad->data + 36)) & 0xffffff; - props->vendor_part_id = be16_to_cpup((u16 *) (out_mad->data + 30)); - props->hw_ver = be16_to_cpup((u16 *) (out_mad->data + 32)); + props->vendor_part_id = be16_to_cpup((u16 *) (out_mad->data + 30)); + props->hw_ver = be16_to_cpup((u16 *) (out_mad->data + 32)); memcpy(&props->sys_image_guid, out_mad->data + 4, 8); memcpy(&props->node_guid, out_mad->data + 12, 8); @@ -343,7 +346,7 @@ to_mcq(init_attr->send_cq), to_mcq(init_attr->recv_cq), init_attr->qp_type, init_attr->sq_sig_type, - init_attr->rq_sig_type, qp); + qp); qp->ibqp.qp_num = qp->qpn; break; } @@ -364,7 +367,7 @@ err = mthca_alloc_sqp(to_mdev(pd->device), to_mpd(pd), to_mcq(init_attr->send_cq), to_mcq(init_attr->recv_cq), - init_attr->sq_sig_type, init_attr->rq_sig_type, + init_attr->sq_sig_type, qp->ibqp.qp_num, init_attr->port_num, to_msqp(qp)); break; @@ -408,8 +411,7 @@ if (err) { kfree(cq); cq = ERR_PTR(err); - } else - cq->ibcq.cqe = nent - 1; + } return &cq->ibcq; } @@ -422,13 +424,6 @@ return 0; } -static int mthca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify notify) -{ - mthca_arm_cq(to_mdev(cq->device), to_mcq(cq), - notify == IB_CQ_SOLICITED); - return 0; -} - static inline u32 convert_access(int acc) { return (acc & IB_ACCESS_REMOTE_ATOMIC ? MTHCA_MPT_FLAG_ATOMIC : 0) | @@ -621,18 +616,25 @@ dev->ib_dev.create_qp = mthca_create_qp; dev->ib_dev.modify_qp = mthca_modify_qp; dev->ib_dev.destroy_qp = mthca_destroy_qp; - dev->ib_dev.post_send = mthca_post_send; - dev->ib_dev.post_recv = mthca_post_receive; dev->ib_dev.create_cq = mthca_create_cq; dev->ib_dev.destroy_cq = mthca_destroy_cq; dev->ib_dev.poll_cq = mthca_poll_cq; - dev->ib_dev.req_notify_cq = mthca_req_notify_cq; dev->ib_dev.get_dma_mr = mthca_get_dma_mr; dev->ib_dev.reg_phys_mr = mthca_reg_phys_mr; dev->ib_dev.dereg_mr = mthca_dereg_mr; dev->ib_dev.attach_mcast = mthca_multicast_attach; dev->ib_dev.detach_mcast = mthca_multicast_detach; dev->ib_dev.process_mad = mthca_process_mad; + + if (dev->hca_type == ARBEL_NATIVE) { + dev->ib_dev.req_notify_cq = mthca_arbel_arm_cq; + dev->ib_dev.post_send = mthca_arbel_post_send; + dev->ib_dev.post_recv = mthca_arbel_post_receive; + } else { + dev->ib_dev.req_notify_cq = mthca_tavor_arm_cq; + dev->ib_dev.post_send = mthca_tavor_post_send; + dev->ib_dev.post_recv = mthca_tavor_post_receive; + } init_MUTEX(&dev->cap_mask_mutex); diff -Nru a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h --- a/drivers/infiniband/hw/mthca/mthca_provider.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_provider.h 2005-03-07 14:54:17 -08:00 @@ -49,6 +49,11 @@ DECLARE_PCI_UNMAP_ADDR(mapping) }; +struct mthca_uar { + unsigned long pfn; + int index; +}; + struct mthca_mr { struct ib_mr ibmr; int order; @@ -65,7 +70,7 @@ struct mthca_eq { struct mthca_dev *dev; int eqn; - u32 ecr_mask; + u32 eqn_mask; u32 cons_index; u16 msi_x_vector; u16 msi_x_entry; @@ -77,12 +82,18 @@ struct mthca_av; +enum mthca_ah_type { + MTHCA_AH_ON_HCA, + MTHCA_AH_PCI_POOL, + MTHCA_AH_KMALLOC +}; + struct mthca_ah { - struct ib_ah ibah; - int on_hca; - u32 key; - struct mthca_av *av; - dma_addr_t avdma; + struct ib_ah ibah; + enum mthca_ah_type type; + u32 key; + struct mthca_av *av; + dma_addr_t avdma; }; /* @@ -136,8 +147,16 @@ spinlock_t lock; atomic_t refcount; int cqn; - int cons_index; + u32 cons_index; int is_direct; + + /* Next fields are Arbel only */ + int set_ci_db_index; + u32 *set_ci_db; + int arm_db_index; + u32 *arm_db; + int arm_sn; + union { struct mthca_buf_list direct; struct mthca_buf_list *page_list; @@ -147,19 +166,22 @@ }; struct mthca_wq { - int max; - int cur; - int next; - int last_comp; - void *last; - int max_gs; - int wqe_shift; - enum ib_sig_type policy; + spinlock_t lock; + int max; + unsigned next_ind; + unsigned last_comp; + unsigned head; + unsigned tail; + void *last; + int max_gs; + int wqe_shift; + + int db_index; /* Arbel only */ + u32 *db; }; struct mthca_qp { struct ib_qp ibqp; - spinlock_t lock; atomic_t refcount; u32 qpn; int is_direct; @@ -172,6 +194,7 @@ struct mthca_wq rq; struct mthca_wq sq; + enum ib_sig_type sq_policy; int send_wqe_offset; u64 *wrid; diff -Nru a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c --- a/drivers/infiniband/hw/mthca/mthca_qp.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_qp.c 2005-03-07 14:54:16 -08:00 @@ -40,6 +40,7 @@ #include "mthca_dev.h" #include "mthca_cmd.h" +#include "mthca_memfree.h" enum { MTHCA_MAX_DIRECT_QP_SIZE = 4 * PAGE_SIZE, @@ -105,8 +106,11 @@ struct mthca_qp_context { u32 flags; - u32 sched_queue; - u32 mtu_msgmax; + u32 tavor_sched_queue; /* Reserved on Arbel */ + u8 mtu_msgmax; + u8 rq_size_stride; /* Reserved on Tavor */ + u8 sq_size_stride; /* Reserved on Tavor */ + u8 rlkey_arbel_sched_queue; /* Reserved on Tavor */ u32 usr_page; u32 local_qpn; u32 remote_qpn; @@ -121,18 +125,22 @@ u32 reserved2; u32 next_send_psn; u32 cqn_snd; - u32 next_snd_wqe[2]; + u32 snd_wqe_base_l; /* Next send WQE on Tavor */ + u32 snd_db_index; /* (debugging only entries) */ u32 last_acked_psn; u32 ssn; u32 params2; u32 rnr_nextrecvpsn; u32 ra_buff_indx; u32 cqn_rcv; - u32 next_rcv_wqe[2]; + u32 rcv_wqe_base_l; /* Next recv WQE on Tavor */ + u32 rcv_db_index; /* (debugging only entries) */ u32 qkey; u32 srqn; u32 rmsn; - u32 reserved3[19]; + u16 rq_wqe_counter; /* reserved on Tavor */ + u16 sq_wqe_counter; /* reserved on Tavor */ + u32 reserved3[18]; } __attribute__((packed)); struct mthca_qp_param { @@ -193,7 +201,7 @@ u32 imm; /* immediate data */ }; -struct mthca_ud_seg { +struct mthca_tavor_ud_seg { u32 reserved1; u32 lkey; u64 av_addr; @@ -203,6 +211,13 @@ u32 reserved3[2]; }; +struct mthca_arbel_ud_seg { + u32 av[8]; + u32 dqpn; + u32 qkey; + u32 reserved[2]; +}; + struct mthca_bind_seg { u32 flags; /* [31] Atomic [30] rem write [29] rem read */ u32 reserved; @@ -238,6 +253,16 @@ u16 vcrc; }; +static const u8 mthca_opcode[] = { + [IB_WR_SEND] = MTHCA_OPCODE_SEND, + [IB_WR_SEND_WITH_IMM] = MTHCA_OPCODE_SEND_IMM, + [IB_WR_RDMA_WRITE] = MTHCA_OPCODE_RDMA_WRITE, + [IB_WR_RDMA_WRITE_WITH_IMM] = MTHCA_OPCODE_RDMA_WRITE_IMM, + [IB_WR_RDMA_READ] = MTHCA_OPCODE_RDMA_READ, + [IB_WR_ATOMIC_CMP_AND_SWP] = MTHCA_OPCODE_ATOMIC_CS, + [IB_WR_ATOMIC_FETCH_AND_ADD] = MTHCA_OPCODE_ATOMIC_FA, +}; + static int is_sqp(struct mthca_dev *dev, struct mthca_qp *qp) { return qp->qpn >= dev->qp_table.sqp_start && @@ -552,9 +577,11 @@ else cur_state = attr->cur_qp_state; } else { - spin_lock_irq(&qp->lock); + spin_lock_irq(&qp->sq.lock); + spin_lock(&qp->rq.lock); cur_state = qp->state; - spin_unlock_irq(&qp->lock); + spin_unlock(&qp->rq.lock); + spin_unlock_irq(&qp->sq.lock); } if (attr_mask & IB_QP_STATE) { @@ -617,15 +644,24 @@ break; } } - /* leave sched_queue as 0 */ + + /* leave tavor_sched_queue as 0 */ + if (qp->transport == MLX || qp->transport == UD) - qp_context->mtu_msgmax = cpu_to_be32((IB_MTU_2048 << 29) | - (11 << 24)); - else if (attr_mask & IB_QP_PATH_MTU) { - qp_context->mtu_msgmax = cpu_to_be32((attr->path_mtu << 29) | - (31 << 24)); + qp_context->mtu_msgmax = (IB_MTU_2048 << 5) | 11; + else if (attr_mask & IB_QP_PATH_MTU) + qp_context->mtu_msgmax = (attr->path_mtu << 5) | 31; + + if (dev->hca_type == ARBEL_NATIVE) { + qp_context->rq_size_stride = + ((ffs(qp->rq.max) - 1) << 3) | (qp->rq.wqe_shift - 4); + qp_context->sq_size_stride = + ((ffs(qp->sq.max) - 1) << 3) | (qp->sq.wqe_shift - 4); } - qp_context->usr_page = cpu_to_be32(MTHCA_KAR_PAGE); + + /* leave arbel_sched_queue as 0 */ + + qp_context->usr_page = cpu_to_be32(dev->driver_uar.index); qp_context->local_qpn = cpu_to_be32(qp->qpn); if (attr_mask & IB_QP_DEST_QPN) { qp_context->remote_qpn = cpu_to_be32(attr->dest_qp_num); @@ -690,7 +726,7 @@ MTHCA_QP_BIT_SRE | MTHCA_QP_BIT_SWE | MTHCA_QP_BIT_SAE); - if (qp->sq.policy == IB_SIGNAL_ALL_WR) + if (qp->sq_policy == IB_SIGNAL_ALL_WR) qp_context->params1 |= cpu_to_be32(MTHCA_QP_BIT_SSC); if (attr_mask & IB_QP_RETRY_CNT) { qp_context->params1 |= cpu_to_be32(attr->retry_cnt << 16); @@ -708,6 +744,11 @@ qp_context->next_send_psn = cpu_to_be32(attr->sq_psn); qp_context->cqn_snd = cpu_to_be32(to_mcq(ibqp->send_cq)->cqn); + if (dev->hca_type == ARBEL_NATIVE) { + qp_context->snd_wqe_base_l = cpu_to_be32(qp->send_wqe_offset); + qp_context->snd_db_index = cpu_to_be32(qp->sq.db_index); + } + if (attr_mask & IB_QP_ACCESS_FLAGS) { /* * Only enable RDMA/atomics if we have responder @@ -778,8 +819,8 @@ qp->resp_depth = attr->max_rd_atomic; } - if (qp->rq.policy == IB_SIGNAL_ALL_WR) - qp_context->params2 |= cpu_to_be32(MTHCA_QP_BIT_RSC); + qp_context->params2 |= cpu_to_be32(MTHCA_QP_BIT_RSC); + if (attr_mask & IB_QP_MIN_RNR_TIMER) { qp_context->rnr_nextrecvpsn |= cpu_to_be32(attr->min_rnr_timer << 24); qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RNR_TIMEOUT); @@ -787,12 +828,16 @@ if (attr_mask & IB_QP_RQ_PSN) qp_context->rnr_nextrecvpsn |= cpu_to_be32(attr->rq_psn); - qp_context->ra_buff_indx = dev->qp_table.rdb_base + - ((qp->qpn & (dev->limits.num_qps - 1)) * MTHCA_RDB_ENTRY_SIZE << - dev->qp_table.rdb_shift); + qp_context->ra_buff_indx = + cpu_to_be32(dev->qp_table.rdb_base + + ((qp->qpn & (dev->limits.num_qps - 1)) * MTHCA_RDB_ENTRY_SIZE << + dev->qp_table.rdb_shift)); qp_context->cqn_rcv = cpu_to_be32(to_mcq(ibqp->recv_cq)->cqn); + if (dev->hca_type == ARBEL_NATIVE) + qp_context->rcv_db_index = cpu_to_be32(qp->rq.db_index); + if (attr_mask & IB_QP_QKEY) { qp_context->qkey = cpu_to_be32(attr->qkey); qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_Q_KEY); @@ -860,12 +905,20 @@ size = sizeof (struct mthca_next_seg) + qp->sq.max_gs * sizeof (struct mthca_data_seg); - if (qp->transport == MLX) + switch (qp->transport) { + case MLX: size += 2 * sizeof (struct mthca_data_seg); - else if (qp->transport == UD) - size += sizeof (struct mthca_ud_seg); - else /* bind seg is as big as atomic + raddr segs */ + break; + case UD: + if (dev->hca_type == ARBEL_NATIVE) + size += sizeof (struct mthca_arbel_ud_seg); + else + size += sizeof (struct mthca_tavor_ud_seg); + break; + default: + /* bind seg is as big as atomic + raddr segs */ size += sizeof (struct mthca_bind_seg); + } for (qp->sq.wqe_shift = 6; 1 << qp->sq.wqe_shift < size; qp->sq.wqe_shift++) @@ -942,7 +995,6 @@ err = mthca_mr_alloc_phys(dev, pd->pd_num, dma_list, shift, npages, 0, size, - MTHCA_MPT_FLAG_LOCAL_WRITE | MTHCA_MPT_FLAG_LOCAL_READ, &qp->mr); if (err) @@ -972,34 +1024,134 @@ return err; } +static int mthca_alloc_memfree(struct mthca_dev *dev, + struct mthca_qp *qp) +{ + int ret = 0; + + if (dev->hca_type == ARBEL_NATIVE) { + ret = mthca_table_get(dev, dev->qp_table.qp_table, qp->qpn); + if (ret) + return ret; + + ret = mthca_table_get(dev, dev->qp_table.eqp_table, qp->qpn); + if (ret) + goto err_qpc; + + qp->rq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_RQ, + qp->qpn, &qp->rq.db); + if (qp->rq.db_index < 0) { + ret = -ENOMEM; + goto err_eqpc; + } + + qp->sq.db_index = mthca_alloc_db(dev, MTHCA_DB_TYPE_SQ, + qp->qpn, &qp->sq.db); + if (qp->sq.db_index < 0) { + ret = -ENOMEM; + goto err_rq_db; + } + } + + return 0; + +err_rq_db: + mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index); + +err_eqpc: + mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn); + +err_qpc: + mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn); + + return ret; +} + +static void mthca_free_memfree(struct mthca_dev *dev, + struct mthca_qp *qp) +{ + if (dev->hca_type == ARBEL_NATIVE) { + mthca_free_db(dev, MTHCA_DB_TYPE_SQ, qp->sq.db_index); + mthca_free_db(dev, MTHCA_DB_TYPE_RQ, qp->rq.db_index); + mthca_table_put(dev, dev->qp_table.eqp_table, qp->qpn); + mthca_table_put(dev, dev->qp_table.qp_table, qp->qpn); + } +} + +static void mthca_wq_init(struct mthca_wq* wq) +{ + spin_lock_init(&wq->lock); + wq->next_ind = 0; + wq->last_comp = wq->max - 1; + wq->head = 0; + wq->tail = 0; + wq->last = NULL; +} + static int mthca_alloc_qp_common(struct mthca_dev *dev, struct mthca_pd *pd, struct mthca_cq *send_cq, struct mthca_cq *recv_cq, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, struct mthca_qp *qp) { - int err; + struct mthca_next_seg *wqe; + int ret; + int i; - spin_lock_init(&qp->lock); atomic_set(&qp->refcount, 1); qp->state = IB_QPS_RESET; qp->atomic_rd_en = 0; qp->resp_depth = 0; - qp->sq.policy = send_policy; - qp->rq.policy = recv_policy; - qp->rq.cur = 0; - qp->sq.cur = 0; - qp->rq.next = 0; - qp->sq.next = 0; - qp->rq.last_comp = qp->rq.max - 1; - qp->sq.last_comp = qp->sq.max - 1; - qp->rq.last = NULL; - qp->sq.last = NULL; + qp->sq_policy = send_policy; + mthca_wq_init(&qp->sq); + mthca_wq_init(&qp->rq); + + ret = mthca_alloc_memfree(dev, qp); + if (ret) + return ret; + + ret = mthca_alloc_wqe_buf(dev, pd, qp); + if (ret) { + mthca_free_memfree(dev, qp); + return ret; + } + + if (dev->hca_type == ARBEL_NATIVE) { + for (i = 0; i < qp->rq.max; ++i) { + wqe = get_recv_wqe(qp, i); + wqe->nda_op = cpu_to_be32(((i + 1) & (qp->rq.max - 1)) << + qp->rq.wqe_shift); + wqe->ee_nds = cpu_to_be32(1 << (qp->rq.wqe_shift - 4)); + } + + for (i = 0; i < qp->sq.max; ++i) { + wqe = get_send_wqe(qp, i); + wqe->nda_op = cpu_to_be32((((i + 1) & (qp->sq.max - 1)) << + qp->sq.wqe_shift) + + qp->send_wqe_offset); + } + } - err = mthca_alloc_wqe_buf(dev, pd, qp); - return err; + return 0; +} + +static void mthca_align_qp_size(struct mthca_dev *dev, struct mthca_qp *qp) +{ + int i; + + if (dev->hca_type != ARBEL_NATIVE) + return; + + for (i = 0; 1 << i < qp->rq.max; ++i) + ; /* nothing */ + + qp->rq.max = 1 << i; + + for (i = 0; 1 << i < qp->sq.max; ++i) + ; /* nothing */ + + qp->sq.max = 1 << i; } int mthca_alloc_qp(struct mthca_dev *dev, @@ -1008,11 +1160,12 @@ struct mthca_cq *recv_cq, enum ib_qp_type type, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, struct mthca_qp *qp) { int err; + mthca_align_qp_size(dev, qp); + switch (type) { case IB_QPT_RC: qp->transport = RC; break; case IB_QPT_UC: qp->transport = UC; break; @@ -1025,7 +1178,7 @@ return -ENOMEM; err = mthca_alloc_qp_common(dev, pd, send_cq, recv_cq, - send_policy, recv_policy, qp); + send_policy, qp); if (err) { mthca_free(&dev->qp_table.alloc, qp->qpn); return err; @@ -1044,7 +1197,6 @@ struct mthca_cq *send_cq, struct mthca_cq *recv_cq, enum ib_sig_type send_policy, - enum ib_sig_type recv_policy, int qpn, int port, struct mthca_sqp *sqp) @@ -1052,6 +1204,8 @@ int err = 0; u32 mqpn = qpn * 2 + dev->qp_table.sqp_start + port - 1; + mthca_align_qp_size(dev, &sqp->qp); + sqp->header_buf_size = sqp->qp.sq.max * MTHCA_UD_HEADER_SIZE; sqp->header_buf = dma_alloc_coherent(&dev->pdev->dev, sqp->header_buf_size, &sqp->header_dma, GFP_KERNEL); @@ -1073,8 +1227,7 @@ sqp->qp.transport = MLX; err = mthca_alloc_qp_common(dev, pd, send_cq, recv_cq, - send_policy, recv_policy, - &sqp->qp); + send_policy, &sqp->qp); if (err) goto err_out_free; @@ -1083,9 +1236,21 @@ return 0; err_out_free: - spin_lock_irq(&dev->qp_table.lock); + /* + * Lock CQs here, so that CQ polling code can do QP lookup + * without taking a lock. + */ + spin_lock_irq(&send_cq->lock); + if (send_cq != recv_cq) + spin_lock(&recv_cq->lock); + + spin_lock(&dev->qp_table.lock); mthca_array_clear(&dev->qp_table.qp, mqpn); - spin_unlock_irq(&dev->qp_table.lock); + spin_unlock(&dev->qp_table.lock); + + if (send_cq != recv_cq) + spin_unlock(&recv_cq->lock); + spin_unlock_irq(&send_cq->lock); err_out: dma_free_coherent(&dev->pdev->dev, sqp->header_buf_size, @@ -1100,11 +1265,28 @@ u8 status; int size; int i; + struct mthca_cq *send_cq; + struct mthca_cq *recv_cq; - spin_lock_irq(&dev->qp_table.lock); + send_cq = to_mcq(qp->ibqp.send_cq); + recv_cq = to_mcq(qp->ibqp.recv_cq); + + /* + * Lock CQs here, so that CQ polling code can do QP lookup + * without taking a lock. + */ + spin_lock_irq(&send_cq->lock); + if (send_cq != recv_cq) + spin_lock(&recv_cq->lock); + + spin_lock(&dev->qp_table.lock); mthca_array_clear(&dev->qp_table.qp, qp->qpn & (dev->limits.num_qps - 1)); - spin_unlock_irq(&dev->qp_table.lock); + spin_unlock(&dev->qp_table.lock); + + if (send_cq != recv_cq) + spin_unlock(&recv_cq->lock); + spin_unlock_irq(&send_cq->lock); atomic_dec(&qp->refcount); wait_event(qp->wait, !atomic_read(&qp->refcount)); @@ -1136,14 +1318,15 @@ kfree(qp->wrid); + mthca_free_memfree(dev, qp); + if (is_sqp(dev, qp)) { atomic_dec(&(to_mpd(qp->ibqp.pd)->sqp_count)); dma_free_coherent(&dev->pdev->dev, to_msqp(qp)->header_buf_size, to_msqp(qp)->header_buf, to_msqp(qp)->header_dma); - } - else + } else mthca_free(&dev->qp_table.alloc, qp->qpn); } @@ -1216,8 +1399,26 @@ return 0; } -int mthca_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, - struct ib_send_wr **bad_wr) +static inline int mthca_wq_overflow(struct mthca_wq *wq, int nreq, + struct ib_cq *ib_cq) +{ + unsigned cur; + struct mthca_cq *cq; + + cur = wq->head - wq->tail; + if (likely(cur + nreq < wq->max)) + return 0; + + cq = to_mcq(ib_cq); + spin_lock(&cq->lock); + cur = wq->head - wq->tail; + spin_unlock(&cq->lock); + + return cur + nreq >= wq->max; +} + +int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr) { struct mthca_dev *dev = to_mdev(ibqp->device); struct mthca_qp *qp = to_mqp(ibqp); @@ -1233,26 +1434,18 @@ int ind; u8 op0 = 0; - static const u8 opcode[] = { - [IB_WR_SEND] = MTHCA_OPCODE_SEND, - [IB_WR_SEND_WITH_IMM] = MTHCA_OPCODE_SEND_IMM, - [IB_WR_RDMA_WRITE] = MTHCA_OPCODE_RDMA_WRITE, - [IB_WR_RDMA_WRITE_WITH_IMM] = MTHCA_OPCODE_RDMA_WRITE_IMM, - [IB_WR_RDMA_READ] = MTHCA_OPCODE_RDMA_READ, - [IB_WR_ATOMIC_CMP_AND_SWP] = MTHCA_OPCODE_ATOMIC_CS, - [IB_WR_ATOMIC_FETCH_AND_ADD] = MTHCA_OPCODE_ATOMIC_FA, - }; - - spin_lock_irqsave(&qp->lock, flags); + spin_lock_irqsave(&qp->sq.lock, flags); /* XXX check that state is OK to post send */ - ind = qp->sq.next; + ind = qp->sq.next_ind; for (nreq = 0; wr; ++nreq, wr = wr->next) { - if (qp->sq.cur + nreq >= qp->sq.max) { - mthca_err(dev, "SQ full (%d posted, %d max, %d nreq)\n", - qp->sq.cur, qp->sq.max, nreq); + if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { + mthca_err(dev, "SQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->sq.head, qp->sq.tail, + qp->sq.max, nreq); err = -ENOMEM; *bad_wr = wr; goto out; @@ -1326,17 +1519,17 @@ break; case UD: - ((struct mthca_ud_seg *) wqe)->lkey = + ((struct mthca_tavor_ud_seg *) wqe)->lkey = cpu_to_be32(to_mah(wr->wr.ud.ah)->key); - ((struct mthca_ud_seg *) wqe)->av_addr = + ((struct mthca_tavor_ud_seg *) wqe)->av_addr = cpu_to_be64(to_mah(wr->wr.ud.ah)->avdma); - ((struct mthca_ud_seg *) wqe)->dqpn = + ((struct mthca_tavor_ud_seg *) wqe)->dqpn = cpu_to_be32(wr->wr.ud.remote_qpn); - ((struct mthca_ud_seg *) wqe)->qkey = + ((struct mthca_tavor_ud_seg *) wqe)->qkey = cpu_to_be32(wr->wr.ud.remote_qkey); - wqe += sizeof (struct mthca_ud_seg); - size += sizeof (struct mthca_ud_seg) / 16; + wqe += sizeof (struct mthca_tavor_ud_seg); + size += sizeof (struct mthca_tavor_ud_seg) / 16; break; case MLX: @@ -1381,7 +1574,7 @@ qp->wrid[ind + qp->rq.max] = wr->wr_id; - if (wr->opcode >= ARRAY_SIZE(opcode)) { + if (wr->opcode >= ARRAY_SIZE(mthca_opcode)) { mthca_err(dev, "opcode invalid\n"); err = -EINVAL; *bad_wr = wr; @@ -1392,15 +1585,15 @@ ((struct mthca_next_seg *) prev_wqe)->nda_op = cpu_to_be32(((ind << qp->sq.wqe_shift) + qp->send_wqe_offset) | - opcode[wr->opcode]); - smp_wmb(); + mthca_opcode[wr->opcode]); + wmb(); ((struct mthca_next_seg *) prev_wqe)->ee_nds = cpu_to_be32((size0 ? 0 : MTHCA_NEXT_DBD) | size); } if (!size0) { size0 = size; - op0 = opcode[wr->opcode]; + op0 = mthca_opcode[wr->opcode]; } ++ind; @@ -1409,10 +1602,10 @@ } out: - if (nreq) { + if (likely(nreq)) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32(((qp->sq.next << qp->sq.wqe_shift) + + doorbell[0] = cpu_to_be32(((qp->sq.next_ind << qp->sq.wqe_shift) + qp->send_wqe_offset) | f0 | op0); doorbell[1] = cpu_to_be32((qp->qpn << 8) | size0); @@ -1423,15 +1616,15 @@ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } - qp->sq.cur += nreq; - qp->sq.next = ind; + qp->sq.next_ind = ind; + qp->sq.head += nreq; - spin_unlock_irqrestore(&qp->lock, flags); + spin_unlock_irqrestore(&qp->sq.lock, flags); return err; } -int mthca_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, - struct ib_recv_wr **bad_wr) +int mthca_tavor_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr) { struct mthca_dev *dev = to_mdev(ibqp->device); struct mthca_qp *qp = to_mqp(ibqp); @@ -1445,15 +1638,18 @@ void *wqe; void *prev_wqe; - spin_lock_irqsave(&qp->lock, flags); + spin_lock_irqsave(&qp->rq.lock, flags); /* XXX check that state is OK to post receive */ - ind = qp->rq.next; + ind = qp->rq.next_ind; for (nreq = 0; wr; ++nreq, wr = wr->next) { - if (qp->rq.cur + nreq >= qp->rq.max) { - mthca_err(dev, "RQ %06x full\n", qp->qpn); + if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { + mthca_err(dev, "RQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->rq.head, qp->rq.tail, + qp->rq.max, nreq); err = -ENOMEM; *bad_wr = wr; goto out; @@ -1466,14 +1662,12 @@ ((struct mthca_next_seg *) wqe)->nda_op = 0; ((struct mthca_next_seg *) wqe)->ee_nds = cpu_to_be32(MTHCA_NEXT_DBD); - ((struct mthca_next_seg *) wqe)->flags = - (wr->recv_flags & IB_RECV_SIGNALED) ? - cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0; + ((struct mthca_next_seg *) wqe)->flags = 0; wqe += sizeof (struct mthca_next_seg); size = sizeof (struct mthca_next_seg) / 16; - if (wr->num_sge > qp->rq.max_gs) { + if (unlikely(wr->num_sge > qp->rq.max_gs)) { err = -EINVAL; *bad_wr = wr; goto out; @@ -1492,10 +1686,10 @@ qp->wrid[ind] = wr->wr_id; - if (prev_wqe) { + if (likely(prev_wqe)) { ((struct mthca_next_seg *) prev_wqe)->nda_op = cpu_to_be32((ind << qp->rq.wqe_shift) | 1); - smp_wmb(); + wmb(); ((struct mthca_next_seg *) prev_wqe)->ee_nds = cpu_to_be32(MTHCA_NEXT_DBD | size); } @@ -1509,10 +1703,10 @@ } out: - if (nreq) { + if (likely(nreq)) { u32 doorbell[2]; - doorbell[0] = cpu_to_be32((qp->rq.next << qp->rq.wqe_shift) | size0); + doorbell[0] = cpu_to_be32((qp->rq.next_ind << qp->rq.wqe_shift) | size0); doorbell[1] = cpu_to_be32((qp->qpn << 8) | nreq); wmb(); @@ -1522,14 +1716,258 @@ MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } - qp->rq.cur += nreq; - qp->rq.next = ind; + qp->rq.next_ind = ind; + qp->rq.head += nreq; + + spin_unlock_irqrestore(&qp->rq.lock, flags); + return err; +} + +int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, + struct ib_send_wr **bad_wr) +{ + struct mthca_dev *dev = to_mdev(ibqp->device); + struct mthca_qp *qp = to_mqp(ibqp); + void *wqe; + void *prev_wqe; + unsigned long flags; + int err = 0; + int nreq; + int i; + int size; + int size0 = 0; + u32 f0 = 0; + int ind; + u8 op0 = 0; + + spin_lock_irqsave(&qp->sq.lock, flags); + + /* XXX check that state is OK to post send */ + + ind = qp->sq.head & (qp->sq.max - 1); + + for (nreq = 0; wr; ++nreq, wr = wr->next) { + if (mthca_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { + mthca_err(dev, "SQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->sq.head, qp->sq.tail, + qp->sq.max, nreq); + err = -ENOMEM; + *bad_wr = wr; + goto out; + } + + wqe = get_send_wqe(qp, ind); + prev_wqe = qp->sq.last; + qp->sq.last = wqe; + + ((struct mthca_next_seg *) wqe)->flags = + ((wr->send_flags & IB_SEND_SIGNALED) ? + cpu_to_be32(MTHCA_NEXT_CQ_UPDATE) : 0) | + ((wr->send_flags & IB_SEND_SOLICITED) ? + cpu_to_be32(MTHCA_NEXT_SOLICIT) : 0) | + cpu_to_be32(1); + if (wr->opcode == IB_WR_SEND_WITH_IMM || + wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) + ((struct mthca_next_seg *) wqe)->flags = wr->imm_data; + + wqe += sizeof (struct mthca_next_seg); + size = sizeof (struct mthca_next_seg) / 16; + + switch (qp->transport) { + case UD: + memcpy(((struct mthca_arbel_ud_seg *) wqe)->av, + to_mah(wr->wr.ud.ah)->av, MTHCA_AV_SIZE); + ((struct mthca_arbel_ud_seg *) wqe)->dqpn = + cpu_to_be32(wr->wr.ud.remote_qpn); + ((struct mthca_arbel_ud_seg *) wqe)->qkey = + cpu_to_be32(wr->wr.ud.remote_qkey); + + wqe += sizeof (struct mthca_arbel_ud_seg); + size += sizeof (struct mthca_arbel_ud_seg) / 16; + break; + + case MLX: + err = build_mlx_header(dev, to_msqp(qp), ind, wr, + wqe - sizeof (struct mthca_next_seg), + wqe); + if (err) { + *bad_wr = wr; + goto out; + } + wqe += sizeof (struct mthca_data_seg); + size += sizeof (struct mthca_data_seg) / 16; + break; + } + + if (wr->num_sge > qp->sq.max_gs) { + mthca_err(dev, "too many gathers\n"); + err = -EINVAL; + *bad_wr = wr; + goto out; + } + + for (i = 0; i < wr->num_sge; ++i) { + ((struct mthca_data_seg *) wqe)->byte_count = + cpu_to_be32(wr->sg_list[i].length); + ((struct mthca_data_seg *) wqe)->lkey = + cpu_to_be32(wr->sg_list[i].lkey); + ((struct mthca_data_seg *) wqe)->addr = + cpu_to_be64(wr->sg_list[i].addr); + wqe += sizeof (struct mthca_data_seg); + size += sizeof (struct mthca_data_seg) / 16; + } + + /* Add one more inline data segment for ICRC */ + if (qp->transport == MLX) { + ((struct mthca_data_seg *) wqe)->byte_count = + cpu_to_be32((1 << 31) | 4); + ((u32 *) wqe)[1] = 0; + wqe += sizeof (struct mthca_data_seg); + size += sizeof (struct mthca_data_seg) / 16; + } + + qp->wrid[ind + qp->rq.max] = wr->wr_id; + + if (wr->opcode >= ARRAY_SIZE(mthca_opcode)) { + mthca_err(dev, "opcode invalid\n"); + err = -EINVAL; + *bad_wr = wr; + goto out; + } + + if (likely(prev_wqe)) { + ((struct mthca_next_seg *) prev_wqe)->nda_op = + cpu_to_be32(((ind << qp->sq.wqe_shift) + + qp->send_wqe_offset) | + mthca_opcode[wr->opcode]); + wmb(); + ((struct mthca_next_seg *) prev_wqe)->ee_nds = + cpu_to_be32(MTHCA_NEXT_DBD | size); + } + + if (!size0) { + size0 = size; + op0 = mthca_opcode[wr->opcode]; + } + + ++ind; + if (unlikely(ind >= qp->sq.max)) + ind -= qp->sq.max; + } + +out: + if (likely(nreq)) { + u32 doorbell[2]; + + doorbell[0] = cpu_to_be32((nreq << 24) | + ((qp->sq.head & 0xffff) << 8) | + f0 | op0); + doorbell[1] = cpu_to_be32((qp->qpn << 8) | size0); + + qp->sq.head += nreq; + + /* + * Make sure that descriptors are written before + * doorbell record. + */ + wmb(); + *qp->sq.db = cpu_to_be32(qp->sq.head & 0xffff); + + /* + * Make sure doorbell record is written before we + * write MMIO send doorbell. + */ + wmb(); + mthca_write64(doorbell, + dev->kar + MTHCA_SEND_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + } + + spin_unlock_irqrestore(&qp->sq.lock, flags); + return err; +} + +int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, + struct ib_recv_wr **bad_wr) +{ + struct mthca_dev *dev = to_mdev(ibqp->device); + struct mthca_qp *qp = to_mqp(ibqp); + unsigned long flags; + int err = 0; + int nreq; + int ind; + int i; + void *wqe; + + spin_lock_irqsave(&qp->rq.lock, flags); + + /* XXX check that state is OK to post receive */ + + ind = qp->rq.head & (qp->rq.max - 1); - spin_unlock_irqrestore(&qp->lock, flags); + for (nreq = 0; wr; ++nreq, wr = wr->next) { + if (mthca_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { + mthca_err(dev, "RQ %06x full (%u head, %u tail," + " %d max, %d nreq)\n", qp->qpn, + qp->rq.head, qp->rq.tail, + qp->rq.max, nreq); + err = -ENOMEM; + *bad_wr = wr; + goto out; + } + + wqe = get_recv_wqe(qp, ind); + + ((struct mthca_next_seg *) wqe)->flags = 0; + + wqe += sizeof (struct mthca_next_seg); + + if (unlikely(wr->num_sge > qp->rq.max_gs)) { + err = -EINVAL; + *bad_wr = wr; + goto out; + } + + for (i = 0; i < wr->num_sge; ++i) { + ((struct mthca_data_seg *) wqe)->byte_count = + cpu_to_be32(wr->sg_list[i].length); + ((struct mthca_data_seg *) wqe)->lkey = + cpu_to_be32(wr->sg_list[i].lkey); + ((struct mthca_data_seg *) wqe)->addr = + cpu_to_be64(wr->sg_list[i].addr); + wqe += sizeof (struct mthca_data_seg); + } + + if (i < qp->rq.max_gs) { + ((struct mthca_data_seg *) wqe)->byte_count = 0; + ((struct mthca_data_seg *) wqe)->lkey = cpu_to_be32(0x100); + ((struct mthca_data_seg *) wqe)->addr = 0; + } + + qp->wrid[ind] = wr->wr_id; + + ++ind; + if (unlikely(ind >= qp->rq.max)) + ind -= qp->rq.max; + } +out: + if (likely(nreq)) { + qp->rq.head += nreq; + + /* + * Make sure that descriptors are written before + * doorbell record. + */ + wmb(); + *qp->rq.db = cpu_to_be32(qp->rq.head & 0xffff); + } + + spin_unlock_irqrestore(&qp->rq.lock, flags); return err; } -int mthca_free_err_wqe(struct mthca_qp *qp, int is_send, +int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, int index, int *dbd, u32 *new_wqe) { struct mthca_next_seg *next; @@ -1539,7 +1977,10 @@ else next = get_recv_wqe(qp, index); - *dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD)); + if (dev->hca_type == ARBEL_NATIVE) + *dbd = 1; + else + *dbd = !!(next->ee_nds & cpu_to_be32(MTHCA_NEXT_DBD)); if (next->ee_nds & cpu_to_be32(0x3f)) *new_wqe = (next->nda_op & cpu_to_be32(~0x3f)) | (next->ee_nds & cpu_to_be32(0x3f)); diff -Nru a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c --- a/drivers/infiniband/hw/mthca/mthca_reset.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/hw/mthca/mthca_reset.c 2005-03-07 14:54:16 -08:00 @@ -50,7 +50,7 @@ struct pci_dev *bridge = NULL; #define MTHCA_RESET_OFFSET 0xf0010 -#define MTHCA_RESET_VALUE cpu_to_be32(1) +#define MTHCA_RESET_VALUE swab32(1) /* * Reset the chip. This is somewhat ugly because we have to diff -Nru a/drivers/infiniband/hw/mthca/mthca_uar.c b/drivers/infiniband/hw/mthca/mthca_uar.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/infiniband/hw/mthca/mthca_uar.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2005 Topspin Communications. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * $Id$ + */ + +#include "mthca_dev.h" +#include "mthca_memfree.h" + +int mthca_uar_alloc(struct mthca_dev *dev, struct mthca_uar *uar) +{ + uar->index = mthca_alloc(&dev->uar_table.alloc); + if (uar->index == -1) + return -ENOMEM; + + uar->pfn = (pci_resource_start(dev->pdev, 2) >> PAGE_SHIFT) + uar->index; + + return 0; +} + +void mthca_uar_free(struct mthca_dev *dev, struct mthca_uar *uar) +{ + mthca_free(&dev->uar_table.alloc, uar->index); +} + +int mthca_init_uar_table(struct mthca_dev *dev) +{ + int ret; + + ret = mthca_alloc_init(&dev->uar_table.alloc, + dev->limits.num_uars, + dev->limits.num_uars - 1, + dev->limits.reserved_uars); + if (ret) + return ret; + + ret = mthca_init_db_tab(dev); + if (ret) + mthca_alloc_cleanup(&dev->uar_table.alloc); + + return ret; +} + +void mthca_cleanup_uar_table(struct mthca_dev *dev) +{ + mthca_cleanup_db_tab(dev); + + /* XXX check if any UARs are still allocated? */ + mthca_alloc_cleanup(&dev->uar_table.alloc); +} diff -Nru a/drivers/infiniband/include/ib_verbs.h b/drivers/infiniband/include/ib_verbs.h --- a/drivers/infiniband/include/ib_verbs.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/include/ib_verbs.h 2005-03-07 14:54:16 -08:00 @@ -73,7 +73,6 @@ IB_DEVICE_RC_RNR_NAK_GEN = (1<<12), IB_DEVICE_SRQ_RESIZE = (1<<13), IB_DEVICE_N_NOTIFY_CQ = (1<<14), - IB_DEVICE_RQ_SIG_TYPE = (1<<15) }; enum ib_atomic_cap { @@ -408,7 +407,6 @@ struct ib_srq *srq; struct ib_qp_cap cap; enum ib_sig_type sq_sig_type; - enum ib_sig_type rq_sig_type; enum ib_qp_type qp_type; u8 port_num; /* special QP types only */ }; @@ -533,10 +531,6 @@ IB_SEND_INLINE = (1<<3) }; -enum ib_recv_flags { - IB_RECV_SIGNALED = 1 -}; - struct ib_sge { u64 addr; u32 length; @@ -579,7 +573,6 @@ u64 wr_id; struct ib_sge *sg_list; int num_sge; - int recv_flags; }; enum ib_access_flags { diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h --- a/drivers/infiniband/ulp/ipoib/ipoib.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib.h 2005-03-07 14:54:16 -08:00 @@ -308,11 +308,11 @@ #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG -extern int debug_level; +extern int ipoib_debug_level; #define ipoib_dbg(priv, format, arg...) \ do { \ - if (debug_level > 0) \ + if (ipoib_debug_level > 0) \ ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ } while (0) #define ipoib_dbg_mcast(priv, format, arg...) \ diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2005-03-07 14:54:18 -08:00 @@ -40,7 +40,7 @@ #include "ipoib.h" #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA -int data_debug_level; +static int data_debug_level; module_param(data_debug_level, int, 0644); MODULE_PARM_DESC(data_debug_level, @@ -105,7 +105,6 @@ .wr_id = wr_id | IPOIB_OP_RECV, .sg_list = &list, .num_sge = 1, - .recv_flags = IB_RECV_SIGNALED }; struct ib_recv_wr *bad_wr; @@ -137,6 +136,9 @@ if (ret) { ipoib_warn(priv, "ipoib_ib_receive failed for buf %d (%d)\n", id, ret); + dma_unmap_single(priv->ca->dma_device, addr, + IPOIB_BUF_SIZE, DMA_FROM_DEVICE); + dev_kfree_skb_any(skb); priv->rx_ring[id].skb = NULL; } diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c 2005-03-07 14:54:17 -08:00 @@ -51,9 +51,9 @@ MODULE_LICENSE("Dual BSD/GPL"); #ifdef CONFIG_INFINIBAND_IPOIB_DEBUG -int debug_level; +int ipoib_debug_level; -module_param(debug_level, int, 0644); +module_param_named(debug_level, ipoib_debug_level, int, 0644); MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0"); #endif @@ -215,16 +215,25 @@ return 0; } -static void __path_free(struct net_device *dev, struct ipoib_path *path) +static void path_free(struct net_device *dev, struct ipoib_path *path) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_neigh *neigh, *tn; struct sk_buff *skb; + unsigned long flags; while ((skb = __skb_dequeue(&path->queue))) dev_kfree_skb_irq(skb); + spin_lock_irqsave(&priv->lock, flags); + list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) { + /* + * It's safe to call ipoib_put_ah() inside priv->lock + * here, because we know that path->ah will always + * hold one more reference, so ipoib_put_ah() will + * never do more than decrement the ref count. + */ if (neigh->ah) ipoib_put_ah(neigh->ah); *to_ipoib_neigh(neigh->neighbour) = NULL; @@ -232,11 +241,11 @@ kfree(neigh); } + spin_unlock_irqrestore(&priv->lock, flags); + if (path->ah) ipoib_put_ah(path->ah); - rb_erase(&path->rb_node, &priv->path_tree); - list_del(&path->list); kfree(path); } @@ -248,15 +257,20 @@ unsigned long flags; spin_lock_irqsave(&priv->lock, flags); + list_splice(&priv->path_list, &remove_list); INIT_LIST_HEAD(&priv->path_list); + + list_for_each_entry(path, &remove_list, list) + rb_erase(&path->rb_node, &priv->path_tree); + spin_unlock_irqrestore(&priv->lock, flags); list_for_each_entry_safe(path, tp, &remove_list, list) { if (path->query) ib_sa_cancel_query(path->query_id, path->query); wait_for_completion(&path->done); - __path_free(dev, path); + path_free(dev, path); } } @@ -346,8 +360,9 @@ if (!path) return NULL; - path->dev = dev; + path->dev = dev; path->pathrec.dlid = 0; + path->ah = NULL; skb_queue_head_init(&path->queue); @@ -360,8 +375,6 @@ path->pathrec.pkey = cpu_to_be16(priv->pkey); path->pathrec.numb_path = 1; - __path_add(dev, path); - return path; } @@ -421,6 +434,8 @@ (union ib_gid *) (skb->dst->neighbour->ha + 4)); if (!path) goto err; + + __path_add(dev, path); } list_add_tail(&neigh->list, &path->neigh_list); @@ -450,8 +465,8 @@ err: *to_ipoib_neigh(skb->dst->neighbour) = NULL; list_del(&neigh->list); - kfree(neigh); neigh->neighbour->ops->destructor = NULL; + kfree(neigh); ++priv->stats.tx_dropped; dev_kfree_skb_any(skb); @@ -496,8 +511,12 @@ skb_push(skb, sizeof *phdr); __skb_queue_tail(&path->queue, skb); - if (path_rec_start(dev, path)) - __path_free(dev, path); + if (path_rec_start(dev, path)) { + spin_unlock(&priv->lock); + path_free(dev, path); + return; + } else + __path_add(dev, path); } else { ++priv->stats.tx_dropped; dev_kfree_skb_any(skb); @@ -657,9 +676,10 @@ static void ipoib_neigh_destructor(struct neighbour *n) { - struct ipoib_neigh *neigh = *to_ipoib_neigh(n); + struct ipoib_neigh *neigh; struct ipoib_dev_priv *priv = netdev_priv(n->dev); unsigned long flags; + struct ipoib_ah *ah = NULL; ipoib_dbg(priv, "neigh_destructor for %06x " IPOIB_GID_FMT "\n", @@ -668,15 +688,19 @@ spin_lock_irqsave(&priv->lock, flags); + neigh = *to_ipoib_neigh(n); if (neigh) { if (neigh->ah) - ipoib_put_ah(neigh->ah); + ah = neigh->ah; list_del(&neigh->list); *to_ipoib_neigh(n) = NULL; kfree(neigh); } spin_unlock_irqrestore(&priv->lock, flags); + + if (ah) + ipoib_put_ah(ah); } static int ipoib_neigh_setup(struct neighbour *neigh) diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2005-03-07 14:54:18 -08:00 @@ -93,6 +93,8 @@ struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_neigh *neigh, *tmp; unsigned long flags; + LIST_HEAD(ah_list); + struct ipoib_ah *ah, *tah; ipoib_dbg_mcast(netdev_priv(dev), "deleting multicast group " IPOIB_GID_FMT "\n", @@ -101,7 +103,8 @@ spin_lock_irqsave(&priv->lock, flags); list_for_each_entry_safe(neigh, tmp, &mcast->neigh_list, list) { - ipoib_put_ah(neigh->ah); + if (neigh->ah) + list_add_tail(&neigh->ah->list, &ah_list); *to_ipoib_neigh(neigh->neighbour) = NULL; neigh->neighbour->ops->destructor = NULL; kfree(neigh); @@ -109,6 +112,9 @@ spin_unlock_irqrestore(&priv->lock, flags); + list_for_each_entry_safe(ah, tah, &ah_list, list) + ipoib_put_ah(ah); + if (mcast->ah) ipoib_put_ah(mcast->ah); @@ -790,7 +796,7 @@ spin_unlock_irqrestore(&priv->lock, flags); - list_for_each_entry(mcast, &remove_list, list) { + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { ipoib_mcast_leave(dev, mcast); ipoib_mcast_free(mcast); } @@ -902,7 +908,7 @@ spin_unlock_irqrestore(&priv->lock, flags); /* We have to cancel outside of the spinlock */ - list_for_each_entry(mcast, &remove_list, list) { + list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { ipoib_mcast_leave(mcast->dev, mcast); ipoib_mcast_free(mcast); } diff -Nru a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c 2005-03-07 14:54:17 -08:00 @@ -165,7 +165,6 @@ .max_recv_sge = 1 }, .sq_sig_type = IB_SIGNAL_ALL_WR, - .rq_sig_type = IB_SIGNAL_ALL_WR, .qp_type = IB_QPT_UD }; diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c --- a/drivers/isdn/hisax/hisax_fcpcipnp.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c 2005-03-07 14:54:17 -08:00 @@ -902,7 +902,7 @@ adapter->irq = pdev->irq; printk(KERN_INFO "hisax_fcpcipnp: found adapter %s at %s\n", - (char *) ent->driver_data, pdev->slot_name); + (char *) ent->driver_data, pci_name(pdev)); retval = fcpcipnp_setup(adapter); if (retval) diff -Nru a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c --- a/drivers/macintosh/therm_windtunnel.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/macintosh/therm_windtunnel.c 2005-03-07 14:54:17 -08:00 @@ -47,8 +47,6 @@ #define LOG_TEMP 0 /* continously log temperature */ #define I2C_DRIVERID_G4FAN 0x9001 /* fixme */ -#define THERMOSTAT_CLIENT_ID 1 -#define FAN_CLIENT_ID 2 static int do_probe( struct i2c_adapter *adapter, int addr, int kind); @@ -372,7 +370,6 @@ goto out; printk("ADM1030 fan controller [@%02x]\n", cl->addr ); - cl->id = FAN_CLIENT_ID; strlcpy( cl->name, "ADM1030 fan controller", sizeof(cl->name) ); if( !i2c_attach_client(cl) ) @@ -412,7 +409,6 @@ x.overheat_temp = os_temp; x.overheat_hyst = hyst_temp; - cl->id = THERMOSTAT_CLIENT_ID; strlcpy( cl->name, "DS1775 thermostat", sizeof(cl->name) ); if( !i2c_attach_client(cl) ) diff -Nru a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c --- a/drivers/macintosh/via-pmu.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/macintosh/via-pmu.c 2005-03-07 14:54:18 -08:00 @@ -2389,7 +2389,7 @@ enable_kernel_fp(); #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) enable_kernel_altivec(); #endif /* CONFIG_ALTIVEC */ diff -Nru a/drivers/md/raid6altivec.uc b/drivers/md/raid6altivec.uc --- a/drivers/md/raid6altivec.uc 2005-03-07 14:54:18 -08:00 +++ b/drivers/md/raid6altivec.uc 2005-03-07 14:54:18 -08:00 @@ -108,7 +108,7 @@ int raid6_have_altivec(void) { /* This assumes either all CPUs have Altivec or none does */ - return cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC; + return cpu_has_feature(CPU_FTR_ALTIVEC): } #endif diff -Nru a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c --- a/drivers/media/common/saa7146_i2c.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/common/saa7146_i2c.c 2005-03-07 14:54:18 -08:00 @@ -25,7 +25,7 @@ sent through the saa7146. have a look at the specifications p. 122 ff to understand this. it returns the number of u32s to send, or -1 in case of an error. */ -static int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op) +static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op) { int h1, h2; int i, j, addr; @@ -89,7 +89,7 @@ which bytes were read through the adapter and write them back to the corresponding i2c-message. but instead, we simply write back all bytes. fixme: this could be improved. */ -static int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op) +static int saa7146_i2c_msg_cleanup(const struct i2c_msg *m, int num, u32 *op) { int i, j; int op_count = 0; @@ -272,7 +272,7 @@ return 0; } -int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], int num, int retries) +int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries) { int i = 0, count = 0; u32* buffer = dev->d_i2c.cpu_addr; @@ -372,7 +372,7 @@ } /* utility functions */ -static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) +static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num) { struct saa7146_dev* dev = i2c_get_adapdata(adapter); diff -Nru a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c --- a/drivers/media/common/saa7146_video.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/common/saa7146_video.c 2005-03-07 14:54:17 -08:00 @@ -889,7 +889,7 @@ strcpy(cap->driver, "saa7146 v4l2"); strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); - sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name); + sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); cap->version = SAA7146_VERSION_CODE; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | diff -Nru a/drivers/media/dvb/b2c2/skystar2.c b/drivers/media/dvb/b2c2/skystar2.c --- a/drivers/media/dvb/b2c2/skystar2.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/dvb/b2c2/skystar2.c 2005-03-07 14:54:18 -08:00 @@ -293,7 +293,7 @@ return buf - start; } -static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msgs[], int num) +static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msgs, int num) { struct adapter *tmp = i2c_get_adapdata(adapter); int i, ret = 0; diff -Nru a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c b/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c --- a/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/dvb/dibusb/dvb-dibusb-fe-i2c.c 2005-03-07 14:54:17 -08:00 @@ -38,7 +38,7 @@ /* * I2C master xfer function */ -static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) +static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg *msg,int num) { struct usb_dibusb *dib = i2c_get_adapdata(adap); int i; diff -Nru a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-03-07 14:54:18 -08:00 @@ -252,7 +252,7 @@ return rcv_len; } -static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) +static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num) { struct ttusb *ttusb = i2c_get_adapdata(adapter); int i = 0; diff -Nru a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c --- a/drivers/media/video/adv7170.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/adv7170.c 2005-03-07 14:54:18 -08:00 @@ -402,7 +402,6 @@ .force = force }; -static int adv7170_i2c_id = 0; static struct i2c_driver i2c_driver_adv7170; static int @@ -432,7 +431,6 @@ client->adapter = adapter; client->driver = &i2c_driver_adv7170; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = adv7170_i2c_id++; if ((client->addr == I2C_ADV7170 >> 1) || (client->addr == (I2C_ADV7170 >> 1) + 1)) { dname = adv7170_name; @@ -444,8 +442,7 @@ kfree(client); return 0; } - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "%s[%d]", dname, client->id); + strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct adv7170), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c --- a/drivers/media/video/adv7175.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/adv7175.c 2005-03-07 14:54:18 -08:00 @@ -452,7 +452,6 @@ .force = force }; -static int adv7175_i2c_id = 0; static struct i2c_driver i2c_driver_adv7175; static int @@ -482,7 +481,6 @@ client->adapter = adapter; client->driver = &i2c_driver_adv7175; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = adv7175_i2c_id++; if ((client->addr == I2C_ADV7175 >> 1) || (client->addr == (I2C_ADV7175 >> 1) + 1)) { dname = adv7175_name; @@ -494,8 +492,7 @@ kfree(client); return 0; } - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "%s[%d]", dname, client->id); + strlcpy(I2C_NAME(client), dname, sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct adv7175), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c --- a/drivers/media/video/bt819.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/bt819.c 2005-03-07 14:54:16 -08:00 @@ -517,7 +517,6 @@ .force = force }; -static int bt819_i2c_id = 0; static struct i2c_driver i2c_driver_bt819; static int @@ -546,7 +545,6 @@ client->adapter = adapter; client->driver = &i2c_driver_bt819; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = bt819_i2c_id++; decoder = kmalloc(sizeof(struct bt819), GFP_KERNEL); if (decoder == NULL) { @@ -568,16 +566,13 @@ id = bt819_read(client, 0x17); switch (id & 0xf0) { case 0x70: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt819a[%d]", client->id); + strlcpy(I2C_NAME(client), "bt819a", sizeof(I2C_NAME(client))); break; case 0x60: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt817a[%d]", client->id); + strlcpy(I2C_NAME(client), "bt817a", sizeof(I2C_NAME(client))); break; case 0x20: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt815a[%d]", client->id); + strlcpy(I2C_NAME(client), "bt815a", sizeof(I2C_NAME(client))); break; default: dprintk(1, diff -Nru a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c --- a/drivers/media/video/bt856.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/bt856.c 2005-03-07 14:54:16 -08:00 @@ -306,7 +306,6 @@ .force = force }; -static int bt856_i2c_id = 0; static struct i2c_driver i2c_driver_bt856; static int @@ -335,9 +334,7 @@ client->adapter = adapter; client->driver = &i2c_driver_bt856; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = bt856_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "bt856[%d]", client->id); + strlcpy(I2C_NAME(client), "bt856", sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct bt856), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c --- a/drivers/media/video/bttv-i2c.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/bttv-i2c.c 2005-03-07 14:54:16 -08:00 @@ -245,7 +245,7 @@ return retval; } -static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) +static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) { struct bttv *btv = i2c_get_adapdata(i2c_adap); int retval = 0; @@ -330,7 +330,6 @@ static struct i2c_client bttv_i2c_client_template = { I2C_DEVNAME("bttv internal"), - .id = -1, }; diff -Nru a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c --- a/drivers/media/video/cx88/cx88-i2c.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/cx88/cx88-i2c.c 2005-03-07 14:54:16 -08:00 @@ -141,7 +141,6 @@ static struct i2c_client cx8800_i2c_client_template = { I2C_DEVNAME("cx88xx internal"), - .id = -1, }; static char *i2c_devs[128] = { diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c --- a/drivers/media/video/meye.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/meye.c 2005-03-07 14:54:17 -08:00 @@ -1154,7 +1154,7 @@ memset(cap, 0, sizeof(*cap)); strcpy(cap->driver, "meye"); strcpy(cap->card, "meye"); - sprintf(cap->bus_info, "PCI:%s", meye.mchip_dev->slot_name); + sprintf(cap->bus_info, "PCI:%s", pci_name(meye.mchip_dev)); cap->version = (MEYE_DRIVER_MAJORVERSION << 8) + MEYE_DRIVER_MINORVERSION; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | diff -Nru a/drivers/media/video/ovcamchip/ovcamchip_core.c b/drivers/media/video/ovcamchip/ovcamchip_core.c --- a/drivers/media/video/ovcamchip/ovcamchip_core.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/ovcamchip/ovcamchip_core.c 2005-03-07 14:54:18 -08:00 @@ -422,7 +422,6 @@ static struct i2c_client client_template = { I2C_DEVNAME("(unset)"), - .id = -1, .driver = &driver, }; diff -Nru a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c --- a/drivers/media/video/saa5246a.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/saa5246a.c 2005-03-07 14:54:17 -08:00 @@ -185,7 +185,6 @@ }; static struct i2c_client client_template = { - .id = -1, .driver = &i2c_driver_videotext, .name = "(unset)", }; diff -Nru a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c --- a/drivers/media/video/saa5249.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/saa5249.c 2005-03-07 14:54:17 -08:00 @@ -258,7 +258,6 @@ }; static struct i2c_client client_template = { - .id = -1, .driver = &i2c_driver_videotext, .name = "(unset)", }; diff -Nru a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c --- a/drivers/media/video/saa7110.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/saa7110.c 2005-03-07 14:54:16 -08:00 @@ -476,7 +476,6 @@ .force = force }; -static int saa7110_i2c_id = 0; static struct i2c_driver i2c_driver_saa7110; static int @@ -507,9 +506,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7110; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7110_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7110[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); decoder = kmalloc(sizeof(struct saa7110), GFP_KERNEL); if (decoder == 0) { diff -Nru a/drivers/media/video/saa7111.c b/drivers/media/video/saa7111.c --- a/drivers/media/video/saa7111.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/saa7111.c 2005-03-07 14:54:18 -08:00 @@ -500,7 +500,6 @@ .force = force }; -static int saa7111_i2c_id = 0; static struct i2c_driver i2c_driver_saa7111; static int @@ -530,9 +529,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7111; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7111_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7111[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7111", sizeof(I2C_NAME(client))); decoder = kmalloc(sizeof(struct saa7111), GFP_KERNEL); if (decoder == NULL) { diff -Nru a/drivers/media/video/saa7114.c b/drivers/media/video/saa7114.c --- a/drivers/media/video/saa7114.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/saa7114.c 2005-03-07 14:54:18 -08:00 @@ -838,7 +838,6 @@ .force = force }; -static int saa7114_i2c_id = 0; static struct i2c_driver i2c_driver_saa7114; static int @@ -871,9 +870,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7114; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7114_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7114[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7114", sizeof(I2C_NAME(client))); decoder = kmalloc(sizeof(struct saa7114), GFP_KERNEL); if (decoder == NULL) { 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 2005-03-07 14:54:16 -08:00 +++ b/drivers/media/video/saa7134/saa7134-i2c.c 2005-03-07 14:54:16 -08:00 @@ -236,7 +236,7 @@ } static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], int num) + struct i2c_msg *msgs, int num) { struct saa7134_dev *dev = i2c_adap->algo_data; enum i2c_status status; @@ -362,7 +362,6 @@ static struct i2c_client saa7134_client_template = { I2C_DEVNAME("saa7134 internal"), - .id = -1, }; /* ----------------------------------------------------------- */ diff -Nru a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c --- a/drivers/media/video/saa7185.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/media/video/saa7185.c 2005-03-07 14:54:18 -08:00 @@ -398,7 +398,6 @@ .force = force }; -static int saa7185_i2c_id = 0; static struct i2c_driver i2c_driver_saa7185; static int @@ -427,9 +426,7 @@ client->adapter = adapter; client->driver = &i2c_driver_saa7185; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = saa7185_i2c_id++; - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "saa7185[%d]", client->id); + strlcpy(I2C_NAME(client), "saa7185", sizeof(I2C_NAME(client))); encoder = kmalloc(sizeof(struct saa7185), GFP_KERNEL); if (encoder == NULL) { diff -Nru a/drivers/media/video/tda7432.c b/drivers/media/video/tda7432.c --- a/drivers/media/video/tda7432.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tda7432.c 2005-03-07 14:54:17 -08:00 @@ -528,7 +528,6 @@ static struct i2c_client client_template = { I2C_DEVNAME("tda7432"), - .id = -1, .driver = &driver, }; diff -Nru a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c --- a/drivers/media/video/tda9840.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tda9840.c 2005-03-07 14:54:17 -08:00 @@ -51,9 +51,6 @@ static struct i2c_driver driver; static struct i2c_client client_template; -/* unique ID allocation */ -static int tda9840_id = 0; - static int command(struct i2c_client *client, unsigned int cmd, void *arg) { int result; @@ -179,7 +176,6 @@ /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); - client->id = tda9840_id++; client->addr = address; client->adapter = adapter; diff -Nru a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c --- a/drivers/media/video/tda9875.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tda9875.c 2005-03-07 14:54:17 -08:00 @@ -399,7 +399,6 @@ static struct i2c_client client_template = { I2C_DEVNAME("tda9875"), - .id = -1, .driver = &driver, }; diff -Nru a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c --- a/drivers/media/video/tea6415c.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tea6415c.c 2005-03-07 14:54:17 -08:00 @@ -51,9 +51,6 @@ static struct i2c_driver driver; static struct i2c_client client_template; -/* unique ID allocation */ -static int tea6415c_id = 0; - /* this function is called by i2c_probe */ static int detect(struct i2c_adapter *adapter, int address, int kind) { @@ -73,7 +70,6 @@ /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); - client->id = tea6415c_id++; client->addr = address; client->adapter = adapter; diff -Nru a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c --- a/drivers/media/video/tea6420.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tea6420.c 2005-03-07 14:54:17 -08:00 @@ -48,9 +48,6 @@ static struct i2c_driver driver; static struct i2c_client client_template; -/* unique ID allocation */ -static int tea6420_id = 0; - /* make a connection between the input 'i' and the output 'o' with gain 'g' for the tea6420-client 'client' (note: i = 6 means 'mute') */ static int tea6420_switch(struct i2c_client *client, int i, int o, int g) @@ -111,7 +108,6 @@ /* fill client structure */ memcpy(client, &client_template, sizeof(struct i2c_client)); - client->id = tea6420_id++; client->addr = address; client->adapter = adapter; diff -Nru a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c --- a/drivers/media/video/tuner-3036.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/tuner-3036.c 2005-03-07 14:54:17 -08:00 @@ -192,7 +192,6 @@ static struct i2c_client client_template = { - .id = -1, .driver = &i2c_driver_tuner, .name = "SAB3036", }; diff -Nru a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c --- a/drivers/media/video/vpx3220.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/vpx3220.c 2005-03-07 14:54:17 -08:00 @@ -587,7 +587,6 @@ .force = force }; -static int vpx3220_i2c_id = 0; static struct i2c_driver vpx3220_i2c_driver; static int @@ -634,7 +633,6 @@ client->adapter = adapter; client->driver = &vpx3220_i2c_driver; client->flags = I2C_CLIENT_ALLOW_USE; - client->id = vpx3220_i2c_id++; /* Check for manufacture ID and part number */ if (kind < 0) { @@ -655,16 +653,16 @@ vpx3220_read(client, 0x01); switch (pn) { case 0x4680: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "vpx3220a[%d]", client->id); + strlcpy(I2C_NAME(client), "vpx3220a", + sizeof(I2C_NAME(client))); break; case 0x4260: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "vpx3216b[%d]", client->id); + strlcpy(I2C_NAME(client), "vpx3216b", + sizeof(I2C_NAME(client))); break; case 0x4280: - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "vpx3214c[%d]", client->id); + strlcpy(I2C_NAME(client), "vpx3214c", + sizeof(I2C_NAME(client))); break; default: dprintk(1, @@ -675,9 +673,8 @@ return 0; } } else { - snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1, - "forced vpx32xx[%d]", - client->id); + strlcpy(I2C_NAME(client), "forced vpx32xx", + sizeof(I2C_NAME(client))); } decoder = kmalloc(sizeof(struct vpx3220), GFP_KERNEL); diff -Nru a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c --- a/drivers/media/video/zoran_driver.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/media/video/zoran_driver.c 2005-03-07 14:54:17 -08:00 @@ -2694,7 +2694,7 @@ strncpy(cap->card, ZR_DEVNAME(zr), sizeof(cap->card)); strncpy(cap->driver, "zoran", sizeof(cap->driver)); snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", - zr->pci_dev->slot_name); + pci_name(zr->pci_dev)); cap->version = KERNEL_VERSION(MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION); diff -Nru a/drivers/mmc/mmc_sysfs.c b/drivers/mmc/mmc_sysfs.c --- a/drivers/mmc/mmc_sysfs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/mmc/mmc_sysfs.c 2005-03-07 14:54:17 -08:00 @@ -21,6 +21,41 @@ #define dev_to_mmc_card(d) container_of(d, struct mmc_card, dev) #define to_mmc_driver(d) container_of(d, struct mmc_driver, drv) +#define MMC_ATTR(name, fmt, args...) \ +static ssize_t mmc_##name##_show (struct device *dev, char *buf) \ +{ \ + struct mmc_card *card = dev_to_mmc_card(dev); \ + return sprintf(buf, fmt, args); \ +} + +MMC_ATTR(cid, "%08x%08x%08x%08x\n", card->raw_cid[0], card->raw_cid[1], + card->raw_cid[2], card->raw_cid[3]); +MMC_ATTR(csd, "%08x%08x%08x%08x\n", card->raw_csd[0], card->raw_csd[1], + card->raw_csd[2], card->raw_csd[3]); +MMC_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year); +MMC_ATTR(fwrev, "0x%x\n", card->cid.fwrev); +MMC_ATTR(hwrev, "0x%x\n", card->cid.hwrev); +MMC_ATTR(manfid, "0x%06x\n", card->cid.manfid); +MMC_ATTR(name, "%s\n", card->cid.prod_name); +MMC_ATTR(oemid, "0x%04x\n", card->cid.oemid); +MMC_ATTR(serial, "0x%08x\n", card->cid.serial); + +#define MMC_ATTR_RO(name) __ATTR(name, S_IRUGO, mmc_##name##_show, NULL) + +static struct device_attribute mmc_dev_attrs[] = { + MMC_ATTR_RO(cid), + MMC_ATTR_RO(csd), + MMC_ATTR_RO(date), + MMC_ATTR_RO(fwrev), + MMC_ATTR_RO(hwrev), + MMC_ATTR_RO(manfid), + MMC_ATTR_RO(name), + MMC_ATTR_RO(oemid), + MMC_ATTR_RO(serial), + __ATTR_NULL +}; + + static void mmc_release_card(struct device *dev) { struct mmc_card *card = dev_to_mmc_card(dev); @@ -98,6 +133,7 @@ static struct bus_type mmc_bus_type = { .name = "mmc", + .dev_attrs = mmc_dev_attrs, .match = mmc_bus_match, .hotplug = mmc_bus_hotplug, .suspend = mmc_bus_suspend, @@ -151,38 +187,6 @@ EXPORT_SYMBOL(mmc_unregister_driver); -#define MMC_ATTR(name, fmt, args...) \ -static ssize_t mmc_dev_show_##name (struct device *dev, char *buf) \ -{ \ - struct mmc_card *card = dev_to_mmc_card(dev); \ - return sprintf(buf, fmt, args); \ -} \ -static DEVICE_ATTR(name, S_IRUGO, mmc_dev_show_##name, NULL) - -MMC_ATTR(cid, "%08x%08x%08x%08x\n", card->raw_cid[0], card->raw_cid[1], - card->raw_cid[2], card->raw_cid[3]); -MMC_ATTR(csd, "%08x%08x%08x%08x\n", card->raw_csd[0], card->raw_csd[1], - card->raw_csd[2], card->raw_csd[3]); -MMC_ATTR(date, "%02d/%04d\n", card->cid.month, card->cid.year); -MMC_ATTR(fwrev, "0x%x\n", card->cid.fwrev); -MMC_ATTR(hwrev, "0x%x\n", card->cid.hwrev); -MMC_ATTR(manfid, "0x%06x\n", card->cid.manfid); -MMC_ATTR(name, "%s\n", card->cid.prod_name); -MMC_ATTR(oemid, "0x%04x\n", card->cid.oemid); -MMC_ATTR(serial, "0x%08x\n", card->cid.serial); - -static struct device_attribute *mmc_dev_attributes[] = { - &dev_attr_cid, - &dev_attr_csd, - &dev_attr_date, - &dev_attr_fwrev, - &dev_attr_hwrev, - &dev_attr_manfid, - &dev_attr_name, - &dev_attr_oemid, - &dev_attr_serial, -}; - /* * Internal function. Initialise a MMC card structure. */ @@ -201,17 +205,10 @@ */ int mmc_register_card(struct mmc_card *card) { - int ret, i; - snprintf(card->dev.bus_id, sizeof(card->dev.bus_id), "%s:%04x", card->host->host_name, card->rca); - ret = device_add(&card->dev); - if (ret == 0) - for (i = 0; i < ARRAY_SIZE(mmc_dev_attributes); i++) - device_create_file(&card->dev, mmc_dev_attributes[i]); - - return ret; + return device_add(&card->dev); } /* diff -Nru a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c --- a/drivers/mtd/devices/block2mtd.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/mtd/devices/block2mtd.c 2005-03-07 14:54:16 -08:00 @@ -59,7 +59,7 @@ end_index = ((isize - 1) >> PAGE_CACHE_SHIFT); - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); for (i = 0; i < PAGE_READAHEAD; i++) { pagei = index + i; if (pagei > end_index) { @@ -71,16 +71,16 @@ break; if (page) continue; - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); page = page_cache_alloc_cold(mapping); - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); if (!page) break; page->index = pagei; list_add(&page->lru, &page_pool); ret++; } - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); if (ret) read_cache_pages(mapping, &page_pool, filler, NULL); } diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/3c59x.c 2005-03-07 14:54:16 -08:00 @@ -964,7 +964,7 @@ #ifdef CONFIG_PM -static int vortex_suspend (struct pci_dev *pdev, u32 state) +static int vortex_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/8139too.c 2005-03-07 14:54:16 -08:00 @@ -389,8 +389,14 @@ /* Bits in TxConfig. */ enum tx_config_bits { - TxIFG1 = (1 << 25), /* Interframe Gap Time */ - TxIFG0 = (1 << 24), /* Enabling these bits violates IEEE 802.3 */ + + /* Interframe Gap Time. Only TxIFG96 doesn't violate IEEE 802.3 */ + TxIFGShift = 24, + TxIFG84 = (0 << TxIFGShift), /* 8.4us / 840ns (10 / 100Mbps) */ + TxIFG88 = (1 << TxIFGShift), /* 8.8us / 880ns (10 / 100Mbps) */ + TxIFG92 = (2 << TxIFGShift), /* 9.2us / 920ns (10 / 100Mbps) */ + TxIFG96 = (3 << TxIFGShift), /* 9.6us / 960ns (10 / 100Mbps) */ + TxLoopBack = (1 << 18) | (1 << 17), /* enable loopback test mode */ TxCRC = (1 << 16), /* DISABLE appending CRC to end of Tx packets */ TxClearAbt = (1 << 0), /* Clear abort (WO) */ @@ -723,17 +729,14 @@ #endif static const unsigned int rtl8139_tx_config = - (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); + TxIFG96 | (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); static void __rtl8139_cleanup_dev (struct net_device *dev) { - struct rtl8139_private *tp; + struct rtl8139_private *tp = netdev_priv(dev); struct pci_dev *pdev; assert (dev != NULL); - assert (dev->priv != NULL); - - tp = dev->priv; assert (tp->pci_dev != NULL); pdev = tp->pci_dev; @@ -746,7 +749,7 @@ pci_release_regions (pdev); free_netdev(dev); - + pci_disable_device(pdev); pci_set_drvdata (pdev, NULL); } @@ -785,7 +788,7 @@ *dev_out = NULL; - /* dev and dev->priv zeroed in alloc_etherdev */ + /* dev and priv zeroed in alloc_etherdev */ dev = alloc_etherdev (sizeof (*tp)); if (dev == NULL) { printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev)); @@ -794,7 +797,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - tp = dev->priv; + tp = netdev_priv(dev); tp->pci_dev = pdev; /* enable device (incl. PCI PM wakeup and hotplug setup) */ @@ -976,8 +979,8 @@ return i; assert (dev != NULL); - tp = dev->priv; - assert (tp != NULL); + tp = netdev_priv(dev); + ioaddr = tp->mmio_addr; assert (ioaddr != NULL); @@ -1010,8 +1013,8 @@ dev->irq = pdev->irq; - /* dev->priv/tp zeroed and aligned in alloc_etherdev */ - tp = dev->priv; + /* tp zeroed and aligned in alloc_etherdev */ + tp = netdev_priv(dev); /* note: tp->chipset set in rtl8139_init_board */ tp->drv_flags = board_info[ent->driver_data].hw_flags; @@ -1116,11 +1119,8 @@ static void __devexit rtl8139_remove_one (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *np; assert (dev != NULL); - np = dev->priv; - assert (np != NULL); unregister_netdev (dev); @@ -1234,7 +1234,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval = 0; #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; @@ -1276,7 +1276,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, int value) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; @@ -1319,7 +1319,7 @@ static int rtl8139_open (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval; void *ioaddr = tp->mmio_addr; @@ -1367,7 +1367,7 @@ static void rtl_check_media (struct net_device *dev, unsigned int init_media) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); if (tp->phys[0] >= 0) { mii_check_media(&tp->mii, netif_msg_link(tp), init_media); @@ -1377,7 +1377,7 @@ /* Start the hardware at open or resume. */ static void rtl8139_hw_start (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 i; u8 tmp; @@ -1399,8 +1399,6 @@ tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys; RTL_W32 (RxConfig, tp->rx_config); - - /* Check this value: the documentation for IFG contradicts ifself. */ RTL_W32 (TxConfig, rtl8139_tx_config); tp->cur_rx = 0; @@ -1446,7 +1444,7 @@ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static void rtl8139_init_ring (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int i; tp->cur_rx = 0; @@ -1613,7 +1611,7 @@ static int rtl8139_thread (void *data) { struct net_device *dev = data; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); unsigned long timeout; daemonize("%s", dev->name); @@ -1645,7 +1643,7 @@ static void rtl8139_start_thread(struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); tp->thr_pid = -1; tp->twistie = 0; @@ -1673,7 +1671,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int i; u8 tmp8; @@ -1718,7 +1716,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned int entry; unsigned int len = skb->len; @@ -1766,7 +1764,6 @@ unsigned long dirty_tx, tx_left; assert (dev != NULL); - assert (tp != NULL); assert (ioaddr != NULL); dirty_tx = tp->dirty_tx; @@ -2125,7 +2122,7 @@ static int rtl8139_poll(struct net_device *dev, int *budget) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int orig_budget = min(*budget, dev->quota); int done = 1; @@ -2163,7 +2160,7 @@ struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ @@ -2239,7 +2236,7 @@ static int rtl8139_close (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int ret = 0; unsigned long flags; @@ -2302,7 +2299,7 @@ other threads or interrupts aren't messing with the 8139. */ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; spin_lock_irq(&np->lock); @@ -2336,7 +2333,7 @@ aren't messing with the 8139. */ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; u32 support; u8 cfg3, cfg5; @@ -2376,7 +2373,7 @@ static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); strcpy(info->bus_info, pci_name(np->pci_dev)); @@ -2385,7 +2382,7 @@ static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); spin_lock_irq(&np->lock); mii_ethtool_gset(&np->mii, cmd); spin_unlock_irq(&np->lock); @@ -2394,7 +2391,7 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); rc = mii_ethtool_sset(&np->mii, cmd); @@ -2404,25 +2401,25 @@ static int rtl8139_nway_reset(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_nway_restart(&np->mii); } static u32 rtl8139_get_link(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_link_ok(&np->mii); } static u32 rtl8139_get_msglevel(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->msg_enable; } static void rtl8139_set_msglevel(struct net_device *dev, u32 datum) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); np->msg_enable = datum; } @@ -2433,13 +2430,13 @@ #else static int rtl8139_get_regs_len(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->regs_len; } static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); regs->version = RTL_REGS_VER; @@ -2456,7 +2453,7 @@ static void rtl8139_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); data[0] = np->xstats.early_rx; data[1] = np->xstats.tx_buf_mapped; @@ -2488,7 +2485,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; if (!netif_running(dev)) @@ -2504,7 +2501,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -2523,7 +2520,7 @@ static void __set_rx_mode (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; @@ -2572,7 +2569,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev) { unsigned long flags; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); spin_lock_irqsave (&tp->lock, flags); __set_rx_mode(dev); @@ -2581,10 +2578,10 @@ #ifdef CONFIG_PM -static int rtl8139_suspend (struct pci_dev *pdev, u32 state) +static int rtl8139_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/Kconfig 2005-03-07 14:54:18 -08:00 @@ -47,16 +47,13 @@ ---help--- Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet Channels together. This is called 'Etherchannel' by Cisco, - 'Trunking' by Sun, and 'Bonding' in Linux. + 'Trunking' by Sun, 802.3ad by the IEEE, and 'Bonding' in Linux. - If you have two Ethernet connections to some other computer, you can - make them behave like one double speed connection using this driver. - Naturally, this has to be supported at the other end as well, either - with a similar Bonding Linux driver, a Cisco 5500 switch or a - SunTrunking SunSoft driver. + The driver supports multiple bonding modes to allow for both high + perfomance and high availability operation. - This is similar to the EQL driver, but it merges Ethernet segments - instead of serial lines. + Refer to for more + information. To compile this driver as a module, choose M here: the module will be called bonding. @@ -445,7 +442,7 @@ config MIPS_JAZZ_SONIC tristate "MIPS JAZZ onboard SONIC Ethernet support" - depends on NET_ETHERNET && MIPS_JAZZ + depends on NET_ETHERNET && MACH_JAZZ help This is the driver for the onboard card of MIPS Magnum 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM systems. @@ -470,7 +467,7 @@ config SGI_IOC3_ETH bool "SGI IOC3 Ethernet" - depends on NET_ETHERNET && SGI_IP27 + depends on NET_ETHERNET && PCI && SGI_IP27 select CRC32 select MII help @@ -819,7 +816,7 @@ tristate "SMC 91C9x/91C1xxx support" select CRC32 select MII - depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R) + depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH) help This is a driver for SMC's 91x series of Ethernet chipsets, including the SMC91C94 and the SMC91C111. Say Y if you want it @@ -1428,23 +1425,6 @@ . The module will be called e100. -config E100_NAPI - bool "Use Rx Polling (NAPI)" - depends on E100 - 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 LNE390 tristate "Mylex EISA LNE390A/B support (EXPERIMENTAL)" depends on NET_PCI && EISA && EXPERIMENTAL @@ -1780,14 +1760,6 @@ DEC (now Compaq) based on the AMD Lance chipset, including the DEPCA series. (This chipset is better known via the NE2100 cards.) -config BAGETLANCE - tristate "Baget AMD LANCE support" - depends on NET_ETHERNET && BAGET_MIPS - help - Say Y to enable kernel support for AMD Lance Ethernet cards on the - MIPS-32-based Baget embedded system. This chipset is better known - via the NE2100 cards. - config 68360_ENET bool "Motorola 68360 ethernet controller" depends on M68360 @@ -2083,7 +2055,7 @@ config GIANFAR tristate "Gianfar Ethernet" - depends on 85xx + depends on 85xx || 83xx help This driver supports the Gigabit TSEC on the MPC85xx family of chips, and the FEC on the 8540 @@ -2094,7 +2066,7 @@ config MV643XX_ETH tristate "MV-643XX Ethernet support" - depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX + depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MOMENCO_OCELOT_3 help This driver supports the gigabit Ethernet on the Marvell MV643XX chipset which is used in the Momenco Ocelot C and Jaguar ATX. diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile --- a/drivers/net/Makefile 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/Makefile 2005-03-07 14:54:16 -08:00 @@ -162,7 +162,6 @@ obj-$(CONFIG_MIPS_GT96100ETH) += gt96100eth.o obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o -obj-$(CONFIG_BAGETLANCE) += bagetlance.o obj-$(CONFIG_DECLANCE) += declance.o obj-$(CONFIG_ATARILANCE) += atarilance.o obj-$(CONFIG_ATARI_BIONET) += atari_bionet.o diff -Nru a/drivers/net/Space.c b/drivers/net/Space.c --- a/drivers/net/Space.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/Space.c 2005-03-07 14:54:16 -08:00 @@ -302,16 +302,6 @@ {NULL, 0}, }; -static struct devprobe2 mips_probes[] __initdata = { -#ifdef CONFIG_MIPS_JAZZ_SONIC - {sonic_probe, 0}, -#endif -#ifdef CONFIG_BAGETLANCE /* Lance-based Baget ethernet boards */ - {bagetlance_probe, 0}, -#endif - {NULL, 0}, -}; - /* * Unified ethernet device probe, segmented per architecture and * per bus interface. This drives the legacy devices only for now. @@ -325,7 +315,6 @@ return; (void)( probe_list2(unit, m68k_probes, base_addr == 0) && - probe_list2(unit, mips_probes, base_addr == 0) && probe_list2(unit, eisa_probes, base_addr == 0) && probe_list2(unit, mca_probes, base_addr == 0) && probe_list2(unit, isa_probes, base_addr == 0) && diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c --- a/drivers/net/amd8111e.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/amd8111e.c 2005-03-07 14:54:18 -08:00 @@ -1381,6 +1381,8 @@ if(amd8111e_restart(dev)){ spin_unlock_irq(&lp->lock); + if (dev->irq) + free_irq(dev->irq, dev); return -ENOMEM; } /* Start ipg timer */ @@ -1797,7 +1799,7 @@ if(!err) netif_wake_queue(dev); } -static int amd8111e_suspend(struct pci_dev *pci_dev, u32 state) +static int amd8111e_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pci_dev); struct amd8111e_priv *lp = netdev_priv(dev); diff -Nru a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c --- a/drivers/net/arm/ether1.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether1.c 2005-03-07 14:54:18 -08:00 @@ -86,8 +86,8 @@ #define DISABLEIRQS 1 #define NORMALIRQS 0 -#define ether1_inw(dev, addr, type, offset, svflgs) ether1_inw_p (dev, addr + (int)(&((type *)0)->offset), svflgs) -#define ether1_outw(dev, val, addr, type, offset, svflgs) ether1_outw_p (dev, val, addr + (int)(&((type *)0)->offset), svflgs) +#define ether1_readw(dev, addr, type, offset, svflgs) ether1_inw_p (dev, addr + (int)(&((type *)0)->offset), svflgs) +#define ether1_writew(dev, val, addr, type, offset, svflgs) ether1_outw_p (dev, val, addr + (int)(&((type *)0)->offset), svflgs) static inline unsigned short ether1_inw_p (struct net_device *dev, int addr, int svflgs) @@ -98,8 +98,8 @@ if (svflgs) local_irq_save (flags); - outb (addr >> 12, REG_PAGE); - ret = inw (ETHER1_RAM + ((addr & 4095) >> 1)); + writeb(addr >> 12, REG_PAGE); + ret = readw(ETHER1_RAM + ((addr & 4095) << 1)); if (svflgs) local_irq_restore (flags); return ret; @@ -113,8 +113,8 @@ if (svflgs) local_irq_save (flags); - outb (addr >> 12, REG_PAGE); - outw (val, ETHER1_RAM + ((addr & 4095) >> 1)); + writeb(addr >> 12, REG_PAGE); + writew(val, ETHER1_RAM + ((addr & 4095) << 1)); if (svflgs) local_irq_restore (flags); } @@ -131,11 +131,12 @@ static void ether1_writebuffer (struct net_device *dev, void *data, unsigned int start, unsigned int length) { - unsigned int page, thislen, offset, addr; + unsigned int page, thislen, offset; + void __iomem *addr; offset = start & 4095; page = start >> 12; - addr = ioaddr(ETHER1_RAM + (offset >> 1)); + addr = ETHER1_RAM + (offset << 1); if (offset + length > 4096) thislen = 4096 - offset; @@ -145,7 +146,7 @@ do { int used; - outb(page, REG_PAGE); + writeb(page, REG_PAGE); length -= thislen; __asm__ __volatile__( @@ -181,7 +182,7 @@ : "=&r" (used), "=&r" (data) : "r" (addr), "r" (thislen), "1" (data)); - addr = ioaddr(ETHER1_RAM); + addr = ETHER1_RAM; thislen = length; if (thislen > 4096) @@ -193,11 +194,12 @@ static void ether1_readbuffer (struct net_device *dev, void *data, unsigned int start, unsigned int length) { - unsigned int page, thislen, offset, addr; + unsigned int page, thislen, offset; + void __iomem *addr; offset = start & 4095; page = start >> 12; - addr = ioaddr(ETHER1_RAM + (offset >> 1)); + addr = ETHER1_RAM + (offset << 1); if (offset + length > 4096) thislen = 4096 - offset; @@ -207,7 +209,7 @@ do { int used; - outb(page, REG_PAGE); + writeb(page, REG_PAGE); length -= thislen; __asm__ __volatile__( @@ -243,7 +245,7 @@ : "=&r" (used), "=&r" (data) : "r" (addr), "r" (thislen), "1" (data)); - addr = ioaddr(ETHER1_RAM); + addr = ETHER1_RAM; thislen = length; if (thislen > 4096) @@ -302,7 +304,7 @@ static int ether1_reset (struct net_device *dev) { - outb (CTRL_RST|CTRL_ACK, REG_CONTROL); + writeb(CTRL_RST|CTRL_ACK, REG_CONTROL); return BUS_16; } @@ -447,12 +449,11 @@ static int ether1_init_for_open (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); int i, status, addr, next, next2; int failures = 0; unsigned long timeout; - outb (CTRL_RST|CTRL_ACK, REG_CONTROL); + writeb(CTRL_RST|CTRL_ACK, REG_CONTROL); for (i = 0; i < 6; i++) init_sa.sa_addr[i] = dev->dev_addr[i]; @@ -467,7 +468,7 @@ ether1_writebuffer (dev, &init_tdr, TDR_ADDR, TDR_SIZE); ether1_writebuffer (dev, &init_nop, NOP_ADDR, NOP_SIZE); - if (ether1_inw (dev, CFG_ADDR, cfg_t, cfg_command, NORMALIRQS) != CMD_CONFIG) { + if (ether1_readw(dev, CFG_ADDR, cfg_t, cfg_command, NORMALIRQS) != CMD_CONFIG) { printk (KERN_ERR "%s: detected either RAM fault or compiler bug\n", dev->name); return 1; @@ -487,7 +488,7 @@ if (next2 >= RX_AREA_END) { next = RX_AREA_START; init_rfd.rfd_command = RFD_CMDEL | RFD_CMDSUSPEND; - priv->rx_tail = addr; + priv(dev)->rx_tail = addr; } else init_rfd.rfd_command = 0; if (addr == RX_AREA_START) @@ -503,21 +504,21 @@ addr = next; } while (next2 < RX_AREA_END); - priv->tx_link = NOP_ADDR; - priv->tx_head = NOP_ADDR + NOP_SIZE; - priv->tx_tail = TDR_ADDR; - priv->rx_head = RX_AREA_START; + priv(dev)->tx_link = NOP_ADDR; + priv(dev)->tx_head = NOP_ADDR + NOP_SIZE; + priv(dev)->tx_tail = TDR_ADDR; + priv(dev)->rx_head = RX_AREA_START; /* release reset & give 586 a prod */ - priv->resetting = 1; - priv->initialising = 1; - outb (CTRL_RST, REG_CONTROL); - outb (0, REG_CONTROL); - outb (CTRL_CA, REG_CONTROL); + priv(dev)->resetting = 1; + priv(dev)->initialising = 1; + writeb(CTRL_RST, REG_CONTROL); + writeb(0, REG_CONTROL); + writeb(CTRL_CA, REG_CONTROL); /* 586 should now unset iscp.busy */ timeout = jiffies + HZ/2; - while (ether1_inw (dev, ISCP_ADDR, iscp_t, iscp_busy, DISABLEIRQS) == 1) { + while (ether1_readw(dev, ISCP_ADDR, iscp_t, iscp_busy, DISABLEIRQS) == 1) { if (time_after(jiffies, timeout)) { printk (KERN_WARNING "%s: can't initialise 82586: iscp is busy\n", dev->name); return 1; @@ -526,7 +527,7 @@ /* check status of commands that we issued */ timeout += HZ/10; - while (((status = ether1_inw (dev, CFG_ADDR, cfg_t, cfg_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, CFG_ADDR, cfg_t, cfg_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -535,15 +536,15 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't initialise 82586: config status %04X\n", dev->name, status); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); failures += 1; } timeout += HZ/10; - while (((status = ether1_inw (dev, SA_ADDR, sa_t, sa_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, SA_ADDR, sa_t, sa_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -552,15 +553,15 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't initialise 82586: set address status %04X\n", dev->name, status); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); failures += 1; } timeout += HZ/10; - while (((status = ether1_inw (dev, MC_ADDR, mc_t, mc_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, MC_ADDR, mc_t, mc_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -569,15 +570,15 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't initialise 82586: set multicast status %04X\n", dev->name, status); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); failures += 1; } timeout += HZ; - while (((status = ether1_inw (dev, TDR_ADDR, tdr_t, tdr_status, DISABLEIRQS)) + while (((status = ether1_readw(dev, TDR_ADDR, tdr_t, tdr_status, DISABLEIRQS)) & STAT_COMPLETE) == 0) { if (time_after(jiffies, timeout)) break; @@ -586,12 +587,12 @@ if ((status & (STAT_COMPLETE | STAT_OK)) != (STAT_COMPLETE | STAT_OK)) { printk (KERN_WARNING "%s: can't tdr (ignored)\n", dev->name); printk (KERN_DEBUG "%s: SCB=[STS=%04X CMD=%04X CBL=%04X RFA=%04X]\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), - ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_command, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS), + ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); } else { - status = ether1_inw (dev, TDR_ADDR, tdr_t, tdr_result, DISABLEIRQS); + status = ether1_readw(dev, TDR_ADDR, tdr_t, tdr_result, DISABLEIRQS); if (status & TDR_XCVRPROB) printk (KERN_WARNING "%s: i/f failed tdr: transceiver problem\n", dev->name); else if ((status & (TDR_SHORT|TDR_OPEN)) && (status & TDR_TIME)) { @@ -616,24 +617,23 @@ static int ether1_txalloc (struct net_device *dev, int size) { - struct ether1_priv *priv = netdev_priv(dev); int start, tail; size = (size + 1) & ~1; - tail = priv->tx_tail; + tail = priv(dev)->tx_tail; - if (priv->tx_head + size > TX_AREA_END) { - if (tail > priv->tx_head) + if (priv(dev)->tx_head + size > TX_AREA_END) { + if (tail > priv(dev)->tx_head) return -1; start = TX_AREA_START; if (start + size > tail) return -1; - priv->tx_head = start + size; + priv(dev)->tx_head = start + size; } else { - if (priv->tx_head < tail && (priv->tx_head + size) > tail) + if (priv(dev)->tx_head < tail && (priv(dev)->tx_head + size) > tail) return -1; - start = priv->tx_head; - priv->tx_head += size; + start = priv(dev)->tx_head; + priv(dev)->tx_head += size; } return start; @@ -642,8 +642,6 @@ static int ether1_open (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); - if (!is_valid_ether_addr(dev->dev_addr)) { printk(KERN_WARNING "%s: invalid ethernet MAC address\n", dev->name); @@ -653,7 +651,7 @@ if (request_irq(dev->irq, ether1_interrupt, 0, "ether1", dev)) return -EAGAIN; - memset (&priv->stats, 0, sizeof (struct net_device_stats)); + memset (&priv(dev)->stats, 0, sizeof (struct net_device_stats)); if (ether1_init_for_open (dev)) { free_irq (dev->irq, dev); @@ -668,8 +666,6 @@ static void ether1_timeout(struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); - printk(KERN_WARNING "%s: transmit timeout, network cable problem?\n", dev->name); printk(KERN_WARNING "%s: resetting device\n", dev->name); @@ -679,21 +675,20 @@ if (ether1_init_for_open (dev)) printk (KERN_ERR "%s: unable to restart interface\n", dev->name); - priv->stats.tx_errors++; + priv(dev)->stats.tx_errors++; netif_wake_queue(dev); } static int ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); int tmp, tst, nopaddr, txaddr, tbdaddr, dataddr; unsigned long flags; tx_t tx; tbd_t tbd; nop_t nop; - if (priv->restart) { + if (priv(dev)->restart) { printk(KERN_WARNING "%s: resetting device\n", dev->name); ether1_reset(dev); @@ -701,7 +696,7 @@ if (ether1_init_for_open(dev)) printk(KERN_ERR "%s: unable to restart interface\n", dev->name); else - priv->restart = 0; + priv(dev)->restart = 0; } if (skb->len < ETH_ZLEN) { @@ -735,11 +730,11 @@ ether1_writebuffer (dev, &tbd, tbdaddr, TBD_SIZE); ether1_writebuffer (dev, skb->data, dataddr, skb->len); ether1_writebuffer (dev, &nop, nopaddr, NOP_SIZE); - tmp = priv->tx_link; - priv->tx_link = nopaddr; + tmp = priv(dev)->tx_link; + priv(dev)->tx_link = nopaddr; /* now reset the previous nop pointer */ - ether1_outw (dev, txaddr, tmp, nop_t, nop_link, NORMALIRQS); + ether1_writew(dev, txaddr, tmp, nop_t, nop_link, NORMALIRQS); local_irq_restore(flags); @@ -747,9 +742,9 @@ dev->trans_start = jiffies; /* check to see if we have room for a full sized ether frame */ - tmp = priv->tx_head; + tmp = priv(dev)->tx_head; tst = ether1_txalloc (dev, TX_SIZE + TBD_SIZE + NOP_SIZE + ETH_FRAME_LEN); - priv->tx_head = tmp; + priv(dev)->tx_head = tmp; dev_kfree_skb (skb); if (tst == -1) @@ -762,11 +757,10 @@ static void ether1_xmit_done (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); nop_t nop; int caddr, tst; - caddr = priv->tx_tail; + caddr = priv(dev)->tx_tail; again: ether1_readbuffer (dev, &nop, caddr, NOP_SIZE); @@ -774,21 +768,21 @@ switch (nop.nop_command & CMD_MASK) { case CMD_TDR: /* special case */ - if (ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) + if (ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) != (unsigned short)I82586_NULL) { - ether1_outw(dev, SCB_CMDCUCSTART | SCB_CMDRXSTART, SCB_ADDR, scb_t, + ether1_writew(dev, SCB_CMDCUCSTART | SCB_CMDRXSTART, SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA, REG_CONTROL); + writeb(CTRL_CA, REG_CONTROL); } - priv->tx_tail = NOP_ADDR; + priv(dev)->tx_tail = NOP_ADDR; return; case CMD_NOP: if (nop.nop_link == caddr) { - if (priv->initialising == 0) + if (priv(dev)->initialising == 0) printk (KERN_WARNING "%s: strange command complete with no tx command!\n", dev->name); else - priv->initialising = 0; + priv(dev)->initialising = 0; return; } if (caddr == nop.nop_link) @@ -800,33 +794,33 @@ if (nop.nop_status & STAT_COMPLETE) break; printk (KERN_ERR "%s: strange command complete without completed command\n", dev->name); - priv->restart = 1; + priv(dev)->restart = 1; return; default: printk (KERN_WARNING "%s: strange command %d complete! (offset %04X)", dev->name, nop.nop_command & CMD_MASK, caddr); - priv->restart = 1; + priv(dev)->restart = 1; return; } while (nop.nop_status & STAT_COMPLETE) { if (nop.nop_status & STAT_OK) { - priv->stats.tx_packets ++; - priv->stats.collisions += (nop.nop_status & STAT_COLLISIONS); + priv(dev)->stats.tx_packets ++; + priv(dev)->stats.collisions += (nop.nop_status & STAT_COLLISIONS); } else { - priv->stats.tx_errors ++; + priv(dev)->stats.tx_errors ++; if (nop.nop_status & STAT_COLLAFTERTX) - priv->stats.collisions ++; + priv(dev)->stats.collisions ++; if (nop.nop_status & STAT_NOCARRIER) - priv->stats.tx_carrier_errors ++; + priv(dev)->stats.tx_carrier_errors ++; if (nop.nop_status & STAT_TXLOSTCTS) printk (KERN_WARNING "%s: cts lost\n", dev->name); if (nop.nop_status & STAT_TXSLOWDMA) - priv->stats.tx_fifo_errors ++; + priv(dev)->stats.tx_fifo_errors ++; if (nop.nop_status & STAT_COLLEXCESSIVE) - priv->stats.collisions += 16; + priv(dev)->stats.collisions += 16; } if (nop.nop_link == caddr) { @@ -851,11 +845,11 @@ break; } } - priv->tx_tail = caddr; + priv(dev)->tx_tail = caddr; - caddr = priv->tx_head; + caddr = priv(dev)->tx_head; tst = ether1_txalloc (dev, TX_SIZE + TBD_SIZE + NOP_SIZE + ETH_FRAME_LEN); - priv->tx_head = caddr; + priv(dev)->tx_head = caddr; if (tst != -1) netif_wake_queue(dev); } @@ -863,17 +857,16 @@ static void ether1_recv_done (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); int status; int nexttail, rbdaddr; rbd_t rbd; do { - status = ether1_inw (dev, priv->rx_head, rfd_t, rfd_status, NORMALIRQS); + status = ether1_readw(dev, priv(dev)->rx_head, rfd_t, rfd_status, NORMALIRQS); if ((status & RFD_COMPLETE) == 0) break; - rbdaddr = ether1_inw (dev, priv->rx_head, rfd_t, rfd_rbdoffset, NORMALIRQS); + rbdaddr = ether1_readw(dev, priv(dev)->rx_head, rfd_t, rfd_rbdoffset, NORMALIRQS); ether1_readbuffer (dev, &rbd, rbdaddr, RBD_SIZE); if ((rbd.rbd_status & (RBD_EOF | RBD_ACNTVALID)) == (RBD_EOF | RBD_ACNTVALID)) { @@ -891,27 +884,27 @@ skb->protocol = eth_type_trans (skb, dev); netif_rx (skb); - priv->stats.rx_packets ++; + priv(dev)->stats.rx_packets ++; } else - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; } else { printk(KERN_WARNING "%s: %s\n", dev->name, (rbd.rbd_status & RBD_EOF) ? "oversized packet" : "acnt not valid"); - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; } - nexttail = ether1_inw (dev, priv->rx_tail, rfd_t, rfd_link, NORMALIRQS); + nexttail = ether1_readw(dev, priv(dev)->rx_tail, rfd_t, rfd_link, NORMALIRQS); /* nexttail should be rx_head */ - if (nexttail != priv->rx_head) + if (nexttail != priv(dev)->rx_head) printk(KERN_ERR "%s: receiver buffer chaining error (%04X != %04X)\n", - dev->name, nexttail, priv->rx_head); - ether1_outw (dev, RFD_CMDEL | RFD_CMDSUSPEND, nexttail, rfd_t, rfd_command, NORMALIRQS); - ether1_outw (dev, 0, priv->rx_tail, rfd_t, rfd_command, NORMALIRQS); - ether1_outw (dev, 0, priv->rx_tail, rfd_t, rfd_status, NORMALIRQS); - ether1_outw (dev, 0, priv->rx_tail, rfd_t, rfd_rbdoffset, NORMALIRQS); + dev->name, nexttail, priv(dev)->rx_head); + ether1_writew(dev, RFD_CMDEL | RFD_CMDSUSPEND, nexttail, rfd_t, rfd_command, NORMALIRQS); + ether1_writew(dev, 0, priv(dev)->rx_tail, rfd_t, rfd_command, NORMALIRQS); + ether1_writew(dev, 0, priv(dev)->rx_tail, rfd_t, rfd_status, NORMALIRQS); + ether1_writew(dev, 0, priv(dev)->rx_tail, rfd_t, rfd_rbdoffset, NORMALIRQS); - priv->rx_tail = nexttail; - priv->rx_head = ether1_inw (dev, priv->rx_head, rfd_t, rfd_link, NORMALIRQS); + priv(dev)->rx_tail = nexttail; + priv(dev)->rx_head = ether1_readw(dev, priv(dev)->rx_head, rfd_t, rfd_link, NORMALIRQS); } while (1); } @@ -919,48 +912,47 @@ ether1_interrupt (int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct ether1_priv *priv = netdev_priv(dev); int status; - status = ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS); + status = ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS); if (status) { - ether1_outw(dev, status & (SCB_STRNR | SCB_STCNA | SCB_STFR | SCB_STCX), + ether1_writew(dev, status & (SCB_STRNR | SCB_STCNA | SCB_STFR | SCB_STCX), SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA | CTRL_ACK, REG_CONTROL); + writeb(CTRL_CA | CTRL_ACK, REG_CONTROL); if (status & SCB_STCX) { ether1_xmit_done (dev); } if (status & SCB_STCNA) { - if (priv->resetting == 0) + if (priv(dev)->resetting == 0) printk (KERN_WARNING "%s: CU went not ready ???\n", dev->name); else - priv->resetting += 1; - if (ether1_inw (dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) + priv(dev)->resetting += 1; + if (ether1_readw(dev, SCB_ADDR, scb_t, scb_cbl_offset, NORMALIRQS) != (unsigned short)I82586_NULL) { - ether1_outw (dev, SCB_CMDCUCSTART, SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA, REG_CONTROL); + ether1_writew(dev, SCB_CMDCUCSTART, SCB_ADDR, scb_t, scb_command, NORMALIRQS); + writeb(CTRL_CA, REG_CONTROL); } - if (priv->resetting == 2) - priv->resetting = 0; + if (priv(dev)->resetting == 2) + priv(dev)->resetting = 0; } if (status & SCB_STFR) { ether1_recv_done (dev); } if (status & SCB_STRNR) { - if (ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS) & SCB_STRXSUSP) { + if (ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS) & SCB_STRXSUSP) { printk (KERN_WARNING "%s: RU went not ready: RU suspended\n", dev->name); - ether1_outw (dev, SCB_CMDRXRESUME, SCB_ADDR, scb_t, scb_command, NORMALIRQS); - outb (CTRL_CA, REG_CONTROL); - priv->stats.rx_dropped ++; /* we suspended due to lack of buffer space */ + ether1_writew(dev, SCB_CMDRXRESUME, SCB_ADDR, scb_t, scb_command, NORMALIRQS); + writeb(CTRL_CA, REG_CONTROL); + priv(dev)->stats.rx_dropped ++; /* we suspended due to lack of buffer space */ } else printk(KERN_WARNING "%s: RU went not ready: %04X\n", dev->name, - ether1_inw (dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS)); - printk (KERN_WARNING "RU ptr = %04X\n", ether1_inw (dev, SCB_ADDR, scb_t, scb_rfa_offset, + ether1_readw(dev, SCB_ADDR, scb_t, scb_status, NORMALIRQS)); + printk (KERN_WARNING "RU ptr = %04X\n", ether1_readw(dev, SCB_ADDR, scb_t, scb_rfa_offset, NORMALIRQS)); } } else - outb (CTRL_ACK, REG_CONTROL); + writeb(CTRL_ACK, REG_CONTROL); return IRQ_HANDLED; } @@ -978,8 +970,7 @@ static struct net_device_stats * ether1_getstats (struct net_device *dev) { - struct ether1_priv *priv = netdev_priv(dev); - return &priv->stats; + return &priv(dev)->stats; } /* @@ -1008,40 +999,42 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id) { struct net_device *dev; - struct ether1_priv *priv; int i, ret = 0; ether1_banner(); + ret = ecard_request_resources(ec); + if (ret) + goto out; + dev = alloc_etherdev(sizeof(struct ether1_priv)); if (!dev) { ret = -ENOMEM; - goto out; + goto release; } SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &ec->dev); - dev->base_addr = ecard_address(ec, ECARD_IOC, ECARD_FAST); - dev->irq = ec->irq; - - /* - * these will not fail - the nature of the bus ensures this - */ - request_region(dev->base_addr, 16, dev->name); - request_region(dev->base_addr + 0x800, 4096, dev->name); + dev->irq = ec->irq; + priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), + ecard_resource_len(ec, ECARD_RES_IOCFAST)); + if (!priv(dev)->base) { + ret = -ENOMEM; + goto free; + } - priv = netdev_priv(dev); - if ((priv->bus_type = ether1_reset(dev)) == 0) { + if ((priv(dev)->bus_type = ether1_reset(dev)) == 0) { ret = -ENODEV; - goto release; + goto free; } for (i = 0; i < 6; i++) - dev->dev_addr[i] = inb(IDPROM_ADDRESS + i); + dev->dev_addr[i] = readb(IDPROM_ADDRESS + (i << 2)); if (ether1_init_2(dev)) { ret = -ENODEV; - goto release; + goto free; } dev->open = ether1_open; @@ -1054,7 +1047,7 @@ ret = register_netdev(dev); if (ret) - goto release; + goto free; printk(KERN_INFO "%s: ether1 in slot %d, ", dev->name, ec->slot_no); @@ -1065,11 +1058,13 @@ ecard_set_drvdata(ec, dev); return 0; -release: - release_region(dev->base_addr, 16); - release_region(dev->base_addr + 0x800, 4096); + free: + if (priv(dev)->base) + iounmap(priv(dev)->base); free_netdev(dev); -out: + release: + ecard_release_resources(ec); + out: return ret; } @@ -1080,10 +1075,9 @@ ecard_set_drvdata(ec, NULL); unregister_netdev(dev); - - release_region(dev->base_addr, 16); - release_region(dev->base_addr + 0x800, 4096); + iounmap(priv(dev)->base); free_netdev(dev); + ecard_release_resources(ec); } static const struct ecard_id ether1_ids[] = { diff -Nru a/drivers/net/arm/ether1.h b/drivers/net/arm/ether1.h --- a/drivers/net/arm/ether1.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether1.h 2005-03-07 14:54:18 -08:00 @@ -19,22 +19,25 @@ #define NET_DEBUG 0 #endif +#define priv(dev) ((struct ether1_priv *)netdev_priv(dev)) + /* Page register */ -#define REG_PAGE (dev->base_addr + 0x00) +#define REG_PAGE (priv(dev)->base + 0x0000) /* Control register */ -#define REG_CONTROL (dev->base_addr + 0x01) +#define REG_CONTROL (priv(dev)->base + 0x0004) #define CTRL_RST 0x01 #define CTRL_LOOPBACK 0x02 #define CTRL_CA 0x04 #define CTRL_ACK 0x08 -#define ETHER1_RAM (dev->base_addr + 0x800) +#define ETHER1_RAM (priv(dev)->base + 0x2000) /* HW address */ -#define IDPROM_ADDRESS (dev->base_addr + 0x09) +#define IDPROM_ADDRESS (priv(dev)->base + 0x0024) struct ether1_priv { + void __iomem *base; struct net_device_stats stats; unsigned int tx_link; unsigned int tx_head; diff -Nru a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c --- a/drivers/net/arm/ether3.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether3.c 2005-03-07 14:54:18 -08:00 @@ -78,8 +78,8 @@ static unsigned int net_debug = NET_DEBUG; static void ether3_setmulticastlist(struct net_device *dev); -static int ether3_rx(struct net_device *dev, struct dev_priv *priv, unsigned int maxcnt); -static void ether3_tx(struct net_device *dev, struct dev_priv *priv); +static int ether3_rx(struct net_device *dev, unsigned int maxcnt); +static void ether3_tx(struct net_device *dev); static int ether3_open (struct net_device *dev); static int ether3_sendpacket (struct sk_buff *skb, struct net_device *dev); static irqreturn_t ether3_interrupt (int irq, void *dev_id, struct pt_regs *regs); @@ -104,33 +104,32 @@ * The SEEQ8005 doesn't like us writing to its registers * too quickly. */ -static inline void ether3_outb(int v, const int r) +static inline void ether3_outb(int v, const void __iomem *r) { - outb(v, r); + writeb(v, r); udelay(1); } -static inline void ether3_outw(int v, const int r) +static inline void ether3_outw(int v, const void __iomem *r) { - outw(v, r); + writew(v, r); udelay(1); } -#define ether3_inb(r) ({ unsigned int __v = inb((r)); udelay(1); __v; }) -#define ether3_inw(r) ({ unsigned int __v = inw((r)); udelay(1); __v; }) +#define ether3_inb(r) ({ unsigned int __v = readb((r)); udelay(1); __v; }) +#define ether3_inw(r) ({ unsigned int __v = readw((r)); udelay(1); __v; }) static int ether3_setbuffer(struct net_device *dev, buffer_rw_t read, int start) { - struct dev_priv *priv = netdev_priv(dev); int timeout = 1000; - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); - ether3_outw(priv->regs.command | CMD_FIFOWRITE, REG_COMMAND); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.command | CMD_FIFOWRITE, REG_COMMAND); while ((ether3_inw(REG_STATUS) & STAT_FIFOEMPTY) == 0) { if (!timeout--) { printk("%s: setbuffer broken\n", dev->name); - priv->broken = 1; + priv(dev)->broken = 1; return 1; } udelay(1); @@ -138,9 +137,9 @@ if (read == buffer_read) { ether3_outw(start, REG_DMAADDR); - ether3_outw(priv->regs.command | CMD_FIFOREAD, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_FIFOREAD, REG_COMMAND); } else { - ether3_outw(priv->regs.command | CMD_FIFOWRITE, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_FIFOWRITE, REG_COMMAND); ether3_outw(start, REG_DMAADDR); } return 0; @@ -150,53 +149,50 @@ * write data to the buffer memory */ #define ether3_writebuffer(dev,data,length) \ - outsw(REG_BUFWIN, (data), (length) >> 1) + writesw(REG_BUFWIN, (data), (length) >> 1) #define ether3_writeword(dev,data) \ - outw((data), REG_BUFWIN) + writew((data), REG_BUFWIN) #define ether3_writelong(dev,data) { \ - unsigned long reg_bufwin = REG_BUFWIN; \ - outw((data), reg_bufwin); \ - outw((data) >> 16, reg_bufwin); \ + void __iomem *reg_bufwin = REG_BUFWIN; \ + writew((data), reg_bufwin); \ + writew((data) >> 16, reg_bufwin); \ } /* * read data from the buffer memory */ #define ether3_readbuffer(dev,data,length) \ - insw(REG_BUFWIN, (data), (length) >> 1) + readsw(REG_BUFWIN, (data), (length) >> 1) #define ether3_readword(dev) \ - inw(REG_BUFWIN) + readw(REG_BUFWIN) #define ether3_readlong(dev) \ - inw(REG_BUFWIN) | (inw(REG_BUFWIN) << 16) + readw(REG_BUFWIN) | (readw(REG_BUFWIN) << 16) /* * Switch LED off... */ -static void -ether3_ledoff(unsigned long data) +static void ether3_ledoff(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct dev_priv *priv = netdev_priv(dev); - ether3_outw(priv->regs.config2 |= CFG2_CTRLO, REG_CONFIG2); + ether3_outw(priv(dev)->regs.config2 |= CFG2_CTRLO, REG_CONFIG2); } /* * switch LED on... */ -static inline void -ether3_ledon(struct net_device *dev, struct dev_priv *priv) +static inline void ether3_ledon(struct net_device *dev) { - del_timer(&priv->timer); - priv->timer.expires = jiffies + HZ / 50; /* leave on for 1/50th second */ - priv->timer.data = (unsigned long)dev; - priv->timer.function = ether3_ledoff; - add_timer(&priv->timer); - if (priv->regs.config2 & CFG2_CTRLO) - ether3_outw(priv->regs.config2 &= ~CFG2_CTRLO, REG_CONFIG2); + del_timer(&priv(dev)->timer); + priv(dev)->timer.expires = jiffies + HZ / 50; /* leave on for 1/50th second */ + priv(dev)->timer.data = (unsigned long)dev; + priv(dev)->timer.function = ether3_ledoff; + add_timer(&priv(dev)->timer); + if (priv(dev)->regs.config2 & CFG2_CTRLO) + ether3_outw(priv(dev)->regs.config2 &= ~CFG2_CTRLO, REG_CONFIG2); } /* @@ -277,43 +273,41 @@ /* ------------------------------------------------------------------------------- */ -static int __init -ether3_init_2(struct net_device *dev) +static int __init ether3_init_2(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); int i; - priv->regs.config1 = CFG1_RECVCOMPSTAT0|CFG1_DMABURST8; - priv->regs.config2 = CFG2_CTRLO|CFG2_RECVCRC|CFG2_ERRENCRC; - priv->regs.command = 0; + priv(dev)->regs.config1 = CFG1_RECVCOMPSTAT0|CFG1_DMABURST8; + priv(dev)->regs.config2 = CFG2_CTRLO|CFG2_RECVCRC|CFG2_ERRENCRC; + priv(dev)->regs.command = 0; /* * Set up our hardware address */ - ether3_outw(priv->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); for (i = 0; i < 6; i++) ether3_outb(dev->dev_addr[i], REG_BUFWIN); if (dev->flags & IFF_PROMISC) - priv->regs.config1 |= CFG1_RECVPROMISC; + priv(dev)->regs.config1 |= CFG1_RECVPROMISC; else if (dev->flags & IFF_MULTICAST) - priv->regs.config1 |= CFG1_RECVSPECBRMULTI; + priv(dev)->regs.config1 |= CFG1_RECVSPECBRMULTI; else - priv->regs.config1 |= CFG1_RECVSPECBROAD; + priv(dev)->regs.config1 |= CFG1_RECVSPECBROAD; /* * There is a problem with the NQ8005 in that it occasionally loses the * last two bytes. To get round this problem, we receive the CRC as * well. That way, if we do lose the last two, then it doesn't matter. */ - ether3_outw(priv->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); ether3_outw((TX_END>>8) - 1, REG_BUFWIN); - ether3_outw(priv->rx_head, REG_RECVPTR); + ether3_outw(priv(dev)->rx_head, REG_RECVPTR); ether3_outw(0, REG_TRANSMITPTR); - ether3_outw(priv->rx_head >> 8, REG_RECVEND); - ether3_outw(priv->regs.config2, REG_CONFIG2); - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); - ether3_outw(priv->regs.command, REG_COMMAND); + ether3_outw(priv(dev)->rx_head >> 8, REG_RECVEND); + ether3_outw(priv(dev)->regs.config2, REG_CONFIG2); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.command, REG_COMMAND); i = ether3_ramtest(dev, 0x5A); if(i) @@ -330,41 +324,41 @@ static void ether3_init_for_open(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); int i; - memset(&priv->stats, 0, sizeof(struct net_device_stats)); + memset(&priv(dev)->stats, 0, sizeof(struct net_device_stats)); /* Reset the chip */ ether3_outw(CFG2_RESET, REG_CONFIG2); udelay(4); - priv->regs.command = 0; + priv(dev)->regs.command = 0; ether3_outw(CMD_RXOFF|CMD_TXOFF, REG_COMMAND); - while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)); + while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)) + barrier(); - ether3_outw(priv->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_BUFSELSTAT0, REG_CONFIG1); for (i = 0; i < 6; i++) ether3_outb(dev->dev_addr[i], REG_BUFWIN); - priv->tx_head = 0; - priv->tx_tail = 0; - priv->regs.config2 |= CFG2_CTRLO; - priv->rx_head = RX_START; + priv(dev)->tx_head = 0; + priv(dev)->tx_tail = 0; + priv(dev)->regs.config2 |= CFG2_CTRLO; + priv(dev)->rx_head = RX_START; - ether3_outw(priv->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_TRANSEND, REG_CONFIG1); ether3_outw((TX_END>>8) - 1, REG_BUFWIN); - ether3_outw(priv->rx_head, REG_RECVPTR); - ether3_outw(priv->rx_head >> 8, REG_RECVEND); + ether3_outw(priv(dev)->rx_head, REG_RECVPTR); + ether3_outw(priv(dev)->rx_head >> 8, REG_RECVEND); ether3_outw(0, REG_TRANSMITPTR); - ether3_outw(priv->regs.config2, REG_CONFIG2); - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config2, REG_CONFIG2); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); ether3_setbuffer(dev, buffer_write, 0); ether3_writelong(dev, 0); - priv->regs.command = CMD_ENINTRX | CMD_ENINTTX; - ether3_outw(priv->regs.command | CMD_RXON, REG_COMMAND); + priv(dev)->regs.command = CMD_ENINTRX | CMD_ENINTTX; + ether3_outw(priv(dev)->regs.command | CMD_RXON, REG_COMMAND); } static inline int @@ -378,10 +372,10 @@ printk(KERN_DEBUG "ether3_probe: write8 [%02X:%02X]", write_high, write_low); ether3_outb(write_low, REG_RECVPTR); - ether3_outb(write_high, REG_RECVPTR + 1); + ether3_outb(write_high, REG_RECVPTR + 4); read_low = ether3_inb(REG_RECVPTR); - read_high = ether3_inb(REG_RECVPTR + 1); + read_high = ether3_inb(REG_RECVPTR + 4); printk(", read8 [%02X:%02X]\n", read_high, read_low); @@ -434,16 +428,15 @@ static int ether3_close(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); - netif_stop_queue(dev); disable_irq(dev->irq); ether3_outw(CMD_RXOFF|CMD_TXOFF, REG_COMMAND); - priv->regs.command = 0; - while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)); - ether3_outb(0x80, REG_CONFIG2 + 1); + priv(dev)->regs.command = 0; + while (ether3_inw(REG_STATUS) & (STAT_RXON|STAT_TXON)) + barrier(); + ether3_outb(0x80, REG_CONFIG2 + 4); ether3_outw(0, REG_COMMAND); free_irq(dev->irq, dev); @@ -457,8 +450,7 @@ */ static struct net_device_stats *ether3_getstats(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); - return &priv->stats; + return &priv(dev)->stats; } /* @@ -469,28 +461,24 @@ */ static void ether3_setmulticastlist(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); - - priv->regs.config1 &= ~CFG1_RECVPROMISC; + priv(dev)->regs.config1 &= ~CFG1_RECVPROMISC; if (dev->flags & IFF_PROMISC) { /* promiscuous mode */ - priv->regs.config1 |= CFG1_RECVPROMISC; + priv(dev)->regs.config1 |= CFG1_RECVPROMISC; } else if (dev->flags & IFF_ALLMULTI) { - priv->regs.config1 |= CFG1_RECVSPECBRMULTI; + priv(dev)->regs.config1 |= CFG1_RECVSPECBRMULTI; } else - priv->regs.config1 |= CFG1_RECVSPECBROAD; + priv(dev)->regs.config1 |= CFG1_RECVSPECBROAD; - ether3_outw(priv->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); + ether3_outw(priv(dev)->regs.config1 | CFG1_LOCBUFMEM, REG_CONFIG1); } -static void -ether3_timeout(struct net_device *dev) +static void ether3_timeout(struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); unsigned long flags; - del_timer(&priv->timer); + del_timer(&priv(dev)->timer); local_irq_save(flags); printk(KERN_ERR "%s: transmit timed out, network cable problem?\n", dev->name); @@ -499,15 +487,15 @@ printk(KERN_ERR "%s: { rpr=%04X rea=%04X tpr=%04X }\n", dev->name, ether3_inw(REG_RECVPTR), ether3_inw(REG_RECVEND), ether3_inw(REG_TRANSMITPTR)); printk(KERN_ERR "%s: tx head=%X tx tail=%X\n", dev->name, - priv->tx_head, priv->tx_tail); - ether3_setbuffer(dev, buffer_read, priv->tx_tail); + priv(dev)->tx_head, priv(dev)->tx_tail); + ether3_setbuffer(dev, buffer_read, priv(dev)->tx_tail); printk(KERN_ERR "%s: packet status = %08X\n", dev->name, ether3_readlong(dev)); local_irq_restore(flags); - priv->regs.config2 |= CFG2_CTRLO; - priv->stats.tx_errors += 1; - ether3_outw(priv->regs.config2, REG_CONFIG2); - priv->tx_head = priv->tx_tail = 0; + priv(dev)->regs.config2 |= CFG2_CTRLO; + priv(dev)->stats.tx_errors += 1; + ether3_outw(priv(dev)->regs.config2, REG_CONFIG2); + priv(dev)->tx_head = priv(dev)->tx_tail = 0; netif_wake_queue(dev); } @@ -518,14 +506,13 @@ static int ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) { - struct dev_priv *priv = netdev_priv(dev); unsigned long flags; unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; unsigned int ptr, next_ptr; - if (priv->broken) { + if (priv(dev)->broken) { dev_kfree_skb(skb); - priv->stats.tx_dropped ++; + priv(dev)->stats.tx_dropped ++; netif_start_queue(dev); return 0; } @@ -537,18 +524,18 @@ goto out; } - next_ptr = (priv->tx_head + 1) & 15; + next_ptr = (priv(dev)->tx_head + 1) & 15; local_irq_save(flags); - if (priv->tx_tail == next_ptr) { + if (priv(dev)->tx_tail == next_ptr) { local_irq_restore(flags); return 1; /* unable to queue */ } dev->trans_start = jiffies; - ptr = 0x600 * priv->tx_head; - priv->tx_head = next_ptr; + ptr = 0x600 * priv(dev)->tx_head; + priv(dev)->tx_head = next_ptr; next_ptr *= 0x600; #define TXHDR_FLAGS (TXHDR_TRANSMIT|TXHDR_CHAINCONTINUE|TXHDR_DATAFOLLOWS|TXHDR_ENSUCCESS) @@ -563,19 +550,19 @@ ether3_setbuffer(dev, buffer_write, ptr); ether3_writeword(dev, htons((ptr + length + 4))); ether3_writeword(dev, TXHDR_FLAGS >> 16); - ether3_ledon(dev, priv); + ether3_ledon(dev); if (!(ether3_inw(REG_STATUS) & STAT_TXON)) { ether3_outw(ptr, REG_TRANSMITPTR); - ether3_outw(priv->regs.command | CMD_TXON, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_TXON, REG_COMMAND); } - next_ptr = (priv->tx_head + 1) & 15; + next_ptr = (priv(dev)->tx_head + 1) & 15; local_irq_restore(flags); dev_kfree_skb(skb); - if (priv->tx_tail == next_ptr) + if (priv(dev)->tx_tail == next_ptr) netif_stop_queue(dev); out: @@ -586,7 +573,6 @@ ether3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *)dev_id; - struct dev_priv *priv; unsigned int status, handled = IRQ_NONE; #if NET_DEBUG > 1 @@ -594,19 +580,17 @@ printk("eth3irq: %d ", irq); #endif - priv = netdev_priv(dev); - status = ether3_inw(REG_STATUS); if (status & STAT_INTRX) { - ether3_outw(CMD_ACKINTRX | priv->regs.command, REG_COMMAND); - ether3_rx(dev, priv, 12); + ether3_outw(CMD_ACKINTRX | priv(dev)->regs.command, REG_COMMAND); + ether3_rx(dev, 12); handled = IRQ_HANDLED; } if (status & STAT_INTTX) { - ether3_outw(CMD_ACKINTTX | priv->regs.command, REG_COMMAND); - ether3_tx(dev, priv); + ether3_outw(CMD_ACKINTTX | priv(dev)->regs.command, REG_COMMAND); + ether3_tx(dev); handled = IRQ_HANDLED; } @@ -620,11 +604,11 @@ /* * If we have a good packet(s), get it/them out of the buffers. */ -static int -ether3_rx(struct net_device *dev, struct dev_priv *priv, unsigned int maxcnt) +static int ether3_rx(struct net_device *dev, unsigned int maxcnt) { - unsigned int next_ptr = priv->rx_head, received = 0; - ether3_ledon(dev, priv); + unsigned int next_ptr = priv(dev)->rx_head, received = 0; + + ether3_ledon(dev); do { unsigned int this_ptr, status; @@ -653,12 +637,12 @@ if (next_ptr < RX_START || next_ptr >= RX_END) { int i; - printk("%s: bad next pointer @%04X: ", dev->name, priv->rx_head); + printk("%s: bad next pointer @%04X: ", dev->name, priv(dev)->rx_head); printk("%02X %02X %02X %02X ", next_ptr >> 8, next_ptr & 255, status & 255, status >> 8); for (i = 2; i < 14; i++) printk("%02X ", addrs[i]); printk("\n"); - next_ptr = priv->rx_head; + next_ptr = priv(dev)->rx_head; break; } /* @@ -695,7 +679,7 @@ } else goto dropping; } else { - struct net_device_stats *stats = &priv->stats; + struct net_device_stats *stats = &priv(dev)->stats; ether3_outw(next_ptr >> 8, REG_RECVEND); if (status & RXSTAT_OVERSIZE) stats->rx_over_errors ++; if (status & RXSTAT_CRCERROR) stats->rx_crc_errors ++; @@ -707,16 +691,16 @@ while (-- maxcnt); done: - priv->stats.rx_packets += received; - priv->rx_head = next_ptr; + priv(dev)->stats.rx_packets += received; + priv(dev)->rx_head = next_ptr; /* * If rx went off line, then that means that the buffer may be full. We * have dropped at least one packet. */ if (!(ether3_inw(REG_STATUS) & STAT_RXON)) { - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; ether3_outw(next_ptr, REG_RECVPTR); - ether3_outw(priv->regs.command | CMD_RXON, REG_COMMAND); + ether3_outw(priv(dev)->regs.command | CMD_RXON, REG_COMMAND); } return maxcnt; @@ -732,7 +716,7 @@ last_warned = jiffies; printk("%s: memory squeeze, dropping packet.\n", dev->name); } - priv->stats.rx_dropped ++; + priv(dev)->stats.rx_dropped ++; goto done; } } @@ -740,10 +724,9 @@ /* * Update stats for the transmitted packet(s) */ -static void -ether3_tx(struct net_device *dev, struct dev_priv *priv) +static void ether3_tx(struct net_device *dev) { - unsigned int tx_tail = priv->tx_tail; + unsigned int tx_tail = priv(dev)->tx_tail; int max_work = 14; do { @@ -766,18 +749,20 @@ * Update errors */ if (!(status & (TXSTAT_BABBLED | TXSTAT_16COLLISIONS))) - priv->stats.tx_packets++; + priv(dev)->stats.tx_packets++; else { - priv->stats.tx_errors ++; - if (status & TXSTAT_16COLLISIONS) priv->stats.collisions += 16; - if (status & TXSTAT_BABBLED) priv->stats.tx_fifo_errors ++; + priv(dev)->stats.tx_errors ++; + if (status & TXSTAT_16COLLISIONS) + priv(dev)->stats.collisions += 16; + if (status & TXSTAT_BABBLED) + priv(dev)->stats.tx_fifo_errors ++; } tx_tail = (tx_tail + 1) & 15; } while (--max_work); - if (priv->tx_tail != tx_tail) { - priv->tx_tail = tx_tail; + if (priv(dev)->tx_tail != tx_tail) { + priv(dev)->tx_tail = tx_tail; netif_wake_queue(dev); } } @@ -790,66 +775,48 @@ printk(KERN_INFO "%s", version); } -static const char * __init -ether3_get_dev(struct net_device *dev, struct expansion_card *ec) -{ - const char *name = "ether3"; - - dev->base_addr = ecard_address(ec, ECARD_MEMC, 0); - dev->irq = ec->irq; - - if (ec->cid.manufacturer == MANU_ANT && - ec->cid.product == PROD_ANT_ETHERB) { - dev->base_addr += 0x200; - name = "etherb"; - } - - ec->irqaddr = (volatile unsigned char *)ioaddr(dev->base_addr); - ec->irqmask = 0xf0; - - ether3_addr(dev->dev_addr, ec); - - return name; -} - static int __devinit ether3_probe(struct expansion_card *ec, const struct ecard_id *id) { + const struct ether3_data *data = id->data; struct net_device *dev; - struct dev_priv *priv; - const char *name; int i, bus_type, ret; ether3_banner(); + ret = ecard_request_resources(ec); + if (ret) + goto out; + dev = alloc_etherdev(sizeof(struct dev_priv)); if (!dev) { ret = -ENOMEM; - goto out; + goto release; } SET_MODULE_OWNER(dev); + SET_NETDEV_DEV(dev, &ec->dev); - name = ether3_get_dev(dev, ec); - if (!name) { - ret = -ENODEV; + priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), + ecard_resource_len(ec, ECARD_RES_MEMC)); + if (!priv(dev)->base) { + ret = -ENOMEM; goto free; } - /* - * this will not fail - the nature of the bus ensures this - */ - if (!request_region(dev->base_addr, 128, dev->name)) { - ret = -EBUSY; - goto free; - } + ec->irqaddr = priv(dev)->base + data->base_offset; + ec->irqmask = 0xf0; - priv = netdev_priv(dev); - init_timer(&priv->timer); + priv(dev)->seeq = priv(dev)->base + data->base_offset; + dev->irq = ec->irq; + + ether3_addr(dev->dev_addr, ec); + + init_timer(&priv(dev)->timer); /* Reset card... */ - ether3_outb(0x80, REG_CONFIG2 + 1); + ether3_outb(0x80, REG_CONFIG2 + 4); bus_type = BUS_UNKNOWN; udelay(4); @@ -869,13 +836,13 @@ case BUS_UNKNOWN: printk(KERN_ERR "%s: unable to identify bus width\n", dev->name); ret = -ENODEV; - goto failed; + goto free; case BUS_8: printk(KERN_ERR "%s: %s found, but is an unsupported " - "8-bit card\n", dev->name, name); + "8-bit card\n", dev->name, data->name); ret = -ENODEV; - goto failed; + goto free; default: break; @@ -883,7 +850,7 @@ if (ether3_init_2(dev)) { ret = -ENODEV; - goto failed; + goto free; } dev->open = ether3_open; @@ -896,20 +863,22 @@ ret = register_netdev(dev); if (ret) - goto failed; + goto free; - printk("%s: %s in slot %d, ", dev->name, name, ec->slot_no); + printk("%s: %s in slot %d, ", dev->name, data->name, ec->slot_no); for (i = 0; i < 6; i++) printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':'); ecard_set_drvdata(ec, dev); return 0; -failed: - release_region(dev->base_addr, 128); -free: + free: + if (priv(dev)->base) + iounmap(priv(dev)->base); free_netdev(dev); -out: + release: + ecard_release_resources(ec); + out: return ret; } @@ -920,14 +889,25 @@ ecard_set_drvdata(ec, NULL); unregister_netdev(dev); - release_region(dev->base_addr, 128); + iounmap(priv(dev)->base); free_netdev(dev); + ecard_release_resources(ec); } +static struct ether3_data ether3 = { + .name = "ether3", + .base_offset = 0, +}; + +static struct ether3_data etherb = { + .name = "etherb", + .base_offset = 0x800, +}; + static const struct ecard_id ether3_ids[] = { - { MANU_ANT2, PROD_ANT_ETHER3 }, - { MANU_ANT, PROD_ANT_ETHER3 }, - { MANU_ANT, PROD_ANT_ETHERB }, + { MANU_ANT2, PROD_ANT_ETHER3, ðer3 }, + { MANU_ANT, PROD_ANT_ETHER3, ðer3 }, + { MANU_ANT, PROD_ANT_ETHERB, ðerb }, { 0xffff, 0xffff } }; diff -Nru a/drivers/net/arm/ether3.h b/drivers/net/arm/ether3.h --- a/drivers/net/arm/ether3.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/arm/ether3.h 2005-03-07 14:54:18 -08:00 @@ -22,8 +22,10 @@ #define NET_DEBUG 0 #endif +#define priv(dev) ((struct dev_priv *)netdev_priv(dev)) + /* Command register definitions & bits */ -#define REG_COMMAND (dev->base_addr + 0x00) +#define REG_COMMAND (priv(dev)->seeq + 0x0000) #define CMD_ENINTDMA 0x0001 #define CMD_ENINTRX 0x0002 #define CMD_ENINTTX 0x0004 @@ -42,7 +44,7 @@ #define CMD_FIFOWRITE 0x8000 /* status register */ -#define REG_STATUS (dev->base_addr + 0x00) +#define REG_STATUS (priv(dev)->seeq + 0x0000) #define STAT_ENINTSTAT 0x0001 #define STAT_ENINTRX 0x0002 #define STAT_ENINTTX 0x0004 @@ -59,7 +61,7 @@ #define STAT_FIFODIR 0x8000 /* configuration register 1 */ -#define REG_CONFIG1 (dev->base_addr + 0x10) +#define REG_CONFIG1 (priv(dev)->seeq + 0x0040) #define CFG1_BUFSELSTAT0 0x0000 #define CFG1_BUFSELSTAT1 0x0001 #define CFG1_BUFSELSTAT2 0x0002 @@ -92,7 +94,7 @@ #define CFG1_RECVCOMPSTAT5 0x2000 /* configuration register 2 */ -#define REG_CONFIG2 (dev->base_addr + 0x20) +#define REG_CONFIG2 (priv(dev)->seeq + 0x0080) #define CFG2_BYTESWAP 0x0001 #define CFG2_ERRENCRC 0x0008 #define CFG2_ERRENDRIBBLE 0x0010 @@ -106,15 +108,15 @@ #define CFG2_CTRLO 0x1000 #define CFG2_RESET 0x8000 -#define REG_RECVEND (dev->base_addr + 0x30) +#define REG_RECVEND (priv(dev)->seeq + 0x00c0) -#define REG_BUFWIN (dev->base_addr + 0x40) +#define REG_BUFWIN (priv(dev)->seeq + 0x0100) -#define REG_RECVPTR (dev->base_addr + 0x50) +#define REG_RECVPTR (priv(dev)->seeq + 0x0140) -#define REG_TRANSMITPTR (dev->base_addr + 0x60) +#define REG_TRANSMITPTR (priv(dev)->seeq + 0x0180) -#define REG_DMAADDR (dev->base_addr + 0x70) +#define REG_DMAADDR (priv(dev)->seeq + 0x01c0) /* * Cards transmit/receive headers @@ -152,6 +154,8 @@ #define MAX_TX_BUFFERED 10 struct dev_priv { + void __iomem *base; + void __iomem *seeq; struct { unsigned int command; unsigned int config1; @@ -163,6 +167,11 @@ struct net_device_stats stats; struct timer_list timer; int broken; /* 0 = ok, 1 = something went wrong */ +}; + +struct ether3_data { + const char name[8]; + unsigned long base_offset; }; #endif diff -Nru a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c --- a/drivers/net/au1000_eth.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/au1000_eth.c 2005-03-07 14:54:17 -08:00 @@ -1,10 +1,19 @@ /* - * Alchemy Semi Au1000 ethernet driver * - * Copyright 2001 MontaVista Software Inc. + * Alchemy Au1x00 ethernet driver + * + * Copyright 2001,2002,2003 MontaVista Software Inc. + * Copyright 2002 TimeSys Corp. + * Added ethtool/mii-tool support, + * Copyright 2004 Matt Porter + * Update: 2004 Bjoern Riemer, riemer@fokus.fraunhofer.de + * or riemer@riemer-nt.de: fixed the link beat detection with + * ioctls (SIOCGMIIPHY) * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com * + * ######################################################################## + * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. @@ -17,46 +26,59 @@ * 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 #include #include +#include +#include #include #include -#include -#include - #include #include #include -#include +#include +#include +#include #include "au1000_eth.h" #ifdef AU1000_ETH_DEBUG -static int au1000_debug = 10; +static int au1000_debug = 5; #else static int au1000_debug = 3; #endif +#define DRV_NAME "au1000eth" +#define DRV_VERSION "1.5" +#define DRV_AUTHOR "Pete Popov " +#define DRV_DESC "Au1xxx on-chip Ethernet driver" + +MODULE_AUTHOR(DRV_AUTHOR); +MODULE_DESCRIPTION(DRV_DESC); +MODULE_LICENSE("GPL"); + // prototypes -static void *dma_alloc(size_t, dma_addr_t *); -static void dma_free(void *, size_t); static void hard_stop(struct net_device *); static void enable_rx_tx(struct net_device *dev); -static int __init au1000_probe1(long, int, int); +static struct net_device * au1000_probe(u32 ioaddr, int irq, int port_num); static int au1000_init(struct net_device *); static int au1000_open(struct net_device *); static int au1000_close(struct net_device *); @@ -78,8 +100,7 @@ // externs extern void ack_rise_edge_irq(unsigned int); extern int get_ethernet_addr(char *ethernet_addr); -extern inline void str2eaddr(unsigned char *ea, unsigned char *str); -extern inline unsigned char str2hexnum(unsigned char c); +extern void str2eaddr(unsigned char *ea, unsigned char *str); extern char * __init prom_getcmdline(void); /* @@ -97,29 +118,6 @@ * complete immediately. */ - -/* - * Base address and interrupt of the Au1xxx ethernet macs - */ -static struct { - unsigned int port; - int irq; -} au1000_iflist[NUM_INTERFACES] = { - {AU1000_ETH0_BASE, AU1000_ETH0_IRQ}, - {AU1000_ETH1_BASE, AU1000_ETH1_IRQ} - }, - au1500_iflist[NUM_INTERFACES] = { - {AU1500_ETH0_BASE, AU1000_ETH0_IRQ}, - {AU1500_ETH1_BASE, AU1000_ETH1_IRQ} - }, - au1100_iflist[NUM_INTERFACES] = { - {AU1000_ETH0_BASE, AU1000_ETH0_IRQ}, - {0, 0} - }; - -static char version[] __devinitdata = - "au1000eth.c:1.0 ppopov@mvista.com\n"; - /* These addresses are only used if yamon doesn't tell us what * the mac address is, and the mac address is not passed on the * command line. @@ -135,18 +133,36 @@ #define cpu_to_dma32 cpu_to_be32 #define dma32_to_cpu be32_to_cpu +struct au1000_private *au_macs[NUM_ETH_INTERFACES]; /* FIXME * All of the PHY code really should be detached from the MAC * code. */ +/* Default advertise */ +#define GENMII_DEFAULT_ADVERTISE \ + ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | \ + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \ + ADVERTISED_Autoneg + +#define GENMII_DEFAULT_FEATURES \ + SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \ + SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \ + SUPPORTED_Autoneg + +static char *phy_link[] = +{ "unknown", + "10Base2", "10BaseT", + "AUI", + "100BaseT", "100BaseTX", "100BaseFX" +}; + int bcm_5201_init(struct net_device *dev, int phy_addr) { s16 data; /* Stop auto-negotiation */ - //printk("bcm_5201_init\n"); data = mdio_read(dev, phy_addr, MII_CONTROL); mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); @@ -161,17 +177,8 @@ data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; mdio_write(dev, phy_addr, MII_CONTROL, data); - /* Enable TX LED instead of FDX */ - data = mdio_read(dev, phy_addr, MII_INT); - data &= ~MII_FDX_LED; - mdio_write(dev, phy_addr, MII_INT, data); - - /* Enable TX LED instead of FDX */ - data = mdio_read(dev, phy_addr, MII_INT); - data &= ~MII_FDX_LED; - mdio_write(dev, phy_addr, MII_INT, data); - - if (au1000_debug > 4) dump_mii(dev, phy_addr); + if (au1000_debug > 4) + dump_mii(dev, phy_addr); return 0; } @@ -179,7 +186,6 @@ { s16 mii_control, timeout; - //printk("bcm_5201_reset\n"); mii_control = mdio_read(dev, phy_addr, MII_CONTROL); mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); mdelay(1); @@ -242,12 +248,16 @@ printk("lsi_80227_init\n"); /* restart auto-negotiation */ - mdio_write(dev, phy_addr, 0, 0x3200); - + mdio_write(dev, phy_addr, MII_CONTROL, + MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO); // | MII_CNTL_FDX); mdelay(1); /* set up LEDs to correct display */ +#ifdef CONFIG_MIPS_MTX1 + mdio_write(dev, phy_addr, 17, 0xff80); +#else mdio_write(dev, phy_addr, 17, 0xffc0); +#endif if (au1000_debug > 4) dump_mii(dev, phy_addr); @@ -294,9 +304,9 @@ mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); if (mii_data & MII_STAT_LINK) { *link = 1; - mii_data = mdio_read(dev, aup->phy_addr, MII_LSI_STAT); - if (mii_data & MII_LSI_STAT_SPD) { - if (mii_data & MII_LSI_STAT_FDX) { + mii_data = mdio_read(dev, aup->phy_addr, MII_LSI_PHY_STAT); + if (mii_data & MII_LSI_PHY_STAT_SPD) { + if (mii_data & MII_LSI_PHY_STAT_FDX) { *speed = IF_PORT_100BASEFX; dev->if_port = IF_PORT_100BASEFX; } @@ -337,12 +347,396 @@ return 0; } +int am79c874_init(struct net_device *dev, int phy_addr) +{ + s16 data; + + /* 79c874 has quit resembled bit assignments to BCM5201 */ + if (au1000_debug > 4) + printk("am79c847_init\n"); + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + return 0; +} + +int am79c874_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) + printk("am79c874_reset\n"); + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +am79c874_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + // printk("am79c874_status\n"); + if (!dev) { + printk(KERN_ERR "am79c874_status error: NULL dev\n"); + return -1; + } + + aup = (struct au1000_private *) dev->priv; + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AMD_PHY_STAT); + if (mii_data & MII_AMD_PHY_STAT_SPD) { + if (mii_data & MII_AMD_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int lxt971a_init(struct net_device *dev, int phy_addr) +{ + if (au1000_debug > 4) + printk("lxt971a_init\n"); + + /* restart auto-negotiation */ + mdio_write(dev, phy_addr, MII_CONTROL, + MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO | MII_CNTL_FDX); + + /* set up LEDs to correct display */ + mdio_write(dev, phy_addr, 20, 0x0422); + + if (au1000_debug > 4) + dump_mii(dev, phy_addr); + return 0; +} + +int lxt971a_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) { + printk("lxt971a_reset\n"); + dump_mii(dev, phy_addr); + } + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +lxt971a_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "lxt971a_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_INTEL_PHY_STAT); + if (mii_data & MII_INTEL_PHY_STAT_SPD) { + if (mii_data & MII_INTEL_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int ks8995m_init(struct net_device *dev, int phy_addr) +{ + s16 data; + +// printk("ks8995m_init\n"); + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + + return 0; +} + +int ks8995m_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + +// printk("ks8995m_reset\n"); + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int ks8995m_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "ks8995m_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AUX_CNTRL); + if (mii_data & MII_AUX_100) { + if (mii_data & MII_AUX_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int +smsc_83C185_init (struct net_device *dev, int phy_addr) +{ + s16 data; + + if (au1000_debug > 4) + printk("smsc_83C185_init\n"); + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + return 0; +} + +int +smsc_83C185_reset (struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) + printk("smsc_83C185_reset\n"); + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +smsc_83C185_status (struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "smsc_83C185_status error: NULL dev\n"); + return -1; + } + + aup = (struct au1000_private *) dev->priv; + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, 0x1f); + if (mii_data & (1<<3)) { + if (mii_data & (1<<4)) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + + +#ifdef CONFIG_MIPS_BOSPORUS +int stub_init(struct net_device *dev, int phy_addr) +{ + //printk("PHY stub_init\n"); + return 0; +} + +int stub_reset(struct net_device *dev, int phy_addr) +{ + //printk("PHY stub_reset\n"); + return 0; +} + +int +stub_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + //printk("PHY stub_status\n"); + *link = 1; + /* hmmm, revisit */ + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + return 0; +} +#endif + struct phy_ops bcm_5201_ops = { bcm_5201_init, bcm_5201_reset, bcm_5201_status, }; +struct phy_ops am79c874_ops = { + am79c874_init, + am79c874_reset, + am79c874_status, +}; + struct phy_ops am79c901_ops = { am79c901_init, am79c901_reset, @@ -355,26 +749,89 @@ lsi_80227_status, }; +struct phy_ops lxt971a_ops = { + lxt971a_init, + lxt971a_reset, + lxt971a_status, +}; + +struct phy_ops ks8995m_ops = { + ks8995m_init, + ks8995m_reset, + ks8995m_status, +}; + +struct phy_ops smsc_83C185_ops = { + smsc_83C185_init, + smsc_83C185_reset, + smsc_83C185_status, +}; + +#ifdef CONFIG_MIPS_BOSPORUS +struct phy_ops stub_ops = { + stub_init, + stub_reset, + stub_status, +}; +#endif + static struct mii_chip_info { const char * name; u16 phy_id0; u16 phy_id1; struct phy_ops *phy_ops; + int dual_phy; } mii_chip_table[] = { - {"Broadcom BCM5201 10/100 BaseT PHY", 0x0040, 0x6212, &bcm_5201_ops }, - {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, &am79c901_ops }, - {"LSI 80227 10/100 BaseT PHY", 0x0016, 0xf840, &lsi_80227_ops }, - {"Broadcom BCM5221 10/100 BaseT PHY", 0x0040, 0x61e4, &bcm_5201_ops }, + {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0}, + {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0}, + {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1}, + {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0}, + {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0}, + {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0}, + {"Intel LXT971A Dual Speed PHY",0x0013,0x78e2, &lxt971a_ops,0}, + {"Kendin KS8995M 10/100 BaseT PHY",0x0022,0x1450, &ks8995m_ops,0}, + {"SMSC LAN83C185 10/100 BaseT PHY",0x0007,0xc0a3, &smsc_83C185_ops,0}, +#ifdef CONFIG_MIPS_BOSPORUS + {"Stub", 0x1234, 0x5678, &stub_ops }, +#endif {0,}, }; static int mdio_read(struct net_device *dev, int phy_id, int reg) { struct au1000_private *aup = (struct au1000_private *) dev->priv; + volatile u32 *mii_control_reg; + volatile u32 *mii_data_reg; u32 timedout = 20; u32 mii_control; - while (aup->mac->mii_control & MAC_MII_BUSY) { + #ifdef CONFIG_BCM5222_DUAL_PHY + /* First time we probe, it's for the mac0 phy. + * Since we haven't determined yet that we have a dual phy, + * aup->mii->mii_control_reg won't be setup and we'll + * default to the else statement. + * By the time we probe for the mac1 phy, the mii_control_reg + * will be setup to be the address of the mac0 phy control since + * both phys are controlled through mac0. + */ + if (aup->mii && aup->mii->mii_control_reg) { + mii_control_reg = aup->mii->mii_control_reg; + mii_data_reg = aup->mii->mii_data_reg; + } + else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + /* assume both phys are controlled through mac0 */ + mii_control_reg = au_macs[0]->mii->mii_control_reg; + mii_data_reg = au_macs[0]->mii->mii_data_reg; + } + else + #endif + { + /* default control and data reg addresses */ + mii_control_reg = &aup->mac->mii_control; + mii_data_reg = &aup->mac->mii_data; + } + + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { printk(KERN_ERR "%s: read_MII busy timeout!!\n", @@ -386,10 +843,10 @@ mii_control = MAC_SET_MII_SELECT_REG(reg) | MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_READ; - aup->mac->mii_control = mii_control; + *mii_control_reg = mii_control; timedout = 20; - while (aup->mac->mii_control & MAC_MII_BUSY) { + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { printk(KERN_ERR "%s: mdio_read busy timeout!!\n", @@ -397,16 +854,36 @@ return -1; } } - return (int)aup->mac->mii_data; + return (int)*mii_data_reg; } static void mdio_write(struct net_device *dev, int phy_id, int reg, u16 value) { struct au1000_private *aup = (struct au1000_private *) dev->priv; + volatile u32 *mii_control_reg; + volatile u32 *mii_data_reg; u32 timedout = 20; u32 mii_control; - while (aup->mac->mii_control & MAC_MII_BUSY) { + #ifdef CONFIG_BCM5222_DUAL_PHY + if (aup->mii && aup->mii->mii_control_reg) { + mii_control_reg = aup->mii->mii_control_reg; + mii_data_reg = aup->mii->mii_data_reg; + } + else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + /* assume both phys are controlled through mac0 */ + mii_control_reg = au_macs[0]->mii->mii_control_reg; + mii_data_reg = au_macs[0]->mii->mii_data_reg; + } + else + #endif + { + /* default control and data reg addresses */ + mii_control_reg = &aup->mac->mii_control; + mii_data_reg = &aup->mac->mii_data; + } + + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { printk(KERN_ERR "%s: mdio_write busy timeout!!\n", @@ -418,8 +895,8 @@ mii_control = MAC_SET_MII_SELECT_REG(reg) | MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_WRITE; - aup->mac->mii_data = value; - aup->mac->mii_control = mii_control; + *mii_data_reg = value; + *mii_control_reg = mii_control; } @@ -437,12 +914,13 @@ } } -static int __init mii_probe (struct net_device * dev) +static int mii_probe (struct net_device * dev) { struct au1000_private *aup = (struct au1000_private *) dev->priv; int phy_addr; - - aup->mii = NULL; +#ifdef CONFIG_MIPS_BOSPORUS + int phy_found=0; +#endif /* search for total of 32 possible mii phy addresses */ for (phy_addr = 0; phy_addr < 32; phy_addr++) { @@ -450,9 +928,17 @@ u16 phy_id0, phy_id1; int i; + #ifdef CONFIG_BCM5222_DUAL_PHY + /* Mask the already found phy, try next one */ + if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + if (au_macs[0]->phy_addr == phy_addr) + continue; + } + #endif + mii_status = mdio_read(dev, phy_addr, MII_STATUS); if (mii_status == 0xffff || mii_status == 0x0000) - /* the mii is not accessible, try next one */ + /* the mii is not accessable, try next one */ continue; phy_id0 = mdio_read(dev, phy_addr, MII_PHY_ID0); @@ -462,6 +948,66 @@ for (i = 0; mii_chip_table[i].phy_id1; i++) { if (phy_id0 == mii_chip_table[i].phy_id0 && phy_id1 == mii_chip_table[i].phy_id1) { + struct mii_phy * mii_phy = aup->mii; + + printk(KERN_INFO "%s: %s at phy address %d\n", + dev->name, mii_chip_table[i].name, + phy_addr); +#ifdef CONFIG_MIPS_BOSPORUS + phy_found = 1; +#endif + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + aup->want_autoneg = 1; + aup->phy_ops = mii_chip_table[i].phy_ops; + aup->phy_ops->phy_init(dev,phy_addr); + + // Check for dual-phy and then store required + // values and set indicators. We need to do + // this now since mdio_{read,write} need the + // control and data register addresses. + #ifdef CONFIG_BCM5222_DUAL_PHY + if ( mii_chip_table[i].dual_phy) { + + /* assume both phys are controlled + * through MAC0. Board specific? */ + + /* sanity check */ + if (!au_macs[0] || !au_macs[0]->mii) + return -1; + aup->mii->mii_control_reg = (u32 *) + &au_macs[0]->mac->mii_control; + aup->mii->mii_data_reg = (u32 *) + &au_macs[0]->mac->mii_data; + } + #endif + goto found; + } + } + } +found: + +#ifdef CONFIG_MIPS_BOSPORUS + /* This is a workaround for the Micrel/Kendin 5 port switch + The second MAC doesn't see a PHY connected... so we need to + trick it into thinking we have one. + + If this kernel is run on another Au1500 development board + the stub will be found as well as the actual PHY. However, + the last found PHY will be used... usually at Addr 31 (Db1500). + */ + if ( (!phy_found) ) + { + u16 phy_id0, phy_id1; + int i; + + phy_id0 = 0x1234; + phy_id1 = 0x5678; + + /* search our mii table for the current mii */ + for (i = 0; mii_chip_table[i].phy_id1; i++) { + if (phy_id0 == mii_chip_table[i].phy_id0 && + phy_id1 == mii_chip_table[i].phy_id1) { struct mii_phy * mii_phy; printk(KERN_INFO "%s: %s at phy address %d\n", @@ -471,31 +1017,39 @@ GFP_KERNEL); if (mii_phy) { mii_phy->chip_info = mii_chip_table+i; - mii_phy->phy_addr = phy_addr; + aup->phy_addr = phy_addr; mii_phy->next = aup->mii; aup->phy_ops = mii_chip_table[i].phy_ops; aup->mii = mii_phy; aup->phy_ops->phy_init(dev,phy_addr); } else { - printk(KERN_ERR "%s: out of memory\n", + printk(KERN_ERR "%s: out of memory\n", dev->name); return -1; } - /* the current mii is on our mii_info_table, - try next address */ + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + aup->phy_ops = mii_chip_table[i].phy_ops; + aup->phy_ops->phy_init(dev,phy_addr); break; } } } + if (aup->mac_id == 0) { + /* the Bosporus phy responds to addresses 0-5 but + * 5 is the correct one. + */ + aup->phy_addr = 5; + } +#endif - if (aup->mii == NULL) { - printk(KERN_ERR "%s: No MII transceivers found!\n", dev->name); + if (aup->mii->chip_info == NULL) { + printk(KERN_ERR "%s: Au1x No MII transceivers found!\n", + dev->name); return -1; } - /* use last PHY */ - aup->phy_addr = aup->mii->phy_addr; printk(KERN_INFO "%s: Using %s as default\n", dev->name, aup->mii->chip_info->name); @@ -516,7 +1070,6 @@ if (pDB) { aup->pDBfree = pDB->pnext; } - //printk("GetFreeDB: %x\n", pDB); return pDB; } @@ -528,35 +1081,6 @@ aup->pDBfree = pDB; } - -/* - DMA memory allocation, derived from pci_alloc_consistent. - However, the Au1000 data cache is coherent (when programmed - so), therefore we return KSEG0 address, not KSEG1. -*/ -static void *dma_alloc(size_t size, dma_addr_t * dma_handle) -{ - void *ret; - int gfp = GFP_ATOMIC | GFP_DMA; - - ret = (void *) __get_free_pages(gfp, get_order(size)); - - if (ret != NULL) { - memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); - ret = (void *)KSEG0ADDR(ret); - } - return ret; -} - - -static void dma_free(void *vaddr, size_t size) -{ - vaddr = (void *)KSEG0ADDR(vaddr); - free_pages((unsigned long) vaddr, get_order(size)); -} - - static void enable_rx_tx(struct net_device *dev) { struct au1000_private *aup = (struct au1000_private *) dev->priv; @@ -582,6 +1106,7 @@ static void reset_mac(struct net_device *dev) { + int i; u32 flags; struct au1000_private *aup = (struct au1000_private *) dev->priv; @@ -590,13 +1115,32 @@ dev->name, (unsigned)aup); spin_lock_irqsave(&aup->lock, flags); - del_timer(&aup->timer); + if (aup->timer.function == &au1000_timer) {/* check if timer initted */ + del_timer(&aup->timer); + } + hard_stop(dev); - *aup->enable = MAC_EN_CLOCK_ENABLE; - au_sync_delay(2); - *aup->enable = 0; - au_sync_delay(2); + #ifdef CONFIG_BCM5222_DUAL_PHY + if (aup->mac_id != 0) { + #endif + /* If BCM5222, we can't leave MAC0 in reset because then + * we can't access the dual phy for ETH1 */ + *aup->enable = MAC_EN_CLOCK_ENABLE; + au_sync_delay(2); + *aup->enable = 0; + au_sync_delay(2); + #ifdef CONFIG_BCM5222_DUAL_PHY + } + #endif aup->tx_full = 0; + for (i = 0; i < NUM_RX_DMA; i++) { + /* reset control bits */ + aup->rx_dma_ring[i]->buff_stat &= ~0xf; + } + for (i = 0; i < NUM_TX_DMA; i++) { + /* reset control bits */ + aup->tx_dma_ring[i]->buff_stat &= ~0xf; + } spin_unlock_irqrestore(&aup->lock, flags); } @@ -611,93 +1155,348 @@ { int i; - for (i=0; irx_dma_ring[i] = (volatile rx_dma_t *) (rx_base + sizeof(rx_dma_t)*i); } - for (i=0; itx_dma_ring[i] = (volatile tx_dma_t *) (tx_base + sizeof(tx_dma_t)*i); } } +static struct { + int port; + u32 base_addr; + u32 macen_addr; + int irq; + struct net_device *dev; +} iflist[2]; + +static int num_ifs; + +/* + * Setup the base address and interupt of the Au1xxx ethernet macs + * based on cpu type and whether the interface is enabled in sys_pinfunc + * register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0. + */ static int __init au1000_init_module(void) { - int i; - int prid; - int base_addr, irq; + struct cpuinfo_mips *c = ¤t_cpu_data; + int ni = (int)((au_readl(SYS_PINFUNC) & (u32)(SYS_PF_NI2)) >> 4); + struct net_device *dev; + int i, found_one = 0; - prid = read_c0_prid(); - for (i=0; icputype) { +#ifdef CONFIG_SOC_AU1000 + case CPU_AU1000: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1000_ETH0_BASE; + iflist[1].base_addr = AU1000_ETH1_BASE; + iflist[0].macen_addr = AU1000_MAC0_ENABLE; + iflist[1].macen_addr = AU1000_MAC1_ENABLE; + iflist[0].irq = AU1000_MAC0_DMA_INT; + iflist[1].irq = AU1000_MAC1_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1100 + case CPU_AU1100: + num_ifs = 1 - ni; + iflist[0].base_addr = AU1100_ETH0_BASE; + iflist[0].macen_addr = AU1100_MAC0_ENABLE; + iflist[0].irq = AU1100_MAC0_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1500 + case CPU_AU1500: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1500_ETH0_BASE; + iflist[1].base_addr = AU1500_ETH1_BASE; + iflist[0].macen_addr = AU1500_MAC0_ENABLE; + iflist[1].macen_addr = AU1500_MAC1_ENABLE; + iflist[0].irq = AU1500_MAC0_DMA_INT; + iflist[1].irq = AU1500_MAC1_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1550 + case CPU_AU1550: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1550_ETH0_BASE; + iflist[1].base_addr = AU1550_ETH1_BASE; + iflist[0].macen_addr = AU1550_MAC0_ENABLE; + iflist[1].macen_addr = AU1550_MAC1_ENABLE; + iflist[0].irq = AU1550_MAC0_DMA_INT; + iflist[1].irq = AU1550_MAC1_DMA_INT; + break; +#endif + default: + num_ifs = 0; + } + for(i = 0; i < num_ifs; i++) { + dev = au1000_probe(iflist[i].base_addr, iflist[i].irq, i); + iflist[i].dev = dev; + if (dev) + found_one++; + } + if (!found_one) + return -ENODEV; + return 0; +} + +static int au1000_setup_aneg(struct net_device *dev, u32 advertise) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 ctl, adv; + + /* Setup standard advertise */ + adv = mdio_read(dev, aup->phy_addr, MII_ADVERTISE); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); + if (advertise & ADVERTISED_10baseT_Half) + adv |= ADVERTISE_10HALF; + if (advertise & ADVERTISED_10baseT_Full) + adv |= ADVERTISE_10FULL; + if (advertise & ADVERTISED_100baseT_Half) + adv |= ADVERTISE_100HALF; + if (advertise & ADVERTISED_100baseT_Full) + adv |= ADVERTISE_100FULL; + mdio_write(dev, aup->phy_addr, MII_ADVERTISE, adv); + + /* Start/Restart aneg */ + ctl = mdio_read(dev, aup->phy_addr, MII_BMCR); + ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl); + + return 0; +} + +static int au1000_setup_forced(struct net_device *dev, int speed, int fd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 ctl; + + ctl = mdio_read(dev, aup->phy_addr, MII_BMCR); + ctl &= ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_ANENABLE); + + /* First reset the PHY */ + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl | BMCR_RESET); + + /* Select speed & duplex */ + switch (speed) { + case SPEED_10: + break; + case SPEED_100: + ctl |= BMCR_SPEED100; + break; + case SPEED_1000: + default: + return -EINVAL; + } + if (fd == DUPLEX_FULL) + ctl |= BMCR_FULLDPLX; + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl); + + return 0; +} + + +static void +au1000_start_link(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u32 advertise; + int autoneg; + int forced_speed; + int forced_duplex; + + /* Default advertise */ + advertise = GENMII_DEFAULT_ADVERTISE; + autoneg = aup->want_autoneg; + forced_speed = SPEED_100; + forced_duplex = DUPLEX_FULL; + + /* Setup link parameters */ + if (cmd) { + if (cmd->autoneg == AUTONEG_ENABLE) { + advertise = cmd->advertising; + autoneg = 1; } else { - printk(KERN_ERR "au1000 eth: unknown Processor ID\n"); - return -ENODEV; - } - // check for valid entries, au1100 only has one entry - if (base_addr && irq) { - if (au1000_probe1(base_addr, irq, i) != 0) - return -ENODEV; + autoneg = 0; + + forced_speed = cmd->speed; + forced_duplex = cmd->duplex; } } + + /* Configure PHY & start aneg */ + aup->want_autoneg = autoneg; + if (autoneg) + au1000_setup_aneg(dev, advertise); + else + au1000_setup_forced(dev, forced_speed, forced_duplex); + mod_timer(&aup->timer, jiffies + HZ); +} + +static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 link, speed; + + cmd->supported = GENMII_DEFAULT_FEATURES; + cmd->advertising = GENMII_DEFAULT_ADVERTISE; + cmd->port = PORT_MII; + cmd->transceiver = XCVR_EXTERNAL; + cmd->phy_address = aup->phy_addr; + spin_lock_irq(&aup->lock); + cmd->autoneg = aup->want_autoneg; + aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed); + if ((speed == IF_PORT_100BASETX) || (speed == IF_PORT_100BASEFX)) + cmd->speed = SPEED_100; + else if (speed == IF_PORT_10BASET) + cmd->speed = SPEED_10; + if (link && (dev->if_port == IF_PORT_100BASEFX)) + cmd->duplex = DUPLEX_FULL; + else + cmd->duplex = DUPLEX_HALF; + spin_unlock_irq(&aup->lock); return 0; } -static int __init -au1000_probe1(long ioaddr, int irq, int port_num) +static int au1000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + unsigned long features = GENMII_DEFAULT_FEATURES; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (cmd->autoneg != AUTONEG_ENABLE && cmd->autoneg != AUTONEG_DISABLE) + return -EINVAL; + if (cmd->autoneg == AUTONEG_ENABLE && cmd->advertising == 0) + return -EINVAL; + if (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL) + return -EINVAL; + if (cmd->autoneg == AUTONEG_DISABLE) + switch (cmd->speed) { + case SPEED_10: + if (cmd->duplex == DUPLEX_HALF && + (features & SUPPORTED_10baseT_Half) == 0) + return -EINVAL; + if (cmd->duplex == DUPLEX_FULL && + (features & SUPPORTED_10baseT_Full) == 0) + return -EINVAL; + break; + case SPEED_100: + if (cmd->duplex == DUPLEX_HALF && + (features & SUPPORTED_100baseT_Half) == 0) + return -EINVAL; + if (cmd->duplex == DUPLEX_FULL && + (features & SUPPORTED_100baseT_Full) == 0) + return -EINVAL; + break; + default: + return -EINVAL; + } + else if ((features & SUPPORTED_Autoneg) == 0) + return -EINVAL; + + spin_lock_irq(&aup->lock); + au1000_start_link(dev, cmd); + spin_unlock_irq(&aup->lock); + return 0; +} + +static int au1000_nway_reset(struct net_device *dev) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + + if (!aup->want_autoneg) + return -EINVAL; + spin_lock_irq(&aup->lock); + au1000_start_link(dev, NULL); + spin_unlock_irq(&aup->lock); + return 0; +} + +static void +au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + + strcpy(info->driver, DRV_NAME); + strcpy(info->version, DRV_VERSION); + info->fw_version[0] = '\0'; + sprintf(info->bus_info, "%s %d", DRV_NAME, aup->mac_id); + info->regdump_len = 0; +} + +static u32 au1000_get_link(struct net_device *dev) +{ + return netif_carrier_ok(dev); +} + +static struct ethtool_ops au1000_ethtool_ops = { + .get_settings = au1000_get_settings, + .set_settings = au1000_set_settings, + .get_drvinfo = au1000_get_drvinfo, + .nway_reset = au1000_nway_reset, + .get_link = au1000_get_link +}; + +static struct net_device * +au1000_probe(u32 ioaddr, int irq, int port_num) { - struct net_device *dev; static unsigned version_printed = 0; struct au1000_private *aup = NULL; - int i, retval = 0; + struct net_device *dev = NULL; db_dest_t *pDB, *pDBfree; char *pmac, *argptr; char ethaddr[6]; + int i, err; - if (!request_region(PHYSADDR(ioaddr), MAC_IOSIZE, "Au1000 ENET")) - return -ENODEV; + if (!request_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE, "Au1x00 ENET")) + return NULL; - if (version_printed++ == 0) - printk(version); - - retval = -ENOMEM; + if (version_printed++ == 0) + printk("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR); dev = alloc_etherdev(sizeof(struct au1000_private)); if (!dev) { printk (KERN_ERR "au1000 eth: alloc_etherdev failed\n"); - goto out; + return NULL; } - SET_MODULE_OWNER(dev); + if ((err = register_netdev(dev))) { + printk(KERN_ERR "Au1x_eth Cannot register net device err %d\n", + err); + free_netdev(dev); + return NULL; + } - printk("%s: Au1xxx ethernet found at 0x%lx, irq %d\n", - dev->name, ioaddr, irq); + printk("%s: Au1x Ethernet found at 0x%x, irq %d\n", + dev->name, ioaddr, irq); aup = dev->priv; /* Allocate the data buffers */ - aup->vaddr = (u32)dma_alloc(MAX_BUF_SIZE * - (NUM_TX_BUFFS+NUM_RX_BUFFS), &aup->dma_addr); - if (!aup->vaddr) - goto out1; + /* Snooping works fine with eth on all au1xxx */ + aup->vaddr = (u32)dma_alloc_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + &aup->dma_addr, + 0); + if (!aup->vaddr) { + free_netdev(dev); + release_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE); + return NULL; + } /* aup->mac is the base address of the MAC's registers */ aup->mac = (volatile mac_reg_t *)((unsigned long)ioaddr); /* Setup some variables for quick register address access */ - switch (ioaddr) { - case AU1000_ETH0_BASE: - case AU1500_ETH0_BASE: + if (ioaddr == iflist[0].base_addr) + { /* check env variables first */ if (!get_ethernet_addr(ethaddr)) { - memcpy(au1000_mac_addr, ethaddr, sizeof(dev->dev_addr)); + memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); } else { /* Check command line */ argptr = prom_getcmdline(); @@ -708,38 +1507,32 @@ } else { str2eaddr(ethaddr, pmac + strlen("ethaddr=")); memcpy(au1000_mac_addr, ethaddr, - sizeof(dev->dev_addr)); + sizeof(au1000_mac_addr)); } } - if (ioaddr == AU1000_ETH0_BASE) - aup->enable = (volatile u32 *) - ((unsigned long)AU1000_MAC0_ENABLE); - else aup->enable = (volatile u32 *) - ((unsigned long)AU1500_MAC0_ENABLE); - memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr)); + ((unsigned long)iflist[0].macen_addr); + memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); - break; - case AU1000_ETH1_BASE: - case AU1500_ETH1_BASE: - if (ioaddr == AU1000_ETH1_BASE) - aup->enable = (volatile u32 *) - ((unsigned long)AU1000_MAC1_ENABLE); + aup->mac_id = 0; + au_macs[0] = aup; + } else + if (ioaddr == iflist[1].base_addr) + { aup->enable = (volatile u32 *) - ((unsigned long)AU1500_MAC1_ENABLE); - memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr)); + ((unsigned long)iflist[1].macen_addr); + memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); dev->dev_addr[4] += 0x10; setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR); - break; - default: + aup->mac_id = 1; + au_macs[1] = aup; + } + else + { printk(KERN_ERR "%s: bad ioaddr\n", dev->name); - break; - } - aup->phy_addr = PHY_ADDRESS; - /* bring the device out of reset, otherwise probing the mii * will hang */ *aup->enable = MAC_EN_CLOCK_ENABLE; @@ -748,15 +1541,22 @@ MAC_EN_RESET2 | MAC_EN_CLOCK_ENABLE; au_sync_delay(2); - retval = mii_probe(dev); - if (retval) - goto out2; + aup->mii = kmalloc(sizeof(struct mii_phy), GFP_KERNEL); + if (!aup->mii) { + printk(KERN_ERR "%s: out of memory\n", dev->name); + goto err_out; + } + aup->mii->mii_control_reg = 0; + aup->mii->mii_data_reg = 0; + + if (mii_probe(dev) != 0) { + goto err_out; + } - retval = -EINVAL; pDBfree = NULL; /* setup the data buffer descriptors and attach a buffer to each one */ pDB = aup->db; - for (i=0; i<(NUM_TX_BUFFS+NUM_RX_BUFFS); i++) { + for (i = 0; i < (NUM_TX_BUFFS+NUM_RX_BUFFS); i++) { pDB->pnext = pDBfree; pDBfree = pDB; pDB->vaddr = (u32 *)((unsigned)aup->vaddr + MAX_BUF_SIZE*i); @@ -765,15 +1565,19 @@ } aup->pDBfree = pDBfree; - for (i=0; irx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr; aup->rx_db_inuse[i] = pDB; } - for (i=0; itx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr; aup->tx_dma_ring[i]->len = 0; aup->tx_db_inuse[i] = pDB; @@ -788,6 +1592,7 @@ dev->get_stats = au1000_get_stats; dev->set_multicast_list = &set_rx_mode; dev->do_ioctl = &au1000_ioctl; + SET_ETHTOOL_OPS(dev, &au1000_ethtool_ops); dev->set_config = &au1000_set_config; dev->tx_timeout = au1000_tx_timeout; dev->watchdog_timeo = ETH_TX_TIMEOUT; @@ -798,23 +1603,32 @@ */ reset_mac(dev); - retval = register_netdev(dev); - if (retval) - goto out2; - return 0; + return dev; -out2: - dma_free(aup->vaddr, MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS)); -out1: +err_out: + /* here we should have a valid dev plus aup-> register addresses + * so we can reset the mac properly.*/ + reset_mac(dev); + if (aup->mii) + kfree(aup->mii); + for (i = 0; i < NUM_RX_DMA; i++) { + if (aup->rx_db_inuse[i]) + ReleaseDB(aup, aup->rx_db_inuse[i]); + } + for (i = 0; i < NUM_TX_DMA; i++) { + if (aup->tx_db_inuse[i]) + ReleaseDB(aup, aup->tx_db_inuse[i]); + } + dma_free_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + (void *)aup->vaddr, + aup->dma_addr); + unregister_netdev(dev); free_netdev(dev); -out: - release_region(PHYSADDR(ioaddr), MAC_IOSIZE); - printk(KERN_ERR "%s: au1000_probe1 failed. Returns %d\n", - dev->name, retval); - return retval; + release_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE); + return NULL; } - /* * Initialize the interface. * @@ -832,7 +1646,8 @@ u32 control; u16 link, speed; - if (au1000_debug > 4) printk("%s: au1000_init\n", dev->name); + if (au1000_debug > 4) + printk("%s: au1000_init\n", dev->name); spin_lock_irqsave(&aup->lock, flags); @@ -852,7 +1667,7 @@ aup->mac->mac_addr_low = dev->dev_addr[3]<<24 | dev->dev_addr[2]<<16 | dev->dev_addr[1]<<8 | dev->dev_addr[0]; - for (i=0; irx_dma_ring[i]->buff_stat |= RX_DMA_ENABLE; } au_sync(); @@ -865,7 +1680,13 @@ if (link && (dev->if_port == IF_PORT_100BASEFX)) { control |= MAC_FULL_DUPLEX; } + + /* fix for startup without cable */ + if (!link) + dev->flags &= ~IFF_RUNNING; + aup->mac->control = control; + aup->mac->vlan1_tag = 0x8100; /* activate vlan support */ au_sync(); spin_unlock_irqrestore(&aup->lock, flags); @@ -949,6 +1770,7 @@ return retval; } + init_timer(&aup->timer); /* used in ioctl() */ aup->timer.expires = RUN_AT((3*HZ)); aup->timer.data = (unsigned long)dev; aup->timer.function = &au1000_timer; /* timer handler */ @@ -968,22 +1790,49 @@ if (au1000_debug > 4) printk("%s: close: dev=%p\n", dev->name, dev); + reset_mac(dev); + spin_lock_irqsave(&aup->lock, flags); /* stop the device */ - if (netif_device_present(dev)) - netif_stop_queue(dev); + netif_stop_queue(dev); /* disable the interrupt */ free_irq(dev->irq, dev); spin_unlock_irqrestore(&aup->lock, flags); - reset_mac(dev); return 0; } static void __exit au1000_cleanup_module(void) { + int i, j; + struct net_device *dev; + struct au1000_private *aup; + + for (i = 0; i < num_ifs; i++) { + dev = iflist[i].dev; + if (dev) { + aup = (struct au1000_private *) dev->priv; + unregister_netdev(dev); + if (aup->mii) + kfree(aup->mii); + for (j = 0; j < NUM_RX_DMA; j++) { + if (aup->rx_db_inuse[j]) + ReleaseDB(aup, aup->rx_db_inuse[j]); + } + for (j = 0; j < NUM_TX_DMA; j++) { + if (aup->tx_db_inuse[j]) + ReleaseDB(aup, aup->tx_db_inuse[j]); + } + dma_free_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + (void *)aup->vaddr, + aup->dma_addr); + free_netdev(dev); + release_mem_region(CPHYSADDR(iflist[i].base_addr), MAC_IOSIZE); + } + } } @@ -1028,9 +1877,8 @@ ptxd = aup->tx_dma_ring[aup->tx_tail]; while (ptxd->buff_stat & TX_T_DONE) { - update_tx_stats(dev, ptxd->status, aup->tx_len[aup->tx_tail] & 0x3ff); + update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); ptxd->buff_stat &= ~TX_T_DONE; - aup->tx_len[aup->tx_tail] = 0; ptxd->len = 0; au_sync(); @@ -1056,7 +1904,7 @@ db_dest_t *pDB; int i; - if (au1000_debug > 4) + if (au1000_debug > 5) printk("%s: tx: aup %x len=%d, data=%p, head %d\n", dev->name, (unsigned)aup, skb->len, skb->data, aup->tx_head); @@ -1070,8 +1918,7 @@ return 1; } else if (buff_stat & TX_T_DONE) { - update_tx_stats(dev, ptxd->status, aup->tx_len[aup->tx_head] & 0x3ff); - aup->tx_len[aup->tx_head] = 0; + update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); ptxd->len = 0; } @@ -1082,17 +1929,15 @@ pDB = aup->tx_db_inuse[aup->tx_head]; memcpy((void *)pDB->vaddr, skb->data, skb->len); - if (skb->len < MAC_MIN_PKT_SIZE) { - for (i=skb->len; ilen < ETH_ZLEN) { + for (i=skb->len; ivaddr)[i] = 0; } - aup->tx_len[aup->tx_head] = MAC_MIN_PKT_SIZE; - ptxd->len = MAC_MIN_PKT_SIZE; + ptxd->len = ETH_ZLEN; } - else { - aup->tx_len[aup->tx_head] = skb->len; + else ptxd->len = skb->len; - } + ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE; au_sync(); dev_kfree_skb(skb); @@ -1137,8 +1982,9 @@ volatile rx_dma_t *prxd; u32 buff_stat, status; db_dest_t *pDB; + u32 frmlen; - if (au1000_debug > 4) + if (au1000_debug > 5) printk("%s: au1000_rx head %d\n", dev->name, aup->rx_head); prxd = aup->rx_dma_ring[aup->rx_head]; @@ -1150,7 +1996,9 @@ if (!(status & RX_ERROR)) { /* good frame */ - skb = dev_alloc_skb((status & RX_FRAME_LEN_MASK) + 2); + frmlen = (status & RX_FRAME_LEN_MASK); + frmlen -= 4; /* Remove FCS */ + skb = dev_alloc_skb(frmlen + 2); if (skb == NULL) { printk(KERN_ERR "%s: Memory squeeze, dropping packet.\n", @@ -1160,9 +2008,9 @@ } skb->dev = dev; skb_reserve(skb, 2); /* 16 byte IP header align */ - eth_copy_and_sum(skb, (unsigned char *)pDB->vaddr, - status & RX_FRAME_LEN_MASK, 0); - skb_put(skb, status & RX_FRAME_LEN_MASK); + eth_copy_and_sum(skb, + (unsigned char *)pDB->vaddr, frmlen, 0); + skb_put(skb, frmlen); skb->protocol = eth_type_trans(skb, dev); netif_rx(skb); /* pass the packet to upper layers */ } @@ -1206,17 +2054,20 @@ /* * Au1000 interrupt service routine. */ -irqreturn_t au1000_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t au1000_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; if (dev == NULL) { printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name); - return IRQ_NONE; + return IRQ_RETVAL(1); } - au1000_tx_ack(dev); + + /* Handle RX interrupts first to minimize chance of overrun */ + au1000_rx(dev); - return IRQ_HANDLED; + au1000_tx_ack(dev); + return IRQ_RETVAL(1); } @@ -1233,6 +2084,23 @@ netif_wake_queue(dev); } + +static unsigned const ethernet_polynomial = 0x04c11db7U; +static inline u32 ether_crc(int length, unsigned char *data) +{ + int crc = -1; + + while(--length >= 0) { + unsigned char current_octet = *data++; + int bit; + for (bit = 0; bit < 8; bit++, current_octet >>= 1) + crc = (crc << 1) ^ + ((crc < 0) ^ (current_octet & 1) ? + ethernet_polynomial : 0); + } + return crc; +} + static void set_rx_mode(struct net_device *dev) { struct au1000_private *aup = (struct au1000_private *) dev->priv; @@ -1256,8 +2124,8 @@ mc_filter[1] = mc_filter[0] = 0; for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; i++, mclist = mclist->next) { - set_bit(ether_crc_le(ETH_ALEN, mclist->dmi_addr)>>26, - mc_filter); + set_bit(ether_crc(ETH_ALEN, mclist->dmi_addr)>>26, + (long *)mc_filter); } aup->mac->multi_hash_high = mc_filter[1]; aup->mac->multi_hash_low = mc_filter[0]; @@ -1269,28 +2137,28 @@ static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { + struct au1000_private *aup = (struct au1000_private *)dev->priv; u16 *data = (u16 *)&rq->ifr_ifru; - /* fixme */ switch(cmd) { - case SIOCGMIIPHY: /* Get the address of the PHY in use. */ - data[0] = PHY_ADDRESS; - return 0; - - case SIOCGMIIREG: /* Read the specified MII register. */ - //data[3] = mdio_read(ioaddr, data[0], data[1]); - return 0; - - case SIOCSMIIREG: /* Write the specified MII register */ - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - - //mdio_write(ioaddr, data[0], data[1], data[2]); - return 0; - - default: - return -EOPNOTSUPP; + case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */ + case SIOCGMIIPHY: + if (!netif_running(dev)) return -EINVAL; + data[0] = aup->phy_addr; + case SIOCDEVPRIVATE+1: /* Read the specified MII register. */ + case SIOCGMIIREG: + data[3] = mdio_read(dev, data[0], data[1]); + return 0; + case SIOCDEVPRIVATE+2: /* Write the specified MII register */ + case SIOCSMIIREG: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + mdio_write(dev, data[0], data[1],data[2]); + return 0; + default: + return -EOPNOTSUPP; } + } @@ -1352,7 +2220,6 @@ /* set Speed to 100Mbps, Half Duplex */ /* disable auto negotiation and enable 100MBit Mode */ control = mdio_read(dev, aup->phy_addr, MII_CONTROL); - printk("read control %x\n", control); control &= ~(MII_CNTL_AUTO | MII_CNTL_FDX); control |= MII_CNTL_F100; mdio_write(dev, aup->phy_addr, MII_CONTROL, control); diff -Nru a/drivers/net/au1000_eth.h b/drivers/net/au1000_eth.h --- a/drivers/net/au1000_eth.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/au1000_eth.h 2005-03-07 14:54:16 -08:00 @@ -1,10 +1,13 @@ /* - * Alchemy Semi Au1000 ethernet driver include file + * + * Alchemy Au1x00 ethernet driver include file * * Author: Pete Popov * * Copyright 2001 MontaVista Software Inc. * + * ######################################################################## + * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. @@ -17,14 +20,16 @@ * 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 -#define NUM_INTERFACES 2 #define MAC_IOSIZE 0x10000 -#define NUM_RX_DMA 4 /* Au1000 has 4 rx hardware descriptors */ -#define NUM_TX_DMA 4 /* Au1000 has 4 tx hardware descriptors */ +#define NUM_RX_DMA 4 /* Au1x00 has 4 rx hardware descriptors */ +#define NUM_TX_DMA 4 /* Au1x00 has 4 tx hardware descriptors */ #define NUM_RX_BUFFS 4 #define NUM_TX_BUFFS 4 @@ -33,12 +38,6 @@ #define ETH_TX_TIMEOUT HZ/4 #define MAC_MIN_PKT_SIZE 64 -#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1100) -#define PHY_ADDRESS 0 -#define PHY_CONTROL_DEFAULT 0x3000 -#define PHY_CONTROL_REG_ADDR 0 -#endif - #define MULTICAST_FILTER_LIMIT 64 /* FIXME @@ -54,11 +53,13 @@ #define MII_ANLPAR 0x0005 #define MII_AEXP 0x0006 #define MII_ANEXT 0x0007 -#define MII_LSI_CONFIG 0x0011 -#define MII_LSI_STAT 0x0012 -#define MII_AUX_CNTRL 0x0018 -#define MII_INT 0x001A +#define MII_LSI_PHY_CONFIG 0x0011 +/* Status register */ +#define MII_LSI_PHY_STAT 0x0012 +#define MII_AMD_PHY_STAT MII_LSI_PHY_STAT +#define MII_INTEL_PHY_STAT 0x0011 +#define MII_AUX_CNTRL 0x0018 /* mii registers specific to AMD 79C901 */ #define MII_STATUS_SUMMARY = 0x0018 @@ -121,23 +122,30 @@ #define MII_STSSUM_AUTO 0x0002 #define MII_STSSUM_SPD 0x0001 -/* lsi status register */ - -#define MII_LSI_STAT_FDX 0x0040 -#define MII_LSI_STAT_SPD 0x0080 +/* lsi phy status register */ +#define MII_LSI_PHY_STAT_FDX 0x0040 +#define MII_LSI_PHY_STAT_SPD 0x0080 + +/* amd phy status register */ +#define MII_AMD_PHY_STAT_FDX 0x0800 +#define MII_AMD_PHY_STAT_SPD 0x0400 + +/* intel phy status register */ +#define MII_INTEL_PHY_STAT_FDX 0x0200 +#define MII_INTEL_PHY_STAT_SPD 0x4000 /* Auxilliary Control/Status Register */ #define MII_AUX_FDX 0x0001 #define MII_AUX_100 0x0002 #define MII_AUX_F100 0x0004 #define MII_AUX_ANEG 0x0008 -#define MII_FDX_LED 0x8000 typedef struct mii_phy { struct mii_phy * next; struct mii_chip_info * chip_info; - int phy_addr; u16 status; + u32 *mii_control_reg; + u32 *mii_data_reg; } mii_phy_t; struct phy_ops { @@ -197,7 +205,6 @@ db_dest_t db[NUM_RX_BUFFS+NUM_TX_BUFFS]; volatile rx_dma_t *rx_dma_ring[NUM_RX_DMA]; volatile tx_dma_t *tx_dma_ring[NUM_TX_DMA]; - int tx_len[NUM_TX_DMA]; db_dest_t *rx_db_inuse[NUM_RX_DMA]; db_dest_t *tx_db_inuse[NUM_TX_DMA]; u32 rx_head; @@ -205,6 +212,7 @@ u32 tx_tail; u32 tx_full; + int mac_id; mii_phy_t *mii; struct phy_ops *phy_ops; @@ -218,9 +226,10 @@ u8 *hash_table; u32 hash_mode; u32 intr_work_done; /* number of Rx and Tx pkts processed in the isr */ - u32 phy_addr; /* PHY address */ + int phy_addr; /* phy address */ u32 options; /* User-settable misc. driver options. */ u32 drv_flags; + int want_autoneg; struct net_device_stats stats; struct timer_list timer; spinlock_t lock; /* Serialise access to device */ diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c --- a/drivers/net/b44.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/b44.c 2005-03-07 14:54:17 -08:00 @@ -1903,7 +1903,7 @@ } } -static int b44_suspend(struct pci_dev *pdev, u32 state) +static int b44_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct b44 *bp = netdev_priv(dev); diff -Nru a/drivers/net/b44.h b/drivers/net/b44.h --- a/drivers/net/b44.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/b44.h 2005-03-07 14:54:17 -08:00 @@ -302,20 +302,6 @@ #define B44_MII_TLEDCTRL 27 /* Traffic Meter LED */ #define MII_TLEDCTRL_ENABLE 0x0040 -/* XXX Add this to mii.h */ -#ifndef ADVERTISE_PAUSE -#define ADVERTISE_PAUSE_CAP 0x0400 -#endif -#ifndef ADVERTISE_PAUSE_ASYM -#define ADVERTISE_PAUSE_ASYM 0x0800 -#endif -#ifndef LPA_PAUSE -#define LPA_PAUSE_CAP 0x0400 -#endif -#ifndef LPA_PAUSE_ASYM -#define LPA_PAUSE_ASYM 0x0800 -#endif - struct dma_desc { u32 ctrl; u32 addr; diff -Nru a/drivers/net/bagetlance.c b/drivers/net/bagetlance.c --- a/drivers/net/bagetlance.c 2005-03-07 14:54:16 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,1368 +0,0 @@ -/* - * bagetlance.c: Ethernet driver for VME Lance cards on Baget/MIPS - * This code stealed and adopted from linux/drivers/net/atarilance.c - * See that for author info - * - * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov - */ - -/* - * Driver code for Baget/Lance taken from atarilance.c, which also - * works well in case of Besta. Most significant changes made here - * related with 16BIT-only access to A24 space. - */ - -static char *version = "bagetlance.c: v1.1 11/10/98\n"; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define BAGET_LANCE_IRQ BAGET_IRQ_MASK(0xdf) - -/* - * Define following if you don't need 16BIT-only access to Lance memory - * (Normally BAGET needs it) - */ -#undef NORMAL_MEM_ACCESS - -/* Debug level: - * 0 = silent, print only serious errors - * 1 = normal, print error messages - * 2 = debug, print debug infos - * 3 = debug, print even more debug infos (packet data) - */ - -#define LANCE_DEBUG 1 - -#ifdef LANCE_DEBUG -static int lance_debug = LANCE_DEBUG; -#else -static int lance_debug = 1; -#endif -MODULE_PARM(lance_debug, "i"); -MODULE_PARM_DESC(lance_debug, "Lance debug level (0-3)"); -MODULE_LICENSE("GPL"); - -/* Print debug messages on probing? */ -#undef LANCE_DEBUG_PROBE - -#define DPRINTK(n,a) \ - do { \ - if (lance_debug >= n) \ - printk a; \ - } while( 0 ) - -#ifdef LANCE_DEBUG_PROBE -# define PROBE_PRINT(a) printk a -#else -# define PROBE_PRINT(a) -#endif - -/* These define the number of Rx and Tx buffers as log2. (Only powers - * of two are valid) - * Much more rx buffers (32) are reserved than tx buffers (8), since receiving - * is more time critical then sending and packets may have to remain in the - * board's memory when main memory is low. - */ - -/* Baget Lance has 64K on-board memory, so it looks we can't increase - buffer quantity (40*1.5K is about 64K) */ - -#define TX_LOG_RING_SIZE 3 -#define RX_LOG_RING_SIZE 5 - -/* These are the derived values */ - -#define TX_RING_SIZE (1 << TX_LOG_RING_SIZE) -#define TX_RING_LEN_BITS (TX_LOG_RING_SIZE << 5) -#define TX_RING_MOD_MASK (TX_RING_SIZE - 1) - -#define RX_RING_SIZE (1 << RX_LOG_RING_SIZE) -#define RX_RING_LEN_BITS (RX_LOG_RING_SIZE << 5) -#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) - -/* The LANCE Rx and Tx ring descriptors. */ -struct lance_rx_head { - volatile unsigned short base; /* Low word of base addr */ -#ifdef NORMAL_MEM_ACCESS - /* Following two fields are joined into one short to guarantee - 16BIT access to Baget lance registers */ - volatile unsigned char flag; - unsigned char base_hi; /* High word of base addr (unused) */ -#else -/* Following macros are used as replecements to 8BIT fields */ -#define GET_FLAG(h) (((h)->flag_base_hi >> 8) & 0xff) -#define SET_FLAG(h,f) (h)->flag_base_hi = ((h)->flag_base_hi & 0xff) | \ - (((unsigned)(f)) << 8) - volatile unsigned short flag_base_hi; -#endif - volatile short buf_length; /* This length is 2s complement! */ - volatile short msg_length; /* This length is "normal". */ -}; - - -struct lance_tx_head { - volatile unsigned short base; /* Low word of base addr */ -#ifdef NORMAL_MEM_ACCESS -/* See comments above about 8BIT-access Baget A24-space problems */ - volatile unsigned char flag; - unsigned char base_hi; /* High word of base addr (unused) */ -#else - volatile unsigned short flag_base_hi; -#endif - volatile short length; /* Length is 2s complement! */ - volatile short misc; -}; - -struct ringdesc { - volatile unsigned short adr_lo; /* Low 16 bits of address */ -#ifdef NORMAL_MEM_ACCESS -/* See comments above about 8BIT-access Bage A24-space problems */ - unsigned char len; /* Length bits */ - unsigned char adr_hi; /* High 8 bits of address (unused) */ -#else - volatile unsigned short len_adr_hi; -#endif -}; - -/* The LANCE initialization block, described in databook. */ -struct lance_init_block { - unsigned short mode; /* Pre-set mode */ - unsigned char hwaddr[6]; /* Physical ethernet address */ - unsigned filter[2]; /* Multicast filter (unused). */ - /* Receive and transmit ring base, along with length bits. */ - struct ringdesc rx_ring; - struct ringdesc tx_ring; -}; - -/* The whole layout of the Lance shared memory */ -struct lance_memory { - struct lance_init_block init; - struct lance_tx_head tx_head[TX_RING_SIZE]; - struct lance_rx_head rx_head[RX_RING_SIZE]; - char packet_area[0]; /* packet data follow after the - * init block and the ring - * descriptors and are located - * at runtime */ -}; - -/* RieblCard specifics: - * The original TOS driver for these cards reserves the area from offset - * 0xee70 to 0xeebb for storing configuration data. Of interest to us is the - * Ethernet address there, and the magic for verifying the data's validity. - * The reserved area isn't touch by packet buffers. Furthermore, offset 0xfffe - * is reserved for the interrupt vector number. - */ -#define RIEBL_RSVD_START 0xee70 -#define RIEBL_RSVD_END 0xeec0 -#define RIEBL_MAGIC 0x09051990 -#define RIEBL_MAGIC_ADDR ((unsigned long *)(((char *)MEM) + 0xee8a)) -#define RIEBL_HWADDR_ADDR ((unsigned char *)(((char *)MEM) + 0xee8e)) -#define RIEBL_IVEC_ADDR ((unsigned short *)(((char *)MEM) + 0xfffe)) - -/* This is a default address for the old RieblCards without a battery - * that have no ethernet address at boot time. 00:00:36:04 is the - * prefix for Riebl cards, the 00:00 at the end is arbitrary. - */ - -static unsigned char OldRieblDefHwaddr[6] = { - 0x00, 0x00, 0x36, 0x04, 0x00, 0x00 -}; - -/* I/O registers of the Lance chip */ - -struct lance_ioreg { -/* base+0x0 */ volatile unsigned short data; -/* base+0x2 */ volatile unsigned short addr; - unsigned char _dummy1[3]; -/* base+0x7 */ volatile unsigned char ivec; - unsigned char _dummy2[5]; -/* base+0xd */ volatile unsigned char eeprom; - unsigned char _dummy3; -/* base+0xf */ volatile unsigned char mem; -}; - -/* Types of boards this driver supports */ - -enum lance_type { - OLD_RIEBL, /* old Riebl card without battery */ - NEW_RIEBL, /* new Riebl card with battery */ - PAM_CARD /* PAM card with EEPROM */ -}; - -static char *lance_names[] = { - "Riebl-Card (without battery)", - "Riebl-Card (with battery)", - "PAM intern card" -}; - -/* The driver's private device structure */ - -struct lance_private { - enum lance_type cardtype; - struct lance_ioreg *iobase; - struct lance_memory *mem; - int cur_rx, cur_tx; /* The next free ring entry */ - int dirty_tx; /* Ring entries to be freed. */ - /* copy function */ - void *(*memcpy_f)( void *, const void *, size_t ); - struct net_device_stats stats; -/* These two must be longs for set_bit() */ - long tx_full; - long lock; -}; - -/* I/O register access macros */ - -#define MEM lp->mem -#define DREG IO->data -#define AREG IO->addr -#define REGA(a) ( AREG = (a), DREG ) - -/* Definitions for packet buffer access: */ -#define PKT_BUF_SZ 1544 -/* Get the address of a packet buffer corresponding to a given buffer head */ -#define PKTBUF_ADDR(head) (((unsigned char *)(MEM)) + (head)->base) - -/* Possible memory/IO addresses for probing */ - -struct lance_addr { - unsigned long memaddr; - unsigned long ioaddr; - int slow_flag; -} lance_addr_list[] = { - { BAGET_LANCE_MEM_BASE, BAGET_LANCE_IO_BASE, 1 } /* Baget Lance */ -}; - -#define N_LANCE_ADDR (sizeof(lance_addr_list)/sizeof(*lance_addr_list)) - - -#define LANCE_HI_BASE (0xff & (BAGET_LANCE_MEM_BASE >> 16)) - -/* Definitions for the Lance */ - -/* tx_head flags */ -#define TMD1_ENP 0x01 /* end of packet */ -#define TMD1_STP 0x02 /* start of packet */ -#define TMD1_DEF 0x04 /* deferred */ -#define TMD1_ONE 0x08 /* one retry needed */ -#define TMD1_MORE 0x10 /* more than one retry needed */ -#define TMD1_ERR 0x40 /* error summary */ -#define TMD1_OWN 0x80 /* ownership (set: chip owns) */ - -#define TMD1_OWN_CHIP TMD1_OWN -#define TMD1_OWN_HOST 0 - -/* tx_head misc field */ -#define TMD3_TDR 0x03FF /* Time Domain Reflectometry counter */ -#define TMD3_RTRY 0x0400 /* failed after 16 retries */ -#define TMD3_LCAR 0x0800 /* carrier lost */ -#define TMD3_LCOL 0x1000 /* late collision */ -#define TMD3_UFLO 0x4000 /* underflow (late memory) */ -#define TMD3_BUFF 0x8000 /* buffering error (no ENP) */ - -/* rx_head flags */ -#define RMD1_ENP 0x01 /* end of packet */ -#define RMD1_STP 0x02 /* start of packet */ -#define RMD1_BUFF 0x04 /* buffer error */ -#define RMD1_CRC 0x08 /* CRC error */ -#define RMD1_OFLO 0x10 /* overflow */ -#define RMD1_FRAM 0x20 /* framing error */ -#define RMD1_ERR 0x40 /* error summary */ -#define RMD1_OWN 0x80 /* ownership (set: ship owns) */ - -#define RMD1_OWN_CHIP RMD1_OWN -#define RMD1_OWN_HOST 0 - -/* register names */ -#define CSR0 0 /* mode/status */ -#define CSR1 1 /* init block addr (low) */ -#define CSR2 2 /* init block addr (high) */ -#define CSR3 3 /* misc */ -#define CSR8 8 /* address filter */ -#define CSR15 15 /* promiscuous mode */ - -/* CSR0 */ -/* (R=readable, W=writeable, S=set on write, C=clear on write) */ -#define CSR0_INIT 0x0001 /* initialize (RS) */ -#define CSR0_STRT 0x0002 /* start (RS) */ -#define CSR0_STOP 0x0004 /* stop (RS) */ -#define CSR0_TDMD 0x0008 /* transmit demand (RS) */ -#define CSR0_TXON 0x0010 /* transmitter on (R) */ -#define CSR0_RXON 0x0020 /* receiver on (R) */ -#define CSR0_INEA 0x0040 /* interrupt enable (RW) */ -#define CSR0_INTR 0x0080 /* interrupt active (R) */ -#define CSR0_IDON 0x0100 /* initialization done (RC) */ -#define CSR0_TINT 0x0200 /* transmitter interrupt (RC) */ -#define CSR0_RINT 0x0400 /* receiver interrupt (RC) */ -#define CSR0_MERR 0x0800 /* memory error (RC) */ -#define CSR0_MISS 0x1000 /* missed frame (RC) */ -#define CSR0_CERR 0x2000 /* carrier error (no heartbeat :-) (RC) */ -#define CSR0_BABL 0x4000 /* babble: tx-ed too many bits (RC) */ -#define CSR0_ERR 0x8000 /* error (RC) */ - -/* CSR3 */ -#define CSR3_BCON 0x0001 /* byte control */ -#define CSR3_ACON 0 // fixme: 0x0002 /* ALE control */ -#define CSR3_BSWP 0x0004 /* byte swap (1=big endian) */ - - - -/***************************** Prototypes *****************************/ - -static int addr_accessible( volatile void *regp, int wordflag, int - writeflag ); -static int lance_probe1( struct net_device *dev, struct lance_addr *init_rec ); -static int lance_open( struct net_device *dev ); -static void lance_init_ring( struct net_device *dev ); -static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); -static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp ); -static int lance_rx( struct net_device *dev ); -static int lance_close( struct net_device *dev ); -static struct net_device_stats *lance_get_stats( struct net_device *dev ); -static void set_multicast_list( struct net_device *dev ); -static int lance_set_mac_address( struct net_device *dev, void *addr ); - -/************************* End of Prototypes **************************/ - -/* Network traffic statistic (bytes) */ - -int lance_stat = 0; - -static void update_lance_stat (int len) { - lance_stat += len; -} - -/* - This function is used to access Baget/Lance memory to avoid - 8/32BIT access to VAC A24 space - ALL memcpy calls was chenged to this function to avoid dbe problems - Don't confuse with function name -- it stays from original code -*/ - -void *slow_memcpy( void *dst, const void *src, size_t len ) - -{ - unsigned long to = (unsigned long)dst; - unsigned long from = (unsigned long)src; - unsigned long to_end = to +len; - - /* Unaligned flags */ - - int odd_from = from & 1; - int odd_to = to & 1; - int odd_to_end = to_end & 1; - - /* Align for 16BIT-access first */ - - register unsigned short *from_a = (unsigned short*) (from & ~1); - register unsigned short *to_a = (unsigned short*) (to & ~1); - register unsigned short *to_end_a = (unsigned short*) (to_end & ~1); - - /* Caching values -- not in loop invariant */ - - register unsigned short from_v; - register unsigned short to_v; - - /* Invariant is: from_a and to_a are pointers before or exactly to - currently copying byte */ - - if (odd_to) { - /* First byte unaligned case */ - from_v = *from_a; - to_v = *to_a; - - to_v &= ~0xff; - to_v |= 0xff & (from_v >> (odd_from ? 0 : 8)); - *to_a++ = to_v; - - if (odd_from) from_a++; - } - if (odd_from == odd_to) { - /* Same parity */ - while (to_a + 7 < to_end_a) { - unsigned long dummy1, dummy2; - unsigned long reg1, reg2, reg3, reg4; - - __asm__ __volatile__( - ".set\tnoreorder\n\t" - ".set\tnoat\n\t" - "lh\t%2,0(%1)\n\t" - "nop\n\t" - "lh\t%3,2(%1)\n\t" - "sh\t%2,0(%0)\n\t" - "lh\t%4,4(%1)\n\t" - "sh\t%3,2(%0)\n\t" - "lh\t%5,6(%1)\n\t" - "sh\t%4,4(%0)\n\t" - "lh\t%2,8(%1)\n\t" - "sh\t%5,6(%0)\n\t" - "lh\t%3,10(%1)\n\t" - "sh\t%2,8(%0)\n\t" - "lh\t%4,12(%1)\n\t" - "sh\t%3,10(%0)\n\t" - "lh\t%5,14(%1)\n\t" - "sh\t%4,12(%0)\n\t" - "nop\n\t" - "sh\t%5,14(%0)\n\t" - ".set\tat\n\t" - ".set\treorder" - :"=r" (dummy1), "=r" (dummy2), - "=&r" (reg1), "=&r" (reg2), "=&r" (reg3), "=&r" (reg4) - :"0" (to_a), "1" (from_a) - :"memory"); - - to_a += 8; - from_a += 8; - - } - while (to_a < to_end_a) { - *to_a++ = *from_a++; - } - } else { - /* Different parity */ - from_v = *from_a; - while (to_a < to_end_a) { - unsigned short from_v_next; - from_v_next = *++from_a; - *to_a++ = ((from_v & 0xff)<<8) | ((from_v_next>>8) & 0xff); - from_v = from_v_next; - } - - } - if (odd_to_end) { - /* Last byte unaligned case */ - to_v = *to_a; - from_v = *from_a; - - to_v &= ~0xff00; - if (odd_from == odd_to) { - to_v |= from_v & 0xff00; - } else { - to_v |= (from_v<<8) & 0xff00; - } - - *to_a = to_v; - } - - update_lance_stat( len ); - - return( dst ); -} - - -struct net_device * __init bagetlance_probe(int unit) -{ - struct net_device *dev; - int i; - static int found; - int err = -ENODEV; - - if (found) - /* Assume there's only one board possible... That seems true, since - * the Riebl/PAM board's address cannot be changed. */ - return ERR_PTR(-ENODEV); - - dev = alloc_etherdev(sizeof(struct lance_private)); - if (!dev) - return ERR_PTR(-ENOMEM); - - SET_MODULE_OWNER(dev); - - for( i = 0; i < N_LANCE_ADDR; ++i ) { - if (lance_probe1( dev, &lance_addr_list[i] )) { - found = 1; - break; - } - } - if (!found) - goto out; - err = register_netdev(dev); - if (err) - goto out1; - return dev; -out1: - free_irq(dev->irq, dev); -out: - free_netdev(dev); - return ERR_PTR(err); -} - -/* Derived from hwreg_present() in vme/config.c: */ - -static int __init addr_accessible( volatile void *regp, - int wordflag, - int writeflag ) -{ - /* We have a fine function to do it */ - extern int try_read(unsigned long, int); - return try_read((unsigned long)regp, sizeof(short)) != -1; -} - - - -/* Original atari driver uses it */ -#define IRQ_TYPE_PRIO SA_INTERRUPT -#define IRQ_SOURCE_TO_VECTOR(x) (x) - -static int __init lance_probe1( struct net_device *dev, - struct lance_addr *init_rec ) - -{ volatile unsigned short *memaddr = - (volatile unsigned short *)init_rec->memaddr; - volatile unsigned short *ioaddr = - (volatile unsigned short *)init_rec->ioaddr; - struct lance_private *lp; - struct lance_ioreg *IO; - int i; - static int did_version; - unsigned short save1, save2; - - PROBE_PRINT(( "Probing for Lance card at mem %#lx io %#lx\n", - (long)memaddr, (long)ioaddr )); - - /* Test whether memory readable and writable */ - PROBE_PRINT(( "lance_probe1: testing memory to be accessible\n" )); - if (!addr_accessible( memaddr, 1, 1 )) goto probe_fail; - - if ((unsigned long)memaddr >= KSEG2) { - /* FIXME: do we need to undo that on cleanup paths? */ - extern int kseg2_alloc_io (unsigned long addr, unsigned long size); - if (kseg2_alloc_io((unsigned long)memaddr, BAGET_LANCE_MEM_SIZE)) { - printk("bagetlance: unable map lance memory\n"); - goto probe_fail; - } - } - - /* Written values should come back... */ - PROBE_PRINT(( "lance_probe1: testing memory to be writable (1)\n" )); - save1 = *memaddr; - *memaddr = 0x0001; - if (*memaddr != 0x0001) goto probe_fail; - PROBE_PRINT(( "lance_probe1: testing memory to be writable (2)\n" )); - *memaddr = 0x0000; - if (*memaddr != 0x0000) goto probe_fail; - *memaddr = save1; - - /* First port should be readable and writable */ - PROBE_PRINT(( "lance_probe1: testing ioport to be accessible\n" )); - if (!addr_accessible( ioaddr, 1, 1 )) goto probe_fail; - - /* and written values should be readable */ - PROBE_PRINT(( "lance_probe1: testing ioport to be writeable\n" )); - save2 = ioaddr[1]; - ioaddr[1] = 0x0001; - if (ioaddr[1] != 0x0001) goto probe_fail; - - /* The CSR0_INIT bit should not be readable */ - PROBE_PRINT(( "lance_probe1: testing CSR0 register function (1)\n" )); - save1 = ioaddr[0]; - ioaddr[1] = CSR0; - ioaddr[0] = CSR0_INIT | CSR0_STOP; - if (ioaddr[0] != CSR0_STOP) { - ioaddr[0] = save1; - ioaddr[1] = save2; - goto probe_fail; - } - PROBE_PRINT(( "lance_probe1: testing CSR0 register function (2)\n" )); - ioaddr[0] = CSR0_STOP; - if (ioaddr[0] != CSR0_STOP) { - ioaddr[0] = save1; - ioaddr[1] = save2; - goto probe_fail; - } - - /* Now ok... */ - PROBE_PRINT(( "lance_probe1: Lance card detected\n" )); - goto probe_ok; - - probe_fail: - return( 0 ); - - probe_ok: - lp = netdev_priv(dev); - MEM = (struct lance_memory *)memaddr; - IO = lp->iobase = (struct lance_ioreg *)ioaddr; - dev->base_addr = (unsigned long)ioaddr; /* informational only */ - lp->memcpy_f = init_rec->slow_flag ? slow_memcpy : memcpy; - - REGA( CSR0 ) = CSR0_STOP; - - /* Now test for type: If the eeprom I/O port is readable, it is a - * PAM card */ - if (addr_accessible( &(IO->eeprom), 0, 0 )) { - /* Switch back to Ram */ - i = IO->mem; - lp->cardtype = PAM_CARD; - } -#ifdef NORMAL_MEM_ACCESS - else if (*RIEBL_MAGIC_ADDR == RIEBL_MAGIC) { -#else - else if (({ - unsigned short *a = (unsigned short*)RIEBL_MAGIC_ADDR; - (((int)a[0]) << 16) + ((int)a[1]) == RIEBL_MAGIC; - })) { -#endif - lp->cardtype = NEW_RIEBL; - } - else - lp->cardtype = OLD_RIEBL; - - if (lp->cardtype == PAM_CARD || - memaddr == (unsigned short *)0xffe00000) { - /* PAMs card and Riebl on ST use level 5 autovector */ - if (request_irq(BAGET_LANCE_IRQ, lance_interrupt, IRQ_TYPE_PRIO, - "PAM/Riebl-ST Ethernet", dev)) - goto probe_fail; - dev->irq = (unsigned short)BAGET_LANCE_IRQ; - } - else { - /* For VME-RieblCards, request a free VME int; - * (This must be unsigned long, since dev->irq is short and the - * IRQ_MACHSPEC bit would be cut off...) - */ - unsigned long irq = BAGET_LANCE_IRQ; - if (!irq) { - printk( "Lance: request for VME interrupt failed\n" ); - goto probe_fail; - } - if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO, - "Riebl-VME Ethernet", dev)) - goto probe_fail; - dev->irq = irq; - } - - printk("%s: %s at io %#lx, mem %#lx, irq %d%s, hwaddr ", - dev->name, lance_names[lp->cardtype], - (unsigned long)ioaddr, - (unsigned long)memaddr, - dev->irq, - init_rec->slow_flag ? " (slow memcpy)" : "" ); - - /* Get the ethernet address */ - switch( lp->cardtype ) { - case OLD_RIEBL: - /* No ethernet address! (Set some default address) */ - slow_memcpy( dev->dev_addr, OldRieblDefHwaddr, 6 ); - break; - case NEW_RIEBL: - lp->memcpy_f( dev->dev_addr, RIEBL_HWADDR_ADDR, 6 ); - break; - case PAM_CARD: - i = IO->eeprom; - for( i = 0; i < 6; ++i ) - dev->dev_addr[i] = - ((((unsigned short *)MEM)[i*2] & 0x0f) << 4) | - ((((unsigned short *)MEM)[i*2+1] & 0x0f)); - i = IO->mem; - break; - } - for( i = 0; i < 6; ++i ) - printk( "%02x%s", dev->dev_addr[i], (i < 5) ? ":" : "\n" ); - if (lp->cardtype == OLD_RIEBL) { - printk( "%s: Warning: This is a default ethernet address!\n", - dev->name ); - printk( " Use \"ifconfig hw ether ...\" to set the address.\n" ); - } - - MEM->init.mode = 0x0000; /* Disable Rx and Tx. */ - - { - unsigned char hwaddr[6]; - for( i = 0; i < 6; i++ ) - hwaddr[i] = dev->dev_addr[i^1]; /* <- 16 bit swap! */ - slow_memcpy(MEM->init.hwaddr, hwaddr, sizeof(hwaddr)); - } - - MEM->init.filter[0] = 0x00000000; - MEM->init.filter[1] = 0x00000000; - MEM->init.rx_ring.adr_lo = offsetof( struct lance_memory, rx_head ); - -#ifdef NORMAL_MEM_ACCESS - MEM->init.rx_ring.adr_hi = LANCE_HI_BASE; - MEM->init.rx_ring.len = RX_RING_LEN_BITS; -#else - MEM->init.rx_ring.len_adr_hi = - ((unsigned)RX_RING_LEN_BITS << 8) | LANCE_HI_BASE; -#endif - - - MEM->init.tx_ring.adr_lo = offsetof( struct lance_memory, tx_head ); - -#ifdef NORMAL_MEM_ACCESS - MEM->init.tx_ring.adr_hi = LANCE_HI_BASE; - MEM->init.tx_ring.len = TX_RING_LEN_BITS; -#else - MEM->init.tx_ring.len_adr_hi = - ((unsigned)TX_RING_LEN_BITS<<8) | LANCE_HI_BASE; -#endif - - if (lp->cardtype == PAM_CARD) - IO->ivec = IRQ_SOURCE_TO_VECTOR(dev->irq); - else - *RIEBL_IVEC_ADDR = IRQ_SOURCE_TO_VECTOR(dev->irq); - - if (did_version++ == 0) - DPRINTK( 1, ( version )); - - /* The LANCE-specific entries in the device structure. */ - dev->open = &lance_open; - dev->hard_start_xmit = &lance_start_xmit; - dev->stop = &lance_close; - dev->get_stats = &lance_get_stats; - dev->set_multicast_list = &set_multicast_list; - dev->set_mac_address = &lance_set_mac_address; - dev->start = 0; - - memset( &lp->stats, 0, sizeof(lp->stats) ); - - return( 1 ); -} - - -static int lance_open( struct net_device *dev ) - -{ struct lance_private *lp = netdev_priv(dev); - struct lance_ioreg *IO = lp->iobase; - int i; - - DPRINTK( 2, ( "%s: lance_open()\n", dev->name )); - - lance_init_ring(dev); - /* Re-initialize the LANCE, and start it when done. */ - - REGA( CSR3 ) = CSR3_BSWP | (lp->cardtype == PAM_CARD ? CSR3_ACON : 0); - REGA( CSR2 ) = 0; - REGA( CSR1 ) = 0; - REGA( CSR0 ) = CSR0_INIT; - /* From now on, AREG is kept to point to CSR0 */ - - i = 1000000; - while (--i > 0) - if (DREG & CSR0_IDON) - break; - if (i < 0 || (DREG & CSR0_ERR)) { - DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n", - dev->name, i, DREG )); - DREG = CSR0_STOP; - return( -EIO ); - } - DREG = CSR0_IDON; - DREG = CSR0_STRT; - DREG = CSR0_INEA; - - dev->tbusy = 0; - dev->interrupt = 0; - dev->start = 1; - - DPRINTK( 2, ( "%s: LANCE is open, csr0 %04x\n", dev->name, DREG )); - return( 0 ); -} - - -/* Initialize the LANCE Rx and Tx rings. */ - -static void lance_init_ring( struct net_device *dev ) - -{ struct lance_private *lp = netdev_priv(dev); - int i; - unsigned offset; - - lp->lock = 0; - lp->tx_full = 0; - lp->cur_rx = lp->cur_tx = 0; - lp->dirty_tx = 0; - - offset = offsetof( struct lance_memory, packet_area ); - -/* If the packet buffer at offset 'o' would conflict with the reserved area - * of RieblCards, advance it */ -#define CHECK_OFFSET(o) \ - do { \ - if (lp->cardtype == OLD_RIEBL || lp->cardtype == NEW_RIEBL) { \ - if (((o) < RIEBL_RSVD_START) ? (o)+PKT_BUF_SZ > RIEBL_RSVD_START \ - : (o) < RIEBL_RSVD_END) \ - (o) = RIEBL_RSVD_END; \ - } \ - } while(0) - - for( i = 0; i < TX_RING_SIZE; i++ ) { - CHECK_OFFSET(offset); - MEM->tx_head[i].base = offset; -#ifdef NORMAL_MEM_ACCESS - MEM->tx_head[i].flag = TMD1_OWN_HOST; - MEM->tx_head[i].base_hi = LANCE_HI_BASE; -#else - MEM->tx_head[i].flag_base_hi = - (TMD1_OWN_HOST<<8) | LANCE_HI_BASE; -#endif - MEM->tx_head[i].length = 0; - MEM->tx_head[i].misc = 0; - offset += PKT_BUF_SZ; - } - - for( i = 0; i < RX_RING_SIZE; i++ ) { - CHECK_OFFSET(offset); - MEM->rx_head[i].base = offset; -#ifdef NORMAL_MEM_ACCESS - MEM->rx_head[i].flag = TMD1_OWN_CHIP; - MEM->rx_head[i].base_hi = LANCE_HI_BASE; -#else - MEM->rx_head[i].flag_base_hi = - (TMD1_OWN_CHIP<<8) | LANCE_HI_BASE; -#endif - MEM->rx_head[i].buf_length = -PKT_BUF_SZ; - MEM->rx_head[i].msg_length = 0; - offset += PKT_BUF_SZ; - } -} - - -static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) - -{ struct lance_private *lp = netdev_priv(dev); - struct lance_ioreg *IO = lp->iobase; - int entry, len; - struct lance_tx_head *head; - unsigned long flags; - - /* The old LANCE chips doesn't automatically pad buffers to min. size. */ - len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN; - /* PAM-Card has a bug: Can only send packets with even number of bytes! */ - if (lp->cardtype == PAM_CARD && (len & 1)) - ++len; - - if (len > skb->len) { - skb = skb_padto(skb, len); - if (skb == NULL) - return 0; - } - - /* Transmitter timeout, serious problems. */ - if (dev->tbusy) { - int tickssofar = jiffies - dev->trans_start; - if (tickssofar < 20) - return( 1 ); - AREG = CSR0; - DPRINTK( 1, ( "%s: transmit timed out, status %04x, resetting.\n", - dev->name, DREG )); - DREG = CSR0_STOP; - /* - * Always set BSWP after a STOP as STOP puts it back into - * little endian mode. - */ - REGA( CSR3 ) = CSR3_BSWP | (lp->cardtype == PAM_CARD ? CSR3_ACON : 0); - lp->stats.tx_errors++; -#ifndef final_version - { int i; - DPRINTK( 2, ( "Ring data: dirty_tx %d cur_tx %d%s cur_rx %d\n", - lp->dirty_tx, lp->cur_tx, - lp->tx_full ? " (full)" : "", - lp->cur_rx )); - for( i = 0 ; i < RX_RING_SIZE; i++ ) - DPRINTK( 2, ( "rx #%d: base=%04x blen=%04x mlen=%04x\n", - i, MEM->rx_head[i].base, - -MEM->rx_head[i].buf_length, - MEM->rx_head[i].msg_length )); - for( i = 0 ; i < TX_RING_SIZE; i++ ) - DPRINTK( 2, ( "tx #%d: base=%04x len=%04x misc=%04x\n", - i, MEM->tx_head[i].base, - -MEM->tx_head[i].length, - MEM->tx_head[i].misc )); - } -#endif - lance_init_ring(dev); - REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT; - - dev->tbusy = 0; - dev->trans_start = jiffies; - - return( 0 ); - } - - DPRINTK( 2, ( "%s: lance_start_xmit() called, csr0 %4.4x.\n", - dev->name, DREG )); - - /* Block a timer-based transmit from overlapping. This could better be - done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */ - if (test_and_set_bit( 0, (void*)&dev->tbusy ) != 0) { - DPRINTK( 0, ( "%s: Transmitter access conflict.\n", dev->name )); - return 1; - } - - if (test_and_set_bit( 0, (void*)&lp->lock ) != 0) { - DPRINTK( 0, ( "%s: tx queue lock!.\n", dev->name )); - /* don't clear dev->tbusy flag. */ - return 1; - } - - /* Fill in a Tx ring entry */ - if (lance_debug >= 3) { - u_char *p; - int i; - printk( "%s: TX pkt type 0x%04x from ", dev->name, - ((u_short *)skb->data)[6]); - for( p = &((u_char *)skb->data)[6], i = 0; i < 6; i++ ) - printk("%02x%s", *p++, i != 5 ? ":" : "" ); - printk(" to "); - for( p = (u_char *)skb->data, i = 0; i < 6; i++ ) - printk("%02x%s", *p++, i != 5 ? ":" : "" ); - printk(" data at 0x%08x len %d\n", (int)skb->data, - (int)skb->len ); - } - - /* We're not prepared for the int until the last flags are set/reset. And - * the int may happen already after setting the OWN_CHIP... */ - save_flags(flags); - cli(); - - /* Mask to ring buffer boundary. */ - entry = lp->cur_tx & TX_RING_MOD_MASK; - head = &(MEM->tx_head[entry]); - - /* Caution: the write order is important here, set the "ownership" bits - * last. - */ - - head->length = -len; - head->misc = 0; - lp->memcpy_f( PKTBUF_ADDR(head), (void *)skb->data, skb->len ); -#ifdef NORMAL_MEM_ACCESS - head->flag = TMD1_OWN_CHIP | TMD1_ENP | TMD1_STP; -#else - SET_FLAG(head,(TMD1_OWN_CHIP | TMD1_ENP | TMD1_STP)); -#endif - lp->stats.tx_bytes += skb->len; - dev_kfree_skb( skb ); - lp->cur_tx++; - while( lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE ) { - lp->cur_tx -= TX_RING_SIZE; - lp->dirty_tx -= TX_RING_SIZE; - } - - /* Trigger an immediate send poll. */ - DREG = CSR0_INEA | CSR0_TDMD; - dev->trans_start = jiffies; - - lp->lock = 0; -#ifdef NORMAL_MEM_ACCESS - if ((MEM->tx_head[(entry+1) & TX_RING_MOD_MASK].flag & TMD1_OWN) == -#else - if ((GET_FLAG(&MEM->tx_head[(entry+1) & TX_RING_MOD_MASK]) & TMD1_OWN) == -#endif - TMD1_OWN_HOST) - dev->tbusy = 0; - else - lp->tx_full = 1; - restore_flags(flags); - - return 0; -} - -/* The LANCE interrupt handler. */ - -static irqreturn_t lance_interrupt( int irq, void *dev_id, struct pt_regs *fp) -{ - struct net_device *dev = dev_id; - struct lance_private *lp; - struct lance_ioreg *IO; - int csr0, boguscnt = 10; - int handled = 0; - - if (dev == NULL) { - DPRINTK( 1, ( "lance_interrupt(): interrupt for unknown device.\n" )); - return IRQ_NONE; - } - - lp = netdev_priv(dev); - IO = lp->iobase; - AREG = CSR0; - - if (dev->interrupt) { - DPRINTK( 1, ( "Re-entering CAUSE=%08x STATUS=%08x\n", - read_32bit_cp0_register(CP0_CAUSE), - read_32bit_cp0_register(CP0_STATUS) )); - panic("lance: interrupt handler reentered !"); - } - - dev->interrupt = 1; - - while( ((csr0 = DREG) & (CSR0_ERR | CSR0_TINT | CSR0_RINT)) && - --boguscnt >= 0) { - handled = 1; - /* Acknowledge all of the current interrupt sources ASAP. */ - DREG = csr0 & ~(CSR0_INIT | CSR0_STRT | CSR0_STOP | - CSR0_TDMD | CSR0_INEA); - - DPRINTK( 2, ( "%s: interrupt csr0=%04x new csr=%04x.\n", - dev->name, csr0, DREG )); - - if (csr0 & CSR0_RINT) /* Rx interrupt */ - lance_rx( dev ); - - if (csr0 & CSR0_TINT) { /* Tx-done interrupt */ - int dirty_tx = lp->dirty_tx; - - while( dirty_tx < lp->cur_tx) { - int entry = dirty_tx & TX_RING_MOD_MASK; -#ifdef NORMAL_MEM_ACCESS - int status = MEM->tx_head[entry].flag; -#else - int status = GET_FLAG(&MEM->tx_head[entry]); -#endif - if (status & TMD1_OWN_CHIP) - break; /* It still hasn't been Txed */ - -#ifdef NORMAL_MEM_ACCESS - MEM->tx_head[entry].flag = 0; -#else - SET_FLAG(&MEM->tx_head[entry],0); -#endif - - if (status & TMD1_ERR) { - /* There was an major error, log it. */ - int err_status = MEM->tx_head[entry].misc; - lp->stats.tx_errors++; - if (err_status & TMD3_RTRY) lp->stats.tx_aborted_errors++; - if (err_status & TMD3_LCAR) lp->stats.tx_carrier_errors++; - if (err_status & TMD3_LCOL) lp->stats.tx_window_errors++; - if (err_status & TMD3_UFLO) { - /* Ackk! On FIFO errors the Tx unit is turned off! */ - lp->stats.tx_fifo_errors++; - /* Remove this verbosity later! */ - DPRINTK( 1, ( "%s: Tx FIFO error! Status %04x\n", - dev->name, csr0 )); - /* Restart the chip. */ - DREG = CSR0_STRT; - } - } else { - if (status & (TMD1_MORE | TMD1_ONE | TMD1_DEF)) - lp->stats.collisions++; - lp->stats.tx_packets++; - } - dirty_tx++; - } - -#ifndef final_version - if (lp->cur_tx - dirty_tx >= TX_RING_SIZE) { - DPRINTK( 0, ( "out-of-sync dirty pointer," - " %d vs. %d, full=%d.\n", - dirty_tx, lp->cur_tx, lp->tx_full )); - dirty_tx += TX_RING_SIZE; - } -#endif - - if (lp->tx_full && dev->tbusy - && dirty_tx > lp->cur_tx - TX_RING_SIZE + 2) { - /* The ring is no longer full, clear tbusy. */ - lp->tx_full = 0; - dev->tbusy = 0; - mark_bh( NET_BH ); - } - - lp->dirty_tx = dirty_tx; - } - - /* Log misc errors. */ - if (csr0 & CSR0_BABL) lp->stats.tx_errors++; /* Tx babble. */ - if (csr0 & CSR0_MISS) lp->stats.rx_errors++; /* Missed a Rx frame. */ - if (csr0 & CSR0_MERR) { - DPRINTK( 1, ( "%s: Bus master arbitration failure (?!?), " - "status %04x.\n", dev->name, csr0 )); - /* Restart the chip. */ - DREG = CSR0_STRT; - } - } - - /* Clear any other interrupt, and set interrupt enable. */ - DREG = CSR0_BABL | CSR0_CERR | CSR0_MISS | CSR0_MERR | - CSR0_IDON | CSR0_INEA; - - DPRINTK( 2, ( "%s: exiting interrupt, csr0=%#04x.\n", - dev->name, DREG )); - dev->interrupt = 0; - return IRQ_RETVAL(handled); -} - - -static int lance_rx( struct net_device *dev ) - -{ struct lance_private *lp = netdev_priv(dev); - int entry = lp->cur_rx & RX_RING_MOD_MASK; - int i; - -#ifdef NORMAL_MEM_ACCESS - DPRINTK( 2, ( "%s: rx int, flag=%04x\n", dev->name, - MEM->rx_head[entry].flag )); -#else - DPRINTK( 2, ( "%s: rx int, flag=%04x\n", dev->name, - GET_FLAG(&MEM->rx_head[entry]) )); -#endif - - /* If we own the next entry, it's a new packet. Send it up. */ -#ifdef NORMAL_MEM_ACCESS - while( (MEM->rx_head[entry].flag & RMD1_OWN) == RMD1_OWN_HOST ) { -#else - while( (GET_FLAG(&MEM->rx_head[entry]) & RMD1_OWN) == RMD1_OWN_HOST ) { -#endif - struct lance_rx_head *head = &(MEM->rx_head[entry]); -#ifdef NORMAL_MEM_ACCESS - int status = head->flag; -#else - int status = GET_FLAG(head); -#endif - - if (status != (RMD1_ENP|RMD1_STP)) { /* There was an error. */ - /* There is a tricky error noted by John Murphy, - to Russ Nelson: Even with full-sized - buffers it's possible for a jabber packet to use two - buffers, with only the last correctly noting the error. */ - if (status & RMD1_ENP) /* Only count a general error at the */ - lp->stats.rx_errors++; /* end of a packet.*/ - if (status & RMD1_FRAM) lp->stats.rx_frame_errors++; - if (status & RMD1_OFLO) lp->stats.rx_over_errors++; - if (status & RMD1_CRC) lp->stats.rx_crc_errors++; - if (status & RMD1_BUFF) lp->stats.rx_fifo_errors++; -#ifdef NORMAL_MEM_ACCESS - head->flag &= (RMD1_ENP|RMD1_STP); -#else - SET_FLAG(head,GET_FLAG(head) & (RMD1_ENP|RMD1_STP)); -#endif - } else { - /* Malloc up new buffer, compatible with net-3. */ - short pkt_len = head->msg_length & 0xfff; - struct sk_buff *skb; - - if (pkt_len < 60) { - printk( "%s: Runt packet!\n", dev->name ); - lp->stats.rx_errors++; - } - else { - skb = dev_alloc_skb( pkt_len+2 ); - if (skb == NULL) { - DPRINTK( 1, ( "%s: Memory squeeze, deferring packet.\n", - dev->name )); - for( i = 0; i < RX_RING_SIZE; i++ ) -#ifdef NORMAL_MEM_ACCESS - if (MEM->rx_head[(entry+i) & RX_RING_MOD_MASK].flag & -#else - if (GET_FLAG(&MEM->rx_head[(entry+i) & \ - RX_RING_MOD_MASK]) & -#endif - RMD1_OWN_CHIP) - break; - - if (i > RX_RING_SIZE - 2) { - lp->stats.rx_dropped++; -#ifdef NORMAL_MEM_ACCESS - head->flag |= RMD1_OWN_CHIP; -#else - SET_FLAG(head,GET_FLAG(head) | RMD1_OWN_CHIP); -#endif - lp->cur_rx++; - } - break; - } - - if (lance_debug >= 3) { - u_char *data = PKTBUF_ADDR(head), *p; - printk( "%s: RX pkt type 0x%04x from ", dev->name, - ((u_short *)data)[6]); - for( p = &data[6], i = 0; i < 6; i++ ) - printk("%02x%s", *p++, i != 5 ? ":" : "" ); - printk(" to "); - for( p = data, i = 0; i < 6; i++ ) - printk("%02x%s", *p++, i != 5 ? ":" : "" ); - printk(" data %02x %02x %02x %02x %02x %02x %02x %02x " - "len %d\n", - data[15], data[16], data[17], data[18], - data[19], data[20], data[21], data[22], - pkt_len ); - } - - skb->dev = dev; - skb_reserve( skb, 2 ); /* 16 byte align */ - skb_put( skb, pkt_len ); /* Make room */ - lp->memcpy_f( skb->data, PKTBUF_ADDR(head), pkt_len ); - skb->protocol = eth_type_trans( skb, dev ); - netif_rx( skb ); - dev->last_rx = jiffies; - lp->stats.rx_packets++; - lp->stats.rx_bytes += pkt_len; - } - } - -#ifdef NORMAL_MEM_ACCESS - head->flag |= RMD1_OWN_CHIP; -#else - SET_FLAG(head,GET_FLAG(head) | RMD1_OWN_CHIP); -#endif - entry = (++lp->cur_rx) & RX_RING_MOD_MASK; - } - lp->cur_rx &= RX_RING_MOD_MASK; - - /* From lance.c (Donald Becker): */ - /* We should check that at least two ring entries are free. If not, - we should free one and mark stats->rx_dropped++. */ - - return 0; -} - - -static int lance_close( struct net_device *dev ) - -{ struct lance_private *lp = netdev_priv(dev); - struct lance_ioreg *IO = lp->iobase; - - dev->start = 0; - dev->tbusy = 1; - - AREG = CSR0; - - DPRINTK( 2, ( "%s: Shutting down ethercard, status was %2.2x.\n", - dev->name, DREG )); - - /* We stop the LANCE here -- it occasionally polls - memory if we don't. */ - DREG = CSR0_STOP; - - return 0; -} - - -static struct net_device_stats *lance_get_stats( struct net_device *dev ) - -{ - struct lance_private *lp = netdev_priv(dev); - return &lp->stats; -} - - -/* Set or clear the multicast filter for this adaptor. - num_addrs == -1 Promiscuous mode, receive all packets - num_addrs == 0 Normal mode, clear multicast list - num_addrs > 0 Multicast mode, receive normal and MC packets, and do - best-effort filtering. - */ - -static void set_multicast_list( struct net_device *dev ) - -{ struct lance_private *lp = netdev_priv(dev); - struct lance_ioreg *IO = lp->iobase; - - if (!dev->start) - /* Only possible if board is already started */ - return; - - /* We take the simple way out and always enable promiscuous mode. */ - DREG = CSR0_STOP; /* Temporarily stop the lance. */ - - if (dev->flags & IFF_PROMISC) { - /* Log any net taps. */ - DPRINTK( 1, ( "%s: Promiscuous mode enabled.\n", dev->name )); - REGA( CSR15 ) = 0x8000; /* Set promiscuous mode */ - } else { - short multicast_table[4]; - int num_addrs = dev->mc_count; - int i; - /* We don't use the multicast table, but rely on upper-layer - * filtering. */ - memset( multicast_table, (num_addrs == 0) ? 0 : -1, - sizeof(multicast_table) ); - for( i = 0; i < 4; i++ ) - REGA( CSR8+i ) = multicast_table[i]; - REGA( CSR15 ) = 0; /* Unset promiscuous mode */ - } - - /* - * Always set BSWP after a STOP as STOP puts it back into - * little endian mode. - */ - REGA( CSR3 ) = CSR3_BSWP | (lp->cardtype == PAM_CARD ? CSR3_ACON : 0); - - /* Resume normal operation and reset AREG to CSR0 */ - REGA( CSR0 ) = CSR0_IDON | CSR0_INEA | CSR0_STRT; -} - - -/* This is needed for old RieblCards and possible for new RieblCards */ - -static int lance_set_mac_address( struct net_device *dev, void *addr ) - -{ struct lance_private *lp = netdev_priv(dev); - struct sockaddr *saddr = addr; - int i; - - if (lp->cardtype != OLD_RIEBL && lp->cardtype != NEW_RIEBL) - return( -EOPNOTSUPP ); - - if (dev->start) { - /* Only possible while card isn't started */ - DPRINTK( 1, ( "%s: hwaddr can be set only while card isn't open.\n", - dev->name )); - return( -EIO ); - } - - slow_memcpy( dev->dev_addr, saddr->sa_data, dev->addr_len ); - - { - unsigned char hwaddr[6]; - for( i = 0; i < 6; i++ ) - hwaddr[i] = dev->dev_addr[i^1]; /* <- 16 bit swap! */ - slow_memcpy(MEM->init.hwaddr, hwaddr, sizeof(hwaddr)); - } - - lp->memcpy_f( RIEBL_HWADDR_ADDR, dev->dev_addr, 6 ); - /* set also the magic for future sessions */ -#ifdef NORMAL_MEM_ACCESS - *RIEBL_MAGIC_ADDR = RIEBL_MAGIC; -#else - { - unsigned long magic = RIEBL_MAGIC; - slow_memcpy(RIEBL_MAGIC_ADDR, &magic, sizeof(*RIEBL_MAGIC_ADDR)); - } -#endif - return( 0 ); -} - - -#ifdef MODULE -static struct net_device *bagetlance_dev; - -int init_module(void) -{ - bagetlance_dev = bagetlance_probe(-1); - if (IS_ERR(bagetlance_dev)) - return PTR_ERR(bagetlance_dev); - return 0; -} - -void cleanup_module(void) -{ - unregister_netdev(bagetlance_dev); - free_irq(bagetlance_dev->irq, bagetlance_dev); - free_netdev(bagetlance_dev); -} - -#endif /* MODULE */ - -/* - * Local variables: - * c-indent-level: 4 - * tab-width: 4 - * End: - */ diff -Nru a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c --- a/drivers/net/bonding/bond_alb.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/bonding/bond_alb.c 2005-03-07 14:54:17 -08:00 @@ -954,9 +954,9 @@ /* each slave will receive packets destined to a different mac */ memcpy(s_addr.sa_data, addr, dev->addr_len); s_addr.sa_family = dev->type; - if (dev->set_mac_address(dev, &s_addr)) { + if (dev_set_mac_address(dev, &s_addr)) { printk(KERN_ERR DRV_NAME - ": Error: dev->set_mac_address of dev %s failed! ALB " + ": Error: dev_set_mac_address of dev %s failed! ALB " "mode requires that the base driver support setting " "the hw address also when the network device's " "interface is open\n", @@ -1209,7 +1209,7 @@ /* save net_device's current hw address */ memcpy(tmp_addr, slave->dev->dev_addr, ETH_ALEN); - res = slave->dev->set_mac_address(slave->dev, addr); + res = dev_set_mac_address(slave->dev, addr); /* restore net_device's hw address */ memcpy(slave->dev->dev_addr, tmp_addr, ETH_ALEN); @@ -1229,7 +1229,7 @@ stop_at = slave; bond_for_each_slave_from_to(bond, slave, i, bond->first_slave, stop_at) { memcpy(tmp_addr, slave->dev->dev_addr, ETH_ALEN); - slave->dev->set_mac_address(slave->dev, &sa); + dev_set_mac_address(slave->dev, &sa); memcpy(slave->dev->dev_addr, tmp_addr, ETH_ALEN); } diff -Nru a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c --- a/drivers/net/bonding/bond_main.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/bonding/bond_main.c 2005-03-07 14:54:18 -08:00 @@ -1719,7 +1719,7 @@ */ memcpy(addr.sa_data, bond_dev->dev_addr, bond_dev->addr_len); addr.sa_family = slave_dev->type; - res = slave_dev->set_mac_address(slave_dev, &addr); + res = dev_set_mac_address(slave_dev, &addr); if (res) { dprintk("Error %d calling set_mac_address\n", res); goto err_free; @@ -1849,8 +1849,8 @@ if (bond_update_speed_duplex(new_slave) && (new_slave->link != BOND_LINK_DOWN)) { printk(KERN_WARNING DRV_NAME - ": Warning: failed to get speed/duplex from %s, speed " - "forced to 100Mbps, duplex forced to Full.\n", + ": Warning: failed to get speed and duplex from %s, " + "assumed to be 100Mb/sec and Full.\n", new_slave->dev->name); if (bond->params.mode == BOND_MODE_8023AD) { @@ -1991,7 +1991,7 @@ err_restore_mac: memcpy(addr.sa_data, new_slave->perm_hwaddr, ETH_ALEN); addr.sa_family = slave_dev->type; - slave_dev->set_mac_address(slave_dev, &addr); + dev_set_mac_address(slave_dev, &addr); err_free: kfree(new_slave); @@ -2171,7 +2171,7 @@ /* restore original ("permanent") mac address */ memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN); addr.sa_family = slave_dev->type; - slave_dev->set_mac_address(slave_dev, &addr); + dev_set_mac_address(slave_dev, &addr); } /* restore the original state of the @@ -2262,7 +2262,7 @@ /* restore original ("permanent") mac address*/ memcpy(addr.sa_data, slave->perm_hwaddr, ETH_ALEN); addr.sa_family = slave_dev->type; - slave_dev->set_mac_address(slave_dev, &addr); + dev_set_mac_address(slave_dev, &addr); } /* restore the original state of the IFF_NOARP flag that might have @@ -3898,12 +3898,7 @@ bond_for_each_slave(bond, slave, i) { dprintk("s %p s->p %p c_m %p\n", slave, slave->prev, slave->dev->change_mtu); - if (slave->dev->change_mtu) { - res = slave->dev->change_mtu(slave->dev, new_mtu); - } else { - slave->dev->mtu = new_mtu; - res = 0; - } + res = dev_set_mtu(slave->dev, new_mtu); if (res) { /* If we failed to set the slave's mtu to the new value @@ -3929,14 +3924,10 @@ bond_for_each_slave_from_to(bond, slave, i, bond->first_slave, stop_at) { int tmp_res; - if (slave->dev->change_mtu) { - tmp_res = slave->dev->change_mtu(slave->dev, bond_dev->mtu); - if (tmp_res) { - dprintk("unwind err %d dev %s\n", tmp_res, - slave->dev->name); - } - } else { - slave->dev->mtu = bond_dev->mtu; + tmp_res = dev_set_mtu(slave->dev, bond_dev->mtu); + if (tmp_res) { + dprintk("unwind err %d dev %s\n", tmp_res, + slave->dev->name); } } @@ -3988,7 +3979,7 @@ goto unwind; } - res = slave->dev->set_mac_address(slave->dev, addr); + res = dev_set_mac_address(slave->dev, addr); if (res) { /* TODO: consider downing the slave * and retry ? @@ -4014,7 +4005,7 @@ bond_for_each_slave_from_to(bond, slave, i, bond->first_slave, stop_at) { int tmp_res; - tmp_res = slave->dev->set_mac_address(slave->dev, &tmp_sa); + tmp_res = dev_set_mac_address(slave->dev, &tmp_sa); if (tmp_res) { dprintk("unwind err %d dev %s\n", tmp_res, slave->dev->name); diff -Nru a/drivers/net/defxx.c b/drivers/net/defxx.c --- a/drivers/net/defxx.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/defxx.c 2005-03-07 14:54:16 -08:00 @@ -420,7 +420,7 @@ } if (pdev != NULL) - print_name = pdev->slot_name; + print_name = pci_name(pdev); dev = alloc_fddidev(sizeof(*bp)); if (!dev) { diff -Nru a/drivers/net/dl2k.c b/drivers/net/dl2k.c --- a/drivers/net/dl2k.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/dl2k.c 2005-03-07 14:54:17 -08:00 @@ -1199,7 +1199,7 @@ static void rio_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { struct netdev_private *np = netdev_priv(dev); - strcpy(info->driver, "DL2K"); + strcpy(info->driver, "dl2k"); strcpy(info->version, DRV_VERSION); strcpy(info->bus_info, pci_name(np->pdev)); } diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c --- a/drivers/net/e100.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/e100.c 2005-03-07 14:54:18 -08:00 @@ -2310,7 +2310,7 @@ } #ifdef CONFIG_PM -static int e100_suspend(struct pci_dev *pdev, u32 state) +static int e100_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct nic *nic = netdev_priv(netdev); @@ -2321,7 +2321,7 @@ netif_device_detach(netdev); pci_save_state(pdev); - pci_enable_wake(pdev, state, nic->flags & (wol_magic | e100_asf(nic))); + pci_enable_wake(pdev, pci_choose_state(pdev, state), nic->flags & (wol_magic | e100_asf(nic))); pci_disable_device(pdev); pci_set_power_state(pdev, pci_choose_state(pdev, state)); diff -Nru a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h --- a/drivers/net/e1000/e1000.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/e1000/e1000.h 2005-03-07 14:54:16 -08:00 @@ -138,6 +138,7 @@ #define E1000_RX_BUFFER_WRITE 16 /* Must be power of 2 */ #define AUTO_ALL_MODES 0 +#define E1000_EEPROM_82544_APM 0x0004 #define E1000_EEPROM_APME 0x0400 #ifndef E1000_MASTER_SLAVE @@ -209,6 +210,7 @@ /* TX */ struct e1000_desc_ring tx_ring; + struct e1000_buffer previous_buffer_info; spinlock_t tx_lock; uint32_t txd_cmd; uint32_t tx_int_delay; @@ -222,6 +224,7 @@ uint32_t tx_fifo_size; atomic_t tx_fifo_stall; boolean_t pcix_82544; + boolean_t detect_tx_hung; /* RX */ struct e1000_desc_ring rx_ring; diff -Nru a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c --- a/drivers/net/e1000/e1000_ethtool.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/e1000/e1000_ethtool.c 2005-03-07 14:54:17 -08:00 @@ -1310,7 +1310,7 @@ struct e1000_desc_ring *txdr = &adapter->test_tx_ring; struct e1000_desc_ring *rxdr = &adapter->test_rx_ring; struct pci_dev *pdev = adapter->pdev; - int i; + int i, ret_val; E1000_WRITE_REG(&adapter->hw, RDT, rxdr->count - 1); @@ -1330,11 +1330,12 @@ rxdr->buffer_info[i].length, PCI_DMA_FROMDEVICE); - if (!e1000_check_lbtest_frame(rxdr->buffer_info[i++].skb, 1024)) - return 0; - } while (i < 64); + ret_val = e1000_check_lbtest_frame(rxdr->buffer_info[i].skb, + 1024); + i++; + } while (ret_val != 0 && i < 64); - return 13; + return ret_val; } static int diff -Nru a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c --- a/drivers/net/e1000/e1000_hw.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/e1000/e1000_hw.c 2005-03-07 14:54:18 -08:00 @@ -1572,7 +1572,8 @@ if(mii_status_reg & MII_SR_LINK_STATUS) break; msec_delay(100); } - if((i == 0) && (hw->phy_type == e1000_phy_m88)) { + if((i == 0) && + (hw->phy_type == e1000_phy_m88)) { /* We didn't get link. Reset the DSP and wait again for link. */ ret_val = e1000_phy_reset_dsp(hw); if(ret_val) { @@ -2503,7 +2504,7 @@ } } - ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, + ret_val = e1000_read_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr, phy_data); return ret_val; @@ -2609,7 +2610,7 @@ } } - ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, + ret_val = e1000_write_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr, phy_data); return ret_val; @@ -2955,8 +2956,7 @@ /* Check polarity status */ ret_val = e1000_check_polarity(hw, &polarity); if(ret_val) - return ret_val; - + return ret_val; phy_info->cable_polarity = polarity; ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); @@ -2966,9 +2966,9 @@ phy_info->mdix_mode = (phy_data & M88E1000_PSSR_MDIX) >> M88E1000_PSSR_MDIX_SHIFT; - if(phy_data & M88E1000_PSSR_1000MBS) { - /* Cable Length Estimation and Local/Remote Receiver Informatoion - * are only valid at 1000 Mbps + if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS) { + /* Cable Length Estimation and Local/Remote Receiver Information + * are only valid at 1000 Mbps. */ phy_info->cable_length = ((phy_data & M88E1000_PSSR_CABLE_LENGTH) >> M88E1000_PSSR_CABLE_LENGTH_SHIFT); @@ -4639,41 +4639,44 @@ { uint32_t status; - if(hw->mac_type < e1000_82543) { + switch (hw->mac_type) { + case e1000_82542_rev2_0: + case e1000_82542_rev2_1: hw->bus_type = e1000_bus_type_unknown; hw->bus_speed = e1000_bus_speed_unknown; hw->bus_width = e1000_bus_width_unknown; - return; - } - - status = E1000_READ_REG(hw, STATUS); - hw->bus_type = (status & E1000_STATUS_PCIX_MODE) ? - e1000_bus_type_pcix : e1000_bus_type_pci; + break; + default: + status = E1000_READ_REG(hw, STATUS); + hw->bus_type = (status & E1000_STATUS_PCIX_MODE) ? + e1000_bus_type_pcix : e1000_bus_type_pci; - if(hw->device_id == E1000_DEV_ID_82546EB_QUAD_COPPER) { - hw->bus_speed = (hw->bus_type == e1000_bus_type_pci) ? - e1000_bus_speed_66 : e1000_bus_speed_120; - } else if(hw->bus_type == e1000_bus_type_pci) { - hw->bus_speed = (status & E1000_STATUS_PCI66) ? - e1000_bus_speed_66 : e1000_bus_speed_33; - } else { - switch (status & E1000_STATUS_PCIX_SPEED) { - case E1000_STATUS_PCIX_SPEED_66: - hw->bus_speed = e1000_bus_speed_66; - break; - case E1000_STATUS_PCIX_SPEED_100: - hw->bus_speed = e1000_bus_speed_100; - break; - case E1000_STATUS_PCIX_SPEED_133: - hw->bus_speed = e1000_bus_speed_133; - break; - default: - hw->bus_speed = e1000_bus_speed_reserved; - break; + if(hw->device_id == E1000_DEV_ID_82546EB_QUAD_COPPER) { + hw->bus_speed = (hw->bus_type == e1000_bus_type_pci) ? + e1000_bus_speed_66 : e1000_bus_speed_120; + } else if(hw->bus_type == e1000_bus_type_pci) { + hw->bus_speed = (status & E1000_STATUS_PCI66) ? + e1000_bus_speed_66 : e1000_bus_speed_33; + } else { + switch (status & E1000_STATUS_PCIX_SPEED) { + case E1000_STATUS_PCIX_SPEED_66: + hw->bus_speed = e1000_bus_speed_66; + break; + case E1000_STATUS_PCIX_SPEED_100: + hw->bus_speed = e1000_bus_speed_100; + break; + case E1000_STATUS_PCIX_SPEED_133: + hw->bus_speed = e1000_bus_speed_133; + break; + default: + hw->bus_speed = e1000_bus_speed_reserved; + break; + } } + hw->bus_width = (status & E1000_STATUS_BUS64) ? + e1000_bus_width_64 : e1000_bus_width_32; + break; } - hw->bus_width = (status & E1000_STATUS_BUS64) ? - e1000_bus_width_64 : e1000_bus_width_32; } /****************************************************************************** * Reads a value from one of the devices registers using port I/O (as opposed @@ -4738,6 +4741,7 @@ uint16_t agc_value = 0; uint16_t cur_agc, min_agc = IGP01E1000_AGC_LENGTH_TABLE_SIZE; uint16_t i, phy_data; + uint16_t cable_length; DEBUGFUNC("e1000_get_cable_length"); @@ -4749,10 +4753,11 @@ &phy_data); if(ret_val) return ret_val; + cable_length = (phy_data & M88E1000_PSSR_CABLE_LENGTH) >> + M88E1000_PSSR_CABLE_LENGTH_SHIFT; /* Convert the enum value to ranged values */ - switch((phy_data & M88E1000_PSSR_CABLE_LENGTH) >> - M88E1000_PSSR_CABLE_LENGTH_SHIFT) { + switch (cable_length) { case e1000_cable_length_50: *min_length = 0; *max_length = e1000_igp_cable_length_50; @@ -4919,8 +4924,7 @@ return ret_val; hw->speed_downgraded = (phy_data & IGP01E1000_PLHR_SS_DOWNGRADE) ? 1 : 0; - } - else if(hw->phy_type == e1000_phy_m88) { + } else if(hw->phy_type == e1000_phy_m88) { ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); if(ret_val) diff -Nru a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h --- a/drivers/net/e1000/e1000_hw.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/e1000/e1000_hw.h 2005-03-07 14:54:18 -08:00 @@ -369,6 +369,7 @@ #define E1000_DEV_ID_82546GB_SERDES 0x107B #define E1000_DEV_ID_82546GB_PCIE 0x108A #define E1000_DEV_ID_82547EI 0x1019 + #define NODE_ADDRESS_SIZE 6 #define ETH_LENGTH_OF_ADDRESS 6 @@ -1734,6 +1735,9 @@ #define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */ #define PHY_EXT_STATUS 0x0F /* Extended Status Reg */ +#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */ +#define MAX_PHY_MULTI_PAGE_REG 0xF /* Registers equal on all pages */ + /* M88E1000 Specific Registers */ #define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */ #define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Register */ @@ -1794,8 +1798,7 @@ #define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 -#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */ -#define MAX_PHY_MULTI_PAGE_REG 0xF /*Registers that are equal on all pages*/ + /* PHY Control Register */ #define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ #define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */ @@ -2098,7 +2101,11 @@ #define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 #define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 + /* Bit definitions for valid PHY IDs. */ +/* I = Integrated + * E = External + */ #define M88E1000_E_PHY_ID 0x01410C50 #define M88E1000_I_PHY_ID 0x01410C30 #define M88E1011_I_PHY_ID 0x01410C20 diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/e1000/e1000_main.c 2005-03-07 14:54:18 -08:00 @@ -35,6 +35,14 @@ * - More errlogging support from Jon Mason * - Fix TSO issues on PPC64 machines -- Jon Mason * + * 5.7.1 12/16/04 + * - Resurrect 82547EI/GI related fix in e1000_intr to avoid deadlocks. This + * fix was removed as it caused system instability. The suspected cause of + * this is the called to e1000_irq_disable in e1000_intr. Inlined the + * required piece of e1000_irq_disable into e1000_intr - Anton Blanchard + * 5.7.0 12/10/04 + * - include fix to the condition that determines when to quit NAPI - Robert Olsson + * - use netif_poll_{disable/enable} to synchronize between NAPI and i/f up/down * 5.6.5 11/01/04 * - Enabling NETIF_F_SG without checksum offload is illegal - John Mason @@ -57,7 +65,7 @@ #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.6.10.1-k2"DRIVERNAPI; +char e1000_driver_version[] = "5.7.6-k2"DRIVERNAPI; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table @@ -81,6 +89,7 @@ INTEL_E1000_ETHERNET_DEVICE(0x1011), INTEL_E1000_ETHERNET_DEVICE(0x1012), INTEL_E1000_ETHERNET_DEVICE(0x1013), + INTEL_E1000_ETHERNET_DEVICE(0x1014), INTEL_E1000_ETHERNET_DEVICE(0x1015), INTEL_E1000_ETHERNET_DEVICE(0x1016), INTEL_E1000_ETHERNET_DEVICE(0x1017), @@ -308,6 +317,9 @@ mod_timer(&adapter->watchdog_timer, jiffies); e1000_irq_enable(adapter); +#ifdef CONFIG_E1000_NAPI + netif_poll_enable(netdev); +#endif return 0; } @@ -321,6 +333,10 @@ del_timer_sync(&adapter->tx_fifo_stall_timer); del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->phy_info_timer); + +#ifdef CONFIG_E1000_NAPI + netif_poll_disable(netdev); +#endif adapter->link_speed = 0; adapter->link_duplex = 0; netif_carrier_off(netdev); @@ -414,6 +430,7 @@ int i; int err; uint16_t eeprom_data; + uint16_t eeprom_apme_mask = E1000_EEPROM_APME; if((err = pci_enable_device(pdev))) return err; @@ -510,9 +527,6 @@ } #ifdef NETIF_F_TSO - /* Disbaled for now until root-cause is found for - * hangs reported against non-IA archs. TSO can be - * enabled using ethtool -K eth tso on */ if((adapter->hw.mac_type >= e1000_82544) && (adapter->hw.mac_type != e1000_82547)) netdev->features |= NETIF_F_TSO; @@ -584,6 +598,11 @@ case e1000_82542_rev2_1: case e1000_82543: break; + case e1000_82544: + e1000_read_eeprom(&adapter->hw, + EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data); + eeprom_apme_mask = E1000_EEPROM_82544_APM; + break; case e1000_82546: case e1000_82546_rev_3: if((E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_FUNC_1) @@ -598,7 +617,7 @@ EEPROM_INIT_CONTROL3_PORT_A, 1, &eeprom_data); break; } - if(eeprom_data & E1000_EEPROM_APME) + if(eeprom_data & eeprom_apme_mask) adapter->wol |= E1000_WUFC_MAG; /* reset the hardware with the new settings */ @@ -807,6 +826,31 @@ } /** + * e1000_check_64k_bound - check that memory doesn't cross 64kB boundary + * @adapter: address of board private structure + * @begin: address of beginning of memory + * @end: address of end of memory + **/ +static inline boolean_t +e1000_check_64k_bound(struct e1000_adapter *adapter, + void *start, unsigned long len) +{ + unsigned long begin = (unsigned long) start; + unsigned long end = begin + len; + + /* first rev 82545 and 82546 need to not allow any memory + * write location to cross a 64k boundary due to errata 23 */ + if (adapter->hw.mac_type == e1000_82545 || + adapter->hw.mac_type == e1000_82546 ) { + + /* check buffer doesn't cross 64kB */ + return ((begin ^ (end - 1)) >> 16) != 0 ? FALSE : TRUE; + } + + return TRUE; +} + +/** * e1000_setup_tx_resources - allocate Tx resources (Descriptors) * @adapter: board private structure * @@ -824,7 +868,7 @@ txdr->buffer_info = vmalloc(size); if(!txdr->buffer_info) { DPRINTK(PROBE, ERR, - "Unble to Allocate Memory for the Transmit descriptor ring\n"); + "Unable to Allocate Memory for the Transmit descriptor ring\n"); return -ENOMEM; } memset(txdr->buffer_info, 0, size); @@ -836,11 +880,42 @@ txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); if(!txdr->desc) { +setup_tx_desc_die: DPRINTK(PROBE, ERR, - "Unble to Allocate Memory for the Transmit descriptor ring\n"); + "Unable to Allocate Memory for the Transmit descriptor ring\n"); vfree(txdr->buffer_info); return -ENOMEM; } + + /* fix for errata 23, cant cross 64kB boundary */ + if (!e1000_check_64k_bound(adapter, txdr->desc, txdr->size)) { + void *olddesc = txdr->desc; + dma_addr_t olddma = txdr->dma; + DPRINTK(TX_ERR,ERR,"txdr align check failed: %u bytes at %p\n", + txdr->size, txdr->desc); + /* try again, without freeing the previous */ + txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); + /* failed allocation, critial failure */ + if(!txdr->desc) { + pci_free_consistent(pdev, txdr->size, olddesc, olddma); + goto setup_tx_desc_die; + } + + if (!e1000_check_64k_bound(adapter, txdr->desc, txdr->size)) { + /* give up */ + pci_free_consistent(pdev, txdr->size, + txdr->desc, txdr->dma); + pci_free_consistent(pdev, txdr->size, olddesc, olddma); + DPRINTK(PROBE, ERR, + "Unable to Allocate aligned Memory for the Transmit" + " descriptor ring\n"); + vfree(txdr->buffer_info); + return -ENOMEM; + } else { + /* free old, move on with the new one since its okay */ + pci_free_consistent(pdev, txdr->size, olddesc, olddma); + } + } memset(txdr->desc, 0, txdr->size); txdr->next_to_use = 0; @@ -945,7 +1020,7 @@ rxdr->buffer_info = vmalloc(size); if(!rxdr->buffer_info) { DPRINTK(PROBE, ERR, - "Unble to Allocate Memory for the Recieve descriptor ring\n"); + "Unable to Allocate Memory for the Recieve descriptor ring\n"); return -ENOMEM; } memset(rxdr->buffer_info, 0, size); @@ -958,11 +1033,43 @@ rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma); if(!rxdr->desc) { +setup_rx_desc_die: DPRINTK(PROBE, ERR, "Unble to Allocate Memory for the Recieve descriptor ring\n"); vfree(rxdr->buffer_info); return -ENOMEM; } + + /* fix for errata 23, cant cross 64kB boundary */ + if (!e1000_check_64k_bound(adapter, rxdr->desc, rxdr->size)) { + void *olddesc = rxdr->desc; + dma_addr_t olddma = rxdr->dma; + DPRINTK(RX_ERR,ERR, + "rxdr align check failed: %u bytes at %p\n", + rxdr->size, rxdr->desc); + /* try again, without freeing the previous */ + rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma); + /* failed allocation, critial failure */ + if(!rxdr->desc) { + pci_free_consistent(pdev, rxdr->size, olddesc, olddma); + goto setup_rx_desc_die; + } + + if (!e1000_check_64k_bound(adapter, rxdr->desc, rxdr->size)) { + /* give up */ + pci_free_consistent(pdev, rxdr->size, + rxdr->desc, rxdr->dma); + pci_free_consistent(pdev, rxdr->size, olddesc, olddma); + DPRINTK(PROBE, ERR, + "Unable to Allocate aligned Memory for the" + " Receive descriptor ring\n"); + vfree(rxdr->buffer_info); + return -ENOMEM; + } else { + /* free old, move on with the new one since its okay */ + pci_free_consistent(pdev, rxdr->size, olddesc, olddma); + } + } memset(rxdr->desc, 0, rxdr->size); rxdr->next_to_clean = 0; @@ -1096,6 +1203,7 @@ struct e1000_buffer *buffer_info) { struct pci_dev *pdev = adapter->pdev; + if(buffer_info->dma) { pci_unmap_page(pdev, buffer_info->dma, @@ -1124,6 +1232,11 @@ /* Free all the Tx ring sk_buffs */ + if (likely(adapter->previous_buffer_info.skb != NULL)) { + e1000_unmap_and_free_tx_resource(adapter, + &adapter->previous_buffer_info); + } + for(i = 0; i < tx_ring->count; i++) { buffer_info = &tx_ring->buffer_info[i]; e1000_unmap_and_free_tx_resource(adapter, buffer_info); @@ -1425,7 +1538,6 @@ struct e1000_adapter *adapter = (struct e1000_adapter *) data; struct net_device *netdev = adapter->netdev; struct e1000_desc_ring *txdr = &adapter->tx_ring; - unsigned int i; uint32_t link; e1000_check_for_link(&adapter->hw); @@ -1505,12 +1617,8 @@ /* Cause software interrupt to ensure rx ring is cleaned */ E1000_WRITE_REG(&adapter->hw, ICS, E1000_ICS_RXDMT0); - /* Early detection of hung controller */ - i = txdr->next_to_clean; - if(txdr->buffer_info[i].dma && - time_after(jiffies, txdr->buffer_info[i].time_stamp + HZ) && - !(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_TXOFF)) - netif_stop_queue(netdev); + /* Force detection of hung controller every watchdog period*/ + adapter->detect_tx_hung = TRUE; /* Reset the timer */ mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); @@ -1522,7 +1630,7 @@ #define E1000_TX_FLAGS_VLAN_MASK 0xffff0000 #define E1000_TX_FLAGS_VLAN_SHIFT 16 -static inline boolean_t +static inline int e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb) { #ifdef NETIF_F_TSO @@ -1531,8 +1639,15 @@ uint32_t cmd_length = 0; uint16_t ipcse, tucse, mss; uint8_t ipcss, ipcso, tucss, tucso, hdr_len; + int err; if(skb_shinfo(skb)->tso_size) { + if (skb_header_cloned(skb)) { + err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); + if (err) + return err; + } + hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); mss = skb_shinfo(skb)->tso_size; skb->nh.iph->tot_len = 0; @@ -1569,11 +1684,11 @@ if(++i == adapter->tx_ring.count) i = 0; adapter->tx_ring.next_to_use = i; - return TRUE; + return 1; } #endif - return FALSE; + return 0; } static inline boolean_t @@ -1798,6 +1913,7 @@ unsigned int nr_frags = 0; unsigned int mss = 0; int count = 0; + int tso; unsigned int f; len -= skb->data_len; @@ -1869,7 +1985,13 @@ first = adapter->tx_ring.next_to_use; - if(likely(e1000_tso(adapter, skb))) + tso = e1000_tso(adapter, skb); + if (tso < 0) { + dev_kfree_skb_any(skb); + return NETDEV_TX_OK; + } + + if (likely(tso)) tx_flags |= E1000_TX_FLAGS_TSO; else if(likely(e1000_tx_csum(adapter, skb))) tx_flags |= E1000_TX_FLAGS_CSUM; @@ -2151,10 +2273,28 @@ __netif_rx_schedule(netdev); } #else + /* Writing IMC and IMS is needed for 82547. + Due to Hub Link bus being occupied, an interrupt + de-assertion message is not able to be sent. + When an interrupt assertion message is generated later, + two messages are re-ordered and sent out. + That causes APIC to think 82547 is in de-assertion + state, while 82547 is in assertion state, resulting + in dead lock. Writing IMC forces 82547 into + de-assertion state. + */ + if(hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2){ + atomic_inc(&adapter->irq_sem); + E1000_WRITE_REG(&adapter->hw, IMC, ~0); + } + for(i = 0; i < E1000_MAX_INTR; i++) if(unlikely(!e1000_clean_rx_irq(adapter) & !e1000_clean_tx_irq(adapter))) break; + + if(hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2) + e1000_irq_enable(adapter); #endif return IRQ_HANDLED; @@ -2174,24 +2314,21 @@ int tx_cleaned; int work_done = 0; - if (!netif_carrier_ok(netdev)) - goto quit_polling; - tx_cleaned = e1000_clean_tx_irq(adapter); e1000_clean_rx_irq(adapter, &work_done, work_to_do); *budget -= work_done; netdev->quota -= work_done; - /* if no Rx and Tx cleanup work was done, exit the polling mode */ - if(!tx_cleaned || (work_done < work_to_do) || + /* if no Tx and not enough Rx work done, exit the polling mode */ + if((!tx_cleaned && (work_done < work_to_do)) || !netif_running(netdev)) { -quit_polling: netif_rx_complete(netdev); + netif_rx_complete(netdev); e1000_irq_enable(adapter); return 0; } - return (work_done >= work_to_do); + return 1; } #endif @@ -2215,11 +2352,34 @@ eop_desc = E1000_TX_DESC(*tx_ring, eop); while(eop_desc->upper.data & cpu_to_le32(E1000_TXD_STAT_DD)) { + /* pre-mature writeback of Tx descriptors */ + /* clear (free buffers and unmap pci_mapping) */ + /* previous_buffer_info */ + if (likely(adapter->previous_buffer_info.skb != NULL)) { + e1000_unmap_and_free_tx_resource(adapter, + &adapter->previous_buffer_info); + } + for(cleaned = FALSE; !cleaned; ) { tx_desc = E1000_TX_DESC(*tx_ring, i); buffer_info = &tx_ring->buffer_info[i]; + cleaned = (i == eop); + + /* pre-mature writeback of Tx descriptors */ + /* save the cleaning of the this for the */ + /* next iteration */ + if (cleaned) { + memcpy(&adapter->previous_buffer_info, + buffer_info, + sizeof(struct e1000_buffer)); + memset(buffer_info, + 0, + sizeof(struct e1000_buffer)); + } else { + e1000_unmap_and_free_tx_resource(adapter, + buffer_info); + } - e1000_unmap_and_free_tx_resource(adapter, buffer_info); tx_desc->buffer_addr = 0; tx_desc->lower.data = 0; tx_desc->upper.data = 0; @@ -2241,6 +2401,16 @@ netif_wake_queue(netdev); spin_unlock(&adapter->tx_lock); + + if(adapter->detect_tx_hung) { + /* detect a transmit hang in hardware, this serializes the + * check with the clearing of time_stamp and movement of i */ + adapter->detect_tx_hung = FALSE; + if(tx_ring->buffer_info[i].dma && + time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ) && + !(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_TXOFF)) + netif_stop_queue(netdev); + } return cleaned; } @@ -2407,19 +2577,43 @@ struct e1000_rx_desc *rx_desc; struct e1000_buffer *buffer_info; struct sk_buff *skb; - unsigned int i; + unsigned int i, bufsz; i = rx_ring->next_to_use; buffer_info = &rx_ring->buffer_info[i]; while(!buffer_info->skb) { - skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN); + bufsz = adapter->rx_buffer_len + NET_IP_ALIGN; + skb = dev_alloc_skb(bufsz); if(unlikely(!skb)) { /* Better luck next round */ break; } + /* fix for errata 23, cant cross 64kB boundary */ + if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) { + struct sk_buff *oldskb = skb; + DPRINTK(RX_ERR,ERR, + "skb align check failed: %u bytes at %p\n", + bufsz, skb->data); + /* try again, without freeing the previous */ + skb = dev_alloc_skb(bufsz); + if (!skb) { + dev_kfree_skb(oldskb); + break; + } + if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) { + /* give up */ + dev_kfree_skb(skb); + dev_kfree_skb(oldskb); + break; /* while !buffer_info->skb */ + } else { + /* move on with the new one */ + dev_kfree_skb(oldskb); + } + } + /* Make buffer alignment 2 beyond a 16 byte boundary * this will result in a 16 byte aligned IP header after * the 14 byte MAC header is removed @@ -2434,6 +2628,25 @@ skb->data, adapter->rx_buffer_len, PCI_DMA_FROMDEVICE); + + /* fix for errata 23, cant cross 64kB boundary */ + if(!e1000_check_64k_bound(adapter, + (void *)(unsigned long)buffer_info->dma, + adapter->rx_buffer_len)) { + DPRINTK(RX_ERR,ERR, + "dma align check failed: %u bytes at %ld\n", + adapter->rx_buffer_len, (unsigned long)buffer_info->dma); + + dev_kfree_skb(skb); + buffer_info->skb = NULL; + + pci_unmap_single(pdev, + buffer_info->dma, + adapter->rx_buffer_len, + PCI_DMA_FROMDEVICE); + + break; /* while !buffer_info->skb */ + } rx_desc = E1000_RX_DESC(*rx_ring, i); rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c --- a/drivers/net/eepro100.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/eepro100.c 2005-03-07 14:54:17 -08:00 @@ -2281,7 +2281,7 @@ } #ifdef CONFIG_PM -static int eepro100_suspend(struct pci_dev *pdev, u32 state) +static int eepro100_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); struct speedo_private *sp = netdev_priv(dev); @@ -2299,7 +2299,7 @@ /* XXX call pci_set_power_state ()? */ pci_disable_device(pdev); - pci_set_power_state (pdev, 3); + pci_set_power_state (pdev, PCI_D3hot); return 0; } @@ -2309,7 +2309,7 @@ struct speedo_private *sp = netdev_priv(dev); void __iomem *ioaddr = sp->regs; - pci_set_power_state(pdev, 0); + pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); pci_enable_device(pdev); pci_set_master(pdev); @@ -2355,12 +2355,8 @@ } static struct pci_device_id eepro100_pci_tbl[] = { - { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, - PCI_ANY_ID, PCI_ANY_ID, }, - { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, - PCI_ANY_ID, PCI_ANY_ID, }, - { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_7, - PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_INTEL, 0x1229, PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_INTEL, 0x1209, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x1029, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x1030, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x1031, PCI_ANY_ID, PCI_ANY_ID, }, @@ -2380,7 +2376,6 @@ { PCI_VENDOR_ID_INTEL, 0x1050, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x1059, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x1227, PCI_ANY_ID, PCI_ANY_ID, }, - { PCI_VENDOR_ID_INTEL, 0x1228, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x2449, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x2459, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_INTEL, 0x245D, PCI_ANY_ID, PCI_ANY_ID, }, diff -Nru a/drivers/net/epic100.c b/drivers/net/epic100.c --- a/drivers/net/epic100.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/epic100.c 2005-03-07 14:54:17 -08:00 @@ -1624,7 +1624,7 @@ #ifdef CONFIG_PM -static int epic_suspend (struct pci_dev *pdev, u32 state) +static int epic_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); long ioaddr = dev->base_addr; diff -Nru a/drivers/net/gianfar.c b/drivers/net/gianfar.c --- a/drivers/net/gianfar.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/gianfar.c 2005-03-07 14:54:16 -08:00 @@ -377,6 +377,8 @@ ADVERTISED_1000baseT_Full); mii_info->autoneg = 1; + spin_lock_init(&mii_info->mdio_lock); + mii_info->mii_id = priv->einfo->phyid; mii_info->dev = dev; 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 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/ibm_emac/ibm_emac.h 2005-03-07 14:54:18 -08:00 @@ -237,6 +237,10 @@ #define EMAC_RWMR_DEFAULT 0x1000a200 #define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_2_32 #define EMAC_TMR1_DEFAULT 0xa00f0000 +#elif defined(CONFIG_440SP) +#define EMAC_RWMR_DEFAULT 0x08002000 +#define EMAC_TMR0_DEFAULT EMAC_TMR0_TFAE_128_2048 +#define EMAC_TMR1_DEFAULT 0xf8200000 #else #define EMAC_RWMR_DEFAULT 0x0f002000 #define EMAC_TMR0_DEFAULT 0x00000000 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 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.c 2005-03-07 14:54:16 -08:00 @@ -1041,7 +1041,7 @@ /* set speed (default is 10Mb) */ switch (speed) { case SPEED_1000: - mode_reg |= EMAC_M1_JUMBO_ENABLE | EMAC_M1_RFS_16K; + mode_reg |= EMAC_M1_RFS_16K; if (fep->rgmii_dev) { struct ibm_ocp_rgmii *rgmii = RGMII_PRIV(fep->rgmii_dev); @@ -1118,6 +1118,7 @@ { struct ocp_enet_private *fep = dev->priv; int old_mtu = dev->mtu; + unsigned long mode_reg; emac_t *emacp = fep->emacp; u32 em0mr0; int i, full; @@ -1160,10 +1161,17 @@ fep->rx_skb[i] = NULL; } - /* Set new rx_buffer_size and advertise new mtu */ - fep->rx_buffer_size = - new_mtu + ENET_HEADER_SIZE + ENET_FCS_SIZE; + /* Set new rx_buffer_size, jumbo cap, and advertise new mtu */ + mode_reg = in_be32(&emacp->em0mr1); + if (new_mtu > ENET_DEF_MTU_SIZE) { + mode_reg |= EMAC_M1_JUMBO_ENABLE; + fep->rx_buffer_size = EMAC_MAX_FRAME; + } else { + mode_reg &= ~EMAC_M1_JUMBO_ENABLE; + fep->rx_buffer_size = ENET_DEF_BUF_SIZE; + } dev->mtu = new_mtu; + out_be32(&emacp->em0mr1, mode_reg); /* Re-init rx skbs */ fep->rx_slot = 0; 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 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ibm_emac/ibm_emac_core.h 2005-03-07 14:54:16 -08:00 @@ -77,6 +77,8 @@ #define ENET_HEADER_SIZE 14 #define ENET_FCS_SIZE 4 +#define ENET_DEF_MTU_SIZE 1500 +#define ENET_DEF_BUF_SIZE (ENET_DEF_MTU_SIZE + ENET_HEADER_SIZE + ENET_FCS_SIZE) #define EMAC_MIN_FRAME 64 #define EMAC_MAX_FRAME 9018 #define EMAC_MIN_MTU (EMAC_MIN_FRAME - ENET_HEADER_SIZE - ENET_FCS_SIZE) diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c --- a/drivers/net/ibmlana.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ibmlana.c 2005-03-07 14:54:16 -08:00 @@ -133,13 +133,14 @@ static void dumpmem(struct net_device *dev, u32 start, u32 len) { + ibmlana_priv *priv = netdev_priv(dev); int z; printk("Address %04x:\n", start); for (z = 0; z < len; z++) { if ((z & 15) == 0) printk("%04x:", z); - printk(" %02x", isa_readb(dev->mem_start + start + z)); + printk(" %02x", readb(priv->base + start + z)); if ((z & 15) == 15) printk("\n"); } @@ -231,7 +232,7 @@ static void InitDscrs(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); u32 addr, baddr, raddr; int z; tda_t tda; @@ -240,8 +241,8 @@ /* initialize RAM */ - isa_memset_io(dev->mem_start, 0xaa, - dev->mem_start - dev->mem_start); + memset_io(priv->base, 0xaa, + dev->mem_start - dev->mem_start); /* XXX: typo? */ /* setup n TX descriptors - independent of RAM size */ @@ -260,7 +261,7 @@ else tda.link = addr + sizeof(tda_t); tda.link |= 1; - isa_memcpy_toio(dev->mem_start + addr, &tda, sizeof(tda_t)); + memcpy_toio(priv->base + addr, &tda, sizeof(tda_t)); addr += sizeof(tda_t); baddr += PKTSIZE; } @@ -280,7 +281,7 @@ rra.starthi = 0; rra.cntlo = PKTSIZE >> 1; rra.cnthi = 0; - isa_memcpy_toio(dev->mem_start + raddr, &rra, sizeof(rra_t)); + memcpy_toio(priv->base + raddr, &rra, sizeof(rra_t)); rda.status = 0; rda.length = 0; @@ -292,7 +293,7 @@ else rda.link = 1; rda.inuse = 1; - isa_memcpy_toio(dev->mem_start + addr, &rda, sizeof(rda_t)); + memcpy_toio(priv->base + addr, &rda, sizeof(rda_t)); baddr += PKTSIZE; raddr += sizeof(rra_t); @@ -313,7 +314,7 @@ static int InitSONIC(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); /* set up start & end of resource area */ @@ -379,6 +380,7 @@ static void InitBoard(struct net_device *dev) { + ibmlana_priv *priv = netdev_priv(dev); int camcnt; camentry_t cams[16]; u32 cammask; @@ -429,8 +431,8 @@ /* feed CDA into SONIC, initialize RCR value (always get broadcasts) */ - isa_memcpy_toio(dev->mem_start, cams, sizeof(camentry_t) * camcnt); - isa_memcpy_toio(dev->mem_start + (sizeof(camentry_t) * camcnt), &cammask, sizeof(cammask)); + memcpy_toio(priv->base, cams, sizeof(camentry_t) * camcnt); + memcpy_toio(priv->base + (sizeof(camentry_t) * camcnt), &cammask, sizeof(cammask)); #ifdef DEBUG printk("CAM setup:\n"); @@ -520,7 +522,7 @@ static void StartTx(struct net_device *dev, int descr) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); int addr; addr = priv->tdastart + (descr * sizeof(tda_t)); @@ -543,7 +545,7 @@ static void irqrbe_handler(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); /* point the SONIC back to the RRA start */ @@ -555,7 +557,7 @@ static void irqrx_handler(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); rda_t rda; u32 rdaaddr, lrdaaddr; @@ -566,7 +568,7 @@ rdaaddr = priv->rdastart + (priv->nextrxdescr * sizeof(rda_t)); lrdaaddr = priv->rdastart + (priv->lastrxdescr * sizeof(rda_t)); - isa_memcpy_fromio(&rda, dev->mem_start + rdaaddr, sizeof(rda_t)); + memcpy_fromio(&rda, priv->base + rdaaddr, sizeof(rda_t)); /* iron out upper word halves of fields we use - SONIC will duplicate bits 0..15 to 16..31 */ @@ -593,8 +595,8 @@ else { /* copy out data */ - isa_memcpy_fromio(skb_put(skb, rda.length), - dev->mem_start + + memcpy_fromio(skb_put(skb, rda.length), + priv->base + rda.startlo, rda.length); /* set up skb fields */ @@ -627,14 +629,14 @@ rda.link = 1; rda.inuse = 1; - isa_memcpy_toio(dev->mem_start + rdaaddr, &rda, + memcpy_toio(priv->base + rdaaddr, &rda, sizeof(rda_t)); /* set up link and EOL = 0 in currently last descriptor. Only write the link field since the SONIC may currently already access the other fields. */ - isa_memcpy_toio(dev->mem_start + lrdaaddr + 20, &rdaaddr, 4); + memcpy_toio(priv->base + lrdaaddr + 20, &rdaaddr, 4); /* advance indices */ @@ -648,11 +650,11 @@ static void irqtx_handler(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); tda_t tda; /* fetch descriptor (we forgot the size ;-) */ - isa_memcpy_fromio(&tda, dev->mem_start + priv->tdastart + (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t)); + memcpy_fromio(&tda, priv->base + priv->tdastart + (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t)); /* update statistics */ priv->stat.tx_packets++; @@ -672,11 +674,11 @@ static void irqtxerr_handler(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); tda_t tda; /* fetch descriptor to check status */ - isa_memcpy_fromio(&tda, dev->mem_start + priv->tdastart + (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t)); + memcpy_fromio(&tda, priv->base + priv->tdastart + (priv->currtxdescr * sizeof(tda_t)), sizeof(tda_t)); /* update statistics */ priv->stat.tx_errors++; @@ -753,9 +755,7 @@ if (dev == NULL) return len; - if (dev->priv == NULL) - return len; - priv = (ibmlana_priv *) dev->priv; + priv = netdev_priv(dev); /* print info */ @@ -778,7 +778,7 @@ static int ibmlana_open(struct net_device *dev) { int result; - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); /* register resources - only necessary for IRQ */ @@ -814,7 +814,7 @@ static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); int retval = 0, tmplen, addr; unsigned long flags; tda_t tda; @@ -834,7 +834,7 @@ if (tmplen < 60) tmplen = 60; baddr = priv->txbufstart + (priv->nexttxdescr * PKTSIZE); - isa_memcpy_toio(dev->mem_start + baddr, skb->data, skb->len); + memcpy_toio(priv->base + baddr, skb->data, skb->len); /* copy filler into RAM - in case we're filling up... we're filling a bit more than necessary, but that doesn't harm @@ -846,16 +846,16 @@ unsigned int destoffs = skb->len, l = strlen(fill); while (destoffs < tmplen) { - isa_memcpy_toio(dev->mem_start + baddr + destoffs, fill, l); + memcpy_toio(priv->base + baddr + destoffs, fill, l); destoffs += l; } } /* set up the new frame descriptor */ addr = priv->tdastart + (priv->nexttxdescr * sizeof(tda_t)); - isa_memcpy_fromio(&tda, dev->mem_start + addr, sizeof(tda_t)); + memcpy_fromio(&tda, priv->base + addr, sizeof(tda_t)); tda.length = tda.fraglength = tmplen; - isa_memcpy_toio(dev->mem_start + addr, &tda, sizeof(tda_t)); + memcpy_toio(priv->base + addr, &tda, sizeof(tda_t)); /* if there were no active descriptors, trigger the SONIC */ spin_lock_irqsave(&priv->lock, flags); @@ -881,7 +881,7 @@ static struct net_device_stats *ibmlana_stats(struct net_device *dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); return &priv->stat; } @@ -903,7 +903,6 @@ static int ibmlana_probe(struct net_device *dev) { - int force_detect = 0; int slot, z; int base = 0, irq = 0, iobase = 0, memlen = 0; ibmlana_priv *priv; @@ -915,10 +914,6 @@ if (MCA_bus == 0) return -ENODEV; - /* start address of 1 --> forced detection */ - if (dev->mem_start == 1) - force_detect = 1; - base = dev->mem_start; irq = dev->irq; @@ -952,18 +947,12 @@ return -EBUSY; } - /* make procfs entries */ - mca_set_adapter_name(slot, "IBM LAN Adapter/A"); - mca_set_adapter_procfn(slot, (MCA_ProcFn) ibmlana_getinfo, dev); - - mca_mark_as_used(slot); - - /* allocate structure */ - priv = dev->priv; + priv = netdev_priv(dev); priv->slot = slot; priv->realirq = irq; priv->medium = medium; spin_lock_init(&priv->lock); + /* set base + irq for this device (irq not allocated so far) */ @@ -972,6 +961,20 @@ dev->mem_end = base + memlen; dev->base_addr = iobase; + priv->base = ioremap(base, memlen); + if (!priv->base) { + printk(KERN_ERR "%s: cannot remap memory!\n", DRV_NAME); + startslot = slot + 1; + release_region(iobase, IBM_LANA_IORANGE); + return -EBUSY; + } + + /* make procfs entries */ + mca_set_adapter_name(slot, "IBM LAN Adapter/A"); + mca_set_adapter_procfn(slot, (MCA_ProcFn) ibmlana_getinfo, dev); + + mca_mark_as_used(slot); + /* set methods */ dev->open = ibmlana_open; @@ -1042,11 +1045,12 @@ break; } if (register_netdev(dev)) { - ibmlana_priv *priv = dev->priv; + ibmlana_priv *priv = netdev_priv(dev); release_region(dev->base_addr, IBM_LANA_IORANGE); mca_mark_as_unused(priv->slot); mca_set_adapter_name(priv->slot, ""); mca_set_adapter_procfn(priv->slot, NULL, NULL); + iounmap(priv->base); free_netdev(dev); break; } @@ -1061,13 +1065,14 @@ for (z = 0; z < DEVMAX; z++) { struct net_device *dev = moddevs[z]; if (dev) { - ibmlana_priv *priv = (ibmlana_priv *) dev->priv; + ibmlana_priv *priv = netdev_priv(dev); unregister_netdev(dev); /*DeinitBoard(dev); */ release_region(dev->base_addr, IBM_LANA_IORANGE); mca_mark_as_unused(priv->slot); mca_set_adapter_name(priv->slot, ""); mca_set_adapter_procfn(priv->slot, NULL, NULL); + iounmap(priv->base); free_netdev(dev); } } diff -Nru a/drivers/net/ibmlana.h b/drivers/net/ibmlana.h --- a/drivers/net/ibmlana.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/ibmlana.h 2005-03-07 14:54:18 -08:00 @@ -37,6 +37,7 @@ nexttxdescr, /* last tx descriptor to be used */ currtxdescr, /* tx descriptor currently tx'ed */ txused[TXBUFCNT]; /* busy flags */ + void __iomem *base; spinlock_t lock; } ibmlana_priv; diff -Nru a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c --- a/drivers/net/ioc3-eth.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ioc3-eth.c 2005-03-07 14:54:16 -08:00 @@ -463,6 +463,29 @@ printk(".\n"); } +static void __ioc3_set_mac_address(struct net_device *dev) +{ + struct ioc3_private *ip = netdev_priv(dev); + struct ioc3 *ioc3 = ip->regs; + + ioc3_w_emar_h((dev->dev_addr[5] << 8) | dev->dev_addr[4]); + ioc3_w_emar_l((dev->dev_addr[3] << 24) | (dev->dev_addr[2] << 16) | + (dev->dev_addr[1] << 8) | dev->dev_addr[0]); +} + +static int ioc3_set_mac_address(struct net_device *dev, void *addr) +{ + struct ioc3_private *ip = netdev_priv(dev); + struct sockaddr *sa = addr; + + memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); + + spin_lock_irq(&ip->ioc3_lock); + __ioc3_set_mac_address(dev); + spin_unlock_irq(&ip->ioc3_lock); + + return 0; +} /* * Caller must hold the ioc3_lock ever for MII readers. This is also @@ -1014,9 +1037,7 @@ (void) ioc3_r_etcdc(); /* Clear on read */ ioc3_w_ercsr(15); /* RX low watermark */ ioc3_w_ertr(0); /* Interrupt immediately */ - ioc3_w_emar_h((dev->dev_addr[5] << 8) | dev->dev_addr[4]); - ioc3_w_emar_l((dev->dev_addr[3] << 24) | (dev->dev_addr[2] << 16) | - (dev->dev_addr[1] << 8) | dev->dev_addr[0]); + __ioc3_set_mac_address(dev); ioc3_w_ehar_h(ip->ehar_h); ioc3_w_ehar_l(ip->ehar_l); ioc3_w_ersr(42); /* XXX should be random */ @@ -1100,6 +1121,7 @@ && dev->device == PCI_DEVICE_ID_SGI_IOC3; } +#ifdef CONFIG_SERIAL_8250 /* * Note about serial ports and consoles: * For console output, everyone uses the IOC3 UARTA (offset 0x178) @@ -1121,15 +1143,14 @@ * "device" routine referred to in this console structure * (ip27prom_console_dev). * - * Also look in ip27-pci.c:pci_fixuop_ioc3() for some comments on working + * Also look in ip27-pci.c:pci_fixup_ioc3() for some comments on working * around ioc3 oddities in this respect. * * The IOC3 serials use a 22MHz clock rate with an additional divider by 3. * (IOC3_BAUD = (22000000 / (3*16))) */ -static inline void ioc3_serial_probe(struct pci_dev *pdev, - struct ioc3 *ioc3) +static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3) { struct serial_struct req; @@ -1160,9 +1181,9 @@ req.iomem_base = (unsigned char *) &ioc3->sregs.uartb; register_serial(&req); } +#endif -static int __devinit ioc3_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { unsigned int sw_physid1, sw_physid2; struct net_device *dev = NULL; @@ -1170,11 +1191,39 @@ struct ioc3 *ioc3; unsigned long ioc3_base, ioc3_size; u32 vendor, model, rev; - int err; + int err, pci_using_dac; + + /* Configure DMA attributes. */ + err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL); + if (!err) { + pci_using_dac = 1; + err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL); + if (err < 0) { + printk(KERN_ERR "%s: Unable to obtain 64 bit DMA " + "for consistent allocations\n", pci_name(pdev)); + goto out; + } + } else { + err = pci_set_dma_mask(pdev, 0xffffffffULL); + if (err) { + printk(KERN_ERR "%s: No usable DMA configuration, " + "aborting.\n", pci_name(pdev)); + goto out; + } + pci_using_dac = 0; + } + + if (pci_enable_device(pdev)) + return -ENODEV; dev = alloc_etherdev(sizeof(struct ioc3_private)); - if (!dev) - return -ENOMEM; + if (!dev) { + err = -ENOMEM; + goto out_disable; + } + + if (pci_using_dac) + dev->features |= NETIF_F_HIGHDMA; err = pci_request_regions(pdev, "ioc3"); if (err) @@ -1237,6 +1286,7 @@ dev->get_stats = ioc3_get_stats; dev->do_ioctl = ioc3_ioctl; dev->set_multicast_list = ioc3_set_multicast_list; + dev->set_mac_address = ioc3_set_mac_address; dev->ethtool_ops = &ioc3_ethtool_ops; #ifdef CONFIG_SGI_IOC3_ETH_HW_TX_CSUM dev->features = NETIF_F_IP_CSUM; @@ -1269,6 +1319,12 @@ pci_release_regions(pdev); out_free: free_netdev(dev); +out_disable: + /* + * We should call pci_disable_device(pdev); here if the IOC3 wasn't + * such a weird device ... + */ +out: return err; } @@ -1282,6 +1338,10 @@ iounmap(ioc3); pci_release_regions(pdev); free_netdev(dev); + /* + * We should call pci_disable_device(pdev); here if the IOC3 wasn't + * such a weird device ... + */ } static struct pci_device_id ioc3_pci_tbl[] = { diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c --- a/drivers/net/irda/donauboe.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/irda/donauboe.c 2005-03-07 14:54:17 -08:00 @@ -1712,7 +1712,7 @@ } static int -toshoboe_gotosleep (struct pci_dev *pci_dev, u32 crap) +toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap) { struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); unsigned long flags; diff -Nru a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h --- a/drivers/net/ixgb/ixgb.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ixgb/ixgb.h 2005-03-07 14:54:16 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -176,6 +176,7 @@ uint64_t hw_csum_tx_error; uint32_t tx_int_delay; boolean_t tx_int_delay_enable; + boolean_t detect_tx_hung; /* RX */ struct ixgb_desc_ring rx_ring; diff -Nru a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c --- a/drivers/net/ixgb/ixgb_ee.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/ixgb/ixgb_ee.c 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -372,11 +372,11 @@ * *****************************************************************************/ void -ixgb_write_eeprom(struct ixgb_hw *hw, - uint16_t offset, - uint16_t data) +ixgb_write_eeprom(struct ixgb_hw *hw, uint16_t offset, uint16_t data) { - /* Prepare the EEPROM for writing */ + struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; + + /* Prepare the EEPROM for writing */ ixgb_setup_eeprom(hw); /* Send the 9-bit EWEN (write enable) command to the EEPROM (5-bit opcode @@ -410,6 +410,9 @@ /* Done with writing */ ixgb_cleanup_eeprom(hw); + /* clear the init_ctrl_reg_1 to signify that the cache is invalidated */ + ee_map->init_ctrl_reg_1 = EEPROM_ICW1_SIGNATURE_CLEAR; + return; } @@ -478,6 +481,9 @@ if (checksum != (uint16_t) EEPROM_SUM) { DEBUGOUT("ixgb_ee: Checksum invalid.\n"); + /* clear the init_ctrl_reg_1 to signify that the cache is + * invalidated */ + ee_map->init_ctrl_reg_1 = EEPROM_ICW1_SIGNATURE_CLEAR; return (FALSE); } diff -Nru a/drivers/net/ixgb/ixgb_ee.h b/drivers/net/ixgb/ixgb_ee.h --- a/drivers/net/ixgb/ixgb_ee.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/ixgb/ixgb_ee.h 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -63,6 +63,7 @@ #define EEPROM_ICW1_SIGNATURE_MASK 0xC000 #define EEPROM_ICW1_SIGNATURE_VALID 0x4000 +#define EEPROM_ICW1_SIGNATURE_CLEAR 0x0000 /* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ #define EEPROM_SUM 0xBABA diff -Nru a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c --- a/drivers/net/ixgb/ixgb_ethtool.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/ixgb/ixgb_ethtool.c 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -63,6 +63,7 @@ {"tx_dropped", IXGB_STAT(net_stats.tx_dropped)}, {"multicast", IXGB_STAT(net_stats.multicast)}, {"collisions", IXGB_STAT(net_stats.collisions)}, + /* { "rx_length_errors", IXGB_STAT(net_stats.rx_length_errors) }, */ {"rx_over_errors", IXGB_STAT(net_stats.rx_over_errors)}, {"rx_crc_errors", IXGB_STAT(net_stats.rx_crc_errors)}, @@ -98,6 +99,7 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev->priv; + ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); ecmd->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); ecmd->port = PORT_FIBRE; @@ -119,6 +121,7 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev->priv; + if(ecmd->autoneg == AUTONEG_ENABLE || ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) return -EINVAL; diff -Nru a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c --- a/drivers/net/ixgb/ixgb_hw.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/ixgb/ixgb_hw.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff -Nru a/drivers/net/ixgb/ixgb_hw.h b/drivers/net/ixgb/ixgb_hw.h --- a/drivers/net/ixgb/ixgb_hw.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ixgb/ixgb_hw.h 2005-03-07 14:54:16 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff -Nru a/drivers/net/ixgb/ixgb_ids.h b/drivers/net/ixgb/ixgb_ids.h --- a/drivers/net/ixgb/ixgb_ids.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/ixgb/ixgb_ids.h 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff -Nru a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c --- a/drivers/net/ixgb/ixgb_main.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/ixgb/ixgb_main.c 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -29,6 +29,9 @@ #include "ixgb.h" /* Change Log + * 1.0.88 01/05/05 + * - include fix to the condition that determines when to quit NAPI - Robert Olsson + * - use netif_poll_{disable/enable} to synchronize between NAPI and i/f up/down * 1.0.84 10/26/04 * - reset buffer_info->dma in Tx resource cleanup logic * 1.0.83 10/12/04 @@ -38,13 +41,14 @@ char ixgb_driver_name[] = "ixgb"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; + #ifndef CONFIG_IXGB_NAPI #define DRIVERNAPI #else #define DRIVERNAPI "-NAPI" #endif -char ixgb_driver_version[] = "1.0.87-k2"DRIVERNAPI; -char ixgb_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; +char ixgb_driver_version[] = "1.0.90-k2"DRIVERNAPI; +char ixgb_copyright[] = "Copyright (c) 1999-2005 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table * @@ -292,6 +296,9 @@ mod_timer(&adapter->watchdog_timer, jiffies); ixgb_irq_enable(adapter); +#ifdef CONFIG_IXGB_NAPI + netif_poll_enable(netdev); +#endif return 0; } @@ -309,6 +316,9 @@ #endif if(kill_watchdog) del_timer_sync(&adapter->watchdog_timer); +#ifdef CONFIG_IXGB_NAPI + netif_poll_disable(netdev); +#endif adapter->link_speed = 0; adapter->link_duplex = 0; netif_carrier_off(netdev); @@ -709,14 +719,8 @@ IXGB_WRITE_REG(hw, TDH, 0); IXGB_WRITE_REG(hw, TDT, 0); - /* don't set up txdctl, it induces performance problems if - * configured incorrectly - txdctl = TXDCTL_PTHRESH_DEFAULT; // prefetch txds below this threshold - txdctl |= (TXDCTL_HTHRESH_DEFAULT // only prefetch if there are this many ready - << IXGB_TXDCTL_HTHRESH_SHIFT); - IXGB_WRITE_REG (hw, TXDCTL, txdctl); - */ - + /* don't set up txdctl, it induces performance problems if configured + * incorrectly */ /* Set the Tx Interrupt Delay register */ IXGB_WRITE_REG(hw, TIDV, adapter->tx_int_delay); @@ -849,10 +853,17 @@ IXGB_WRITE_REG(hw, RDH, 0); IXGB_WRITE_REG(hw, RDT, 0); - /* burst 16 or burst when RXT0*/ - rxdctl = RXDCTL_WTHRESH_DEFAULT << IXGB_RXDCTL_WTHRESH_SHIFT - | RXDCTL_HTHRESH_DEFAULT << IXGB_RXDCTL_HTHRESH_SHIFT - | RXDCTL_PTHRESH_DEFAULT << IXGB_RXDCTL_PTHRESH_SHIFT; + /* set up pre-fetching of receive buffers so we get some before we + * run out (default hardware behavior is to run out before fetching + * more). This sets up to fetch if HTHRESH rx descriptors are avail + * and the descriptors in hw cache are below PTHRESH. This avoids + * the hardware behavior of fetching <=512 descriptors in a single + * burst that pre-empts all other activity, usually causing fifo + * overflows. */ + /* use WTHRESH to burst write 16 descriptors or burst when RXT0 */ + rxdctl = RXDCTL_WTHRESH_DEFAULT << IXGB_RXDCTL_WTHRESH_SHIFT | + RXDCTL_HTHRESH_DEFAULT << IXGB_RXDCTL_HTHRESH_SHIFT | + RXDCTL_PTHRESH_DEFAULT << IXGB_RXDCTL_PTHRESH_SHIFT; IXGB_WRITE_REG(hw, RXDCTL, rxdctl); /* Enable Receive Checksum Offload for TCP and UDP */ @@ -1094,7 +1105,6 @@ struct ixgb_adapter *adapter = (struct ixgb_adapter *)data; struct net_device *netdev = adapter->netdev; struct ixgb_desc_ring *txdr = &adapter->tx_ring; - unsigned int i; ixgb_check_for_link(&adapter->hw); @@ -1137,12 +1147,8 @@ } } - /* Early detection of hung controller */ - i = txdr->next_to_clean; - if(txdr->buffer_info[i].dma && - time_after(jiffies, txdr->buffer_info[i].time_stamp + HZ) && - !(IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_TXOFF)) - netif_stop_queue(netdev); + /* Force detection of hung controller every watchdog period */ + adapter->detect_tx_hung = TRUE; /* generate an interrupt to force clean up of any stragglers */ IXGB_WRITE_REG(&adapter->hw, ICS, IXGB_INT_TXDW); @@ -1155,7 +1161,7 @@ #define IXGB_TX_FLAGS_VLAN 0x00000002 #define IXGB_TX_FLAGS_TSO 0x00000004 -static inline boolean_t +static inline int ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) { #ifdef NETIF_F_TSO @@ -1163,8 +1169,15 @@ unsigned int i; uint8_t ipcss, ipcso, tucss, tucso, hdr_len; uint16_t ipcse, tucse, mss; + int err; if(likely(skb_shinfo(skb)->tso_size)) { + if (skb_header_cloned(skb)) { + err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); + if (err) + return err; + } + hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); mss = skb_shinfo(skb)->tso_size; skb->nh.iph->tot_len = 0; @@ -1203,11 +1216,11 @@ if(++i == adapter->tx_ring.count) i = 0; adapter->tx_ring.next_to_use = i; - return TRUE; + return 1; } #endif - return FALSE; + return 0; } static inline boolean_t @@ -1378,6 +1391,7 @@ unsigned int tx_flags = 0; unsigned long flags; int vlan_id = 0; + int tso; if(skb->len <= 0) { dev_kfree_skb_any(skb); @@ -1399,7 +1413,13 @@ first = adapter->tx_ring.next_to_use; - if(ixgb_tso(adapter, skb)) + tso = ixgb_tso(adapter, skb); + if (tso < 0) { + dev_kfree_skb_any(skb); + return NETDEV_TX_OK; + } + + if (tso) tx_flags |= IXGB_TX_FLAGS_TSO; else if(ixgb_tx_csum(adapter, skb)) tx_flags |= IXGB_TX_FLAGS_CSUM; @@ -1668,20 +1688,16 @@ int work_to_do = min(*budget, netdev->quota); int tx_cleaned; int work_done = 0; - - if (!netif_carrier_ok(netdev)) - goto quit_polling; tx_cleaned = ixgb_clean_tx_irq(adapter); ixgb_clean_rx_irq(adapter, &work_done, work_to_do); *budget -= work_done; netdev->quota -= work_done; - - /* if no Tx cleanup and not enough Rx work done, exit the polling mode */ - if((!tx_cleaned && (work_done < work_to_do)) || - !netif_running(netdev)) { -quit_polling: netif_rx_complete(netdev); + + /* if no Tx and not enough Rx work done, exit the polling mode */ + if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) { + netif_rx_complete(netdev); ixgb_irq_enable(adapter); return 0; } @@ -1741,6 +1757,17 @@ netif_wake_queue(netdev); } spin_unlock(&adapter->tx_lock); + + if(adapter->detect_tx_hung) { + /* detect a transmit hang in hardware, this serializes the + * check with the clearing of time_stamp and movement of i */ + adapter->detect_tx_hung = FALSE; + if(tx_ring->buffer_info[i].dma && + time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ) + && !(IXGB_READ_REG(&adapter->hw, STATUS) & + IXGB_STATUS_TXOFF)) + netif_stop_queue(netdev); + } return cleaned; } diff -Nru a/drivers/net/ixgb/ixgb_osdep.h b/drivers/net/ixgb/ixgb_osdep.h --- a/drivers/net/ixgb/ixgb_osdep.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/ixgb/ixgb_osdep.h 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff -Nru a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c --- a/drivers/net/ixgb/ixgb_param.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/ixgb/ixgb_param.c 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff -Nru a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c --- a/drivers/net/jazzsonic.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/jazzsonic.c 2005-03-07 14:54:16 -08:00 @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -28,6 +29,7 @@ #include #include #include +#include #include #include @@ -37,7 +39,10 @@ #include #include -#define DRV_NAME "jazzsonic" +static char jazz_sonic_string[] = "jazzsonic"; +static struct platform_device *jazz_sonic_device; + +#define SONIC_MEM_SIZE 0x100 #define SREGS_PAD(n) u16 n; @@ -50,8 +55,8 @@ #define SONIC_WRITE(reg,val) \ do { \ - *((volatile unsigned int *)base_addr+reg) = val; \ -} + *((volatile unsigned int *)base_addr+(reg)) = (val); \ +} while (0) /* use 0 for production, 1 for verification, >2 for debug */ @@ -80,70 +85,7 @@ 0xffff /* end of list */ }; -/* Index to functions, as function prototypes. */ - -static int sonic_probe1(struct net_device *dev, unsigned int base_addr, - unsigned int irq); - - -/* - * Probe for a SONIC ethernet controller on a Mips Jazz board. - * Actually probing is superfluous but we're paranoid. - */ -struct net_device * __init sonic_probe(int unit) -{ - struct net_device *dev; - struct sonic_local *lp; - unsigned int base_addr; - int err = 0; - int i; - - /* - * Don't probe if we're not running on a Jazz board. - */ - if (mips_machgroup != MACH_GROUP_JAZZ) - return ERR_PTR(-ENODEV); - - dev = alloc_etherdev(0); - if (!dev) - return ERR_PTR(-ENOMEM); - - sprintf(dev->name, "eth%d", unit); - netdev_boot_setup_check(dev); - base_addr = dev->base_addr; - - if (base_addr >= KSEG0) { /* Check a single specified location. */ - err = sonic_probe1(dev, base_addr, dev->irq); - } else if (base_addr != 0) { /* Don't probe at all. */ - err = -ENXIO; - } else { - for (i = 0; sonic_portlist[i].port; i++) { - int io = sonic_portlist[i].port; - if (sonic_probe1(dev, io, sonic_portlist[i].irq) == 0) - break; - } - if (!sonic_portlist[i].port) - err = -ENODEV; - } - if (err) - goto out; - err = register_netdev(dev); - if (err) - goto out1; - return dev; -out1: - lp = dev->priv; - vdma_free(lp->rba_laddr); - kfree(lp->rba); - vdma_free(lp->cda_laddr); - kfree(lp); - release_region(dev->base_addr, 0x100); -out: - free_netdev(dev); - return ERR_PTR(err); -} - -static int __init sonic_probe1(struct net_device *dev, unsigned int base_addr, +static int __init sonic_probe1(struct net_device *dev, unsigned long base_addr, unsigned int irq) { static unsigned version_printed; @@ -153,7 +95,7 @@ int err = -ENODEV; int i; - if (!request_region(base_addr, 0x100, DRV_NAME)) + if (!request_mem_region(base_addr, SONIC_MEM_SIZE, jazz_sonic_string)) return -EBUSY; /* * get the Silicon Revision ID. If this is one of the known @@ -233,7 +175,7 @@ memset(lp, 0, sizeof(struct sonic_local)); /* get the virtual dma address */ - lp->cda_laddr = vdma_alloc(PHYSADDR(lp),sizeof(*lp)); + lp->cda_laddr = vdma_alloc(CPHYSADDR(lp),sizeof(*lp)); if (lp->cda_laddr == ~0UL) { printk("%s: couldn't get DMA page entry for " "descriptors\n", dev->name); @@ -254,7 +196,7 @@ } /* get virtual dma address */ - lp->rba_laddr = vdma_alloc(PHYSADDR(lp->rba), + lp->rba_laddr = vdma_alloc(CPHYSADDR(lp->rba), SONIC_NUM_RRS * SONIC_RBSIZE); if (lp->rba_laddr == ~0UL) { printk("%s: couldn't get DMA page entry for receive " @@ -291,7 +233,66 @@ out1: kfree(lp); out: - release_region(base_addr, 0x100); + release_region(base_addr, SONIC_MEM_SIZE); + return err; +} + +/* + * Probe for a SONIC ethernet controller on a Mips Jazz board. + * Actually probing is superfluous but we're paranoid. + */ +static int __init jazz_sonic_probe(struct device *device) +{ + struct net_device *dev; + struct sonic_local *lp; + unsigned long base_addr; + int err = 0; + int i; + + /* + * Don't probe if we're not running on a Jazz board. + */ + if (mips_machgroup != MACH_GROUP_JAZZ) + return -ENODEV; + + dev = alloc_etherdev(0); + if (!dev) + return -ENOMEM; + + netdev_boot_setup_check(dev); + base_addr = dev->base_addr; + + if (base_addr >= KSEG0) { /* Check a single specified location. */ + err = sonic_probe1(dev, base_addr, dev->irq); + } else if (base_addr != 0) { /* Don't probe at all. */ + err = -ENXIO; + } else { + for (i = 0; sonic_portlist[i].port; i++) { + int io = sonic_portlist[i].port; + if (sonic_probe1(dev, io, sonic_portlist[i].irq) == 0) + break; + } + if (!sonic_portlist[i].port) + err = -ENODEV; + } + if (err) + goto out; + err = register_netdev(dev); + if (err) + goto out1; + + return 0; + +out1: + lp = dev->priv; + vdma_free(lp->rba_laddr); + kfree(lp->rba); + vdma_free(lp->cda_laddr); + kfree(lp); + release_region(dev->base_addr, SONIC_MEM_SIZE); +out: + free_netdev(dev); + return err; } @@ -304,3 +305,77 @@ #define sonic_chiptomem(x) KSEG1ADDR(vdma_log2phys(x)) #include "sonic.c" + +static int __devexit jazz_sonic_device_remove (struct device *device) +{ + struct net_device *dev = device->driver_data; + + unregister_netdev (dev); + release_region (dev->base_addr, SONIC_MEM_SIZE); + free_netdev (dev); + + return 0; +} + +static struct device_driver jazz_sonic_driver = { + .name = jazz_sonic_string, + .bus = &platform_bus_type, + .probe = jazz_sonic_probe, + .remove = __devexit_p(jazz_sonic_device_remove), +}; + +static void jazz_sonic_platform_release (struct device *device) +{ + struct platform_device *pldev; + + /* free device */ + pldev = to_platform_device (device); + kfree (pldev); +} + +static int __init jazz_sonic_init_module(void) +{ + struct platform_device *pldev; + + if (driver_register(&jazz_sonic_driver)) { + printk(KERN_ERR "Driver registration failed\n"); + return -ENOMEM; + } + + jazz_sonic_device = NULL; + + if (!(pldev = kmalloc (sizeof (*pldev), GFP_KERNEL))) { + goto out_unregister; + } + + memset(pldev, 0, sizeof (*pldev)); + pldev->name = jazz_sonic_string; + pldev->id = 0; + pldev->dev.release = jazz_sonic_platform_release; + jazz_sonic_device = pldev; + + if (platform_device_register (pldev)) { + kfree(pldev); + jazz_sonic_device = NULL; + } + + return 0; + +out_unregister: + platform_device_unregister(pldev); + + return -ENOMEM; +} + +static void __exit jazz_sonic_cleanup_module(void) +{ + driver_unregister(&jazz_sonic_driver); + + if (jazz_sonic_device) { + platform_device_unregister(jazz_sonic_device); + jazz_sonic_device = NULL; + } +} + +module_init(jazz_sonic_init_module); +module_exit(jazz_sonic_cleanup_module); diff -Nru a/drivers/net/meth.c b/drivers/net/meth.c --- a/drivers/net/meth.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/meth.c 2005-03-07 14:54:18 -08:00 @@ -27,7 +27,7 @@ #include /* struct iphdr */ #include /* struct tcphdr */ #include -#include /*MII definitions */ +#include /* MII definitions */ #include #include @@ -105,27 +105,27 @@ (int)o2meth_eaddr[3]&0xFF,(int)o2meth_eaddr[4]&0xFF,(int)o2meth_eaddr[5]&0xFF); for (i = 0; i < 6; i++) dev->dev_addr[i] = o2meth_eaddr[i]; - mace_eth_write((*(u64*)o2meth_eaddr)>>16, mac_addr); + mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16; } /* * Waits for BUSY status of mdio bus to clear */ -#define WAIT_FOR_PHY(___rval) \ - while ((___rval = mace_eth_read(phy_data)) & MDIO_BUSY) { \ - udelay(25); \ +#define WAIT_FOR_PHY(___rval) \ + while ((___rval = mace->eth.phy_data) & MDIO_BUSY) { \ + udelay(25); \ } /*read phy register, return value read */ static unsigned long mdio_read(struct meth_private *priv, unsigned long phyreg) { unsigned long rval; WAIT_FOR_PHY(rval); - mace_eth_write((priv->phy_addr << 5) | (phyreg & 0x1f), phy_regs); + mace->eth.phy_regs = (priv->phy_addr << 5) | (phyreg & 0x1f); udelay(25); - mace_eth_write(1, phy_trans_go); + mace->eth.phy_trans_go = 1; udelay(25); WAIT_FOR_PHY(rval); - return rval&MDIO_DATA_MASK; + return rval & MDIO_DATA_MASK; } static int mdio_probe(struct meth_private *priv) @@ -191,7 +191,7 @@ priv->mac_ctrl |= METH_PHY_FDX; else priv->mac_ctrl &= ~METH_PHY_FDX; - mace_eth_write(priv->mac_ctrl, mac_ctrl); + mace->eth.mac_ctrl = priv->mac_ctrl; } if ((priv->mac_ctrl & METH_100MBIT) ^ speed) { @@ -200,7 +200,7 @@ priv->mac_ctrl |= METH_100MBIT; else priv->mac_ctrl &= ~METH_100MBIT; - mace_eth_write(priv->mac_ctrl, mac_ctrl); + mace->eth.mac_ctrl = priv->mac_ctrl; } } @@ -214,26 +214,28 @@ return -ENOMEM; memset(priv->tx_ring, 0, TX_RING_BUFFER_SIZE); priv->tx_count = priv->tx_read = priv->tx_write = 0; - mace_eth_write(priv->tx_ring_dma, tx_ring_base); + mace->eth.tx_ring_base = priv->tx_ring_dma; /* Now init skb save area */ - memset(priv->tx_skbs,0,sizeof(priv->tx_skbs)); - memset(priv->tx_skb_dmas,0,sizeof(priv->tx_skb_dmas)); + memset(priv->tx_skbs, 0, sizeof(priv->tx_skbs)); + memset(priv->tx_skb_dmas, 0, sizeof(priv->tx_skb_dmas)); return 0; } static int meth_init_rx_ring(struct meth_private *priv) { int i; - for(i=0;irx_skbs[i]=alloc_skb(METH_RX_BUFF_SIZE,0); - /* 8byte status vector+3quad padding + 2byte padding, - to put data on 64bit aligned boundary */ + + for (i = 0; i < RX_RING_ENTRIES; i++) { + priv->rx_skbs[i] = alloc_skb(METH_RX_BUFF_SIZE, 0); + /* 8byte status vector + 3quad padding + 2byte padding, + * to put data on 64bit aligned boundary */ skb_reserve(priv->rx_skbs[i],METH_RX_HEAD); priv->rx_ring[i]=(rx_packet*)(priv->rx_skbs[i]->head); /* I'll need to re-sync it after each RX */ - priv->rx_ring_dmas[i]=dma_map_single(NULL,priv->rx_ring[i], - METH_RX_BUFF_SIZE,DMA_FROM_DEVICE); - mace_eth_write(priv->rx_ring_dmas[i], rx_fifo); + priv->rx_ring_dmas[i] = + dma_map_single(NULL, priv->rx_ring[i], + METH_RX_BUFF_SIZE, DMA_FROM_DEVICE); + mace->eth.rx_fifo = priv->rx_ring_dmas[i]; } priv->rx_write = 0; return 0; @@ -257,10 +259,11 @@ { int i; - for(i=0;irx_ring_dmas[i],METH_RX_BUFF_SIZE,DMA_FROM_DEVICE); - priv->rx_ring[i]=0; - priv->rx_ring_dmas[i]=0; + for (i = 0; i < RX_RING_ENTRIES; i++) { + dma_unmap_single(NULL, priv->rx_ring_dmas[i], + METH_RX_BUFF_SIZE, DMA_FROM_DEVICE); + priv->rx_ring[i] = 0; + priv->rx_ring_dmas[i] = 0; kfree_skb(priv->rx_skbs[i]); } } @@ -270,8 +273,9 @@ struct meth_private *priv = (struct meth_private *) dev->priv; /* Reset card */ - mace_eth_write(SGI_MAC_RESET, mac_ctrl); - mace_eth_write(0, mac_ctrl); + mace->eth.mac_ctrl = SGI_MAC_RESET; + udelay(1); + mace->eth.mac_ctrl = 0; udelay(25); /* Load ethernet address */ @@ -279,24 +283,24 @@ /* Should load some "errata", but later */ /* Check for device */ - if(mdio_probe(priv) < 0) { + if (mdio_probe(priv) < 0) { DPRINTK("Unable to find PHY\n"); return -ENODEV; } /* Initial mode: 10 | Half-duplex | Accept normal packets */ priv->mac_ctrl = METH_ACCEPT_MCAST | METH_DEFAULT_IPG; - if(dev->flags | IFF_PROMISC) + if (dev->flags | IFF_PROMISC) priv->mac_ctrl |= METH_PROMISC; - mace_eth_write(priv->mac_ctrl, mac_ctrl); + mace->eth.mac_ctrl = priv->mac_ctrl; /* Autonegotiate speed and duplex mode */ meth_check_link(dev); /* Now set dma control, but don't enable DMA, yet */ - priv->dma_ctrl= (4 << METH_RX_OFFSET_SHIFT) | - (RX_RING_ENTRIES << METH_RX_DEPTH_SHIFT); - mace_eth_write(priv->dma_ctrl, dma_ctrl); + priv->dma_ctrl = (4 << METH_RX_OFFSET_SHIFT) | + (RX_RING_ENTRIES << METH_RX_DEPTH_SHIFT); + mace->eth.dma_ctrl = priv->dma_ctrl; return 0; } @@ -335,7 +339,7 @@ /* Start DMA */ priv->dma_ctrl |= METH_DMA_TX_EN | /*METH_DMA_TX_INT_EN |*/ METH_DMA_RX_EN | METH_DMA_RX_INT_EN; - mace_eth_write(priv->dma_ctrl, dma_ctrl); + mace->eth.dma_ctrl = priv->dma_ctrl; DPRINTK("About to start queue\n"); netif_start_queue(dev); @@ -359,7 +363,7 @@ /* shut down DMA */ priv->dma_ctrl &= ~(METH_DMA_TX_EN | METH_DMA_TX_INT_EN | METH_DMA_RX_EN | METH_DMA_RX_INT_EN); - mace_eth_write(priv->dma_ctrl, dma_ctrl); + mace->eth.dma_ctrl = priv->dma_ctrl; free_irq(dev->irq, dev); meth_free_tx_ring(priv); meth_free_rx_ring(priv); @@ -373,56 +377,57 @@ static void meth_rx(struct net_device* dev, unsigned long int_status) { struct sk_buff *skb; + unsigned long status; struct meth_private *priv = (struct meth_private *) dev->priv; - unsigned long fifo_rptr=(int_status&METH_INT_RX_RPTR_MASK)>>8; + unsigned long fifo_rptr = (int_status & METH_INT_RX_RPTR_MASK) >> 8; + spin_lock(&priv->meth_lock); - priv->dma_ctrl&=~METH_DMA_RX_INT_EN; - mace_eth_write(priv->dma_ctrl, dma_ctrl); + priv->dma_ctrl &= ~METH_DMA_RX_INT_EN; + mace->eth.dma_ctrl = priv->dma_ctrl; spin_unlock(&priv->meth_lock); - if (int_status & METH_INT_RX_UNDERFLOW){ - fifo_rptr=(fifo_rptr-1)&(0xF); + if (int_status & METH_INT_RX_UNDERFLOW) { + fifo_rptr = (fifo_rptr - 1) & 0x0f; } - while(priv->rx_write != fifo_rptr) { - u64 status; - dma_unmap_single(NULL,priv->rx_ring_dmas[priv->rx_write], - METH_RX_BUFF_SIZE,DMA_FROM_DEVICE); - status=priv->rx_ring[priv->rx_write]->status.raw; + while (priv->rx_write != fifo_rptr) { + dma_unmap_single(NULL, priv->rx_ring_dmas[priv->rx_write], + METH_RX_BUFF_SIZE, DMA_FROM_DEVICE); + status = priv->rx_ring[priv->rx_write]->status.raw; #if MFE_DEBUG - if(!(status&METH_RX_ST_VALID)) { + if (!(status & METH_RX_ST_VALID)) { DPRINTK("Not received? status=%016lx\n",status); } #endif - if((!(status&METH_RX_STATUS_ERRORS))&&(status&METH_RX_ST_VALID)){ - int len=(status&0xFFFF) - 4; /* omit CRC */ + if ((!(status & METH_RX_STATUS_ERRORS)) && (status & METH_RX_ST_VALID)) { + int len = (status & 0xffff) - 4; /* omit CRC */ /* length sanity check */ - if(len < 60 || len > 1518) { - printk(KERN_DEBUG "%s: bogus packet size: %d, status=%#2lx.\n", + if (len < 60 || len > 1518) { + printk(KERN_DEBUG "%s: bogus packet size: %ld, status=%#2lx.\n", dev->name, priv->rx_write, priv->rx_ring[priv->rx_write]->status.raw); priv->stats.rx_errors++; priv->stats.rx_length_errors++; - skb=priv->rx_skbs[priv->rx_write]; + skb = priv->rx_skbs[priv->rx_write]; } else { - skb=alloc_skb(METH_RX_BUFF_SIZE,GFP_ATOMIC|GFP_DMA); - if(!skb){ + skb = alloc_skb(METH_RX_BUFF_SIZE, GFP_ATOMIC | GFP_DMA); + if (!skb) { /* Ouch! No memory! Drop packet on the floor */ DPRINTK("No mem: dropping packet\n"); priv->stats.rx_dropped++; - skb=priv->rx_skbs[priv->rx_write]; + skb = priv->rx_skbs[priv->rx_write]; } else { - struct sk_buff *skb_c=priv->rx_skbs[priv->rx_write]; - /* 8byte status vector+3quad padding + 2byte padding, - to put data on 64bit aligned boundary */ - skb_reserve(skb,METH_RX_HEAD); + struct sk_buff *skb_c = priv->rx_skbs[priv->rx_write]; + /* 8byte status vector + 3quad padding + 2byte padding, + * to put data on 64bit aligned boundary */ + skb_reserve(skb, METH_RX_HEAD); /* Write metadata, and then pass to the receive level */ - skb_put(skb_c,len); - priv->rx_skbs[priv->rx_write]=skb; + skb_put(skb_c, len); + priv->rx_skbs[priv->rx_write] = skb; skb_c->dev = dev; skb_c->protocol = eth_type_trans(skb_c, dev); dev->last_rx = jiffies; priv->stats.rx_packets++; - priv->stats.rx_bytes+=len; + priv->stats.rx_bytes += len; netif_rx(skb_c); } } @@ -445,18 +450,19 @@ printk(KERN_WARNING "Carrier Event Seen\n"); #endif } - priv->rx_ring[priv->rx_write]=(rx_packet*)skb->head; - priv->rx_ring[priv->rx_write]->status.raw=0; - priv->rx_ring_dmas[priv->rx_write]=dma_map_single(NULL,priv->rx_ring[priv->rx_write], - METH_RX_BUFF_SIZE,DMA_FROM_DEVICE); - mace_eth_write(priv->rx_ring_dmas[priv->rx_write], rx_fifo); + priv->rx_ring[priv->rx_write] = (rx_packet*)skb->head; + priv->rx_ring[priv->rx_write]->status.raw = 0; + priv->rx_ring_dmas[priv->rx_write] = + dma_map_single(NULL, priv->rx_ring[priv->rx_write], + METH_RX_BUFF_SIZE, DMA_FROM_DEVICE); + mace->eth.rx_fifo = priv->rx_ring_dmas[priv->rx_write]; ADVANCE_RX_PTR(priv->rx_write); } spin_lock(&priv->meth_lock); /* In case there was underflow, and Rx DMA was disabled */ - priv->dma_ctrl|=METH_DMA_RX_INT_EN|METH_DMA_RX_EN; - mace_eth_write(priv->dma_ctrl, dma_ctrl); - mace_eth_write(METH_INT_RX_THRESHOLD, int_stat); + priv->dma_ctrl |= METH_DMA_RX_INT_EN | METH_DMA_RX_EN; + mace->eth.dma_ctrl = priv->dma_ctrl; + mace->eth.int_stat = METH_INT_RX_THRESHOLD; spin_unlock(&priv->meth_lock); } @@ -464,31 +470,31 @@ { struct meth_private *priv = (struct meth_private *) dev->priv; - return(priv->tx_count >= TX_RING_ENTRIES-1); + return (priv->tx_count >= TX_RING_ENTRIES - 1); } static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) { struct meth_private *priv = dev->priv; - u64 status; + unsigned long status; struct sk_buff *skb; - unsigned long rptr=(int_status&TX_INFO_RPTR)>>16; + unsigned long rptr = (int_status&TX_INFO_RPTR) >> 16; spin_lock(&priv->meth_lock); /* Stop DMA notification */ priv->dma_ctrl &= ~(METH_DMA_TX_INT_EN); - mace_eth_write(priv->dma_ctrl, dma_ctrl); + mace->eth.dma_ctrl = priv->dma_ctrl; - while(priv->tx_read != rptr){ + while (priv->tx_read != rptr) { skb = priv->tx_skbs[priv->tx_read]; status = priv->tx_ring[priv->tx_read].header.raw; #if MFE_DEBUG>=1 - if(priv->tx_read==priv->tx_write) - DPRINTK("Auchi! tx_read=%d,tx_write=%d,rptr=%d?\n",priv->tx_read,priv->tx_write,rptr); + if (priv->tx_read == priv->tx_write) + DPRINTK("Auchi! tx_read=%d,tx_write=%d,rptr=%d?\n", priv->tx_read, priv->tx_write,rptr); #endif - if(status & METH_TX_ST_DONE) { - if(status & METH_TX_ST_SUCCESS){ + if (status & METH_TX_ST_DONE) { + if (status & METH_TX_ST_SUCCESS){ priv->stats.tx_packets++; priv->stats.tx_bytes += skb->len; } else { @@ -518,19 +524,19 @@ priv->tx_skbs[priv->tx_read] = NULL; priv->tx_ring[priv->tx_read].header.raw = 0; priv->tx_read = (priv->tx_read+1)&(TX_RING_ENTRIES-1); - priv->tx_count --; + priv->tx_count--; } /* wake up queue if it was stopped */ - if (netif_queue_stopped(dev) && ! meth_tx_full(dev)) { + if (netif_queue_stopped(dev) && !meth_tx_full(dev)) { netif_wake_queue(dev); } - mace_eth_write(METH_INT_TX_EMPTY | METH_INT_TX_PKT, int_stat); + mace->eth.int_stat = METH_INT_TX_EMPTY | METH_INT_TX_PKT; spin_unlock(&priv->meth_lock); } -static void meth_error(struct net_device* dev, u32 status) +static void meth_error(struct net_device* dev, unsigned status) { struct meth_private *priv = (struct meth_private *) dev->priv; @@ -548,17 +554,16 @@ if (status & (METH_INT_RX_UNDERFLOW)) { printk(KERN_WARNING "meth: Rx underflow\n"); spin_lock(&priv->meth_lock); - mace_eth_write(METH_INT_RX_UNDERFLOW, int_stat); + mace->eth.int_stat = METH_INT_RX_UNDERFLOW; /* more underflow interrupts will be delivered, - effectively throwing us into an infinite loop. - Thus I stop processing Rx in this case. - */ - priv->dma_ctrl&=~METH_DMA_RX_EN; - mace_eth_write(priv->dma_ctrl, dma_ctrl); + * effectively throwing us into an infinite loop. + * Thus I stop processing Rx in this case. */ + priv->dma_ctrl &= ~METH_DMA_RX_EN; + mace->eth.dma_ctrl = priv->dma_ctrl; DPRINTK("Disabled meth Rx DMA temporarily\n"); spin_unlock(&priv->meth_lock); } - mace_eth_write(METH_INT_ERROR, int_stat); + mace->eth.int_stat = METH_INT_ERROR; } /* @@ -570,12 +575,12 @@ struct meth_private *priv = (struct meth_private *) dev->priv; unsigned long status; - status = mace_eth_read(int_stat); - while (status & 0xFF) { + status = mace->eth.int_stat; + while (status & 0xff) { /* First handle errors - if we get Rx underflow, - Rx DMA will be disabled, and Rx handler will reenable - it. I don't think it's possible to get Rx underflow, - without getting Rx interrupt */ + * Rx DMA will be disabled, and Rx handler will reenable + * it. I don't think it's possible to get Rx underflow, + * without getting Rx interrupt */ if (status & METH_INT_ERROR) { meth_error(dev, status); } @@ -589,7 +594,7 @@ /* send it to meth_rx for handling */ meth_rx(dev, status); } - status = mace_eth_read(int_stat); + status = mace->eth.int_stat; } return IRQ_HANDLED; @@ -601,45 +606,45 @@ static void meth_tx_short_prepare(struct meth_private *priv, struct sk_buff *skb) { - tx_packet *desc=&priv->tx_ring[priv->tx_write]; - int len = (skb->lenlen; + tx_packet *desc = &priv->tx_ring[priv->tx_write]; + int len = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len; - desc->header.raw=METH_TX_CMD_INT_EN|(len-1)|((128-len)<<16); + desc->header.raw = METH_TX_CMD_INT_EN | (len-1) | ((128-len) << 16); /* maybe I should set whole thing to 0 first... */ - memcpy(desc->data.dt+(120-len),skb->data,skb->len); - if(skb->len < len) - memset(desc->data.dt+120-len+skb->len,0,len-skb->len); + memcpy(desc->data.dt + (120 - len), skb->data, skb->len); + if (skb->len < len) + memset(desc->data.dt + 120 - len + skb->len, 0, len-skb->len); } #define TX_CATBUF1 BIT(25) static void meth_tx_1page_prepare(struct meth_private *priv, struct sk_buff *skb) { - tx_packet *desc=&priv->tx_ring[priv->tx_write]; + tx_packet *desc = &priv->tx_ring[priv->tx_write]; void *buffer_data = (void *)(((unsigned long)skb->data + 7) & ~7); int unaligned_len = (int)((unsigned long)buffer_data - (unsigned long)skb->data); int buffer_len = skb->len - unaligned_len; dma_addr_t catbuf; - desc->header.raw=METH_TX_CMD_INT_EN|TX_CATBUF1|(skb->len-1); + desc->header.raw = METH_TX_CMD_INT_EN | TX_CATBUF1 | (skb->len - 1); /* unaligned part */ - if(unaligned_len){ - memcpy(desc->data.dt+(120-unaligned_len), + if (unaligned_len) { + memcpy(desc->data.dt + (120 - unaligned_len), skb->data, unaligned_len); - desc->header.raw |= (128-unaligned_len) << 16; + desc->header.raw |= (128 - unaligned_len) << 16; } /* first page */ catbuf = dma_map_single(NULL, buffer_data, buffer_len, DMA_TO_DEVICE); desc->data.cat_buf[0].form.start_addr = catbuf >> 3; - desc->data.cat_buf[0].form.len = buffer_len-1; + desc->data.cat_buf[0].form.len = buffer_len - 1; } #define TX_CATBUF2 BIT(26) static void meth_tx_2page_prepare(struct meth_private *priv, struct sk_buff *skb) { - tx_packet *desc=&priv->tx_ring[priv->tx_write]; + tx_packet *desc = &priv->tx_ring[priv->tx_write]; void *buffer1_data = (void *)(((unsigned long)skb->data + 7) & ~7); void *buffer2_data = (void *)PAGE_ALIGN((unsigned long)skb->data); int unaligned_len = (int)((unsigned long)buffer1_data - (unsigned long)skb->data); @@ -647,44 +652,44 @@ int buffer2_len = skb->len - buffer1_len - unaligned_len; dma_addr_t catbuf1, catbuf2; - desc->header.raw=METH_TX_CMD_INT_EN|TX_CATBUF1|TX_CATBUF2|(skb->len-1); + desc->header.raw = METH_TX_CMD_INT_EN | TX_CATBUF1 | TX_CATBUF2| (skb->len - 1); /* unaligned part */ - if(unaligned_len){ - memcpy(desc->data.dt+(120-unaligned_len), + if (unaligned_len){ + memcpy(desc->data.dt + (120 - unaligned_len), skb->data, unaligned_len); - desc->header.raw |= (128-unaligned_len) << 16; + desc->header.raw |= (128 - unaligned_len) << 16; } /* first page */ catbuf1 = dma_map_single(NULL, buffer1_data, buffer1_len, DMA_TO_DEVICE); desc->data.cat_buf[0].form.start_addr = catbuf1 >> 3; - desc->data.cat_buf[0].form.len = buffer1_len-1; + desc->data.cat_buf[0].form.len = buffer1_len - 1; /* second page */ catbuf2 = dma_map_single(NULL, buffer2_data, buffer2_len, DMA_TO_DEVICE); desc->data.cat_buf[1].form.start_addr = catbuf2 >> 3; - desc->data.cat_buf[1].form.len = buffer2_len-1; + desc->data.cat_buf[1].form.len = buffer2_len - 1; } static void meth_add_to_tx_ring(struct meth_private *priv, struct sk_buff *skb) { /* Remember the skb, so we can free it at interrupt time */ priv->tx_skbs[priv->tx_write] = skb; - if(skb->len <= 120) { + if (skb->len <= 120) { /* Whole packet fits into descriptor */ - meth_tx_short_prepare(priv,skb); - } else if(PAGE_ALIGN((unsigned long)skb->data) != - PAGE_ALIGN((unsigned long)skb->data+skb->len-1)) { + meth_tx_short_prepare(priv, skb); + } else if (PAGE_ALIGN((unsigned long)skb->data) != + PAGE_ALIGN((unsigned long)skb->data + skb->len - 1)) { /* Packet crosses page boundary */ - meth_tx_2page_prepare(priv,skb); + meth_tx_2page_prepare(priv, skb); } else { /* Packet is in one page */ - meth_tx_1page_prepare(priv,skb); + meth_tx_1page_prepare(priv, skb); } - priv->tx_write = (priv->tx_write+1) & (TX_RING_ENTRIES-1); - mace_eth_write(priv->tx_write, tx_info); - priv->tx_count ++; + priv->tx_write = (priv->tx_write + 1) & (TX_RING_ENTRIES - 1); + mace->eth.tx_info = priv->tx_write; + priv->tx_count++; } /* @@ -695,10 +700,10 @@ struct meth_private *priv = (struct meth_private *) dev->priv; unsigned long flags; - spin_lock_irqsave(&priv->meth_lock,flags); + spin_lock_irqsave(&priv->meth_lock, flags); /* Stop DMA notification */ priv->dma_ctrl &= ~(METH_DMA_TX_INT_EN); - mace_eth_write(priv->dma_ctrl, dma_ctrl); + mace->eth.dma_ctrl = priv->dma_ctrl; meth_add_to_tx_ring(priv, skb); dev->trans_start = jiffies; /* save the timestamp */ @@ -711,9 +716,9 @@ /* Restart DMA notification */ priv->dma_ctrl |= METH_DMA_TX_INT_EN; - mace_eth_write(priv->dma_ctrl, dma_ctrl); + mace->eth.dma_ctrl = priv->dma_ctrl; - spin_unlock_irqrestore(&priv->meth_lock,flags); + spin_unlock_irqrestore(&priv->meth_lock, flags); return 0; } @@ -743,11 +748,11 @@ meth_init_rx_ring(priv); /* Restart dma */ - priv->dma_ctrl|=METH_DMA_TX_EN|METH_DMA_RX_EN|METH_DMA_RX_INT_EN; - mace_eth_write(priv->dma_ctrl, dma_ctrl); + priv->dma_ctrl |= METH_DMA_TX_EN | METH_DMA_RX_EN | METH_DMA_RX_INT_EN; + mace->eth.dma_ctrl = priv->dma_ctrl; /* Enable interrupt */ - spin_unlock_irqrestore(&priv->meth_lock,flags); + spin_unlock_irqrestore(&priv->meth_lock, flags); dev->trans_start = jiffies; netif_wake_queue(dev); @@ -760,8 +765,14 @@ */ static int meth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - DPRINTK("ioctl\n"); - return 0; + /* XXX Not yet implemented */ + switch(cmd) { + case SIOCGMIIPHY: + case SIOCGMIIREG: + case SIOCSMIIREG: + default: + return -EOPNOTSUPP; + } } /* @@ -808,7 +819,7 @@ } printk(KERN_INFO "%s: SGI MACE Ethernet rev. %d\n", - dev->name, (unsigned int)mace_eth_read(mac_ctrl) >> 29); + dev->name, (unsigned int)(mace->eth.mac_ctrl >> 29)); return 0; } diff -Nru a/drivers/net/meth.h b/drivers/net/meth.h --- a/drivers/net/meth.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/meth.h 2005-03-07 14:54:16 -08:00 @@ -29,7 +29,7 @@ #define RX_BUCKET_SIZE 256 #undef BIT -#define BIT(x) (1 << (x)) +#define BIT(x) (1UL << (x)) /* For more detailed explanations of what each field menas, see Nick's great comments to #defines below (or docs, if diff -Nru a/drivers/net/mii.c b/drivers/net/mii.c --- a/drivers/net/mii.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/mii.c 2005-03-07 14:54:16 -08:00 @@ -37,6 +37,7 @@ { struct net_device *dev = mii->dev; u32 advert, bmcr, lpa, nego; + u32 advert2 = 0, bmcr2 = 0, lpa2 = 0; ecmd->supported = (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | @@ -54,6 +55,9 @@ ecmd->advertising = ADVERTISED_TP | ADVERTISED_MII; advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE); + if (mii->supports_gmii) + advert2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); + if (advert & ADVERTISE_10HALF) ecmd->advertising |= ADVERTISED_10baseT_Half; if (advert & ADVERTISE_10FULL) @@ -62,19 +66,31 @@ ecmd->advertising |= ADVERTISED_100baseT_Half; if (advert & ADVERTISE_100FULL) ecmd->advertising |= ADVERTISED_100baseT_Full; + if (advert2 & ADVERTISE_1000HALF) + ecmd->advertising |= ADVERTISED_1000baseT_Half; + if (advert2 & ADVERTISE_1000FULL) + ecmd->advertising |= ADVERTISED_1000baseT_Full; bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); lpa = mii->mdio_read(dev, mii->phy_id, MII_LPA); + if (mii->supports_gmii) { + bmcr2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); + lpa2 = mii->mdio_read(dev, mii->phy_id, MII_STAT1000); + } if (bmcr & BMCR_ANENABLE) { ecmd->advertising |= ADVERTISED_Autoneg; ecmd->autoneg = AUTONEG_ENABLE; nego = mii_nway_result(advert & lpa); - if (nego == LPA_100FULL || nego == LPA_100HALF) + if ((bmcr2 & (ADVERTISE_1000HALF | ADVERTISE_1000FULL)) & + (lpa2 >> 2)) + ecmd->speed = SPEED_1000; + else if (nego == LPA_100FULL || nego == LPA_100HALF) ecmd->speed = SPEED_100; else ecmd->speed = SPEED_10; - if (nego == LPA_100FULL || nego == LPA_10FULL) { + if ((lpa2 & LPA_1000FULL) || nego == LPA_100FULL || + nego == LPA_10FULL) { ecmd->duplex = DUPLEX_FULL; mii->full_duplex = 1; } else { @@ -84,7 +100,9 @@ } else { ecmd->autoneg = AUTONEG_DISABLE; - ecmd->speed = (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10; + ecmd->speed = ((bmcr2 & BMCR_SPEED1000 && + (bmcr & BMCR_SPEED100) == 0) ? SPEED_1000 : + (bmcr & BMCR_SPEED100) ? SPEED_100 : SPEED_10); ecmd->duplex = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; } @@ -97,7 +115,9 @@ { struct net_device *dev = mii->dev; - if (ecmd->speed != SPEED_10 && ecmd->speed != SPEED_100) + if (ecmd->speed != SPEED_10 && + ecmd->speed != SPEED_100 && + ecmd->speed != SPEED_1000) return -EINVAL; if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL) return -EINVAL; @@ -109,21 +129,30 @@ return -EINVAL; if (ecmd->autoneg != AUTONEG_DISABLE && ecmd->autoneg != AUTONEG_ENABLE) return -EINVAL; + if ((ecmd->speed == SPEED_1000) && (!mii->supports_gmii)) + return -EINVAL; /* ignore supported, maxtxpkt, maxrxpkt */ if (ecmd->autoneg == AUTONEG_ENABLE) { u32 bmcr, advert, tmp; + u32 advert2 = 0, tmp2 = 0; if ((ecmd->advertising & (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ADVERTISED_100baseT_Half | - ADVERTISED_100baseT_Full)) == 0) + ADVERTISED_100baseT_Full | + ADVERTISED_1000baseT_Half | + ADVERTISED_1000baseT_Full)) == 0) return -EINVAL; /* advertise only what has been requested */ advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE); tmp = advert & ~(ADVERTISE_ALL | ADVERTISE_100BASE4); + if (mii->supports_gmii) { + advert2 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000); + tmp2 = advert2 & ~(ADVERTISE_1000HALF | ADVERTISE_1000FULL); + } if (ecmd->advertising & ADVERTISED_10baseT_Half) tmp |= ADVERTISE_10HALF; if (ecmd->advertising & ADVERTISED_10baseT_Full) @@ -132,10 +161,18 @@ tmp |= ADVERTISE_100HALF; if (ecmd->advertising & ADVERTISED_100baseT_Full) tmp |= ADVERTISE_100FULL; + if (mii->supports_gmii) { + if (ecmd->advertising & ADVERTISED_1000baseT_Half) + advert2 |= ADVERTISE_1000HALF; + if (ecmd->advertising & ADVERTISED_1000baseT_Full) + advert2 |= ADVERTISE_1000FULL; + } if (advert != tmp) { mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp); mii->advertising = tmp; } + if ((mii->supports_gmii) && (advert2 != tmp2)) + mii->mdio_write(dev, mii->phy_id, MII_CTRL1000, tmp2); /* turn on autonegotiation, and force a renegotiate */ bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); @@ -148,8 +185,11 @@ /* turn off auto negotiation, set speed and duplexity */ bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR); - tmp = bmcr & ~(BMCR_ANENABLE | BMCR_SPEED100 | BMCR_FULLDPLX); - if (ecmd->speed == SPEED_100) + tmp = bmcr & ~(BMCR_ANENABLE | BMCR_SPEED100 | + BMCR_SPEED1000 | BMCR_FULLDPLX); + if (ecmd->speed == SPEED_1000) + tmp |= BMCR_SPEED1000; + else if (ecmd->speed == SPEED_100) tmp |= BMCR_SPEED100; if (ecmd->duplex == DUPLEX_FULL) { tmp |= BMCR_FULLDPLX; @@ -207,6 +247,7 @@ { unsigned int old_carrier, new_carrier; int advertise, lpa, media, duplex; + int lpa2 = 0; /* if forced media, go no further */ if (mii->force_media) @@ -243,16 +284,20 @@ mii->advertising = advertise; } lpa = mii->mdio_read(mii->dev, mii->phy_id, MII_LPA); + if (mii->supports_gmii) + lpa2 = mii->mdio_read(mii->dev, mii->phy_id, MII_STAT1000); /* figure out media and duplex from advertise and LPA values */ media = mii_nway_result(lpa & advertise); duplex = (media & ADVERTISE_FULL) ? 1 : 0; + if (lpa2 & LPA_1000FULL) + duplex = 1; if (ok_to_print) printk(KERN_INFO "%s: link up, %sMbps, %s-duplex, lpa 0x%04X\n", mii->dev->name, - media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ? - "100" : "10", + lpa2 & (LPA_1000FULL | LPA_1000HALF) ? "1000" : + media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ? "100" : "10", duplex ? "full" : "half", lpa); diff -Nru a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c --- a/drivers/net/mv643xx_eth.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/mv643xx_eth.c 2005-03-07 14:54:16 -08:00 @@ -1349,13 +1349,11 @@ #ifdef MV64340_CHECKSUM_OFFLOAD_TX #ifdef MAX_SKB_FRAGS -#ifndef CONFIG_JAGUAR_DMALOW /* * Zero copy can only work if we use Discovery II memory. Else, we will * have to map the buffers to ISA memory which is only 16 MB */ dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_HW_CSUM; -#endif #endif #endif diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c --- a/drivers/net/natsemi.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/natsemi.c 2005-03-07 14:54:16 -08:00 @@ -3162,7 +3162,7 @@ * Interrupts must be disabled, otherwise hands_off can cause irq storms. */ -static int natsemi_suspend (struct pci_dev *pdev, u32 state) +static int natsemi_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); struct netdev_private *np = netdev_priv(dev); diff -Nru a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c --- a/drivers/net/ne2k-pci.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/ne2k-pci.c 2005-03-07 14:54:16 -08:00 @@ -654,13 +654,13 @@ } #ifdef CONFIG_PM -static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state) +static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata (pdev); netif_device_detach(dev); pci_save_state(pdev); - pci_set_power_state(pdev, state); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); return 0; } diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c --- a/drivers/net/pcnet32.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/pcnet32.c 2005-03-07 14:54:16 -08:00 @@ -1429,25 +1429,36 @@ val |= 0x10; lp->a.write_csr (ioaddr, 124, val); - /* 24 Jun 2004 according AMD, in order to change the PHY, - * DANAS (or DISPM for 79C976) must be set; then select the speed, - * duplex, and/or enable auto negotiation, and clear DANAS */ - if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) { - lp->a.write_bcr(ioaddr, 32, lp->a.read_bcr(ioaddr, 32) | 0x0080); - /* disable Auto Negotiation, set 10Mpbs, HD */ - val = lp->a.read_bcr(ioaddr, 32) & ~0xb8; - if (lp->options & PCNET32_PORT_FD) - val |= 0x10; - if (lp->options & PCNET32_PORT_100) - val |= 0x08; - lp->a.write_bcr (ioaddr, 32, val); + /* Allied Telesyn AT 2700/2701 FX looses the link, so skip that */ + if (lp->pci_dev->subsystem_vendor == PCI_VENDOR_ID_AT && + (lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2700FX || + lp->pci_dev->subsystem_device == PCI_SUBDEVICE_ID_AT_2701FX)) { + printk(KERN_DEBUG "%s: Skipping PHY selection.\n", dev->name); } else { - if (lp->options & PCNET32_PORT_ASEL) { - lp->a.write_bcr(ioaddr, 32, lp->a.read_bcr(ioaddr, 32) | 0x0080); - /* enable auto negotiate, setup, disable fd */ - val = lp->a.read_bcr(ioaddr, 32) & ~0x98; - val |= 0x20; - lp->a.write_bcr(ioaddr, 32, val); + /* + * 24 Jun 2004 according AMD, in order to change the PHY, + * DANAS (or DISPM for 79C976) must be set; then select the speed, + * duplex, and/or enable auto negotiation, and clear DANAS + */ + if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) { + lp->a.write_bcr(ioaddr, 32, + lp->a.read_bcr(ioaddr, 32) | 0x0080); + /* disable Auto Negotiation, set 10Mpbs, HD */ + val = lp->a.read_bcr(ioaddr, 32) & ~0xb8; + if (lp->options & PCNET32_PORT_FD) + val |= 0x10; + if (lp->options & PCNET32_PORT_100) + val |= 0x08; + lp->a.write_bcr (ioaddr, 32, val); + } else { + if (lp->options & PCNET32_PORT_ASEL) { + lp->a.write_bcr(ioaddr, 32, + lp->a.read_bcr(ioaddr, 32) | 0x0080); + /* enable auto negotiate, setup, disable fd */ + val = lp->a.read_bcr(ioaddr, 32) & ~0x98; + val |= 0x20; + lp->a.write_bcr(ioaddr, 32, val); + } } } diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c --- a/drivers/net/pppoe.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/pppoe.c 2005-03-07 14:54:17 -08:00 @@ -120,17 +120,17 @@ } /* zeroed because its in .bss */ -static struct pppox_opt *item_hash_table[PPPOE_HASH_SIZE]; +static struct pppox_sock *item_hash_table[PPPOE_HASH_SIZE]; /********************************************************************** * * Set/get/delete/rehash items (internal versions) * **********************************************************************/ -static struct pppox_opt *__get_item(unsigned long sid, unsigned char *addr) +static struct pppox_sock *__get_item(unsigned long sid, unsigned char *addr) { int hash = hash_item(sid, addr); - struct pppox_opt *ret; + struct pppox_sock *ret; ret = item_hash_table[hash]; @@ -140,10 +140,10 @@ return ret; } -static int __set_item(struct pppox_opt *po) +static int __set_item(struct pppox_sock *po) { int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote); - struct pppox_opt *ret; + struct pppox_sock *ret; ret = item_hash_table[hash]; while (ret) { @@ -161,10 +161,10 @@ return 0; } -static struct pppox_opt *__delete_item(unsigned long sid, char *addr) +static struct pppox_sock *__delete_item(unsigned long sid, char *addr) { int hash = hash_item(sid, addr); - struct pppox_opt *ret, **src; + struct pppox_sock *ret, **src; ret = item_hash_table[hash]; src = &item_hash_table[hash]; @@ -187,26 +187,26 @@ * Set/get/delete/rehash items * **********************************************************************/ -static inline struct pppox_opt *get_item(unsigned long sid, +static inline struct pppox_sock *get_item(unsigned long sid, unsigned char *addr) { - struct pppox_opt *po; + struct pppox_sock *po; read_lock_bh(&pppoe_hash_lock); po = __get_item(sid, addr); if (po) - sock_hold(po->sk); + sock_hold(sk_pppox(po)); read_unlock_bh(&pppoe_hash_lock); return po; } -static inline struct pppox_opt *get_item_by_addr(struct sockaddr_pppox *sp) +static inline struct pppox_sock *get_item_by_addr(struct sockaddr_pppox *sp) { return get_item(sp->sa_addr.pppoe.sid, sp->sa_addr.pppoe.remote); } -static inline int set_item(struct pppox_opt *po) +static inline int set_item(struct pppox_sock *po) { int i; @@ -220,9 +220,9 @@ return i; } -static inline struct pppox_opt *delete_item(unsigned long sid, char *addr) +static inline struct pppox_sock *delete_item(unsigned long sid, char *addr) { - struct pppox_opt *ret; + struct pppox_sock *ret; write_lock_bh(&pppoe_hash_lock); ret = __delete_item(sid, addr); @@ -248,11 +248,11 @@ read_lock_bh(&pppoe_hash_lock); for (hash = 0; hash < PPPOE_HASH_SIZE; hash++) { - struct pppox_opt *po = item_hash_table[hash]; + struct pppox_sock *po = item_hash_table[hash]; while (po != NULL) { if (po->pppoe_dev == dev) { - struct sock *sk = po->sk; + struct sock *sk = sk_pppox(po); sock_hold(sk); po->pppoe_dev = NULL; @@ -331,8 +331,8 @@ ***********************************************************************/ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb) { - struct pppox_opt *po = pppox_sk(sk); - struct pppox_opt *relay_po = NULL; + struct pppox_sock *po = pppox_sk(sk); + struct pppox_sock *relay_po = NULL; if (sk->sk_state & PPPOX_BOUND) { struct pppoe_hdr *ph = (struct pppoe_hdr *) skb->nh.raw; @@ -347,11 +347,11 @@ if (relay_po == NULL) goto abort_kfree; - if ((relay_po->sk->sk_state & PPPOX_CONNECTED) == 0) + if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0) goto abort_put; skb_pull(skb, sizeof(struct pppoe_hdr)); - if (!__pppoe_xmit( relay_po->sk, skb)) + if (!__pppoe_xmit(sk_pppox(relay_po), skb)) goto abort_put; } else { if (sock_queue_rcv_skb(sk, skb)) @@ -361,7 +361,7 @@ return NET_RX_SUCCESS; abort_put: - sock_put(relay_po->sk); + sock_put(sk_pppox(relay_po)); abort_kfree: kfree_skb(skb); @@ -379,7 +379,7 @@ { struct pppoe_hdr *ph; - struct pppox_opt *po; + struct pppox_sock *po; struct sock *sk; int ret; @@ -395,7 +395,7 @@ if (!po) goto drop; - sk = po->sk; + sk = sk_pppox(po); bh_lock_sock(sk); /* Socket state is unknown, must put skb into backlog. */ @@ -428,7 +428,7 @@ { struct pppoe_hdr *ph; - struct pppox_opt *po; + struct pppox_sock *po; if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) goto abort; @@ -442,7 +442,7 @@ po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); if (po) { - struct sock *sk = po->sk; + struct sock *sk = sk_pppox(po); bh_lock_sock(sk); @@ -480,20 +480,6 @@ /*********************************************************************** * - * Really kill the socket. (Called from pppox_sk_free if refcnt == 0.) - * - **********************************************************************/ -static void pppoe_sk_free(struct sock *sk) -{ - struct pppox_opt *po = pppox_sk(sk); - - if (po) - kfree(po); -} - - -/*********************************************************************** - * * Initialize a new struct sock. * **********************************************************************/ @@ -501,9 +487,8 @@ { int error = -ENOMEM; struct sock *sk; - struct pppox_opt *po; - sk = sk_alloc(PF_PPPOX, GFP_KERNEL, 1, NULL); + sk = sk_alloc(PF_PPPOX, GFP_KERNEL, sizeof(struct pppox_sock), NULL); if (!sk) goto out; @@ -517,23 +502,15 @@ sk->sk_type = SOCK_STREAM; sk->sk_family = PF_PPPOX; sk->sk_protocol = PX_PROTO_OE; - sk->sk_destruct = pppoe_sk_free; - po = sk->sk_protinfo = kmalloc(sizeof(*po), GFP_KERNEL); - if (!po) - goto frees; - memset(po, 0, sizeof(*po)); - po->sk = sk; error = 0; out: return error; -frees: sk_free(sk); - goto out; } static int pppoe_release(struct socket *sock) { struct sock *sk = sock->sk; - struct pppox_opt *po; + struct pppox_sock *po; int error = 0; if (!sk) @@ -573,7 +550,7 @@ struct sock *sk = sock->sk; struct net_device *dev = NULL; struct sockaddr_pppox *sp = (struct sockaddr_pppox *) uservaddr; - struct pppox_opt *po = pppox_sk(sk); + struct pppox_sock *po = pppox_sk(sk); int error; lock_sock(sk); @@ -602,8 +579,8 @@ if(po->pppoe_dev) dev_put(po->pppoe_dev); - memset(po, 0, sizeof(struct pppox_opt)); - po->sk = sk; + memset(sk_pppox(po) + 1, 0, + sizeof(struct pppox_sock) - sizeof(struct sock)); sk->sk_state = PPPOX_NONE; } @@ -679,7 +656,7 @@ unsigned long arg) { struct sock *sk = sock->sk; - struct pppox_opt *po = pppox_sk(sk); + struct pppox_sock *po = pppox_sk(sk); int val = 0; int err = 0; @@ -725,7 +702,7 @@ case PPPOEIOCSFWD: { - struct pppox_opt *relay_po; + struct pppox_sock *relay_po; err = -EBUSY; if (sk->sk_state & (PPPOX_BOUND | PPPOX_ZOMBIE | PPPOX_DEAD)) @@ -755,7 +732,7 @@ if (!relay_po) break; - sock_put(relay_po->sk); + sock_put(sk_pppox(relay_po)); sk->sk_state |= PPPOX_RELAY; err = 0; break; @@ -782,7 +759,7 @@ { struct sk_buff *skb = NULL; struct sock *sk = sock->sk; - struct pppox_opt *po = pppox_sk(sk); + struct pppox_sock *po = pppox_sk(sk); int error = 0; struct pppoe_hdr hdr; struct pppoe_hdr *ph; @@ -857,7 +834,7 @@ ***********************************************************************/ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) { - struct pppox_opt *po = pppox_sk(sk); + struct pppox_sock *po = pppox_sk(sk); struct net_device *dev = po->pppoe_dev; struct pppoe_hdr hdr; struct pppoe_hdr *ph; @@ -984,7 +961,7 @@ #ifdef CONFIG_PROC_FS static int pppoe_seq_show(struct seq_file *seq, void *v) { - struct pppox_opt *po; + struct pppox_sock *po; char *dev_name; if (v == SEQ_START_TOKEN) { @@ -1004,9 +981,9 @@ return 0; } -static __inline__ struct pppox_opt *pppoe_get_idx(loff_t pos) +static __inline__ struct pppox_sock *pppoe_get_idx(loff_t pos) { - struct pppox_opt *po = NULL; + struct pppox_sock *po = NULL; int i = 0; for (; i < PPPOE_HASH_SIZE; i++) { @@ -1031,7 +1008,7 @@ static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos) { - struct pppox_opt *po; + struct pppox_sock *po; ++*pos; if (v == SEQ_START_TOKEN) { diff -Nru a/drivers/net/pppox.c b/drivers/net/pppox.c --- a/drivers/net/pppox.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/pppox.c 2005-03-07 14:54:18 -08:00 @@ -72,7 +72,7 @@ unsigned long arg) { struct sock *sk = sock->sk; - struct pppox_opt *po = pppox_sk(sk); + struct pppox_sock *po = pppox_sk(sk); int rc = 0; lock_sock(sk); diff -Nru a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/r8169.c 2005-03-07 14:54:17 -08:00 @@ -1180,7 +1180,7 @@ /* enable device (incl. PCI PM wakeup and hotplug setup) */ rc = pci_enable_device(pdev); if (rc) { - printk(KERN_ERR PFX "%s: enable failure\n", pdev->slot_name); + printk(KERN_ERR PFX "%s: enable failure\n", pci_name(pdev)); goto err_out_free_dev; } @@ -1218,7 +1218,7 @@ rc = pci_request_regions(pdev, MODULENAME); if (rc) { printk(KERN_ERR PFX "%s: could not request regions.\n", - pdev->slot_name); + pci_name(pdev)); goto err_out_mwi; } diff -Nru a/drivers/net/s2io.c b/drivers/net/s2io.c --- a/drivers/net/s2io.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/s2io.c 2005-03-07 14:54:17 -08:00 @@ -36,28 +36,29 @@ * in PCI Configuration space. ************************************************************************/ -#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include /* local include */ #include "s2io.h" @@ -698,8 +699,7 @@ val64 = 0; writeq(val64, &bar0->sw_reset); val64 = readq(&bar0->sw_reset); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 2); + msleep(500); /* Enable Receiving broadcasts */ add = &bar0->mac_cfg; @@ -952,8 +952,7 @@ dev->name); return -1; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); time++; } @@ -991,8 +990,7 @@ return -1; } time++; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); } /* @@ -1421,8 +1419,7 @@ SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 = readq(&bar0->mc_rldram_mrs); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); /* Delay by around 100 ms. */ + msleep(100); /* Delay by around 100 ms. */ /* Enabling ECC Protection. */ val64 = readq(&bar0->adapter_control); @@ -2437,8 +2434,7 @@ ret = SUCCESS; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); if (cnt++ > 10) break; } @@ -2477,15 +2473,13 @@ * As of now I'am just giving a 250ms delay and hoping that the * PCI write to sw_reset register is done by this time. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 4); + msleep(250); /* Restore the PCI state saved during initializarion. */ pci_restore_state(sp->pdev); s2io_init_pci(sp); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 4); + msleep(250); /* SXE-002: Configure link and activity LED to turn it off */ subid = sp->pdev->subsystem_device; @@ -3197,7 +3191,7 @@ strncpy(info->version, s2io_driver_version, sizeof(s2io_driver_version)); strncpy(info->fw_version, "", 32); - strncpy(info->bus_info, sp->pdev->slot_name, 32); + strncpy(info->bus_info, pci_name(sp->pdev), 32); info->regdump_len = XENA_REG_SPACE; info->eedump_len = XENA_EEPROM_SPACE; info->testinfo_len = S2IO_TEST_LEN; @@ -3303,11 +3297,10 @@ sp->id_timer.data = (unsigned long) sp; } mod_timer(&sp->id_timer, jiffies); - set_current_state(TASK_INTERRUPTIBLE); if (data) - schedule_timeout(data * HZ); + msleep(data * 1000); else - schedule_timeout(MAX_SCHEDULE_TIMEOUT); + msleep(0xFFFFFFFF); del_timer_sync(&sp->id_timer); if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { @@ -3410,8 +3403,7 @@ ret = 0; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); exit_cnt++; } @@ -3451,8 +3443,7 @@ ret = 0; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); exit_cnt++; } @@ -3708,8 +3699,7 @@ ret = 0; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); + msleep(100); cnt++; } @@ -3810,8 +3800,7 @@ val64 = readq(&bar0->mc_rldram_test_ctrl); if (val64 & MC_RLDRAM_TEST_DONE) break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 5); + msleep(200); } if (cnt == 5) @@ -3827,8 +3816,7 @@ val64 = readq(&bar0->mc_rldram_test_ctrl); if (val64 & MC_RLDRAM_TEST_DONE) break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 2); + msleep(500); } if (cnt == 5) @@ -4188,8 +4176,7 @@ * Allow a small delay for the NICs self initiated * cleanup to complete. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); + msleep(100); val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { @@ -4243,10 +4230,8 @@ register u64 val64 = 0; /* If s2io_set_link task is executing, wait till it completes. */ - while (test_and_set_bit(0, &(sp->link_state))) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); - } + while (test_and_set_bit(0, &(sp->link_state))) + msleep(50); atomic_set(&sp->card_state, CARD_DOWN); /* disable Tx and Rx traffic on the NIC */ @@ -4262,8 +4247,7 @@ break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); cnt++; if (cnt == 10) { DBG_PRINT(ERR_DBG, diff -Nru a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c --- a/drivers/net/sb1250-mac.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/sb1250-mac.c 2005-03-07 14:54:18 -08:00 @@ -14,47 +14,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. + * + * + * This driver is designed for the Broadcom SiByte SOC built-in + * Ethernet controllers. Written by Mitch Lichtenberg at Broadcom Corp. */ - -/* - This driver is designed for the Broadcom SiByte SOC built-in - Ethernet controllers. - - Written by Mitch Lichtenberg at Broadcom Corp. -*/ - - - -#define CONFIG_SBMAC_COALESCE - -/* A few user-configurable values. - These may be modified when a driver module is loaded. */ - -static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ -static int noisy_mii = 1; /* mii status msgs */ - -/* Used to pass the media type, etc. - Both 'options[]' and 'full_duplex[]' should exist for driver - interoperability. - The media type is usually passed in 'options[]'. -*/ - -#define MAX_UNITS 3 /* More are supported, limit only on options */ -#ifdef MODULE -static int options[MAX_UNITS] = {-1, -1, -1}; -static int full_duplex[MAX_UNITS] = {-1, -1, -1}; -#endif - -#ifdef CONFIG_SBMAC_COALESCE -static int int_pktcnt = 0; -static int int_timeout = 0; -#endif - -/* Operational parameters that usually are not changed. */ - -/* Time in jiffies before concluding the transmitter is hung. */ -#define TX_TIMEOUT (2*HZ) - #include #include #include @@ -89,16 +53,56 @@ #endif +/* Operational parameters that usually are not changed. */ + +#define CONFIG_SBMAC_COALESCE + +#define MAX_UNITS 3 /* More are supported, limit only on options */ + +/* Time in jiffies before concluding the transmitter is hung. */ +#define TX_TIMEOUT (2*HZ) + MODULE_AUTHOR("Mitch Lichtenberg (Broadcom Corp.)"); MODULE_DESCRIPTION("Broadcom SiByte SOC GB Ethernet driver"); -MODULE_PARM(debug, "i"); -MODULE_PARM(noisy_mii, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(int_pktcnt, "i"); -MODULE_PARM(int_timeout, "i"); +/* A few user-configurable values which may be modified when a driver + module is loaded. */ + +/* 1 normal messages, 0 quiet .. 7 verbose. */ +static int debug = 1; +module_param(debug, int, S_IRUGO); +MODULE_PARM_DESC(debug, "Debug messages"); + +/* mii status msgs */ +static int noisy_mii = 1; +module_param(noisy_mii, int, S_IRUGO); +MODULE_PARM_DESC(noisy_mii, "MII status messages"); + +/* Used to pass the media type, etc. + Both 'options[]' and 'full_duplex[]' should exist for driver + interoperability. + The media type is usually passed in 'options[]'. +*/ +#ifdef MODULE +static int options[MAX_UNITS] = {-1, -1, -1}; +module_param_array(options, int, NULL, S_IRUGO); +MODULE_PARM_DESC(options, "1-" __MODULE_STRING(MAX_UNITS)); + +static int full_duplex[MAX_UNITS] = {-1, -1, -1}; +module_param_array(full_duplex, int, NULL, S_IRUGO); +MODULE_PARM_DESC(full_duplex, "1-" __MODULE_STRING(MAX_UNITS)); +#endif + +#ifdef CONFIG_SBMAC_COALESCE +static int int_pktcnt = 0; +module_param(int_pktcnt, int, S_IRUGO); +MODULE_PARM_DESC(int_pktcnt, "Packet count"); + +static int int_timeout = 0; +module_param(int_timeout, int, S_IRUGO); +MODULE_PARM_DESC(int_timeout, "Timeout value"); +#endif #include #include @@ -1811,8 +1815,6 @@ /* read system identification to determine revision */ if (periph_rev >= 2) { - printk(KERN_INFO "%s: enabling TCP rcv checksum\n", - sc->sbm_dev->name); sc->rx_hw_checksum = ENABLE; } else { sc->rx_hw_checksum = DISABLE; @@ -2417,6 +2419,11 @@ if (err) goto out_uninit; + if (periph_rev >= 2) { + printk(KERN_INFO "%s: enabling TCP rcv checksum\n", + sc->sbm_dev->name); + } + /* * Display Ethernet address (this is called during the config * process so we need to finish off the config message that @@ -2879,12 +2886,12 @@ dev->mem_end = 0; if (sbmac_init(dev, idx)) { port = A_MAC_CHANNEL_BASE(idx); - SBMAC_WRITECSR(KSEG1ADDR(port+R_MAC_ETHERNET_ADDR), - sbmac_orig_hwaddr[idx] ); + SBMAC_WRITECSR(IOADDR(port+R_MAC_ETHERNET_ADDR), + sbmac_orig_hwaddr[idx]); free_netdev(dev); continue; } - dev_sbmac[idx++] = dev; + dev_sbmac[idx] = dev; } return 0; } diff -Nru a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c --- a/drivers/net/sgiseeq.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/sgiseeq.c 2005-03-07 14:54:18 -08:00 @@ -136,9 +136,10 @@ hregs->rx_ctrl = HPC3_ERXCTRL_ACTIVE; } -static inline void seeq_load_eaddr(struct net_device *dev, - struct sgiseeq_regs *sregs) +static inline void __sgiseeq_set_mac_address(struct net_device *dev) { + struct sgiseeq_private *sp = netdev_priv(dev); + struct sgiseeq_regs *sregs = sp->sregs; int i; sregs->tstat = SEEQ_TCMD_RB0; @@ -146,6 +147,20 @@ sregs->rw.eth_addr[i] = dev->dev_addr[i]; } +static int sgiseeq_set_mac_address(struct net_device *dev, void *addr) +{ + struct sgiseeq_private *sp = netdev_priv(dev); + struct sockaddr *sa = addr; + + memcpy(dev->dev_addr, sa->sa_data, dev->addr_len); + + spin_lock_irq(&sp->tx_lock); + __sgiseeq_set_mac_address(dev); + spin_unlock_irq(&sp->tx_lock); + + return 0; +} + #define TCNTINFO_INIT (HPCDMA_EOX | HPCDMA_ETXD) #define RCNTCFG_INIT (HPCDMA_OWN | HPCDMA_EORP | HPCDMA_XIE) #define RCNTINFO_INIT (RCNTCFG_INIT | (PKT_BUF_SZ & HPCDMA_BCNT)) @@ -159,13 +174,7 @@ sp->rx_new = sp->tx_new = 0; sp->rx_old = sp->tx_old = 0; - seeq_load_eaddr(dev, sp->sregs); - - /* XXX for now just accept packets directly to us - * XXX and ether-broadcast. Will do multicast and - * XXX promiscuous mode later. -davem - */ - sp->mode = SEEQ_RCMD_RBCAST; + __sgiseeq_set_mac_address(dev); /* Setup tx ring. */ for(i = 0; i < SEEQ_TX_BUFFERS; i++) { @@ -175,7 +184,7 @@ buffer = (unsigned long) kmalloc(PKT_BUF_SZ, GFP_KERNEL); if (!buffer) return -ENOMEM; - sp->tx_desc[i].buf_vaddr = KSEG1ADDR(buffer); + sp->tx_desc[i].buf_vaddr = CKSEG1ADDR(buffer); sp->tx_desc[i].tdma.pbuf = CPHYSADDR(buffer); } sp->tx_desc[i].tdma.cntinfo = TCNTINFO_INIT; @@ -189,7 +198,7 @@ buffer = (unsigned long) kmalloc(PKT_BUF_SZ, GFP_KERNEL); if (!buffer) return -ENOMEM; - sp->rx_desc[i].buf_vaddr = KSEG1ADDR(buffer); + sp->rx_desc[i].buf_vaddr = CKSEG1ADDR(buffer); sp->rx_desc[i].rdma.pbuf = CPHYSADDR(buffer); } sp->rx_desc[i].rdma.cntinfo = RCNTINFO_INIT; @@ -331,10 +340,17 @@ /* Copy out of kseg1 to avoid silly cache flush. */ eth_copy_and_sum(skb, pkt_pointer + 2, len, 0); skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); - dev->last_rx = jiffies; - sp->stats.rx_packets++; - sp->stats.rx_bytes += len; + + /* We don't want to receive our own packets */ + if (memcmp(eth_hdr(skb)->h_source, dev->dev_addr, ETH_ALEN)) { + netif_rx(skb); + dev->last_rx = jiffies; + sp->stats.rx_packets++; + sp->stats.rx_bytes += len; + } else { + /* Silently drop my own packets */ + dev_kfree_skb_irq(skb); + } } else { printk (KERN_NOTICE "%s: Memory squeeze, deferring packet.\n", dev->name); @@ -373,7 +389,7 @@ */ while ((td->tdma.cntinfo & (HPCDMA_XIU | HPCDMA_ETXD)) == (HPCDMA_XIU | HPCDMA_ETXD)) - td = (struct sgiseeq_tx_desc *)(long) KSEG1ADDR(td->tdma.pnext); + td = (struct sgiseeq_tx_desc *)(long) CKSEG1ADDR(td->tdma.pnext); if (td->tdma.cntinfo & HPCDMA_XIU) { hregs->tx_ndptr = CPHYSADDR(td); hregs->tx_ctrl = HPC3_ETXCTRL_ACTIVE; @@ -583,6 +599,22 @@ static void sgiseeq_set_multicast(struct net_device *dev) { + struct sgiseeq_private *sp = (struct sgiseeq_private *) dev->priv; + unsigned char oldmode = sp->mode; + + if(dev->flags & IFF_PROMISC) + sp->mode = SEEQ_RCMD_RANY; + else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count) + sp->mode = SEEQ_RCMD_RBMCAST; + else + sp->mode = SEEQ_RCMD_RBCAST; + + /* XXX I know this sucks, but is there a better way to reprogram + * XXX the receiver? At least, this shouldn't happen too often. + */ + + if (oldmode != sp->mode) + sgiseeq_reset(dev); } static inline void setup_tx_ring(struct sgiseeq_tx_desc *buf, int nbufs) @@ -651,13 +683,14 @@ sp->sregs = (struct sgiseeq_regs *) &hpc3c0->eth_ext[0]; sp->hregs = &hpc3c0->ethregs; sp->name = sgiseeqstr; + sp->mode = SEEQ_RCMD_RBCAST; sp->rx_desc = (struct sgiseeq_rx_desc *) - KSEG1ADDR(ALIGNED(&sp->srings->rxvector[0])); + CKSEG1ADDR(ALIGNED(&sp->srings->rxvector[0])); dma_cache_wback_inv((unsigned long)&sp->srings->rxvector, sizeof(sp->srings->rxvector)); sp->tx_desc = (struct sgiseeq_tx_desc *) - KSEG1ADDR(ALIGNED(&sp->srings->txvector[0])); + CKSEG1ADDR(ALIGNED(&sp->srings->txvector[0])); dma_cache_wback_inv((unsigned long)&sp->srings->txvector, sizeof(sp->srings->txvector)); @@ -681,6 +714,7 @@ dev->watchdog_timeo = (200 * HZ) / 1000; dev->get_stats = sgiseeq_get_stats; dev->set_multicast_list = sgiseeq_set_multicast; + dev->set_mac_address = sgiseeq_set_mac_address; dev->irq = irq; if (register_netdev(dev)) { diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/sis900.c 2005-03-07 14:54:17 -08:00 @@ -2226,7 +2226,7 @@ #ifdef CONFIG_PM -static int sis900_suspend(struct pci_dev *pci_dev, u32 state) +static int sis900_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct net_device *net_dev = pci_get_drvdata(pci_dev); long ioaddr = net_dev->base_addr; diff -Nru a/drivers/net/sk98lin/skethtool.c b/drivers/net/sk98lin/skethtool.c --- a/drivers/net/sk98lin/skethtool.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/sk98lin/skethtool.c 2005-03-07 14:54:18 -08:00 @@ -257,7 +257,7 @@ strlcpy(info->driver, DRIVER_FILE_NAME, sizeof(info->driver)); strcpy(info->version, vers); strcpy(info->fw_version, "N/A"); - strlcpy(info->bus_info, pAC->PciDev->slot_name, ETHTOOL_BUSINFO_LEN); + strlcpy(info->bus_info, pci_name(pAC->PciDev), ETHTOOL_BUSINFO_LEN); } /* diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c --- a/drivers/net/sk98lin/skge.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/sk98lin/skge.c 2005-03-07 14:54:16 -08:00 @@ -3058,7 +3058,7 @@ */ * ((SK_U32 *)pMemBuf) = 0; * ((SK_U32 *)pMemBuf + 1) = pdev->bus->number; - * ((SK_U32 *)pMemBuf + 2) = ParseDeviceNbrFromSlotName(pdev->slot_name); + * ((SK_U32 *)pMemBuf + 2) = ParseDeviceNbrFromSlotName(pci_name(pdev)); if(copy_to_user(Ioctl.pData, pMemBuf, Length) ) { Err = -EFAULT; goto fault_diag; @@ -5151,6 +5151,8 @@ { PCI_VENDOR_ID_LINKSYS, 0x1064, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { 0, } }; + +MODULE_DEVICE_TABLE(pci, skge_pci_tbl); static struct pci_driver skge_driver = { .name = "skge", diff -Nru a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c --- a/drivers/net/sk_mca.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/sk_mca.c 2005-03-07 14:54:18 -08:00 @@ -127,12 +127,13 @@ #ifdef DEBUG static void dumpmem(struct net_device *dev, u32 start, u32 len) { + skmca_priv *priv = netdev_priv(dev); int z; for (z = 0; z < len; z++) { if ((z & 15) == 0) printk("%04x:", z); - printk(" %02x", SKMCA_READB(dev->mem_start + start + z)); + printk(" %02x", readb(priv->base + start + z)); if ((z & 15) == 15) printk("\n"); } @@ -220,21 +221,21 @@ static void ResetBoard(struct net_device *dev) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); - SKMCA_WRITEB(CTRL_RESET_ON, priv->ctrladdr); + writeb(CTRL_RESET_ON, priv->ctrladdr); udelay(10); - SKMCA_WRITEB(CTRL_RESET_OFF, priv->ctrladdr); + writeb(CTRL_RESET_OFF, priv->ctrladdr); } /* wait for LANCE interface to become not busy */ static int WaitLANCE(struct net_device *dev) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); int t = 0; - while ((SKMCA_READB(priv->ctrladdr) & STAT_IO_BUSY) == + while ((readb(priv->ctrladdr) & STAT_IO_BUSY) == STAT_IO_BUSY) { udelay(1); if (++t > 1000) { @@ -250,7 +251,7 @@ static void SetLANCE(struct net_device *dev, u16 addr, u16 value) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); unsigned long flags; /* disable interrupts */ @@ -263,19 +264,17 @@ /* transfer register address to RAP */ - SKMCA_WRITEB(CTRL_RESET_OFF | CTRL_RW_WRITE | CTRL_ADR_RAP, - priv->ctrladdr); - SKMCA_WRITEW(addr, priv->ioregaddr); - SKMCA_WRITEB(IOCMD_GO, priv->cmdaddr); + writeb(CTRL_RESET_OFF | CTRL_RW_WRITE | CTRL_ADR_RAP, priv->ctrladdr); + writew(addr, priv->ioregaddr); + writeb(IOCMD_GO, priv->cmdaddr); udelay(1); WaitLANCE(dev); /* transfer data to register */ - SKMCA_WRITEB(CTRL_RESET_OFF | CTRL_RW_WRITE | CTRL_ADR_DATA, - priv->ctrladdr); - SKMCA_WRITEW(value, priv->ioregaddr); - SKMCA_WRITEB(IOCMD_GO, priv->cmdaddr); + writeb(CTRL_RESET_OFF | CTRL_RW_WRITE | CTRL_ADR_DATA, priv->ctrladdr); + writew(value, priv->ioregaddr); + writeb(IOCMD_GO, priv->cmdaddr); udelay(1); WaitLANCE(dev); @@ -288,7 +287,7 @@ static u16 GetLANCE(struct net_device *dev, u16 addr) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); unsigned long flags; unsigned int res; @@ -302,21 +301,19 @@ /* transfer register address to RAP */ - SKMCA_WRITEB(CTRL_RESET_OFF | CTRL_RW_WRITE | CTRL_ADR_RAP, - priv->ctrladdr); - SKMCA_WRITEW(addr, priv->ioregaddr); - SKMCA_WRITEB(IOCMD_GO, priv->cmdaddr); + writeb(CTRL_RESET_OFF | CTRL_RW_WRITE | CTRL_ADR_RAP, priv->ctrladdr); + writew(addr, priv->ioregaddr); + writeb(IOCMD_GO, priv->cmdaddr); udelay(1); WaitLANCE(dev); /* transfer data from register */ - SKMCA_WRITEB(CTRL_RESET_OFF | CTRL_RW_READ | CTRL_ADR_DATA, - priv->ctrladdr); - SKMCA_WRITEB(IOCMD_GO, priv->cmdaddr); + writeb(CTRL_RESET_OFF | CTRL_RW_READ | CTRL_ADR_DATA, priv->ctrladdr); + writeb(IOCMD_GO, priv->cmdaddr); udelay(1); WaitLANCE(dev); - res = SKMCA_READW(priv->ioregaddr); + res = readw(priv->ioregaddr); /* reenable interrupts */ @@ -329,6 +326,7 @@ static void InitDscrs(struct net_device *dev) { + skmca_priv *priv = netdev_priv(dev); u32 bufaddr; /* Set up Tx descriptors. The board has only 16K RAM so bits 16..23 @@ -344,11 +342,10 @@ descr.Flags = 0; descr.Len = 0xf000; descr.Status = 0; - SKMCA_TOIO(dev->mem_start + RAM_TXBASE + + memcpy_toio(priv->base + RAM_TXBASE + (z * sizeof(LANCE_TxDescr)), &descr, sizeof(LANCE_TxDescr)); - SKMCA_SETIO(dev->mem_start + bufaddr, 0, - RAM_BUFSIZE); + memset_io(priv->base + bufaddr, 0, RAM_BUFSIZE); bufaddr += RAM_BUFSIZE; } } @@ -364,11 +361,10 @@ descr.Flags = RXDSCR_FLAGS_OWN; descr.MaxLen = -RAM_BUFSIZE; descr.Len = 0; - SKMCA_TOIO(dev->mem_start + RAM_RXBASE + + memcpy_toio(priv->base + RAM_RXBASE + (z * sizeof(LANCE_RxDescr)), &descr, sizeof(LANCE_RxDescr)); - SKMCA_SETIO(dev->mem_start + bufaddr, 0, - RAM_BUFSIZE); + memset_io(priv->base + bufaddr, 0, RAM_BUFSIZE); bufaddr += RAM_BUFSIZE; } } @@ -425,7 +421,7 @@ static void InitLANCE(struct net_device *dev) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); /* build up descriptors. */ @@ -478,6 +474,7 @@ static void InitBoard(struct net_device *dev) { + skmca_priv *priv = netdev_priv(dev); LANCE_InitBlock block; /* Lay out the shared RAM - first we create the init block for the LANCE. @@ -492,7 +489,7 @@ block.RdrP = (RAM_RXBASE & 0xffffff) | (LRXCOUNT << 29); block.TdrP = (RAM_TXBASE & 0xffffff) | (LTXCOUNT << 29); - SKMCA_TOIO(dev->mem_start + RAM_INITBASE, &block, sizeof(block)); + memcpy_toio(priv->base + RAM_INITBASE, &block, sizeof(block)); /* initialize LANCE. Implicitly sets up other structures in RAM. */ @@ -572,7 +569,7 @@ static u16 irqmiss_handler(struct net_device *dev, u16 oldcsr0) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); /* update statistics */ @@ -588,7 +585,7 @@ static u16 irqrx_handler(struct net_device *dev, u16 oldcsr0) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); LANCE_RxDescr descr; unsigned int descraddr; @@ -597,7 +594,7 @@ descraddr = RAM_RXBASE + (priv->nextrx * sizeof(LANCE_RxDescr)); while (1) { /* read descriptor */ - SKMCA_FROMIO(&descr, dev->mem_start + descraddr, + memcpy_fromio(&descr, priv->base + descraddr, sizeof(LANCE_RxDescr)); /* if we reach a descriptor we do not own, we're done */ @@ -629,8 +626,8 @@ if (skb == NULL) priv->stat.rx_dropped++; else { - SKMCA_FROMIO(skb_put(skb, descr.Len), - dev->mem_start + + memcpy_fromio(skb_put(skb, descr.Len), + priv->base + descr.LowAddr, descr.Len); skb->dev = dev; skb->protocol = eth_type_trans(skb, dev); @@ -647,7 +644,7 @@ descr.Flags |= RXDSCR_FLAGS_OWN; /* update descriptor in shared RAM */ - SKMCA_TOIO(dev->mem_start + descraddr, &descr, + memcpy_toio(priv->base + descraddr, &descr, sizeof(LANCE_RxDescr)); /* go to next descriptor */ @@ -669,7 +666,7 @@ static u16 irqtx_handler(struct net_device *dev, u16 oldcsr0) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); LANCE_TxDescr descr; unsigned int descraddr; @@ -679,7 +676,7 @@ RAM_TXBASE + (priv->nexttxdone * sizeof(LANCE_TxDescr)); while (priv->txbusy > 0) { /* read descriptor */ - SKMCA_FROMIO(&descr, dev->mem_start + descraddr, + memcpy_fromio(&descr, priv->base + descraddr, sizeof(LANCE_TxDescr)); /* if the LANCE still owns this one, we've worked out all sent packets */ @@ -798,9 +795,7 @@ if (dev == NULL) return len; - if (dev->priv == NULL) - return len; - priv = (skmca_priv *) dev->priv; + priv = netdev_priv(dev); /* print info */ @@ -825,7 +820,7 @@ static int skmca_open(struct net_device *dev) { int result; - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); /* register resources - only necessary for IRQ */ result = @@ -868,7 +863,7 @@ static int skmca_tx(struct sk_buff *skb, struct net_device *dev) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); LANCE_TxDescr descr; unsigned int address; int tmplen, retval = 0; @@ -894,8 +889,7 @@ /* get TX descriptor */ address = RAM_TXBASE + (priv->nexttxput * sizeof(LANCE_TxDescr)); - SKMCA_FROMIO(&descr, dev->mem_start + address, - sizeof(LANCE_TxDescr)); + memcpy_fromio(&descr, priv->base + address, sizeof(LANCE_TxDescr)); /* enter packet length as 2s complement - assure minimum length */ tmplen = skb->len; @@ -911,14 +905,14 @@ unsigned int destoffs = 0, l = strlen(fill); while (destoffs < tmplen) { - SKMCA_TOIO(dev->mem_start + descr.LowAddr + + memcpy_toio(priv->base + descr.LowAddr + destoffs, fill, l); destoffs += l; } } /* do the real data copying */ - SKMCA_TOIO(dev->mem_start + descr.LowAddr, skb->data, skb->len); + memcpy_toio(priv->base + descr.LowAddr, skb->data, skb->len); /* hand descriptor over to LANCE - this is the first and last chunk */ descr.Flags = @@ -945,8 +939,7 @@ netif_stop_queue(dev); /* write descriptor back to RAM */ - SKMCA_TOIO(dev->mem_start + address, &descr, - sizeof(LANCE_TxDescr)); + memcpy_toio(priv->base + address, &descr, sizeof(LANCE_TxDescr)); /* if no descriptors were active, give the LANCE a hint to read it immediately */ @@ -967,7 +960,7 @@ static struct net_device_stats *skmca_stats(struct net_device *dev) { - skmca_priv *priv = (skmca_priv *) dev->priv; + skmca_priv *priv = netdev_priv(dev); return &(priv->stat); } @@ -977,13 +970,14 @@ static void skmca_set_multicast_list(struct net_device *dev) { + skmca_priv *priv = netdev_priv(dev); LANCE_InitBlock block; /* first stop the LANCE... */ StopLANCE(dev); /* ...then modify the initialization block... */ - SKMCA_FROMIO(&block, dev->mem_start + RAM_INITBASE, sizeof(block)); + memcpy_fromio(&block, priv->base + RAM_INITBASE, sizeof(block)); if (dev->flags & IFF_PROMISC) block.Mode |= LANCE_INIT_PROM; else @@ -1003,7 +997,7 @@ } } - SKMCA_TOIO(dev->mem_start + RAM_INITBASE, &block, sizeof(block)); + memcpy_toio(priv->base + RAM_INITBASE, &block, sizeof(block)); /* ...then reinit LANCE with the correct flags */ InitLANCE(dev); @@ -1017,10 +1011,11 @@ static void cleanup_card(struct net_device *dev) { - skmca_priv *priv = dev->priv; + skmca_priv *priv = netdev_priv(dev); DeinitBoard(dev); if (dev->irq != 0) free_irq(dev->irq, dev); + iounmap(priv->base); mca_mark_as_unused(priv->slot); mca_set_adapter_procfn(priv->slot, NULL, NULL); } @@ -1104,13 +1099,20 @@ printk("%s: SKNet %s adapter found in slot %d\n", dev->name, junior ? "Junior MC2" : "MC2+", slot + 1); - /* allocate structure */ - priv = dev->priv; + priv = netdev_priv(dev); + priv->base = ioremap(base, 0x4000); + if (!priv->base) { + mca_set_adapter_procfn(slot, NULL, NULL); + mca_mark_as_unused(slot); + free_netdev(dev); + return ERR_PTR(-ENOMEM); + } + priv->slot = slot; - priv->macbase = base + 0x3fc0; - priv->ioregaddr = base + 0x3ff0; - priv->ctrladdr = base + 0x3ff2; - priv->cmdaddr = base + 0x3ff3; + priv->macbase = priv->base + 0x3fc0; + priv->ioregaddr = priv->base + 0x3ff0; + priv->ctrladdr = priv->base + 0x3ff2; + priv->cmdaddr = priv->base + 0x3ff3; priv->medium = medium; memset(&priv->stat, 0, sizeof(struct net_device_stats)); spin_lock_init(&priv->lock); @@ -1147,7 +1149,7 @@ /* copy out MAC address */ for (i = 0; i < 6; i++) - dev->dev_addr[i] = SKMCA_READB(priv->macbase + (i << 1)); + dev->dev_addr[i] = readb(priv->macbase + (i << 1)); /* print config */ printk("%s: IRQ %d, memory %#lx-%#lx, " diff -Nru a/drivers/net/sk_mca.h b/drivers/net/sk_mca.h --- a/drivers/net/sk_mca.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/sk_mca.h 2005-03-07 14:54:17 -08:00 @@ -5,16 +5,6 @@ #ifdef _SK_MCA_DRIVER_ -/* version-dependent functions/structures */ - -#define SKMCA_READB(addr) isa_readb(addr) -#define SKMCA_READW(addr) isa_readw(addr) -#define SKMCA_WRITEB(data, addr) isa_writeb(data, addr) -#define SKMCA_WRITEW(data, addr) isa_writew(data, addr) -#define SKMCA_TOIO(dest, src, len) isa_memcpy_toio(dest, src, len) -#define SKMCA_FROMIO(dest, src, len) isa_memcpy_fromio(dest, src, len) -#define SKMCA_SETIO(dest, val, len) isa_memset_io(dest, val, len) - /* Adapter ID's */ #define SKNET_MCA_ID 0x6afd #define SKNET_JUNIOR_MCA_ID 0x6be9 @@ -29,10 +19,11 @@ /* private structure */ typedef struct { unsigned int slot; /* MCA-Slot-# */ - unsigned int macbase; /* base address of MAC address PROM */ - unsigned int ioregaddr; /* address of I/O-register (Lo) */ - unsigned int ctrladdr; /* address of control/stat register */ - unsigned int cmdaddr; /* address of I/O-command register */ + void __iomem *base; + void __iomem *macbase; /* base address of MAC address PROM */ + void __iomem *ioregaddr;/* address of I/O-register (Lo) */ + void __iomem *ctrladdr; /* address of control/stat register */ + void __iomem *cmdaddr; /* address of I/O-command register */ int nextrx; /* index of next RX descriptor to be read */ int nexttxput; /* index of next free TX descriptor */ diff -Nru a/drivers/net/smc91x.c b/drivers/net/smc91x.c --- a/drivers/net/smc91x.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/smc91x.c 2005-03-07 14:54:18 -08:00 @@ -210,10 +210,15 @@ spinlock_t lock; +#ifdef SMC_CAN_USE_DATACS + u32 __iomem *datacs; +#endif + #ifdef SMC_USE_PXA_DMA /* DMA needs the physical address of the chip */ u_long physaddr; #endif + void __iomem *base; }; #if SMC_DEBUG > 0 @@ -307,8 +312,8 @@ */ static void smc_reset(struct net_device *dev) { - unsigned long ioaddr = dev->base_addr; struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; unsigned int ctl, cfg; DBG(2, "%s: %s\n", dev->name, __FUNCTION__); @@ -399,8 +404,8 @@ */ static void smc_enable(struct net_device *dev) { - unsigned long ioaddr = dev->base_addr; struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; int mask; DBG(2, "%s: %s\n", dev->name, __FUNCTION__); @@ -433,8 +438,8 @@ */ static void smc_shutdown(struct net_device *dev) { - unsigned long ioaddr = dev->base_addr; struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__); @@ -462,7 +467,7 @@ static inline void smc_rcv(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; unsigned int packet_number, status, packet_len; DBG(3, "%s: %s\n", dev->name, __FUNCTION__); @@ -483,7 +488,19 @@ dev->name, packet_number, status, packet_len, packet_len); - if (unlikely(status & RS_ERRORS)) { + back: + if (unlikely(packet_len < 6 || status & RS_ERRORS)) { + if (status & RS_TOOLONG && packet_len <= (1514 + 4 + 6)) { + /* accept VLAN packets */ + status &= ~RS_TOOLONG; + goto back; + } + if (packet_len < 6) { + /* bloody hardware */ + printk(KERN_ERR "%s: fubar (rxlen %u status %x\n", + dev->name, packet_len, status); + status |= RS_TOOSHORT; + } SMC_WAIT_MMU_BUSY(); SMC_SET_MMU_CMD(MC_RELEASE); lp->stats.rx_errors++; @@ -508,7 +525,7 @@ * (2 bytes, possibly containing the payload odd byte). * Furthermore, we add 2 bytes to allow rounding up to * multiple of 4 bytes on 32 bit buses. - * Ence packet_len - 6 + 2 + 2 + 2. + * Hence packet_len - 6 + 2 + 2 + 2. */ skb = dev_alloc_skb(packet_len); if (unlikely(skb == NULL)) { @@ -596,7 +613,7 @@ { struct net_device *dev = (struct net_device *)data; struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; struct sk_buff *skb; unsigned int packet_no, len; unsigned char *buf; @@ -680,7 +697,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; unsigned int numPages, poll_count, status; DBG(3, "%s: %s\n", dev->name, __FUNCTION__); @@ -752,8 +769,8 @@ */ static void smc_tx(struct net_device *dev) { - unsigned long ioaddr = dev->base_addr; struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; unsigned int saved_packet, packet_no, tx_status, pkt_len; DBG(3, "%s: %s\n", dev->name, __FUNCTION__); @@ -809,7 +826,8 @@ static void smc_mii_out(struct net_device *dev, unsigned int val, int bits) { - unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; unsigned int mii_reg, mask; mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO); @@ -830,7 +848,8 @@ static unsigned int smc_mii_in(struct net_device *dev, int bits) { - unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; unsigned int mii_reg, mask, val; mii_reg = SMC_GET_MII() & ~(MII_MCLK | MII_MDOE | MII_MDO); @@ -854,7 +873,8 @@ */ static int smc_phy_read(struct net_device *dev, int phyaddr, int phyreg) { - unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; unsigned int phydata; SMC_SELECT_BANK(3); @@ -884,7 +904,8 @@ static void smc_phy_write(struct net_device *dev, int phyaddr, int phyreg, int phydata) { - unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; SMC_SELECT_BANK(3); @@ -946,7 +967,7 @@ static int smc_phy_fixed(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; int phyaddr = lp->mii.phy_id; int bmcr, cfg1; @@ -1017,13 +1038,29 @@ /* * smc_phy_powerdown - powerdown phy * @dev: net device - * @phy: phy address * * Power down the specified PHY */ -static void smc_phy_powerdown(struct net_device *dev, int phy) +static void smc_phy_powerdown(struct net_device *dev) { + struct smc_local *lp = netdev_priv(dev); unsigned int bmcr; + int phy = lp->mii.phy_id; + + if (lp->phy_type == 0) + return; + + /* We need to ensure that no calls to smc_phy_configure are + pending. + + flush_scheduled_work() cannot be called because we are + running with the netlink semaphore held (from + devinet_ioctl()) and the pending work queue contains + linkwatch_event() (scheduled by netif_carrier_off() + above). linkwatch_event() also wants the netlink semaphore. + */ + while(lp->work_pending) + schedule(); bmcr = smc_phy_read(dev, phy, MII_BMCR); smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN); @@ -1040,7 +1077,7 @@ static void smc_phy_check_media(struct net_device *dev, int init) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { /* duplex state has changed */ @@ -1068,7 +1105,7 @@ { struct net_device *dev = data; struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; int phyaddr = lp->mii.phy_id; int my_phy_caps; /* My PHY capabilities */ int my_ad_caps; /* My Advertised capabilities */ @@ -1193,7 +1230,7 @@ static void smc_10bt_check_media(struct net_device *dev, int init) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; unsigned int old_carrier, new_carrier; old_carrier = netif_carrier_ok(dev) ? 1 : 0; @@ -1216,7 +1253,8 @@ static void smc_eph_interrupt(struct net_device *dev) { - unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; unsigned int ctl; smc_10bt_check_media(dev, 0); @@ -1235,8 +1273,8 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - unsigned long ioaddr = dev->base_addr; struct smc_local *lp = netdev_priv(dev); + void __iomem *ioaddr = lp->base; int status, mask, timeout, card_stats; int saved_pointer; @@ -1350,7 +1388,7 @@ static void smc_timeout(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; int status, mask, meminfo, fifo; DBG(2, "%s: %s\n", dev->name, __FUNCTION__); @@ -1394,7 +1432,7 @@ static void smc_set_multicast_list(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; + void __iomem *ioaddr = lp->base; unsigned char multicast_table[8]; int update_multicast = 0; @@ -1561,21 +1599,7 @@ /* clear everything */ smc_shutdown(dev); - if (lp->phy_type != 0) { - /* We need to ensure that no calls to - smc_phy_configure are pending. - - flush_scheduled_work() cannot be called because we - are running with the netlink semaphore held (from - devinet_ioctl()) and the pending work queue - contains linkwatch_event() (scheduled by - netif_carrier_off() above). linkwatch_event() also - wants the netlink semaphore. - */ - while(lp->work_pending) - schedule(); - smc_phy_powerdown(dev, lp->mii.phy_id); - } + smc_phy_powerdown(dev); if (lp->pending_tx_skb) { dev_kfree_skb(lp->pending_tx_skb); @@ -1723,7 +1747,7 @@ * I just deleted auto_irq.c, since it was never built... * --jgarzik */ -static int __init smc_findirq(unsigned long ioaddr) +static int __init smc_findirq(void __iomem *ioaddr) { int timeout = 20; unsigned long cookie; @@ -1796,7 +1820,7 @@ * o actually GRAB the irq. * o GRAB the region */ -static int __init smc_probe(struct net_device *dev, unsigned long ioaddr) +static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) { struct smc_local *lp = netdev_priv(dev); static int version_printed = 0; @@ -1813,7 +1837,7 @@ if ((val & 0xFF) == 0x33) { printk(KERN_WARNING "%s: Detected possible byte-swapped interface" - " at IOADDR 0x%lx\n", CARDNAME, ioaddr); + " at IOADDR %p\n", CARDNAME, ioaddr); } retval = -ENODEV; goto err_out; @@ -1839,8 +1863,8 @@ SMC_SELECT_BANK(1); val = SMC_GET_BASE(); val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT; - if ((ioaddr & ((PAGE_SIZE-1)<> 4) & 0xF]; if (!version_string || (revision_register & 0xff00) != 0x3300) { /* I don't recognize this chip, so... */ - printk("%s: IO 0x%lx: Unrecognized revision register 0x%04x" + printk("%s: IO %p: Unrecognized revision register 0x%04x" ", Contact author.\n", CARDNAME, ioaddr, revision_register); @@ -1868,7 +1892,8 @@ printk("%s", version); /* fill in some of the fields */ - dev->base_addr = ioaddr; + dev->base_addr = (unsigned long)ioaddr; + lp->base = ioaddr; lp->version = revision_register & 0xff; spin_lock_init(&lp->lock); @@ -1974,9 +1999,9 @@ retval = register_netdev(dev); if (retval == 0) { /* now, print out the card info, in a short format.. */ - printk("%s: %s (rev %d) at %#lx IRQ %d", + printk("%s: %s (rev %d) at %p IRQ %d", dev->name, version_string, revision_register & 0x0f, - dev->base_addr, dev->irq); + lp->base, dev->irq); if (dev->dma != (unsigned char)-1) printk(" DMA %d", dev->dma); @@ -2012,16 +2037,21 @@ return retval; } -static int smc_enable_device(unsigned long attrib_phys) +static int smc_enable_device(struct platform_device *pdev) { unsigned long flags; unsigned char ecor, ecsr; - void *addr; + void __iomem *addr; + struct resource * res; + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); + if (!res) + return 0; /* * Map the attribute space. This is overkill, but clean. */ - addr = ioremap(attrib_phys, ATTRIB_SIZE); + addr = ioremap(res->start, ATTRIB_SIZE); if (!addr) return -ENOMEM; @@ -2069,6 +2099,62 @@ return 0; } +static int smc_request_attrib(struct platform_device *pdev) +{ + struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); + + if (!res) + return 0; + + if (!request_mem_region(res->start, ATTRIB_SIZE, CARDNAME)) + return -EBUSY; + + return 0; +} + +static void smc_release_attrib(struct platform_device *pdev) +{ + struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); + + if (res) + release_mem_region(res->start, ATTRIB_SIZE); +} + +#ifdef SMC_CAN_USE_DATACS +static void smc_request_datacs(struct platform_device *pdev, struct net_device *ndev) +{ + struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-data32"); + struct smc_local *lp = netdev_priv(ndev); + + if (!res) + return; + + if(!request_mem_region(res->start, SMC_DATA_EXTENT, CARDNAME)) { + printk(KERN_INFO "%s: failed to request datacs memory region.\n", CARDNAME); + return; + } + + lp->datacs = ioremap(res->start, SMC_DATA_EXTENT); +} + +static void smc_release_datacs(struct platform_device *pdev, struct net_device *ndev) +{ + struct smc_local *lp = netdev_priv(ndev); + struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-data32"); + + if (lp->datacs) + iounmap(lp->datacs); + + lp->datacs = NULL; + + if (res) + release_mem_region(res->start, SMC_DATA_EXTENT); +} +#else +static void smc_request_datacs(struct platform_device *pdev, struct net_device *ndev) {} +static void smc_release_datacs(struct platform_device *pdev, struct net_device *ndev) {} +#endif + /* * smc_init(void) * Input parameters: @@ -2084,20 +2170,20 @@ { struct platform_device *pdev = to_platform_device(dev); struct net_device *ndev; - struct resource *res, *ext = NULL; - unsigned int *addr; + struct resource *res; + unsigned int __iomem *addr; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); + if (!res) + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { ret = -ENODEV; goto out; } - /* - * Request the regions. - */ - if (!request_mem_region(res->start, SMC_IO_EXTENT, "smc91x")) { + + if (!request_mem_region(res->start, SMC_IO_EXTENT, CARDNAME)) { ret = -EBUSY; goto out; } @@ -2106,7 +2192,7 @@ if (!ndev) { printk("%s: could not allocate device.\n", CARDNAME); ret = -ENOMEM; - goto release_1; + goto out_release_io; } SET_MODULE_OWNER(ndev); SET_NETDEV_DEV(ndev, dev); @@ -2114,42 +2200,26 @@ ndev->dma = (unsigned char)-1; ndev->irq = platform_get_irq(pdev, 0); - ext = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (ext) { - if (!request_mem_region(ext->start, ATTRIB_SIZE, ndev->name)) { - ret = -EBUSY; - goto release_1; - } - + ret = smc_request_attrib(pdev); + if (ret) + goto out_free_netdev; #if defined(CONFIG_SA1100_ASSABET) - NCR_0 |= NCR_ENET_OSC_EN; + NCR_0 |= NCR_ENET_OSC_EN; #endif - - ret = smc_enable_device(ext->start); - if (ret) - goto release_both; - } + ret = smc_enable_device(pdev); + if (ret) + goto out_release_attrib; addr = ioremap(res->start, SMC_IO_EXTENT); if (!addr) { ret = -ENOMEM; - goto release_both; + goto out_release_attrib; } dev_set_drvdata(dev, ndev); - ret = smc_probe(ndev, (unsigned long)addr); - if (ret != 0) { - dev_set_drvdata(dev, NULL); - iounmap(addr); - release_both: - if (ext) - release_mem_region(ext->start, ATTRIB_SIZE); - free_netdev(ndev); - release_1: - release_mem_region(res->start, SMC_IO_EXTENT); - out: - printk("%s: not found (%d).\n", CARDNAME, ret); - } + ret = smc_probe(ndev, addr); + if (ret != 0) + goto out_iounmap; #ifdef SMC_USE_PXA_DMA else { struct smc_local *lp = netdev_priv(ndev); @@ -2157,6 +2227,22 @@ } #endif + smc_request_datacs(pdev, ndev); + + return 0; + + out_iounmap: + dev_set_drvdata(dev, NULL); + iounmap(addr); + out_release_attrib: + smc_release_attrib(pdev); + out_free_netdev: + free_netdev(ndev); + out_release_io: + release_mem_region(res->start, SMC_IO_EXTENT); + out: + printk("%s: not found (%d).\n", CARDNAME, ret); + return ret; } @@ -2164,6 +2250,7 @@ { struct platform_device *pdev = to_platform_device(dev); struct net_device *ndev = dev_get_drvdata(dev); + struct smc_local *lp = netdev_priv(ndev); struct resource *res; dev_set_drvdata(dev, NULL); @@ -2176,11 +2263,14 @@ if (ndev->dma != (unsigned char)-1) pxa_free_dma(ndev->dma); #endif - iounmap((void *)ndev->base_addr); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (res) - release_mem_region(res->start, ATTRIB_SIZE); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + iounmap(lp->base); + + smc_release_datacs(pdev,ndev); + smc_release_attrib(pdev); + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); + if (!res) + platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(res->start, SMC_IO_EXTENT); free_netdev(ndev); @@ -2196,6 +2286,7 @@ if (netif_running(ndev)) { netif_device_detach(ndev); smc_shutdown(ndev); + smc_phy_powerdown(ndev); } } return 0; @@ -2208,9 +2299,7 @@ if (ndev && level == RESUME_ENABLE) { struct smc_local *lp = netdev_priv(ndev); - - if (pdev->num_resources == 3) - smc_enable_device(pdev->resource[2].start); + smc_enable_device(pdev); if (netif_running(ndev)) { smc_reset(ndev); smc_enable(ndev); diff -Nru a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/smc91x.h 2005-03-07 14:54:17 -08:00 @@ -162,6 +162,45 @@ } } +#elif defined(CONFIG_ARCH_OMAP) + +/* We can only do 16-bit reads and writes in the static memory space. */ +#define SMC_CAN_USE_8BIT 0 +#define SMC_CAN_USE_16BIT 1 +#define SMC_CAN_USE_32BIT 0 +#define SMC_IO_SHIFT 0 +#define SMC_NOWAIT 1 + +#define SMC_inb(a, r) readb((a) + (r)) +#define SMC_outb(v, a, r) writeb(v, (a) + (r)) +#define SMC_inw(a, r) readw((a) + (r)) +#define SMC_outw(v, a, r) writew(v, (a) + (r)) +#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) +#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) +#define SMC_inl(a, r) readl((a) + (r)) +#define SMC_outl(v, a, r) writel(v, (a) + (r)) +#define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) +#define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) + +#elif defined(CONFIG_SH_SH4202_MICRODEV) + +#define SMC_CAN_USE_8BIT 0 +#define SMC_CAN_USE_16BIT 1 +#define SMC_CAN_USE_32BIT 0 + +#define SMC_inb(a, r) inb((a) + (r) - 0xa0000000) +#define SMC_inw(a, r) inw((a) + (r) - 0xa0000000) +#define SMC_inl(a, r) inl((a) + (r) - 0xa0000000) +#define SMC_outb(v, a, r) outb(v, (a) + (r) - 0xa0000000) +#define SMC_outw(v, a, r) outw(v, (a) + (r) - 0xa0000000) +#define SMC_outl(v, a, r) outl(v, (a) + (r) - 0xa0000000) +#define SMC_insl(a, r, p, l) insl((a) + (r) - 0xa0000000, p, l) +#define SMC_outsl(a, r, p, l) outsl((a) + (r) - 0xa0000000, p, l) +#define SMC_insw(a, r, p, l) insw((a) + (r) - 0xa0000000, p, l) +#define SMC_outsw(a, r, p, l) outsw((a) + (r) - 0xa0000000, p, l) + +#define set_irq_type(irq, type) do {} while(0) + #elif defined(CONFIG_ISA) #define SMC_CAN_USE_8BIT 1 @@ -362,7 +401,7 @@ #define SMC_IO_SHIFT 0 #endif #define SMC_IO_EXTENT (16 << SMC_IO_SHIFT) - +#define SMC_DATA_EXTENT (4) /* . Bank Select Register: @@ -883,7 +922,7 @@ #endif #if SMC_CAN_USE_32BIT -#define SMC_PUSH_DATA(p, l) \ +#define _SMC_PUSH_DATA(p, l) \ do { \ char *__ptr = (p); \ int __len = (l); \ @@ -898,7 +937,7 @@ SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG ); \ } \ } while (0) -#define SMC_PULL_DATA(p, l) \ +#define _SMC_PULL_DATA(p, l) \ do { \ char *__ptr = (p); \ int __len = (l); \ @@ -918,11 +957,11 @@ SMC_insl( ioaddr, DATA_REG, __ptr, __len >> 2); \ } while (0) #elif SMC_CAN_USE_16BIT -#define SMC_PUSH_DATA(p, l) SMC_outsw( ioaddr, DATA_REG, p, (l) >> 1 ) -#define SMC_PULL_DATA(p, l) SMC_insw ( ioaddr, DATA_REG, p, (l) >> 1 ) +#define _SMC_PUSH_DATA(p, l) SMC_outsw( ioaddr, DATA_REG, p, (l) >> 1 ) +#define _SMC_PULL_DATA(p, l) SMC_insw ( ioaddr, DATA_REG, p, (l) >> 1 ) #elif SMC_CAN_USE_8BIT -#define SMC_PUSH_DATA(p, l) SMC_outsb( ioaddr, DATA_REG, p, l ) -#define SMC_PULL_DATA(p, l) SMC_insb ( ioaddr, DATA_REG, p, l ) +#define _SMC_PUSH_DATA(p, l) SMC_outsb( ioaddr, DATA_REG, p, l ) +#define _SMC_PULL_DATA(p, l) SMC_insb ( ioaddr, DATA_REG, p, l ) #endif #if ! SMC_CAN_USE_16BIT @@ -939,6 +978,51 @@ __val16 |= SMC_inb( ioaddr, reg + (1 << SMC_IO_SHIFT)) << 8; \ __val16; \ }) +#endif + +#if SMC_CAN_USE_DATACS +#define SMC_PUSH_DATA(p, l) \ + if ( lp->datacs ) { \ + unsigned char *__ptr = (p); \ + int __len = (l); \ + if (__len >= 2 && (unsigned long)__ptr & 2) { \ + __len -= 2; \ + SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG ); \ + __ptr += 2; \ + } \ + outsl(lp->datacs, __ptr, __len >> 2); \ + if (__len & 2) { \ + __ptr += (__len & ~3); \ + SMC_outw( *((u16 *)__ptr), ioaddr, DATA_REG ); \ + } \ + } else { \ + _SMC_PUSH_DATA(p, l); \ + } + +#define SMC_PULL_DATA(p, l) \ + if ( lp->datacs ) { \ + unsigned char *__ptr = (p); \ + int __len = (l); \ + if ((unsigned long)__ptr & 2) { \ + /* \ + * We want 32bit alignment here. \ + * Since some buses perform a full 32bit \ + * fetch even for 16bit data we can't use \ + * SMC_inw() here. Back both source (on chip \ + * and destination) pointers of 2 bytes. \ + */ \ + __ptr -= 2; \ + __len += 2; \ + SMC_SET_PTR( 2|PTR_READ|PTR_RCV|PTR_AUTOINC ); \ + } \ + __len += 2; \ + insl( lp->datacs, __ptr, __len >> 2); \ + } else { \ + _SMC_PULL_DATA(p, l); \ + } +#else +#define SMC_PUSH_DATA(p, l) _SMC_PUSH_DATA(p, l) +#define SMC_PULL_DATA(p, l) _SMC_PULL_DATA(p, l) #endif #if !defined (SMC_INTERRUPT_PREAMBLE) diff -Nru a/drivers/net/sonic.c b/drivers/net/sonic.c --- a/drivers/net/sonic.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/sonic.c 2005-03-07 14:54:18 -08:00 @@ -116,7 +116,7 @@ /* * Map the packet data into the logical DMA address space */ - if ((laddr = vdma_alloc(PHYSADDR(skb->data), skb->len)) == ~0UL) { + if ((laddr = vdma_alloc(CPHYSADDR(skb->data), skb->len)) == ~0UL) { printk("%s: no VDMA entry for transmit available.\n", dev->name); dev_kfree_skb(skb); @@ -223,7 +223,7 @@ /* We must free the original skb */ if (lp->tx_skb[entry]) { - dev_kfree_skb(lp->tx_skb[entry]); + dev_kfree_skb_irq(lp->tx_skb[entry]); lp->tx_skb[entry] = 0; } /* and the VDMA address */ diff -Nru a/drivers/net/sundance.c b/drivers/net/sundance.c --- a/drivers/net/sundance.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/sundance.c 2005-03-07 14:54:17 -08:00 @@ -1210,9 +1210,11 @@ } /* Yup, this is a documentation bug. It cost me *hours*. */ iowrite16 (0, ioaddr + TxStatus); - tx_status = ioread16 (ioaddr + TxStatus); - if (tx_cnt < 0) + if (tx_cnt < 0) { + iowrite32(5000, ioaddr + DownCounter); break; + } + tx_status = ioread16 (ioaddr + TxStatus); } hw_frame_id = (tx_status >> 8) & 0xff; } else { @@ -1278,7 +1280,6 @@ if (netif_msg_intr(np)) printk(KERN_DEBUG "%s: exiting interrupt, status=%#4.4x.\n", dev->name, ioread16(ioaddr + IntrStatus)); - iowrite32(5000, ioaddr + DownCounter); return IRQ_RETVAL(handled); } diff -Nru a/drivers/net/sungem.c b/drivers/net/sungem.c --- a/drivers/net/sungem.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/sungem.c 2005-03-07 14:54:18 -08:00 @@ -2356,7 +2356,7 @@ } #ifdef CONFIG_PM -static int gem_suspend(struct pci_dev *pdev, u32 state) +static int gem_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct gem *gp = dev->priv; diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/tg3.c 2005-03-07 14:54:17 -08:00 @@ -60,8 +60,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.23" -#define DRV_MODULE_RELDATE "February 15, 2005" +#define DRV_MODULE_VERSION "3.24" +#define DRV_MODULE_RELDATE "March 4, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -3110,6 +3110,12 @@ (mss = skb_shinfo(skb)->tso_size) != 0) { int tcp_opt_len, ip_tcp_len; + if (skb_header_cloned(skb) && + pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { + dev_kfree_skb(skb); + goto out_unlock; + } + tcp_opt_len = ((skb->h.th->doff - 5) * 4); ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); @@ -3697,8 +3703,9 @@ /* tp->lock is held. */ static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind) { - tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, - NIC_SRAM_FIRMWARE_MBOX_MAGIC1); + if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) + tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, + NIC_SRAM_FIRMWARE_MBOX_MAGIC1); if (tp->tg3_flags2 & TG3_FLG2_ASF_NEW_HANDSHAKE) { switch (kind) { @@ -3902,19 +3909,20 @@ tw32_f(MAC_MODE, 0); udelay(40); - /* Wait for firmware initialization to complete. */ - for (i = 0; i < 100000; i++) { - tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); - if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) - break; - udelay(10); - } - if (i >= 100000 && - !(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) { - printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, " - "firmware will not restart magic=%08x\n", - tp->dev->name, val); - return -ENODEV; + if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) { + /* Wait for firmware initialization to complete. */ + for (i = 0; i < 100000; i++) { + tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); + if (val == ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) + break; + udelay(10); + } + if (i >= 100000) { + printk(KERN_ERR PFX "tg3_reset_hw timed out for %s, " + "firmware will not restart magic=%08x\n", + tp->dev->name, val); + return -ENODEV; + } } if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && @@ -8940,7 +8948,7 @@ } } -static int tg3_suspend(struct pci_dev *pdev, u32 state) +static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct tg3 *tp = netdev_priv(dev); @@ -8967,7 +8975,7 @@ spin_unlock(&tp->tx_lock); spin_unlock_irq(&tp->lock); - err = tg3_set_power_state(tp, state); + err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); if (err) { spin_lock_irq(&tp->lock); spin_lock(&tp->tx_lock); diff -Nru a/drivers/net/tg3.h b/drivers/net/tg3.h --- a/drivers/net/tg3.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/tg3.h 2005-03-07 14:54:16 -08:00 @@ -1548,20 +1548,6 @@ #define MII_TG3_INT_DUPLEXCHG 0x0008 #define MII_TG3_INT_ANEG_PAGE_RX 0x0400 -/* XXX Add this to mii.h */ -#ifndef ADVERTISE_PAUSE -#define ADVERTISE_PAUSE_CAP 0x0400 -#endif -#ifndef ADVERTISE_PAUSE_ASYM -#define ADVERTISE_PAUSE_ASYM 0x0800 -#endif -#ifndef LPA_PAUSE -#define LPA_PAUSE_CAP 0x0400 -#endif -#ifndef LPA_PAUSE_ASYM -#define LPA_PAUSE_ASYM 0x0800 -#endif - /* There are two ways to manage the TX descriptors on the tigon3. * Either the descriptors are in host DMA'able memory, or they * exist only in the cards on-chip SRAM. All 16 send bds are under diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/tulip/de2104x.c 2005-03-07 14:54:18 -08:00 @@ -1927,7 +1927,7 @@ goto fill_defaults; } -static int __devinit de_init_one (struct pci_dev *pdev, +static int __init de_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { struct net_device *dev; diff -Nru a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h --- a/drivers/net/tulip/tulip.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/tulip/tulip.h 2005-03-07 14:54:18 -08:00 @@ -476,7 +476,7 @@ if (!i) printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n", - tp->pdev->slot_name); + pci_name(tp->pdev)); } } diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c --- a/drivers/net/tulip/tulip_core.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/tulip/tulip_core.c 2005-03-07 14:54:17 -08:00 @@ -1749,7 +1749,7 @@ #ifdef CONFIG_PM -static int tulip_suspend (struct pci_dev *pdev, u32 state) +static int tulip_suspend (struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); diff -Nru a/drivers/net/typhoon-firmware.h b/drivers/net/typhoon-firmware.h --- a/drivers/net/typhoon-firmware.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/typhoon-firmware.h 2005-03-07 14:54:16 -08:00 @@ -1,5 +1,5 @@ /* - * Copyright 1999-2003 3Com Corporation. All Rights Reserved. + * Copyright 1999-2004 3Com Corporation. All Rights Reserved. * * Redistribution and use in source and binary forms of the 3c990img.h * microcode software are permitted provided that the following conditions @@ -31,14 +31,15 @@ * COMBINATION WITH THE 3c990img.h MICROCODE SOFTWARE */ + /* ver 03.001.008 */ const u8 typhoon_firmware_image[] = { 0x54, 0x59, 0x50, 0x48, 0x4f, 0x4f, 0x4e, 0x00, 0x02, 0x00, 0x00, 0x00, -0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf, 0xcd, 0x57, 0xc3, -0xba, 0x01, 0x2c, 0xe8, 0xcd, 0xef, 0xa9, 0xd9, 0x6f, 0xbb, 0x76, 0x2f, -0x86, 0x49, 0xac, 0x1b, 0x40, 0x01, 0x00, 0x00, 0x8a, 0xe4, 0x00, 0x00, +0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x99, 0xb1, 0xd4, +0x4c, 0xb8, 0xd0, 0x4b, 0x32, 0x02, 0xd4, 0xee, 0x73, 0x7e, 0x0b, 0x13, +0x9b, 0xc0, 0xae, 0xf4, 0x40, 0x01, 0x00, 0x00, 0xe8, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0x00, 0x00, 0xea, 0x05, 0x00, 0x00, 0xea, 0x04, 0x00, 0x00, 0xea, 0x03, 0x00, 0x00, 0xea, 0x02, 0x00, 0x00, 0xea, -0x01, 0x00, 0x00, 0xea, 0x32, 0x02, 0x00, 0xea, 0xc0, 0x14, 0x00, 0xea, +0x01, 0x00, 0x00, 0xea, 0x32, 0x02, 0x00, 0xea, 0xc5, 0x14, 0x00, 0xea, 0x07, 0x00, 0x2d, 0xe9, 0x0e, 0x00, 0xa0, 0xe1, 0x00, 0x10, 0x0f, 0xe1, 0xd0, 0x20, 0x9f, 0xe5, 0x12, 0xff, 0x2f, 0xe1, 0xfe, 0xff, 0xff, 0xea, 0x01, 0x00, 0x80, 0xe0, 0x04, 0x20, 0x81, 0xe4, 0x01, 0x00, 0x50, 0xe1, @@ -50,7 +51,7 @@ 0x88, 0xd0, 0x9f, 0xe5, 0xdb, 0x00, 0xa0, 0xe3, 0x00, 0xf0, 0x21, 0xe1, 0x7c, 0xd0, 0x9f, 0xe5, 0xd2, 0x00, 0xa0, 0xe3, 0x00, 0xf0, 0x21, 0xe1, 0x74, 0xd0, 0x9f, 0xe5, 0xd1, 0x00, 0xa0, 0xe3, 0x00, 0xf0, 0x21, 0xe1, -0x6c, 0xd0, 0x9f, 0xe5, 0x96, 0x14, 0x00, 0xeb, 0xd3, 0x00, 0xa0, 0xe3, +0x6c, 0xd0, 0x9f, 0xe5, 0x9b, 0x14, 0x00, 0xeb, 0xd3, 0x00, 0xa0, 0xe3, 0x00, 0xf0, 0x21, 0xe1, 0x60, 0xd0, 0x9f, 0xe5, 0x60, 0x00, 0x9f, 0xe5, 0x60, 0x10, 0x9f, 0xe5, 0x60, 0x20, 0x9f, 0xe5, 0xdb, 0xff, 0xff, 0xeb, 0x5c, 0x00, 0x9f, 0xe5, 0x5c, 0x10, 0x9f, 0xe5, 0x00, 0x20, 0xa0, 0xe3, @@ -58,21 +59,21 @@ 0xd4, 0xff, 0xff, 0xeb, 0x0a, 0x00, 0xa0, 0xe1, 0x0b, 0xf0, 0xa0, 0xe1, 0xd3, 0x10, 0xa0, 0xe3, 0x01, 0xf0, 0x21, 0xe1, 0xd4, 0xff, 0xff, 0xeb, 0x3c, 0xa0, 0x9f, 0xe5, 0x1a, 0xff, 0x2f, 0xe1, 0xc6, 0xff, 0xff, 0xea, -0x01, 0x21, 0xff, 0xff, 0x0c, 0x00, 0x10, 0x00, 0x1c, 0x00, 0x10, 0x00, +0x15, 0x21, 0xff, 0xff, 0x0c, 0x00, 0x10, 0x00, 0x1c, 0x00, 0x10, 0x00, 0x3c, 0x38, 0x00, 0x80, 0xfc, 0x37, 0x00, 0x80, 0xfc, 0x3f, 0x00, 0x80, 0x7c, 0x34, 0x00, 0x80, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x30, 0x00, 0x80, -0xad, 0xde, 0xad, 0xde, 0x5c, 0xbc, 0x00, 0x00, 0x24, 0xab, 0x20, 0x40, -0x48, 0x29, 0x00, 0x00, 0x28, 0x05, 0x00, 0x80, 0x8d, 0xd2, 0x21, 0x40, +0xad, 0xde, 0xad, 0xde, 0xb0, 0xbb, 0x00, 0x00, 0x24, 0xab, 0x20, 0x40, +0x48, 0x29, 0x00, 0x00, 0x28, 0x05, 0x00, 0x80, 0xbd, 0xba, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x44, 0x57, 0x00, 0x00, 0x71, 0xaf, 0x00, 0x00, 0x60, 0x01, 0xff, 0xff, -0xb0, 0xb5, 0x07, 0x1c, 0x12, 0x4c, 0x00, 0x25, 0x20, 0x68, 0x00, 0x28, -0x1d, 0xd0, 0x38, 0x1c, 0x10, 0x49, 0x04, 0xf0, 0x71, 0xfd, 0x21, 0x68, -0xc0, 0x46, 0x08, 0x60, 0x00, 0x28, 0x14, 0xd0, 0x38, 0x01, 0x0d, 0x49, +0x58, 0x57, 0x00, 0x00, 0x86, 0x4b, 0x00, 0x00, 0x60, 0x01, 0xff, 0xff, +0xb0, 0xb5, 0x07, 0x1c, 0x12, 0x4d, 0x00, 0x24, 0x28, 0x68, 0x00, 0x28, +0x1e, 0xd0, 0x38, 0x1c, 0x10, 0x49, 0x04, 0xf0, 0x7b, 0xfd, 0x29, 0x68, +0xc0, 0x46, 0x08, 0x60, 0x00, 0x28, 0x15, 0xd0, 0x38, 0x01, 0x0d, 0x49, 0x40, 0x18, 0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x41, 0x6b, 0x80, 0x29, -0x0b, 0xd2, 0x01, 0x31, 0x41, 0x63, 0x20, 0x68, 0xc1, 0x69, 0xc0, 0x46, -0x21, 0x60, 0x39, 0x07, 0x41, 0x60, 0xc7, 0x62, 0xb0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x28, 0x1c, 0xfa, 0xe7, 0x00, 0x00, 0xe8, 0x17, 0x00, 0x80, +0x0c, 0xd2, 0x01, 0x31, 0x41, 0x63, 0x28, 0x68, 0xc1, 0x69, 0xc0, 0x46, +0x29, 0x60, 0x39, 0x07, 0x41, 0x60, 0x04, 0x62, 0xc7, 0x62, 0xb0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x20, 0x1c, 0xfa, 0xe7, 0xe8, 0x17, 0x00, 0x80, 0xee, 0x05, 0x00, 0x00, 0xa0, 0x1c, 0x00, 0x80, 0x02, 0x49, 0x0a, 0x68, 0xc0, 0x46, 0xc2, 0x61, 0x08, 0x60, 0x70, 0x47, 0xe8, 0x17, 0x00, 0x80, 0x70, 0x47, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, @@ -91,7 +92,7 @@ 0x1e, 0xff, 0x2f, 0xe1, 0x01, 0x20, 0x80, 0xe0, 0x01, 0x00, 0x80, 0xe0, 0x1e, 0xff, 0x2f, 0xe1, 0x80, 0xb5, 0x08, 0x4f, 0x64, 0x28, 0x04, 0xd3, 0x64, 0x20, 0x38, 0x63, 0x00, 0x20, 0xc0, 0x43, 0x03, 0xe0, 0x38, 0x63, -0x04, 0x49, 0x05, 0xf0, 0xf7, 0xfa, 0x78, 0x63, 0xb8, 0x63, 0x80, 0xbc, +0x04, 0x49, 0x05, 0xf0, 0x01, 0xfb, 0x78, 0x63, 0xb8, 0x63, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x88, 0x13, 0x00, 0x00, 0x80, 0xb4, 0x10, 0x4b, 0x00, 0x22, 0x1f, 0x6b, 0x64, 0x2f, 0x03, 0xd2, 0x09, 0x68, 0x09, 0x68, 0x49, 0x08, 0x02, 0xd2, 0x10, 0x1c, 0x80, 0xbc, @@ -104,7 +105,7 @@ 0x49, 0x08, 0x08, 0xd3, 0x21, 0x6c, 0xa2, 0x6b, 0x91, 0x42, 0x07, 0xd2, 0xfa, 0x1d, 0x39, 0x32, 0x52, 0x8b, 0x89, 0x18, 0x21, 0x64, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x78, 0x6a, 0x39, 0x6b, 0xc0, 0x46, 0x48, 0x62, -0x38, 0x6b, 0x02, 0xf0, 0x23, 0xfe, 0x38, 0x1c, 0x02, 0xf0, 0xde, 0xfa, +0x38, 0x6b, 0x02, 0xf0, 0x2d, 0xfe, 0x38, 0x1c, 0x02, 0xf0, 0xe8, 0xfa, 0x01, 0x20, 0xbb, 0x23, 0x1b, 0x01, 0xe1, 0x18, 0xc8, 0x73, 0x05, 0x49, 0x0a, 0x6c, 0x12, 0x18, 0x0a, 0x64, 0x04, 0x49, 0x8a, 0x6d, 0x12, 0x18, 0x8a, 0x65, 0xe4, 0xe7, 0x68, 0x0e, 0x00, 0x80, 0x0c, 0x2b, 0x00, 0x80, @@ -333,8 +334,8 @@ 0xc9, 0x68, 0x40, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x02, 0x30, 0x18, 0x43, 0x00, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x11, 0x23, 0x9b, 0x02, 0x98, 0x42, 0x18, 0xd1, 0x78, 0x6a, 0x39, 0x6b, 0xc0, 0x46, -0x48, 0x62, 0x38, 0x6b, 0x02, 0xf0, 0xd0, 0xf8, 0x38, 0x1c, 0x01, 0xf0, -0x8b, 0xfd, 0x01, 0x20, 0x07, 0x49, 0xc0, 0x46, 0xc8, 0x73, 0x07, 0x49, +0x48, 0x62, 0x38, 0x6b, 0x02, 0xf0, 0xda, 0xf8, 0x38, 0x1c, 0x01, 0xf0, +0x95, 0xfd, 0x01, 0x20, 0x07, 0x49, 0xc0, 0x46, 0xc8, 0x73, 0x07, 0x49, 0x4a, 0x6c, 0x12, 0x18, 0x4a, 0x64, 0x06, 0x49, 0x8a, 0x6d, 0x12, 0x18, 0x8a, 0x65, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0xfa, 0xe7, 0x18, 0x1a, 0x00, 0x80, 0x0c, 0x2b, 0x00, 0x80, 0xa4, 0x2a, 0x00, 0x80, @@ -370,7 +371,7 @@ 0xc2, 0x60, 0x38, 0x1c, 0x00, 0xf0, 0xce, 0xfa, 0x38, 0x6a, 0x01, 0x30, 0x38, 0x62, 0x38, 0x1c, 0x00, 0xf0, 0x0a, 0xf8, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x10, 0x1c, 0xfa, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, -0x1c, 0xad, 0x20, 0x40, 0xf0, 0xb5, 0x07, 0x1c, 0xf9, 0x1d, 0xf9, 0x31, +0xac, 0xab, 0x20, 0x40, 0xf0, 0xb5, 0x07, 0x1c, 0xf9, 0x1d, 0xf9, 0x31, 0x88, 0x6a, 0xc2, 0x1d, 0x2d, 0x32, 0x01, 0x23, 0x9b, 0x07, 0x08, 0x32, 0x1a, 0x43, 0xc8, 0x6a, 0x12, 0x68, 0x12, 0x04, 0x12, 0x0c, 0x80, 0x18, 0x82, 0x79, 0xc3, 0x79, 0x1b, 0x02, 0x1a, 0x43, 0x13, 0x02, 0x12, 0x0a, @@ -381,7 +382,7 @@ 0xc2, 0x1d, 0x0d, 0x32, 0x1a, 0x43, 0x12, 0x68, 0x12, 0x04, 0x12, 0x30, 0x18, 0x43, 0x00, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x10, 0x43, 0x03, 0x1c, 0xf8, 0x1d, 0xff, 0x30, 0x4a, 0x30, 0x82, 0x78, 0xc8, 0x6b, 0x19, 0x1c, -0x01, 0xf0, 0xf8, 0xff, 0x00, 0x28, 0x04, 0xda, 0x20, 0x8a, 0xff, 0x23, +0x02, 0xf0, 0x02, 0xf8, 0x00, 0x28, 0x04, 0xda, 0x20, 0x8a, 0xff, 0x23, 0x01, 0x33, 0x18, 0x43, 0x0e, 0xe0, 0xf9, 0x1d, 0xff, 0x31, 0x3a, 0x31, 0x08, 0x60, 0x01, 0x04, 0x09, 0x0c, 0x38, 0x1c, 0x00, 0xf0, 0x1c, 0xf8, 0x00, 0x28, 0x14, 0xd1, 0x20, 0x8a, 0x01, 0x23, 0x5b, 0x02, 0x18, 0x43, @@ -398,7 +399,7 @@ 0x60, 0x6b, 0x81, 0x42, 0xf8, 0xd8, 0x69, 0x89, 0xea, 0x88, 0x89, 0x18, 0x81, 0x42, 0xf3, 0xd8, 0x00, 0x98, 0x01, 0x28, 0x25, 0xd1, 0xe0, 0x6a, 0xf1, 0x6b, 0x40, 0x18, 0x71, 0x6c, 0xfa, 0x1d, 0xcd, 0x32, 0x01, 0xf0, -0x29, 0xf9, 0xfa, 0x1d, 0xff, 0x32, 0x3a, 0x32, 0xe0, 0x6a, 0x51, 0x69, +0x33, 0xf9, 0xfa, 0x1d, 0xff, 0x32, 0x3a, 0x32, 0xe0, 0x6a, 0x51, 0x69, 0x40, 0x18, 0xc3, 0x1d, 0x03, 0x33, 0x00, 0x20, 0x81, 0x00, 0x5e, 0x58, 0xc9, 0x19, 0xff, 0x31, 0x01, 0x31, 0x4e, 0x61, 0x01, 0x30, 0x04, 0x28, 0xf6, 0xd3, 0xe0, 0x6a, 0x51, 0x69, 0x40, 0x18, 0xc1, 0x1d, 0x05, 0x31, @@ -419,7 +420,7 @@ 0xc0, 0x46, 0x09, 0x90, 0xff, 0x23, 0x1b, 0x02, 0x18, 0x40, 0x00, 0x0a, 0x0a, 0x90, 0x0a, 0x98, 0xa4, 0x4e, 0x01, 0x28, 0x59, 0xd1, 0x28, 0x6b, 0xa2, 0x68, 0x80, 0x18, 0xa2, 0x4a, 0x21, 0x69, -0x09, 0x04, 0x09, 0x0c, 0x01, 0xf0, 0x1c, 0xf9, 0x28, 0x6b, 0x79, 0x69, +0x09, 0x04, 0x09, 0x0c, 0x01, 0xf0, 0x26, 0xf9, 0x28, 0x6b, 0x79, 0x69, 0x40, 0x18, 0xc1, 0x1d, 0x05, 0x31, 0x00, 0x20, 0x82, 0x00, 0x98, 0x4b, 0xd3, 0x18, 0xff, 0x33, 0x01, 0x33, 0x5b, 0x69, 0xc0, 0x46, 0x8b, 0x50, 0x01, 0x30, 0x04, 0x28, 0xf4, 0xd3, 0x00, 0x20, 0x31, 0x1c, 0x82, 0x00, @@ -429,7 +430,7 @@ 0x8e, 0x48, 0xc1, 0x89, 0x01, 0x31, 0xc1, 0x81, 0xb8, 0x68, 0x00, 0x28, 0x03, 0xd1, 0x38, 0x8a, 0x10, 0x23, 0x18, 0x43, 0x71, 0xe0, 0x38, 0x8a, 0x40, 0x23, 0x18, 0x43, 0x6d, 0xe0, 0x00, 0xf0, 0x11, 0xf9, 0x01, 0xf0, -0x5d, 0xff, 0xf5, 0xe0, 0x01, 0x30, 0x06, 0x28, 0xe3, 0xd3, 0x08, 0x98, +0x67, 0xff, 0xf5, 0xe0, 0x01, 0x30, 0x06, 0x28, 0xe3, 0xd3, 0x08, 0x98, 0x00, 0x28, 0x0c, 0xd1, 0xb8, 0x68, 0x41, 0x1c, 0xb9, 0x60, 0x00, 0x28, 0x03, 0xd1, 0x38, 0x8a, 0x01, 0x23, 0x18, 0x43, 0x02, 0xe0, 0x38, 0x8a, 0x04, 0x23, 0x18, 0x43, 0x38, 0x82, 0x78, 0x68, 0x01, 0x30, 0x78, 0x60, @@ -470,10 +471,10 @@ 0xff, 0xf7, 0xc0, 0xfd, 0x00, 0x28, 0x11, 0xd1, 0x0e, 0xe0, 0x00, 0x20, 0x30, 0x72, 0x11, 0xe0, 0x33, 0x29, 0x01, 0xd0, 0x32, 0x29, 0x0d, 0xd1, 0x07, 0x1c, 0x00, 0xf0, 0x71, 0xf8, 0x38, 0x1c, 0xff, 0xf7, 0xb0, 0xfd, -0x00, 0x28, 0x01, 0xd1, 0x01, 0xf0, 0x66, 0xfe, 0x0d, 0xb0, 0xf0, 0xbc, +0x00, 0x28, 0x01, 0xd1, 0x01, 0xf0, 0x70, 0xfe, 0x0d, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xf0, 0x12, 0xf8, 0xf6, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, 0x4c, 0x2a, 0x00, 0x80, -0x1c, 0xad, 0x20, 0x40, 0x40, 0x07, 0x00, 0x80, 0x82, 0x07, 0x00, 0x80, +0xac, 0xab, 0x20, 0x40, 0x40, 0x07, 0x00, 0x80, 0x82, 0x07, 0x00, 0x80, 0x0c, 0x2b, 0x00, 0x80, 0x6c, 0x07, 0x00, 0x80, 0xf0, 0xb5, 0x25, 0x48, 0x41, 0x68, 0x01, 0x31, 0x41, 0x60, 0x24, 0x4f, 0xf9, 0x1d, 0xf9, 0x31, 0x00, 0x24, 0x88, 0x6a, 0xfa, 0x68, 0xc0, 0x46, 0x94, 0x61, 0x04, 0x22, @@ -485,7 +486,7 @@ 0x4a, 0x6b, 0xfb, 0x68, 0xc0, 0x46, 0xda, 0x81, 0x0a, 0x6b, 0xc0, 0x46, 0x82, 0x62, 0xc4, 0x62, 0xc3, 0x1d, 0x39, 0x33, 0x4a, 0x6b, 0xc0, 0x46, 0x5a, 0x83, 0x04, 0x23, 0x02, 0x68, 0x1a, 0x43, 0x02, 0x60, 0x88, 0x6a, -0x01, 0xf0, 0x28, 0xfa, 0xf8, 0x68, 0x01, 0x23, 0x9b, 0x07, 0x54, 0x30, +0x01, 0xf0, 0x32, 0xfa, 0xf8, 0x68, 0x01, 0x23, 0x9b, 0x07, 0x54, 0x30, 0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, 0xf8, 0x60, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x0c, 0x2b, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, 0xac, 0x07, 0x00, 0x80, 0x80, 0xb5, 0xc1, 0x1d, 0xf9, 0x31, 0x8a, 0x6a, @@ -546,7 +547,7 @@ 0x04, 0x23, 0x90, 0x6a, 0xc0, 0x46, 0xc3, 0x60, 0x10, 0x23, 0x83, 0x61, 0xcb, 0x0a, 0x01, 0xd3, 0x18, 0x23, 0x83, 0x61, 0xc1, 0x83, 0x51, 0x6b, 0xc0, 0x46, 0xc1, 0x81, 0x51, 0x6b, 0xc2, 0x1d, 0x39, 0x32, 0x51, 0x83, -0x04, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x01, 0xf0, 0xb8, 0xf8, +0x04, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x01, 0xf0, 0xc2, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x0c, 0x2b, 0x00, 0x80, 0xb0, 0xb5, 0x1b, 0x4c, 0x20, 0x6a, 0x02, 0x28, 0x1b, 0xd2, 0x00, 0x20, 0xe7, 0x1d, 0x19, 0x37, 0x38, 0x71, 0xe1, 0x68, 0xe0, 0x1d, 0xf9, 0x30, @@ -555,1331 +556,1331 @@ 0x02, 0x28, 0x00, 0xd3, 0x3d, 0x71, 0xe0, 0x68, 0x00, 0x28, 0x02, 0xd0, 0x38, 0x79, 0x00, 0x28, 0xf1, 0xd0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x40, 0x6a, 0x00, 0x28, 0xf9, 0xd1, 0x00, 0x29, 0xf7, 0xd1, 0x60, 0x69, -0x00, 0x28, 0x04, 0xd0, 0x06, 0x48, 0x00, 0x68, 0x03, 0xf0, 0x9e, 0xfc, -0xef, 0xe7, 0x60, 0x68, 0x00, 0x28, 0xec, 0xd0, 0x00, 0xf0, 0x50, 0xf8, +0x00, 0x28, 0x04, 0xd0, 0x06, 0x48, 0x00, 0x68, 0x03, 0xf0, 0xa8, 0xfc, +0xef, 0xe7, 0x60, 0x68, 0x00, 0x28, 0xec, 0xd0, 0x00, 0xf0, 0x5a, 0xf8, 0xe9, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0x34, 0x04, 0x00, 0x80, -0xb0, 0xb5, 0x07, 0x1c, 0x20, 0x23, 0xb8, 0x68, 0x18, 0x40, 0x00, 0x25, -0x00, 0x28, 0x03, 0xd1, 0x28, 0x1c, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0xc4, 0x23, 0x48, 0x68, 0x18, 0x40, 0x01, 0x24, 0x00, 0x28, 0x03, 0xd1, -0x38, 0x6a, 0x00, 0xf0, 0x09, 0xfc, 0x2f, 0xe0, 0x38, 0x1c, 0x00, 0xf0, -0x19, 0xfc, 0x38, 0x1c, 0x00, 0xf0, 0x78, 0xfa, 0xb8, 0x68, 0xc0, 0x08, -0x02, 0xd3, 0x38, 0x6a, 0x00, 0xf0, 0xce, 0xfb, 0xb8, 0x68, 0x39, 0x6a, -0xc0, 0x46, 0x88, 0x60, 0x38, 0x6a, 0xc0, 0x46, 0xc5, 0x60, 0x0f, 0x48, -0x41, 0x68, 0x00, 0x29, 0x11, 0xd1, 0xc1, 0x68, 0x00, 0x29, 0x09, 0xd1, -0x41, 0x69, 0x00, 0x29, 0x06, 0xd1, 0x39, 0x6a, 0xc0, 0x46, 0x81, 0x60, -0x41, 0x60, 0x00, 0xf0, 0x11, 0xf8, 0x0b, 0xe0, 0x39, 0x6a, 0xc0, 0x46, -0x81, 0x60, 0x41, 0x60, 0x06, 0xe0, 0x39, 0x6a, 0x82, 0x68, 0xc0, 0x46, -0xd1, 0x60, 0x39, 0x6a, 0xc0, 0x46, 0x81, 0x60, 0x20, 0x1c, 0xc0, 0xe7, -0x6c, 0x06, 0x00, 0x80, 0x90, 0xb5, 0x0b, 0x4c, 0x67, 0x68, 0x00, 0x2f, -0x0f, 0xd0, 0x38, 0x1c, 0x00, 0xf0, 0x12, 0xf8, 0x00, 0x28, 0x0a, 0xd1, -0x60, 0x68, 0xc0, 0x68, 0xc0, 0x46, 0x60, 0x60, 0x38, 0x1c, 0x00, 0xf0, -0xc3, 0xfb, 0x00, 0x20, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x01, 0x20, -0xfa, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0xf0, 0xb5, 0x07, 0x1c, -0xfe, 0x1d, 0x49, 0x36, 0x30, 0x78, 0x40, 0x00, 0xc0, 0x19, 0x85, 0x8b, -0x33, 0x4c, 0x34, 0x4b, 0x9d, 0x42, 0x3c, 0xd0, 0x38, 0x1c, 0x21, 0x1c, -0x2a, 0x1c, 0x00, 0xf0, 0x1d, 0xf9, 0x31, 0x48, 0x80, 0x6a, 0x58, 0x21, -0x69, 0x43, 0x40, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x18, 0x43, 0x00, 0x68, -0x00, 0x04, 0x00, 0x0c, 0x2c, 0x4d, 0x01, 0x28, 0x1a, 0xd1, 0x30, 0x78, -0xc0, 0x19, 0xc1, 0x1d, 0x19, 0x31, 0x08, 0x7a, 0x3a, 0x68, 0x80, 0x18, -0x09, 0x7b, 0xea, 0x1d, 0x21, 0x32, 0x00, 0xf0, 0xe3, 0xfc, 0x30, 0x78, -0xc0, 0x19, 0x20, 0x30, 0x00, 0x79, 0x39, 0x68, 0x40, 0x18, 0xc1, 0x1d, -0x05, 0x31, 0x00, 0x20, 0x00, 0x23, 0x42, 0x00, 0x8b, 0x52, 0x01, 0x30, -0x06, 0x28, 0xfa, 0xd3, 0xa0, 0x88, 0x41, 0x07, 0x0b, 0xd1, 0x21, 0x89, -0x09, 0x18, 0x78, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x81, 0x42, 0x04, 0xd8, -0x61, 0x89, 0xe2, 0x88, 0x89, 0x18, 0x81, 0x42, 0x03, 0xd9, 0x00, 0x20, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x21, 0x1c, 0x14, 0x4a, 0x00, 0x20, -0xfe, 0xf7, 0x64, 0xff, 0x01, 0x22, 0x52, 0x04, 0x78, 0x68, 0x02, 0x43, -0x01, 0x20, 0x39, 0x68, 0xfe, 0xf7, 0x5c, 0xff, 0x01, 0x22, 0x52, 0x04, -0x78, 0x68, 0x02, 0x43, 0x00, 0x20, 0x39, 0x68, -0xfe, 0xf7, 0x54, 0xff, 0x0b, 0x49, 0x0c, 0x4a, 0x01, 0x20, 0xfe, 0xf7, -0x4f, 0xff, 0x01, 0x20, 0xe9, 0x1d, 0x19, 0x31, 0x48, 0x71, 0x02, 0x21, -0xea, 0x1d, 0xf9, 0x32, 0x51, 0x62, 0xd9, 0xe7, 0x98, 0xad, 0x20, 0x40, -0xff, 0xff, 0x00, 0x00, 0x4c, 0x2a, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, -0x54, 0x00, 0x03, 0x00, 0x84, 0xad, 0x20, 0x40, 0x14, 0x00, 0x07, 0x00, -0xf0, 0xb5, 0x83, 0xb0, 0x00, 0x21, 0x4f, 0x48, 0xc2, 0x1d, 0xf9, 0x32, -0x51, 0x62, 0x01, 0x21, 0xc9, 0x04, 0x4d, 0x4a, 0xc0, 0x46, 0x11, 0x60, -0xc1, 0x1d, 0x19, 0x31, 0x49, 0x79, 0x00, 0x29, 0x04, 0xd1, 0x4a, 0x48, -0x00, 0x68, 0x03, 0xf0, 0x9b, 0xfb, 0x87, 0xe0, 0x45, 0x48, 0x47, 0x68, -0xfc, 0x1d, 0x49, 0x34, 0x21, 0x78, 0x48, 0x00, 0xc0, 0x19, 0x80, 0x8b, -0x44, 0x4a, 0x92, 0x6a, 0x58, 0x23, 0x58, 0x43, 0x15, 0x18, 0x01, 0x23, -0x9b, 0x07, 0xea, 0x1d, 0x05, 0x32, 0x1a, 0x43, 0x12, 0x68, 0x08, 0x35, -0x2b, 0x43, 0x1d, 0x68, 0xff, 0x23, 0x1b, 0x02, 0x2b, 0x40, 0x1b, 0x0a, -0x3c, 0x4d, 0x01, 0x2b, 0x24, 0xd1, 0xc8, 0x19, 0xc1, 0x1d, 0x19, 0x31, -0x08, 0x7a, 0x3a, 0x68, 0x80, 0x18, 0x39, 0x4a, 0x09, 0x7b, 0x00, 0xf0, -0xc5, 0xfc, 0x20, 0x78, 0xc0, 0x19, 0x20, 0x30, 0x00, 0x79, 0x39, 0x68, -0x41, 0x18, 0x00, 0x20, 0x82, 0x00, 0x53, 0x19, 0x9b, 0x6e, 0x6e, 0x46, -0xb3, 0x50, 0x01, 0x30, 0x03, 0x28, 0xf7, 0xd3, 0xca, 0x1d, 0x05, 0x32, -0x69, 0x46, 0x00, 0x20, 0x43, 0x00, 0xcd, 0x5a, 0xc0, 0x46, 0xd5, 0x52, -0x01, 0x30, 0x06, 0x28, 0xf8, 0xd3, 0x2d, 0xe0, 0x02, 0x2b, 0x2b, 0xd1, -0x11, 0x0a, 0x29, 0xd3, 0x00, 0x21, 0x8a, 0x00, 0x53, 0x19, 0x9b, 0x6e, -0x6e, 0x46, 0xb3, 0x50, 0x01, 0x31, 0x03, 0x29, 0xf7, 0xd3, 0x21, 0x78, -0x49, 0x00, 0xc9, 0x19, 0x09, 0x8f, 0x3a, 0x68, 0x8b, 0x18, 0x6a, 0x46, -0x00, 0x21, 0x4d, 0x00, 0x56, 0x5b, 0xc0, 0x46, 0x5e, 0x53, 0x01, 0x31, -0x06, 0x29, 0xf8, 0xd3, 0x19, 0x49, 0x8a, 0x6a, 0x13, 0x18, 0x1a, 0x6d, -0x00, 0x9d, 0x55, 0x40, 0x19, 0x4a, 0xd6, 0x68, 0x75, 0x40, 0x1d, 0x65, -0x89, 0x6a, 0x08, 0x18, 0x41, 0x6d, 0x02, 0x9b, 0x59, 0x40, 0x92, 0x69, -0x51, 0x40, 0x41, 0x65, 0x20, 0x78, 0x41, 0x1e, 0x21, 0x70, 0x00, 0x28, -0x0d, 0xd0, 0x38, 0x1c, 0xff, 0xf7, 0xf4, 0xfe, 0x00, 0x28, 0x0d, 0xd1, -0x08, 0x4a, 0x50, 0x68, 0xc0, 0x68, 0xc0, 0x46, 0x50, 0x60, 0x38, 0x1c, -0x00, 0xf0, 0xa4, 0xfa, 0x02, 0xe0, 0x38, 0x1c, 0x00, 0xf0, 0x73, 0xfa, -0x01, 0xf0, 0xde, 0xfa, 0x03, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x6c, 0x06, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, 0x38, 0x04, 0x00, 0x80, -0x4c, 0x2a, 0x00, 0x80, 0x1c, 0xad, 0x20, 0x40, 0x94, 0x06, 0x00, 0x80, -0x08, 0x83, 0x20, 0x40, 0xf0, 0xb5, 0x82, 0xb0, 0x69, 0x4b, 0x9f, 0x6a, -0x58, 0x23, 0x5a, 0x43, 0xba, 0x18, 0xc3, 0x1d, 0x49, 0x33, 0x1f, 0x78, -0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, 0x01, 0x34, 0x23, 0x43, 0x1d, 0x68, -0x43, 0x68, 0x1c, 0x04, 0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, 0x05, 0x36, -0x33, 0x43, 0x1b, 0x68, 0x1c, 0x43, 0x42, 0x23, 0x1c, 0x43, 0x0c, 0x60, -0xff, 0x26, 0x36, 0x02, 0x2e, 0x40, 0x01, 0x23, 0x5b, 0x02, 0x9e, 0x42, -0x74, 0xd1, 0x6b, 0x0c, 0x2b, 0xd3, 0xc3, 0x19, 0x20, 0x33, 0x1b, 0x79, +0xb0, 0xb5, 0x07, 0x1c, 0x20, 0x23, 0xb8, 0x68, 0x18, 0x40, 0x01, 0x24, +0x00, 0x25, 0x00, 0x28, 0x0b, 0xd1, 0x38, 0x6a, 0x00, 0x28, 0x03, 0xd1, +0x28, 0x1c, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x1f, 0x48, 0x01, 0x6e, +0x01, 0x31, 0x01, 0x66, 0x03, 0xe0, 0x48, 0x68, 0xc4, 0x23, 0x18, 0x40, +0x03, 0xd1, 0x38, 0x6a, 0x00, 0xf0, 0x0c, 0xfc, 0x2f, 0xe0, 0x38, 0x1c, +0x00, 0xf0, 0x1c, 0xfc, 0x38, 0x1c, 0x00, 0xf0, 0x7b, 0xfa, 0xb8, 0x68, +0xc0, 0x08, 0x02, 0xd3, 0x38, 0x6a, 0x00, 0xf0, 0xd1, 0xfb, 0xb8, 0x68, +0x39, 0x6a, 0xc0, 0x46, 0x88, 0x60, 0x38, 0x6a, 0xc0, 0x46, 0xc5, 0x60, +0x10, 0x48, 0x41, 0x68, 0x00, 0x29, 0x11, 0xd1, 0xc1, 0x68, 0x00, 0x29, +0x09, 0xd1, 0x41, 0x69, 0x00, 0x29, 0x06, 0xd1, 0x39, 0x6a, 0xc0, 0x46, +0x81, 0x60, 0x41, 0x60, 0x00, 0xf0, 0x14, 0xf8, 0x0b, 0xe0, 0x39, 0x6a, +0xc0, 0x46, 0x81, 0x60, 0x41, 0x60, 0x06, 0xe0, 0x39, 0x6a, 0x82, 0x68, +0xc0, 0x46, 0xd1, 0x60, 0x39, 0x6a, 0xc0, 0x46, 0x81, 0x60, 0x20, 0x1c, +0xbd, 0xe7, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, +0x90, 0xb5, 0x0b, 0x4c, 0x67, 0x68, 0x00, 0x2f, 0x0f, 0xd0, 0x38, 0x1c, +0x00, 0xf0, 0x12, 0xf8, 0x00, 0x28, 0x0a, 0xd1, 0x60, 0x68, 0xc0, 0x68, +0xc0, 0x46, 0x60, 0x60, 0x38, 0x1c, 0x00, 0xf0, 0xc3, 0xfb, 0x00, 0x20, +0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x01, 0x20, 0xfa, 0xe7, 0x00, 0x00, +0x6c, 0x06, 0x00, 0x80, 0xf0, 0xb5, 0x07, 0x1c, 0xfe, 0x1d, 0x49, 0x36, +0x30, 0x78, 0x40, 0x00, 0xc0, 0x19, 0x85, 0x8b, 0x33, 0x4c, 0x34, 0x4b, +0x9d, 0x42, 0x3c, 0xd0, 0x38, 0x1c, 0x21, 0x1c, 0x2a, 0x1c, 0x00, 0xf0, +0x1d, 0xf9, 0x31, 0x48, 0x80, 0x6a, 0x58, 0x21, 0x69, 0x43, 0x40, 0x18, +0x01, 0x23, 0x9b, 0x07, 0x18, 0x43, 0x00, 0x68, 0x00, 0x04, 0x00, 0x0c, +0x2c, 0x4d, 0x01, 0x28, 0x1a, 0xd1, 0x30, 0x78, 0xc0, 0x19, 0xc1, 0x1d, +0x19, 0x31, 0x08, 0x7a, 0x3a, 0x68, 0x80, 0x18, 0x09, 0x7b, 0xea, 0x1d, +0x21, 0x32, 0x00, 0xf0, 0xe3, 0xfc, 0x30, 0x78, 0xc0, 0x19, 0x20, 0x30, +0x00, 0x79, 0x39, 0x68, 0x40, 0x18, 0xc1, 0x1d, 0x05, 0x31, 0x00, 0x20, +0x00, 0x23, 0x42, 0x00, 0x8b, 0x52, 0x01, 0x30, 0x06, 0x28, 0xfa, 0xd3, +0xa0, 0x88, 0x41, 0x07, 0x0b, 0xd1, 0x21, 0x89, 0x09, 0x18, 0x78, 0x68, +0x00, 0x04, 0x00, 0x0c, 0x81, 0x42, 0x04, 0xd8, 0x61, 0x89, 0xe2, 0x88, +0x89, 0x18, 0x81, 0x42, 0x03, 0xd9, 0x00, 0x20, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x21, 0x1c, 0x14, 0x4a, 0x00, 0x20, 0xfe, 0xf7, 0x5a, 0xff, +0x01, 0x22, 0x52, 0x04, 0x78, 0x68, 0x02, 0x43, +0x01, 0x20, 0x39, 0x68, 0xfe, 0xf7, 0x52, 0xff, 0x01, 0x22, 0x52, 0x04, +0x78, 0x68, 0x02, 0x43, 0x00, 0x20, 0x39, 0x68, 0xfe, 0xf7, 0x4a, 0xff, +0x0b, 0x49, 0x0c, 0x4a, 0x01, 0x20, 0xfe, 0xf7, 0x45, 0xff, 0x01, 0x20, +0xe9, 0x1d, 0x19, 0x31, 0x48, 0x71, 0x02, 0x21, 0xea, 0x1d, 0xf9, 0x32, +0x51, 0x62, 0xd9, 0xe7, 0x28, 0xac, 0x20, 0x40, 0xff, 0xff, 0x00, 0x00, +0x4c, 0x2a, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, 0x54, 0x00, 0x03, 0x00, +0x14, 0xac, 0x20, 0x40, 0x14, 0x00, 0x07, 0x00, 0xf0, 0xb5, 0x83, 0xb0, +0x00, 0x21, 0x4f, 0x48, 0xc2, 0x1d, 0xf9, 0x32, 0x51, 0x62, 0x01, 0x21, +0xc9, 0x04, 0x4d, 0x4a, 0xc0, 0x46, 0x11, 0x60, 0xc1, 0x1d, 0x19, 0x31, +0x49, 0x79, 0x00, 0x29, 0x04, 0xd1, 0x4a, 0x48, 0x00, 0x68, 0x03, 0xf0, +0x9b, 0xfb, 0x87, 0xe0, 0x45, 0x48, 0x47, 0x68, 0xfc, 0x1d, 0x49, 0x34, +0x21, 0x78, 0x48, 0x00, 0xc0, 0x19, 0x80, 0x8b, 0x44, 0x4a, 0x92, 0x6a, +0x58, 0x23, 0x58, 0x43, 0x15, 0x18, 0x01, 0x23, 0x9b, 0x07, 0xea, 0x1d, +0x05, 0x32, 0x1a, 0x43, 0x12, 0x68, 0x08, 0x35, 0x2b, 0x43, 0x1d, 0x68, +0xff, 0x23, 0x1b, 0x02, 0x2b, 0x40, 0x1b, 0x0a, 0x3c, 0x4d, 0x01, 0x2b, +0x24, 0xd1, 0xc8, 0x19, 0xc1, 0x1d, 0x19, 0x31, 0x08, 0x7a, 0x3a, 0x68, +0x80, 0x18, 0x39, 0x4a, 0x09, 0x7b, 0x00, 0xf0, 0xc5, 0xfc, 0x20, 0x78, +0xc0, 0x19, 0x20, 0x30, 0x00, 0x79, 0x39, 0x68, 0x41, 0x18, 0x00, 0x20, +0x82, 0x00, 0x53, 0x19, 0x9b, 0x6e, 0x6e, 0x46, 0xb3, 0x50, 0x01, 0x30, +0x03, 0x28, 0xf7, 0xd3, 0xca, 0x1d, 0x05, 0x32, 0x69, 0x46, 0x00, 0x20, +0x43, 0x00, 0xcd, 0x5a, 0xc0, 0x46, 0xd5, 0x52, 0x01, 0x30, 0x06, 0x28, +0xf8, 0xd3, 0x2d, 0xe0, 0x02, 0x2b, 0x2b, 0xd1, 0x11, 0x0a, 0x29, 0xd3, +0x00, 0x21, 0x8a, 0x00, 0x53, 0x19, 0x9b, 0x6e, 0x6e, 0x46, 0xb3, 0x50, +0x01, 0x31, 0x03, 0x29, 0xf7, 0xd3, 0x21, 0x78, 0x49, 0x00, 0xc9, 0x19, +0x09, 0x8f, 0x3a, 0x68, 0x8b, 0x18, 0x6a, 0x46, 0x00, 0x21, 0x4d, 0x00, +0x56, 0x5b, 0xc0, 0x46, 0x5e, 0x53, 0x01, 0x31, 0x06, 0x29, 0xf8, 0xd3, +0x19, 0x49, 0x8a, 0x6a, 0x13, 0x18, 0x1a, 0x6d, 0x00, 0x9d, 0x55, 0x40, +0x19, 0x4a, 0xd6, 0x68, 0x75, 0x40, 0x1d, 0x65, 0x89, 0x6a, 0x08, 0x18, +0x41, 0x6d, 0x02, 0x9b, 0x59, 0x40, 0x92, 0x69, 0x51, 0x40, 0x41, 0x65, +0x20, 0x78, 0x41, 0x1e, 0x21, 0x70, 0x00, 0x28, 0x0d, 0xd0, 0x38, 0x1c, +0xff, 0xf7, 0xf4, 0xfe, 0x00, 0x28, 0x0d, 0xd1, 0x08, 0x4a, 0x50, 0x68, +0xc0, 0x68, 0xc0, 0x46, 0x50, 0x60, 0x38, 0x1c, 0x00, 0xf0, 0xa4, 0xfa, +0x02, 0xe0, 0x38, 0x1c, 0x00, 0xf0, 0x73, 0xfa, 0x01, 0xf0, 0xde, 0xfa, +0x03, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x6c, 0x06, 0x00, 0x80, +0x00, 0x00, 0x00, 0xb0, 0x38, 0x04, 0x00, 0x80, 0x4c, 0x2a, 0x00, 0x80, +0xac, 0xab, 0x20, 0x40, 0x94, 0x06, 0x00, 0x80, 0x08, 0x83, 0x20, 0x40, +0xf0, 0xb5, 0x82, 0xb0, 0x69, 0x4b, 0x9f, 0x6a, 0x58, 0x23, 0x5a, 0x43, +0xba, 0x18, 0xc3, 0x1d, 0x49, 0x33, 0x1f, 0x78, 0x01, 0x23, 0x9b, 0x07, +0xd4, 0x1d, 0x01, 0x34, 0x23, 0x43, 0x1d, 0x68, 0x43, 0x68, 0x1c, 0x04, +0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, 0x05, 0x36, 0x33, 0x43, 0x1b, 0x68, +0x1c, 0x43, 0x42, 0x23, 0x1c, 0x43, 0x0c, 0x60, 0xff, 0x26, 0x36, 0x02, +0x2e, 0x40, 0x01, 0x23, 0x5b, 0x02, 0x9e, 0x42, 0x74, 0xd1, 0x6b, 0x0c, +0x2b, 0xd3, 0xc3, 0x19, 0x20, 0x33, 0x1b, 0x79, 0xc0, 0x46, 0x4b, 0x81, 0x7b, 0x00, 0x1b, 0x18, 0x1b, 0x8f, 0x4c, 0x89, -0x1b, 0x1b, 0xcb, 0x80, 0x00, 0x24, 0xa6, 0x00, -0x01, 0x96, 0xb3, 0x18, 0xde, 0x1d, 0x09, 0x36, 0x01, 0x23, 0x9b, 0x07, -0x33, 0x43, 0x1b, 0x68, 0x01, 0x9e, 0x76, 0x18, 0x73, 0x61, 0x01, 0x34, -0x05, 0x2c, 0xf0, 0xd3, 0x00, 0x24, 0xa6, 0x00, 0x00, 0x96, 0xb3, 0x18, -0xde, 0x1d, 0x1d, 0x36, 0x01, 0x23, 0x9b, 0x07, 0x33, 0x43, 0x1b, 0x68, -0x00, 0x9e, 0x76, 0x18, 0xb3, 0x62, 0x01, 0x34, 0x05, 0x2c, 0xf0, 0xd3, -0x06, 0xe0, 0x00, 0x23, 0x4b, 0x81, 0xcb, 0x80, 0x40, 0x23, 0x9c, 0x43, -0x0c, 0x60, 0x23, 0x1c, 0x6b, 0x0e, 0x4a, 0xd3, 0xc3, 0x19, 0x20, 0x33, -0x1b, 0x79, 0x10, 0x33, 0x0b, 0x81, 0x7b, 0x00, 0x1b, 0x18, 0x1b, 0x8f, -0x0f, 0x89, 0xdb, 0x1b, 0x8b, 0x80, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, -0x35, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0xcb, 0x63, 0x01, 0x23, -0x9b, 0x07, 0xd4, 0x1d, 0x31, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, -0x0b, 0x64, 0xab, 0x0e, 0x21, 0xd2, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, -0x3d, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0x4b, 0x64, 0x01, 0x23, -0x9b, 0x07, 0xd4, 0x1d, 0x39, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, -0x8b, 0x64, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, 0x45, 0x34, 0x23, 0x43, -0x1b, 0x68, 0xc0, 0x46, 0xcb, 0x64, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, -0x41, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0x0b, 0x65, 0x00, 0xe0, -0x0f, 0xe0, 0xfb, 0x1f, 0x01, 0x3b, 0x1b, 0x04, 0x1b, 0x0c, 0x07, 0x68, -0xff, 0x18, 0x03, 0x69, 0x08, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x34, 0xf8, -0x2c, 0xe0, 0x00, 0x23, 0x0b, 0x81, 0x8b, 0x80, 0x28, 0xe0, 0x00, 0x23, -0x8b, 0x80, 0x0b, 0x81, 0xc3, 0x19, 0x20, 0x33, 0x1b, 0x7a, 0xc0, 0x46, -0x4b, 0x81, 0x7b, 0x00, 0x18, 0x18, 0x00, 0x8e, 0xc0, 0x46, 0xc8, 0x80, -0x00, 0x20, 0x87, 0x00, 0xbb, 0x18, 0xdc, 0x1d, 0x09, 0x34, 0x01, 0x23, -0x9b, 0x07, 0x23, 0x43, 0x1b, 0x68, 0x7f, 0x18, 0x7b, 0x61, 0x01, 0x30, -0x05, 0x28, 0xf2, 0xd3, 0x00, 0x20, 0x87, 0x00, 0xbb, 0x18, 0xdc, 0x1d, -0x1d, 0x34, 0x01, 0x23, 0x9b, 0x07, 0x23, 0x43, 0x1b, 0x68, 0x7f, 0x18, -0xbb, 0x62, 0x01, 0x30, 0x05, 0x28, 0xf2, 0xd3, 0x02, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x4c, 0x2a, 0x00, 0x80, 0x80, 0xb4, 0x1f, 0x1c, -0x3b, 0x0c, 0x18, 0xd2, 0x17, 0x6d, 0x11, 0x4b, 0xc0, 0x46, 0xdf, 0x60, -0x52, 0x6d, 0xc0, 0x46, 0x1a, 0x61, 0xc7, 0x60, 0x1a, 0x69, 0xc0, 0x46, -0x02, 0x61, 0xd8, 0x68, 0xc0, 0x46, 0x08, 0x80, 0xd8, 0x68, 0x00, 0x0c, -0x48, 0x80, 0x18, 0x69, 0xc0, 0x46, 0x88, 0x80, 0x18, 0x69, 0x00, 0x0c, -0xc8, 0x80, 0x80, 0xbc, 0x70, 0x47, 0x4a, 0x88, 0x12, 0x04, 0x0b, 0x88, -0x1a, 0x43, 0xc2, 0x60, 0x8a, 0x88, 0xc9, 0x88, 0x09, 0x04, 0x11, 0x43, -0x01, 0x61, 0xf2, 0xe7, 0x2c, 0x07, 0x00, 0x80, 0xf1, 0xb5, 0x88, 0xb0, -0x00, 0x22, 0x08, 0x98, 0x00, 0x6a, 0x08, 0x9b, 0x99, 0x68, 0x49, 0x0a, -0x02, 0xd3, 0x01, 0x27, 0xff, 0x03, 0x00, 0xe0, 0x00, 0x27, 0x03, 0x8b, -0x00, 0x2b, 0x19, 0xd0, 0xa3, 0x49, 0x89, 0x6a, 0x1c, 0x1c, 0x58, 0x23, -0x63, 0x43, 0xc9, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x58, 0x39, 0x19, 0x43, -0x09, 0x68, 0x09, 0x04, 0x09, 0x0c, 0x02, 0x29, 0x02, 0xd1, 0x08, 0x23, -0x1f, 0x43, 0x07, 0xe0, 0x41, 0x8b, 0x00, 0x29, 0x02, 0xd0, 0x0c, 0x23, +0x1b, 0x1b, 0xcb, 0x80, 0x00, 0x24, 0xa6, 0x00, 0x01, 0x96, 0xb3, 0x18, +0xde, 0x1d, 0x09, 0x36, 0x01, 0x23, 0x9b, 0x07, 0x33, 0x43, 0x1b, 0x68, +0x01, 0x9e, 0x76, 0x18, 0x73, 0x61, 0x01, 0x34, 0x05, 0x2c, 0xf0, 0xd3, +0x00, 0x24, 0xa6, 0x00, 0x00, 0x96, 0xb3, 0x18, 0xde, 0x1d, 0x1d, 0x36, +0x01, 0x23, 0x9b, 0x07, 0x33, 0x43, 0x1b, 0x68, 0x00, 0x9e, 0x76, 0x18, +0xb3, 0x62, 0x01, 0x34, 0x05, 0x2c, 0xf0, 0xd3, 0x06, 0xe0, 0x00, 0x23, +0x4b, 0x81, 0xcb, 0x80, 0x40, 0x23, 0x9c, 0x43, 0x0c, 0x60, 0x23, 0x1c, +0x6b, 0x0e, 0x4a, 0xd3, 0xc3, 0x19, 0x20, 0x33, 0x1b, 0x79, 0x10, 0x33, +0x0b, 0x81, 0x7b, 0x00, 0x1b, 0x18, 0x1b, 0x8f, 0x0f, 0x89, 0xdb, 0x1b, +0x8b, 0x80, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, 0x35, 0x34, 0x23, 0x43, +0x1b, 0x68, 0xc0, 0x46, 0xcb, 0x63, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, +0x31, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0x0b, 0x64, 0xab, 0x0e, +0x21, 0xd2, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, 0x3d, 0x34, 0x23, 0x43, +0x1b, 0x68, 0xc0, 0x46, 0x4b, 0x64, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, +0x39, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0x8b, 0x64, 0x01, 0x23, +0x9b, 0x07, 0xd4, 0x1d, 0x45, 0x34, 0x23, 0x43, 0x1b, 0x68, 0xc0, 0x46, +0xcb, 0x64, 0x01, 0x23, 0x9b, 0x07, 0xd4, 0x1d, 0x41, 0x34, 0x23, 0x43, +0x1b, 0x68, 0xc0, 0x46, 0x0b, 0x65, 0x00, 0xe0, 0x0f, 0xe0, 0xfb, 0x1f, +0x01, 0x3b, 0x1b, 0x04, 0x1b, 0x0c, 0x07, 0x68, 0xff, 0x18, 0x03, 0x69, +0x08, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x34, 0xf8, 0x2c, 0xe0, 0x00, 0x23, +0x0b, 0x81, 0x8b, 0x80, 0x28, 0xe0, 0x00, 0x23, 0x8b, 0x80, 0x0b, 0x81, +0xc3, 0x19, 0x20, 0x33, 0x1b, 0x7a, 0xc0, 0x46, 0x4b, 0x81, 0x7b, 0x00, +0x18, 0x18, 0x00, 0x8e, 0xc0, 0x46, 0xc8, 0x80, 0x00, 0x20, 0x87, 0x00, +0xbb, 0x18, 0xdc, 0x1d, 0x09, 0x34, 0x01, 0x23, 0x9b, 0x07, 0x23, 0x43, +0x1b, 0x68, 0x7f, 0x18, 0x7b, 0x61, 0x01, 0x30, 0x05, 0x28, 0xf2, 0xd3, +0x00, 0x20, 0x87, 0x00, 0xbb, 0x18, 0xdc, 0x1d, 0x1d, 0x34, 0x01, 0x23, +0x9b, 0x07, 0x23, 0x43, 0x1b, 0x68, 0x7f, 0x18, 0xbb, 0x62, 0x01, 0x30, +0x05, 0x28, 0xf2, 0xd3, 0x02, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x4c, 0x2a, 0x00, 0x80, 0x80, 0xb4, 0x1f, 0x1c, 0x3b, 0x0c, 0x18, 0xd2, +0x17, 0x6d, 0x11, 0x4b, 0xc0, 0x46, 0xdf, 0x60, 0x52, 0x6d, 0xc0, 0x46, +0x1a, 0x61, 0xc7, 0x60, 0x1a, 0x69, 0xc0, 0x46, 0x02, 0x61, 0xd8, 0x68, +0xc0, 0x46, 0x08, 0x80, 0xd8, 0x68, 0x00, 0x0c, 0x48, 0x80, 0x18, 0x69, +0xc0, 0x46, 0x88, 0x80, 0x18, 0x69, 0x00, 0x0c, 0xc8, 0x80, 0x80, 0xbc, +0x70, 0x47, 0x4a, 0x88, 0x12, 0x04, 0x0b, 0x88, 0x1a, 0x43, 0xc2, 0x60, +0x8a, 0x88, 0xc9, 0x88, 0x09, 0x04, 0x11, 0x43, 0x01, 0x61, 0xf2, 0xe7, +0x2c, 0x07, 0x00, 0x80, 0xf1, 0xb5, 0x88, 0xb0, 0x00, 0x22, 0x08, 0x98, +0x00, 0x6a, 0x08, 0x9b, 0x99, 0x68, 0x49, 0x0a, 0x02, 0xd3, 0x01, 0x27, +0xff, 0x03, 0x00, 0xe0, 0x00, 0x27, 0x03, 0x8b, 0x00, 0x2b, 0x19, 0xd0, +0xa3, 0x49, 0x89, 0x6a, 0x1c, 0x1c, 0x58, 0x23, 0x63, 0x43, 0xc9, 0x18, +0x01, 0x23, 0x9b, 0x07, 0x58, 0x39, 0x19, 0x43, 0x09, 0x68, 0x09, 0x04, +0x09, 0x0c, 0x02, 0x29, 0x02, 0xd1, 0x08, 0x23, 0x1f, 0x43, 0x07, 0xe0, +0x41, 0x8b, 0x00, 0x29, 0x02, 0xd0, 0x0c, 0x23, 0x1f, 0x43, 0x01, 0xe0, 0x04, 0x23, 0x1f, 0x43, 0x83, 0x8a, 0x00, 0x2b, -0x18, 0xd0, 0x95, 0x49, 0x89, 0x6a, 0x1c, 0x1c, -0x58, 0x23, 0x63, 0x43, 0xc9, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x58, 0x39, -0x19, 0x43, 0x09, 0x68, 0x09, 0x04, 0x09, 0x0c, 0x02, 0x29, 0x01, 0xd1, -0x0f, 0x43, 0x07, 0xe0, 0xc1, 0x8a, 0x00, 0x29, 0x02, 0xd0, 0x03, 0x23, -0x1f, 0x43, 0x01, 0xe0, 0x01, 0x23, 0x1f, 0x43, 0xc1, 0x1d, 0x39, 0x31, -0x07, 0x91, 0x4b, 0x89, 0x0c, 0x89, 0x1c, 0x19, 0x24, 0x04, 0x24, 0x0c, -0x08, 0x9d, 0x2d, 0x68, 0xc0, 0x46, 0x01, 0x95, 0xc9, 0x88, 0x7d, 0x08, -0x1a, 0xd3, 0x1a, 0x1c, 0xc3, 0x1d, 0x19, 0x33, 0x1a, 0x72, 0x07, 0x9a, -0x92, 0x89, 0xc0, 0x46, 0x1a, 0x73, 0x07, 0x9a, 0x12, 0x89, 0xc0, 0x46, -0x02, 0x86, 0x04, 0x87, 0x82, 0x8a, 0x01, 0x3a, 0x82, 0x83, 0x01, 0x22, -0x19, 0x71, 0x08, 0x9b, 0x1b, 0x68, 0x5b, 0x18, 0x5b, 0x78, 0x9b, 0x00, -0x1b, 0x04, 0x1b, 0x0c, 0x08, 0x33, 0x59, 0x18, 0xbb, 0x08, 0x47, 0xd3, -0x07, 0x9b, 0x5b, 0x89, 0x85, 0x18, 0x06, 0x95, 0x20, 0x35, 0x2b, 0x72, -0x07, 0x9b, 0x9b, 0x89, 0xc0, 0x46, 0x2b, 0x73, 0x07, 0x9b, 0x1b, 0x89, -0x2e, 0x1c, 0x55, 0x00, 0x2d, 0x18, 0x05, 0x95, 0x2b, 0x86, 0x00, 0x2a, -0x01, 0xd0, 0xc3, 0x8a, 0x00, 0xe0, 0x83, 0x8a, 0x01, 0x3b, 0x05, 0x9d, -0xc0, 0x46, 0xab, 0x83, 0x31, 0x71, 0x65, 0x4b, 0x9d, 0x6a, 0x05, 0x9b, +0x18, 0xd0, 0x95, 0x49, 0x89, 0x6a, 0x1c, 0x1c, 0x58, 0x23, 0x63, 0x43, +0xc9, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x58, 0x39, 0x19, 0x43, 0x09, 0x68, +0x09, 0x04, 0x09, 0x0c, 0x02, 0x29, 0x01, 0xd1, 0x0f, 0x43, 0x07, 0xe0, +0xc1, 0x8a, 0x00, 0x29, 0x02, 0xd0, 0x03, 0x23, 0x1f, 0x43, 0x01, 0xe0, +0x01, 0x23, 0x1f, 0x43, 0xc1, 0x1d, 0x39, 0x31, 0x07, 0x91, 0x4b, 0x89, +0x0c, 0x89, 0x1c, 0x19, 0x24, 0x04, 0x24, 0x0c, 0x08, 0x9d, 0x2d, 0x68, +0xc0, 0x46, 0x01, 0x95, 0xc9, 0x88, 0x7d, 0x08, 0x1a, 0xd3, 0x1a, 0x1c, +0xc3, 0x1d, 0x19, 0x33, 0x1a, 0x72, 0x07, 0x9a, 0x92, 0x89, 0xc0, 0x46, +0x1a, 0x73, 0x07, 0x9a, 0x12, 0x89, 0xc0, 0x46, 0x02, 0x86, 0x04, 0x87, +0x82, 0x8a, 0x01, 0x3a, 0x82, 0x83, 0x01, 0x22, 0x19, 0x71, 0x08, 0x9b, +0x1b, 0x68, 0x5b, 0x18, 0x5b, 0x78, 0x9b, 0x00, 0x1b, 0x04, 0x1b, 0x0c, +0x08, 0x33, 0x59, 0x18, 0xbb, 0x08, 0x47, 0xd3, 0x07, 0x9b, 0x5b, 0x89, +0x85, 0x18, 0x06, 0x95, 0x20, 0x35, 0x2b, 0x72, 0x07, 0x9b, 0x9b, 0x89, +0xc0, 0x46, 0x2b, 0x73, 0x07, 0x9b, 0x1b, 0x89, 0x2e, 0x1c, 0x55, 0x00, +0x2d, 0x18, 0x05, 0x95, 0x2b, 0x86, 0x00, 0x2a, 0x01, 0xd0, 0xc3, 0x8a, +0x00, 0xe0, 0x83, 0x8a, 0x01, 0x3b, 0x05, 0x9d, 0xc0, 0x46, 0xab, 0x83, +0x31, 0x71, 0x65, 0x4b, 0x9d, 0x6a, 0x05, 0x9b, 0x9e, 0x8b, 0x58, 0x23, +0x73, 0x43, 0xeb, 0x18, 0xdd, 0x1d, 0x01, 0x35, 0x01, 0x23, 0x9b, 0x07, +0x2b, 0x43, 0x1d, 0x68, 0x2b, 0x0e, 0x5b, 0x06, 0x01, 0xd1, 0x08, 0x31, +0x00, 0xe0, 0x10, 0x31, 0x81, 0x23, 0x5b, 0x02, 0x1d, 0x40, 0x9d, 0x42, +0x03, 0xd1, 0xe3, 0x1f, 0x05, 0x3b, 0x1c, 0x04, 0x24, 0x0c, 0x05, 0x9b, +0xc0, 0x46, 0x1c, 0x87, 0x08, 0x9b, 0x1b, 0x68, 0x1b, 0x19, 0x10, 0x3b, +0x9b, 0x7b, 0x06, 0x9d, 0x40, 0x35, 0x2b, 0x70, 0x2b, 0x78, 0x02, 0x33, +0xe3, 0x1a, 0x1c, 0x04, 0x24, 0x0c, 0x01, 0x32, 0xbb, 0x08, 0x9b, 0x07, +0x6d, 0xd0, 0x83, 0x18, 0x20, 0x33, 0x04, 0x93, 0x19, 0x72, 0x01, 0x9b, +0x5d, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x2b, 0x43, 0x1b, 0x68, 0x1b, 0x07, +0x1b, 0x0f, 0x9b, 0x00, 0x04, 0x9e, 0xc0, 0x46, 0x33, 0x73, 0x00, 0x95, +0x2b, 0x78, 0x1b, 0x07, 0x1b, 0x0f, 0x9b, 0x00, 0x04, 0x9d, 0xc0, 0x46, +0x2b, 0x73, 0x00, 0x9d, 0xeb, 0x78, 0xad, 0x78, 0x1b, 0x02, 0x1d, 0x43, +0x2b, 0x02, 0x2d, 0x0a, 0x2d, 0x06, 0x2d, 0x0e, 0x2b, 0x43, 0x55, 0x00, +0x2d, 0x18, 0x2b, 0x86, 0x04, 0x9b, 0xc0, 0x46, 0x59, 0x72, 0x04, 0x9b, +0x1b, 0x7b, 0x2e, 0x1c, 0x04, 0x9d, 0xc0, 0x46, 0x6b, 0x73, 0x33, 0x8e, +0xc0, 0x46, 0x73, 0x86, 0x00, 0x9d, 0x2b, 0x78, 0x1b, 0x07, 0x1b, 0x0f, +0x9b, 0x00, 0x1b, 0x04, 0x1b, 0x0c, 0x59, 0x18, 0x04, 0x25, 0x3d, 0x40, +0x0e, 0xd0, 0x34, 0x87, 0x03, 0x8b, 0x01, 0x3b, 0xb3, 0x83, 0x13, 0x1c, +0x1b, 0x18, 0x20, 0x33, 0x19, 0x71, 0x01, 0x9b, 0x5b, 0x18, 0x5b, 0x78, +0x9b, 0x00, 0x59, 0x18, 0x08, 0x31, 0x01, 0x32, 0x3b, 0x09, 0x37, 0xd3, +0x00, 0x2d, 0x01, 0xd0, 0x43, 0x8b, 0x00, 0xe0, 0x03, 0x8b, 0x55, 0x00, +0x2d, 0x18, 0x01, 0x3b, 0xab, 0x83, 0x83, 0x18, 0x03, 0x93, 0x20, 0x33, +0x19, 0x71, 0x20, 0x4b, 0x9d, 0x6a, 0x53, 0x00, 0x1b, 0x18, 0x02, 0x93, 0x9e, 0x8b, 0x58, 0x23, 0x73, 0x43, 0xeb, 0x18, 0xdd, 0x1d, 0x01, 0x35, -0x01, 0x23, 0x9b, 0x07, 0x2b, 0x43, 0x1d, 0x68, 0x2b, 0x0e, 0x5b, 0x06, -0x01, 0xd1, 0x08, 0x31, 0x00, 0xe0, 0x10, 0x31, 0x81, 0x23, 0x5b, 0x02, -0x1d, 0x40, 0x9d, 0x42, 0x03, 0xd1, 0xe3, 0x1f, 0x05, 0x3b, 0x1c, 0x04, -0x24, 0x0c, 0x05, 0x9b, 0xc0, 0x46, 0x1c, 0x87, 0x08, 0x9b, 0x1b, 0x68, -0x1b, 0x19, 0x10, 0x3b, 0x9b, 0x7b, 0x06, 0x9d, 0x40, 0x35, 0x2b, 0x70, -0x2b, 0x78, 0x02, 0x33, 0xe3, 0x1a, 0x1c, 0x04, 0x24, 0x0c, 0x01, 0x32, -0xbb, 0x08, 0x9b, 0x07, 0x6d, 0xd0, 0x83, 0x18, 0x20, 0x33, 0x04, 0x93, -0x19, 0x72, 0x01, 0x9b, 0x5d, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x2b, 0x43, -0x1b, 0x68, 0x1b, 0x07, 0x1b, 0x0f, 0x9b, 0x00, 0x04, 0x9e, 0xc0, 0x46, -0x33, 0x73, 0x00, 0x95, 0x2b, 0x78, 0x1b, 0x07, 0x1b, 0x0f, 0x9b, 0x00, -0x04, 0x9d, 0xc0, 0x46, 0x2b, 0x73, 0x00, 0x9d, 0xeb, 0x78, 0xad, 0x78, -0x1b, 0x02, 0x1d, 0x43, 0x2b, 0x02, 0x2d, 0x0a, 0x2d, 0x06, 0x2d, 0x0e, -0x2b, 0x43, 0x55, 0x00, 0x2d, 0x18, 0x2b, 0x86, 0x04, 0x9b, 0xc0, 0x46, -0x59, 0x72, 0x04, 0x9b, 0x1b, 0x7b, 0x2e, 0x1c, 0x04, 0x9d, 0xc0, 0x46, -0x6b, 0x73, 0x33, 0x8e, 0xc0, 0x46, 0x73, 0x86, 0x00, 0x9d, 0x2b, 0x78, -0x1b, 0x07, 0x1b, 0x0f, 0x9b, 0x00, 0x1b, 0x04, 0x1b, 0x0c, 0x59, 0x18, -0x04, 0x25, 0x3d, 0x40, 0x0e, 0xd0, 0x34, 0x87, 0x03, 0x8b, 0x01, 0x3b, -0xb3, 0x83, 0x13, 0x1c, 0x1b, 0x18, 0x20, 0x33, 0x19, 0x71, 0x01, 0x9b, -0x5b, 0x18, 0x5b, 0x78, 0x9b, 0x00, 0x59, 0x18, 0x08, 0x31, 0x01, 0x32, -0x3b, 0x09, 0x37, 0xd3, 0x00, 0x2d, 0x01, 0xd0, 0x43, 0x8b, 0x00, 0xe0, -0x03, 0x8b, 0x55, 0x00, 0x2d, 0x18, 0x01, 0x3b, 0xab, 0x83, 0x83, 0x18, -0x03, 0x93, 0x20, 0x33, 0x19, 0x71, 0x20, 0x4b, 0x9d, 0x6a, 0x53, 0x00, -0x1b, 0x18, 0x02, 0x93, 0x9e, 0x8b, 0x58, 0x23, 0x73, 0x43, 0xeb, 0x18, -0xdd, 0x1d, 0x01, 0x35, 0x01, 0x23, 0x9b, 0x07, 0x2b, 0x43, 0x1d, 0x68, +0x01, 0x23, 0x9b, 0x07, 0x2b, 0x43, 0x1d, 0x68, 0x2b, 0x0e, 0x5b, 0x06, 0x02, 0xd1, 0x08, 0x31, 0x01, 0xe0, 0x15, 0xe0, -0x10, 0x31, 0x81, 0x23, 0x5b, 0x02, 0x1d, 0x40, -0x9d, 0x42, 0x03, 0xd1, 0xe3, 0x1f, 0x05, 0x3b, 0x1c, 0x04, 0x24, 0x0c, -0x02, 0x9b, 0xc0, 0x46, 0x1c, 0x87, 0x08, 0x9b, 0x1b, 0x68, 0x1b, 0x19, -0x10, 0x3b, 0x9b, 0x7b, 0x03, 0x9c, 0x40, 0x34, 0x23, 0x70, 0x01, 0x32, -0x07, 0x9b, 0xc0, 0x46, 0xd9, 0x80, 0x51, 0x1e, 0xc3, 0x1d, 0x49, 0x33, -0x19, 0x70, 0x07, 0x61, 0x04, 0x2a, 0x06, 0xd2, 0x06, 0x49, 0x53, 0x00, -0x1b, 0x18, 0x99, 0x83, 0x01, 0x32, 0x04, 0x2a, 0xf9, 0xd3, 0x09, 0xb0, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x4c, 0x2a, 0x00, 0x80, -0xff, 0xff, 0x00, 0x00, 0x70, 0x47, 0x80, 0xb5, 0x8c, 0xb0, 0x07, 0x1c, -0x12, 0x48, 0x01, 0x68, 0x01, 0x31, 0x01, 0x60, 0x38, 0x68, 0xc0, 0x46, -0x00, 0x90, 0x78, 0x68, 0xc0, 0x46, 0x01, 0x90, 0xb8, 0x68, 0xc0, 0x46, -0x02, 0x90, 0x0d, 0x48, 0x41, 0x68, 0xc9, 0x68, 0xc0, 0x46, 0x41, 0x60, -0x38, 0x1c, 0x00, 0xf0, 0x4f, 0xf8, 0xb8, 0x68, 0x40, 0x09, 0x06, 0xd3, -0x10, 0x23, 0x02, 0x98, 0x18, 0x43, 0x02, 0x90, 0x68, 0x46, 0x02, 0xf0, -0xe1, 0xff, 0x68, 0x46, 0x02, 0xf0, 0x9a, 0xfe, 0x0c, 0xb0, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x0c, 0x2b, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, -0x00, 0xb5, 0x8c, 0xb0, 0x01, 0x68, 0xc0, 0x46, 0x00, 0x91, 0x41, 0x68, -0x05, 0x4b, 0x19, 0x43, 0x01, 0x91, 0x00, 0xf0, 0x2f, 0xf8, 0x68, 0x46, -0x02, 0xf0, 0x84, 0xfe, 0x0c, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x00, 0x00, 0x00, 0xa0, 0x02, 0x6a, 0x03, 0x68, 0xc0, 0x46, 0x13, 0x60, -0x40, 0x68, 0xc0, 0x46, 0x50, 0x60, 0x40, 0x32, 0x48, 0x68, 0xc0, 0x46, -0x90, 0x80, 0xc8, 0x68, 0xc0, 0x46, 0xd0, 0x80, 0x48, 0x69, 0xc0, 0x46, -0x10, 0x81, 0x88, 0x68, 0xc0, 0x46, 0x50, 0x81, 0x08, 0x7e, 0xc0, 0x46, -0x90, 0x73, 0x08, 0x69, 0xc0, 0x46, 0x90, 0x81, 0x70, 0x47, 0x04, 0x49, -0x08, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x70, 0x47, 0xc2, 0x68, 0xc0, 0x46, -0x0a, 0x60, 0xfa, 0xe7, 0x6c, 0x06, 0x00, 0x80, 0x02, 0x49, 0x0a, 0x68, -0xc0, 0x46, 0xc2, 0x60, 0x08, 0x60, 0x70, 0x47, 0x6c, 0x06, 0x00, 0x80, -0xb0, 0xb4, 0x00, 0x22, 0x12, 0x4f, 0x7c, 0x7f, 0x01, 0x34, 0x7c, 0x77, -0x03, 0x23, 0xfc, 0x1d, 0x19, 0x34, 0x38, 0x62, 0x79, 0x62, 0x23, 0x72, -0x0e, 0x4c, 0x25, 0x68, 0x6b, 0x0c, 0x05, 0xd2, 0x23, 0x68, 0x1b, 0x0c, -0x10, 0xd1, 0x24, 0x68, 0xa3, 0x0a, 0x0d, 0xd3, 0x01, 0x23, 0x0a, 0x4f, -0xc0, 0x46, 0xfb, 0x62, 0x09, 0x4f, 0x0a, 0x4b, 0xc0, 0x46, 0xdf, 0x60, -0x99, 0x60, 0x58, 0x60, 0x10, 0x1c, 0x18, 0x60, 0x01, 0x32, 0xfb, 0xe7, -0x10, 0x1c, 0x38, 0x64, 0x01, 0x32, 0xfb, 0xe7, 0x00, 0x00, 0x00, 0x80, -0x00, 0x00, 0x10, 0x40, 0xc0, 0x00, 0x18, 0x00, 0x02, 0x81, 0x00, 0x00, -0x40, 0x01, 0x18, 0x00, 0xf0, 0xb5, 0x47, 0x4f, 0x38, 0x68, 0x47, 0x4e, -0x47, 0x4d, 0x07, 0x23, 0x5b, 0x02, 0xec, 0x18, 0x00, 0x28, 0x1d, 0xd1, -0x20, 0x6b, 0x01, 0x30, 0x20, 0x63, 0x44, 0x49, 0xc0, 0x46, 0x08, 0x60, -0x43, 0x48, 0x41, 0x69, 0x00, 0x29, 0x13, 0xd0, 0xc1, 0x1d, 0x69, 0x31, -0x09, 0x7b, 0x00, 0x29, 0x0e, 0xd0, 0x01, 0x23, 0x9b, 0x07, 0x01, 0x6d, -0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0x81, 0x61, 0xc2, 0x69, 0x91, 0x42, -0x04, 0xd0, 0xf1, 0x6c, 0x01, 0x31, 0xf1, 0x64, 0x01, 0xf0, 0x50, 0xfe, +0x10, 0x31, 0x81, 0x23, 0x5b, 0x02, 0x1d, 0x40, 0x9d, 0x42, 0x03, 0xd1, +0xe3, 0x1f, 0x05, 0x3b, 0x1c, 0x04, 0x24, 0x0c, 0x02, 0x9b, 0xc0, 0x46, +0x1c, 0x87, 0x08, 0x9b, 0x1b, 0x68, 0x1b, 0x19, 0x10, 0x3b, 0x9b, 0x7b, +0x03, 0x9c, 0x40, 0x34, 0x23, 0x70, 0x01, 0x32, 0x07, 0x9b, 0xc0, 0x46, +0xd9, 0x80, 0x51, 0x1e, 0xc3, 0x1d, 0x49, 0x33, 0x19, 0x70, 0x07, 0x61, +0x04, 0x2a, 0x06, 0xd2, 0x06, 0x49, 0x53, 0x00, 0x1b, 0x18, 0x99, 0x83, +0x01, 0x32, 0x04, 0x2a, 0xf9, 0xd3, 0x09, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x4c, 0x2a, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, +0x70, 0x47, 0x80, 0xb5, 0x8c, 0xb0, 0x07, 0x1c, 0x12, 0x48, 0x01, 0x68, +0x01, 0x31, 0x01, 0x60, 0x38, 0x68, 0xc0, 0x46, 0x00, 0x90, 0x78, 0x68, +0xc0, 0x46, 0x01, 0x90, 0xb8, 0x68, 0xc0, 0x46, 0x02, 0x90, 0x0d, 0x48, +0x41, 0x68, 0xc9, 0x68, 0xc0, 0x46, 0x41, 0x60, 0x38, 0x1c, 0x00, 0xf0, +0x4f, 0xf8, 0xb8, 0x68, 0x40, 0x09, 0x06, 0xd3, 0x10, 0x23, 0x02, 0x98, +0x18, 0x43, 0x02, 0x90, 0x68, 0x46, 0x02, 0xf0, 0xe1, 0xff, 0x68, 0x46, +0x02, 0xf0, 0x9a, 0xfe, 0x0c, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x0c, 0x2b, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, 0x00, 0xb5, 0x8c, 0xb0, +0x01, 0x68, 0xc0, 0x46, 0x00, 0x91, 0x41, 0x68, 0x05, 0x4b, 0x19, 0x43, +0x01, 0x91, 0x00, 0xf0, 0x2f, 0xf8, 0x68, 0x46, 0x02, 0xf0, 0x84, 0xfe, +0x0c, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, +0x02, 0x6a, 0x03, 0x68, 0xc0, 0x46, 0x13, 0x60, 0x40, 0x68, 0xc0, 0x46, +0x50, 0x60, 0x40, 0x32, 0x48, 0x68, 0xc0, 0x46, 0x90, 0x80, 0xc8, 0x68, +0xc0, 0x46, 0xd0, 0x80, 0x48, 0x69, 0xc0, 0x46, 0x10, 0x81, 0x88, 0x68, +0xc0, 0x46, 0x50, 0x81, 0x08, 0x7e, 0xc0, 0x46, 0x90, 0x73, 0x08, 0x69, +0xc0, 0x46, 0x90, 0x81, 0x70, 0x47, 0x04, 0x49, 0x08, 0x68, 0x00, 0x28, +0x00, 0xd1, 0x70, 0x47, 0xc2, 0x68, 0xc0, 0x46, 0x0a, 0x60, 0xfa, 0xe7, +0x6c, 0x06, 0x00, 0x80, 0x02, 0x49, 0x0a, 0x68, 0xc0, 0x46, 0xc2, 0x60, +0x08, 0x60, 0x70, 0x47, 0x6c, 0x06, 0x00, 0x80, 0xb0, 0xb4, 0x00, 0x22, +0x12, 0x4f, 0x7c, 0x7f, 0x01, 0x34, 0x7c, 0x77, 0x03, 0x23, 0xfc, 0x1d, +0x19, 0x34, 0x38, 0x62, 0x79, 0x62, 0x23, 0x72, 0x0e, 0x4c, 0x25, 0x68, +0x6b, 0x0c, 0x05, 0xd2, 0x23, 0x68, 0x1b, 0x0c, 0x10, 0xd1, 0x24, 0x68, +0xa3, 0x0a, 0x0d, 0xd3, 0x01, 0x23, 0x0a, 0x4f, 0xc0, 0x46, 0xfb, 0x62, +0x09, 0x4f, 0x0a, 0x4b, 0xc0, 0x46, 0xdf, 0x60, 0x99, 0x60, 0x58, 0x60, +0x10, 0x1c, 0x18, 0x60, 0x01, 0x32, 0xfb, 0xe7, 0x10, 0x1c, 0x38, 0x64, +0x01, 0x32, 0xfb, 0xe7, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, +0xc0, 0x00, 0x18, 0x00, 0x02, 0x81, 0x00, 0x00, 0x40, 0x01, 0x18, 0x00, +0xf0, 0xb5, 0x47, 0x4f, 0x38, 0x68, 0x47, 0x4e, 0x47, 0x4d, 0x07, 0x23, +0x5b, 0x02, 0xec, 0x18, 0x00, 0x28, 0x1d, 0xd1, 0x20, 0x6b, 0x01, 0x30, +0x20, 0x63, 0x44, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x43, 0x48, 0x41, 0x69, +0x00, 0x29, 0x13, 0xd0, 0xc1, 0x1d, 0x69, 0x31, 0x09, 0x7b, 0x00, 0x29, +0x0e, 0xd0, 0x01, 0x23, 0x9b, 0x07, 0x01, 0x6d, 0x19, 0x43, 0x09, 0x68, +0xc0, 0x46, 0x81, 0x61, 0xc2, 0x69, 0x91, 0x42, 0x04, 0xd0, 0xf1, 0x6c, +0x01, 0x31, 0xf1, 0x64, 0x01, 0xf0, 0x50, 0xfe, 0x38, 0x68, 0x01, 0x28, 0x17, 0xd1, 0x37, 0x48, 0x41, 0x69, 0x00, 0x29, -0x13, 0xd0, 0xc1, 0x1d, 0x69, 0x31, 0x09, 0x7b, -0x00, 0x29, 0x0e, 0xd0, 0x01, 0x23, 0x9b, 0x07, 0x01, 0x6d, 0x19, 0x43, -0x09, 0x68, 0xc0, 0x46, 0x81, 0x61, 0xc2, 0x69, 0x91, 0x42, 0x04, 0xd0, -0xf1, 0x6c, 0x01, 0x31, 0xf1, 0x64, 0x01, 0xf0, 0x35, 0xfe, 0x38, 0x68, -0x02, 0x28, 0x2f, 0xd1, 0xbb, 0x23, 0x1b, 0x01, 0xee, 0x18, 0x70, 0x7b, -0x00, 0x28, 0x03, 0xd0, 0x00, 0x20, 0x70, 0x73, 0x00, 0xf0, 0x4a, 0xfd, -0x30, 0x7b, 0x00, 0x28, 0x02, 0xd0, 0x78, 0x68, 0x02, 0xf0, 0xaa, 0xff, -0x1b, 0x23, 0xdb, 0x01, 0xe8, 0x18, 0xc0, 0x8b, 0x04, 0x26, 0x06, 0x40, -0xe0, 0x6a, 0xb0, 0x42, 0x14, 0xd0, 0xf8, 0x68, 0x01, 0x30, 0xf8, 0x60, -0x19, 0x28, 0x11, 0xd3, 0x1b, 0x48, 0x01, 0x7b, 0x00, 0x29, 0x0d, 0xd1, -0xff, 0x30, 0x41, 0x30, 0x40, 0x78, 0x00, 0x28, 0x08, 0xd1, 0xb8, 0x68, -0x02, 0xf0, 0x90, 0xff, 0x00, 0x20, 0xf8, 0x60, 0xe6, 0x62, 0x01, 0xe0, -0x00, 0x20, 0xf8, 0x60, 0x38, 0x68, 0x03, 0x28, 0x0b, 0xd1, 0xec, 0x1d, -0x79, 0x34, 0xe0, 0x6b, 0x80, 0x08, 0x02, 0xd3, 0x02, 0x20, 0x02, 0xf0, -0x07, 0xfc, 0x02, 0x23, 0xe0, 0x6b, 0x98, 0x43, 0xe0, 0x63, 0x38, 0x68, -0x01, 0x30, 0x38, 0x60, 0x03, 0x28, 0x01, 0xd9, 0x00, 0x20, 0x38, 0x60, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x80, -0xa0, 0x82, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x40, 0x01, 0x18, 0x00, -0x64, 0x2d, 0x00, 0x80, 0xe4, 0x2c, 0x00, 0x80, 0x28, 0x05, 0x00, 0x80, -0xb0, 0xb4, 0x1d, 0x48, 0x84, 0x8a, 0x1d, 0x4a, 0x13, 0x8a, 0xc1, 0x1d, -0x09, 0x31, 0x01, 0x27, 0x9c, 0x42, 0x03, 0xd1, 0x43, 0x8a, 0x54, 0x8a, -0xa3, 0x42, 0x10, 0xd0, 0x0b, 0x78, 0x00, 0x2b, 0x0d, 0xd0, 0x4b, 0x78, -0x00, 0x2b, 0x0a, 0xd0, 0x44, 0x8b, 0x93, 0x8a, 0x9c, 0x42, 0x04, 0xdc, -0x13, 0x4b, 0xc0, 0x46, 0x5f, 0x60, 0x97, 0x82, 0x01, 0xe0, 0x01, 0x33, -0x93, 0x82, 0xc3, 0x8b, 0x5c, 0x1c, 0xc4, 0x83, 0x84, 0x8b, 0xa3, 0x42, -0x0e, 0xdb, 0x84, 0x8a, 0x05, 0x8b, 0x00, 0x23, 0xac, 0x42, 0x05, 0xda, -0x44, 0x8a, 0xc5, 0x8a, 0xac, 0x42, 0x01, 0xda, 0x4b, 0x70, 0x00, 0xe0, -0x4f, 0x70, 0x43, 0x82, 0x83, 0x82, 0xc3, 0x83, 0x41, 0x8a, 0xc0, 0x46, -0x51, 0x82, 0x80, 0x8a, 0xc0, 0x46, 0x10, 0x82, 0xb0, 0xbc, 0x70, 0x47, -0xe8, 0x0e, 0x00, 0x80, 0x3c, 0x04, 0x00, 0x80, 0x40, 0x01, 0x18, 0x00, -0xf7, 0xb5, 0x91, 0xb0, 0x6b, 0x46, 0x84, 0x1e, 0x12, 0x99, 0x14, 0x29, -0x1a, 0xd9, 0x00, 0x20, 0x81, 0x00, 0x67, 0x58, 0xc0, 0x46, 0x57, 0x50, -0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x10, 0x28, 0xf6, 0xd3, 0x00, 0x21, -0x05, 0x20, 0x87, 0x00, 0xd6, 0x59, 0x4f, 0x1c, 0x3d, 0x06, 0x2d, 0x0e, -0x0f, 0x1c, 0xbf, 0x00, 0xde, 0x51, 0x29, 0x1c, 0x01, 0x30, 0x00, 0x06, -0x00, 0x0e, 0x10, 0x28, 0xf1, 0xd3, 0x09, 0xe0, 0x00, 0x20, 0x81, 0x00, -0x63, 0x58, 0xc0, 0x46, 0x53, 0x50, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, -0x06, 0x28, 0xf6, 0xd3, 0x00, 0x20, 0xe0, 0x70, 0x20, 0x72, 0x60, 0x72, -0xa0, 0x72, 0x20, 0x73, 0x60, 0x73, 0x12, 0x99, 0x14, 0x29, 0x37, 0xd9, -0x69, 0x46, 0x8e, 0x1c, 0x91, 0x78, 0x09, 0x07, 0x09, 0x0f, 0x89, 0x00, -0x14, 0x39, 0x0d, 0x06, 0x2d, 0x16, 0x00, 0x27, 0x00, 0x2d, 0x1b, 0xdd, -0xf0, 0x19, 0x10, 0xa9, 0x00, 0xf0, 0x3d, 0xf8, 0x00, 0x28, 0x0e, 0xd0, +0x13, 0xd0, 0xc1, 0x1d, 0x69, 0x31, 0x09, 0x7b, 0x00, 0x29, 0x0e, 0xd0, +0x01, 0x23, 0x9b, 0x07, 0x01, 0x6d, 0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, +0x81, 0x61, 0xc2, 0x69, 0x91, 0x42, 0x04, 0xd0, 0xf1, 0x6c, 0x01, 0x31, +0xf1, 0x64, 0x01, 0xf0, 0x35, 0xfe, 0x38, 0x68, 0x02, 0x28, 0x2f, 0xd1, +0xbb, 0x23, 0x1b, 0x01, 0xee, 0x18, 0x70, 0x7b, 0x00, 0x28, 0x03, 0xd0, +0x00, 0x20, 0x70, 0x73, 0x00, 0xf0, 0x4a, 0xfd, 0x30, 0x7b, 0x00, 0x28, +0x02, 0xd0, 0x78, 0x68, 0x02, 0xf0, 0xaa, 0xff, 0x1b, 0x23, 0xdb, 0x01, +0xe8, 0x18, 0xc0, 0x8b, 0x04, 0x26, 0x06, 0x40, 0xe0, 0x6a, 0xb0, 0x42, +0x14, 0xd0, 0xf8, 0x68, 0x01, 0x30, 0xf8, 0x60, 0x19, 0x28, 0x11, 0xd3, +0x1b, 0x48, 0x01, 0x7b, 0x00, 0x29, 0x0d, 0xd1, 0xff, 0x30, 0x41, 0x30, +0x40, 0x78, 0x00, 0x28, 0x08, 0xd1, 0xb8, 0x68, 0x02, 0xf0, 0x90, 0xff, +0x00, 0x20, 0xf8, 0x60, 0xe6, 0x62, 0x01, 0xe0, 0x00, 0x20, 0xf8, 0x60, +0x38, 0x68, 0x03, 0x28, 0x0b, 0xd1, 0xec, 0x1d, 0x79, 0x34, 0xe0, 0x6b, +0x80, 0x08, 0x02, 0xd3, 0x02, 0x20, 0x02, 0xf0, 0x07, 0xfc, 0x02, 0x23, +0xe0, 0x6b, 0x98, 0x43, 0xe0, 0x63, 0x38, 0x68, 0x01, 0x30, 0x38, 0x60, +0x03, 0x28, 0x01, 0xd9, 0x00, 0x20, 0x38, 0x60, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, +0x68, 0x0e, 0x00, 0x80, 0x40, 0x01, 0x18, 0x00, 0x64, 0x2d, 0x00, 0x80, +0xe4, 0x2c, 0x00, 0x80, 0x28, 0x05, 0x00, 0x80, 0xb0, 0xb4, 0x1d, 0x48, +0x84, 0x8a, 0x1d, 0x4a, 0x13, 0x8a, 0xc1, 0x1d, 0x09, 0x31, 0x01, 0x27, +0x9c, 0x42, 0x03, 0xd1, 0x43, 0x8a, 0x54, 0x8a, 0xa3, 0x42, 0x10, 0xd0, +0x0b, 0x78, 0x00, 0x2b, 0x0d, 0xd0, 0x4b, 0x78, 0x00, 0x2b, 0x0a, 0xd0, +0x44, 0x8b, 0x93, 0x8a, 0x9c, 0x42, 0x04, 0xdc, 0x13, 0x4b, 0xc0, 0x46, +0x5f, 0x60, 0x97, 0x82, 0x01, 0xe0, 0x01, 0x33, 0x93, 0x82, 0xc3, 0x8b, +0x5c, 0x1c, 0xc4, 0x83, 0x84, 0x8b, 0xa3, 0x42, 0x0e, 0xdb, 0x84, 0x8a, +0x05, 0x8b, 0x00, 0x23, 0xac, 0x42, 0x05, 0xda, 0x44, 0x8a, 0xc5, 0x8a, +0xac, 0x42, 0x01, 0xda, 0x4b, 0x70, 0x00, 0xe0, 0x4f, 0x70, 0x43, 0x82, +0x83, 0x82, 0xc3, 0x83, 0x41, 0x8a, 0xc0, 0x46, 0x51, 0x82, 0x80, 0x8a, +0xc0, 0x46, 0x10, 0x82, 0xb0, 0xbc, 0x70, 0x47, 0xe8, 0x0e, 0x00, 0x80, +0x3c, 0x04, 0x00, 0x80, 0x40, 0x01, 0x18, 0x00, 0xf7, 0xb5, 0x91, 0xb0, +0x6b, 0x46, 0x84, 0x1e, 0x12, 0x99, 0x14, 0x29, 0x1a, 0xd9, 0x00, 0x20, +0x81, 0x00, 0x67, 0x58, 0xc0, 0x46, 0x57, 0x50, 0x01, 0x30, 0x00, 0x06, +0x00, 0x0e, 0x10, 0x28, 0xf6, 0xd3, 0x00, 0x21, 0x05, 0x20, 0x87, 0x00, +0xd6, 0x59, 0x4f, 0x1c, 0x3d, 0x06, 0x2d, 0x0e, 0x0f, 0x1c, 0xbf, 0x00, +0xde, 0x51, 0x29, 0x1c, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x10, 0x28, +0xf1, 0xd3, 0x09, 0xe0, 0x00, 0x20, 0x81, 0x00, 0x63, 0x58, 0xc0, 0x46, +0x53, 0x50, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x06, 0x28, 0xf6, 0xd3, +0x00, 0x20, 0xe0, 0x70, 0x20, 0x72, 0x60, 0x72, 0xa0, 0x72, 0x20, 0x73, +0x60, 0x73, 0x12, 0x99, 0x14, 0x29, 0x37, 0xd9, 0x69, 0x46, 0x8e, 0x1c, +0x91, 0x78, 0x09, 0x07, 0x09, 0x0f, 0x89, 0x00, 0x14, 0x39, 0x0d, 0x06, +0x2d, 0x16, 0x00, 0x27, 0x00, 0x2d, 0x1b, 0xdd, 0xf0, 0x19, 0x10, 0xa9, +0x00, 0xf0, 0x3d, 0xf8, 0x00, 0x28, 0x0e, 0xd0, 0x00, 0x20, 0x10, 0xa9, 0x09, 0x78, 0x00, 0x29, 0x09, 0xdd, 0x00, 0x22, -0x39, 0x18, 0x72, 0x54, 0x01, 0x30, 0x00, 0x06, -0x00, 0x0e, 0x10, 0xa9, 0x09, 0x78, 0x88, 0x42, 0xf6, 0xdb, 0x10, 0xa8, -0x00, 0x78, 0x38, 0x18, 0x07, 0x06, 0x3f, 0x0e, 0xaf, 0x42, 0xe3, 0xdb, -0x68, 0x46, 0xe2, 0x1d, 0x0d, 0x32, 0x00, 0x21, 0xab, 0x08, 0x5f, 0x1c, -0x08, 0xd0, 0x8b, 0x00, 0xc4, 0x58, 0xc0, 0x46, 0xd4, 0x50, 0x01, 0x31, -0x09, 0x06, 0x09, 0x0e, 0x8f, 0x42, 0xf6, 0xd8, 0x14, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x90, 0xb4, 0x87, 0x1e, 0x00, 0x20, 0x89, 0x08, -0x4b, 0x1c, 0x08, 0xd0, 0x81, 0x00, 0x54, 0x58, 0xc0, 0x46, 0x7c, 0x50, -0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x83, 0x42, 0xf6, 0xd8, 0x90, 0xbc, -0x70, 0x47, 0x80, 0xb4, 0x02, 0x78, 0xd2, 0x06, 0xd2, 0x0e, 0x00, 0x23, -0x01, 0x27, 0x01, 0x2a, 0x01, 0xdc, 0x0f, 0x70, 0x11, 0xe0, 0x40, 0x78, -0xc0, 0x46, 0x08, 0x70, 0x14, 0x2a, 0x04, 0xd1, 0x08, 0x48, 0x01, 0x7a, -0x01, 0x31, 0x01, 0x72, 0x07, 0xe0, 0x02, 0x2a, 0x05, 0xd0, 0x05, 0x2a, -0x03, 0xd0, 0x06, 0x2a, 0x01, 0xd0, 0x15, 0x2a, 0x02, 0xd1, 0x18, 0x1c, -0x80, 0xbc, 0x70, 0x47, 0x38, 0x1c, 0xfb, 0xe7, 0xe0, 0x82, 0x20, 0x40, -0x00, 0xb5, 0x0f, 0x48, 0x01, 0x23, 0x1b, 0x06, 0x41, 0x69, 0x99, 0x43, -0x1a, 0x09, 0x41, 0x61, 0xd1, 0x60, 0x00, 0x21, 0xa1, 0x22, 0x52, 0x03, -0x91, 0x61, 0x19, 0x1c, 0x09, 0x4a, 0xc0, 0x46, 0x11, 0x60, 0x1b, 0x23, -0xdb, 0x01, 0xc0, 0x18, 0x80, 0x69, 0x00, 0x28, 0x03, 0xd0, 0x02, 0xf0, -0x61, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x04, 0x48, 0x41, 0x88, 0x01, 0x31, -0x41, 0x80, 0xf8, 0xe7, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, -0xe0, 0x82, 0x20, 0x40, 0x70, 0x47, 0x00, 0x00, 0xf0, 0xb5, 0x86, 0xb0, -0x95, 0x4a, 0xd0, 0x68, 0xd7, 0x1d, 0x79, 0x37, 0x01, 0x28, 0x09, 0xd1, -0x38, 0x89, 0x00, 0x28, 0x06, 0xd1, 0xd0, 0x6f, 0x02, 0x23, 0x01, 0x68, -0x99, 0x43, 0x01, 0x60, 0x14, 0x20, 0x38, 0x81, 0x8e, 0x4c, 0x61, 0x6a, -0x8e, 0x48, 0xc3, 0x6b, 0x59, 0x18, 0xc1, 0x63, 0xa0, 0x6a, 0x19, 0x23, -0xdb, 0x01, 0xd4, 0x18, 0xa0, 0x62, 0x21, 0x6a, 0x09, 0x03, 0x09, 0x0b, -0x81, 0x42, 0x05, 0xd1, 0x01, 0x20, 0x40, 0x04, 0x87, 0x49, 0xc0, 0x46, -0x08, 0x60, 0xf3, 0xe0, 0xbb, 0x8a, 0x58, 0x1c, 0xb8, 0x82, 0x3d, 0x8b, -0x01, 0x20, 0x00, 0x21, 0xab, 0x42, 0x04, 0xdb, 0xd3, 0x1d, 0x89, 0x33, -0x58, 0x70, 0xb9, 0x82, 0xf9, 0x83, 0x33, 0x23, 0x9b, 0x01, 0xd3, 0x18, -0x05, 0x93, 0x5b, 0x69, 0x0f, 0x2b, 0x73, 0xd2, 0x00, 0x21, 0x7c, 0x4f, -0xc0, 0x46, 0x39, 0x61, 0x21, 0x6a, 0x8a, 0x68, 0x12, 0x04, 0x12, 0x0c, -0x4b, 0x68, 0x1e, 0x0c, 0x36, 0x04, 0xfd, 0x1f, 0x09, 0x3d, 0x00, 0x2e, -0x05, 0xd1, 0x3b, 0x2a, 0x03, 0xd3, 0x01, 0x23, 0xdb, 0x02, 0x9a, 0x42, -0x01, 0xd9, 0xa8, 0x73, 0xc8, 0xe0, 0x01, 0x23, 0x9b, 0x07, 0x08, 0x31, -0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0x03, 0x91, 0x03, 0xa9, 0x09, 0x88, -0x01, 0x31, 0x09, 0x04, 0x09, 0x0c, 0x79, 0x82, 0x49, 0x09, 0x05, 0x31, -0x09, 0x06, 0x09, 0x0e, 0x69, 0x4e, 0xc0, 0x46, 0x02, 0x96, 0x69, 0x48, -0x43, 0x6a, 0xc0, 0x46, 0x01, 0x93, 0x83, 0x6a, 0xc0, 0x46, 0x00, 0x93, -0xc2, 0x1d, 0x11, 0x32, 0x80, 0x69, 0x00, 0x03, 0x00, 0x0b, 0x92, 0x68, -0xb3, 0x07, 0x1a, 0x43, 0x12, 0x68, 0x90, 0x42, 0x01, 0xd1, 0x01, 0x20, +0x39, 0x18, 0x72, 0x54, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x10, 0xa9, +0x09, 0x78, 0x88, 0x42, 0xf6, 0xdb, 0x10, 0xa8, 0x00, 0x78, 0x38, 0x18, +0x07, 0x06, 0x3f, 0x0e, 0xaf, 0x42, 0xe3, 0xdb, 0x68, 0x46, 0xe2, 0x1d, +0x0d, 0x32, 0x00, 0x21, 0xab, 0x08, 0x5f, 0x1c, 0x08, 0xd0, 0x8b, 0x00, +0xc4, 0x58, 0xc0, 0x46, 0xd4, 0x50, 0x01, 0x31, 0x09, 0x06, 0x09, 0x0e, +0x8f, 0x42, 0xf6, 0xd8, 0x14, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x90, 0xb4, 0x87, 0x1e, 0x00, 0x20, 0x89, 0x08, 0x4b, 0x1c, 0x08, 0xd0, +0x81, 0x00, 0x54, 0x58, 0xc0, 0x46, 0x7c, 0x50, 0x01, 0x30, 0x00, 0x06, +0x00, 0x0e, 0x83, 0x42, 0xf6, 0xd8, 0x90, 0xbc, 0x70, 0x47, 0x80, 0xb4, +0x02, 0x78, 0xd2, 0x06, 0xd2, 0x0e, 0x00, 0x23, 0x01, 0x27, 0x01, 0x2a, +0x01, 0xdc, 0x0f, 0x70, 0x11, 0xe0, 0x40, 0x78, 0xc0, 0x46, 0x08, 0x70, +0x14, 0x2a, 0x04, 0xd1, 0x08, 0x48, 0x01, 0x7a, 0x01, 0x31, 0x01, 0x72, +0x07, 0xe0, 0x02, 0x2a, 0x05, 0xd0, 0x05, 0x2a, 0x03, 0xd0, 0x06, 0x2a, +0x01, 0xd0, 0x15, 0x2a, 0x02, 0xd1, 0x18, 0x1c, 0x80, 0xbc, 0x70, 0x47, +0x38, 0x1c, 0xfb, 0xe7, 0xe0, 0x82, 0x20, 0x40, 0x00, 0xb5, 0x0f, 0x48, +0x01, 0x23, 0x1b, 0x06, 0x41, 0x69, 0x99, 0x43, 0x1a, 0x09, 0x41, 0x61, +0xd1, 0x60, 0x00, 0x21, 0xa1, 0x22, 0x52, 0x03, 0x91, 0x61, 0x19, 0x1c, +0x09, 0x4a, 0xc0, 0x46, 0x11, 0x60, 0x1b, 0x23, 0xdb, 0x01, 0xc0, 0x18, +0x80, 0x69, 0x00, 0x28, 0x03, 0xd0, 0x02, 0xf0, 0x61, 0xfe, 0x08, 0xbc, +0x18, 0x47, 0x04, 0x48, 0x41, 0x88, 0x01, 0x31, 0x41, 0x80, 0xf8, 0xe7, +0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, 0xe0, 0x82, 0x20, 0x40, +0x70, 0x47, 0x00, 0x00, 0xf0, 0xb5, 0x86, 0xb0, 0x95, 0x4a, 0xd0, 0x68, +0xd7, 0x1d, 0x79, 0x37, 0x01, 0x28, 0x09, 0xd1, 0x38, 0x89, 0x00, 0x28, +0x06, 0xd1, 0xd0, 0x6f, 0x02, 0x23, 0x01, 0x68, 0x99, 0x43, 0x01, 0x60, +0x14, 0x20, 0x38, 0x81, 0x8e, 0x4c, 0x61, 0x6a, 0x8e, 0x48, 0xc3, 0x6b, +0x59, 0x18, 0xc1, 0x63, 0xa0, 0x6a, 0x19, 0x23, 0xdb, 0x01, 0xd4, 0x18, +0xa0, 0x62, 0x21, 0x6a, 0x09, 0x03, 0x09, 0x0b, 0x81, 0x42, 0x05, 0xd1, +0x01, 0x20, 0x40, 0x04, 0x87, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xf3, 0xe0, +0xbb, 0x8a, 0x58, 0x1c, 0xb8, 0x82, 0x3d, 0x8b, 0x01, 0x20, 0x00, 0x21, +0xab, 0x42, 0x04, 0xdb, 0xd3, 0x1d, 0x89, 0x33, 0x58, 0x70, 0xb9, 0x82, +0xf9, 0x83, 0x33, 0x23, 0x9b, 0x01, 0xd3, 0x18, 0x05, 0x93, 0x5b, 0x69, +0x0f, 0x2b, 0x73, 0xd2, 0x00, 0x21, 0x7c, 0x4f, 0xc0, 0x46, 0x39, 0x61, +0x21, 0x6a, 0x8a, 0x68, 0x12, 0x04, 0x12, 0x0c, 0x4b, 0x68, 0x1e, 0x0c, +0x36, 0x04, 0xfd, 0x1f, 0x09, 0x3d, 0x00, 0x2e, 0x05, 0xd1, 0x3b, 0x2a, +0x03, 0xd3, 0x01, 0x23, 0xdb, 0x02, 0x9a, 0x42, 0x01, 0xd9, 0xa8, 0x73, +0xc8, 0xe0, 0x01, 0x23, 0x9b, 0x07, 0x08, 0x31, 0x19, 0x43, 0x09, 0x68, +0xc0, 0x46, 0x03, 0x91, 0x03, 0xa9, 0x09, 0x88, 0x01, 0x31, 0x09, 0x04, +0x09, 0x0c, 0x79, 0x82, 0x49, 0x09, 0x05, 0x31, 0x09, 0x06, 0x09, 0x0e, +0x69, 0x4e, 0xc0, 0x46, 0x02, 0x96, 0x69, 0x48, 0x43, 0x6a, 0xc0, 0x46, +0x01, 0x93, 0x83, 0x6a, 0xc0, 0x46, 0x00, 0x93, 0xc2, 0x1d, 0x11, 0x32, +0x80, 0x69, 0x00, 0x03, 0x00, 0x0b, 0x92, 0x68, 0xb3, 0x07, 0x1a, 0x43, +0x12, 0x68, 0x90, 0x42, 0x01, 0xd1, 0x01, 0x20, 0x0d, 0xe0, 0x90, 0x42, 0x05, 0xd9, 0x00, 0x9b, 0x18, 0x1a, 0x01, 0x9b, -0xd2, 0x1a, 0x82, 0x18, 0x00, 0xe0, 0x12, 0x1a, -0x01, 0x20, 0x09, 0x01, 0x91, 0x42, 0x00, 0xd3, 0x00, 0x20, 0x01, 0x28, -0x65, 0xd1, 0x51, 0x49, 0x20, 0x69, 0x00, 0x28, 0x62, 0xd0, 0x05, 0x99, -0x48, 0x69, 0x01, 0x30, 0x48, 0x61, 0x02, 0x20, 0x21, 0x6a, 0xc0, 0x46, -0x08, 0x60, 0x00, 0xf0, 0xa7, 0xfc, 0x78, 0x63, 0xbe, 0x60, 0x49, 0x49, -0x22, 0x6a, 0xa3, 0x6b, 0xd3, 0x18, 0x66, 0x6b, 0xb3, 0x42, 0x00, 0xd9, -0x22, 0x6b, 0xc0, 0x46, 0xba, 0x62, 0xba, 0x6a, 0x0c, 0x32, 0xfa, 0x62, -0x00, 0x22, 0xfa, 0x61, 0x03, 0xaa, 0x52, 0x88, 0xd2, 0x09, 0x03, 0xd3, -0x01, 0x22, 0x00, 0xe0, 0x7b, 0xe0, 0x00, 0xe0, 0x00, 0x22, 0x7a, 0x60, -0x7a, 0x68, 0xc0, 0x46, 0x02, 0x60, 0x78, 0x8a, 0x41, 0x4e, 0x60, 0x28, -0x04, 0xdc, 0xb0, 0x83, 0x78, 0x8a, 0xc0, 0x46, 0xf0, 0x83, 0x08, 0xe0, -0x60, 0x20, 0xb0, 0x83, 0x79, 0x8a, 0xf8, 0x6a, 0x42, 0x18, 0x63, 0x6b, -0x9a, 0x42, 0x03, 0xd8, 0xf1, 0x83, 0x00, 0x22, 0x3a, 0x63, 0x05, 0xe0, -0x21, 0x6b, 0xc0, 0x46, 0x39, 0x63, 0x61, 0x6b, 0x08, 0x1a, 0xf0, 0x83, -0x2d, 0x49, 0x78, 0x6b, 0x42, 0x68, 0xc0, 0x46, 0xba, 0x60, 0x82, 0x68, -0xc0, 0x46, 0xfa, 0x60, 0x02, 0x69, 0xc0, 0x46, 0x7a, 0x61, 0x40, 0x69, -0xc0, 0x46, 0xb8, 0x61, 0x2e, 0x4b, 0xc8, 0x18, 0x04, 0x90, 0x00, 0xf0, -0x37, 0xf9, 0x04, 0x98, 0x00, 0xf0, 0x88, 0xf8, 0x00, 0xf0, 0xf6, 0xfa, -0x78, 0x8a, 0xf1, 0x8b, 0x88, 0x42, 0x04, 0xd1, 0xf9, 0x6a, 0x08, 0x18, -0x04, 0xe0, 0x38, 0xe0, 0x32, 0xe0, 0x3a, 0x6b, 0x10, 0x18, 0x40, 0x1a, -0x81, 0x07, 0x02, 0xd0, 0x80, 0x08, 0x80, 0x00, 0x04, 0x30, 0x61, 0x6b, -0x09, 0x1a, 0xa2, 0x6b, 0x91, 0x42, 0x00, 0xd2, 0x20, 0x6b, 0xc0, 0x46, -0x20, 0x62, 0xe8, 0x7b, 0x00, 0x28, 0x08, 0xd0, 0x00, 0x22, 0xea, 0x73, -0x05, 0x99, 0x48, 0x69, 0x01, 0x38, 0x48, 0x61, 0x78, 0x6b, 0x00, 0xf0, -0x73, 0xfa, 0x18, 0x48, 0x80, 0x6a, 0x80, 0x06, 0x80, 0x0e, 0x01, 0x28, -0x0a, 0xd1, 0x20, 0x6a, 0x00, 0x03, 0x00, 0x0b, 0x0b, 0x4c, 0xa1, 0x6a, -0x88, 0x42, 0x03, 0xd0, 0x06, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x01, 0x20, 0x40, 0x04, 0x08, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x06, 0xe0, -0xe0, 0x68, 0x00, 0x28, 0x01, 0xd0, 0x00, 0xf0, 0xb5, 0xfa, 0x01, 0x20, -0xa8, 0x73, 0xed, 0xe7, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x40, 0x14, 0x40, -0xa4, 0x2a, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, 0x28, 0x1a, 0x00, 0x80, -0x55, 0x55, 0x55, 0x55, 0xa8, 0x03, 0x00, 0x80, 0x68, 0x1a, 0x00, 0x80, -0xc4, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x80, 0xb5, 0x07, 0x1c, -0x78, 0x6a, 0x40, 0x89, 0xff, 0x21, 0x01, 0x31, 0x01, 0x40, 0x10, 0x48, -0x02, 0xd1, 0x81, 0x6c, 0x01, 0x31, 0x81, 0x64, 0x79, 0x6a, 0x49, 0x89, -0x49, 0x0b, 0x02, 0xd2, 0x41, 0x6c, 0x01, 0x31, 0x41, 0x64, 0x0b, 0x48, -0x41, 0x6a, 0x01, 0x31, 0x41, 0x62, 0x78, 0x6a, 0x39, 0x6b, 0xc0, 0x46, -0x48, 0x62, 0x38, 0x6b, 0x00, 0xf0, 0xf8, 0xfb, 0x38, 0x1c, 0x00, 0xf0, -0xb3, 0xf8, 0x01, 0x20, 0x04, 0x49, 0xc0, 0x46, 0xc8, 0x73, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0xa4, 0x2a, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, -0x18, 0x1a, 0x00, 0x80, 0xf8, 0xb5, 0x07, 0x1c, 0x00, 0x22, 0xf9, 0x1d, -0x61, 0x31, 0x0d, 0x1c, 0x78, 0x6a, 0xc0, 0x46, 0x00, 0x90, 0x40, 0x89, +0xd2, 0x1a, 0x82, 0x18, 0x00, 0xe0, 0x12, 0x1a, 0x01, 0x20, 0x09, 0x01, +0x91, 0x42, 0x00, 0xd3, 0x00, 0x20, 0x01, 0x28, 0x65, 0xd1, 0x51, 0x49, +0x20, 0x69, 0x00, 0x28, 0x62, 0xd0, 0x05, 0x99, 0x48, 0x69, 0x01, 0x30, +0x48, 0x61, 0x02, 0x20, 0x21, 0x6a, 0xc0, 0x46, 0x08, 0x60, 0x00, 0xf0, +0xa7, 0xfc, 0x78, 0x63, 0xbe, 0x60, 0x49, 0x49, 0x22, 0x6a, 0xa3, 0x6b, +0xd3, 0x18, 0x66, 0x6b, 0xb3, 0x42, 0x00, 0xd9, 0x22, 0x6b, 0xc0, 0x46, +0xba, 0x62, 0xba, 0x6a, 0x0c, 0x32, 0xfa, 0x62, 0x00, 0x22, 0xfa, 0x61, +0x03, 0xaa, 0x52, 0x88, 0xd2, 0x09, 0x03, 0xd3, 0x01, 0x22, 0x00, 0xe0, +0x7b, 0xe0, 0x00, 0xe0, 0x00, 0x22, 0x7a, 0x60, 0x7a, 0x68, 0xc0, 0x46, +0x02, 0x60, 0x78, 0x8a, 0x41, 0x4e, 0x60, 0x28, 0x04, 0xdc, 0xb0, 0x83, +0x78, 0x8a, 0xc0, 0x46, 0xf0, 0x83, 0x08, 0xe0, 0x60, 0x20, 0xb0, 0x83, +0x79, 0x8a, 0xf8, 0x6a, 0x42, 0x18, 0x63, 0x6b, 0x9a, 0x42, 0x03, 0xd8, +0xf1, 0x83, 0x00, 0x22, 0x3a, 0x63, 0x05, 0xe0, 0x21, 0x6b, 0xc0, 0x46, +0x39, 0x63, 0x61, 0x6b, 0x08, 0x1a, 0xf0, 0x83, 0x2d, 0x49, 0x78, 0x6b, +0x42, 0x68, 0xc0, 0x46, 0xba, 0x60, 0x82, 0x68, 0xc0, 0x46, 0xfa, 0x60, +0x02, 0x69, 0xc0, 0x46, 0x7a, 0x61, 0x40, 0x69, 0xc0, 0x46, 0xb8, 0x61, +0x2e, 0x4b, 0xc8, 0x18, 0x04, 0x90, 0x00, 0xf0, 0x37, 0xf9, 0x04, 0x98, +0x00, 0xf0, 0x88, 0xf8, 0x00, 0xf0, 0xf6, 0xfa, 0x78, 0x8a, 0xf1, 0x8b, +0x88, 0x42, 0x04, 0xd1, 0xf9, 0x6a, 0x08, 0x18, 0x04, 0xe0, 0x38, 0xe0, +0x32, 0xe0, 0x3a, 0x6b, 0x10, 0x18, 0x40, 0x1a, 0x81, 0x07, 0x02, 0xd0, +0x80, 0x08, 0x80, 0x00, 0x04, 0x30, 0x61, 0x6b, 0x09, 0x1a, 0xa2, 0x6b, +0x91, 0x42, 0x00, 0xd2, 0x20, 0x6b, 0xc0, 0x46, 0x20, 0x62, 0xe8, 0x7b, +0x00, 0x28, 0x08, 0xd0, 0x00, 0x22, 0xea, 0x73, 0x05, 0x99, 0x48, 0x69, +0x01, 0x38, 0x48, 0x61, 0x78, 0x6b, 0x00, 0xf0, 0x73, 0xfa, 0x18, 0x48, +0x80, 0x6a, 0x80, 0x06, 0x80, 0x0e, 0x01, 0x28, 0x0a, 0xd1, 0x20, 0x6a, +0x00, 0x03, 0x00, 0x0b, 0x0b, 0x4c, 0xa1, 0x6a, 0x88, 0x42, 0x03, 0xd0, +0x06, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x01, 0x20, 0x40, 0x04, +0x08, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x06, 0xe0, 0xe0, 0x68, 0x00, 0x28, +0x01, 0xd0, 0x00, 0xf0, 0xb5, 0xfa, 0x01, 0x20, 0xa8, 0x73, 0xed, 0xe7, +0x68, 0x0e, 0x00, 0x80, 0x00, 0x40, 0x14, 0x40, 0xa4, 0x2a, 0x00, 0x80, +0x00, 0x00, 0x00, 0xb0, 0x28, 0x1a, 0x00, 0x80, 0x55, 0x55, 0x55, 0x55, +0xa8, 0x03, 0x00, 0x80, 0x68, 0x1a, 0x00, 0x80, 0xc4, 0x0b, 0x00, 0x00, +0x00, 0x00, 0x10, 0x40, 0x80, 0xb5, 0x07, 0x1c, 0x78, 0x6a, 0x40, 0x89, +0xff, 0x21, 0x01, 0x31, 0x01, 0x40, 0x10, 0x48, 0x02, 0xd1, 0x81, 0x6c, +0x01, 0x31, 0x81, 0x64, 0x79, 0x6a, 0x49, 0x89, 0x49, 0x0b, 0x02, 0xd2, +0x41, 0x6c, 0x01, 0x31, 0x41, 0x64, 0x0b, 0x48, 0x41, 0x6a, 0x01, 0x31, +0x41, 0x62, 0x78, 0x6a, 0x39, 0x6b, 0xc0, 0x46, 0x48, 0x62, 0x38, 0x6b, +0x00, 0xf0, 0xf8, 0xfb, 0x38, 0x1c, 0x00, 0xf0, 0xb3, 0xf8, 0x01, 0x20, +0x04, 0x49, 0xc0, 0x46, 0xc8, 0x73, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0xa4, 0x2a, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, 0x18, 0x1a, 0x00, 0x80, +0xf8, 0xb5, 0x07, 0x1c, 0x00, 0x22, 0xf9, 0x1d, 0x61, 0x31, 0x0d, 0x1c, +0x78, 0x6a, 0xc0, 0x46, 0x00, 0x90, 0x40, 0x89, 0x03, 0x0c, 0x01, 0xd2, 0x40, 0x0a, 0x03, 0xd2, 0x38, 0x1c, 0xff, 0xf7, -0xc1, 0xff, 0x67, 0xe0, 0x35, 0x48, 0xc0, 0x6b, -0x00, 0x09, 0x1f, 0xd3, 0x08, 0x78, 0x40, 0x08, 0x1c, 0xd2, 0x00, 0x20, -0x43, 0x00, 0xcc, 0x5a, 0x31, 0x4e, 0x9e, 0x19, 0x33, 0x23, 0x9b, 0x01, -0xf3, 0x18, 0x1b, 0x88, 0x9c, 0x42, 0x0e, 0xd0, 0xb8, 0x69, 0x39, 0x6b, -0xc0, 0x46, 0x88, 0x61, 0xf8, 0x68, 0x39, 0x6b, 0xc0, 0x46, 0xc8, 0x60, -0x38, 0x1c, 0x00, 0xf0, 0x27, 0xf9, 0x38, 0x1c, 0x00, 0xf0, 0x74, 0xf8, -0x46, 0xe0, 0x01, 0x30, 0x03, 0x28, 0xe3, 0xdb, 0x02, 0x20, 0x43, 0x00, -0x5c, 0x18, 0xe4, 0x88, 0x22, 0x4e, 0x9e, 0x19, 0x33, 0x23, 0x9b, 0x01, -0xf3, 0x18, 0x1b, 0x88, 0x9c, 0x42, 0x03, 0xd1, 0x01, 0x23, 0x01, 0x38, -0xd8, 0x42, 0xf0, 0xdc, 0x01, 0x23, 0xd8, 0x42, 0xc4, 0xd0, 0x1b, 0x4e, -0x0b, 0x23, 0x1b, 0x02, 0xf0, 0x18, 0x40, 0x69, 0x00, 0x28, 0x24, 0xd0, -0x7d, 0x63, 0x00, 0x98, 0x40, 0x89, 0x00, 0x0c, 0x1f, 0xd2, 0x00, 0x24, -0x2d, 0x23, 0x9b, 0x01, 0xf0, 0x18, 0xc0, 0x6b, 0x35, 0x1c, 0x00, 0x28, -0x17, 0xd0, 0xfe, 0x1d, 0x2d, 0x36, 0xa2, 0x00, 0x52, 0x19, 0x2d, 0x23, -0x9b, 0x01, 0xd2, 0x18, 0xd2, 0x6b, 0x38, 0x1c, 0x31, 0x1c, 0x02, 0xf0, -0x7b, 0xfc, 0x01, 0x28, 0x0e, 0xd0, 0x01, 0x34, 0xa0, 0x00, 0x40, 0x19, -0x2d, 0x23, 0x9b, 0x01, 0xc0, 0x18, 0xc0, 0x6b, 0x00, 0x28, 0xea, 0xd1, -0x01, 0xe0, 0x01, 0x2a, 0x02, 0xd0, 0x38, 0x1c, 0x00, 0xf0, 0x08, 0xf8, -0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, -0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x07, 0x1c, 0xb8, 0x69, 0x39, 0x6b, -0xc0, 0x46, 0x88, 0x61, 0xf8, 0x68, 0x39, 0x6b, 0xc0, 0x46, 0xc8, 0x60, -0x78, 0x6a, 0x40, 0x89, 0x01, 0x0c, 0x0e, 0xd2, 0x40, 0x0a, 0x0c, 0xd3, -0x38, 0x68, 0x40, 0x08, 0x02, 0xd3, 0x38, 0x1c, 0x02, 0xf0, 0x0c, 0xfc, -0x38, 0x1c, 0x00, 0xf0, 0xbb, 0xf8, 0x38, 0x1c, 0x00, 0xf0, 0x08, 0xf8, -0x02, 0xe0, 0x38, 0x1c, 0xff, 0xf7, 0x30, 0xff, 0x01, 0x20, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x01, 0x21, 0x00, 0x6b, 0x40, 0x6a, 0xc0, 0x46, -0x01, 0x60, 0x70, 0x47, 0xb0, 0xb4, 0xc1, 0x1d, 0x39, 0x31, 0x09, 0x8b, -0x89, 0x08, 0x09, 0x04, 0x09, 0x0c, 0x84, 0x6a, 0xc2, 0x1d, 0x61, 0x32, -0x00, 0x20, 0x00, 0x29, 0x0c, 0xdd, 0x87, 0x00, 0x3d, 0x19, 0x01, 0x23, -0x9b, 0x07, 0x2b, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0xd3, 0x51, 0x01, 0x30, -0x00, 0x04, 0x00, 0x0c, 0x88, 0x42, 0xf2, 0xdb, 0xb0, 0xbc, 0x70, 0x47, -0xf0, 0xb5, 0xa0, 0xb0, 0x01, 0x23, 0x9b, 0x07, 0xc1, 0x1d, 0x21, 0x31, -0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0x0b, 0x91, 0xc1, 0x1d, 0x53, 0x31, -0x19, 0x43, 0x1f, 0x91, 0x09, 0x68, 0x01, 0xaf, 0xfa, 0x1d, 0x39, 0x32, -0x1e, 0x92, 0x17, 0xab, 0x59, 0x80, 0x3a, 0x49, 0x01, 0x23, 0x9b, 0x07, -0x0a, 0x6a, 0x13, 0x43, 0xcc, 0x1d, 0x11, 0x34, 0x89, 0x69, 0x09, 0x03, -0x09, 0x0b, 0x22, 0x69, 0xe5, 0x68, 0xc0, 0x46, 0x1d, 0x95, 0xfc, 0x1d, -0x39, 0x34, 0x64, 0x8b, 0x64, 0x09, 0x05, 0x34, 0x24, 0x06, 0x24, 0x0e, -0x1c, 0x94, 0x56, 0x1a, 0x1b, 0x96, 0x1c, 0x9c, 0x2e, 0x4a, 0xc0, 0x46, -0x00, 0x92, 0x01, 0x26, 0x1d, 0x9d, 0x1a, 0x68, 0x91, 0x42, 0x01, 0xd1, -0x32, 0x1c, 0x0b, 0xe0, 0x91, 0x42, 0x03, 0xd9, 0x52, 0x1b, 0x1b, 0x9e, -0xb5, 0x18, 0x00, 0xe0, 0x55, 0x1a, 0x01, 0x22, 0x24, 0x01, 0xac, 0x42, +0xc1, 0xff, 0x67, 0xe0, 0x35, 0x48, 0xc0, 0x6b, 0x00, 0x09, 0x1f, 0xd3, +0x08, 0x78, 0x40, 0x08, 0x1c, 0xd2, 0x00, 0x20, 0x43, 0x00, 0xcc, 0x5a, +0x31, 0x4e, 0x9e, 0x19, 0x33, 0x23, 0x9b, 0x01, 0xf3, 0x18, 0x1b, 0x88, +0x9c, 0x42, 0x0e, 0xd0, 0xb8, 0x69, 0x39, 0x6b, 0xc0, 0x46, 0x88, 0x61, +0xf8, 0x68, 0x39, 0x6b, 0xc0, 0x46, 0xc8, 0x60, 0x38, 0x1c, 0x00, 0xf0, +0x27, 0xf9, 0x38, 0x1c, 0x00, 0xf0, 0x74, 0xf8, 0x46, 0xe0, 0x01, 0x30, +0x03, 0x28, 0xe3, 0xdb, 0x02, 0x20, 0x43, 0x00, 0x5c, 0x18, 0xe4, 0x88, +0x22, 0x4e, 0x9e, 0x19, 0x33, 0x23, 0x9b, 0x01, 0xf3, 0x18, 0x1b, 0x88, +0x9c, 0x42, 0x03, 0xd1, 0x01, 0x23, 0x01, 0x38, 0xd8, 0x42, 0xf0, 0xdc, +0x01, 0x23, 0xd8, 0x42, 0xc4, 0xd0, 0x1b, 0x4e, 0x0b, 0x23, 0x1b, 0x02, +0xf0, 0x18, 0x40, 0x69, 0x00, 0x28, 0x24, 0xd0, 0x7d, 0x63, 0x00, 0x98, +0x40, 0x89, 0x00, 0x0c, 0x1f, 0xd2, 0x00, 0x24, 0x2d, 0x23, 0x9b, 0x01, +0xf0, 0x18, 0xc0, 0x6b, 0x35, 0x1c, 0x00, 0x28, 0x17, 0xd0, 0xfe, 0x1d, +0x2d, 0x36, 0xa2, 0x00, 0x52, 0x19, 0x2d, 0x23, 0x9b, 0x01, 0xd2, 0x18, +0xd2, 0x6b, 0x38, 0x1c, 0x31, 0x1c, 0x02, 0xf0, 0x7b, 0xfc, 0x01, 0x28, +0x0e, 0xd0, 0x01, 0x34, 0xa0, 0x00, 0x40, 0x19, 0x2d, 0x23, 0x9b, 0x01, +0xc0, 0x18, 0xc0, 0x6b, 0x00, 0x28, 0xea, 0xd1, 0x01, 0xe0, 0x01, 0x2a, +0x02, 0xd0, 0x38, 0x1c, 0x00, 0xf0, 0x08, 0xf8, 0xf8, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, 0x68, 0x0e, 0x00, 0x80, +0x80, 0xb5, 0x07, 0x1c, 0xb8, 0x69, 0x39, 0x6b, 0xc0, 0x46, 0x88, 0x61, +0xf8, 0x68, 0x39, 0x6b, 0xc0, 0x46, 0xc8, 0x60, 0x78, 0x6a, 0x40, 0x89, +0x01, 0x0c, 0x0e, 0xd2, 0x40, 0x0a, 0x0c, 0xd3, 0x38, 0x68, 0x40, 0x08, +0x02, 0xd3, 0x38, 0x1c, 0x02, 0xf0, 0x0c, 0xfc, 0x38, 0x1c, 0x00, 0xf0, +0xbb, 0xf8, 0x38, 0x1c, 0x00, 0xf0, 0x08, 0xf8, 0x02, 0xe0, 0x38, 0x1c, +0xff, 0xf7, 0x30, 0xff, 0x01, 0x20, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x01, 0x21, 0x00, 0x6b, 0x40, 0x6a, 0xc0, 0x46, 0x01, 0x60, 0x70, 0x47, +0xb0, 0xb4, 0xc1, 0x1d, 0x39, 0x31, 0x09, 0x8b, 0x89, 0x08, 0x09, 0x04, +0x09, 0x0c, 0x84, 0x6a, 0xc2, 0x1d, 0x61, 0x32, 0x00, 0x20, 0x00, 0x29, +0x0c, 0xdd, 0x87, 0x00, 0x3d, 0x19, 0x01, 0x23, 0x9b, 0x07, 0x2b, 0x43, +0x1b, 0x68, 0xc0, 0x46, 0xd3, 0x51, 0x01, 0x30, 0x00, 0x04, 0x00, 0x0c, +0x88, 0x42, 0xf2, 0xdb, 0xb0, 0xbc, 0x70, 0x47, 0xf0, 0xb5, 0xa0, 0xb0, +0x01, 0x23, 0x9b, 0x07, 0xc1, 0x1d, 0x21, 0x31, 0x19, 0x43, 0x09, 0x68, +0xc0, 0x46, 0x0b, 0x91, 0xc1, 0x1d, 0x53, 0x31, 0x19, 0x43, 0x1f, 0x91, +0x09, 0x68, 0x01, 0xaf, 0xfa, 0x1d, 0x39, 0x32, 0x1e, 0x92, 0x17, 0xab, +0x59, 0x80, 0x3a, 0x49, 0x01, 0x23, 0x9b, 0x07, 0x0a, 0x6a, 0x13, 0x43, +0xcc, 0x1d, 0x11, 0x34, 0x89, 0x69, 0x09, 0x03, 0x09, 0x0b, 0x22, 0x69, +0xe5, 0x68, 0xc0, 0x46, 0x1d, 0x95, 0xfc, 0x1d, 0x39, 0x34, 0x64, 0x8b, +0x64, 0x09, 0x05, 0x34, 0x24, 0x06, 0x24, 0x0e, 0x1c, 0x94, 0x56, 0x1a, +0x1b, 0x96, 0x1c, 0x9c, 0x2e, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x01, 0x26, +0x1d, 0x9d, 0x1a, 0x68, 0x91, 0x42, 0x01, 0xd1, 0x32, 0x1c, 0x0b, 0xe0, +0x91, 0x42, 0x03, 0xd9, 0x52, 0x1b, 0x1b, 0x9e, 0xb5, 0x18, 0x00, 0xe0, +0x55, 0x1a, 0x01, 0x22, 0x24, 0x01, 0xac, 0x42, 0x00, 0xd3, 0x00, 0x22, 0x01, 0x2a, 0xe6, 0xd1, 0x91, 0x07, 0x01, 0x43, -0x09, 0x68, 0xc0, 0x46, 0x39, 0x60, 0x93, 0x07, -0x01, 0x1d, 0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0x79, 0x60, 0xc1, 0x1d, -0x01, 0x31, 0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0xb9, 0x60, 0x1f, 0x99, -0x09, 0x68, 0x1e, 0x9a, 0xc0, 0x46, 0x51, 0x83, 0xc1, 0x1d, 0x1d, 0x31, -0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0x38, 0x63, 0x79, 0x62, 0xc1, 0x1d, -0x11, 0x31, 0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0xb9, 0x61, 0xc1, 0x1d, -0x05, 0x31, 0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0xf9, 0x60, 0xc1, 0x1d, -0x17, 0x31, 0x19, 0x43, 0x09, 0x68, 0xc0, 0x46, 0xf9, 0x83, 0x0e, 0x30, -0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, 0xf8, 0x81, 0x38, 0x68, 0x40, 0x08, -0x02, 0xd3, 0x38, 0x1c, 0x02, 0xf0, 0x5c, 0xfb, 0x38, 0x1c, 0x00, 0xf0, -0x0b, 0xf8, 0x38, 0x1c, 0xff, 0xf7, 0x58, 0xff, 0x20, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0xa8, 0x03, 0x00, 0x80, 0x55, 0x55, 0x55, 0x55, -0xf8, 0xb5, 0x07, 0x1c, 0xf8, 0x1d, 0x39, 0x30, 0x41, 0x8b, 0x39, 0x4a, -0x91, 0x42, 0x00, 0xdd, 0x42, 0x83, 0x42, 0x8b, 0xc0, 0x46, 0x00, 0x92, -0x01, 0x20, 0x3a, 0x1d, 0x06, 0xca, 0xbb, 0x6a, 0x02, 0xf0, 0x0e, 0xff, -0x33, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x33, 0x4e, 0x30, 0x6a, 0x33, 0x4c, -0xe1, 0x6d, 0x41, 0x18, 0x38, 0x6b, 0xc3, 0x1d, 0x05, 0x33, 0x01, 0x20, -0x72, 0x6a, 0x02, 0xf0, 0xfb, 0xfe, 0xe0, 0x6d, 0x18, 0x30, 0x00, 0x25, -0xb1, 0x6a, 0x81, 0x42, 0x01, 0xd8, 0xe5, 0x65, 0x00, 0xe0, 0xe0, 0x65, -0x2f, 0x23, 0x9b, 0x01, 0x20, 0x1c, 0xe1, 0x6d, 0xe4, 0x18, 0x22, 0x68, -0x92, 0x00, 0x27, 0x4b, 0xc0, 0x46, 0x99, 0x50, 0x26, 0x48, 0xc1, 0x6b, -0x4a, 0x08, 0x05, 0xd3, 0x49, 0x08, 0x49, 0x00, 0xc1, 0x63, 0x01, 0x20, -0x01, 0xf0, 0xd6, 0xff, 0x22, 0x4a, 0x1f, 0x48, 0xc1, 0x1d, 0x89, 0x31, -0x0b, 0x78, 0x00, 0x2b, 0x02, 0xd0, 0x49, 0x78, 0x00, 0x29, 0x00, 0xd1, -0x1e, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x20, 0x68, 0x80, 0x00, 0x19, 0x4b, -0xc3, 0x18, 0x05, 0xce, 0xc1, 0x1d, 0x11, 0x31, 0x01, 0x20, 0x02, 0xf0, -0xc7, 0xfe, 0x14, 0x48, 0x21, 0x68, 0x01, 0x31, 0x21, 0x60, 0x17, 0x29, -0x00, 0xd3, 0x25, 0x60, 0x39, 0x6b, 0xc0, 0x46, 0x0d, 0x65, 0x79, 0x6a, -0x3a, 0x6b, 0xc0, 0x46, 0x51, 0x62, 0x33, 0x23, 0x9b, 0x01, 0xc0, 0x18, -0x81, 0x68, 0x00, 0x29, 0x03, 0xd1, 0x39, 0x6b, 0xc0, 0x46, 0x81, 0x60, -0x04, 0xe0, 0x39, 0x6b, 0xc2, 0x68, 0xc0, 0x46, 0x11, 0x65, 0x39, 0x6b, -0xc0, 0x46, 0xc1, 0x60, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xea, 0x05, 0x00, 0x00, 0x18, 0x00, 0x14, 0x02, 0x7c, 0x29, 0x00, 0x80, -0x68, 0x0e, 0x00, 0x80, 0x44, 0x82, 0x20, 0x40, 0xe8, 0x0e, 0x00, 0x80, -0x04, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x03, 0xf0, 0xb5, 0x11, 0x4e, -0xff, 0x25, 0x01, 0x35, 0x10, 0x4f, 0xc0, 0x46, 0x35, 0x60, 0x78, 0x69, -0x01, 0x38, 0x78, 0x61, 0xbc, 0x68, 0x00, 0x2c, 0x10, 0xd0, 0x20, 0x6d, -0xc0, 0x46, 0xb8, 0x60, 0x20, 0x1c, 0x00, 0xf0, 0x21, 0xf8, 0x20, 0x1c, -0x00, 0xf0, 0x04, 0xfa, 0x08, 0x48, 0x80, 0x6a, 0x00, 0x0c, 0x00, 0x07, -0xe9, 0xd1, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x05, 0x48, 0xc1, 0x79, -0x01, 0x31, 0xc1, 0x71, 0xf7, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, -0x28, 0x1b, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, 0xa0, 0x82, 0x20, 0x40, +0x09, 0x68, 0xc0, 0x46, 0x39, 0x60, 0x93, 0x07, 0x01, 0x1d, 0x19, 0x43, +0x09, 0x68, 0xc0, 0x46, 0x79, 0x60, 0xc1, 0x1d, 0x01, 0x31, 0x19, 0x43, +0x09, 0x68, 0xc0, 0x46, 0xb9, 0x60, 0x1f, 0x99, 0x09, 0x68, 0x1e, 0x9a, +0xc0, 0x46, 0x51, 0x83, 0xc1, 0x1d, 0x1d, 0x31, 0x19, 0x43, 0x09, 0x68, +0xc0, 0x46, 0x38, 0x63, 0x79, 0x62, 0xc1, 0x1d, 0x11, 0x31, 0x19, 0x43, +0x09, 0x68, 0xc0, 0x46, 0xb9, 0x61, 0xc1, 0x1d, 0x05, 0x31, 0x19, 0x43, +0x09, 0x68, 0xc0, 0x46, 0xf9, 0x60, 0xc1, 0x1d, 0x17, 0x31, 0x19, 0x43, +0x09, 0x68, 0xc0, 0x46, 0xf9, 0x83, 0x0e, 0x30, 0x18, 0x43, 0x00, 0x68, +0xc0, 0x46, 0xf8, 0x81, 0x38, 0x68, 0x40, 0x08, 0x02, 0xd3, 0x38, 0x1c, +0x02, 0xf0, 0x5c, 0xfb, 0x38, 0x1c, 0x00, 0xf0, 0x0b, 0xf8, 0x38, 0x1c, +0xff, 0xf7, 0x58, 0xff, 0x20, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0xa8, 0x03, 0x00, 0x80, 0x55, 0x55, 0x55, 0x55, 0xf8, 0xb5, 0x07, 0x1c, +0xf8, 0x1d, 0x39, 0x30, 0x41, 0x8b, 0x39, 0x4a, 0x91, 0x42, 0x00, 0xdd, +0x42, 0x83, 0x42, 0x8b, 0xc0, 0x46, 0x00, 0x92, 0x01, 0x20, 0x3a, 0x1d, +0x06, 0xca, 0xbb, 0x6a, 0x02, 0xf0, 0x0e, 0xff, 0x33, 0x4a, 0xc0, 0x46, +0x00, 0x92, 0x33, 0x4e, 0x30, 0x6a, 0x33, 0x4c, 0xe1, 0x6d, 0x41, 0x18, +0x38, 0x6b, 0xc3, 0x1d, 0x05, 0x33, 0x01, 0x20, 0x72, 0x6a, 0x02, 0xf0, +0xfb, 0xfe, 0xe0, 0x6d, 0x18, 0x30, 0x00, 0x25, 0xb1, 0x6a, 0x81, 0x42, +0x01, 0xd8, 0xe5, 0x65, 0x00, 0xe0, 0xe0, 0x65, 0x2f, 0x23, 0x9b, 0x01, +0x20, 0x1c, 0xe1, 0x6d, 0xe4, 0x18, 0x22, 0x68, 0x92, 0x00, 0x27, 0x4b, +0xc0, 0x46, 0x99, 0x50, 0x26, 0x48, 0xc1, 0x6b, 0x4a, 0x08, 0x05, 0xd3, +0x49, 0x08, 0x49, 0x00, 0xc1, 0x63, 0x01, 0x20, 0x01, 0xf0, 0xd6, 0xff, +0x22, 0x4a, 0x1f, 0x48, 0xc1, 0x1d, 0x89, 0x31, 0x0b, 0x78, 0x00, 0x2b, +0x02, 0xd0, 0x49, 0x78, 0x00, 0x29, 0x00, 0xd1, 0x1e, 0x4a, 0xc0, 0x46, +0x00, 0x92, 0x20, 0x68, 0x80, 0x00, 0x19, 0x4b, 0xc3, 0x18, 0x05, 0xce, +0xc1, 0x1d, 0x11, 0x31, 0x01, 0x20, 0x02, 0xf0, 0xc7, 0xfe, 0x14, 0x48, +0x21, 0x68, 0x01, 0x31, 0x21, 0x60, 0x17, 0x29, 0x00, 0xd3, 0x25, 0x60, +0x39, 0x6b, 0xc0, 0x46, 0x0d, 0x65, 0x79, 0x6a, 0x3a, 0x6b, 0xc0, 0x46, +0x51, 0x62, 0x33, 0x23, 0x9b, 0x01, 0xc0, 0x18, 0x81, 0x68, 0x00, 0x29, +0x03, 0xd1, 0x39, 0x6b, 0xc0, 0x46, 0x81, 0x60, 0x04, 0xe0, 0x39, 0x6b, +0xc2, 0x68, 0xc0, 0x46, 0x11, 0x65, 0x39, 0x6b, 0xc0, 0x46, 0xc1, 0x60, +0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xea, 0x05, 0x00, 0x00, +0x18, 0x00, 0x14, 0x02, 0x7c, 0x29, 0x00, 0x80, 0x68, 0x0e, 0x00, 0x80, +0x44, 0x82, 0x20, 0x40, 0xe8, 0x0e, 0x00, 0x80, 0x04, 0x00, 0x00, 0x02, +0x04, 0x00, 0x00, 0x03, 0xf0, 0xb5, 0x11, 0x4e, 0xff, 0x25, 0x01, 0x35, +0x10, 0x4f, 0xc0, 0x46, 0x35, 0x60, 0x78, 0x69, 0x01, 0x38, 0x78, 0x61, +0xbc, 0x68, 0x00, 0x2c, 0x10, 0xd0, 0x20, 0x6d, 0xc0, 0x46, 0xb8, 0x60, +0x20, 0x1c, 0x00, 0xf0, 0x21, 0xf8, 0x20, 0x1c, 0x00, 0xf0, 0x04, 0xfa, +0x08, 0x48, 0x80, 0x6a, 0x00, 0x0c, 0x00, 0x07, 0xe9, 0xd1, 0xf0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x05, 0x48, 0xc1, 0x79, 0x01, 0x31, 0xc1, 0x71, +0xf7, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x28, 0x1b, 0x00, 0x80, +0x00, 0x00, 0x10, 0x40, 0xa0, 0x82, 0x20, 0x40, 0x01, 0x20, 0x80, 0x03, 0x01, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x70, 0x47, -0x00, 0x00, 0x00, 0xb0, 0x90, 0xb5, 0x07, 0x1c, -0x38, 0x68, 0xc0, 0x08, 0x09, 0xd3, 0x1d, 0x48, 0x01, 0x6a, 0x01, 0x39, -0x01, 0x62, 0x20, 0x30, 0x00, 0x79, 0x00, 0x28, 0x01, 0xd0, 0xfe, 0xf7, -0xf3, 0xfd, 0x01, 0x23, 0x9b, 0x07, 0xf8, 0x1d, 0x1d, 0x30, 0x18, 0x43, -0x00, 0x68, 0x16, 0x4c, 0x61, 0x6a, 0x81, 0x42, 0x21, 0xd1, 0x01, 0x1c, -0x19, 0x43, 0x09, 0x68, 0x09, 0x04, 0x09, 0x0c, 0x01, 0x29, 0x1a, 0xd1, -0x00, 0xf0, 0x22, 0xf8, 0x60, 0x62, 0x60, 0x6a, 0x21, 0x6a, 0x88, 0x42, -0x05, 0xd0, 0x01, 0x21, 0x89, 0x07, 0x01, 0x43, 0x09, 0x68, 0x09, 0x04, -0xf2, 0xd0, 0x51, 0x21, 0x89, 0x03, 0x62, 0x6a, 0x23, 0x6b, 0x9a, 0x42, -0x02, 0xd1, 0x60, 0x6b, 0xa2, 0x6b, 0x80, 0x1a, 0x04, 0x38, 0xc8, 0x60, -0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0x79, 0x6a, 0xc0, 0x46, -0x08, 0x60, 0xf7, 0xe7, 0x6c, 0x06, 0x00, 0x80, 0xe8, 0x1a, 0x00, 0x80, -0x01, 0x23, 0x9b, 0x07, 0xc1, 0x1d, 0x01, 0x31, 0x19, 0x43, 0x09, 0x68, -0x09, 0x04, 0x09, 0x0c, 0x08, 0x18, 0x0d, 0x30, 0x81, 0x07, 0x02, 0xd0, -0x80, 0x08, 0x80, 0x00, 0x04, 0x30, 0x04, 0x49, 0x8a, 0x6b, 0x12, 0x18, -0x4b, 0x6b, 0x9a, 0x42, 0x00, 0xd9, 0x08, 0x6b, 0x70, 0x47, 0x00, 0x00, -0xe8, 0x1a, 0x00, 0x80, 0x00, 0xb5, 0x04, 0x48, 0xc0, 0x68, 0x10, 0x28, -0x01, 0xd3, 0x00, 0xf0, 0x05, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xe8, 0x1a, 0x00, 0x80, 0x88, 0xb5, 0x0c, 0x4f, 0x38, 0x79, 0x00, 0x28, -0x11, 0xd1, 0x0b, 0x49, 0x10, 0x20, 0x02, 0xf0, 0xf5, 0xfd, 0x00, 0x28, -0x0b, 0xd0, 0x01, 0x20, 0x38, 0x71, 0x08, 0x4a, 0xc0, 0x46, 0x00, 0x92, -0x07, 0x48, 0x42, 0x68, 0x07, 0x4b, 0x01, 0x68, 0x00, 0x20, 0x02, 0xf0, -0xdf, 0xfd, 0x88, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf8, 0x1a, 0x00, 0x80, -0xe1, 0x2c, 0xff, 0xff, 0x10, 0x00, 0x35, 0x02, 0x7c, 0x29, 0x00, 0x80, -0x44, 0x80, 0x20, 0x40, 0x90, 0xb5, 0x01, 0x20, 0x40, 0x02, 0x10, 0x49, -0xc0, 0x46, 0x08, 0x60, 0x0f, 0x4f, 0x10, 0x21, 0xf8, 0x1d, 0x3d, 0x30, -0x02, 0xf0, 0x4c, 0xfc, 0x19, 0x23, 0xdb, 0x01, 0xfc, 0x18, 0xe0, 0x68, -0x00, 0x28, 0x01, 0xd0, 0x00, 0xf0, 0x14, 0xf8, 0x00, 0x20, 0xc9, 0x23, -0x1b, 0x01, 0xf9, 0x18, 0x08, 0x71, 0xe0, 0x68, 0x10, 0x28, 0x04, 0xd3, -0x01, 0x20, 0xbb, 0x23, 0x1b, 0x01, 0xf9, 0x18, 0x48, 0x73, 0x90, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, -0xf8, 0xb5, 0x37, 0x48, 0x19, 0x23, 0xdb, 0x01, 0xc1, 0x18, 0xc9, 0x68, -0x35, 0x4d, 0x10, 0x29, 0x00, 0xd9, 0x10, 0x21, 0x69, 0x62, 0x32, 0x48, -0xc1, 0x6c, 0x00, 0x6e, 0x81, 0x42, 0x07, 0xd9, 0x08, 0x1a, 0x07, 0x09, -0x00, 0x24, 0x68, 0x6a, 0xb8, 0x42, 0x12, 0xd2, 0x07, 0x1c, 0x10, 0xe0, -0x81, 0x42, 0x2a, 0xd2, 0x2c, 0x4a, 0x52, 0x6b, 0x10, 0x1a, 0x07, 0x09, -0x68, 0x6a, 0xb8, 0x42, 0x05, 0xd9, 0x0c, 0x09, 0x39, 0x19, 0x88, 0x42, -0x03, 0xd2, 0xc4, 0x1b, 0x01, 0xe0, 0x00, 0x24, 0x07, 0x1c, 0x3e, 0x19, -0x30, 0x01, 0x25, 0x49, 0x02, 0xf0, 0x84, 0xfd, 0x00, 0x28, 0x3d, 0xd0, -0x23, 0x48, 0x00, 0x2c, 0x1a, 0xd1, 0x1e, 0x49, 0x3a, 0x01, 0x6f, 0x62, -0x09, 0x6e, 0x8c, 0x18, 0x1d, 0x4d, 0x6b, 0x6b, 0xa3, 0x42, 0x00, 0xd8, -0xe4, 0x1a, 0x1e, 0x4b, 0x1a, 0x43, 0x00, 0x92, 0xea, 0x6a, 0x51, 0x18, +0x00, 0x00, 0x00, 0xb0, 0x90, 0xb5, 0x07, 0x1c, 0x38, 0x68, 0xc0, 0x08, +0x09, 0xd3, 0x1d, 0x48, 0x01, 0x6a, 0x01, 0x39, 0x01, 0x62, 0x20, 0x30, +0x00, 0x79, 0x00, 0x28, 0x01, 0xd0, 0xfe, 0xf7, 0xe9, 0xfd, 0x01, 0x23, +0x9b, 0x07, 0xf8, 0x1d, 0x1d, 0x30, 0x18, 0x43, 0x00, 0x68, 0x16, 0x4c, +0x61, 0x6a, 0x81, 0x42, 0x21, 0xd1, 0x01, 0x1c, 0x19, 0x43, 0x09, 0x68, +0x09, 0x04, 0x09, 0x0c, 0x01, 0x29, 0x1a, 0xd1, 0x00, 0xf0, 0x22, 0xf8, +0x60, 0x62, 0x60, 0x6a, 0x21, 0x6a, 0x88, 0x42, 0x05, 0xd0, 0x01, 0x21, +0x89, 0x07, 0x01, 0x43, 0x09, 0x68, 0x09, 0x04, 0xf2, 0xd0, 0x51, 0x21, +0x89, 0x03, 0x62, 0x6a, 0x23, 0x6b, 0x9a, 0x42, 0x02, 0xd1, 0x60, 0x6b, +0xa2, 0x6b, 0x80, 0x1a, 0x04, 0x38, 0xc8, 0x60, 0x90, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x20, 0x79, 0x6a, 0xc0, 0x46, 0x08, 0x60, 0xf7, 0xe7, +0x6c, 0x06, 0x00, 0x80, 0xe8, 0x1a, 0x00, 0x80, 0x01, 0x23, 0x9b, 0x07, +0xc1, 0x1d, 0x01, 0x31, 0x19, 0x43, 0x09, 0x68, 0x09, 0x04, 0x09, 0x0c, +0x08, 0x18, 0x0d, 0x30, 0x81, 0x07, 0x02, 0xd0, 0x80, 0x08, 0x80, 0x00, +0x04, 0x30, 0x04, 0x49, 0x8a, 0x6b, 0x12, 0x18, 0x4b, 0x6b, 0x9a, 0x42, +0x00, 0xd9, 0x08, 0x6b, 0x70, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, +0x00, 0xb5, 0x04, 0x48, 0xc0, 0x68, 0x10, 0x28, 0x01, 0xd3, 0x00, 0xf0, +0x05, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, +0x88, 0xb5, 0x0c, 0x4f, 0x38, 0x79, 0x00, 0x28, 0x11, 0xd1, 0x0b, 0x49, +0x10, 0x20, 0x02, 0xf0, 0xf5, 0xfd, 0x00, 0x28, 0x0b, 0xd0, 0x01, 0x20, +0x38, 0x71, 0x08, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x07, 0x48, 0x42, 0x68, +0x07, 0x4b, 0x01, 0x68, 0x00, 0x20, 0x02, 0xf0, 0xdf, 0xfd, 0x88, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0xf8, 0x1a, 0x00, 0x80, 0xf5, 0x2c, 0xff, 0xff, +0x10, 0x00, 0x35, 0x02, 0x7c, 0x29, 0x00, 0x80, 0x44, 0x80, 0x20, 0x40, +0x90, 0xb5, 0x01, 0x20, 0x40, 0x02, 0x10, 0x49, 0xc0, 0x46, 0x08, 0x60, +0x0f, 0x4f, 0x10, 0x21, 0xf8, 0x1d, 0x3d, 0x30, 0x02, 0xf0, 0x4c, 0xfc, +0x19, 0x23, 0xdb, 0x01, 0xfc, 0x18, 0xe0, 0x68, 0x00, 0x28, 0x01, 0xd0, +0x00, 0xf0, 0x14, 0xf8, 0x00, 0x20, 0xc9, 0x23, 0x1b, 0x01, 0xf9, 0x18, +0x08, 0x71, 0xe0, 0x68, 0x10, 0x28, 0x04, 0xd3, 0x01, 0x20, 0xbb, 0x23, +0x1b, 0x01, 0xf9, 0x18, 0x48, 0x73, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, 0xf8, 0xb5, 0x37, 0x48, +0x19, 0x23, 0xdb, 0x01, 0xc1, 0x18, 0xc9, 0x68, 0x35, 0x4d, 0x10, 0x29, +0x00, 0xd9, 0x10, 0x21, 0x69, 0x62, 0x32, 0x48, 0xc1, 0x6c, 0x00, 0x6e, +0x81, 0x42, 0x07, 0xd9, 0x08, 0x1a, 0x07, 0x09, 0x00, 0x24, 0x68, 0x6a, +0xb8, 0x42, 0x12, 0xd2, 0x07, 0x1c, 0x10, 0xe0, 0x81, 0x42, 0x2a, 0xd2, +0x2c, 0x4a, 0x52, 0x6b, 0x10, 0x1a, 0x07, 0x09, 0x68, 0x6a, 0xb8, 0x42, +0x05, 0xd9, 0x0c, 0x09, 0x39, 0x19, 0x88, 0x42, 0x03, 0xd2, 0xc4, 0x1b, +0x01, 0xe0, 0x00, 0x24, 0x07, 0x1c, 0x3e, 0x19, 0x30, 0x01, 0x25, 0x49, +0x02, 0xf0, 0x84, 0xfd, 0x00, 0x28, 0x3d, 0xd0, 0x23, 0x48, 0x00, 0x2c, +0x1a, 0xd1, 0x1e, 0x49, 0x3a, 0x01, 0x6f, 0x62, 0x09, 0x6e, 0x8c, 0x18, +0x1d, 0x4d, 0x6b, 0x6b, 0xa3, 0x42, 0x00, 0xd8, 0xe4, 0x1a, 0x1e, 0x4b, +0x1a, 0x43, 0x00, 0x92, 0xea, 0x6a, 0x51, 0x18, 0x2a, 0x6b, 0x03, 0x1c, 0x20, 0xe0, 0x1b, 0x48, 0x01, 0x6b, 0x01, 0x31, -0x01, 0x63, 0x00, 0x20, 0x68, 0x62, 0xf8, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x10, 0x49, 0x24, 0x01, 0x3f, 0x01, 0x11, 0x22, -0x52, 0x05, 0x3a, 0x43, 0x6e, 0x62, 0x00, 0x92, 0x0e, 0x4d, 0xea, 0x6a, -0x09, 0x6e, 0x51, 0x18, 0x03, 0x1c, 0x06, 0x1c, 0x00, 0x20, 0x2a, 0x6b, -0x02, 0xf0, 0x4a, 0xfd, 0x0c, 0x4a, 0x22, 0x43, 0x00, 0x92, 0xbb, 0x19, -0xe9, 0x6a, 0x2a, 0x6b, 0x00, 0x20, 0x02, 0xf0, 0x41, 0xfd, 0x03, 0x48, -0xc0, 0x46, 0x04, 0x66, 0x00, 0xf0, 0x10, 0xf8, 0x01, 0x20, 0xda, 0xe7, -0x68, 0x0e, 0x00, 0x80, 0x28, 0x1b, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, -0x49, 0x2e, 0xff, 0xff, 0x44, 0x80, 0x20, 0x40, 0x00, 0x00, 0x36, 0x02, -0xa0, 0x82, 0x20, 0x40, 0x04, 0x48, 0x01, 0x6e, 0x04, 0x4a, 0x80, 0x30, -0xd1, 0x60, 0x02, 0x23, 0xc1, 0x6b, 0x19, 0x43, 0xc1, 0x63, 0x70, 0x47, -0x68, 0x0e, 0x00, 0x80, 0x3c, 0xef, 0x20, 0x40, 0xf0, 0xb5, 0x84, 0xb0, -0x01, 0x20, 0x80, 0x02, 0x1c, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x00, 0x27, -0x1b, 0x4e, 0x33, 0x23, 0x9b, 0x01, 0xf5, 0x18, 0x68, 0x6a, 0x00, 0x28, -0x1d, 0xd9, 0x19, 0x4c, 0x68, 0x46, 0x10, 0x21, 0x02, 0xf0, 0x90, 0xfb, -0x68, 0x46, 0x00, 0xf0, 0x33, 0xf8, 0x00, 0x28, 0x04, 0xd0, 0x15, 0x49, -0x48, 0x69, 0x01, 0x30, 0x48, 0x61, 0x0a, 0xe0, 0x13, 0x49, 0x60, 0x7b, -0x01, 0x30, 0x60, 0x73, 0x88, 0x79, 0x01, 0x30, 0x88, 0x71, 0x11, 0x48, -0x00, 0x68, 0x02, 0xf0, 0x65, 0xf9, 0x68, 0x6a, 0x01, 0x37, 0xb8, 0x42, -0xe2, 0xd8, 0xbb, 0x23, 0x1b, 0x01, 0xf0, 0x18, 0x81, 0x7b, 0x00, 0x29, -0x03, 0xd0, 0x00, 0x21, 0x81, 0x73, 0xff, 0xf7, 0x05, 0xfb, 0xff, 0xf7, -0xe3, 0xfe, 0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, 0xb0, 0x82, 0x20, 0x40, -0x08, 0x83, 0x20, 0x40, 0xa0, 0x82, 0x20, 0x40, 0x58, 0x04, 0x00, 0x80, -0x90, 0xb4, 0x17, 0x4f, 0x19, 0x23, 0xdb, 0x01, 0xf9, 0x18, 0x00, 0x22, -0xcb, 0x68, 0x00, 0x2b, 0x23, 0xd0, 0x01, 0x3b, 0xcb, 0x60, 0x33, 0x23, -0x9b, 0x01, 0xff, 0x18, 0xbb, 0x69, 0x1c, 0x6d, 0xc0, 0x46, 0xbc, 0x61, -0x04, 0x68, 0xc0, 0x46, 0x5c, 0x60, 0x44, 0x68, 0xc0, 0x46, 0x9c, 0x60, -0x84, 0x68, 0xc0, 0x46, 0x1c, 0x61, 0xc0, 0x68, 0xc0, 0x46, 0x58, 0x61, -0x1a, 0x65, 0x08, 0x69, 0x42, 0x1c, 0x0a, 0x61, 0x00, 0x28, 0x03, 0xd0, -0x38, 0x6a, 0xc0, 0x46, 0x03, 0x65, 0x00, 0xe0, 0xfb, 0x61, 0x3b, 0x62, -0x18, 0x1c, 0x90, 0xbc, 0x70, 0x47, 0x10, 0x1c, 0xfb, 0xe7, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0x0a, 0x4a, 0x33, 0x23, 0x9b, 0x01, 0xd1, 0x18, -0xc8, 0x69, 0x19, 0x23, 0xdb, 0x01, 0xd2, 0x18, 0x13, 0x69, 0x00, 0x2b, -0x06, 0xd0, 0x01, 0x3b, 0x13, 0x61, 0xca, 0x69, 0x12, 0x6d, 0xc0, 0x46, -0xca, 0x61, 0x70, 0x47, 0x00, 0x21, 0x11, 0x61, 0xfb, 0xe7, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0x06, 0x4a, 0x11, 0x69, 0x4b, 0x1c, 0x13, 0x61, -0x40, 0x32, 0x00, 0x29, 0x01, 0xd0, 0xd1, 0x69, 0x00, 0xe0, 0x00, 0x21, -0x01, 0x65, 0xd0, 0x61, 0x70, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, -0x06, 0x4a, 0xd1, 0x68, 0x4b, 0x1c, 0xd3, 0x60, 0x40, 0x32, 0x00, 0x29, -0x01, 0xd0, 0x91, 0x69, 0x00, 0xe0, 0x00, 0x21, 0x01, 0x65, 0x90, 0x61, -0x70, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, 0x90, 0xb4, 0x00, 0x21, +0x01, 0x63, 0x00, 0x20, 0x68, 0x62, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x10, 0x49, 0x24, 0x01, 0x3f, 0x01, 0x11, 0x22, 0x52, 0x05, 0x3a, 0x43, +0x6e, 0x62, 0x00, 0x92, 0x0e, 0x4d, 0xea, 0x6a, 0x09, 0x6e, 0x51, 0x18, +0x03, 0x1c, 0x06, 0x1c, 0x00, 0x20, 0x2a, 0x6b, 0x02, 0xf0, 0x4a, 0xfd, +0x0c, 0x4a, 0x22, 0x43, 0x00, 0x92, 0xbb, 0x19, 0xe9, 0x6a, 0x2a, 0x6b, +0x00, 0x20, 0x02, 0xf0, 0x41, 0xfd, 0x03, 0x48, 0xc0, 0x46, 0x04, 0x66, +0x00, 0xf0, 0x10, 0xf8, 0x01, 0x20, 0xda, 0xe7, 0x68, 0x0e, 0x00, 0x80, +0x28, 0x1b, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, 0x5d, 0x2e, 0xff, 0xff, +0x44, 0x80, 0x20, 0x40, 0x00, 0x00, 0x36, 0x02, 0xa0, 0x82, 0x20, 0x40, +0x04, 0x48, 0x01, 0x6e, 0x04, 0x4a, 0x80, 0x30, 0xd1, 0x60, 0x02, 0x23, +0xc1, 0x6b, 0x19, 0x43, 0xc1, 0x63, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, +0x90, 0xee, 0x20, 0x40, 0xf0, 0xb5, 0x84, 0xb0, 0x01, 0x20, 0x80, 0x02, +0x1c, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x00, 0x27, 0x1b, 0x4e, 0x33, 0x23, +0x9b, 0x01, 0xf5, 0x18, 0x68, 0x6a, 0x00, 0x28, 0x1d, 0xd9, 0x19, 0x4c, +0x68, 0x46, 0x10, 0x21, 0x02, 0xf0, 0x90, 0xfb, 0x68, 0x46, 0x00, 0xf0, +0x33, 0xf8, 0x00, 0x28, 0x04, 0xd0, 0x15, 0x49, 0x48, 0x69, 0x01, 0x30, +0x48, 0x61, 0x0a, 0xe0, 0x13, 0x49, 0x60, 0x7b, 0x01, 0x30, 0x60, 0x73, +0x88, 0x79, 0x01, 0x30, 0x88, 0x71, 0x11, 0x48, 0x00, 0x68, 0x02, 0xf0, +0x65, 0xf9, 0x68, 0x6a, 0x01, 0x37, 0xb8, 0x42, 0xe2, 0xd8, 0xbb, 0x23, +0x1b, 0x01, 0xf0, 0x18, 0x81, 0x7b, 0x00, 0x29, 0x03, 0xd0, 0x00, 0x21, +0x81, 0x73, 0xff, 0xf7, 0x05, 0xfb, 0xff, 0xf7, 0xe3, 0xfe, 0x04, 0xb0, +0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, +0x68, 0x0e, 0x00, 0x80, 0xb0, 0x82, 0x20, 0x40, 0x08, 0x83, 0x20, 0x40, +0xa0, 0x82, 0x20, 0x40, 0x58, 0x04, 0x00, 0x80, 0x90, 0xb4, 0x17, 0x4f, +0x19, 0x23, 0xdb, 0x01, 0xf9, 0x18, 0x00, 0x22, 0xcb, 0x68, 0x00, 0x2b, +0x23, 0xd0, 0x01, 0x3b, 0xcb, 0x60, 0x33, 0x23, 0x9b, 0x01, 0xff, 0x18, +0xbb, 0x69, 0x1c, 0x6d, 0xc0, 0x46, 0xbc, 0x61, 0x04, 0x68, 0xc0, 0x46, +0x5c, 0x60, 0x44, 0x68, 0xc0, 0x46, 0x9c, 0x60, 0x84, 0x68, 0xc0, 0x46, +0x1c, 0x61, 0xc0, 0x68, 0xc0, 0x46, 0x58, 0x61, 0x1a, 0x65, 0x08, 0x69, +0x42, 0x1c, 0x0a, 0x61, 0x00, 0x28, 0x03, 0xd0, 0x38, 0x6a, 0xc0, 0x46, +0x03, 0x65, 0x00, 0xe0, 0xfb, 0x61, 0x3b, 0x62, 0x18, 0x1c, 0x90, 0xbc, +0x70, 0x47, 0x10, 0x1c, 0xfb, 0xe7, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, +0x0a, 0x4a, 0x33, 0x23, 0x9b, 0x01, 0xd1, 0x18, 0xc8, 0x69, 0x19, 0x23, +0xdb, 0x01, 0xd2, 0x18, 0x13, 0x69, 0x00, 0x2b, 0x06, 0xd0, 0x01, 0x3b, +0x13, 0x61, 0xca, 0x69, 0x12, 0x6d, 0xc0, 0x46, 0xca, 0x61, 0x70, 0x47, +0x00, 0x21, 0x11, 0x61, 0xfb, 0xe7, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, +0x06, 0x4a, 0x11, 0x69, 0x4b, 0x1c, 0x13, 0x61, 0x40, 0x32, 0x00, 0x29, +0x01, 0xd0, 0xd1, 0x69, 0x00, 0xe0, 0x00, 0x21, 0x01, 0x65, 0xd0, 0x61, +0x70, 0x47, 0x00, 0x00, 0xe8, 0x1a, 0x00, 0x80, 0x06, 0x4a, 0xd1, 0x68, +0x4b, 0x1c, 0xd3, 0x60, 0x40, 0x32, 0x00, 0x29, 0x01, 0xd0, 0x91, 0x69, +0x00, 0xe0, 0x00, 0x21, 0x01, 0x65, 0x90, 0x61, 0x70, 0x47, 0x00, 0x00, +0xe8, 0x1a, 0x00, 0x80, 0x90, 0xb4, 0x00, 0x21, 0x0f, 0x4a, 0x97, 0x89, 0x92, 0x6a, 0x4b, 0x00, 0x1b, 0x18, 0x9b, 0x8a, -0x00, 0x2b, 0x12, 0xd0, 0xbb, 0x42, 0x10, 0xdc, -0x1c, 0x1c, 0x58, 0x23, 0x63, 0x43, 0xd3, 0x18, 0xdc, 0x1f, 0x49, 0x3c, -0x01, 0x23, 0x9b, 0x07, 0x23, 0x43, 0x1b, 0x68, 0x1b, 0x06, 0x1b, 0x0e, -0x03, 0x2b, 0x02, 0xd0, 0x00, 0x20, 0x90, 0xbc, 0x70, 0x47, 0x01, 0x31, -0x04, 0x29, 0xe4, 0xd3, 0x01, 0x20, 0xf8, 0xe7, 0x4c, 0x2a, 0x00, 0x80, -0xf7, 0xb5, 0x86, 0xb0, 0x3d, 0x4a, 0x07, 0x1c, 0xd1, 0x69, 0x8f, 0x40, -0x03, 0x1c, 0x14, 0x6a, 0xe3, 0x40, 0x5f, 0x40, 0x07, 0x9e, 0x8e, 0x40, -0x77, 0x40, 0xcf, 0x40, 0x94, 0x69, 0xc0, 0x46, 0x05, 0x94, 0x03, 0x1c, -0xa3, 0x40, 0x00, 0x25, 0x14, 0x69, 0xc0, 0x46, 0x04, 0x94, 0x00, 0x2c, -0x5d, 0xd9, 0x1c, 0x1c, 0x32, 0x4e, 0x26, 0x43, 0x94, 0x69, 0xe6, 0x40, -0x33, 0x1c, 0x03, 0x96, 0x53, 0x6a, 0xc0, 0x46, 0x02, 0x93, 0xd2, 0x6a, -0xc0, 0x46, 0x01, 0x92, 0xbb, 0x00, 0x02, 0x9a, 0xd2, 0x58, 0x13, 0x1c, -0x05, 0x9c, 0xe3, 0x40, 0x03, 0x9c, 0xa3, 0x42, 0x3e, 0xd1, 0x8a, 0x40, -0xca, 0x40, 0x14, 0x1c, 0x63, 0x00, 0x1b, 0x19, 0x5b, 0x01, 0x01, 0x9a, -0xd2, 0x18, 0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, 0x01, 0x36, 0x33, 0x43, -0x1b, 0x68, 0x1b, 0x06, 0x1b, 0x0e, 0x03, 0x2b, 0x2c, 0xd1, 0x01, 0x23, -0x9b, 0x07, 0xd6, 0x1d, 0x51, 0x36, 0x33, 0x43, 0x1b, 0x68, 0x07, 0x9e, -0x1e, 0x40, 0x00, 0x96, 0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, 0x49, 0x36, -0x33, 0x43, 0x1b, 0x68, 0x83, 0x42, 0x1b, 0xd1, 0x01, 0x23, 0x9b, 0x07, -0xd6, 0x1d, 0x4d, 0x36, 0x33, 0x43, 0x1b, 0x68, 0x00, 0x9e, 0xb3, 0x42, -0x12, 0xd1, 0x01, 0x23, 0x9b, 0x07, 0x1a, 0x43, 0x12, 0x68, 0x12, 0x04, -0x12, 0x0c, 0x08, 0x9b, 0x32, 0x2b, 0x04, 0xd1, 0x02, 0x2a, 0x07, 0xd1, -0x20, 0x04, 0x00, 0x14, 0x0f, 0xe0, 0x08, 0x9b, 0x33, 0x2b, 0x01, 0xd1, -0x01, 0x2a, 0xf7, 0xd0, 0x04, 0x9a, 0x01, 0x37, 0x97, 0x42, 0x00, 0xd3, -0x00, 0x27, 0x04, 0x9a, 0x01, 0x35, 0xaa, 0x42, 0xae, 0xd8, 0x00, 0x20, -0xc0, 0x43, 0x09, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x4c, 0x2a, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xb5, 0x27, 0x4d, -0x68, 0x69, 0x00, 0x28, 0x06, 0xd0, 0x26, 0x48, 0x00, 0x68, 0x02, 0xf0, -0x2b, 0xf8, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x23, 0x4c, 0x00, 0x26, -0xa0, 0x68, 0x23, 0x4f, 0x00, 0x28, 0x16, 0xd0, 0x0f, 0xe0, 0x28, 0x6a, -0x02, 0x28, 0x02, 0xd3, 0x01, 0x20, 0x38, 0x71, 0x0f, 0xe0, 0xa6, 0x60, -0xfd, 0xf7, 0xe8, 0xfe, 0x00, 0x28, 0xea, 0xd1, 0x28, 0x6a, 0x02, 0x28, -0x01, 0xd3, 0x01, 0x20, 0x38, 0x71, 0xe8, 0x68, 0x00, 0x28, 0x02, 0xd0, -0x38, 0x79, 0x00, 0x28, 0xe9, 0xd0, 0x68, 0x68, 0x00, 0x28, 0x1b, 0xd0, -0x01, 0x20, 0xa0, 0x60, 0xfe, 0xf7, 0xbc, 0xfb, 0x00, 0x28, 0xd6, 0xd1, -0x68, 0x68, 0x00, 0x28, 0xf6, 0xd1, 0x11, 0xe0, 0x00, 0x28, 0xd0, 0xd1, -0x28, 0x6a, 0x02, 0x28, 0x02, 0xd3, 0x01, 0x20, 0x38, 0x71, 0xca, 0xe7, -0xa6, 0x60, 0xfd, 0xf7, 0xc3, 0xfe, 0x00, 0x28, 0xc5, 0xd1, 0x28, 0x6a, -0x02, 0x28, 0x01, 0xd3, 0x01, 0x20, 0x38, 0x71, 0xe8, 0x68, 0x00, 0x28, -0xbd, 0xd0, 0x38, 0x79, 0x00, 0x28, 0xe7, 0xd0, 0xb9, 0xe7, 0x00, 0x00, -0x6c, 0x06, 0x00, 0x80, 0x5c, 0x04, 0x00, 0x80, 0x4c, 0x2a, 0x00, 0x80, -0x8c, 0x06, 0x00, 0x80, 0x70, 0x47, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, +0x00, 0x2b, 0x12, 0xd0, 0xbb, 0x42, 0x10, 0xdc, 0x1c, 0x1c, 0x58, 0x23, +0x63, 0x43, 0xd3, 0x18, 0xdc, 0x1f, 0x49, 0x3c, 0x01, 0x23, 0x9b, 0x07, +0x23, 0x43, 0x1b, 0x68, 0x1b, 0x06, 0x1b, 0x0e, 0x03, 0x2b, 0x02, 0xd0, +0x00, 0x20, 0x90, 0xbc, 0x70, 0x47, 0x01, 0x31, 0x04, 0x29, 0xe4, 0xd3, +0x01, 0x20, 0xf8, 0xe7, 0x4c, 0x2a, 0x00, 0x80, 0xf7, 0xb5, 0x86, 0xb0, +0x3d, 0x4a, 0x07, 0x1c, 0xd1, 0x69, 0x8f, 0x40, 0x03, 0x1c, 0x14, 0x6a, +0xe3, 0x40, 0x5f, 0x40, 0x07, 0x9e, 0x8e, 0x40, 0x77, 0x40, 0xcf, 0x40, +0x94, 0x69, 0xc0, 0x46, 0x05, 0x94, 0x03, 0x1c, 0xa3, 0x40, 0x00, 0x25, +0x14, 0x69, 0xc0, 0x46, 0x04, 0x94, 0x00, 0x2c, 0x5d, 0xd9, 0x1c, 0x1c, +0x32, 0x4e, 0x26, 0x43, 0x94, 0x69, 0xe6, 0x40, 0x33, 0x1c, 0x03, 0x96, +0x53, 0x6a, 0xc0, 0x46, 0x02, 0x93, 0xd2, 0x6a, 0xc0, 0x46, 0x01, 0x92, +0xbb, 0x00, 0x02, 0x9a, 0xd2, 0x58, 0x13, 0x1c, 0x05, 0x9c, 0xe3, 0x40, +0x03, 0x9c, 0xa3, 0x42, 0x3e, 0xd1, 0x8a, 0x40, 0xca, 0x40, 0x14, 0x1c, +0x63, 0x00, 0x1b, 0x19, 0x5b, 0x01, 0x01, 0x9a, 0xd2, 0x18, 0x01, 0x23, +0x9b, 0x07, 0xd6, 0x1d, 0x01, 0x36, 0x33, 0x43, 0x1b, 0x68, 0x1b, 0x06, +0x1b, 0x0e, 0x03, 0x2b, 0x2c, 0xd1, 0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, +0x51, 0x36, 0x33, 0x43, 0x1b, 0x68, 0x07, 0x9e, 0x1e, 0x40, 0x00, 0x96, +0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, 0x49, 0x36, 0x33, 0x43, 0x1b, 0x68, +0x83, 0x42, 0x1b, 0xd1, 0x01, 0x23, 0x9b, 0x07, 0xd6, 0x1d, 0x4d, 0x36, +0x33, 0x43, 0x1b, 0x68, 0x00, 0x9e, 0xb3, 0x42, 0x12, 0xd1, 0x01, 0x23, +0x9b, 0x07, 0x1a, 0x43, 0x12, 0x68, 0x12, 0x04, 0x12, 0x0c, 0x08, 0x9b, +0x32, 0x2b, 0x04, 0xd1, 0x02, 0x2a, 0x07, 0xd1, 0x20, 0x04, 0x00, 0x14, +0x0f, 0xe0, 0x08, 0x9b, 0x33, 0x2b, 0x01, 0xd1, 0x01, 0x2a, 0xf7, 0xd0, +0x04, 0x9a, 0x01, 0x37, 0x97, 0x42, 0x00, 0xd3, 0x00, 0x27, 0x04, 0x9a, +0x01, 0x35, 0xaa, 0x42, 0xae, 0xd8, 0x00, 0x20, 0xc0, 0x43, 0x09, 0xb0, +0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x4c, 0x2a, 0x00, 0x80, +0x00, 0x00, 0x00, 0x80, 0xf0, 0xb5, 0x27, 0x4d, 0x68, 0x69, 0x00, 0x28, +0x06, 0xd0, 0x26, 0x48, 0x00, 0x68, 0x02, 0xf0, 0x2b, 0xf8, 0xf0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x23, 0x4c, 0x00, 0x26, 0xa0, 0x68, 0x23, 0x4f, +0x00, 0x28, 0x16, 0xd0, 0x0f, 0xe0, 0x28, 0x6a, 0x02, 0x28, 0x02, 0xd3, +0x01, 0x20, 0x38, 0x71, 0x0f, 0xe0, 0xa6, 0x60, 0xfd, 0xf7, 0xde, 0xfe, +0x00, 0x28, 0xea, 0xd1, 0x28, 0x6a, 0x02, 0x28, 0x01, 0xd3, 0x01, 0x20, +0x38, 0x71, 0xe8, 0x68, 0x00, 0x28, 0x02, 0xd0, 0x38, 0x79, 0x00, 0x28, +0xe9, 0xd0, 0x68, 0x68, 0x00, 0x28, 0x1b, 0xd0, 0x01, 0x20, 0xa0, 0x60, +0xfe, 0xf7, 0xbc, 0xfb, 0x00, 0x28, 0xd6, 0xd1, 0x68, 0x68, 0x00, 0x28, +0xf6, 0xd1, 0x11, 0xe0, 0x00, 0x28, 0xd0, 0xd1, 0x28, 0x6a, 0x02, 0x28, +0x02, 0xd3, 0x01, 0x20, 0x38, 0x71, 0xca, 0xe7, 0xa6, 0x60, 0xfd, 0xf7, +0xb9, 0xfe, 0x00, 0x28, 0xc5, 0xd1, 0x28, 0x6a, 0x02, 0x28, 0x01, 0xd3, +0x01, 0x20, 0x38, 0x71, 0xe8, 0x68, 0x00, 0x28, 0xbd, 0xd0, 0x38, 0x79, +0x00, 0x28, 0xe7, 0xd0, 0xb9, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, +0x5c, 0x04, 0x00, 0x80, 0x4c, 0x2a, 0x00, 0x80, 0x8c, 0x06, 0x00, 0x80, +0x70, 0x47, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, 0x90, 0xb5, 0x40, 0x20, 0x1d, 0x49, 0xc0, 0x46, -0x08, 0x60, 0x01, 0xf0, 0x9d, 0xfc, 0x03, 0x23, -0x1b, 0x07, 0x41, 0x68, 0x19, 0x40, 0x0c, 0x0f, 0x61, 0x01, 0x09, 0x1b, -0x89, 0x00, 0x18, 0x4a, 0x8f, 0x18, 0x01, 0x21, 0x39, 0x80, 0x81, 0x6a, -0xc0, 0x46, 0x79, 0x65, 0x41, 0x6a, 0xc0, 0x46, 0x79, 0x67, 0xb9, 0x6c, -0xfa, 0x6c, 0x89, 0x18, 0xb9, 0x64, 0x00, 0x21, 0xf9, 0x64, 0xba, 0x6b, -0x3b, 0x6d, 0xd2, 0x18, 0xba, 0x63, 0x39, 0x65, 0x42, 0x6a, 0x20, 0x32, -0x51, 0x71, 0x79, 0x6d, 0x7a, 0x6f, 0xd2, 0x6d, 0xc0, 0x46, 0x11, 0x60, -0xfc, 0xf7, 0xd4, 0xff, 0x20, 0x01, 0x09, 0x49, 0x40, 0x18, 0x19, 0x23, -0xdb, 0x01, 0xc0, 0x18, 0x41, 0x6b, 0x01, 0x39, 0x41, 0x63, 0x78, 0x6f, -0x01, 0xf0, 0xc6, 0xfb, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x00, 0x00, 0x00, 0xb0, 0x5c, 0x2b, 0x00, 0x80, 0xa0, 0x1c, 0x00, 0x80, -0xf0, 0xb5, 0x40, 0x20, 0x12, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x01, 0xf0, -0x59, 0xfc, 0x07, 0x1c, 0x40, 0x68, 0x03, 0x23, 0x1b, 0x07, 0x18, 0x40, -0x06, 0x0f, 0x70, 0x01, 0x80, 0x1b, 0x80, 0x00, 0x0c, 0x49, 0x44, 0x18, -0xb8, 0x6a, 0xc0, 0x46, 0x60, 0x65, 0x78, 0x6a, 0xc0, 0x46, 0x60, 0x67, -0x80, 0x6f, 0x05, 0x1d, 0xe5, 0x63, 0xb9, 0x69, 0x28, 0x1c, 0x02, 0xf0, -0x89, 0xf9, 0x38, 0x1c, 0x21, 0x1c, 0x32, 0x1c, 0x2b, 0x1c, 0x00, 0xf0, -0x20, 0xf8, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, -0x5c, 0x2b, 0x00, 0x80, 0xf0, 0xb5, 0x4b, 0x6f, 0x9b, 0x6f, 0x1f, 0x1d, -0xcf, 0x63, 0x05, 0x68, 0x00, 0x23, 0x84, 0x69, 0xa4, 0x08, 0x08, 0xd0, -0x9c, 0x00, 0x2e, 0x59, 0xc0, 0x46, 0x3e, 0x51, 0x84, 0x69, 0xa4, 0x08, -0x01, 0x33, 0x9c, 0x42, 0xf6, 0xd8, 0x3b, 0x1c, 0x00, 0xf0, 0x03, 0xf8, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xff, 0xb5, 0x81, 0xb0, 0x04, 0x1c, -0x1d, 0x1c, 0x0f, 0x1c, 0x46, 0x48, 0x01, 0x69, 0x01, 0x31, 0x01, 0x61, -0xf9, 0x1d, 0x51, 0x31, 0xbd, 0x65, 0x00, 0x91, 0x20, 0x1c, 0xfd, 0xf7, -0x67, 0xfc, 0xf8, 0x6d, 0x40, 0x09, 0x36, 0xd2, 0xb8, 0x6d, 0x06, 0x7b, -0x43, 0x7b, 0x1b, 0x02, 0x1e, 0x43, 0x17, 0x21, 0x49, 0x02, 0x01, 0x73, -0x0b, 0x0a, 0x43, 0x73, 0x00, 0x99, 0x20, 0x1c, 0xfd, 0xf7, 0x56, 0xfc, -0xb8, 0x6d, 0xc0, 0x46, 0x06, 0x73, 0x33, 0x0a, 0x43, 0x73, 0xf8, 0x6d, -0x40, 0x09, 0x20, 0xd2, 0x60, 0x68, 0x01, 0x04, 0x09, 0x0c, 0x03, 0x98, -0x01, 0xf0, 0xcc, 0xfc, 0x60, 0x68, 0x32, 0x4b, 0x18, 0x43, 0x60, 0x60, -0x20, 0x1c, 0x01, 0xf0, 0x35, 0xfd, 0x00, 0x25, 0x7d, 0x60, 0xbd, 0x60, -0x3d, 0x64, 0x7d, 0x64, 0x20, 0x1c, 0xfc, 0xf7, 0x3b, 0xff, 0x38, 0x88, -0x40, 0x23, 0x18, 0x43, 0x38, 0x80, 0x7d, 0x62, 0x29, 0x48, 0xc0, 0x46, -0xb8, 0x62, 0x38, 0x1c, 0x00, 0xf0, 0xa0, 0xfb, 0x44, 0xe0, 0x20, 0x68, -0x01, 0x23, 0x9b, 0x07, 0x08, 0x38, 0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, -0x78, 0x64, 0x60, 0x68, 0x02, 0x04, 0x12, 0x0c, 0x78, 0x6e, 0x01, 0x26, -0xc1, 0x1d, 0x0d, 0x31, 0x8a, 0x42, 0x02, 0xd2, 0x3a, 0x64, 0x08, 0x1c, -0x0e, 0xe0, 0x41, 0x19, 0x89, 0x89, 0xf0, 0x23, 0x19, 0x40, 0x09, 0x09, -0x89, 0x00, 0x40, 0x18, 0xf8, 0x60, 0xf9, 0x61, 0x61, 0x68, 0x09, 0x04, -0x09, 0x0c, 0x81, 0x42, 0x16, 0xd2, 0x39, 0x64, 0x63, 0x68, 0x19, 0x04, +0x08, 0x60, 0x01, 0xf0, 0x9d, 0xfc, 0x03, 0x23, 0x1b, 0x07, 0x41, 0x68, +0x19, 0x40, 0x0c, 0x0f, 0x61, 0x01, 0x09, 0x1b, 0x89, 0x00, 0x18, 0x4a, +0x8f, 0x18, 0x01, 0x21, 0x39, 0x80, 0x81, 0x6a, 0xc0, 0x46, 0x79, 0x65, +0x41, 0x6a, 0xc0, 0x46, 0x79, 0x67, 0xb9, 0x6c, 0xfa, 0x6c, 0x89, 0x18, +0xb9, 0x64, 0x00, 0x21, 0xf9, 0x64, 0xba, 0x6b, 0x3b, 0x6d, 0xd2, 0x18, +0xba, 0x63, 0x39, 0x65, 0x42, 0x6a, 0x20, 0x32, 0x51, 0x71, 0x79, 0x6d, +0x7a, 0x6f, 0xd2, 0x6d, 0xc0, 0x46, 0x11, 0x60, 0xfc, 0xf7, 0xca, 0xff, +0x20, 0x01, 0x09, 0x49, 0x40, 0x18, 0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, +0x41, 0x6b, 0x01, 0x39, 0x41, 0x63, 0x78, 0x6f, 0x01, 0xf0, 0xc6, 0xfb, +0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, +0x5c, 0x2b, 0x00, 0x80, 0xa0, 0x1c, 0x00, 0x80, 0xf0, 0xb5, 0x40, 0x20, +0x12, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x01, 0xf0, 0x59, 0xfc, 0x07, 0x1c, +0x40, 0x68, 0x03, 0x23, 0x1b, 0x07, 0x18, 0x40, 0x06, 0x0f, 0x70, 0x01, +0x80, 0x1b, 0x80, 0x00, 0x0c, 0x49, 0x44, 0x18, 0xb8, 0x6a, 0xc0, 0x46, +0x60, 0x65, 0x78, 0x6a, 0xc0, 0x46, 0x60, 0x67, 0x80, 0x6f, 0x05, 0x1d, +0xe5, 0x63, 0xb9, 0x69, 0x28, 0x1c, 0x02, 0xf0, 0x89, 0xf9, 0x38, 0x1c, +0x21, 0x1c, 0x32, 0x1c, 0x2b, 0x1c, 0x00, 0xf0, 0x20, 0xf8, 0xf0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, 0x5c, 0x2b, 0x00, 0x80, +0xf0, 0xb5, 0x4b, 0x6f, 0x9b, 0x6f, 0x1f, 0x1d, 0xcf, 0x63, 0x05, 0x68, +0x00, 0x23, 0x84, 0x69, 0xa4, 0x08, 0x08, 0xd0, 0x9c, 0x00, 0x2e, 0x59, +0xc0, 0x46, 0x3e, 0x51, 0x84, 0x69, 0xa4, 0x08, 0x01, 0x33, 0x9c, 0x42, +0xf6, 0xd8, 0x3b, 0x1c, 0x00, 0xf0, 0x03, 0xf8, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0xff, 0xb5, 0x81, 0xb0, 0x04, 0x1c, 0x1d, 0x1c, 0x0f, 0x1c, +0x46, 0x48, 0x01, 0x69, 0x01, 0x31, 0x01, 0x61, 0xf9, 0x1d, 0x51, 0x31, +0xbd, 0x65, 0x00, 0x91, 0x20, 0x1c, 0xfd, 0xf7, 0x5d, 0xfc, 0xf8, 0x6d, +0x40, 0x09, 0x36, 0xd2, 0xb8, 0x6d, 0x06, 0x7b, 0x43, 0x7b, 0x1b, 0x02, +0x1e, 0x43, 0x17, 0x21, 0x49, 0x02, 0x01, 0x73, 0x0b, 0x0a, 0x43, 0x73, +0x00, 0x99, 0x20, 0x1c, 0xfd, 0xf7, 0x4c, 0xfc, 0xb8, 0x6d, 0xc0, 0x46, +0x06, 0x73, 0x33, 0x0a, 0x43, 0x73, 0xf8, 0x6d, 0x40, 0x09, 0x20, 0xd2, +0x60, 0x68, 0x01, 0x04, 0x09, 0x0c, 0x03, 0x98, 0x01, 0xf0, 0xcc, 0xfc, +0x60, 0x68, 0x32, 0x4b, 0x18, 0x43, 0x60, 0x60, 0x20, 0x1c, 0x01, 0xf0, +0x35, 0xfd, 0x00, 0x25, 0x7d, 0x60, 0xbd, 0x60, 0x3d, 0x64, 0x7d, 0x64, +0x20, 0x1c, 0xfc, 0xf7, 0x31, 0xff, 0x38, 0x88, 0x40, 0x23, 0x18, 0x43, +0x38, 0x80, 0x7d, 0x62, 0x29, 0x48, 0xc0, 0x46, 0xb8, 0x62, 0x38, 0x1c, +0x00, 0xf0, 0xa0, 0xfb, 0x44, 0xe0, 0x20, 0x68, 0x01, 0x23, 0x9b, 0x07, +0x08, 0x38, 0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, 0x78, 0x64, 0x60, 0x68, +0x02, 0x04, 0x12, 0x0c, 0x78, 0x6e, 0x01, 0x26, 0xc1, 0x1d, 0x0d, 0x31, +0x8a, 0x42, 0x02, 0xd2, 0x3a, 0x64, 0x08, 0x1c, 0x0e, 0xe0, 0x41, 0x19, +0x89, 0x89, 0xf0, 0x23, 0x19, 0x40, 0x09, 0x09, 0x89, 0x00, 0x40, 0x18, +0xf8, 0x60, 0xf9, 0x61, 0x61, 0x68, 0x09, 0x04, 0x09, 0x0c, 0x81, 0x42, +0x16, 0xd2, 0x39, 0x64, 0x63, 0x68, 0x19, 0x04, 0x09, 0x0c, 0x40, 0x1a, +0x03, 0x30, 0x80, 0x08, 0x82, 0x00, 0xa0, 0x61, +0x20, 0x68, 0x09, 0x18, 0x9b, 0x18, 0x63, 0x60, 0xc3, 0x1f, 0x05, 0x3b, +0x38, 0x1c, 0x00, 0xf0, 0xb6, 0xfa, 0x7e, 0x80, 0x20, 0x1c, 0x00, 0xf0, +0xbf, 0xfb, 0x0b, 0xe0, 0xb9, 0x68, 0x08, 0x1a, 0x00, 0x25, 0x78, 0x62, +0xbd, 0x62, 0x38, 0x1c, 0x00, 0xf0, 0x3c, 0xfc, 0x20, 0x1c, 0x39, 0x1c, +0x00, 0xf0, 0x64, 0xf8, 0x05, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x0c, 0x2b, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xc0, +0xf0, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, 0x38, 0x6c, 0xf9, 0x6b, 0x0d, 0x18, +0x21, 0x68, 0x41, 0x18, 0x00, 0x20, 0xa2, 0x69, 0x00, 0x2a, 0x0b, 0xd9, +0x82, 0x00, 0x56, 0x18, 0x01, 0x23, 0x9b, 0x07, 0x33, 0x43, 0x1b, 0x68, +0xc0, 0x46, 0xab, 0x50, 0xa2, 0x69, 0x01, 0x30, 0x82, 0x42, 0xf3, 0xd8, +0x78, 0x6e, 0xf9, 0x6b, 0x09, 0x18, 0x89, 0x89, 0xf0, 0x23, 0x19, 0x40, +0x09, 0x09, 0x89, 0x00, 0x40, 0x18, 0xf8, 0x60, 0xf9, 0x61, 0x20, 0x68, +0x01, 0x23, 0x9b, 0x07, 0x08, 0x38, 0x18, 0x43, 0x01, 0x68, 0x78, 0x6c, +0xfc, 0xf7, 0x95, 0xff, 0x78, 0x64, 0x60, 0x68, 0x01, 0x04, 0x09, 0x0c, +0xf8, 0x68, 0x81, 0x42, 0x19, 0xd2, 0x39, 0x64, 0x63, 0x68, 0x19, 0x04, 0x09, 0x0c, 0x40, 0x1a, 0x03, 0x30, 0x80, 0x08, 0x82, 0x00, 0xa0, 0x61, 0x20, 0x68, 0x09, 0x18, 0x9b, 0x18, 0x63, 0x60, 0xc3, 0x1f, 0x05, 0x3b, -0x38, 0x1c, 0x00, 0xf0, 0xb6, 0xfa, 0x7e, 0x80, -0x20, 0x1c, 0x00, 0xf0, 0xbf, 0xfb, 0x0b, 0xe0, 0xb9, 0x68, 0x08, 0x1a, -0x00, 0x25, 0x78, 0x62, 0xbd, 0x62, 0x38, 0x1c, 0x00, 0xf0, 0x3c, 0xfc, -0x20, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x64, 0xf8, 0x05, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x0c, 0x2b, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -0x01, 0x00, 0x00, 0xc0, 0xf0, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, 0x38, 0x6c, -0xf9, 0x6b, 0x0d, 0x18, 0x21, 0x68, 0x41, 0x18, 0x00, 0x20, 0xa2, 0x69, -0x00, 0x2a, 0x0b, 0xd9, 0x82, 0x00, 0x56, 0x18, 0x01, 0x23, 0x9b, 0x07, -0x33, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0xab, 0x50, 0xa2, 0x69, 0x01, 0x30, -0x82, 0x42, 0xf3, 0xd8, 0x78, 0x6e, 0xf9, 0x6b, 0x09, 0x18, 0x89, 0x89, -0xf0, 0x23, 0x19, 0x40, 0x09, 0x09, 0x89, 0x00, 0x40, 0x18, 0xf8, 0x60, -0xf9, 0x61, 0x20, 0x68, 0x01, 0x23, 0x9b, 0x07, 0x08, 0x38, 0x18, 0x43, -0x01, 0x68, 0x78, 0x6c, 0xfc, 0xf7, 0x9f, 0xff, 0x78, 0x64, 0x60, 0x68, -0x01, 0x04, 0x09, 0x0c, 0xf8, 0x68, 0x81, 0x42, 0x19, 0xd2, 0x39, 0x64, -0x63, 0x68, 0x19, 0x04, 0x09, 0x0c, 0x40, 0x1a, 0x03, 0x30, 0x80, 0x08, -0x82, 0x00, 0xa0, 0x61, 0x20, 0x68, 0x09, 0x18, 0x9b, 0x18, 0x63, 0x60, -0xc3, 0x1f, 0x05, 0x3b, 0x38, 0x1c, 0x00, 0xf0, 0x56, 0xfa, 0x01, 0x20, -0x78, 0x80, 0x20, 0x1c, 0x00, 0xf0, 0x5e, 0xfb, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0xb9, 0x68, 0x08, 0x1a, 0x78, 0x62, 0x00, 0x20, 0xb8, 0x62, -0x38, 0x1c, 0x00, 0xf0, 0xd9, 0xfb, 0x20, 0x1c, 0x39, 0x1c, 0x00, 0xf0, -0x01, 0xf8, 0xef, 0xe7, 0xf0, 0xb5, 0x84, 0xb0, 0x04, 0x1c, 0x0f, 0x1c, -0x8e, 0x48, 0x41, 0x69, 0x01, 0x31, 0x41, 0x61, 0x03, 0x20, 0x00, 0x07, -0x61, 0x68, 0x08, 0x40, 0x06, 0x0f, 0x0a, 0x04, 0x12, 0x0c, 0x20, 0x68, -0x11, 0x18, 0xfb, 0x68, 0xd2, 0x1a, 0x7b, 0x68, 0x9d, 0x1a, 0xc3, 0x1f, -0x05, 0x3b, 0x38, 0x1c, 0x2a, 0x1c, 0x00, 0xf0, 0x26, 0xfa, 0x00, 0x20, -0x78, 0x80, 0x20, 0x1c, 0x00, 0xf0, 0x2e, 0xfb, 0x60, 0x68, 0x40, 0x19, -0x01, 0x04, 0x09, 0x0c, 0x60, 0x60, 0x30, 0x1c, 0x01, 0xf0, 0xe0, 0xfb, -0x7d, 0x4e, 0x0b, 0x23, 0x1b, 0x02, 0xf0, 0x18, 0x00, 0x69, 0x00, 0x28, -0x19, 0xd0, 0x00, 0x25, 0x2d, 0x23, 0x9b, 0x01, 0xf0, 0x18, 0xc0, 0x68, -0x00, 0x28, 0x12, 0xd0, 0xaa, 0x00, 0x92, 0x19, 0x2d, 0x23, 0x9b, 0x01, -0xd2, 0x18, 0xd2, 0x68, 0x20, 0x1c, 0x39, 0x1c, 0x01, 0xf0, 0x1c, 0xfe, -0x01, 0x35, 0xa8, 0x00, 0x80, 0x19, 0x2d, 0x23, 0x9b, 0x01, 0xc0, 0x18, -0xc0, 0x68, 0x00, 0x28, 0xec, 0xd1, 0xf8, 0x6b, 0x01, 0x1f, 0x8a, 0x1c, -0xfa, 0x63, 0xfa, 0x68, 0x7d, 0x6c, 0x00, 0xf0, 0xbb, 0xf9, 0xc0, 0x43, -0x01, 0x04, 0x09, 0x0c, 0x28, 0x1c, 0xfc, 0xf7, 0x1a, 0xff, 0x03, 0x90, -0xf9, 0x6b, 0x3a, 0x6e, 0x8e, 0x18, 0x20, 0x68, 0x12, 0x18, 0x01, 0x92, -0x7a, 0x6e, 0x8d, 0x18, 0x11, 0x18, 0x02, 0x91, 0xc8, 0x1d, 0x09, 0x30, -0xe0, 0x60, 0xb1, 0x88, 0x08, 0x02, 0x09, 0x0a, 0x09, 0x06, 0x09, 0x0e, -0x08, 0x43, 0x00, 0x04, 0x00, 0x0c, 0x78, 0x61, 0x68, 0x68, 0x01, 0x0e, -0xff, 0x22, 0x12, 0x04, 0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, 0xff, 0x22, -0x12, 0x02, 0x02, 0x40, 0x12, 0x02, 0x11, 0x43, 0x00, 0x06, 0x08, 0x43, -0x38, 0x61, 0xa8, 0x89, 0x09, 0x23, 0x1b, 0x02, 0x18, 0x40, 0xb8, 0x61, +0x38, 0x1c, 0x00, 0xf0, 0x56, 0xfa, 0x01, 0x20, 0x78, 0x80, 0x20, 0x1c, +0x00, 0xf0, 0x5e, 0xfb, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xb9, 0x68, +0x08, 0x1a, 0x78, 0x62, 0x00, 0x20, 0xb8, 0x62, 0x38, 0x1c, 0x00, 0xf0, +0xd9, 0xfb, 0x20, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x01, 0xf8, 0xef, 0xe7, +0xf0, 0xb5, 0x84, 0xb0, 0x04, 0x1c, 0x0f, 0x1c, 0x8e, 0x48, 0x41, 0x69, +0x01, 0x31, 0x41, 0x61, 0x03, 0x20, 0x00, 0x07, 0x61, 0x68, 0x08, 0x40, +0x06, 0x0f, 0x0a, 0x04, 0x12, 0x0c, 0x20, 0x68, 0x11, 0x18, 0xfb, 0x68, +0xd2, 0x1a, 0x7b, 0x68, 0x9d, 0x1a, 0xc3, 0x1f, 0x05, 0x3b, 0x38, 0x1c, +0x2a, 0x1c, 0x00, 0xf0, 0x26, 0xfa, 0x00, 0x20, 0x78, 0x80, 0x20, 0x1c, +0x00, 0xf0, 0x2e, 0xfb, 0x60, 0x68, 0x40, 0x19, 0x01, 0x04, 0x09, 0x0c, +0x60, 0x60, 0x30, 0x1c, 0x01, 0xf0, 0xe0, 0xfb, 0x7d, 0x4e, 0x0b, 0x23, +0x1b, 0x02, 0xf0, 0x18, 0x00, 0x69, 0x00, 0x28, 0x19, 0xd0, 0x00, 0x25, +0x2d, 0x23, 0x9b, 0x01, 0xf0, 0x18, 0xc0, 0x68, 0x00, 0x28, 0x12, 0xd0, +0xaa, 0x00, 0x92, 0x19, 0x2d, 0x23, 0x9b, 0x01, 0xd2, 0x18, 0xd2, 0x68, +0x20, 0x1c, 0x39, 0x1c, 0x01, 0xf0, 0x1c, 0xfe, 0x01, 0x35, 0xa8, 0x00, +0x80, 0x19, 0x2d, 0x23, 0x9b, 0x01, 0xc0, 0x18, 0xc0, 0x68, 0x00, 0x28, +0xec, 0xd1, 0xf8, 0x6b, 0x01, 0x1f, 0x8a, 0x1c, 0xfa, 0x63, 0xfa, 0x68, +0x7d, 0x6c, 0x00, 0xf0, 0xbb, 0xf9, 0xc0, 0x43, 0x01, 0x04, 0x09, 0x0c, +0x28, 0x1c, 0xfc, 0xf7, 0x10, 0xff, 0x03, 0x90, 0xf9, 0x6b, 0x3a, 0x6e, +0x8e, 0x18, 0x20, 0x68, 0x12, 0x18, 0x01, 0x92, 0x7a, 0x6e, 0x8d, 0x18, +0x11, 0x18, 0x02, 0x91, 0xc8, 0x1d, 0x09, 0x30, 0xe0, 0x60, 0xb1, 0x88, +0x08, 0x02, 0x09, 0x0a, 0x09, 0x06, 0x09, 0x0e, 0x08, 0x43, 0x00, 0x04, +0x00, 0x0c, 0x78, 0x61, 0x68, 0x68, 0x01, 0x0e, 0xff, 0x22, 0x12, 0x04, +0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, 0xff, 0x22, 0x12, 0x02, 0x02, 0x40, +0x12, 0x02, 0x11, 0x43, 0x00, 0x06, 0x08, 0x43, 0x38, 0x61, 0xa8, 0x89, +0x09, 0x23, 0x1b, 0x02, 0x18, 0x40, 0xb8, 0x61, 0xa8, 0x89, 0x98, 0x43, 0xa8, 0x81, 0xa8, 0x89, 0x02, 0x99, 0xc0, 0x46, -0x88, 0x81, 0x00, 0x20, 0x70, 0x80, 0xb0, 0x80, -0x70, 0x81, 0x68, 0x60, 0x28, 0x82, 0xb9, 0x6e, 0x30, 0x1c, 0xfc, 0xf7, -0xf2, 0xfe, 0x38, 0x86, 0xfa, 0x69, 0x30, 0x1c, 0x29, 0x1c, 0xfc, 0xf7, -0x0d, 0xff, 0x78, 0x86, 0x3d, 0x8e, 0x78, 0x8e, 0x03, 0x99, 0xfc, 0xf7, -0xd2, 0xfe, 0x00, 0x90, 0x60, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x39, 0x6e, -0x41, 0x1a, 0x09, 0x04, 0x09, 0x0c, 0x7a, 0x6e, 0x82, 0x1a, 0x13, 0x04, -0x1b, 0x0c, 0x1a, 0x02, 0x1b, 0x0a, 0x1a, 0x43, 0x16, 0x04, 0x36, 0x0c, -0xba, 0x68, 0x82, 0x42, 0x01, 0xd2, 0x00, 0x20, 0x00, 0xe0, 0x10, 0x1a, -0xb8, 0x60, 0x08, 0x02, 0x09, 0x12, 0x09, 0x06, 0x09, 0x0e, 0x08, 0x43, -0x01, 0x04, 0x09, 0x0c, 0x01, 0x98, 0xc0, 0x46, 0x41, 0x80, 0x28, 0x1c, -0xfc, 0xf7, 0xad, 0xfe, 0x05, 0x1c, 0x00, 0x98, 0x31, 0x1c, 0xfc, 0xf7, -0xa8, 0xfe, 0x06, 0x1c, 0x78, 0x69, 0x00, 0x04, 0x00, 0x0c, 0x01, 0x02, -0x00, 0x0a, 0x08, 0x43, 0x01, 0x04, 0x09, 0x0c, 0x01, 0x98, 0xc0, 0x46, -0x81, 0x80, 0x28, 0x1c, 0xfc, 0xf7, 0x99, 0xfe, 0x79, 0x69, 0x01, 0x31, -0xc0, 0x43, 0x79, 0x61, 0x01, 0x9a, 0xc0, 0x46, 0x50, 0x81, 0x38, 0x69, -0x01, 0x0e, 0xff, 0x22, 0x12, 0x04, 0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, -0xff, 0x22, 0x12, 0x02, 0x02, 0x40, 0x12, 0x02, 0x11, 0x43, 0x00, 0x06, -0x01, 0x43, 0x30, 0x1c, 0xfc, 0xf7, 0x81, 0xfe, 0x39, 0x69, 0x7a, 0x68, -0x89, 0x18, 0x39, 0x61, 0xb9, 0x68, 0x00, 0x29, 0x09, 0xd1, 0x02, 0x99, -0x89, 0x89, 0xba, 0x69, 0x11, 0x43, 0x02, 0x9a, 0xc0, 0x46, 0x91, 0x81, -0xb9, 0x69, 0xfc, 0xf7, 0x70, 0xfe, 0x20, 0x82, 0x00, 0x20, 0x60, 0x82, -0xf8, 0x6d, 0x41, 0x08, 0x16, 0xd3, 0x80, 0x0a, 0x0a, 0xd3, 0x60, 0x68, -0x10, 0x38, 0x01, 0x04, 0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, -0x21, 0x68, 0xc0, 0x46, 0x08, 0x82, 0x09, 0xe0, 0x60, 0x68, 0x0c, 0x38, -0x01, 0x04, 0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x21, 0x68, -0xc0, 0x46, 0x88, 0x81, 0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x0c, 0x2b, 0x00, 0x80, 0x68, 0x0e, 0x00, 0x80, 0xf1, 0xb5, 0x84, 0xb0, -0x6e, 0x4d, 0x28, 0x69, 0x01, 0x22, 0x04, 0x99, 0x8a, 0x40, 0x90, 0x43, -0x28, 0x61, 0x04, 0x98, 0x43, 0x01, 0x18, 0x1a, 0x80, 0x00, 0x16, 0x1c, -0x69, 0x49, 0x44, 0x18, 0xe0, 0x6b, 0xc0, 0x46, 0x00, 0x90, 0xa0, 0x68, -0x00, 0x28, 0x01, 0xd1, 0x00, 0x26, 0x26, 0xe0, 0x65, 0x48, 0x41, 0x69, -0x01, 0x31, 0x41, 0x61, 0x04, 0x98, 0xfc, 0xf7, 0x13, 0xfd, 0x07, 0x1c, -0x03, 0xd1, 0x28, 0x69, 0x30, 0x43, 0x28, 0x61, 0xb5, 0xe0, 0xa0, 0x68, -0x65, 0x68, 0xa8, 0x42, 0x00, 0xd2, 0x05, 0x1c, 0xa1, 0x6c, 0xa9, 0x42, -0x16, 0xd2, 0x40, 0x1a, 0x62, 0x6a, 0x10, 0x1a, 0x00, 0x26, 0x60, 0x62, -0xa6, 0x60, 0xa6, 0x62, 0x20, 0x88, 0x48, 0x23, 0x18, 0x43, 0x20, 0x80, -0x0d, 0x1c, 0x09, 0xd1, 0x38, 0x1c, 0xfc, 0xf7, 0x23, 0xfd, 0x03, 0x20, -0x60, 0x80, 0x66, 0x60, 0x20, 0x1c, 0x00, 0xf0, 0x8d, 0xf9, 0x96, 0xe0, -0xe1, 0x68, 0x38, 0x68, 0x09, 0x18, 0xc3, 0x1f, 0x05, 0x3b, 0x20, 0x1c, -0x02, 0x39, 0x2a, 0x1c, 0x00, 0xf0, 0xcd, 0xf8, 0x38, 0x1c, 0x00, 0xf0, -0xd7, 0xf9, 0xe0, 0x68, 0x46, 0x19, 0x78, 0x68, 0x30, 0x43, 0x78, 0x60, -0x04, 0x98, 0x31, 0x1c, 0x01, 0xf0, 0x88, 0xfa, 0x21, 0x6e, 0x00, 0x98, +0x88, 0x81, 0x00, 0x20, 0x70, 0x80, 0xb0, 0x80, 0x70, 0x81, 0x68, 0x60, +0x28, 0x82, 0xb9, 0x6e, 0x30, 0x1c, 0xfc, 0xf7, 0xe8, 0xfe, 0x38, 0x86, +0xfa, 0x69, 0x30, 0x1c, 0x29, 0x1c, 0xfc, 0xf7, 0x03, 0xff, 0x78, 0x86, +0x3d, 0x8e, 0x78, 0x8e, 0x03, 0x99, 0xfc, 0xf7, 0xc8, 0xfe, 0x00, 0x90, +0x60, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x39, 0x6e, 0x41, 0x1a, 0x09, 0x04, +0x09, 0x0c, 0x7a, 0x6e, 0x82, 0x1a, 0x13, 0x04, 0x1b, 0x0c, 0x1a, 0x02, +0x1b, 0x0a, 0x1a, 0x43, 0x16, 0x04, 0x36, 0x0c, 0xba, 0x68, 0x82, 0x42, +0x01, 0xd2, 0x00, 0x20, 0x00, 0xe0, 0x10, 0x1a, 0xb8, 0x60, 0x08, 0x02, +0x09, 0x12, 0x09, 0x06, 0x09, 0x0e, 0x08, 0x43, 0x01, 0x04, 0x09, 0x0c, +0x01, 0x98, 0xc0, 0x46, 0x41, 0x80, 0x28, 0x1c, 0xfc, 0xf7, 0xa3, 0xfe, +0x05, 0x1c, 0x00, 0x98, 0x31, 0x1c, 0xfc, 0xf7, 0x9e, 0xfe, 0x06, 0x1c, +0x78, 0x69, 0x00, 0x04, 0x00, 0x0c, 0x01, 0x02, 0x00, 0x0a, 0x08, 0x43, +0x01, 0x04, 0x09, 0x0c, 0x01, 0x98, 0xc0, 0x46, 0x81, 0x80, 0x28, 0x1c, +0xfc, 0xf7, 0x8f, 0xfe, 0x79, 0x69, 0x01, 0x31, 0xc0, 0x43, 0x79, 0x61, +0x01, 0x9a, 0xc0, 0x46, 0x50, 0x81, 0x38, 0x69, 0x01, 0x0e, 0xff, 0x22, +0x12, 0x04, 0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, 0xff, 0x22, 0x12, 0x02, +0x02, 0x40, 0x12, 0x02, 0x11, 0x43, 0x00, 0x06, 0x01, 0x43, 0x30, 0x1c, +0xfc, 0xf7, 0x77, 0xfe, 0x39, 0x69, 0x7a, 0x68, 0x89, 0x18, 0x39, 0x61, +0xb9, 0x68, 0x00, 0x29, 0x09, 0xd1, 0x02, 0x99, 0x89, 0x89, 0xba, 0x69, +0x11, 0x43, 0x02, 0x9a, 0xc0, 0x46, 0x91, 0x81, 0xb9, 0x69, 0xfc, 0xf7, +0x66, 0xfe, 0x20, 0x82, 0x00, 0x20, 0x60, 0x82, 0xf8, 0x6d, 0x41, 0x08, +0x16, 0xd3, 0x80, 0x0a, 0x0a, 0xd3, 0x60, 0x68, 0x10, 0x38, 0x01, 0x04, +0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x21, 0x68, 0xc0, 0x46, +0x08, 0x82, 0x09, 0xe0, 0x60, 0x68, 0x0c, 0x38, 0x01, 0x04, 0x09, 0x0c, +0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x21, 0x68, 0xc0, 0x46, 0x88, 0x81, +0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x0c, 0x2b, 0x00, 0x80, +0x68, 0x0e, 0x00, 0x80, 0xf1, 0xb5, 0x84, 0xb0, 0x6e, 0x4d, 0x28, 0x69, +0x01, 0x22, 0x04, 0x99, 0x8a, 0x40, 0x90, 0x43, 0x28, 0x61, 0x04, 0x98, +0x43, 0x01, 0x18, 0x1a, 0x80, 0x00, 0x16, 0x1c, 0x69, 0x49, 0x44, 0x18, +0xe0, 0x6b, 0xc0, 0x46, 0x00, 0x90, 0xa0, 0x68, 0x00, 0x28, 0x01, 0xd1, +0x00, 0x26, 0x26, 0xe0, 0x65, 0x48, 0x41, 0x69, 0x01, 0x31, 0x41, 0x61, +0x04, 0x98, 0xfc, 0xf7, 0x09, 0xfd, 0x07, 0x1c, 0x03, 0xd1, 0x28, 0x69, +0x30, 0x43, 0x28, 0x61, 0xb5, 0xe0, 0xa0, 0x68, 0x65, 0x68, 0xa8, 0x42, +0x00, 0xd2, 0x05, 0x1c, 0xa1, 0x6c, 0xa9, 0x42, 0x16, 0xd2, 0x40, 0x1a, +0x62, 0x6a, 0x10, 0x1a, 0x00, 0x26, 0x60, 0x62, 0xa6, 0x60, 0xa6, 0x62, +0x20, 0x88, 0x48, 0x23, 0x18, 0x43, 0x20, 0x80, 0x0d, 0x1c, 0x09, 0xd1, +0x38, 0x1c, 0xfc, 0xf7, 0x19, 0xfd, 0x03, 0x20, 0x60, 0x80, 0x66, 0x60, +0x20, 0x1c, 0x00, 0xf0, 0x8d, 0xf9, 0x96, 0xe0, 0xe1, 0x68, 0x38, 0x68, +0x09, 0x18, 0xc3, 0x1f, 0x05, 0x3b, 0x20, 0x1c, 0x02, 0x39, 0x2a, 0x1c, +0x00, 0xf0, 0xcd, 0xf8, 0x38, 0x1c, 0x00, 0xf0, 0xd7, 0xf9, 0xe0, 0x68, +0x46, 0x19, 0x78, 0x68, 0x30, 0x43, 0x78, 0x60, 0x04, 0x98, 0x31, 0x1c, +0x01, 0xf0, 0x88, 0xfa, 0x21, 0x6e, 0x00, 0x98, 0x08, 0x18, 0x01, 0x90, 0x70, 0x1a, 0x00, 0x04, 0x00, 0x0c, 0x61, 0x6e, -0x71, 0x1a, 0x0a, 0x04, 0x12, 0x0c, 0x11, 0x02, -0x12, 0x0a, 0x11, 0x43, 0x09, 0x04, 0x09, 0x0c, 0x02, 0x91, 0x01, 0x02, -0x00, 0x0a, 0x08, 0x43, 0x01, 0x04, 0x09, 0x0c, 0x01, 0x98, 0xc0, 0x46, -0x41, 0x80, 0x20, 0x8e, 0xfc, 0xf7, 0xd5, 0xfd, 0x06, 0x1c, 0x60, 0x8e, -0x02, 0x99, 0xfc, 0xf7, 0xd0, 0xfd, 0x03, 0x90, 0x60, 0x69, 0x01, 0x04, -0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x01, 0x04, 0x09, 0x0c, -0x01, 0x98, 0xc0, 0x46, 0x81, 0x80, 0x30, 0x1c, 0xfc, 0xf7, 0xc1, 0xfd, -0x61, 0x69, 0x01, 0x31, 0xc0, 0x43, 0x61, 0x61, 0x01, 0x99, 0xc0, 0x46, -0x48, 0x81, 0x60, 0x6e, 0x00, 0x99, 0x46, 0x18, 0x20, 0x69, 0x01, 0x0e, -0xff, 0x22, 0x12, 0x04, 0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, 0xff, 0x22, -0x12, 0x02, 0x02, 0x40, 0x12, 0x02, 0x11, 0x43, 0x00, 0x06, 0x01, 0x43, -0x71, 0x60, 0x03, 0x98, 0xfc, 0xf7, 0xa5, 0xfd, 0x21, 0x69, 0x49, 0x19, -0x21, 0x61, 0xa1, 0x68, 0x49, 0x1b, 0xa1, 0x60, 0x06, 0xd1, 0xb1, 0x89, -0xa2, 0x69, 0x11, 0x43, 0xb1, 0x81, 0xa1, 0x69, 0xfc, 0xf7, 0x97, 0xfd, -0x38, 0x82, 0x61, 0x6e, 0x38, 0x68, 0x09, 0x18, 0x0e, 0x31, 0xf9, 0x60, -0xe2, 0x68, 0x00, 0x99, 0x04, 0x38, 0x00, 0xf0, 0x4c, 0xf8, 0x02, 0x20, -0x78, 0x82, 0xe0, 0x6d, 0x41, 0x08, 0x16, 0xd3, 0x80, 0x0a, 0x0a, 0xd3, -0x78, 0x68, 0x10, 0x38, 0x01, 0x04, 0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, -0x08, 0x43, 0x39, 0x68, 0xc0, 0x46, 0xc8, 0x81, 0x09, 0xe0, 0x78, 0x68, -0x0c, 0x38, 0x01, 0x04, 0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, -0x39, 0x68, 0xc0, 0x46, 0x48, 0x81, 0x05, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0xd0, 0x2c, 0x00, 0x80, 0x5c, 0x2b, 0x00, 0x80, -0x0c, 0x2b, 0x00, 0x80, 0xf7, 0xb5, 0x03, 0x1c, 0x0f, 0x1c, 0x00, 0x20, -0x1c, 0x68, 0x26, 0x04, 0x31, 0x1c, 0x1d, 0x1d, 0xfc, 0xf7, 0x5b, 0xfd, -0x40, 0xc7, 0x02, 0x9a, 0xd1, 0x1c, 0x89, 0x08, 0x01, 0x39, 0x4a, 0x1e, -0x02, 0x92, 0x00, 0x29, 0x0d, 0xd0, 0x21, 0x0c, 0x10, 0xcd, 0x22, 0x04, -0x0a, 0x43, 0x11, 0x1c, 0x16, 0x1c, 0xfc, 0xf7, 0x4a, 0xfd, 0x40, 0xc7, -0x02, 0x99, 0x4a, 0x1e, 0x02, 0x92, 0x00, 0x29, 0xf1, 0xd1, 0x03, 0xb0, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x80, 0x08, 0x80, 0x00, 0x89, 0x08, -0x89, 0x00, 0x03, 0x32, 0x93, 0x08, 0x5a, 0x1e, 0x00, 0x2b, 0x05, 0xd0, -0x08, 0xc9, 0x08, 0xc0, 0x13, 0x1c, 0x01, 0x3a, 0x00, 0x2b, 0xf9, 0xd1, -0x70, 0x47, 0xff, 0xb5, 0x86, 0xb0, 0x17, 0x1c, 0x00, 0x26, 0x06, 0x98, -0x80, 0x6c, 0xc0, 0x1b, 0x06, 0x99, 0xc0, 0x46, 0x88, 0x64, 0x01, 0x20, -0xc0, 0x05, 0x06, 0x99, 0x89, 0x6b, 0xc0, 0x46, 0x01, 0x91, 0x06, 0x99, -0x4c, 0x6b, 0x67, 0xe0, 0x21, 0x68, 0xc0, 0x46, 0x02, 0x91, 0x61, 0x68, -0xc0, 0x46, 0x03, 0x91, 0xa1, 0x68, 0xc0, 0x46, 0x04, 0x91, 0x02, 0xa9, -0x49, 0x88, 0xb9, 0x42, 0x08, 0xd2, 0x02, 0xad, 0x6d, 0x88, 0x02, 0xa9, -0x49, 0x88, 0x7f, 0x1a, 0x00, 0x21, 0x02, 0xab, 0x59, 0x80, 0x19, 0xe0, -0x02, 0xa9, 0x49, 0x88, 0xc9, 0x1b, 0x02, 0xab, 0x59, 0x80, 0x3d, 0x1c, -0x00, 0x27, 0x01, 0x21, 0x49, 0x06, 0x07, 0x9b, 0x9a, 0x07, 0x92, 0x0f, -0x0d, 0xd0, 0xeb, 0x06, 0xdb, 0x0e, 0x08, 0xd0, 0x1e, 0x2b, 0x08, 0xd3, -0x1e, 0x2b, 0x02, 0xd1, 0x03, 0x2a, 0x04, 0xd1, 0x01, 0xe0, 0x02, 0x2a, +0x71, 0x1a, 0x0a, 0x04, 0x12, 0x0c, 0x11, 0x02, 0x12, 0x0a, 0x11, 0x43, +0x09, 0x04, 0x09, 0x0c, 0x02, 0x91, 0x01, 0x02, 0x00, 0x0a, 0x08, 0x43, +0x01, 0x04, 0x09, 0x0c, 0x01, 0x98, 0xc0, 0x46, 0x41, 0x80, 0x20, 0x8e, +0xfc, 0xf7, 0xcb, 0xfd, 0x06, 0x1c, 0x60, 0x8e, 0x02, 0x99, 0xfc, 0xf7, +0xc6, 0xfd, 0x03, 0x90, 0x60, 0x69, 0x01, 0x04, 0x09, 0x0c, 0x08, 0x02, +0x09, 0x0a, 0x08, 0x43, 0x01, 0x04, 0x09, 0x0c, 0x01, 0x98, 0xc0, 0x46, +0x81, 0x80, 0x30, 0x1c, 0xfc, 0xf7, 0xb7, 0xfd, 0x61, 0x69, 0x01, 0x31, +0xc0, 0x43, 0x61, 0x61, 0x01, 0x99, 0xc0, 0x46, 0x48, 0x81, 0x60, 0x6e, +0x00, 0x99, 0x46, 0x18, 0x20, 0x69, 0x01, 0x0e, 0xff, 0x22, 0x12, 0x04, +0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, 0xff, 0x22, 0x12, 0x02, 0x02, 0x40, +0x12, 0x02, 0x11, 0x43, 0x00, 0x06, 0x01, 0x43, 0x71, 0x60, 0x03, 0x98, +0xfc, 0xf7, 0x9b, 0xfd, 0x21, 0x69, 0x49, 0x19, 0x21, 0x61, 0xa1, 0x68, +0x49, 0x1b, 0xa1, 0x60, 0x06, 0xd1, 0xb1, 0x89, 0xa2, 0x69, 0x11, 0x43, +0xb1, 0x81, 0xa1, 0x69, 0xfc, 0xf7, 0x8d, 0xfd, 0x38, 0x82, 0x61, 0x6e, +0x38, 0x68, 0x09, 0x18, 0x0e, 0x31, 0xf9, 0x60, 0xe2, 0x68, 0x00, 0x99, +0x04, 0x38, 0x00, 0xf0, 0x4c, 0xf8, 0x02, 0x20, 0x78, 0x82, 0xe0, 0x6d, +0x41, 0x08, 0x16, 0xd3, 0x80, 0x0a, 0x0a, 0xd3, 0x78, 0x68, 0x10, 0x38, +0x01, 0x04, 0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x39, 0x68, +0xc0, 0x46, 0xc8, 0x81, 0x09, 0xe0, 0x78, 0x68, 0x0c, 0x38, 0x01, 0x04, +0x09, 0x0c, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x39, 0x68, 0xc0, 0x46, +0x48, 0x81, 0x05, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0xd0, 0x2c, 0x00, 0x80, 0x5c, 0x2b, 0x00, 0x80, 0x0c, 0x2b, 0x00, 0x80, +0xf7, 0xb5, 0x03, 0x1c, 0x0f, 0x1c, 0x00, 0x20, 0x1c, 0x68, 0x26, 0x04, +0x31, 0x1c, 0x1d, 0x1d, 0xfc, 0xf7, 0x51, 0xfd, 0x40, 0xc7, 0x02, 0x9a, +0xd1, 0x1c, 0x89, 0x08, 0x01, 0x39, 0x4a, 0x1e, 0x02, 0x92, 0x00, 0x29, +0x0d, 0xd0, 0x21, 0x0c, 0x10, 0xcd, 0x22, 0x04, 0x0a, 0x43, 0x11, 0x1c, +0x16, 0x1c, 0xfc, 0xf7, 0x40, 0xfd, 0x40, 0xc7, 0x02, 0x99, 0x4a, 0x1e, +0x02, 0x92, 0x00, 0x29, 0xf1, 0xd1, 0x03, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x80, 0x08, 0x80, 0x00, 0x89, 0x08, 0x89, 0x00, 0x03, 0x32, +0x93, 0x08, 0x5a, 0x1e, 0x00, 0x2b, 0x05, 0xd0, 0x08, 0xc9, 0x08, 0xc0, +0x13, 0x1c, 0x01, 0x3a, 0x00, 0x2b, 0xf9, 0xd1, 0x70, 0x47, 0xff, 0xb5, +0x86, 0xb0, 0x17, 0x1c, 0x00, 0x26, 0x06, 0x98, 0x80, 0x6c, 0xc0, 0x1b, +0x06, 0x99, 0xc0, 0x46, 0x88, 0x64, 0x01, 0x20, 0xc0, 0x05, 0x06, 0x99, +0x89, 0x6b, 0xc0, 0x46, 0x01, 0x91, 0x06, 0x99, 0x4c, 0x6b, 0x67, 0xe0, +0x21, 0x68, 0xc0, 0x46, 0x02, 0x91, 0x61, 0x68, 0xc0, 0x46, 0x03, 0x91, +0xa1, 0x68, 0xc0, 0x46, 0x04, 0x91, 0x02, 0xa9, 0x49, 0x88, 0xb9, 0x42, +0x08, 0xd2, 0x02, 0xad, 0x6d, 0x88, 0x02, 0xa9, 0x49, 0x88, 0x7f, 0x1a, +0x00, 0x21, 0x02, 0xab, 0x59, 0x80, 0x19, 0xe0, 0x02, 0xa9, 0x49, 0x88, +0xc9, 0x1b, 0x02, 0xab, 0x59, 0x80, 0x3d, 0x1c, 0x00, 0x27, 0x01, 0x21, +0x49, 0x06, 0x07, 0x9b, 0x9a, 0x07, 0x92, 0x0f, 0x0d, 0xd0, 0xeb, 0x06, +0xdb, 0x0e, 0x08, 0xd0, 0x1e, 0x2b, 0x08, 0xd3, 0x1e, 0x2b, 0x02, 0xd1, +0x03, 0x2a, 0x04, 0xd1, 0x01, 0xe0, 0x02, 0x2a, 0x01, 0xd3, 0x01, 0x26, 0x00, 0x21, 0x29, 0x43, 0x01, 0x43, 0x0a, 0x1c, -0x00, 0x91, 0x00, 0x20, 0x03, 0x99, 0x04, 0x9a, -0x07, 0x9b, 0x01, 0xf0, 0x5b, 0xff, 0x07, 0x99, 0x49, 0x19, 0x07, 0x91, -0x00, 0x2e, 0x0a, 0xd0, 0x1d, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x1d, 0x48, -0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x07, 0x9b, 0x01, 0xf0, 0x4c, 0xff, -0x00, 0x26, 0x02, 0xa8, 0x40, 0x88, 0x00, 0x28, 0x0c, 0xd0, 0x03, 0x98, -0x40, 0x19, 0x03, 0x90, 0x02, 0x98, 0xc0, 0x46, 0x20, 0x60, 0x03, 0x98, -0xc0, 0x46, 0x60, 0x60, 0x04, 0x98, 0xc0, 0x46, 0xa0, 0x60, 0x03, 0xe0, -0x01, 0x98, 0x01, 0x38, 0x01, 0x90, 0x10, 0x34, 0x06, 0x98, 0xc0, 0x46, -0x44, 0x63, 0x01, 0x98, 0x06, 0x99, 0xc0, 0x46, 0x88, 0x63, 0x00, 0x20, -0x00, 0x2f, 0x02, 0xd0, 0x01, 0x99, 0x00, 0x29, 0x92, 0xd1, 0x09, 0x4a, -0xc0, 0x46, 0x00, 0x92, 0x06, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, -0x09, 0x9b, 0x01, 0xf0, 0x1f, 0xff, 0x0a, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x7c, 0x29, 0x00, 0x80, -0x04, 0x00, 0x53, 0x02, 0x90, 0xb5, 0x0c, 0x1c, 0x07, 0x1c, 0x38, 0x68, -0x01, 0x23, 0x9b, 0x07, 0x08, 0x38, 0x18, 0x43, 0x01, 0x68, 0x38, 0x8a, -0xfc, 0xf7, 0x8f, 0xfc, 0xc0, 0x43, 0xf9, 0x68, 0xc0, 0x46, 0x08, 0x80, -0x78, 0x8a, 0x39, 0x68, 0x08, 0x1a, 0x38, 0x60, 0x38, 0x1c, 0x01, 0xf0, -0x8b, 0xf9, 0x38, 0x1c, 0xfc, 0xf7, 0x96, 0xfb, 0x20, 0x1c, 0xff, 0xf7, -0x33, 0xfe, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x01, 0x88, -0x8a, 0x09, 0x21, 0xd3, 0xca, 0x09, 0x1f, 0xd2, 0x8a, 0x08, 0x1d, 0xd3, -0x00, 0x21, 0x01, 0x80, 0x41, 0x80, 0x47, 0x6f, 0x40, 0x6d, 0xfa, 0x1d, -0x19, 0x32, 0x51, 0x71, 0xfa, 0x6d, 0xc0, 0x46, 0x10, 0x60, 0x3a, 0x6e, -0xc0, 0x46, 0x10, 0x60, 0x0c, 0x48, 0xc0, 0x46, 0x81, 0x63, 0xc1, 0x6b, -0x49, 0x08, 0x49, 0x00, 0xc1, 0x63, 0x01, 0x20, 0x00, 0xf0, 0xcc, 0xff, -0x38, 0x1c, 0x00, 0xf0, 0x6b, 0xff, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x80, 0x23, 0x19, 0x43, 0x01, 0x80, 0x01, 0x88, 0x49, 0x09, 0xf6, 0xd2, -0x00, 0xf0, 0xb0, 0xf8, 0xf3, 0xe7, 0x00, 0x00, 0xe8, 0x0e, 0x00, 0x80, -0xf0, 0xb5, 0x07, 0x1c, 0x10, 0x1c, 0x0d, 0x1c, 0x00, 0x24, 0x5e, 0x1e, -0x00, 0x2b, 0x19, 0xd0, 0x01, 0x68, 0xc0, 0x46, 0x39, 0x60, 0x41, 0x88, -0x0c, 0x19, 0x41, 0x68, 0xc0, 0x46, 0x79, 0x60, 0x81, 0x68, 0xc0, 0x46, -0xb9, 0x60, 0xc1, 0x68, 0xc0, 0x46, 0xf9, 0x60, 0x10, 0x30, 0x10, 0x37, -0xe9, 0x6a, 0x81, 0x42, 0x02, 0xd8, 0x28, 0x1c, 0x00, 0xf0, 0xec, 0xff, -0x31, 0x1c, 0x01, 0x3e, 0x00, 0x29, 0xe5, 0xd1, 0x20, 0x1c, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x00, 0x21, 0xc1, 0x61, 0x05, 0x49, 0x0a, 0x68, -0x00, 0x2a, 0x01, 0xd1, 0x08, 0x60, 0x02, 0xe0, 0x4a, 0x68, 0xc0, 0x46, -0xd0, 0x61, 0x48, 0x60, 0x70, 0x47, 0x00, 0x00, 0xd0, 0x2c, 0x00, 0x80, -0x03, 0x49, 0x08, 0x68, 0x00, 0x28, 0x02, 0xd0, 0xc2, 0x69, 0xc0, 0x46, -0x0a, 0x60, 0x70, 0x47, 0xd0, 0x2c, 0x00, 0x80, 0x00, 0x21, 0x81, 0x67, -0x05, 0x49, 0x8a, 0x68, 0x00, 0x2a, 0x01, 0xd1, 0x88, 0x60, 0x02, 0xe0, -0xca, 0x68, 0xc0, 0x46, 0x90, 0x67, 0xc8, 0x60, 0x70, 0x47, 0x00, 0x00, -0xd0, 0x2c, 0x00, 0x80, 0x03, 0x49, 0x88, 0x68, 0x00, 0x28, 0x02, 0xd0, -0x82, 0x6f, 0xc0, 0x46, 0x8a, 0x60, 0x70, 0x47, 0xd0, 0x2c, 0x00, 0x80, +0x00, 0x91, 0x00, 0x20, 0x03, 0x99, 0x04, 0x9a, 0x07, 0x9b, 0x01, 0xf0, +0x5b, 0xff, 0x07, 0x99, 0x49, 0x19, 0x07, 0x91, 0x00, 0x2e, 0x0a, 0xd0, +0x1d, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x1d, 0x48, 0x01, 0x6d, 0x42, 0x6d, +0x00, 0x20, 0x07, 0x9b, 0x01, 0xf0, 0x4c, 0xff, 0x00, 0x26, 0x02, 0xa8, +0x40, 0x88, 0x00, 0x28, 0x0c, 0xd0, 0x03, 0x98, 0x40, 0x19, 0x03, 0x90, +0x02, 0x98, 0xc0, 0x46, 0x20, 0x60, 0x03, 0x98, 0xc0, 0x46, 0x60, 0x60, +0x04, 0x98, 0xc0, 0x46, 0xa0, 0x60, 0x03, 0xe0, 0x01, 0x98, 0x01, 0x38, +0x01, 0x90, 0x10, 0x34, 0x06, 0x98, 0xc0, 0x46, 0x44, 0x63, 0x01, 0x98, +0x06, 0x99, 0xc0, 0x46, 0x88, 0x63, 0x00, 0x20, 0x00, 0x2f, 0x02, 0xd0, +0x01, 0x99, 0x00, 0x29, 0x92, 0xd1, 0x09, 0x4a, 0xc0, 0x46, 0x00, 0x92, +0x06, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x09, 0x9b, 0x01, 0xf0, +0x1f, 0xff, 0x0a, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x01, 0x00, 0x00, 0x02, 0x7c, 0x29, 0x00, 0x80, 0x04, 0x00, 0x53, 0x02, +0x90, 0xb5, 0x0c, 0x1c, 0x07, 0x1c, 0x38, 0x68, 0x01, 0x23, 0x9b, 0x07, +0x08, 0x38, 0x18, 0x43, 0x01, 0x68, 0x38, 0x8a, 0xfc, 0xf7, 0x85, 0xfc, +0xc0, 0x43, 0xf9, 0x68, 0xc0, 0x46, 0x08, 0x80, 0x78, 0x8a, 0x39, 0x68, +0x08, 0x1a, 0x38, 0x60, 0x38, 0x1c, 0x01, 0xf0, 0x8b, 0xf9, 0x38, 0x1c, +0xfc, 0xf7, 0x8c, 0xfb, 0x20, 0x1c, 0xff, 0xf7, 0x33, 0xfe, 0x90, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x01, 0x88, 0x8a, 0x09, 0x21, 0xd3, +0xca, 0x09, 0x1f, 0xd2, 0x8a, 0x08, 0x1d, 0xd3, 0x00, 0x21, 0x01, 0x80, +0x41, 0x80, 0x47, 0x6f, 0x40, 0x6d, 0xfa, 0x1d, 0x19, 0x32, 0x51, 0x71, +0xfa, 0x6d, 0xc0, 0x46, 0x10, 0x60, 0x3a, 0x6e, 0xc0, 0x46, 0x10, 0x60, +0x0c, 0x48, 0xc0, 0x46, 0x81, 0x63, 0xc1, 0x6b, 0x49, 0x08, 0x49, 0x00, +0xc1, 0x63, 0x01, 0x20, 0x00, 0xf0, 0xcc, 0xff, 0x38, 0x1c, 0x00, 0xf0, +0x6b, 0xff, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x80, 0x23, 0x19, 0x43, +0x01, 0x80, 0x01, 0x88, 0x49, 0x09, 0xf6, 0xd2, 0x00, 0xf0, 0xb0, 0xf8, +0xf3, 0xe7, 0x00, 0x00, 0xe8, 0x0e, 0x00, 0x80, 0xf0, 0xb5, 0x07, 0x1c, +0x10, 0x1c, 0x0d, 0x1c, 0x00, 0x24, 0x5e, 0x1e, 0x00, 0x2b, 0x19, 0xd0, +0x01, 0x68, 0xc0, 0x46, 0x39, 0x60, 0x41, 0x88, 0x0c, 0x19, 0x41, 0x68, +0xc0, 0x46, 0x79, 0x60, 0x81, 0x68, 0xc0, 0x46, 0xb9, 0x60, 0xc1, 0x68, +0xc0, 0x46, 0xf9, 0x60, 0x10, 0x30, 0x10, 0x37, 0xe9, 0x6a, 0x81, 0x42, +0x02, 0xd8, 0x28, 0x1c, 0x00, 0xf0, 0xec, 0xff, 0x31, 0x1c, 0x01, 0x3e, +0x00, 0x29, 0xe5, 0xd1, 0x20, 0x1c, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x00, 0x21, 0xc1, 0x61, 0x05, 0x49, 0x0a, 0x68, 0x00, 0x2a, 0x01, 0xd1, +0x08, 0x60, 0x02, 0xe0, 0x4a, 0x68, 0xc0, 0x46, 0xd0, 0x61, 0x48, 0x60, +0x70, 0x47, 0x00, 0x00, 0xd0, 0x2c, 0x00, 0x80, 0x03, 0x49, 0x08, 0x68, +0x00, 0x28, 0x02, 0xd0, 0xc2, 0x69, 0xc0, 0x46, 0x0a, 0x60, 0x70, 0x47, +0xd0, 0x2c, 0x00, 0x80, 0x00, 0x21, 0x81, 0x67, 0x05, 0x49, 0x8a, 0x68, +0x00, 0x2a, 0x01, 0xd1, 0x88, 0x60, 0x02, 0xe0, 0xca, 0x68, 0xc0, 0x46, +0x90, 0x67, 0xc8, 0x60, 0x70, 0x47, 0x00, 0x00, 0xd0, 0x2c, 0x00, 0x80, +0x03, 0x49, 0x88, 0x68, 0x00, 0x28, 0x02, 0xd0, 0x82, 0x6f, 0xc0, 0x46, +0x8a, 0x60, 0x70, 0x47, 0xd0, 0x2c, 0x00, 0x80, 0x00, 0xb5, 0x80, 0x20, 0x13, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xff, 0xf7, -0xd5, 0xff, 0x00, 0x28, 0x1b, 0xd0, 0x03, 0x23, -0x1b, 0x07, 0x41, 0x68, 0x19, 0x40, 0x0a, 0x0f, 0x51, 0x01, 0x89, 0x1a, -0x89, 0x00, 0x0d, 0x4b, 0xc9, 0x18, 0x4b, 0x88, 0x00, 0x2b, 0x04, 0xd1, -0x11, 0x1c, 0xff, 0xf7, 0x3b, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x01, 0x2b, -0x02, 0xd1, 0xff, 0xf7, 0x05, 0xfc, 0xf8, 0xe7, 0x02, 0x2b, 0xf6, 0xd1, -0xff, 0xf7, 0x4e, 0xfb, 0xf3, 0xe7, 0x04, 0x48, 0x01, 0x6d, 0x01, 0x31, -0x01, 0x65, 0xee, 0xe7, 0x00, 0x00, 0x00, 0xb0, 0x5c, 0x2b, 0x00, 0x80, -0xa0, 0x82, 0x20, 0x40, 0x00, 0xb5, 0x20, 0x20, 0x0d, 0x49, 0xc0, 0x46, -0x08, 0x60, 0xff, 0xf7, 0xbf, 0xff, 0x00, 0x28, 0x0e, 0xd0, 0x01, 0x88, -0x20, 0x23, 0x19, 0x43, 0x01, 0x80, 0x01, 0x88, 0x10, 0x23, 0x99, 0x43, -0x01, 0x80, 0x01, 0x88, 0x09, 0x0a, 0x01, 0xd3, 0xff, 0xf7, 0x2e, 0xff, -0x08, 0xbc, 0x18, 0x47, 0x03, 0x48, 0x01, 0x6d, 0x01, 0x31, 0x01, 0x65, -0xf8, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xa0, 0x82, 0x20, 0x40, -0x98, 0xb5, 0x07, 0x1c, 0x22, 0x48, 0xc0, 0x46, 0x00, 0x90, 0x22, 0x48, -0xc3, 0x1d, 0x41, 0x33, 0x41, 0x6d, 0x82, 0x6d, 0x80, 0x6c, 0x00, 0x03, -0x00, 0x0b, 0x9c, 0x68, 0x01, 0x23, 0x9b, 0x07, 0x23, 0x43, 0x1b, 0x68, -0x98, 0x42, 0x00, 0xd1, 0x0c, 0xe0, 0x98, 0x42, 0x03, 0xd9, 0x10, 0x1a, -0x59, 0x1a, 0x41, 0x18, 0x00, 0xe0, 0x19, 0x1a, 0x01, 0x20, 0x10, 0x29, -0x00, 0xd8, 0x00, 0x20, 0x00, 0x28, 0x1f, 0xd0, 0x78, 0x6a, 0xf9, 0x6a, -0xc0, 0x46, 0x08, 0x60, 0xb8, 0x6a, 0xf9, 0x6a, 0xc0, 0x46, 0x48, 0x60, -0x10, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0xfb, 0x6a, 0x0f, 0x48, 0x42, 0x6d, -0x03, 0x20, 0x39, 0x6a, 0x01, 0xf0, 0xe2, 0xfd, 0x38, 0x88, 0x10, 0x23, -0x18, 0x43, 0x38, 0x80, 0x38, 0x88, 0x40, 0x23, 0x98, 0x43, 0x38, 0x80, -0x38, 0x1c, 0xff, 0xf7, 0x55, 0xff, 0x98, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x38, 0x88, 0x40, 0x23, 0x18, 0x43, 0x38, 0x80, 0xf7, 0xe7, 0x00, 0x00, -0x55, 0x55, 0x55, 0x55, 0xa8, 0x03, 0x00, 0x80, 0x08, 0x00, 0x11, 0x02, -0x7c, 0x29, 0x00, 0x80, 0xb0, 0xb5, 0x40, 0x20, 0x2c, 0x49, 0xc0, 0x46, -0x08, 0x60, 0x00, 0xf0, 0xfd, 0xfe, 0x07, 0x1c, 0x40, 0x68, 0x03, 0x23, -0x1b, 0x07, 0x18, 0x40, 0x05, 0x0f, 0x68, 0x01, 0x40, 0x1b, 0x80, 0x00, -0x26, 0x49, 0x44, 0x18, 0x20, 0x88, 0x02, 0x23, 0x18, 0x43, 0x20, 0x80, -0x20, 0x88, 0x41, 0x08, 0x34, 0xd3, 0x40, 0x08, 0x40, 0x00, 0x20, 0x80, -0xa0, 0x6c, 0xe1, 0x6c, 0x40, 0x18, 0xa0, 0x64, 0x00, 0x20, 0xe0, 0x64, -0xa1, 0x6b, 0x22, 0x6d, 0x89, 0x18, 0xa1, 0x63, 0x20, 0x65, 0xb8, 0x6a, -0xc0, 0x46, 0x60, 0x65, 0x03, 0x23, 0x1b, 0x07, 0x78, 0x68, 0x18, 0x40, -0x78, 0x60, 0x61, 0x68, 0x36, 0x31, 0x94, 0x29, 0x04, 0xd8, 0x38, 0x23, -0x18, 0x43, 0x78, 0x60, 0x38, 0x20, 0x03, 0xe0, 0x94, 0x23, 0x18, 0x43, -0x78, 0x60, 0x94, 0x20, 0xb8, 0x61, 0x39, 0x68, 0x78, 0x68, 0x02, 0x04, -0x12, 0x0c, 0x20, 0x1c, 0xcb, 0x1f, 0x05, 0x3b, 0xff, 0xf7, 0xd7, 0xfd, -0x02, 0x20, 0x60, 0x80, 0x38, 0x1c, 0xff, 0xf7, 0xdf, 0xfe, 0xb0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x38, 0x1c, 0xfc, 0xf7, 0x11, 0xfa, 0x28, 0x01, -0x06, 0x49, 0x40, 0x18, 0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x41, 0x6b, -0x01, 0x39, 0x41, 0x63, 0xef, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, +0xd5, 0xff, 0x00, 0x28, 0x1b, 0xd0, 0x03, 0x23, 0x1b, 0x07, 0x41, 0x68, +0x19, 0x40, 0x0a, 0x0f, 0x51, 0x01, 0x89, 0x1a, 0x89, 0x00, 0x0d, 0x4b, +0xc9, 0x18, 0x4b, 0x88, 0x00, 0x2b, 0x04, 0xd1, 0x11, 0x1c, 0xff, 0xf7, +0x3b, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x01, 0x2b, 0x02, 0xd1, 0xff, 0xf7, +0x05, 0xfc, 0xf8, 0xe7, 0x02, 0x2b, 0xf6, 0xd1, 0xff, 0xf7, 0x4e, 0xfb, +0xf3, 0xe7, 0x04, 0x48, 0x01, 0x6d, 0x01, 0x31, 0x01, 0x65, 0xee, 0xe7, +0x00, 0x00, 0x00, 0xb0, 0x5c, 0x2b, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, +0x00, 0xb5, 0x20, 0x20, 0x0d, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xff, 0xf7, +0xbf, 0xff, 0x00, 0x28, 0x0e, 0xd0, 0x01, 0x88, 0x20, 0x23, 0x19, 0x43, +0x01, 0x80, 0x01, 0x88, 0x10, 0x23, 0x99, 0x43, 0x01, 0x80, 0x01, 0x88, +0x09, 0x0a, 0x01, 0xd3, 0xff, 0xf7, 0x2e, 0xff, 0x08, 0xbc, 0x18, 0x47, +0x03, 0x48, 0x01, 0x6d, 0x01, 0x31, 0x01, 0x65, 0xf8, 0xe7, 0x00, 0x00, +0x00, 0x00, 0x00, 0xb0, 0xa0, 0x82, 0x20, 0x40, 0x98, 0xb5, 0x07, 0x1c, +0x22, 0x48, 0xc0, 0x46, 0x00, 0x90, 0x22, 0x48, 0xc3, 0x1d, 0x41, 0x33, +0x41, 0x6d, 0x82, 0x6d, 0x80, 0x6c, 0x00, 0x03, 0x00, 0x0b, 0x9c, 0x68, +0x01, 0x23, 0x9b, 0x07, 0x23, 0x43, 0x1b, 0x68, 0x98, 0x42, 0x00, 0xd1, +0x0c, 0xe0, 0x98, 0x42, 0x03, 0xd9, 0x10, 0x1a, 0x59, 0x1a, 0x41, 0x18, +0x00, 0xe0, 0x19, 0x1a, 0x01, 0x20, 0x10, 0x29, 0x00, 0xd8, 0x00, 0x20, +0x00, 0x28, 0x1f, 0xd0, 0x78, 0x6a, 0xf9, 0x6a, 0xc0, 0x46, 0x08, 0x60, +0xb8, 0x6a, 0xf9, 0x6a, 0xc0, 0x46, 0x48, 0x60, 0x10, 0x4a, 0xc0, 0x46, +0x00, 0x92, 0xfb, 0x6a, 0x0f, 0x48, 0x42, 0x6d, 0x03, 0x20, 0x39, 0x6a, +0x01, 0xf0, 0xe2, 0xfd, 0x38, 0x88, 0x10, 0x23, 0x18, 0x43, 0x38, 0x80, +0x38, 0x88, 0x40, 0x23, 0x98, 0x43, 0x38, 0x80, 0x38, 0x1c, 0xff, 0xf7, +0x55, 0xff, 0x98, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x38, 0x88, 0x40, 0x23, +0x18, 0x43, 0x38, 0x80, 0xf7, 0xe7, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, +0xa8, 0x03, 0x00, 0x80, 0x08, 0x00, 0x11, 0x02, 0x7c, 0x29, 0x00, 0x80, +0xb0, 0xb5, 0x40, 0x20, 0x2c, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x00, 0xf0, +0xfd, 0xfe, 0x07, 0x1c, 0x40, 0x68, 0x03, 0x23, 0x1b, 0x07, 0x18, 0x40, +0x05, 0x0f, 0x68, 0x01, 0x40, 0x1b, 0x80, 0x00, 0x26, 0x49, 0x44, 0x18, +0x20, 0x88, 0x02, 0x23, 0x18, 0x43, 0x20, 0x80, 0x20, 0x88, 0x41, 0x08, +0x34, 0xd3, 0x40, 0x08, 0x40, 0x00, 0x20, 0x80, 0xa0, 0x6c, 0xe1, 0x6c, +0x40, 0x18, 0xa0, 0x64, 0x00, 0x20, 0xe0, 0x64, 0xa1, 0x6b, 0x22, 0x6d, +0x89, 0x18, 0xa1, 0x63, 0x20, 0x65, 0xb8, 0x6a, 0xc0, 0x46, 0x60, 0x65, +0x03, 0x23, 0x1b, 0x07, 0x78, 0x68, 0x18, 0x40, 0x78, 0x60, 0x61, 0x68, +0x36, 0x31, 0x94, 0x29, 0x04, 0xd8, 0x38, 0x23, 0x18, 0x43, 0x78, 0x60, +0x38, 0x20, 0x03, 0xe0, 0x94, 0x23, 0x18, 0x43, 0x78, 0x60, 0x94, 0x20, +0xb8, 0x61, 0x39, 0x68, 0x78, 0x68, 0x02, 0x04, 0x12, 0x0c, 0x20, 0x1c, +0xcb, 0x1f, 0x05, 0x3b, 0xff, 0xf7, 0xd7, 0xfd, 0x02, 0x20, 0x60, 0x80, +0x38, 0x1c, 0xff, 0xf7, 0xdf, 0xfe, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x38, 0x1c, 0xfc, 0xf7, 0x07, 0xfa, 0x28, 0x01, 0x06, 0x49, 0x40, 0x18, +0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x41, 0x6b, 0x01, 0x39, 0x41, 0x63, +0xef, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x5c, 0x2b, 0x00, 0x80, 0xa0, 0x1c, 0x00, 0x80, 0x90, 0xb5, 0x00, 0x27, -0x0f, 0x4c, 0x0d, 0xe0, 0x42, 0x6b, 0x01, 0x3a, -0x42, 0x63, 0x00, 0x2a, 0x05, 0xdc, 0x02, 0x6b, 0xc0, 0x46, 0x42, 0x63, -0xc0, 0x6a, 0x01, 0xf0, 0xc6, 0xf9, 0x01, 0x37, 0x0b, 0x2f, 0x07, 0xd2, -0x38, 0x01, 0x00, 0x19, 0x33, 0x23, 0x9b, 0x01, 0xc0, 0x18, 0x81, 0x6a, -0x00, 0x29, 0xe9, 0xd1, 0x01, 0x20, 0x40, 0x06, 0x03, 0x49, 0xc0, 0x46, -0x08, 0x60, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, -0x00, 0x00, 0x00, 0xb0, 0x10, 0x48, 0xc1, 0x68, 0x01, 0x31, 0xc1, 0x60, -0x0f, 0x49, 0xc8, 0x68, 0x01, 0x28, 0x17, 0xd1, 0xc8, 0x1d, 0x79, 0x30, -0x02, 0x89, 0x00, 0x2a, 0x12, 0xd0, 0x01, 0x3a, 0x02, 0x81, 0x02, 0x89, -0x00, 0x2a, 0x0d, 0xd1, 0x42, 0x89, 0x00, 0x2a, 0x08, 0xd1, 0xc9, 0x6f, -0x02, 0x23, 0x0a, 0x68, 0x1a, 0x43, 0x0a, 0x60, 0x04, 0x21, 0x01, 0x81, -0x01, 0x21, 0x00, 0xe0, 0x00, 0x21, 0x41, 0x81, 0x70, 0x47, 0x00, 0x00, -0x08, 0x83, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, 0xb0, 0xb5, 0x07, 0x1c, -0x01, 0x23, 0xf8, 0x1d, 0x69, 0x30, 0x03, 0x73, 0x1e, 0x48, 0xc2, 0x1d, -0x79, 0x32, 0x54, 0x8a, 0x61, 0x1c, 0x51, 0x82, 0xd5, 0x8a, 0x00, 0x21, -0xac, 0x42, 0x04, 0xdb, 0xc4, 0x1d, 0x89, 0x34, 0x63, 0x70, 0x51, 0x82, -0xd1, 0x83, 0x01, 0x23, 0x9b, 0x07, 0x3a, 0x6d, 0x1a, 0x43, 0x12, 0x68, -0xc0, 0x46, 0xba, 0x61, 0xfb, 0x69, 0x9a, 0x42, 0x06, 0xd1, 0xf8, 0x6c, -0x12, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x79, 0x61, 0x41, 0x69, 0xfa, 0x6c, 0x91, 0x43, 0x41, 0x61, 0x01, 0x20, -0x00, 0x05, 0xc1, 0x60, 0x38, 0x69, 0x02, 0x28, 0xf1, 0xd0, 0xb8, 0x69, -0xf9, 0x69, 0x41, 0x1a, 0x01, 0xd5, 0x78, 0x6d, 0x41, 0x18, 0x38, 0x1c, -0x00, 0xf0, 0x0e, 0xf8, 0xf9, 0x69, 0x09, 0x18, 0xf9, 0x61, 0x78, 0x6d, -0x81, 0x42, 0xe2, 0xd3, 0x08, 0x1a, 0xf8, 0x61, 0xdf, 0xe7, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, 0xf8, 0xb5, 0x04, 0x1c, -0x0f, 0x1c, 0xff, 0x23, 0x21, 0x33, 0x9f, 0x42, 0x01, 0xd9, 0xff, 0x27, -0x21, 0x37, 0xe1, 0x6e, 0x38, 0x1c, 0x01, 0xf0, 0xcb, 0xfc, 0x2d, 0x4d, -0x00, 0x28, 0x13, 0xd1, 0xe0, 0x1d, 0x49, 0x30, 0x01, 0x7a, 0x01, 0x23, -0x19, 0x43, 0x01, 0x72, 0x29, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x29, 0x48, -0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x2b, 0x1c, 0x01, 0xf0, 0xb0, 0xfc, -0x00, 0x20, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x20, 0x69, 0x01, 0x30, -0x20, 0x61, 0x23, 0x49, 0xc8, 0x1d, 0xb9, 0x30, 0x02, 0x6b, 0x92, 0x00, -0x51, 0x18, 0xc0, 0x31, 0x0f, 0x61, 0x01, 0x6b, 0x01, 0x31, 0x89, 0x07, -0x89, 0x0f, 0x01, 0x63, 0x20, 0x6b, 0xc2, 0x19, 0x61, 0x6d, 0x8a, 0x42, -0x03, 0xd8, 0x23, 0x22, 0x12, 0x05, 0x3a, 0x43, 0x05, 0xe0, 0x09, 0x1a, -0x7e, 0x1a, 0x07, 0xd1, 0x23, 0x22, 0x12, 0x05, 0x0a, 0x43, 0x00, 0x92, -0x61, 0x6e, 0x09, 0x18, 0xa2, 0x6e, 0x10, 0xe0, 0x11, 0x22, 0x52, 0x05, -0x0a, 0x43, 0x00, 0x92, 0x61, 0x6e, 0x09, 0x18, 0x00, 0x20, 0xa2, 0x6e, -0x2b, 0x1c, 0x01, 0xf0, 0x7d, 0xfc, 0x23, 0x22, 0x12, 0x05, 0x32, 0x43, -0x00, 0x92, 0x61, 0x6e, 0xa2, 0x6e, 0x00, 0x20, 0x2b, 0x1c, 0x01, 0xf0, -0x73, 0xfc, 0x20, 0x6b, 0xc0, 0x19, 0x00, 0x09, 0x00, 0x01, 0x61, 0x6d, -0x81, 0x42, 0x00, 0xd8, 0x40, 0x1a, 0x20, 0x63, 0x38, 0x1c, 0xb8, 0xe7, +0x0f, 0x4c, 0x0d, 0xe0, 0x42, 0x6b, 0x01, 0x3a, 0x42, 0x63, 0x00, 0x2a, +0x05, 0xdc, 0x02, 0x6b, 0xc0, 0x46, 0x42, 0x63, 0xc0, 0x6a, 0x01, 0xf0, +0xc6, 0xf9, 0x01, 0x37, 0x0b, 0x2f, 0x07, 0xd2, 0x38, 0x01, 0x00, 0x19, +0x33, 0x23, 0x9b, 0x01, 0xc0, 0x18, 0x81, 0x6a, 0x00, 0x29, 0xe9, 0xd1, +0x01, 0x20, 0x40, 0x06, 0x03, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x90, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, +0x10, 0x48, 0xc1, 0x68, 0x01, 0x31, 0xc1, 0x60, 0x0f, 0x49, 0xc8, 0x68, +0x01, 0x28, 0x17, 0xd1, 0xc8, 0x1d, 0x79, 0x30, 0x02, 0x89, 0x00, 0x2a, +0x12, 0xd0, 0x01, 0x3a, 0x02, 0x81, 0x02, 0x89, 0x00, 0x2a, 0x0d, 0xd1, +0x42, 0x89, 0x00, 0x2a, 0x08, 0xd1, 0xc9, 0x6f, 0x02, 0x23, 0x0a, 0x68, +0x1a, 0x43, 0x0a, 0x60, 0x04, 0x21, 0x01, 0x81, 0x01, 0x21, 0x00, 0xe0, +0x00, 0x21, 0x41, 0x81, 0x70, 0x47, 0x00, 0x00, 0x08, 0x83, 0x20, 0x40, +0x68, 0x0e, 0x00, 0x80, 0xb0, 0xb5, 0x07, 0x1c, 0x01, 0x23, 0xf8, 0x1d, +0x69, 0x30, 0x03, 0x73, 0x1e, 0x48, 0xc2, 0x1d, 0x79, 0x32, 0x54, 0x8a, +0x61, 0x1c, 0x51, 0x82, 0xd5, 0x8a, 0x00, 0x21, 0xac, 0x42, 0x04, 0xdb, +0xc4, 0x1d, 0x89, 0x34, 0x63, 0x70, 0x51, 0x82, 0xd1, 0x83, 0x01, 0x23, +0x9b, 0x07, 0x3a, 0x6d, 0x1a, 0x43, 0x12, 0x68, 0xc0, 0x46, 0xba, 0x61, +0xfb, 0x69, 0x9a, 0x42, 0x06, 0xd1, 0xf8, 0x6c, 0x12, 0x49, 0xc0, 0x46, +0x08, 0x60, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x79, 0x61, 0x41, 0x69, +0xfa, 0x6c, 0x91, 0x43, 0x41, 0x61, 0x01, 0x20, 0x00, 0x05, 0xc1, 0x60, +0x38, 0x69, 0x02, 0x28, 0xf1, 0xd0, 0xb8, 0x69, 0xf9, 0x69, 0x41, 0x1a, +0x01, 0xd5, 0x78, 0x6d, 0x41, 0x18, 0x38, 0x1c, 0x00, 0xf0, 0x0e, 0xf8, +0xf9, 0x69, 0x09, 0x18, 0xf9, 0x61, 0x78, 0x6d, 0x81, 0x42, 0xe2, 0xd3, +0x08, 0x1a, 0xf8, 0x61, 0xdf, 0xe7, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, +0x00, 0x00, 0x00, 0xb0, 0xf8, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, 0xff, 0x23, +0x21, 0x33, 0x9f, 0x42, 0x01, 0xd9, 0xff, 0x27, 0x21, 0x37, 0xe1, 0x6e, +0x38, 0x1c, 0x01, 0xf0, 0xcb, 0xfc, 0x2d, 0x4d, 0x00, 0x28, 0x13, 0xd1, +0xe0, 0x1d, 0x49, 0x30, 0x01, 0x7a, 0x01, 0x23, 0x19, 0x43, 0x01, 0x72, +0x29, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x29, 0x48, 0x01, 0x6d, 0x42, 0x6d, +0x00, 0x20, 0x2b, 0x1c, 0x01, 0xf0, 0xb0, 0xfc, 0x00, 0x20, 0xf8, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x20, 0x69, 0x01, 0x30, 0x20, 0x61, 0x23, 0x49, +0xc8, 0x1d, 0xb9, 0x30, 0x02, 0x6b, 0x92, 0x00, 0x51, 0x18, 0xc0, 0x31, +0x0f, 0x61, 0x01, 0x6b, 0x01, 0x31, 0x89, 0x07, 0x89, 0x0f, 0x01, 0x63, +0x20, 0x6b, 0xc2, 0x19, 0x61, 0x6d, 0x8a, 0x42, 0x03, 0xd8, 0x23, 0x22, +0x12, 0x05, 0x3a, 0x43, 0x05, 0xe0, 0x09, 0x1a, 0x7e, 0x1a, 0x07, 0xd1, +0x23, 0x22, 0x12, 0x05, 0x0a, 0x43, 0x00, 0x92, 0x61, 0x6e, 0x09, 0x18, +0xa2, 0x6e, 0x10, 0xe0, 0x11, 0x22, 0x52, 0x05, 0x0a, 0x43, 0x00, 0x92, +0x61, 0x6e, 0x09, 0x18, 0x00, 0x20, 0xa2, 0x6e, 0x2b, 0x1c, 0x01, 0xf0, +0x7d, 0xfc, 0x23, 0x22, 0x12, 0x05, 0x32, 0x43, 0x00, 0x92, 0x61, 0x6e, +0xa2, 0x6e, 0x00, 0x20, 0x2b, 0x1c, 0x01, 0xf0, 0x73, 0xfc, 0x20, 0x6b, +0xc0, 0x19, 0x00, 0x09, 0x00, 0x01, 0x61, 0x6d, 0x81, 0x42, 0x00, 0xd8, +0x40, 0x1a, 0x20, 0x63, 0x38, 0x1c, 0xb8, 0xe7, 0x44, 0x80, 0x20, 0x40, 0x04, 0x00, 0x1b, 0x02, 0x7c, 0x29, 0x00, 0x80, -0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x01, 0x20, -0xc0, 0x03, 0x0d, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x0c, 0x49, 0xc8, 0x1d, -0x49, 0x30, 0x02, 0x7a, 0x00, 0x27, 0x00, 0x2a, 0x03, 0xd0, 0x07, 0x72, -0x08, 0x1c, 0xff, 0xf7, 0x37, 0xff, 0x08, 0x49, 0xc8, 0x1d, 0x49, 0x30, -0x02, 0x7a, 0x00, 0x2a, 0x03, 0xd0, 0x07, 0x72, 0x08, 0x1c, 0xff, 0xf7, -0x2d, 0xff, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, -0x64, 0x2d, 0x00, 0x80, 0xe4, 0x2c, 0x00, 0x80, 0x90, 0xb5, 0x07, 0x1c, -0x10, 0x20, 0x18, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xf8, 0x68, 0x01, 0x30, -0xf8, 0x60, 0x16, 0x48, 0xc4, 0x1d, 0xb9, 0x34, 0x61, 0x6b, 0x89, 0x00, -0x09, 0x18, 0xc0, 0x31, 0x09, 0x69, 0x7a, 0x68, 0x92, 0x00, 0xd2, 0x19, -0x51, 0x64, 0x61, 0x6b, 0x89, 0x00, 0x08, 0x18, 0xc0, 0x30, 0x01, 0x69, -0x78, 0x68, 0x80, 0x00, 0xc0, 0x19, 0xc0, 0x6b, 0x01, 0xf0, 0xa2, 0xfa, -0x01, 0x23, 0x78, 0x68, 0x58, 0x40, 0x78, 0x60, 0x60, 0x6b, 0x01, 0x30, -0x80, 0x07, 0x80, 0x0f, 0x60, 0x63, 0xf8, 0x1d, 0x19, 0x30, 0x40, 0x79, -0x00, 0x28, 0x02, 0xd1, 0x38, 0x1c, 0x00, 0xf0, 0x07, 0xf8, 0x90, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, -0x90, 0xb5, 0x07, 0x1c, 0x39, 0x48, 0xc0, 0x68, 0x00, 0x28, 0x05, 0xd0, -0xb8, 0x6a, 0xc0, 0x68, 0x80, 0x09, 0x01, 0xd3, 0x02, 0x20, 0x00, 0xe0, -0x78, 0x6f, 0xfc, 0xf7, 0x63, 0xf8, 0x04, 0x1c, 0x06, 0xd1, 0x01, 0x20, -0xf9, 0x1d, 0x19, 0x31, 0x08, 0x71, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0xf8, 0x6c, 0x2f, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xba, 0x6a, 0x38, 0x1c, -0x21, 0x1c, 0x00, 0xf0, 0x59, 0xf8, 0x67, 0x62, 0x00, 0x28, 0x03, 0xd1, -0x20, 0x1c, 0x00, 0xf0, 0x0b, 0xfd, 0xec, 0xe7, 0xf9, 0x6d, 0x09, 0x68, -0x09, 0x18, 0x09, 0x09, 0x09, 0x01, 0x7a, 0x6d, 0x8a, 0x42, 0x00, 0xd8, -0x89, 0x1a, 0xa1, 0x62, 0xb9, 0x68, 0x89, 0x00, 0xc9, 0x19, 0x4a, 0x6c, -0x00, 0x2a, 0x07, 0xd0, 0x4a, 0x6c, 0x12, 0x1a, 0x4a, 0x64, 0x80, 0x08, -0x80, 0x00, 0xb9, 0x6a, 0x08, 0x18, 0xb8, 0x62, 0x38, 0x68, 0xb9, 0x6a, -0x80, 0x00, 0xc0, 0x19, 0x42, 0x6b, 0x91, 0x42, 0x0e, 0xd3, 0x00, 0x21, -0x41, 0x64, 0xb8, 0x6a, 0x39, 0x68, 0x89, 0x00, 0xc9, 0x19, 0x49, 0x6b, -0x40, 0x1a, 0xb8, 0x62, 0xb9, 0x68, 0x89, 0x00, 0xc9, 0x19, 0xc9, 0x6b, -0x40, 0x18, 0xb8, 0x62, 0xb8, 0x68, 0x81, 0x00, 0xc9, 0x19, 0x49, 0x6c, -0x00, 0x29, 0xb8, 0xd1, 0xb9, 0x6a, 0xfa, 0x6b, 0x91, 0x42, 0xb4, 0xd0, -0x3a, 0x6c, 0x91, 0x42, 0xb1, 0xd0, 0x01, 0x23, 0x58, 0x40, 0xb8, 0x60, -0x80, 0x00, 0xc0, 0x19, 0xc0, 0x6b, 0xc0, 0x46, 0xb8, 0x62, 0xf8, 0x68, -0x00, 0x28, 0x01, 0xd0, 0x01, 0x38, 0xf8, 0x60, 0x38, 0x69, 0x00, 0x28, -0xa1, 0xd0, 0x01, 0x38, 0x38, 0x61, 0x9e, 0xe7, 0x68, 0x19, 0x00, 0x80, -0x00, 0x00, 0x00, 0xb0, 0xf7, 0xb5, 0x90, 0xb0, 0x04, 0x1c, 0x0d, 0x1c, -0x00, 0x20, 0x05, 0x90, 0x02, 0x90, 0x00, 0x22, 0x01, 0x92, 0xf9, 0x48, -0xc0, 0x6a, 0xc0, 0x46, 0xa8, 0x61, 0xa0, 0x68, 0x81, 0x00, 0x09, 0x19, -0x49, 0x6b, 0xc0, 0x46, 0x20, 0x60, 0xe1, 0x62, 0x12, 0x9a, 0xd0, 0x68, -0xc0, 0x46, 0xa8, 0x60, 0x12, 0x9a, 0x51, 0x78, 0xc0, 0x46, 0x0c, 0x91, -0xf0, 0x48, 0xc0, 0x46, 0x03, 0x90, 0xd7, 0x1d, 0x09, 0x37, 0xe0, 0x6a, +0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x01, 0x20, 0xc0, 0x03, 0x0d, 0x49, +0xc0, 0x46, 0x08, 0x60, 0x0c, 0x49, 0xc8, 0x1d, 0x49, 0x30, 0x02, 0x7a, +0x00, 0x27, 0x00, 0x2a, 0x03, 0xd0, 0x07, 0x72, 0x08, 0x1c, 0xff, 0xf7, +0x37, 0xff, 0x08, 0x49, 0xc8, 0x1d, 0x49, 0x30, 0x02, 0x7a, 0x00, 0x2a, +0x03, 0xd0, 0x07, 0x72, 0x08, 0x1c, 0xff, 0xf7, 0x2d, 0xff, 0x80, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, 0x64, 0x2d, 0x00, 0x80, +0xe4, 0x2c, 0x00, 0x80, 0x90, 0xb5, 0x07, 0x1c, 0x10, 0x20, 0x18, 0x49, +0xc0, 0x46, 0x08, 0x60, 0xf8, 0x68, 0x01, 0x30, 0xf8, 0x60, 0x16, 0x48, +0xc4, 0x1d, 0xb9, 0x34, 0x61, 0x6b, 0x89, 0x00, 0x09, 0x18, 0xc0, 0x31, +0x09, 0x69, 0x7a, 0x68, 0x92, 0x00, 0xd2, 0x19, 0x51, 0x64, 0x61, 0x6b, +0x89, 0x00, 0x08, 0x18, 0xc0, 0x30, 0x01, 0x69, 0x78, 0x68, 0x80, 0x00, +0xc0, 0x19, 0xc0, 0x6b, 0x01, 0xf0, 0xa2, 0xfa, 0x01, 0x23, 0x78, 0x68, +0x58, 0x40, 0x78, 0x60, 0x60, 0x6b, 0x01, 0x30, 0x80, 0x07, 0x80, 0x0f, +0x60, 0x63, 0xf8, 0x1d, 0x19, 0x30, 0x40, 0x79, 0x00, 0x28, 0x02, 0xd1, +0x38, 0x1c, 0x00, 0xf0, 0x07, 0xf8, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, 0x90, 0xb5, 0x07, 0x1c, +0x39, 0x48, 0xc0, 0x68, 0x00, 0x28, 0x05, 0xd0, 0xb8, 0x6a, 0xc0, 0x68, +0x80, 0x09, 0x01, 0xd3, 0x02, 0x20, 0x00, 0xe0, 0x78, 0x6f, 0xfc, 0xf7, +0x59, 0xf8, 0x04, 0x1c, 0x06, 0xd1, 0x01, 0x20, 0xf9, 0x1d, 0x19, 0x31, +0x08, 0x71, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf8, 0x6c, 0x2f, 0x49, +0xc0, 0x46, 0x08, 0x60, 0xba, 0x6a, 0x38, 0x1c, 0x21, 0x1c, 0x00, 0xf0, +0x59, 0xf8, 0x67, 0x62, 0x00, 0x28, 0x03, 0xd1, 0x20, 0x1c, 0x00, 0xf0, +0x0b, 0xfd, 0xec, 0xe7, 0xf9, 0x6d, 0x09, 0x68, 0x09, 0x18, 0x09, 0x09, +0x09, 0x01, 0x7a, 0x6d, 0x8a, 0x42, 0x00, 0xd8, 0x89, 0x1a, 0xa1, 0x62, +0xb9, 0x68, 0x89, 0x00, 0xc9, 0x19, 0x4a, 0x6c, 0x00, 0x2a, 0x07, 0xd0, +0x4a, 0x6c, 0x12, 0x1a, 0x4a, 0x64, 0x80, 0x08, 0x80, 0x00, 0xb9, 0x6a, +0x08, 0x18, 0xb8, 0x62, 0x38, 0x68, 0xb9, 0x6a, 0x80, 0x00, 0xc0, 0x19, +0x42, 0x6b, 0x91, 0x42, 0x0e, 0xd3, 0x00, 0x21, 0x41, 0x64, 0xb8, 0x6a, +0x39, 0x68, 0x89, 0x00, 0xc9, 0x19, 0x49, 0x6b, 0x40, 0x1a, 0xb8, 0x62, +0xb9, 0x68, 0x89, 0x00, 0xc9, 0x19, 0xc9, 0x6b, 0x40, 0x18, 0xb8, 0x62, +0xb8, 0x68, 0x81, 0x00, 0xc9, 0x19, 0x49, 0x6c, 0x00, 0x29, 0xb8, 0xd1, +0xb9, 0x6a, 0xfa, 0x6b, 0x91, 0x42, 0xb4, 0xd0, 0x3a, 0x6c, 0x91, 0x42, +0xb1, 0xd0, 0x01, 0x23, 0x58, 0x40, 0xb8, 0x60, 0x80, 0x00, 0xc0, 0x19, +0xc0, 0x6b, 0xc0, 0x46, 0xb8, 0x62, 0xf8, 0x68, 0x00, 0x28, 0x01, 0xd0, +0x01, 0x38, 0xf8, 0x60, 0x38, 0x69, 0x00, 0x28, 0xa1, 0xd0, 0x01, 0x38, +0x38, 0x61, 0x9e, 0xe7, 0x68, 0x19, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb0, +0xf7, 0xb5, 0x90, 0xb0, 0x04, 0x1c, 0x0d, 0x1c, 0x00, 0x20, 0x05, 0x90, +0x02, 0x90, 0x00, 0x22, 0x01, 0x92, 0xf9, 0x48, 0xc0, 0x6a, 0xc0, 0x46, +0xa8, 0x61, 0xa0, 0x68, 0x81, 0x00, 0x09, 0x19, 0x49, 0x6b, 0xc0, 0x46, +0x20, 0x60, 0xe1, 0x62, 0x12, 0x9a, 0xd0, 0x68, 0xc0, 0x46, 0xa8, 0x60, +0x12, 0x9a, 0x51, 0x78, 0xc0, 0x46, 0x0c, 0x91, 0xf0, 0x48, 0xc0, 0x46, +0x03, 0x90, 0xd7, 0x1d, 0x09, 0x37, 0xe0, 0x6a, 0xc1, 0x1b, 0x09, 0x09, 0xe3, 0x1d, 0x19, 0x33, 0x0c, 0x9a, 0xc0, 0x46, -0x0f, 0x93, 0xeb, 0x4b, 0xc0, 0x46, 0x0e, 0x93, -0x91, 0x42, 0x01, 0xd3, 0xb8, 0x42, 0x21, 0xd8, 0xe1, 0x68, 0x02, 0x29, -0x1e, 0xd2, 0x01, 0x20, 0x0f, 0x99, 0xc0, 0x46, 0x48, 0x71, 0x00, 0x20, -0x03, 0x99, 0x01, 0xf0, 0x57, 0xfb, 0x00, 0x28, 0x03, 0xd1, 0x0e, 0x9b, -0xd8, 0x6b, 0x01, 0x30, 0xd8, 0x63, 0x01, 0x20, 0x80, 0x06, 0x00, 0x27, -0x68, 0x60, 0xaf, 0x61, 0xdd, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0xdd, 0x48, -0x01, 0x6d, 0x42, 0x6d, 0xdc, 0x4b, 0x00, 0x20, 0x01, 0xf0, 0x3a, 0xfb, -0x38, 0x1c, 0x5c, 0xe3, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, -0x7b, 0xfc, 0x07, 0x1c, 0xd7, 0x48, 0xc0, 0x68, 0x00, 0x28, 0x64, 0xd0, -0x38, 0x78, 0x40, 0x07, 0x40, 0x0f, 0x03, 0x28, 0x60, 0xd1, 0x05, 0x98, -0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x05, 0x90, 0x38, 0x78, 0xf0, 0x23, -0x18, 0x40, 0x58, 0xd1, 0xe0, 0x6a, 0xc0, 0x1b, 0x00, 0x09, 0x0c, 0x99, -0x88, 0x42, 0x02, 0xd2, 0xe0, 0x68, 0x02, 0x28, 0x05, 0xd3, 0xcb, 0x49, -0x88, 0x68, 0x00, 0xf0, 0x83, 0xff, 0x06, 0x1c, 0x06, 0xd1, 0x03, 0x9b, -0x28, 0x1c, 0x39, 0x1c, 0x22, 0x1c, 0x00, 0xf0, 0x8b, 0xfc, 0x16, 0xe1, -0x2e, 0x62, 0xf8, 0x68, 0x00, 0x28, 0x0d, 0xd0, 0xb8, 0x89, 0x00, 0x28, -0x03, 0xd0, 0xc1, 0x49, 0xc9, 0x68, 0x00, 0xf0, 0x70, 0xff, 0xf8, 0x89, -0x00, 0x28, 0x03, 0xd0, 0xbd, 0x49, 0xc9, 0x68, 0x00, 0xf0, 0x69, 0xff, -0x7a, 0x68, 0xc0, 0x46, 0x72, 0x61, 0xb9, 0x68, 0xc0, 0x46, 0xb1, 0x61, -0x30, 0x1c, 0xb8, 0x49, 0x09, 0x68, 0x00, 0xf0, 0x5e, 0xff, 0x00, 0x28, -0x17, 0xd1, 0x30, 0x1c, 0xb4, 0x49, 0x49, 0x68, 0x00, 0xf0, 0x57, 0xff, -0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, -0x27, 0xfc, 0x07, 0x1c, 0x68, 0x68, 0xaf, 0x4b, 0x18, 0x43, 0x68, 0x60, -0x00, 0x20, 0xa8, 0x61, 0xac, 0x23, 0xa8, 0x68, 0x98, 0x43, 0xa8, 0x60, -0xb0, 0xe0, 0xa8, 0x69, 0xa8, 0x28, 0x01, 0xd2, 0xa8, 0x20, 0xa8, 0x61, -0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x6c, 0xd8, 0x9c, 0xe0, 0xa5, 0xe0, -0xa4, 0xe0, 0x10, 0x28, 0x68, 0xd1, 0x03, 0x23, 0x1b, 0x07, 0x68, 0x68, -0x18, 0x40, 0x01, 0x0f, 0x48, 0x01, 0x40, 0x1a, 0x80, 0x00, 0xa0, 0x4a, -0x82, 0x18, 0x01, 0x92, 0x78, 0x88, 0x42, 0x0b, 0x31, 0xd3, 0x82, 0x0b, -0x2f, 0xd3, 0x9d, 0x48, 0xc0, 0x46, 0x03, 0x90, 0x02, 0x20, 0x01, 0x9a, -0xc0, 0x46, 0x10, 0x80, 0x78, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x01, 0x9a, -0xc0, 0x46, 0x50, 0x60, 0xb8, 0x68, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x60, -0x78, 0x68, 0x01, 0x9a, 0xc0, 0x46, 0x10, 0x62, 0x00, 0x20, 0x01, 0x9a, -0xc0, 0x46, 0x90, 0x64, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x63, 0x88, 0x02, -0x8f, 0x49, 0x40, 0x18, 0x01, 0x9a, 0xc0, 0x46, 0x50, 0x63, 0x01, 0x9a, -0x50, 0x68, 0x36, 0x30, 0x94, 0x28, 0x01, 0xd8, 0x38, 0x20, 0x00, 0xe0, -0x94, 0x20, 0xa8, 0x61, 0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x28, 0xd8, -0x58, 0xe0, 0x7a, 0x88, 0x92, 0x0b, 0x03, 0xd3, 0x85, 0x48, 0xc0, 0x46, -0x03, 0x90, 0x23, 0xe0, 0x01, 0x22, 0x12, 0x03, 0x02, 0x40, 0x83, 0x4b, -0x1d, 0xd0, 0x03, 0x93, 0x00, 0x05, 0x00, 0x0d, 0x01, 0x9a, 0xc0, 0x46, -0x50, 0x60, 0xb8, 0x68, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x60, 0x78, 0x68, -0x01, 0x9a, 0xc0, 0x46, 0x10, 0x62, 0x00, 0x20, 0x01, 0x9a, 0xc0, 0x46, +0x0f, 0x93, 0xeb, 0x4b, 0xc0, 0x46, 0x0e, 0x93, 0x91, 0x42, 0x01, 0xd3, +0xb8, 0x42, 0x21, 0xd8, 0xe1, 0x68, 0x02, 0x29, 0x1e, 0xd2, 0x01, 0x20, +0x0f, 0x99, 0xc0, 0x46, 0x48, 0x71, 0x00, 0x20, 0x03, 0x99, 0x01, 0xf0, +0x57, 0xfb, 0x00, 0x28, 0x03, 0xd1, 0x0e, 0x9b, 0xd8, 0x6b, 0x01, 0x30, +0xd8, 0x63, 0x01, 0x20, 0x80, 0x06, 0x00, 0x27, 0x68, 0x60, 0xaf, 0x61, +0xdd, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0xdd, 0x48, 0x01, 0x6d, 0x42, 0x6d, +0xdc, 0x4b, 0x00, 0x20, 0x01, 0xf0, 0x3a, 0xfb, 0x38, 0x1c, 0x5c, 0xe3, +0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0x7b, 0xfc, 0x07, 0x1c, +0xd7, 0x48, 0xc0, 0x68, 0x00, 0x28, 0x64, 0xd0, 0x38, 0x78, 0x40, 0x07, +0x40, 0x0f, 0x03, 0x28, 0x60, 0xd1, 0x05, 0x98, 0x01, 0x30, 0x00, 0x06, +0x00, 0x0e, 0x05, 0x90, 0x38, 0x78, 0xf0, 0x23, 0x18, 0x40, 0x58, 0xd1, +0xe0, 0x6a, 0xc0, 0x1b, 0x00, 0x09, 0x0c, 0x99, 0x88, 0x42, 0x02, 0xd2, +0xe0, 0x68, 0x02, 0x28, 0x05, 0xd3, 0xcb, 0x49, 0x88, 0x68, 0x00, 0xf0, +0x83, 0xff, 0x06, 0x1c, 0x06, 0xd1, 0x03, 0x9b, 0x28, 0x1c, 0x39, 0x1c, +0x22, 0x1c, 0x00, 0xf0, 0x8b, 0xfc, 0x16, 0xe1, 0x2e, 0x62, 0xf8, 0x68, +0x00, 0x28, 0x0d, 0xd0, 0xb8, 0x89, 0x00, 0x28, 0x03, 0xd0, 0xc1, 0x49, +0xc9, 0x68, 0x00, 0xf0, 0x70, 0xff, 0xf8, 0x89, 0x00, 0x28, 0x03, 0xd0, +0xbd, 0x49, 0xc9, 0x68, 0x00, 0xf0, 0x69, 0xff, 0x7a, 0x68, 0xc0, 0x46, +0x72, 0x61, 0xb9, 0x68, 0xc0, 0x46, 0xb1, 0x61, 0x30, 0x1c, 0xb8, 0x49, +0x09, 0x68, 0x00, 0xf0, 0x5e, 0xff, 0x00, 0x28, 0x17, 0xd1, 0x30, 0x1c, +0xb4, 0x49, 0x49, 0x68, 0x00, 0xf0, 0x57, 0xff, 0x10, 0x37, 0xe0, 0x6a, +0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0x27, 0xfc, 0x07, 0x1c, +0x68, 0x68, 0xaf, 0x4b, 0x18, 0x43, 0x68, 0x60, 0x00, 0x20, 0xa8, 0x61, +0xac, 0x23, 0xa8, 0x68, 0x98, 0x43, 0xa8, 0x60, 0xb0, 0xe0, 0xa8, 0x69, +0xa8, 0x28, 0x01, 0xd2, 0xa8, 0x20, 0xa8, 0x61, 0x10, 0x37, 0xe0, 0x6a, +0xb8, 0x42, 0x6c, 0xd8, 0x9c, 0xe0, 0xa5, 0xe0, 0xa4, 0xe0, 0x10, 0x28, +0x68, 0xd1, 0x03, 0x23, 0x1b, 0x07, 0x68, 0x68, 0x18, 0x40, 0x01, 0x0f, +0x48, 0x01, 0x40, 0x1a, 0x80, 0x00, 0xa0, 0x4a, 0x82, 0x18, 0x01, 0x92, +0x78, 0x88, 0x42, 0x0b, 0x31, 0xd3, 0x82, 0x0b, 0x2f, 0xd3, 0x9d, 0x48, +0xc0, 0x46, 0x03, 0x90, 0x02, 0x20, 0x01, 0x9a, 0xc0, 0x46, 0x10, 0x80, +0x78, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x01, 0x9a, 0xc0, 0x46, 0x50, 0x60, +0xb8, 0x68, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x60, 0x78, 0x68, 0x01, 0x9a, +0xc0, 0x46, 0x10, 0x62, 0x00, 0x20, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x64, +0x01, 0x9a, 0xc0, 0x46, 0x90, 0x63, 0x88, 0x02, 0x8f, 0x49, 0x40, 0x18, +0x01, 0x9a, 0xc0, 0x46, 0x50, 0x63, 0x01, 0x9a, 0x50, 0x68, 0x36, 0x30, +0x94, 0x28, 0x01, 0xd8, 0x38, 0x20, 0x00, 0xe0, 0x94, 0x20, 0xa8, 0x61, +0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x28, 0xd8, 0x58, 0xe0, 0x7a, 0x88, +0x92, 0x0b, 0x03, 0xd3, 0x85, 0x48, 0xc0, 0x46, 0x03, 0x90, 0x23, 0xe0, +0x01, 0x22, 0x12, 0x03, 0x02, 0x40, 0x83, 0x4b, 0x1d, 0xd0, 0x03, 0x93, +0x00, 0x05, 0x00, 0x0d, 0x01, 0x9a, 0xc0, 0x46, 0x50, 0x60, 0xb8, 0x68, +0x01, 0x9a, 0xc0, 0x46, 0x90, 0x60, 0x78, 0x68, 0x01, 0x9a, 0xc0, 0x46, +0x10, 0x62, 0x00, 0x20, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x64, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x63, 0x88, 0x02, 0x75, 0x49, -0x40, 0x18, 0x01, 0x9a, 0xc0, 0x46, 0x50, 0x63, -0x02, 0xe0, 0x33, 0xe0, 0x2a, 0xe0, 0x03, 0x93, 0x01, 0x20, 0x0f, 0x99, -0xc0, 0x46, 0x48, 0x71, 0x12, 0x9a, 0x50, 0x78, 0x05, 0x99, 0x43, 0x1a, -0x0b, 0x93, 0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, -0x00, 0xf0, 0x92, 0xfb, 0x07, 0x1c, 0x01, 0x9a, 0x50, 0x6b, 0x91, 0x6b, -0x09, 0x01, 0x40, 0x18, 0x0b, 0x9b, 0x21, 0x1c, 0x3a, 0x1c, 0xff, 0xf7, -0x7d, 0xfb, 0x01, 0x9a, 0xc0, 0x46, 0xd0, 0x64, 0x01, 0x9a, 0x0b, 0x9b, -0xc0, 0x46, 0x13, 0x65, 0x01, 0x23, 0x5b, 0x06, 0x68, 0x68, 0x18, 0x43, -0x68, 0x60, 0x00, 0x20, 0xa8, 0x61, 0x0d, 0xe0, 0x10, 0x37, 0xe0, 0x6a, -0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0x71, 0xfb, 0x07, 0x1c, -0x38, 0x78, 0x40, 0x07, 0x40, 0x0f, 0x03, 0x28, 0x00, 0xd1, 0xf8, 0xe6, -0xa8, 0x69, 0x03, 0x99, 0x01, 0xf0, 0x26, 0xfa, 0x00, 0x28, 0x2a, 0xd1, -0x38, 0x1c, 0x21, 0x1c, 0x00, 0xf0, 0x79, 0xfb, 0xa8, 0x68, 0x80, 0x09, -0x04, 0xd3, 0x30, 0x1c, 0x49, 0x49, 0x49, 0x68, 0x00, 0xf0, 0x81, 0xfe, -0x41, 0x49, 0x00, 0x20, 0x01, 0xf0, 0x14, 0xfa, 0x00, 0x28, 0x04, 0xd1, -0x0e, 0x9b, 0xd8, 0x6b, 0x01, 0x30, 0xd8, 0x63, 0x11, 0xe0, 0x01, 0x20, -0x0f, 0x99, 0xc0, 0x46, 0x48, 0x71, 0x80, 0x06, 0x00, 0x27, 0x68, 0x60, -0xaf, 0x61, 0x3a, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x39, 0x48, 0x01, 0x6d, -0x42, 0x6d, 0x39, 0x4b, 0x00, 0x20, 0x01, 0xf0, 0xf3, 0xf9, 0x00, 0x20, -0x15, 0xe2, 0x05, 0x98, 0x0c, 0x99, 0x08, 0x1a, 0x00, 0x04, 0x00, 0x0c, -0x0c, 0x90, 0x0b, 0x90, 0x0c, 0x98, 0x00, 0x28, 0x03, 0xd0, 0x01, 0x20, -0x0f, 0x99, 0xc0, 0x46, 0x48, 0x71, 0x28, 0x68, 0xc0, 0x46, 0x04, 0x90, -0x00, 0x26, 0x00, 0x20, 0x08, 0x90, 0x00, 0x22, 0x0a, 0x92, 0x0c, 0x98, -0x01, 0x38, 0x0d, 0x90, 0xa3, 0xe0, 0x78, 0x88, 0x8a, 0x1b, 0x12, 0x04, -0x12, 0x0c, 0x90, 0x42, 0x05, 0xdd, 0x07, 0x92, 0x80, 0x1a, 0x00, 0x04, -0x00, 0x0c, 0x08, 0x90, 0x00, 0xe0, 0x07, 0x90, 0x08, 0x98, 0x00, 0x28, -0x07, 0xd1, 0x0d, 0x98, 0x0a, 0x9a, 0x90, 0x42, 0x07, 0xdd, 0x07, 0x98, -0x30, 0x18, 0x88, 0x42, 0x03, 0xd8, 0x01, 0x20, 0x40, 0x05, 0x06, 0x90, -0x1c, 0xe0, 0x11, 0x20, 0x40, 0x05, 0x06, 0x90, 0xa8, 0x68, 0x8c, 0x23, -0x18, 0x40, 0x02, 0xd1, 0x20, 0x48, 0xc0, 0x46, 0x06, 0x90, 0xb1, 0x07, -0x89, 0x0f, 0x0f, 0xd0, 0x07, 0x98, 0xc0, 0x06, 0xc0, 0x0e, 0x08, 0xd0, -0x1e, 0x28, 0x09, 0xdb, 0x1e, 0x28, 0x02, 0xd1, 0x03, 0x29, 0x05, 0xd1, -0x01, 0xe0, 0x02, 0x29, 0x02, 0xd3, 0x01, 0x20, 0x02, 0x90, 0xde, 0xe7, -0x0a, 0x9a, 0x00, 0x2a, 0x04, 0xd1, 0x01, 0x23, 0xdb, 0x05, 0x06, 0x98, -0x18, 0x43, 0x06, 0x90, 0x07, 0x98, 0x06, 0x99, 0x08, 0x43, 0x02, 0x1c, -0x00, 0x90, 0x04, 0x98, 0x83, 0x19, 0x1d, 0xe0, 0xe8, 0x0e, 0x00, 0x80, -0xed, 0x48, 0xff, 0xff, 0x28, 0x0f, 0x00, 0x80, 0x04, 0x00, 0x12, 0x02, -0x7c, 0x29, 0x00, 0x80, 0x44, 0x80, 0x20, 0x40, 0x68, 0x19, 0x00, 0x80, -0x60, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x5c, 0x2b, 0x00, 0x80, -0x41, 0x32, 0xff, 0xff, 0x58, 0x5f, 0x21, 0x40, 0xf9, 0x3c, 0xff, 0xff, -0xb9, 0x31, 0xff, 0xff, 0x00, 0x00, 0x32, 0x02, 0x00, 0x20, 0x3a, 0x1d, -0x06, 0xca, 0x01, 0xf0, 0x6b, 0xf9, 0x07, 0x98, 0x36, 0x18, 0x02, 0x98, +0x40, 0x18, 0x01, 0x9a, 0xc0, 0x46, 0x50, 0x63, 0x02, 0xe0, 0x33, 0xe0, +0x2a, 0xe0, 0x03, 0x93, 0x01, 0x20, 0x0f, 0x99, 0xc0, 0x46, 0x48, 0x71, +0x12, 0x9a, 0x50, 0x78, 0x05, 0x99, 0x43, 0x1a, 0x0b, 0x93, 0x10, 0x37, +0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0x92, 0xfb, +0x07, 0x1c, 0x01, 0x9a, 0x50, 0x6b, 0x91, 0x6b, 0x09, 0x01, 0x40, 0x18, +0x0b, 0x9b, 0x21, 0x1c, 0x3a, 0x1c, 0xff, 0xf7, 0x7d, 0xfb, 0x01, 0x9a, +0xc0, 0x46, 0xd0, 0x64, 0x01, 0x9a, 0x0b, 0x9b, 0xc0, 0x46, 0x13, 0x65, +0x01, 0x23, 0x5b, 0x06, 0x68, 0x68, 0x18, 0x43, 0x68, 0x60, 0x00, 0x20, +0xa8, 0x61, 0x0d, 0xe0, 0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, +0x20, 0x1c, 0x00, 0xf0, 0x71, 0xfb, 0x07, 0x1c, 0x38, 0x78, 0x40, 0x07, +0x40, 0x0f, 0x03, 0x28, 0x00, 0xd1, 0xf8, 0xe6, 0xa8, 0x69, 0x03, 0x99, +0x01, 0xf0, 0x26, 0xfa, 0x00, 0x28, 0x2a, 0xd1, 0x38, 0x1c, 0x21, 0x1c, +0x00, 0xf0, 0x79, 0xfb, 0xa8, 0x68, 0x80, 0x09, 0x04, 0xd3, 0x30, 0x1c, +0x49, 0x49, 0x49, 0x68, 0x00, 0xf0, 0x81, 0xfe, 0x41, 0x49, 0x00, 0x20, +0x01, 0xf0, 0x14, 0xfa, 0x00, 0x28, 0x04, 0xd1, 0x0e, 0x9b, 0xd8, 0x6b, +0x01, 0x30, 0xd8, 0x63, 0x11, 0xe0, 0x01, 0x20, 0x0f, 0x99, 0xc0, 0x46, +0x48, 0x71, 0x80, 0x06, 0x00, 0x27, 0x68, 0x60, 0xaf, 0x61, 0x3a, 0x4a, +0xc0, 0x46, 0x00, 0x92, 0x39, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x39, 0x4b, +0x00, 0x20, 0x01, 0xf0, 0xf3, 0xf9, 0x00, 0x20, 0x15, 0xe2, 0x05, 0x98, +0x0c, 0x99, 0x08, 0x1a, 0x00, 0x04, 0x00, 0x0c, 0x0c, 0x90, 0x0b, 0x90, +0x0c, 0x98, 0x00, 0x28, 0x03, 0xd0, 0x01, 0x20, 0x0f, 0x99, 0xc0, 0x46, +0x48, 0x71, 0x28, 0x68, 0xc0, 0x46, 0x04, 0x90, 0x00, 0x26, 0x00, 0x20, +0x08, 0x90, 0x00, 0x22, 0x0a, 0x92, 0x0c, 0x98, 0x01, 0x38, 0x0d, 0x90, +0xa3, 0xe0, 0x78, 0x88, 0x8a, 0x1b, 0x12, 0x04, 0x12, 0x0c, 0x90, 0x42, +0x05, 0xdd, 0x07, 0x92, 0x80, 0x1a, 0x00, 0x04, 0x00, 0x0c, 0x08, 0x90, +0x00, 0xe0, 0x07, 0x90, 0x08, 0x98, 0x00, 0x28, 0x07, 0xd1, 0x0d, 0x98, +0x0a, 0x9a, 0x90, 0x42, 0x07, 0xdd, 0x07, 0x98, 0x30, 0x18, 0x88, 0x42, +0x03, 0xd8, 0x01, 0x20, 0x40, 0x05, 0x06, 0x90, 0x1c, 0xe0, 0x11, 0x20, +0x40, 0x05, 0x06, 0x90, 0xa8, 0x68, 0x8c, 0x23, 0x18, 0x40, 0x02, 0xd1, +0x20, 0x48, 0xc0, 0x46, 0x06, 0x90, 0xb1, 0x07, 0x89, 0x0f, 0x0f, 0xd0, +0x07, 0x98, 0xc0, 0x06, 0xc0, 0x0e, 0x08, 0xd0, 0x1e, 0x28, 0x09, 0xdb, +0x1e, 0x28, 0x02, 0xd1, 0x03, 0x29, 0x05, 0xd1, 0x01, 0xe0, 0x02, 0x29, +0x02, 0xd3, 0x01, 0x20, 0x02, 0x90, 0xde, 0xe7, 0x0a, 0x9a, 0x00, 0x2a, +0x04, 0xd1, 0x01, 0x23, 0xdb, 0x05, 0x06, 0x98, 0x18, 0x43, 0x06, 0x90, +0x07, 0x98, 0x06, 0x99, 0x08, 0x43, 0x02, 0x1c, 0x00, 0x90, 0x04, 0x98, +0x83, 0x19, 0x1d, 0xe0, 0xe8, 0x0e, 0x00, 0x80, 0x01, 0x49, 0xff, 0xff, +0x28, 0x0f, 0x00, 0x80, 0x04, 0x00, 0x12, 0x02, 0x7c, 0x29, 0x00, 0x80, +0x44, 0x80, 0x20, 0x40, 0x68, 0x19, 0x00, 0x80, 0x60, 0x04, 0x00, 0x80, +0x00, 0x00, 0x00, 0x80, 0x5c, 0x2b, 0x00, 0x80, 0x55, 0x32, 0xff, 0xff, +0xac, 0x5e, 0x21, 0x40, 0x0d, 0x3d, 0xff, 0xff, 0xcd, 0x31, 0xff, 0xff, +0x00, 0x00, 0x32, 0x02, 0x00, 0x20, 0x3a, 0x1d, 0x06, 0xca, 0x01, 0xf0, +0x6b, 0xf9, 0x07, 0x98, 0x36, 0x18, 0x02, 0x98, 0x00, 0x28, 0x16, 0xd0, 0xa8, 0x68, 0x8c, 0x23, 0x18, 0x40, 0x04, 0xd1, -0x09, 0x23, 0x5b, 0x04, 0x06, 0x98, 0x18, 0x43, -0x06, 0x90, 0x06, 0x98, 0xc2, 0x4a, 0x02, 0x43, 0x00, 0x92, 0x04, 0x98, -0x83, 0x19, 0xc1, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x01, 0xf0, -0x51, 0xf9, 0x00, 0x20, 0x02, 0x90, 0x08, 0x98, 0x00, 0x28, 0x0b, 0xd1, -0x0b, 0x9b, 0x01, 0x3b, 0x0b, 0x93, 0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, -0x0c, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0x8a, 0xfa, 0x07, 0x1c, 0x07, 0xe0, -0x78, 0x68, 0x07, 0x9a, 0x80, 0x18, 0x78, 0x60, 0x78, 0x88, 0x07, 0x9a, -0x80, 0x1a, 0x78, 0x80, 0x0a, 0x9a, 0x50, 0x1c, 0x02, 0x04, 0x12, 0x0c, -0x0a, 0x92, 0x0c, 0x98, 0x0a, 0x9a, 0x82, 0x42, 0x03, 0xda, 0xa9, 0x69, -0xb1, 0x42, 0x00, 0xd9, 0x53, 0xe7, 0xa8, 0x69, 0xb0, 0x42, 0x6b, 0xd1, -0xa8, 0x68, 0x01, 0x09, 0x69, 0xd2, 0x08, 0x9a, 0x00, 0x2a, 0x56, 0xd0, -0x0c, 0x99, 0x0a, 0x9a, 0x8a, 0x42, 0x3e, 0xdb, 0xb1, 0x07, 0x89, 0x0f, -0x0c, 0xd0, 0x08, 0x9a, 0xd2, 0x06, 0xd2, 0x0e, 0x0b, 0xd0, 0x1e, 0x2a, -0x06, 0xdb, 0x1e, 0x2a, 0x02, 0xd1, 0x03, 0x29, 0x05, 0xd0, 0x01, 0xe0, -0x02, 0x29, 0x02, 0xd2, 0x02, 0x99, 0x00, 0x29, 0x21, 0xd0, 0x08, 0x9a, +0x09, 0x23, 0x5b, 0x04, 0x06, 0x98, 0x18, 0x43, 0x06, 0x90, 0x06, 0x98, +0xc2, 0x4a, 0x02, 0x43, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, 0xc1, 0x48, +0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x01, 0xf0, 0x51, 0xf9, 0x00, 0x20, +0x02, 0x90, 0x08, 0x98, 0x00, 0x28, 0x0b, 0xd1, 0x0b, 0x9b, 0x01, 0x3b, +0x0b, 0x93, 0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x0c, 0xd8, 0x20, 0x1c, +0x00, 0xf0, 0x8a, 0xfa, 0x07, 0x1c, 0x07, 0xe0, 0x78, 0x68, 0x07, 0x9a, +0x80, 0x18, 0x78, 0x60, 0x78, 0x88, 0x07, 0x9a, 0x80, 0x1a, 0x78, 0x80, +0x0a, 0x9a, 0x50, 0x1c, 0x02, 0x04, 0x12, 0x0c, 0x0a, 0x92, 0x0c, 0x98, +0x0a, 0x9a, 0x82, 0x42, 0x03, 0xda, 0xa9, 0x69, 0xb1, 0x42, 0x00, 0xd9, +0x53, 0xe7, 0xa8, 0x69, 0xb0, 0x42, 0x6b, 0xd1, 0xa8, 0x68, 0x01, 0x09, +0x69, 0xd2, 0x08, 0x9a, 0x00, 0x2a, 0x56, 0xd0, 0x0c, 0x99, 0x0a, 0x9a, +0x8a, 0x42, 0x3e, 0xdb, 0xb1, 0x07, 0x89, 0x0f, 0x0c, 0xd0, 0x08, 0x9a, +0xd2, 0x06, 0xd2, 0x0e, 0x0b, 0xd0, 0x1e, 0x2a, 0x06, 0xdb, 0x1e, 0x2a, +0x02, 0xd1, 0x03, 0x29, 0x05, 0xd0, 0x01, 0xe0, 0x02, 0x29, 0x02, 0xd2, +0x02, 0x99, 0x00, 0x29, 0x21, 0xd0, 0x08, 0x9a, 0xc0, 0x46, 0x00, 0x92, +0x04, 0x98, 0x83, 0x19, 0x00, 0x20, 0x3a, 0x1d, 0x06, 0xca, 0x01, 0xf0, +0x01, 0xf9, 0x08, 0x98, 0x36, 0x18, 0xa8, 0x68, 0x8c, 0x23, 0x18, 0x40, +0x02, 0xd0, 0x01, 0x20, 0x40, 0x06, 0x00, 0xe0, 0x92, 0x48, 0x01, 0x22, +0x02, 0x43, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, 0x8e, 0x48, 0x01, 0x6d, +0x42, 0x6d, 0x00, 0x20, 0x01, 0xf0, 0xec, 0xf8, 0x00, 0x20, 0x02, 0x90, +0x15, 0xe0, 0x8c, 0x23, 0x18, 0x40, 0x02, 0xd0, 0x01, 0x20, 0x40, 0x06, +0x00, 0xe0, 0x88, 0x48, 0x08, 0x9a, 0x02, 0x43, 0x00, 0xe0, 0x08, 0x9a, 0xc0, 0x46, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, 0x00, 0x20, 0x3a, 0x1d, -0x06, 0xca, 0x01, 0xf0, 0x01, 0xf9, 0x08, 0x98, 0x36, 0x18, 0xa8, 0x68, -0x8c, 0x23, 0x18, 0x40, 0x02, 0xd0, 0x01, 0x20, 0x40, 0x06, 0x00, 0xe0, -0x92, 0x48, 0x01, 0x22, 0x02, 0x43, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, -0x8e, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x01, 0xf0, 0xec, 0xf8, -0x00, 0x20, 0x02, 0x90, 0x15, 0xe0, 0x8c, 0x23, 0x18, 0x40, 0x02, 0xd0, -0x01, 0x20, 0x40, 0x06, 0x00, 0xe0, 0x88, 0x48, 0x08, 0x9a, 0x02, 0x43, -0x00, 0xe0, 0x08, 0x9a, 0xc0, 0x46, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, -0x00, 0x20, 0x3a, 0x1d, 0x06, 0xca, 0x01, 0xf0, 0xd5, 0xf8, 0x08, 0x98, -0x36, 0x18, 0x10, 0x37, 0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, -0x00, 0xf0, 0x14, 0xfa, 0x07, 0x1c, 0x68, 0x68, 0x80, 0x0e, 0x6b, 0xd2, -0x0a, 0x98, 0xc0, 0x46, 0x09, 0x90, 0x0c, 0x99, 0x88, 0x42, 0x5c, 0xda, -0x0d, 0x98, 0x09, 0x99, 0x88, 0x42, 0x03, 0xd0, 0x7a, 0x88, 0x1e, 0xe0, -0x5f, 0xe0, 0x5e, 0xe0, 0x78, 0x88, 0x01, 0x22, 0x52, 0x06, 0x02, 0x43, -0xa9, 0x68, 0x8c, 0x23, 0x19, 0x40, 0x02, 0xd1, 0x09, 0x23, 0x5b, 0x04, -0x1a, 0x43, 0xb1, 0x07, 0x89, 0x0f, 0x0e, 0xd0, 0xc3, 0x06, 0xdb, 0x0e, -0x08, 0xd0, 0x1e, 0x2b, 0x09, 0xdb, 0x1e, 0x2b, 0x02, 0xd1, 0x03, 0x29, -0x05, 0xd1, 0x01, 0xe0, 0x02, 0x29, 0x02, 0xd3, 0x01, 0x21, 0x02, 0x91, -0x02, 0x1c, 0x09, 0x98, 0x00, 0x28, 0x02, 0xd1, 0x01, 0x23, 0xdb, 0x05, -0x1a, 0x43, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, 0x00, 0x20, 0x3a, 0x1d, -0x06, 0xca, 0x01, 0xf0, 0x8f, 0xf8, 0x78, 0x88, 0x86, 0x19, 0x10, 0x37, -0x02, 0x98, 0x00, 0x28, 0x14, 0xd0, 0xa8, 0x68, 0x8c, 0x23, 0x18, 0x40, -0x02, 0xd0, 0x01, 0x20, 0x40, 0x06, 0x00, 0xe0, 0x57, 0x48, 0x01, 0x22, -0x02, 0x43, 0x00, 0x92, 0x04, 0x98, 0x83, 0x19, 0x53, 0x48, 0x01, 0x6d, -0x42, 0x6d, 0x00, 0x20, 0x01, 0xf0, 0x76, 0xf8, 0x00, 0x20, 0x02, 0x90, -0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0xb6, 0xf9, -0x07, 0x1c, 0x09, 0x98, 0x01, 0x30, 0x00, 0x04, 0x00, 0x0c, 0x09, 0x90, +0x06, 0xca, 0x01, 0xf0, 0xd5, 0xf8, 0x08, 0x98, 0x36, 0x18, 0x10, 0x37, +0xe0, 0x6a, 0xb8, 0x42, 0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0x14, 0xfa, +0x07, 0x1c, 0x68, 0x68, 0x80, 0x0e, 0x6b, 0xd2, 0x0a, 0x98, 0xc0, 0x46, +0x09, 0x90, 0x0c, 0x99, 0x88, 0x42, 0x5c, 0xda, 0x0d, 0x98, 0x09, 0x99, +0x88, 0x42, 0x03, 0xd0, 0x7a, 0x88, 0x1e, 0xe0, 0x5f, 0xe0, 0x5e, 0xe0, +0x78, 0x88, 0x01, 0x22, 0x52, 0x06, 0x02, 0x43, 0xa9, 0x68, 0x8c, 0x23, +0x19, 0x40, 0x02, 0xd1, 0x09, 0x23, 0x5b, 0x04, 0x1a, 0x43, 0xb1, 0x07, +0x89, 0x0f, 0x0e, 0xd0, 0xc3, 0x06, 0xdb, 0x0e, 0x08, 0xd0, 0x1e, 0x2b, +0x09, 0xdb, 0x1e, 0x2b, 0x02, 0xd1, 0x03, 0x29, 0x05, 0xd1, 0x01, 0xe0, +0x02, 0x29, 0x02, 0xd3, 0x01, 0x21, 0x02, 0x91, 0x02, 0x1c, 0x09, 0x98, +0x00, 0x28, 0x02, 0xd1, 0x01, 0x23, 0xdb, 0x05, 0x1a, 0x43, 0x00, 0x92, +0x04, 0x98, 0x83, 0x19, 0x00, 0x20, 0x3a, 0x1d, 0x06, 0xca, 0x01, 0xf0, +0x8f, 0xf8, 0x78, 0x88, 0x86, 0x19, 0x10, 0x37, 0x02, 0x98, 0x00, 0x28, +0x14, 0xd0, 0xa8, 0x68, 0x8c, 0x23, 0x18, 0x40, 0x02, 0xd0, 0x01, 0x20, +0x40, 0x06, 0x00, 0xe0, 0x57, 0x48, 0x01, 0x22, 0x02, 0x43, 0x00, 0x92, +0x04, 0x98, 0x83, 0x19, 0x53, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, +0x01, 0xf0, 0x76, 0xf8, 0x00, 0x20, 0x02, 0x90, 0xe0, 0x6a, 0xb8, 0x42, +0x03, 0xd8, 0x20, 0x1c, 0x00, 0xf0, 0xb6, 0xf9, 0x07, 0x1c, 0x09, 0x98, +0x01, 0x30, 0x00, 0x04, 0x00, 0x0c, 0x09, 0x90, 0x0c, 0x99, 0x88, 0x42, 0xa2, 0xdb, 0x68, 0x68, 0x30, 0x43, 0x01, 0x04, -0x09, 0x0c, 0x68, 0x60, 0xe8, 0x6a, 0x00, 0xf0, -0x7b, 0xfa, 0x28, 0xe0, 0x27, 0xe0, 0xa8, 0x68, 0x00, 0x09, 0x14, 0xd3, -0x68, 0x68, 0x80, 0x0e, 0x15, 0xd2, 0x01, 0x9a, 0x00, 0x2a, 0x12, 0xd0, -0x01, 0x9a, 0x50, 0x6b, 0x0b, 0x9b, 0x21, 0x1c, 0x3a, 0x1c, 0xff, 0xf7, -0x89, 0xf9, 0x01, 0x9a, 0xc0, 0x46, 0x90, 0x64, 0x01, 0x9a, 0x0b, 0x9b, -0xc0, 0x46, 0x93, 0x63, 0x03, 0xe0, 0xe8, 0x6a, 0x31, 0x1c, 0x00, 0xf0, -0x5d, 0xfa, 0x68, 0x68, 0x30, 0x43, 0x68, 0x60, 0xa8, 0x69, 0xb0, 0x42, -0x05, 0xd9, 0x00, 0x04, 0x00, 0x0c, 0x80, 0x1b, 0x00, 0xf0, 0xee, 0xf9, -0xae, 0x61, 0xa8, 0x68, 0x8c, 0x23, 0x18, 0x40, 0x0b, 0xd0, 0x2f, 0x4a, -0xc0, 0x46, 0x00, 0x92, 0x04, 0x98, 0xc3, 0x1f, 0x05, 0x3b, 0x2a, 0x48, -0x01, 0x6d, 0x42, 0x6d, 0x00, 0x20, 0x01, 0xf0, 0x23, 0xf8, 0x01, 0x23, -0x9b, 0x07, 0x20, 0x6d, 0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, 0xa0, 0x61, -0xe1, 0x69, 0x81, 0x42, 0x12, 0xd0, 0x22, 0x69, 0x02, 0x2a, 0x0f, 0xd2, -0x41, 0x1a, 0x01, 0xd5, 0x60, 0x6d, 0x41, 0x18, 0x20, 0x1c, 0xff, 0xf7, -0x3f, 0xfb, 0xe1, 0x69, 0x40, 0x18, 0xe0, 0x61, 0x61, 0x6d, 0x88, 0x42, -0x24, 0xd3, 0x40, 0x1a, 0xe0, 0x61, 0x21, 0xe0, 0x81, 0x42, 0x1f, 0xd1, -0x20, 0x69, 0x02, 0x28, 0x1c, 0xd2, 0x01, 0x20, 0x60, 0x61, 0x18, 0x48, -0x41, 0x69, 0xe2, 0x6c, 0x0a, 0x43, 0x42, 0x61, 0x81, 0x69, 0xe3, 0x6c, -0x99, 0x43, 0x81, 0x61, 0x01, 0x21, 0x09, 0x05, 0xca, 0x60, 0x80, 0x69, -0xc0, 0x46, 0x08, 0x61, 0x8b, 0x02, 0x20, 0x6d, 0x18, 0x43, 0x00, 0x68, -0xc0, 0x46, 0xa0, 0x61, 0xe1, 0x69, 0x81, 0x42, 0x02, 0xd0, 0x20, 0x1c, -0xff, 0xf7, 0xcc, 0xfa, 0x28, 0x1c, 0x00, 0xf0, 0x0f, 0xf9, 0x0c, 0x98, -0x05, 0x99, 0x40, 0x18, 0x00, 0x01, 0x10, 0x30, 0x68, 0x61, 0x13, 0xb0, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, -0x7c, 0x29, 0x00, 0x80, 0x00, 0x00, 0x12, 0x02, 0x04, 0x00, 0x52, 0x02, -0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb5, 0x40, 0x20, 0x2d, 0x49, 0xc0, 0x46, -0x08, 0x60, 0x00, 0xf0, 0x03, 0xf9, 0x07, 0x1c, 0x81, 0x69, 0x44, 0x6a, -0xa0, 0x6f, 0x00, 0xf0, 0x45, 0xfe, 0x00, 0x20, 0xe1, 0x1d, 0x19, 0x31, -0x48, 0x71, 0x79, 0x68, 0xc9, 0x0e, 0x09, 0xd3, 0xf8, 0x6a, 0x00, 0x01, -0x24, 0x49, 0x40, 0x18, 0x24, 0x4b, 0xc0, 0x18, 0x01, 0x68, 0x01, 0x39, -0x01, 0x60, 0x36, 0xe0, 0xe1, 0x6d, 0x09, 0x68, 0x22, 0x6e, 0xc0, 0x46, -0x11, 0x60, 0x20, 0x4e, 0xf5, 0x1d, 0x79, 0x35, 0x01, 0x23, 0xe9, 0x6b, -0x19, 0x43, 0xe9, 0x63, 0xb9, 0x6a, 0xe2, 0x6d, 0xc0, 0x46, 0x11, 0x60, -0xb9, 0x6a, 0x22, 0x6e, 0xc0, 0x46, 0x11, 0x60, 0x61, 0x69, 0x00, 0x29, -0x04, 0xd1, 0xa9, 0x6b, 0x01, 0x31, 0xa9, 0x63, 0x08, 0x29, 0x07, 0xd3, -0xa8, 0x63, 0x01, 0x20, 0x00, 0xf0, 0x86, 0xf8, 0xe8, 0x6b, 0x40, 0x08, -0x40, 0x00, 0xe8, 0x63, 0x78, 0x68, 0x81, 0x0e, 0x0f, 0xd2, 0x0b, 0x23, -0x1b, 0x02, 0xf1, 0x18, 0xc9, 0x68, 0x00, 0x29, 0x06, 0xd0, 0x00, 0x08, -0x04, 0xd2, 0x20, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x43, 0xf8, 0x02, 0xe0, -0x38, 0x1c, 0x00, 0xf0, 0x05, 0xfa, 0x38, 0x1c, 0xfb, 0xf7, 0x10, 0xfc, -0x20, 0x1c, 0x00, 0xf0, 0x0b, 0xf8, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x00, 0x00, 0x00, 0xb0, 0xa0, 0x1c, 0x00, 0x80, 0xb4, 0x0c, 0x00, 0x00, +0x09, 0x0c, 0x68, 0x60, 0xe8, 0x6a, 0x00, 0xf0, 0x7b, 0xfa, 0x28, 0xe0, +0x27, 0xe0, 0xa8, 0x68, 0x00, 0x09, 0x14, 0xd3, 0x68, 0x68, 0x80, 0x0e, +0x15, 0xd2, 0x01, 0x9a, 0x00, 0x2a, 0x12, 0xd0, 0x01, 0x9a, 0x50, 0x6b, +0x0b, 0x9b, 0x21, 0x1c, 0x3a, 0x1c, 0xff, 0xf7, 0x89, 0xf9, 0x01, 0x9a, +0xc0, 0x46, 0x90, 0x64, 0x01, 0x9a, 0x0b, 0x9b, 0xc0, 0x46, 0x93, 0x63, +0x03, 0xe0, 0xe8, 0x6a, 0x31, 0x1c, 0x00, 0xf0, 0x5d, 0xfa, 0x68, 0x68, +0x30, 0x43, 0x68, 0x60, 0xa8, 0x69, 0xb0, 0x42, 0x05, 0xd9, 0x00, 0x04, +0x00, 0x0c, 0x80, 0x1b, 0x00, 0xf0, 0xee, 0xf9, 0xae, 0x61, 0xa8, 0x68, +0x8c, 0x23, 0x18, 0x40, 0x0b, 0xd0, 0x2f, 0x4a, 0xc0, 0x46, 0x00, 0x92, +0x04, 0x98, 0xc3, 0x1f, 0x05, 0x3b, 0x2a, 0x48, 0x01, 0x6d, 0x42, 0x6d, +0x00, 0x20, 0x01, 0xf0, 0x23, 0xf8, 0x01, 0x23, 0x9b, 0x07, 0x20, 0x6d, +0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, 0xa0, 0x61, 0xe1, 0x69, 0x81, 0x42, +0x12, 0xd0, 0x22, 0x69, 0x02, 0x2a, 0x0f, 0xd2, 0x41, 0x1a, 0x01, 0xd5, +0x60, 0x6d, 0x41, 0x18, 0x20, 0x1c, 0xff, 0xf7, 0x3f, 0xfb, 0xe1, 0x69, +0x40, 0x18, 0xe0, 0x61, 0x61, 0x6d, 0x88, 0x42, 0x24, 0xd3, 0x40, 0x1a, +0xe0, 0x61, 0x21, 0xe0, 0x81, 0x42, 0x1f, 0xd1, 0x20, 0x69, 0x02, 0x28, +0x1c, 0xd2, 0x01, 0x20, 0x60, 0x61, 0x18, 0x48, 0x41, 0x69, 0xe2, 0x6c, +0x0a, 0x43, 0x42, 0x61, 0x81, 0x69, 0xe3, 0x6c, 0x99, 0x43, 0x81, 0x61, +0x01, 0x21, 0x09, 0x05, 0xca, 0x60, 0x80, 0x69, 0xc0, 0x46, 0x08, 0x61, +0x8b, 0x02, 0x20, 0x6d, 0x18, 0x43, 0x00, 0x68, 0xc0, 0x46, 0xa0, 0x61, +0xe1, 0x69, 0x81, 0x42, 0x02, 0xd0, 0x20, 0x1c, 0xff, 0xf7, 0xcc, 0xfa, +0x28, 0x1c, 0x00, 0xf0, 0x0f, 0xf9, 0x0c, 0x98, 0x05, 0x99, 0x40, 0x18, +0x00, 0x01, 0x10, 0x30, 0x68, 0x61, 0x13, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x7c, 0x29, 0x00, 0x80, +0x00, 0x00, 0x12, 0x02, 0x04, 0x00, 0x52, 0x02, 0x68, 0x0e, 0x00, 0x80, +0xf0, 0xb5, 0x40, 0x20, 0x2d, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x00, 0xf0, +0x03, 0xf9, 0x07, 0x1c, 0x81, 0x69, 0x44, 0x6a, 0xa0, 0x6f, 0x00, 0xf0, +0x45, 0xfe, 0x00, 0x20, 0xe1, 0x1d, 0x19, 0x31, 0x48, 0x71, 0x79, 0x68, +0xc9, 0x0e, 0x09, 0xd3, 0xf8, 0x6a, 0x00, 0x01, 0x24, 0x49, 0x40, 0x18, +0x24, 0x4b, 0xc0, 0x18, 0x01, 0x68, 0x01, 0x39, 0x01, 0x60, 0x36, 0xe0, +0xe1, 0x6d, 0x09, 0x68, 0x22, 0x6e, 0xc0, 0x46, 0x11, 0x60, 0x20, 0x4e, +0xf5, 0x1d, 0x79, 0x35, 0x01, 0x23, 0xe9, 0x6b, 0x19, 0x43, 0xe9, 0x63, +0xb9, 0x6a, 0xe2, 0x6d, 0xc0, 0x46, 0x11, 0x60, 0xb9, 0x6a, 0x22, 0x6e, +0xc0, 0x46, 0x11, 0x60, 0x61, 0x69, 0x00, 0x29, 0x04, 0xd1, 0xa9, 0x6b, +0x01, 0x31, 0xa9, 0x63, 0x08, 0x29, 0x07, 0xd3, 0xa8, 0x63, 0x01, 0x20, +0x00, 0xf0, 0x86, 0xf8, 0xe8, 0x6b, 0x40, 0x08, 0x40, 0x00, 0xe8, 0x63, +0x78, 0x68, 0x81, 0x0e, 0x0f, 0xd2, 0x0b, 0x23, 0x1b, 0x02, 0xf1, 0x18, +0xc9, 0x68, 0x00, 0x29, 0x06, 0xd0, 0x00, 0x08, 0x04, 0xd2, 0x20, 0x1c, +0x39, 0x1c, 0x00, 0xf0, 0x43, 0xf8, 0x02, 0xe0, 0x38, 0x1c, 0x00, 0xf0, +0x05, 0xfa, 0x38, 0x1c, 0xfb, 0xf7, 0x06, 0xfc, 0x20, 0x1c, 0x00, 0xf0, +0x0b, 0xf8, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0xb0, +0xa0, 0x1c, 0x00, 0x80, 0xb4, 0x0c, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x07, 0x1c, 0xf8, 0x1d, 0x19, 0x30, -0x01, 0x79, 0x00, 0x29, 0x04, 0xd0, 0x00, 0x21, -0x01, 0x71, 0x38, 0x1c, 0xff, 0xf7, 0x56, 0xfb, 0xf8, 0x68, 0x02, 0x28, -0x0d, 0xd0, 0xb8, 0x68, 0x80, 0x00, 0xc2, 0x19, 0x50, 0x6c, 0x00, 0x28, -0x11, 0xd0, 0xb8, 0x6a, 0x41, 0x78, 0x09, 0x01, 0x10, 0x31, 0x52, 0x6b, -0x10, 0x1a, 0x88, 0x42, 0x05, 0xd3, 0x38, 0x1c, 0xff, 0xf7, 0x42, 0xfb, -0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x38, 0x1c, 0xff, 0xf7, 0x28, 0xfa, -0xf8, 0xe7, 0x78, 0x68, 0x80, 0x00, 0xc0, 0x19, 0xc0, 0x6b, 0xc0, 0x46, -0xb8, 0x62, 0xf1, 0xe7, 0xb0, 0xb5, 0x87, 0xb0, 0x0f, 0x1c, 0x80, 0x6f, -0xc0, 0x46, 0x00, 0x90, 0x00, 0x24, 0x13, 0x4d, 0x0b, 0x23, 0x1b, 0x02, -0xe8, 0x18, 0x80, 0x69, 0x00, 0x28, 0x17, 0xd0, 0x69, 0x46, 0xa2, 0x00, -0x52, 0x19, 0x0b, 0x23, 0x1b, 0x02, 0xd2, 0x18, 0x92, 0x69, 0x38, 0x1c, -0x00, 0xf0, 0x92, 0xfb, 0x00, 0x28, 0x09, 0xd1, 0x01, 0x34, 0xa0, 0x00, -0x40, 0x19, 0x0b, 0x23, 0x1b, 0x02, 0xc0, 0x18, 0x80, 0x69, 0x00, 0x28, -0xea, 0xd1, 0x01, 0xe0, 0x01, 0x28, 0x02, 0xd0, 0x38, 0x1c, 0x00, 0xf0, -0x9d, 0xf9, 0x07, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0xb8, 0xb5, 0xc2, 0x07, 0xd2, 0x0f, 0x16, 0x4c, -0x16, 0x49, 0x01, 0xd0, 0x08, 0x22, 0x08, 0xe0, 0x82, 0x08, 0x05, 0xd3, -0x0c, 0x22, 0xa4, 0x18, 0x0b, 0x68, 0xdf, 0x1d, 0x15, 0x37, 0x03, 0xe0, -0x1c, 0x22, 0x0b, 0x68, 0xdf, 0x1d, 0x09, 0x37, 0x0f, 0x4b, 0x1d, 0x78, -0x00, 0x2d, 0x13, 0xd0, 0x5b, 0x78, 0x00, 0x2b, 0x10, 0xd0, 0x01, 0x23, -0x5b, 0x06, 0x1a, 0x43, 0x00, 0x28, 0x01, 0xd1, 0x5b, 0x08, 0x1a, 0x43, -0x00, 0x92, 0x4a, 0x68, 0x01, 0x20, 0x39, 0x1c, 0x23, 0x1c, 0x00, 0xf0, -0xdf, 0xfe, 0xb8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x03, 0x23, 0x1b, 0x06, -0x1a, 0x43, 0xf1, 0xe7, 0x3c, 0xef, 0x20, 0x40, 0x7c, 0x29, 0x00, 0x80, -0xf8, 0x0e, 0x00, 0x80, 0x00, 0x21, 0xc1, 0x61, 0x05, 0x49, 0x8a, 0x68, -0x00, 0x2a, 0x01, 0xd1, 0x88, 0x60, 0x02, 0xe0, 0xca, 0x68, 0xc0, 0x46, -0xd0, 0x61, 0xc8, 0x60, 0x70, 0x47, 0x00, 0x00, 0x28, 0x0f, 0x00, 0x80, -0x03, 0x49, 0x88, 0x68, 0x00, 0x28, 0x02, 0xd0, 0xc2, 0x69, 0xc0, 0x46, -0x8a, 0x60, 0x70, 0x47, 0x28, 0x0f, 0x00, 0x80, 0x01, 0x1c, 0x01, 0x23, -0x88, 0x68, 0x58, 0x40, 0x88, 0x60, 0xca, 0x68, 0x01, 0x3a, 0xca, 0x60, -0x0a, 0x69, 0x01, 0x3a, 0x80, 0x00, 0x0a, 0x61, 0x42, 0x18, 0xd0, 0x6b, -0x53, 0x6b, 0xc0, 0x46, 0xcb, 0x62, 0x0b, 0x68, 0x9b, 0x00, 0x59, 0x18, -0x49, 0x6c, 0x53, 0x6c, 0xc9, 0x18, 0x51, 0x64, 0x70, 0x47, 0x8a, 0x68, -0x92, 0x00, 0x52, 0x18, 0xd3, 0x6b, 0x83, 0x42, 0x17, 0xd1, 0xd0, 0x1d, -0x3d, 0x30, 0x0a, 0x68, 0x92, 0x00, 0x52, 0x18, 0x52, 0x6c, 0x03, 0x68, -0x9a, 0x1a, 0x02, 0x60, 0x01, 0x23, 0x88, 0x68, 0x58, 0x40, 0x88, 0x60, -0xca, 0x68, 0x01, 0x32, 0xca, 0x60, 0x0a, 0x69, 0x01, 0x32, 0x80, 0x00, -0x40, 0x18, 0x0a, 0x61, 0x40, 0x6b, 0xc0, 0x46, 0xc8, 0x62, 0x70, 0x47, -0xb8, 0xb5, 0x04, 0x1c, 0x1d, 0x1c, 0x17, 0x1c, 0x08, 0x1c, 0x39, 0x1c, -0xff, 0xf7, 0xd9, 0xff, 0x00, 0x20, 0x29, 0x1c, 0x00, 0xf0, 0x7c, 0xfe, -0x01, 0x20, 0xf9, 0x1d, 0x19, 0x31, 0x48, 0x71, 0x80, 0x06, 0x60, 0x60, -0x00, 0x20, 0xa0, 0x61, 0x06, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x06, 0x48, +0x01, 0x79, 0x00, 0x29, 0x04, 0xd0, 0x00, 0x21, 0x01, 0x71, 0x38, 0x1c, +0xff, 0xf7, 0x56, 0xfb, 0xf8, 0x68, 0x02, 0x28, 0x0d, 0xd0, 0xb8, 0x68, +0x80, 0x00, 0xc2, 0x19, 0x50, 0x6c, 0x00, 0x28, 0x11, 0xd0, 0xb8, 0x6a, +0x41, 0x78, 0x09, 0x01, 0x10, 0x31, 0x52, 0x6b, 0x10, 0x1a, 0x88, 0x42, +0x05, 0xd3, 0x38, 0x1c, 0xff, 0xf7, 0x42, 0xfb, 0x80, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x38, 0x1c, 0xff, 0xf7, 0x28, 0xfa, 0xf8, 0xe7, 0x78, 0x68, +0x80, 0x00, 0xc0, 0x19, 0xc0, 0x6b, 0xc0, 0x46, 0xb8, 0x62, 0xf1, 0xe7, +0xb0, 0xb5, 0x87, 0xb0, 0x0f, 0x1c, 0x80, 0x6f, 0xc0, 0x46, 0x00, 0x90, +0x00, 0x24, 0x13, 0x4d, 0x0b, 0x23, 0x1b, 0x02, 0xe8, 0x18, 0x80, 0x69, +0x00, 0x28, 0x17, 0xd0, 0x69, 0x46, 0xa2, 0x00, 0x52, 0x19, 0x0b, 0x23, +0x1b, 0x02, 0xd2, 0x18, 0x92, 0x69, 0x38, 0x1c, 0x00, 0xf0, 0x92, 0xfb, +0x00, 0x28, 0x09, 0xd1, 0x01, 0x34, 0xa0, 0x00, 0x40, 0x19, 0x0b, 0x23, +0x1b, 0x02, 0xc0, 0x18, 0x80, 0x69, 0x00, 0x28, 0xea, 0xd1, 0x01, 0xe0, +0x01, 0x28, 0x02, 0xd0, 0x38, 0x1c, 0x00, 0xf0, 0x9d, 0xf9, 0x07, 0xb0, +0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, +0xb8, 0xb5, 0xc2, 0x07, 0xd2, 0x0f, 0x16, 0x4c, 0x16, 0x49, 0x01, 0xd0, +0x08, 0x22, 0x08, 0xe0, 0x82, 0x08, 0x05, 0xd3, 0x0c, 0x22, 0xa4, 0x18, +0x0b, 0x68, 0xdf, 0x1d, 0x15, 0x37, 0x03, 0xe0, 0x1c, 0x22, 0x0b, 0x68, +0xdf, 0x1d, 0x09, 0x37, 0x0f, 0x4b, 0x1d, 0x78, 0x00, 0x2d, 0x13, 0xd0, +0x5b, 0x78, 0x00, 0x2b, 0x10, 0xd0, 0x01, 0x23, 0x5b, 0x06, 0x1a, 0x43, +0x00, 0x28, 0x01, 0xd1, 0x5b, 0x08, 0x1a, 0x43, 0x00, 0x92, 0x4a, 0x68, +0x01, 0x20, 0x39, 0x1c, 0x23, 0x1c, 0x00, 0xf0, 0xdf, 0xfe, 0xb8, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x03, 0x23, 0x1b, 0x06, 0x1a, 0x43, 0xf1, 0xe7, +0x90, 0xee, 0x20, 0x40, 0x7c, 0x29, 0x00, 0x80, 0xf8, 0x0e, 0x00, 0x80, +0x00, 0x21, 0xc1, 0x61, 0x05, 0x49, 0x8a, 0x68, 0x00, 0x2a, 0x01, 0xd1, +0x88, 0x60, 0x02, 0xe0, 0xca, 0x68, 0xc0, 0x46, 0xd0, 0x61, 0xc8, 0x60, +0x70, 0x47, 0x00, 0x00, 0x28, 0x0f, 0x00, 0x80, 0x03, 0x49, 0x88, 0x68, +0x00, 0x28, 0x02, 0xd0, 0xc2, 0x69, 0xc0, 0x46, 0x8a, 0x60, 0x70, 0x47, +0x28, 0x0f, 0x00, 0x80, 0x01, 0x1c, 0x01, 0x23, 0x88, 0x68, 0x58, 0x40, +0x88, 0x60, 0xca, 0x68, 0x01, 0x3a, 0xca, 0x60, 0x0a, 0x69, 0x01, 0x3a, +0x80, 0x00, 0x0a, 0x61, 0x42, 0x18, 0xd0, 0x6b, 0x53, 0x6b, 0xc0, 0x46, +0xcb, 0x62, 0x0b, 0x68, 0x9b, 0x00, 0x59, 0x18, 0x49, 0x6c, 0x53, 0x6c, +0xc9, 0x18, 0x51, 0x64, 0x70, 0x47, 0x8a, 0x68, 0x92, 0x00, 0x52, 0x18, +0xd3, 0x6b, 0x83, 0x42, 0x17, 0xd1, 0xd0, 0x1d, 0x3d, 0x30, 0x0a, 0x68, +0x92, 0x00, 0x52, 0x18, 0x52, 0x6c, 0x03, 0x68, 0x9a, 0x1a, 0x02, 0x60, +0x01, 0x23, 0x88, 0x68, 0x58, 0x40, 0x88, 0x60, 0xca, 0x68, 0x01, 0x32, +0xca, 0x60, 0x0a, 0x69, 0x01, 0x32, 0x80, 0x00, 0x40, 0x18, 0x0a, 0x61, +0x40, 0x6b, 0xc0, 0x46, 0xc8, 0x62, 0x70, 0x47, 0xb8, 0xb5, 0x04, 0x1c, +0x1d, 0x1c, 0x17, 0x1c, 0x08, 0x1c, 0x39, 0x1c, 0xff, 0xf7, 0xd9, 0xff, +0x00, 0x20, 0x29, 0x1c, 0x00, 0xf0, 0x7c, 0xfe, 0x01, 0x20, 0xf9, 0x1d, +0x19, 0x31, 0x48, 0x71, 0x80, 0x06, 0x60, 0x60, 0x00, 0x20, 0xa0, 0x61, +0x06, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x06, 0x48, 0x01, 0x6d, 0x42, 0x6d, 0x05, 0x4b, 0x00, 0x20, 0x00, 0xf0, 0x62, 0xfe, -0xb8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x04, 0x00, 0x12, 0x02, 0x7c, 0x29, 0x00, 0x80, 0x44, 0x80, 0x20, 0x40, +0xb8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x04, 0x00, 0x12, 0x02, +0x7c, 0x29, 0x00, 0x80, 0x44, 0x80, 0x20, 0x40, 0x06, 0x49, 0x0a, 0x68, +0x10, 0x18, 0x08, 0x60, 0x01, 0x23, 0x5b, 0x02, 0x98, 0x42, 0x03, 0xd9, +0x03, 0x49, 0x0a, 0x79, 0x01, 0x32, 0x0a, 0x71, 0x70, 0x47, 0x00, 0x00, +0xe4, 0x2d, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, 0x80, 0x08, 0x80, 0x00, 0x06, 0x49, 0x0a, 0x68, 0x10, 0x18, 0x08, 0x60, 0x01, 0x23, 0x5b, 0x02, 0x98, 0x42, 0x03, 0xd9, 0x03, 0x49, 0x0a, 0x79, 0x01, 0x32, 0x0a, 0x71, 0x70, 0x47, 0x00, 0x00, 0xe4, 0x2d, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, -0x80, 0x08, 0x80, 0x00, 0x06, 0x49, 0x0a, 0x68, 0x10, 0x18, 0x08, 0x60, -0x01, 0x23, 0x5b, 0x02, 0x98, 0x42, 0x03, 0xd9, 0x03, 0x49, 0x0a, 0x79, -0x01, 0x32, 0x0a, 0x71, 0x70, 0x47, 0x00, 0x00, 0xe4, 0x2d, 0x00, 0x80, -0xa0, 0x82, 0x20, 0x40, 0x03, 0x30, 0x80, 0x08, 0x80, 0x00, 0x06, 0x49, -0x0a, 0x68, 0x10, 0x18, 0x08, 0x60, 0x01, 0x23, 0x5b, 0x02, 0x98, 0x42, -0x03, 0xd9, 0x03, 0x49, 0x0a, 0x79, 0x01, 0x32, 0x0a, 0x71, 0x70, 0x47, -0xe4, 0x2d, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, 0x02, 0x48, 0x41, 0x79, -0x01, 0x31, 0x41, 0x71, 0x70, 0x47, 0x00, 0x00, 0xa0, 0x82, 0x20, 0x40, -0x90, 0xb4, 0x82, 0x00, 0x17, 0x4b, 0x9a, 0x58, 0x8b, 0x07, 0x02, 0xd0, -0x89, 0x08, 0x0b, 0x1d, 0x01, 0xe0, 0x89, 0x08, 0xcb, 0x1c, 0x11, 0x69, -0xd7, 0x68, 0x12, 0x4c, 0x80, 0x00, 0x20, 0x58, 0x40, 0x68, 0xb9, 0x42, -0x03, 0xd1, 0x81, 0x42, 0x19, 0xd9, 0x11, 0x68, 0x17, 0xe0, 0x00, 0x24, -0xb9, 0x42, 0x09, 0xd9, 0x81, 0x42, 0x12, 0xd9, 0x11, 0x68, 0x78, 0x1a, -0x00, 0xd5, 0x03, 0x30, 0x80, 0x10, 0x98, 0x42, 0x0b, 0xd8, 0x07, 0xe0, -0x81, 0x42, 0x05, 0xd8, 0x78, 0x1a, 0x00, 0xd5, 0x03, 0x30, 0x80, 0x10, -0x98, 0x42, 0x02, 0xd8, 0x20, 0x1c, 0x90, 0xbc, 0x70, 0x47, 0xc8, 0x1d, -0x05, 0x30, 0xfa, 0xe7, 0x70, 0x04, 0x00, 0x80, 0x80, 0xb5, 0x80, 0x00, -0x0f, 0x4a, 0x17, 0x58, 0x88, 0x07, 0x02, 0xd0, 0x88, 0x08, 0x04, 0x30, -0x01, 0xe0, 0x88, 0x08, 0x03, 0x30, 0x39, 0x69, 0x7a, 0x68, 0x91, 0x42, -0x09, 0xd9, 0x39, 0x68, 0xc0, 0x46, 0x39, 0x61, 0xf9, 0x68, 0x7a, 0x68, +0x03, 0x30, 0x80, 0x08, 0x80, 0x00, 0x06, 0x49, 0x0a, 0x68, 0x10, 0x18, +0x08, 0x60, 0x01, 0x23, 0x5b, 0x02, 0x98, 0x42, 0x03, 0xd9, 0x03, 0x49, +0x0a, 0x79, 0x01, 0x32, 0x0a, 0x71, 0x70, 0x47, 0xe4, 0x2d, 0x00, 0x80, +0xa0, 0x82, 0x20, 0x40, 0x02, 0x48, 0x41, 0x79, 0x01, 0x31, 0x41, 0x71, +0x70, 0x47, 0x00, 0x00, 0xa0, 0x82, 0x20, 0x40, 0x90, 0xb4, 0x82, 0x00, +0x17, 0x4b, 0x9a, 0x58, 0x8b, 0x07, 0x02, 0xd0, 0x89, 0x08, 0x0b, 0x1d, +0x01, 0xe0, 0x89, 0x08, 0xcb, 0x1c, 0x11, 0x69, 0xd7, 0x68, 0x12, 0x4c, +0x80, 0x00, 0x20, 0x58, 0x40, 0x68, 0xb9, 0x42, 0x03, 0xd1, 0x81, 0x42, +0x19, 0xd9, 0x11, 0x68, 0x17, 0xe0, 0x00, 0x24, 0xb9, 0x42, 0x09, 0xd9, +0x81, 0x42, 0x12, 0xd9, 0x11, 0x68, 0x78, 0x1a, 0x00, 0xd5, 0x03, 0x30, +0x80, 0x10, 0x98, 0x42, 0x0b, 0xd8, 0x07, 0xe0, 0x81, 0x42, 0x05, 0xd8, +0x78, 0x1a, 0x00, 0xd5, 0x03, 0x30, 0x80, 0x10, 0x98, 0x42, 0x02, 0xd8, +0x20, 0x1c, 0x90, 0xbc, 0x70, 0x47, 0xc8, 0x1d, 0x05, 0x30, 0xfa, 0xe7, +0x70, 0x04, 0x00, 0x80, 0x80, 0xb5, 0x80, 0x00, 0x0f, 0x4a, 0x17, 0x58, +0x88, 0x07, 0x02, 0xd0, 0x88, 0x08, 0x04, 0x30, 0x01, 0xe0, 0x88, 0x08, +0x03, 0x30, 0x39, 0x69, 0x7a, 0x68, 0x91, 0x42, 0x09, 0xd9, 0x39, 0x68, +0xc0, 0x46, 0x39, 0x61, 0xf9, 0x68, 0x7a, 0x68, 0x91, 0x42, 0x02, 0xd9, +0x39, 0x68, 0xc0, 0x46, 0xf9, 0x60, 0x81, 0x00, 0x38, 0x69, 0x00, 0xf0, +0xd1, 0xfd, 0x38, 0x61, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x70, 0x04, 0x00, 0x80, 0x90, 0xb5, 0x03, 0x21, 0x09, 0x07, 0x01, 0x40, +0x0c, 0x0f, 0x01, 0x04, 0x09, 0x0c, 0x01, 0x22, 0x92, 0x07, 0x02, 0x40, +0xa3, 0x00, 0x1c, 0x4f, 0xff, 0x58, 0x89, 0x07, 0x89, 0x0f, 0x00, 0x04, +0x00, 0x0c, 0x80, 0x08, 0x00, 0x29, 0x00, 0xd0, 0x01, 0x30, 0x00, 0x2a, +0x01, 0xd0, 0x02, 0x30, 0x00, 0xe0, 0x03, 0x30, 0xf9, 0x68, 0x7a, 0x68, 0x91, 0x42, 0x02, 0xd9, 0x39, 0x68, 0xc0, 0x46, 0xf9, 0x60, 0x81, 0x00, -0x38, 0x69, 0x00, 0xf0, 0xd1, 0xfd, 0x38, 0x61, 0x80, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x70, 0x04, 0x00, 0x80, 0x90, 0xb5, 0x03, 0x21, -0x09, 0x07, 0x01, 0x40, 0x0c, 0x0f, 0x01, 0x04, 0x09, 0x0c, 0x01, 0x22, -0x92, 0x07, 0x02, 0x40, 0xa3, 0x00, 0x1c, 0x4f, 0xff, 0x58, 0x89, 0x07, -0x89, 0x0f, 0x00, 0x04, 0x00, 0x0c, 0x80, 0x08, 0x00, 0x29, 0x00, 0xd0, -0x01, 0x30, 0x00, 0x2a, 0x01, 0xd0, 0x02, 0x30, 0x00, 0xe0, 0x03, 0x30, -0xf9, 0x68, 0x7a, 0x68, 0x91, 0x42, 0x02, 0xd9, 0x39, 0x68, 0xc0, 0x46, -0xf9, 0x60, 0x81, 0x00, 0xf8, 0x68, 0x00, 0xf0, 0xa5, 0xfd, 0xf8, 0x60, -0x0f, 0x48, 0x00, 0x69, 0x00, 0x28, 0x05, 0xd0, 0x01, 0x20, 0xa0, 0x40, -0x02, 0xd0, 0x20, 0x1c, 0xfe, 0xf7, 0xca, 0xfc, 0x0b, 0x49, 0xc8, 0x1d, -0x19, 0x30, 0x03, 0x79, 0x00, 0x22, 0x00, 0x2b, 0x05, 0xd1, 0x09, 0x49, -0xc8, 0x1d, 0x19, 0x30, 0x03, 0x79, 0x00, 0x2b, 0x03, 0xd0, 0x02, 0x71, -0x08, 0x1c, 0xff, 0xf7, 0x79, 0xf9, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x70, 0x04, 0x00, 0x80, 0xd0, 0x2c, 0x00, 0x80, 0x64, 0x2d, 0x00, 0x80, -0xe4, 0x2c, 0x00, 0x80, 0xb0, 0xb5, 0x2b, 0x49, 0x09, 0x79, 0x00, 0x29, -0x03, 0xd1, 0x41, 0x68, 0x29, 0x4b, 0x19, 0x43, 0x41, 0x60, 0x81, 0x68, +0xf8, 0x68, 0x00, 0xf0, 0xa5, 0xfd, 0xf8, 0x60, 0x0f, 0x48, 0x00, 0x69, +0x00, 0x28, 0x05, 0xd0, 0x01, 0x20, 0xa0, 0x40, 0x02, 0xd0, 0x20, 0x1c, +0xfe, 0xf7, 0xca, 0xfc, 0x0b, 0x49, 0xc8, 0x1d, 0x19, 0x30, 0x03, 0x79, +0x00, 0x22, 0x00, 0x2b, 0x05, 0xd1, 0x09, 0x49, 0xc8, 0x1d, 0x19, 0x30, +0x03, 0x79, 0x00, 0x2b, 0x03, 0xd0, 0x02, 0x71, 0x08, 0x1c, 0xff, 0xf7, +0x79, 0xf9, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x70, 0x04, 0x00, 0x80, +0xd0, 0x2c, 0x00, 0x80, 0x64, 0x2d, 0x00, 0x80, 0xe4, 0x2c, 0x00, 0x80, +0xb0, 0xb5, 0x2b, 0x49, 0x09, 0x79, 0x00, 0x29, 0x03, 0xd1, 0x41, 0x68, +0x29, 0x4b, 0x19, 0x43, 0x41, 0x60, 0x81, 0x68, 0x49, 0x08, 0x02, 0xd3, 0x09, 0x21, 0x09, 0x04, 0x01, 0xe0, 0x0d, 0x21, -0x09, 0x04, 0x0c, 0xc8, 0x08, 0x38, 0x19, 0x43, -0x87, 0x68, 0xbb, 0x0a, 0x03, 0xd3, 0x43, 0x68, 0x5b, 0x08, 0x00, 0xd3, -0x01, 0x31, 0x40, 0x68, 0x03, 0x23, 0x1b, 0x07, 0x18, 0x40, 0x07, 0x0f, -0xf8, 0x00, 0x1d, 0x4c, 0x00, 0x19, 0x23, 0x68, 0xc0, 0x18, 0x50, 0x30, -0x00, 0x79, 0x01, 0x28, 0x10, 0xd1, 0x60, 0x68, 0x01, 0x28, 0x0d, 0xd0, -0x10, 0x1c, 0x00, 0xf0, 0x71, 0xf8, 0x38, 0x01, 0x00, 0x19, 0x19, 0x23, -0xdb, 0x01, 0xc0, 0x18, 0x41, 0x6b, 0x01, 0x39, 0x41, 0x63, 0xb0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x38, 0x01, 0x00, 0x19, 0x19, 0x23, 0xdb, 0x01, -0xc0, 0x18, 0x03, 0x6b, 0x5d, 0x1c, 0x05, 0x63, 0xbd, 0x02, 0x2d, 0x19, -0xdb, 0x00, 0xeb, 0x18, 0x80, 0x33, 0x19, 0x63, 0xda, 0x62, 0x81, 0x6b, -0x01, 0x31, 0x81, 0x63, 0x01, 0x21, 0xb9, 0x40, 0x22, 0x68, 0x11, 0x43, -0x21, 0x60, 0x01, 0x6b, 0x80, 0x29, 0xe2, 0xd3, 0x00, 0x21, 0x01, 0x63, -0xdf, 0xe7, 0x00, 0x00, 0x28, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, -0xa0, 0x1c, 0x00, 0x80, 0xf0, 0xb5, 0x1f, 0x4e, 0x70, 0x68, 0x00, 0x28, -0x36, 0xd1, 0x00, 0x24, 0xb1, 0x68, 0x48, 0x1c, 0xc9, 0x00, 0x89, 0x19, -0xb0, 0x60, 0x32, 0x68, 0x89, 0x18, 0x60, 0x31, 0x0d, 0x7b, 0x08, 0x28, -0x00, 0xd3, 0xb4, 0x60, 0x28, 0x01, 0x80, 0x19, 0x19, 0x23, 0xdb, 0x01, -0xc0, 0x18, 0x87, 0x6b, 0x00, 0x2f, 0x21, 0xd0, 0xc1, 0x6a, 0x4b, 0x1c, -0xaa, 0x02, 0x92, 0x19, 0xc9, 0x00, 0x51, 0x18, 0x80, 0x31, 0xc3, 0x62, -0xca, 0x6a, 0x09, 0x6b, 0x01, 0x3f, 0x87, 0x63, 0x80, 0x2b, 0x00, 0xd3, -0xc4, 0x62, 0x00, 0x2f, 0x06, 0xd1, 0x01, 0x27, 0xaf, 0x40, 0x3b, 0x1c, -0xdb, 0x43, 0x37, 0x68, 0x3b, 0x40, 0x33, 0x60, 0x43, 0x6b, 0x01, 0x3b, -0x43, 0x63, 0x10, 0x1c, 0x37, 0x1c, 0x00, 0xf0, 0x09, 0xf8, 0x78, 0x68, -0x00, 0x28, 0xc9, 0xd0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xa0, 0x1c, 0x00, 0x80, 0xf0, 0xb5, 0xcd, 0x0f, 0xed, 0x07, 0x01, 0x24, -0x00, 0x27, 0x2e, 0x4b, 0x2e, 0x4a, 0x00, 0x2d, 0x1d, 0xd0, 0xd8, 0x6a, -0x01, 0x30, 0xd8, 0x62, 0x10, 0x1c, 0x52, 0x69, 0x00, 0x2a, 0x12, 0xd0, -0x02, 0x69, 0x53, 0x1c, 0x92, 0x00, 0x12, 0x18, 0x03, 0x61, 0x91, 0x61, -0x41, 0x69, 0x01, 0x31, 0x41, 0x61, 0x02, 0x69, 0x0f, 0x2a, 0x00, 0xd3, -0x07, 0x61, 0x0f, 0x29, 0x00, 0xd3, 0x44, 0x60, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x08, 0x1c, 0xff, 0xf7, 0xee, 0xfe, 0xf8, 0xe7, 0x15, 0x69, -0x6e, 0x1c, 0xad, 0x00, 0xad, 0x18, 0x16, 0x61, 0xa9, 0x61, 0x55, 0x69, -0x01, 0x35, 0x55, 0x61, 0x16, 0x69, 0x0f, 0x2e, 0x00, 0xd3, 0x17, 0x61, -0x0f, 0x2d, 0x00, 0xd3, 0x54, 0x60, 0x8c, 0x02, 0xa4, 0x0a, 0x16, 0x4f, -0x3a, 0x6f, 0xfd, 0x68, 0xf9, 0x1d, 0x79, 0x31, 0x01, 0x2d, 0x0c, 0xd1, -0xdb, 0x6d, 0x5b, 0x08, 0x09, 0xd3, 0x0b, 0x89, 0x00, 0x2b, 0x06, 0xd1, -0xfd, 0x6f, 0x03, 0x3b, 0x2e, 0x68, 0x33, 0x40, 0x2b, 0x60, 0x14, 0x23, -0x0b, 0x81, 0x10, 0x60, 0x80, 0x07, 0x80, 0x0a, 0x20, 0x43, 0x03, 0x04, -0x00, 0xd0, 0x01, 0x38, 0x50, 0x60, 0x09, 0x6a, 0x08, 0x32, 0x91, 0x42, -0x00, 0xd8, 0x07, 0x4a, 0x00, 0x0d, 0x02, 0xd3, 0x51, 0x20, 0x80, 0x03, -0x82, 0x61, 0x3a, 0x67, 0xbe, 0xe7, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, -0xa0, 0x1c, 0x00, 0x80, 0x68, 0x0e, 0x00, 0x80, 0x24, 0xa7, 0x20, 0x40, +0x09, 0x04, 0x0c, 0xc8, 0x08, 0x38, 0x19, 0x43, 0x87, 0x68, 0xbb, 0x0a, +0x03, 0xd3, 0x43, 0x68, 0x5b, 0x08, 0x00, 0xd3, 0x01, 0x31, 0x40, 0x68, +0x03, 0x23, 0x1b, 0x07, 0x18, 0x40, 0x07, 0x0f, 0xf8, 0x00, 0x1d, 0x4c, +0x00, 0x19, 0x23, 0x68, 0xc0, 0x18, 0x50, 0x30, 0x00, 0x79, 0x01, 0x28, +0x10, 0xd1, 0x60, 0x68, 0x01, 0x28, 0x0d, 0xd0, 0x10, 0x1c, 0x00, 0xf0, +0x71, 0xf8, 0x38, 0x01, 0x00, 0x19, 0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, +0x41, 0x6b, 0x01, 0x39, 0x41, 0x63, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x38, 0x01, 0x00, 0x19, 0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x03, 0x6b, +0x5d, 0x1c, 0x05, 0x63, 0xbd, 0x02, 0x2d, 0x19, 0xdb, 0x00, 0xeb, 0x18, +0x80, 0x33, 0x19, 0x63, 0xda, 0x62, 0x81, 0x6b, 0x01, 0x31, 0x81, 0x63, +0x01, 0x21, 0xb9, 0x40, 0x22, 0x68, 0x11, 0x43, 0x21, 0x60, 0x01, 0x6b, +0x80, 0x29, 0xe2, 0xd3, 0x00, 0x21, 0x01, 0x63, 0xdf, 0xe7, 0x00, 0x00, +0x28, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0xa0, 0x1c, 0x00, 0x80, +0xf0, 0xb5, 0x1f, 0x4e, 0x70, 0x68, 0x00, 0x28, 0x36, 0xd1, 0x00, 0x24, +0xb1, 0x68, 0x48, 0x1c, 0xc9, 0x00, 0x89, 0x19, 0xb0, 0x60, 0x32, 0x68, +0x89, 0x18, 0x60, 0x31, 0x0d, 0x7b, 0x08, 0x28, 0x00, 0xd3, 0xb4, 0x60, +0x28, 0x01, 0x80, 0x19, 0x19, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x87, 0x6b, +0x00, 0x2f, 0x21, 0xd0, 0xc1, 0x6a, 0x4b, 0x1c, 0xaa, 0x02, 0x92, 0x19, +0xc9, 0x00, 0x51, 0x18, 0x80, 0x31, 0xc3, 0x62, 0xca, 0x6a, 0x09, 0x6b, +0x01, 0x3f, 0x87, 0x63, 0x80, 0x2b, 0x00, 0xd3, 0xc4, 0x62, 0x00, 0x2f, +0x06, 0xd1, 0x01, 0x27, 0xaf, 0x40, 0x3b, 0x1c, 0xdb, 0x43, 0x37, 0x68, +0x3b, 0x40, 0x33, 0x60, 0x43, 0x6b, 0x01, 0x3b, 0x43, 0x63, 0x10, 0x1c, +0x37, 0x1c, 0x00, 0xf0, 0x09, 0xf8, 0x78, 0x68, 0x00, 0x28, 0xc9, 0xd0, +0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xa0, 0x1c, 0x00, 0x80, +0xf0, 0xb5, 0xcd, 0x0f, 0xed, 0x07, 0x01, 0x24, 0x00, 0x27, 0x2e, 0x4b, +0x2e, 0x4a, 0x00, 0x2d, 0x1d, 0xd0, 0xd8, 0x6a, 0x01, 0x30, 0xd8, 0x62, +0x10, 0x1c, 0x52, 0x69, 0x00, 0x2a, 0x12, 0xd0, 0x02, 0x69, 0x53, 0x1c, +0x92, 0x00, 0x12, 0x18, 0x03, 0x61, 0x91, 0x61, 0x41, 0x69, 0x01, 0x31, +0x41, 0x61, 0x02, 0x69, 0x0f, 0x2a, 0x00, 0xd3, 0x07, 0x61, 0x0f, 0x29, +0x00, 0xd3, 0x44, 0x60, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x08, 0x1c, +0xff, 0xf7, 0xee, 0xfe, 0xf8, 0xe7, 0x15, 0x69, 0x6e, 0x1c, 0xad, 0x00, +0xad, 0x18, 0x16, 0x61, 0xa9, 0x61, 0x55, 0x69, 0x01, 0x35, 0x55, 0x61, +0x16, 0x69, 0x0f, 0x2e, 0x00, 0xd3, 0x17, 0x61, 0x0f, 0x2d, 0x00, 0xd3, +0x54, 0x60, 0x8c, 0x02, 0xa4, 0x0a, 0x16, 0x4f, 0x3a, 0x6f, 0xfd, 0x68, +0xf9, 0x1d, 0x79, 0x31, 0x01, 0x2d, 0x0c, 0xd1, 0xdb, 0x6d, 0x5b, 0x08, +0x09, 0xd3, 0x0b, 0x89, 0x00, 0x2b, 0x06, 0xd1, 0xfd, 0x6f, 0x03, 0x3b, +0x2e, 0x68, 0x33, 0x40, 0x2b, 0x60, 0x14, 0x23, 0x0b, 0x81, 0x10, 0x60, +0x80, 0x07, 0x80, 0x0a, 0x20, 0x43, 0x03, 0x04, 0x00, 0xd0, 0x01, 0x38, +0x50, 0x60, 0x09, 0x6a, 0x08, 0x32, 0x91, 0x42, 0x00, 0xd8, 0x07, 0x4a, +0x00, 0x0d, 0x02, 0xd3, 0x51, 0x20, 0x80, 0x03, 0x82, 0x61, 0x3a, 0x67, +0xbe, 0xe7, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, 0xa0, 0x1c, 0x00, 0x80, +0x68, 0x0e, 0x00, 0x80, 0x24, 0xa7, 0x20, 0x40, 0xb0, 0xb5, 0x00, 0x28, 0x04, 0xd1, 0x01, 0x20, 0xc0, 0x05, 0x16, 0x49, -0xc0, 0x46, 0x08, 0x60, 0x15, 0x4c, 0x00, 0x25, -0x67, 0x69, 0x00, 0x2f, 0x16, 0xd0, 0xe0, 0x68, 0x41, 0x1c, 0x80, 0x00, -0x00, 0x19, 0xe1, 0x60, 0x80, 0x69, 0x01, 0x3f, 0xff, 0xf7, 0x94, 0xfe, -0xe0, 0x68, 0x0f, 0x28, 0x00, 0xd3, 0xe5, 0x60, 0xe0, 0x68, 0x80, 0x00, -0x00, 0x19, 0x80, 0x69, 0x00, 0x08, 0x01, 0xd3, 0x00, 0x2f, 0xea, 0xd1, -0x67, 0x61, 0x03, 0xe0, 0x08, 0x48, 0x01, 0x6d, 0x01, 0x31, 0x01, 0x65, -0x65, 0x60, 0x20, 0x68, 0x00, 0x28, 0x01, 0xd0, 0xff, 0xf7, 0x26, 0xff, -0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, -0xa0, 0x1c, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, 0x00, 0x20, 0x70, 0x47, -0xb0, 0xb4, 0x10, 0x23, 0x82, 0x68, 0x13, 0x40, 0x00, 0x21, 0x00, 0x2b, -0x15, 0xd0, 0x0c, 0x4b, 0x1a, 0x40, 0x12, 0x01, 0x81, 0x24, 0x14, 0x43, -0x02, 0x68, 0x15, 0x68, 0x13, 0x1d, 0x80, 0xcb, 0x1b, 0x68, 0x04, 0x3a, -0x02, 0x60, 0x20, 0xc2, 0x80, 0xc2, 0x08, 0xc2, 0x14, 0x60, 0x42, 0x68, -0x01, 0x23, 0x9b, 0x07, 0x04, 0x32, 0x1a, 0x43, 0x42, 0x60, 0x08, 0x1c, -0xb0, 0xbc, 0x70, 0x47, 0x00, 0xf0, 0xff, 0x0f, 0xf0, 0xb4, 0x82, 0x68, -0x53, 0x09, 0x34, 0xd3, 0x1b, 0x4b, 0x1a, 0x40, 0x12, 0x01, 0x81, 0x26, -0x16, 0x43, 0x03, 0x68, 0x1d, 0x68, 0x1f, 0x1d, 0x10, 0xcf, 0x3f, 0x68, -0x04, 0x3b, 0x03, 0x60, 0x20, 0xc3, 0x10, 0xc3, 0x80, 0xc3, 0x1e, 0x60, -0x43, 0x68, 0x1f, 0x1d, 0x01, 0x23, 0x9b, 0x07, 0x3b, 0x43, 0x43, 0x60, -0xcb, 0x6b, 0x18, 0x1f, 0xc8, 0x63, 0x80, 0xcb, 0x80, 0xc0, 0x1c, 0x68, -0x1f, 0x1d, 0x03, 0x1d, 0x04, 0x60, 0x38, 0x1c, 0x3f, 0x68, 0xc0, 0x46, -0x1f, 0x60, 0x1f, 0x1d, 0x43, 0x68, 0x1c, 0x04, 0x24, 0x0c, 0x81, 0x23, -0x23, 0x43, 0x3b, 0x60, 0x40, 0x68, 0x00, 0x0c, 0x00, 0x04, 0x10, 0x43, -0x78, 0x60, 0x08, 0x6e, 0x04, 0x30, 0x08, 0x66, 0x48, 0x6e, 0x04, 0x30, -0x48, 0x66, 0x00, 0x20, 0xf0, 0xbc, 0x70, 0x47, 0x00, 0xf0, 0xff, 0x0f, -0x80, 0xb4, 0x81, 0x6a, 0x01, 0x23, 0x9b, 0x07, 0xca, 0x1d, 0x05, 0x32, -0x1a, 0x43, 0x12, 0x68, 0xcf, 0x1d, 0x01, 0x37, 0x3b, 0x43, 0x1b, 0x68, -0xc0, 0x46, 0xcb, 0x60, 0x01, 0x23, 0x9b, 0x07, 0x0f, 0x1d, 0x3b, 0x43, -0x1b, 0x68, 0xc0, 0x46, 0x8b, 0x60, 0x01, 0x23, 0x9b, 0x07, 0x0b, 0x43, -0x1b, 0x68, 0x0c, 0xc1, 0x02, 0x62, 0x01, 0x6b, 0xc0, 0x46, 0x0a, 0x62, -0x04, 0x23, 0x81, 0x69, 0x19, 0x43, 0x81, 0x61, 0x02, 0x6b, 0xc0, 0x46, -0x91, 0x61, 0x81, 0x6a, 0x04, 0x31, 0x81, 0x62, 0x02, 0x6b, 0xc0, 0x46, -0x91, 0x62, 0xc1, 0x1d, 0x39, 0x31, 0x4a, 0x8b, 0x04, 0x3a, 0x4a, 0x83, -0x49, 0x8b, 0x02, 0x6b, 0x40, 0x32, 0x51, 0x83, 0xc1, 0x89, 0x04, 0x39, -0xc1, 0x81, 0xc1, 0x68, 0x00, 0x6b, 0xc0, 0x46, 0xc1, 0x60, 0x00, 0x20, -0x80, 0xbc, 0x70, 0x47, 0x00, 0x47, 0x08, 0x47, 0x10, 0x47, 0x18, 0x47, -0x20, 0x47, 0x28, 0x47, 0x30, 0x47, 0x38, 0x47, 0x30, 0x40, 0x2d, 0xe9, -0x0c, 0xc0, 0x9d, 0xe5, 0x0c, 0x48, 0xa0, 0xe1, 0x24, 0x48, 0xb0, 0xe1, -0x1e, 0x00, 0x00, 0x0a, 0x01, 0xc0, 0x4c, 0xe2, 0x18, 0x40, 0xa0, 0xe3, -0x64, 0x51, 0x9f, 0xe5, 0x94, 0x50, 0x20, 0xe0, 0x00, 0x50, 0x90, 0xe5, -0x14, 0x40, 0x90, 0xe5, 0x00, 0x30, 0x85, 0xe5, 0x04, 0xc0, 0x85, 0xe5, -0x08, 0x10, 0x85, 0xe5, 0x0c, 0x20, 0x85, 0xe5, 0x10, 0x10, 0x90, 0xe5, +0xc0, 0x46, 0x08, 0x60, 0x15, 0x4c, 0x00, 0x25, 0x67, 0x69, 0x00, 0x2f, +0x16, 0xd0, 0xe0, 0x68, 0x41, 0x1c, 0x80, 0x00, 0x00, 0x19, 0xe1, 0x60, +0x80, 0x69, 0x01, 0x3f, 0xff, 0xf7, 0x94, 0xfe, 0xe0, 0x68, 0x0f, 0x28, +0x00, 0xd3, 0xe5, 0x60, 0xe0, 0x68, 0x80, 0x00, 0x00, 0x19, 0x80, 0x69, +0x00, 0x08, 0x01, 0xd3, 0x00, 0x2f, 0xea, 0xd1, 0x67, 0x61, 0x03, 0xe0, +0x08, 0x48, 0x01, 0x6d, 0x01, 0x31, 0x01, 0x65, 0x65, 0x60, 0x20, 0x68, +0x00, 0x28, 0x01, 0xd0, 0xff, 0xf7, 0x26, 0xff, 0xb0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xa0, 0x1c, 0x00, 0x80, +0xa0, 0x82, 0x20, 0x40, 0x00, 0x20, 0x70, 0x47, 0xb0, 0xb4, 0x10, 0x23, +0x82, 0x68, 0x13, 0x40, 0x00, 0x21, 0x00, 0x2b, 0x15, 0xd0, 0x0c, 0x4b, +0x1a, 0x40, 0x12, 0x01, 0x81, 0x24, 0x14, 0x43, 0x02, 0x68, 0x15, 0x68, +0x13, 0x1d, 0x80, 0xcb, 0x1b, 0x68, 0x04, 0x3a, 0x02, 0x60, 0x20, 0xc2, +0x80, 0xc2, 0x08, 0xc2, 0x14, 0x60, 0x42, 0x68, 0x01, 0x23, 0x9b, 0x07, +0x04, 0x32, 0x1a, 0x43, 0x42, 0x60, 0x08, 0x1c, 0xb0, 0xbc, 0x70, 0x47, +0x00, 0xf0, 0xff, 0x0f, 0xf0, 0xb4, 0x82, 0x68, 0x53, 0x09, 0x34, 0xd3, +0x1b, 0x4b, 0x1a, 0x40, 0x12, 0x01, 0x81, 0x26, 0x16, 0x43, 0x03, 0x68, +0x1d, 0x68, 0x1f, 0x1d, 0x10, 0xcf, 0x3f, 0x68, 0x04, 0x3b, 0x03, 0x60, +0x20, 0xc3, 0x10, 0xc3, 0x80, 0xc3, 0x1e, 0x60, 0x43, 0x68, 0x1f, 0x1d, +0x01, 0x23, 0x9b, 0x07, 0x3b, 0x43, 0x43, 0x60, 0xcb, 0x6b, 0x18, 0x1f, +0xc8, 0x63, 0x80, 0xcb, 0x80, 0xc0, 0x1c, 0x68, 0x1f, 0x1d, 0x03, 0x1d, +0x04, 0x60, 0x38, 0x1c, 0x3f, 0x68, 0xc0, 0x46, 0x1f, 0x60, 0x1f, 0x1d, +0x43, 0x68, 0x1c, 0x04, 0x24, 0x0c, 0x81, 0x23, 0x23, 0x43, 0x3b, 0x60, +0x40, 0x68, 0x00, 0x0c, 0x00, 0x04, 0x10, 0x43, 0x78, 0x60, 0x08, 0x6e, +0x04, 0x30, 0x08, 0x66, 0x48, 0x6e, 0x04, 0x30, 0x48, 0x66, 0x00, 0x20, +0xf0, 0xbc, 0x70, 0x47, 0x00, 0xf0, 0xff, 0x0f, 0x80, 0xb4, 0x81, 0x6a, +0x01, 0x23, 0x9b, 0x07, 0xca, 0x1d, 0x05, 0x32, 0x1a, 0x43, 0x12, 0x68, +0xcf, 0x1d, 0x01, 0x37, 0x3b, 0x43, 0x1b, 0x68, 0xc0, 0x46, 0xcb, 0x60, +0x01, 0x23, 0x9b, 0x07, 0x0f, 0x1d, 0x3b, 0x43, 0x1b, 0x68, 0xc0, 0x46, +0x8b, 0x60, 0x01, 0x23, 0x9b, 0x07, 0x0b, 0x43, 0x1b, 0x68, 0x0c, 0xc1, +0x02, 0x62, 0x01, 0x6b, 0xc0, 0x46, 0x0a, 0x62, 0x04, 0x23, 0x81, 0x69, +0x19, 0x43, 0x81, 0x61, 0x02, 0x6b, 0xc0, 0x46, 0x91, 0x61, 0x81, 0x6a, +0x04, 0x31, 0x81, 0x62, 0x02, 0x6b, 0xc0, 0x46, 0x91, 0x62, 0xc1, 0x1d, +0x39, 0x31, 0x4a, 0x8b, 0x04, 0x3a, 0x4a, 0x83, 0x49, 0x8b, 0x02, 0x6b, +0x40, 0x32, 0x51, 0x83, 0xc1, 0x89, 0x04, 0x39, 0xc1, 0x81, 0xc1, 0x68, +0x00, 0x6b, 0xc0, 0x46, 0xc1, 0x60, 0x00, 0x20, 0x80, 0xbc, 0x70, 0x47, +0x00, 0x47, 0x08, 0x47, 0x10, 0x47, 0x18, 0x47, 0x20, 0x47, 0x28, 0x47, +0x30, 0x47, 0x38, 0x47, 0x30, 0x40, 0x2d, 0xe9, 0x0c, 0xc0, 0x9d, 0xe5, +0x0c, 0x48, 0xa0, 0xe1, 0x24, 0x48, 0xb0, 0xe1, 0x1e, 0x00, 0x00, 0x0a, +0x01, 0xc0, 0x4c, 0xe2, 0x18, 0x40, 0xa0, 0xe3, 0x64, 0x51, 0x9f, 0xe5, +0x94, 0x50, 0x20, 0xe0, 0x00, 0x50, 0x90, 0xe5, 0x14, 0x40, 0x90, 0xe5, +0x00, 0x30, 0x85, 0xe5, 0x04, 0xc0, 0x85, 0xe5, 0x08, 0x10, 0x85, 0xe5, +0x0c, 0x20, 0x85, 0xe5, 0x10, 0x10, 0x90, 0xe5, 0x10, 0x50, 0x85, 0xe2, 0x01, 0x00, 0x55, 0xe1, 0x0c, 0x50, 0x90, 0x55, -0x04, 0x00, 0x55, 0xe1, 0x05, 0x00, 0x00, 0x0a, -0x04, 0x10, 0x90, 0xe5, 0x00, 0x50, 0x80, 0xe5, 0x00, 0x50, 0x81, 0xe5, -0x00, 0x00, 0xa0, 0xe3, 0x30, 0x40, 0xbd, 0xe8, 0x1e, 0xff, 0x2f, 0xe1, -0x00, 0x30, 0x93, 0xe5, 0x08, 0x20, 0x90, 0xe5, 0x01, 0x31, 0x83, 0xe3, -0x02, 0x36, 0x83, 0xe3, 0x03, 0x00, 0x55, 0xe1, 0x14, 0x30, 0x80, 0xe5, -0xf2, 0xff, 0xff, 0x1a, 0x01, 0x00, 0xa0, 0xe3, 0xf4, 0xff, 0xff, 0xea, -0x01, 0x06, 0x1c, 0xe3, 0xf1, 0xff, 0xff, 0x0a, 0xec, 0x10, 0x9f, 0xe5, -0x02, 0xc6, 0xcc, 0xe3, 0x54, 0x20, 0x91, 0xe5, 0xe4, 0x30, 0x9f, 0xe5, -0x50, 0x10, 0x91, 0xe5, 0xd9, 0xff, 0xff, 0xea, 0xf0, 0x47, 0x2d, 0xe9, -0x20, 0xc0, 0x9d, 0xe5, 0x0c, 0x68, 0xa0, 0xe1, 0x26, 0x68, 0xb0, 0xe1, -0x25, 0x00, 0x00, 0x0a, 0x18, 0x40, 0xa0, 0xe3, 0xb8, 0x50, 0x9f, 0xe5, -0x94, 0x00, 0x00, 0xe0, 0x05, 0x00, 0x80, 0xe0, 0x08, 0x40, 0x90, 0xe5, -0x04, 0x80, 0x90, 0xe5, 0x00, 0x70, 0xa0, 0xe3, 0x1f, 0xc0, 0xa0, 0xe3, -0x02, 0xc4, 0x8c, 0xe3, 0x00, 0x50, 0x90, 0xe5, 0x10, 0x90, 0x90, 0xe5, -0x14, 0xa0, 0x90, 0xe5, 0x00, 0x30, 0x85, 0xe5, 0x04, 0xc0, 0x85, 0xe5, -0x08, 0x10, 0x85, 0xe5, 0x0c, 0x20, 0x85, 0xe5, 0x10, 0x50, 0x85, 0xe2, -0x09, 0x00, 0x55, 0xe1, 0x0c, 0x50, 0x90, 0x55, 0x0a, 0x00, 0x55, 0xe1, -0x15, 0x00, 0x00, 0x0a, 0x03, 0x70, 0x17, 0xe2, 0x20, 0x10, 0x81, 0xe2, -0x20, 0x30, 0x83, 0xe2, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x60, 0x96, 0xe2, -0x01, 0x70, 0x87, 0xe2, 0x09, 0x00, 0x00, 0x0a, 0x20, 0x60, 0x46, 0xe2, -0x20, 0x00, 0x56, 0xe3, 0xec, 0xff, 0xff, 0xca, 0x00, 0x70, 0xa0, 0xe3, -0x01, 0xc0, 0x46, 0xe2, 0x02, 0xc4, 0x8c, 0xe3, 0x00, 0x60, 0xa0, 0xe3, -0xe7, 0xff, 0xff, 0xea, 0x00, 0x50, 0x88, 0xe5, 0xf2, 0xff, 0xff, 0xea, -0x00, 0x10, 0xa0, 0xe3, 0x00, 0x50, 0x80, 0xe5, 0x01, 0x00, 0xa0, 0xe1, -0xf0, 0x47, 0xbd, 0xe8, 0x1e, 0xff, 0x2f, 0xe1, 0x00, 0xa0, 0x94, 0xe5, -0x0a, 0x00, 0x55, 0xe1, 0x14, 0xa0, 0x80, 0xe5, 0xe5, 0xff, 0xff, 0x1a, -0x01, 0x10, 0xa0, 0xe3, 0xf5, 0xff, 0xff, 0xea, 0xa8, 0x03, 0x00, 0x80, -0x7c, 0x29, 0x00, 0x80, 0x00, 0x80, 0x20, 0x40, 0x68, 0x82, 0x9f, 0xe5, -0x0b, 0x92, 0xa0, 0xe3, 0x64, 0xa2, 0x9f, 0xe5, 0x58, 0xb0, 0x9a, 0xe5, -0x0e, 0xf0, 0xa0, 0xe1, 0x54, 0xb0, 0x9a, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, -0x3f, 0x40, 0x2d, 0xe9, 0x00, 0x00, 0x4f, 0xe1, 0x1f, 0x00, 0x00, 0xe2, -0x12, 0x00, 0x50, 0xe3, 0x54, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0f, 0xe1, -0x80, 0x00, 0xc0, 0xe3, 0x00, 0xf0, 0x21, 0xe1, 0x04, 0x50, 0xa0, 0xe3, -0x00, 0x40, 0x99, 0xe5, 0x09, 0x00, 0x00, 0xea, 0x02, 0x00, 0x14, 0xe3, -0x53, 0x00, 0x00, 0x1b, 0x80, 0x00, 0x14, 0xe3, 0x59, 0x00, 0x00, 0x1b, -0x20, 0x00, 0x14, 0xe3, 0x59, 0x00, 0x00, 0x1b, 0x02, 0x07, 0x14, 0xe3, -0x59, 0x00, 0x00, 0x1b, 0x01, 0x06, 0x14, 0xe3, 0x59, 0x00, 0x00, 0x1b, -0x08, 0x00, 0x14, 0xe3, 0x45, 0x00, 0x00, 0x1b, 0x02, 0x05, 0x14, 0xe3, -0x4a, 0x00, 0x00, 0x1b, 0x02, 0x08, 0x14, 0xe3, 0x4b, 0x00, 0x00, 0x1b, -0xe5, 0x0e, 0x14, 0xe3, 0x07, 0x00, 0x00, 0x0a, 0x04, 0x20, 0x98, 0xe5, -0x0c, 0x10, 0x98, 0xe5, 0x04, 0x30, 0x52, 0xe2, 0x3c, 0x30, 0xa0, 0xb3, -0x04, 0x30, 0x88, 0xe5, 0x02, 0x00, 0x91, 0xe7, 0x0f, 0xe0, 0xa0, 0xe1, +0x04, 0x00, 0x55, 0xe1, 0x05, 0x00, 0x00, 0x0a, 0x04, 0x10, 0x90, 0xe5, +0x00, 0x50, 0x80, 0xe5, 0x00, 0x50, 0x81, 0xe5, 0x00, 0x00, 0xa0, 0xe3, +0x30, 0x40, 0xbd, 0xe8, 0x1e, 0xff, 0x2f, 0xe1, 0x00, 0x30, 0x93, 0xe5, +0x08, 0x20, 0x90, 0xe5, 0x01, 0x31, 0x83, 0xe3, 0x02, 0x36, 0x83, 0xe3, +0x03, 0x00, 0x55, 0xe1, 0x14, 0x30, 0x80, 0xe5, 0xf2, 0xff, 0xff, 0x1a, +0x01, 0x00, 0xa0, 0xe3, 0xf4, 0xff, 0xff, 0xea, 0x01, 0x06, 0x1c, 0xe3, +0xf1, 0xff, 0xff, 0x0a, 0xec, 0x10, 0x9f, 0xe5, 0x02, 0xc6, 0xcc, 0xe3, +0x54, 0x20, 0x91, 0xe5, 0xe4, 0x30, 0x9f, 0xe5, 0x50, 0x10, 0x91, 0xe5, +0xd9, 0xff, 0xff, 0xea, 0xf0, 0x47, 0x2d, 0xe9, 0x20, 0xc0, 0x9d, 0xe5, +0x0c, 0x68, 0xa0, 0xe1, 0x26, 0x68, 0xb0, 0xe1, 0x25, 0x00, 0x00, 0x0a, +0x18, 0x40, 0xa0, 0xe3, 0xb8, 0x50, 0x9f, 0xe5, 0x94, 0x00, 0x00, 0xe0, +0x05, 0x00, 0x80, 0xe0, 0x08, 0x40, 0x90, 0xe5, 0x04, 0x80, 0x90, 0xe5, +0x00, 0x70, 0xa0, 0xe3, 0x1f, 0xc0, 0xa0, 0xe3, 0x02, 0xc4, 0x8c, 0xe3, +0x00, 0x50, 0x90, 0xe5, 0x10, 0x90, 0x90, 0xe5, 0x14, 0xa0, 0x90, 0xe5, +0x00, 0x30, 0x85, 0xe5, 0x04, 0xc0, 0x85, 0xe5, 0x08, 0x10, 0x85, 0xe5, +0x0c, 0x20, 0x85, 0xe5, 0x10, 0x50, 0x85, 0xe2, 0x09, 0x00, 0x55, 0xe1, +0x0c, 0x50, 0x90, 0x55, 0x0a, 0x00, 0x55, 0xe1, 0x15, 0x00, 0x00, 0x0a, +0x03, 0x70, 0x17, 0xe2, 0x20, 0x10, 0x81, 0xe2, 0x20, 0x30, 0x83, 0xe2, +0x0a, 0x00, 0x00, 0x0a, 0x00, 0x60, 0x96, 0xe2, 0x01, 0x70, 0x87, 0xe2, +0x09, 0x00, 0x00, 0x0a, 0x20, 0x60, 0x46, 0xe2, 0x20, 0x00, 0x56, 0xe3, +0xec, 0xff, 0xff, 0xca, 0x00, 0x70, 0xa0, 0xe3, 0x01, 0xc0, 0x46, 0xe2, +0x02, 0xc4, 0x8c, 0xe3, 0x00, 0x60, 0xa0, 0xe3, 0xe7, 0xff, 0xff, 0xea, +0x00, 0x50, 0x88, 0xe5, 0xf2, 0xff, 0xff, 0xea, 0x00, 0x10, 0xa0, 0xe3, +0x00, 0x50, 0x80, 0xe5, 0x01, 0x00, 0xa0, 0xe1, 0xf0, 0x47, 0xbd, 0xe8, +0x1e, 0xff, 0x2f, 0xe1, 0x00, 0xa0, 0x94, 0xe5, 0x0a, 0x00, 0x55, 0xe1, +0x14, 0xa0, 0x80, 0xe5, 0xe5, 0xff, 0xff, 0x1a, 0x01, 0x10, 0xa0, 0xe3, +0xf5, 0xff, 0xff, 0xea, 0xa8, 0x03, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, +0x00, 0x80, 0x20, 0x40, 0x68, 0x82, 0x9f, 0xe5, 0x0b, 0x92, 0xa0, 0xe3, +0x64, 0xa2, 0x9f, 0xe5, 0x58, 0xb0, 0x9a, 0xe5, 0x0e, 0xf0, 0xa0, 0xe1, +0x54, 0xb0, 0x9a, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0x3f, 0x40, 0x2d, 0xe9, +0x00, 0x00, 0x4f, 0xe1, 0x1f, 0x00, 0x00, 0xe2, 0x12, 0x00, 0x50, 0xe3, +0x54, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0f, 0xe1, 0x80, 0x00, 0xc0, 0xe3, +0x00, 0xf0, 0x21, 0xe1, 0x04, 0x50, 0xa0, 0xe3, 0x00, 0x40, 0x99, 0xe5, +0x09, 0x00, 0x00, 0xea, 0x02, 0x00, 0x14, 0xe3, 0x53, 0x00, 0x00, 0x1b, +0x80, 0x00, 0x14, 0xe3, 0x59, 0x00, 0x00, 0x1b, 0x20, 0x00, 0x14, 0xe3, +0x59, 0x00, 0x00, 0x1b, 0x02, 0x07, 0x14, 0xe3, 0x59, 0x00, 0x00, 0x1b, +0x01, 0x06, 0x14, 0xe3, 0x59, 0x00, 0x00, 0x1b, 0x08, 0x00, 0x14, 0xe3, +0x45, 0x00, 0x00, 0x1b, 0x02, 0x05, 0x14, 0xe3, 0x4a, 0x00, 0x00, 0x1b, +0x02, 0x08, 0x14, 0xe3, 0x4b, 0x00, 0x00, 0x1b, 0xe5, 0x0e, 0x14, 0xe3, +0x07, 0x00, 0x00, 0x0a, 0x04, 0x20, 0x98, 0xe5, 0x0c, 0x10, 0x98, 0xe5, +0x04, 0x30, 0x52, 0xe2, 0x3c, 0x30, 0xa0, 0xb3, 0x04, 0x30, 0x88, 0xe5, +0x02, 0x00, 0x91, 0xe7, 0x0f, 0xe0, 0xa0, 0xe1, 0x10, 0xff, 0x2f, 0xe1, 0x01, 0x50, 0x55, 0xe2, 0x03, 0x00, 0x00, 0x0a, -0x00, 0x40, 0x99, 0xe5, 0x0c, 0x00, 0x9a, 0xe5, -0x00, 0x00, 0x14, 0xe1, 0x1b, 0xff, 0x2f, 0x11, 0x08, 0x00, 0x9a, 0xe5, -0x00, 0x00, 0x14, 0xe1, 0x0b, 0x00, 0x00, 0x0a, 0x01, 0x0c, 0x14, 0xe3, -0x98, 0x01, 0x9f, 0x15, 0x0f, 0xe0, 0xa0, 0x11, 0x10, 0xff, 0x2f, 0x11, -0x02, 0x04, 0x14, 0xe3, 0x8c, 0x01, 0x9f, 0x15, 0x0f, 0xe0, 0xa0, 0x11, -0x10, 0xff, 0x2f, 0x11, 0x01, 0x09, 0x14, 0xe3, 0x80, 0x01, 0x9f, 0x15, -0x0f, 0xe0, 0xa0, 0x11, 0x10, 0xff, 0x2f, 0x11, 0x04, 0x00, 0x9a, 0xe5, -0x00, 0x00, 0x14, 0xe1, 0x16, 0x00, 0x00, 0x0a, 0x54, 0xe0, 0x8f, 0xe2, -0x04, 0x00, 0x14, 0xe3, 0x40, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, -0x02, 0x0a, 0x14, 0xe3, 0x44, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, -0x02, 0x09, 0x14, 0xe3, 0x48, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, -0x01, 0x02, 0x14, 0xe3, 0x4c, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, -0x01, 0x04, 0x14, 0xe3, 0x50, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, -0x01, 0x0a, 0x14, 0xe3, 0x21, 0x00, 0x00, 0x1b, 0x02, 0x00, 0x14, 0xe3, -0x0e, 0x00, 0x00, 0x1b, 0x10, 0x00, 0x9a, 0xe5, 0x00, 0x00, 0x14, 0xe1, -0x1c, 0x00, 0x00, 0x1b, 0x00, 0x40, 0x99, 0xe5, 0x04, 0x50, 0xa0, 0xe3, -0x00, 0x40, 0x94, 0xe2, 0x1b, 0xff, 0x2f, 0x11, 0x3f, 0x40, 0xbd, 0xe8, -0x04, 0xf0, 0x5e, 0xe2, 0xc0, 0x00, 0x80, 0xe3, 0x00, 0xf0, 0x61, 0xe1, -0xfa, 0xff, 0xff, 0xea, 0x18, 0x00, 0x9a, 0xe5, 0x1c, 0x10, 0x9a, 0xe5, -0x11, 0xff, 0x2f, 0xe1, 0x54, 0xb0, 0x9a, 0xe5, 0x1c, 0x10, 0x9a, 0xe5, -0x14, 0x00, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, 0x20, 0x10, 0x9a, 0xe5, -0x00, 0x00, 0xa0, 0xe3, 0x11, 0xff, 0x2f, 0xe1, 0x24, 0x10, 0x9a, 0xe5, -0x11, 0xff, 0x2f, 0xe1, 0x28, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, -0x2c, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, 0x30, 0x10, 0x9a, 0xe5, -0x11, 0xff, 0x2f, 0xe1, 0x34, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, -0xfe, 0xff, 0xff, 0xea, 0x38, 0xe0, 0x9a, 0xe5, 0x3c, 0x10, 0x9a, 0xe5, -0x18, 0x00, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, 0x38, 0xe0, 0x9a, 0xe5, -0x3c, 0x10, 0x9a, 0xe5, 0x14, 0x00, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, -0x64, 0x20, 0x9f, 0xe5, 0x00, 0x30, 0x92, 0xe5, 0x00, 0x30, 0x53, 0xe0, -0x0a, 0x00, 0x00, 0xba, 0x00, 0x30, 0x82, 0xe5, 0x0c, 0x00, 0x92, 0xe5, -0x08, 0x30, 0x92, 0xe5, 0x00, 0x10, 0x91, 0xe2, 0x03, 0x00, 0x00, 0x0a, -0x03, 0x10, 0x80, 0xe7, 0x04, 0x30, 0x53, 0xe2, 0x3c, 0x30, 0xa0, 0xb3, -0x08, 0x30, 0x82, 0xe5, 0x01, 0x00, 0xa0, 0xe3, 0x1e, 0xff, 0x2f, 0xe1, -0x3c, 0x10, 0x9f, 0xe5, 0x00, 0x00, 0x91, 0xe5, 0x01, 0x00, 0x80, 0xe2, -0x00, 0x00, 0x81, 0xe5, 0x00, 0x00, 0xa0, 0xe3, 0xf8, 0xff, 0xff, 0xea, -0x10, 0x00, 0x9f, 0xe5, 0x08, 0x10, 0x90, 0xe5, 0x04, 0x10, 0x51, 0xe2, -0x3c, 0x10, 0xa0, 0xb3, 0x08, 0x10, 0x80, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, -0xe4, 0x2d, 0x00, 0x80, 0xcc, 0x04, 0x00, 0x80, 0x5d, 0x2b, 0xff, 0xff, -0xbd, 0x3d, 0xff, 0xff, 0xb5, 0x2b, 0xff, 0xff, 0xa0, 0x82, 0x20, 0x40, -0xc9, 0x1c, 0x89, 0x08, 0x89, 0x00, 0x01, 0x23, 0x85, 0x4a, 0x5b, 0x07, -0x18, 0x43, 0x13, 0x68, 0x5b, 0x18, 0x13, 0x60, 0x00, 0x1f, 0x81, 0xa3, -0x5b, 0x1a, 0x18, 0x47, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, -0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, +0x00, 0x40, 0x99, 0xe5, 0x0c, 0x00, 0x9a, 0xe5, 0x00, 0x00, 0x14, 0xe1, +0x1b, 0xff, 0x2f, 0x11, 0x08, 0x00, 0x9a, 0xe5, 0x00, 0x00, 0x14, 0xe1, +0x0b, 0x00, 0x00, 0x0a, 0x01, 0x0c, 0x14, 0xe3, 0x98, 0x01, 0x9f, 0x15, +0x0f, 0xe0, 0xa0, 0x11, 0x10, 0xff, 0x2f, 0x11, 0x02, 0x04, 0x14, 0xe3, +0x8c, 0x01, 0x9f, 0x15, 0x0f, 0xe0, 0xa0, 0x11, 0x10, 0xff, 0x2f, 0x11, +0x01, 0x09, 0x14, 0xe3, 0x80, 0x01, 0x9f, 0x15, 0x0f, 0xe0, 0xa0, 0x11, +0x10, 0xff, 0x2f, 0x11, 0x04, 0x00, 0x9a, 0xe5, 0x00, 0x00, 0x14, 0xe1, +0x16, 0x00, 0x00, 0x0a, 0x54, 0xe0, 0x8f, 0xe2, 0x04, 0x00, 0x14, 0xe3, +0x40, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, 0x02, 0x0a, 0x14, 0xe3, +0x44, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, 0x02, 0x09, 0x14, 0xe3, +0x48, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, 0x01, 0x02, 0x14, 0xe3, +0x4c, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, 0x01, 0x04, 0x14, 0xe3, +0x50, 0x00, 0x9a, 0x15, 0x10, 0xff, 0x2f, 0x11, 0x01, 0x0a, 0x14, 0xe3, +0x21, 0x00, 0x00, 0x1b, 0x02, 0x00, 0x14, 0xe3, 0x0e, 0x00, 0x00, 0x1b, +0x10, 0x00, 0x9a, 0xe5, 0x00, 0x00, 0x14, 0xe1, 0x1c, 0x00, 0x00, 0x1b, +0x00, 0x40, 0x99, 0xe5, 0x04, 0x50, 0xa0, 0xe3, 0x00, 0x40, 0x94, 0xe2, +0x1b, 0xff, 0x2f, 0x11, 0x3f, 0x40, 0xbd, 0xe8, 0x04, 0xf0, 0x5e, 0xe2, +0xc0, 0x00, 0x80, 0xe3, 0x00, 0xf0, 0x61, 0xe1, 0xfa, 0xff, 0xff, 0xea, +0x18, 0x00, 0x9a, 0xe5, 0x1c, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, +0x54, 0xb0, 0x9a, 0xe5, 0x1c, 0x10, 0x9a, 0xe5, 0x14, 0x00, 0x9a, 0xe5, +0x11, 0xff, 0x2f, 0xe1, 0x20, 0x10, 0x9a, 0xe5, 0x00, 0x00, 0xa0, 0xe3, +0x11, 0xff, 0x2f, 0xe1, 0x24, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, +0x28, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, 0x2c, 0x10, 0x9a, 0xe5, +0x11, 0xff, 0x2f, 0xe1, 0x30, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, +0x34, 0x10, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, 0xfe, 0xff, 0xff, 0xea, +0x38, 0xe0, 0x9a, 0xe5, 0x3c, 0x10, 0x9a, 0xe5, 0x18, 0x00, 0x9a, 0xe5, +0x11, 0xff, 0x2f, 0xe1, 0x38, 0xe0, 0x9a, 0xe5, 0x3c, 0x10, 0x9a, 0xe5, +0x14, 0x00, 0x9a, 0xe5, 0x11, 0xff, 0x2f, 0xe1, 0x64, 0x20, 0x9f, 0xe5, +0x00, 0x30, 0x92, 0xe5, 0x00, 0x30, 0x53, 0xe0, 0x0a, 0x00, 0x00, 0xba, +0x00, 0x30, 0x82, 0xe5, 0x0c, 0x00, 0x92, 0xe5, 0x08, 0x30, 0x92, 0xe5, +0x00, 0x10, 0x91, 0xe2, 0x03, 0x00, 0x00, 0x0a, 0x03, 0x10, 0x80, 0xe7, +0x04, 0x30, 0x53, 0xe2, 0x3c, 0x30, 0xa0, 0xb3, 0x08, 0x30, 0x82, 0xe5, +0x01, 0x00, 0xa0, 0xe3, 0x1e, 0xff, 0x2f, 0xe1, 0x3c, 0x10, 0x9f, 0xe5, +0x00, 0x00, 0x91, 0xe5, 0x01, 0x00, 0x80, 0xe2, 0x00, 0x00, 0x81, 0xe5, +0x00, 0x00, 0xa0, 0xe3, 0xf8, 0xff, 0xff, 0xea, 0x10, 0x00, 0x9f, 0xe5, +0x08, 0x10, 0x90, 0xe5, 0x04, 0x10, 0x51, 0xe2, 0x3c, 0x10, 0xa0, 0xb3, +0x08, 0x10, 0x80, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0xe4, 0x2d, 0x00, 0x80, +0xcc, 0x04, 0x00, 0x80, 0x71, 0x2b, 0xff, 0xff, 0xd1, 0x3d, 0xff, 0xff, +0xc9, 0x2b, 0xff, 0xff, 0xa0, 0x82, 0x20, 0x40, 0xc9, 0x1c, 0x89, 0x08, +0x89, 0x00, 0x01, 0x23, 0x85, 0x4a, 0x5b, 0x07, 0x18, 0x43, 0x13, 0x68, +0x5b, 0x18, 0x13, 0x60, 0x00, 0x1f, 0x81, 0xa3, 0x5b, 0x1a, 0x18, 0x47, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, @@ -1921,204 +1922,143 @@ 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, -0x04, 0x20, 0xa0, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0xe4, 0x2d, 0x00, 0x80, +0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, +0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, 0x04, 0x20, 0xa0, 0xe5, +0x1e, 0xff, 0x2f, 0xe1, 0xe4, 0x2d, 0x00, 0x80, 0x98, 0x00, 0x9f, 0xe5, 0x98, 0x10, 0x9f, 0xe5, 0x01, 0x20, 0x40, 0xe0, -0x94, 0x30, 0x9f, 0xe5, 0x00, 0x00, 0x91, 0xe5, +0x94, 0x30, 0x9f, 0xe5, 0x00, 0x00, 0x91, 0xe5, 0x03, 0x00, 0x50, 0xe1, +0x03, 0x00, 0x00, 0x1a, 0x04, 0x10, 0x81, 0xe2, 0x04, 0x20, 0x52, 0xe2, +0x00, 0x00, 0x00, 0x0a, 0xf8, 0xff, 0xff, 0xea, 0x78, 0x00, 0x9f, 0xe5, +0x00, 0x20, 0x80, 0xe5, 0x74, 0x00, 0x9f, 0xe5, 0x74, 0x10, 0x9f, 0xe5, +0x01, 0x20, 0x40, 0xe0, 0x60, 0x30, 0x9f, 0xe5, 0x00, 0x00, 0x91, 0xe5, 0x03, 0x00, 0x50, 0xe1, 0x03, 0x00, 0x00, 0x1a, 0x04, 0x10, 0x81, 0xe2, 0x04, 0x20, 0x52, 0xe2, 0x00, 0x00, 0x00, 0x0a, 0xf8, 0xff, 0xff, 0xea, -0x78, 0x00, 0x9f, 0xe5, 0x00, 0x20, 0x80, 0xe5, 0x74, 0x00, 0x9f, 0xe5, -0x74, 0x10, 0x9f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x60, 0x30, 0x9f, 0xe5, +0x50, 0x00, 0x9f, 0xe5, 0x00, 0x20, 0x80, 0xe5, 0x4c, 0x00, 0x9f, 0xe5, +0x4c, 0x10, 0x9f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x2c, 0x30, 0x9f, 0xe5, 0x00, 0x00, 0x91, 0xe5, 0x03, 0x00, 0x50, 0xe1, 0x03, 0x00, 0x00, 0x1a, 0x04, 0x10, 0x81, 0xe2, 0x04, 0x20, 0x52, 0xe2, 0x00, 0x00, 0x00, 0x0a, -0xf8, 0xff, 0xff, 0xea, 0x50, 0x00, 0x9f, 0xe5, 0x00, 0x20, 0x80, 0xe5, -0x4c, 0x00, 0x9f, 0xe5, 0x4c, 0x10, 0x9f, 0xe5, 0x01, 0x20, 0x40, 0xe0, -0x2c, 0x30, 0x9f, 0xe5, 0x00, 0x00, 0x91, 0xe5, 0x03, 0x00, 0x50, 0xe1, -0x03, 0x00, 0x00, 0x1a, 0x04, 0x10, 0x81, 0xe2, 0x04, 0x20, 0x52, 0xe2, -0x00, 0x00, 0x00, 0x0a, 0xf8, 0xff, 0xff, 0xea, 0x28, 0x00, 0x9f, 0xe5, -0x00, 0x20, 0x80, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0x7c, 0x34, 0x00, 0x80, -0x80, 0x30, 0x00, 0x80, 0xad, 0xde, 0xad, 0xde, 0xc0, 0x04, 0x00, 0x80, -0xfc, 0x37, 0x00, 0x80, 0x80, 0x34, 0x00, 0x80, 0xc4, 0x04, 0x00, 0x80, -0xfc, 0x3f, 0x00, 0x80, 0x40, 0x38, 0x00, 0x80, 0xc8, 0x04, 0x00, 0x80, -0x78, 0x47, 0x00, 0x00, 0x76, 0xea, 0xff, 0xea, 0x78, 0x47, 0x00, 0x00, -0x39, 0xfe, 0xff, 0xea, 0x78, 0x47, 0x00, 0x00, 0x63, 0xfe, 0xff, 0xea, -0x78, 0x47, 0x00, 0x00, 0x1b, 0xff, 0xff, 0xea, 0x78, 0x47, 0x00, 0x00, -0x70, 0xea, 0xff, 0xea, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, -0x00, 0x00, 0x00, 0x80, 0x28, 0x04, 0x00, 0x00, 0x95, 0x22, 0x00, 0x00, -0x00, 0x01, 0x00, 0x80, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xb9, 0x0b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x0b, 0xff, 0xff, -0x03, 0xff, 0x06, 0x54, 0x03, 0x00, 0x00, 0x00, 0x75, 0x04, 0xff, 0xff, -0x00, 0x00, 0x00, 0x00, 0xa1, 0x05, 0xff, 0xff, 0x04, 0xff, 0x07, 0x54, -0x03, 0x00, 0x00, 0x00, 0xb5, 0x04, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0xf1, 0x05, 0xff, 0xff, 0x05, 0xff, 0x05, 0x54, 0x03, 0x00, 0x00, 0x00, -0x39, 0x04, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0xff, 0xff, -0x01, 0xff, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x41, 0x18, 0xff, 0xff, -0x00, 0x00, 0x00, 0x00, 0x61, 0x0e, 0xff, 0xff, 0x02, 0xff, 0x02, 0x08, -0x00, 0x00, 0x00, 0x00, 0xa1, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0xf1, 0x02, 0xff, 0xff, 0xff, 0xff, 0x01, 0x44, 0x03, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x0d, 0xff, 0xff, -0x06, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x50, 0xff, 0xff, -0x6d, 0x50, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xf8, 0xff, 0xff, 0xea, 0x28, 0x00, 0x9f, 0xe5, 0x00, 0x20, 0x80, 0xe5, +0x1e, 0xff, 0x2f, 0xe1, 0x7c, 0x34, 0x00, 0x80, 0x80, 0x30, 0x00, 0x80, +0xad, 0xde, 0xad, 0xde, 0xc0, 0x04, 0x00, 0x80, 0xfc, 0x37, 0x00, 0x80, +0x80, 0x34, 0x00, 0x80, 0xc4, 0x04, 0x00, 0x80, 0xfc, 0x3f, 0x00, 0x80, +0x40, 0x38, 0x00, 0x80, 0xc8, 0x04, 0x00, 0x80, 0x78, 0x47, 0x00, 0x00, +0x71, 0xea, 0xff, 0xea, 0x78, 0x47, 0x00, 0x00, 0x39, 0xfe, 0xff, 0xea, +0x78, 0x47, 0x00, 0x00, 0x63, 0xfe, 0xff, 0xea, 0x78, 0x47, 0x00, 0x00, +0x1b, 0xff, 0xff, 0xea, 0x78, 0x47, 0x00, 0x00, 0x6b, 0xea, 0xff, 0xea, +0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0x28, 0x04, 0x00, 0x00, 0xf8, 0x3d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x0b, 0xff, 0xff, +0x00, 0x00, 0x00, 0x00, 0xd5, 0x0b, 0xff, 0xff, 0x03, 0xff, 0x06, 0x54, +0x03, 0x00, 0x00, 0x00, 0x75, 0x04, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +0xa1, 0x05, 0xff, 0xff, 0x04, 0xff, 0x07, 0x54, 0x03, 0x00, 0x00, 0x00, +0xb5, 0x04, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x05, 0xff, 0xff, +0x05, 0xff, 0x05, 0x54, 0x03, 0x00, 0x00, 0x00, 0x39, 0x04, 0xff, 0xff, +0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0xff, 0xff, 0x01, 0xff, 0x04, 0x00, +0x03, 0x00, 0x00, 0x00, 0x41, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, +0x61, 0x0e, 0xff, 0xff, 0x02, 0xff, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, +0xa1, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x02, 0xff, 0xff, +0xff, 0xff, 0x01, 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x9d, 0x0d, 0xff, 0xff, 0x06, 0x00, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3d, 0x50, 0xff, 0xff, 0x81, 0x50, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 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, 0x48, 0x05, 0x00, 0x80, 0x19, 0x78, 0x21, 0x40, -0x23, 0x78, 0x21, 0x40, 0x39, 0x78, 0x21, 0x40, 0x51, 0x78, 0x21, 0x40, -0x5d, 0x78, 0x21, 0x40, 0x6b, 0x78, 0x21, 0x40, 0x85, 0x78, 0x21, 0x40, -0xb1, 0x78, 0x21, 0x40, 0x75, 0x79, 0x21, 0x40, -0xcd, 0x79, 0x21, 0x40, 0xdb, 0x79, 0x21, 0x40, 0xe5, 0x79, 0x21, 0x40, -0xef, 0x79, 0x21, 0x40, 0x8d, 0x7a, 0x21, 0x40, 0x9b, 0x7a, 0x21, 0x40, -0xa9, 0x7a, 0x21, 0x40, 0x51, 0x7b, 0x21, 0x40, 0x4f, 0x7f, 0x21, 0x40, -0xc9, 0x7f, 0x21, 0x40, 0x69, 0x80, 0x21, 0x40, 0x9d, 0x81, 0x21, 0x40, -0xa9, 0x81, 0x21, 0x40, 0x09, 0x82, 0x21, 0x40, 0x6d, 0x82, 0x21, 0x40, -0x99, 0x82, 0x21, 0x40, 0xbd, 0x82, 0x21, 0x40, 0xfd, 0x82, 0x21, 0x40, -0x25, 0x83, 0x21, 0x40, 0x6d, 0x83, 0x21, 0x40, 0x7d, 0x83, 0x21, 0x40, -0xa5, 0x83, 0x21, 0x40, 0xb5, 0x83, 0x21, 0x40, 0xfd, 0x83, 0x21, 0x40, -0x3b, 0x84, 0x21, 0x40, 0x91, 0x84, 0x21, 0x40, 0xf1, 0x84, 0x21, 0x40, -0xfb, 0x84, 0x21, 0x40, 0xff, 0x84, 0x21, 0x40, 0x6d, 0x85, 0x21, 0x40, -0xb9, 0x85, 0x21, 0x40, 0x11, 0x86, 0x21, 0x40, 0x4d, 0x86, 0x21, 0x40, -0xb1, 0x86, 0x21, 0x40, 0xe9, 0x86, 0x21, 0x40, 0xf9, 0x86, 0x21, 0x40, -0x31, 0x87, 0x21, 0x40, 0x41, 0x87, 0x21, 0x40, 0x55, 0x87, 0x21, 0x40, -0x7d, 0x87, 0x21, 0x40, 0x87, 0x87, 0x21, 0x40, 0x91, 0x87, 0x21, 0x40, -0xf5, 0x87, 0x21, 0x40, 0x25, 0x88, 0x21, 0x40, 0x31, 0x88, 0x21, 0x40, -0xa5, 0x88, 0x21, 0x40, 0xaf, 0x88, 0x21, 0x40, 0xb9, 0x88, 0x21, 0x40, -0xc3, 0x88, 0x21, 0x40, 0xcd, 0x88, 0x21, 0x40, 0xd7, 0x88, 0x21, 0x40, -0xe1, 0x88, 0x21, 0x40, 0xeb, 0x88, 0x21, 0x40, 0xf5, 0x88, 0x21, 0x40, -0xe9, 0x8b, 0x21, 0x40, 0xff, 0x88, 0x21, 0x40, 0x09, 0x89, 0x21, 0x40, -0x13, 0x89, 0x21, 0x40, 0x1d, 0x89, 0x21, 0x40, 0x45, 0x89, 0x21, 0x40, -0x4f, 0x89, 0x21, 0x40, 0xb1, 0x89, 0x21, 0x40, 0xbb, 0x89, 0x21, 0x40, -0xc5, 0x89, 0x21, 0x40, 0xcf, 0x89, 0x21, 0x40, 0xd9, 0x89, 0x21, 0x40, -0xa5, 0x77, 0x21, 0x40, 0xe3, 0x89, 0x21, 0x40, 0x49, 0x8a, 0x21, 0x40, -0x95, 0x8a, 0x21, 0x40, 0xe1, 0x8a, 0x21, 0x40, 0xf1, 0x8a, 0x21, 0x40, -0xa5, 0x77, 0x21, 0x40, 0x3d, 0x8b, 0x21, 0x40, 0x41, 0x8b, 0x21, 0x40, -0x45, 0x8b, 0x21, 0x40, 0x9d, 0x8b, 0x21, 0x40, 0xc5, 0x8b, 0x21, 0x40, -0xd1, 0x8b, 0x21, 0x40, 0xd5, 0x8b, 0x21, 0x40, 0xd9, 0x8b, 0x21, 0x40, -0xdd, 0x8b, 0x21, 0x40, 0xe1, 0x8b, 0x21, 0x40, 0xe5, 0x8b, 0x21, 0x40, -0x0d, 0x88, 0x21, 0x40, 0x69, 0x88, 0x21, 0x40, 0xa5, 0x77, 0x21, 0x40, -0xa5, 0x77, 0x21, 0x40, 0xf5, 0x8b, 0x21, 0x40, 0xe1, 0xc9, 0x21, 0x40, -0xe9, 0x77, 0x21, 0x40, 0xa5, 0x77, 0x21, 0x40, 0xa5, 0x77, 0x21, 0x40, -0xdd, 0xca, 0x21, 0x40, 0x13, 0xcb, 0x21, 0x40, 0x45, 0xcb, 0x21, 0x40, -0x4d, 0x8c, 0x21, 0x40, 0x5b, 0x7b, 0x21, 0x40, 0xe5, 0x7e, 0x21, 0x40, -0x21, 0x7f, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x18, 0x40, -0x58, 0x01, 0x18, 0x40, 0x24, 0xa3, 0x20, 0x40, 0x24, 0xa7, 0x20, 0x40, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x01, 0x18, 0x40, -0x68, 0x01, 0x18, 0x40, 0x24, 0x83, 0x20, 0x40, 0x24, 0xa3, 0x20, 0x40, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x18, 0x40, -0x78, 0x01, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x01, 0x18, 0x40, -0x88, 0x01, 0x18, 0x40, 0x24, 0xa9, 0x20, 0x40, 0x24, 0xab, 0x20, 0x40, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x12, 0x00, 0x18, 0x00, 0x12, 0x00, -0x0c, 0x00, 0x12, 0x00, 0x1c, 0x00, 0x12, 0x00, 0x24, 0xa8, 0x20, 0x40, -0xa4, 0xa8, 0x20, 0x40, 0xa4, 0xa8, 0x20, 0x40, 0x24, 0xa9, 0x20, 0x40, -0x00, 0x00, 0x00, 0x00, 0xa5, 0xb9, 0x21, 0x40, 0x01, 0xbb, 0x21, 0x40, -0x00, 0x00, 0x00, 0x00, 0x91, 0x73, 0x21, 0x40, 0x19, 0xb2, 0x21, 0x40, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0xa7, 0x99, 0x21, 0x40, 0xa5, 0xb9, 0x21, 0x40, -0xb1, 0x2f, 0xff, 0xff, 0xf1, 0x20, 0xff, 0xff, 0xdb, 0x20, 0xff, 0xff, -0x2d, 0xb8, 0x21, 0x40, 0x34, 0x2e, 0x00, 0x80, 0x48, 0x2e, 0x00, 0x80, -0x5c, 0x2e, 0x00, 0x80, 0x30, 0x33, 0x3a, 0x31, 0x31, 0x3a, 0x31, 0x31, -0x00, 0x30, 0x37, 0x2f, 0x32, 0x33, 0x2f, 0x30, 0x31, 0x00, 0x30, 0x30, -0x30, 0x30, 0x31, 0x35, 0x36, 0x39, 0x00, 0x43, 0x6f, 0x70, 0x79, 0x72, -0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30, -0x31, 0x20, 0x33, 0x43, 0x6f, 0x6d, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, -0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x00, 0x02, 0x10, 0x00, 0x03, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x78, 0x53, 0xff, 0xff, 0x27, 0xf0, 0x7d, 0xfd, 0x00, 0x01, 0x00, 0x02, -0xda, 0x0e, 0x82, 0x00, 0x01, 0x40, 0x64, 0x04, 0x64, 0x2d, 0x00, 0x80, -0xe4, 0x2c, 0x00, 0x80, 0x55, 0x3e, 0xff, 0xff, 0xb5, 0x4f, 0xff, 0xff, -0xc1, 0x24, 0xff, 0xff, 0xb5, 0x3b, 0xff, 0xff, 0x15, 0x3c, 0xff, 0xff, -0x05, 0x1a, 0xff, 0xff, 0x65, 0x11, 0xff, 0xff, 0xb8, 0x53, 0xff, 0xff, -0x0d, 0x40, 0xff, 0xff, 0x91, 0x73, 0x21, 0x40, 0x51, 0x75, 0x21, 0x40, -0xc5, 0x3f, 0xff, 0xff, 0x71, 0xaa, 0x21, 0x40, 0x71, 0x24, 0xff, 0xff, -0x50, 0x53, 0xff, 0xff, 0x78, 0x53, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, -0xff, 0xff, 0x00, 0x00, 0x80, 0x30, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, -0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0xec, 0x68, 0x00, 0x00, -0x10, 0x5c, 0x00, 0x00, 0x00, 0x6e, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, -0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, -0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, -0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, -0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, -0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, -0x08, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, -0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, -0x0e, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3d, 0x9a, 0x21, 0x40, -0xdb, 0x99, 0x21, 0x40, 0xf5, 0x9c, 0x21, 0x40, 0x55, 0x9d, 0x21, 0x40, -0x1d, 0x9e, 0x21, 0x40, 0xdb, 0x9b, 0x21, 0x40, 0xf9, 0x9e, 0x21, 0x40, -0x65, 0x9f, 0x21, 0x40, 0xb9, 0x9b, 0x21, 0x40, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, -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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 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, +0x48, 0x05, 0x00, 0x80, 0x11, 0x75, 0x21, 0x40, 0x1b, 0x75, 0x21, 0x40, +0x31, 0x75, 0x21, 0x40, 0x49, 0x75, 0x21, 0x40, +0x55, 0x75, 0x21, 0x40, 0x63, 0x75, 0x21, 0x40, 0x7d, 0x75, 0x21, 0x40, +0xa9, 0x75, 0x21, 0x40, 0x6d, 0x76, 0x21, 0x40, 0xc5, 0x76, 0x21, 0x40, +0xd3, 0x76, 0x21, 0x40, 0xdd, 0x76, 0x21, 0x40, 0xe7, 0x76, 0x21, 0x40, +0x99, 0x77, 0x21, 0x40, 0xa7, 0x77, 0x21, 0x40, 0xb5, 0x77, 0x21, 0x40, +0x61, 0x78, 0x21, 0x40, 0x5f, 0x7c, 0x21, 0x40, 0xe9, 0x7c, 0x21, 0x40, +0x89, 0x7d, 0x21, 0x40, 0xbd, 0x7e, 0x21, 0x40, 0xc9, 0x7e, 0x21, 0x40, +0x29, 0x7f, 0x21, 0x40, 0x8d, 0x7f, 0x21, 0x40, 0xb9, 0x7f, 0x21, 0x40, +0xdd, 0x7f, 0x21, 0x40, 0x1d, 0x80, 0x21, 0x40, 0x45, 0x80, 0x21, 0x40, +0x8d, 0x80, 0x21, 0x40, 0x9d, 0x80, 0x21, 0x40, 0xc5, 0x80, 0x21, 0x40, +0xd5, 0x80, 0x21, 0x40, 0x1d, 0x81, 0x21, 0x40, 0x5b, 0x81, 0x21, 0x40, +0xb1, 0x81, 0x21, 0x40, 0x11, 0x82, 0x21, 0x40, 0x1b, 0x82, 0x21, 0x40, +0x1f, 0x82, 0x21, 0x40, 0x8d, 0x82, 0x21, 0x40, 0xd9, 0x82, 0x21, 0x40, +0x31, 0x83, 0x21, 0x40, 0x6d, 0x83, 0x21, 0x40, 0xd1, 0x83, 0x21, 0x40, +0x09, 0x84, 0x21, 0x40, 0x19, 0x84, 0x21, 0x40, 0x51, 0x84, 0x21, 0x40, +0x61, 0x84, 0x21, 0x40, 0x75, 0x84, 0x21, 0x40, 0x9d, 0x84, 0x21, 0x40, +0xa7, 0x84, 0x21, 0x40, 0xb1, 0x84, 0x21, 0x40, 0x15, 0x85, 0x21, 0x40, +0x45, 0x85, 0x21, 0x40, 0x51, 0x85, 0x21, 0x40, 0xc5, 0x85, 0x21, 0x40, +0xcf, 0x85, 0x21, 0x40, 0xd9, 0x85, 0x21, 0x40, 0xe3, 0x85, 0x21, 0x40, +0xed, 0x85, 0x21, 0x40, 0xf7, 0x85, 0x21, 0x40, 0x01, 0x86, 0x21, 0x40, +0x0b, 0x86, 0x21, 0x40, 0x15, 0x86, 0x21, 0x40, 0x01, 0x89, 0x21, 0x40, +0x1f, 0x86, 0x21, 0x40, 0x29, 0x86, 0x21, 0x40, 0x33, 0x86, 0x21, 0x40, +0x3d, 0x86, 0x21, 0x40, 0x65, 0x86, 0x21, 0x40, 0x6f, 0x86, 0x21, 0x40, +0xd1, 0x86, 0x21, 0x40, 0xdb, 0x86, 0x21, 0x40, 0xe5, 0x86, 0x21, 0x40, +0xef, 0x86, 0x21, 0x40, 0xf9, 0x86, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, +0x03, 0x87, 0x21, 0x40, 0x69, 0x87, 0x21, 0x40, 0xb5, 0x87, 0x21, 0x40, +0xf9, 0x87, 0x21, 0x40, 0x09, 0x88, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, +0x55, 0x88, 0x21, 0x40, 0x59, 0x88, 0x21, 0x40, 0x5d, 0x88, 0x21, 0x40, +0xb5, 0x88, 0x21, 0x40, 0xdd, 0x88, 0x21, 0x40, 0xe9, 0x88, 0x21, 0x40, +0xed, 0x88, 0x21, 0x40, 0xf1, 0x88, 0x21, 0x40, 0xf5, 0x88, 0x21, 0x40, +0xf9, 0x88, 0x21, 0x40, 0xfd, 0x88, 0x21, 0x40, 0x2d, 0x85, 0x21, 0x40, +0x89, 0x85, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, +0x0d, 0x89, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, 0xe1, 0x74, 0x21, 0x40, +0x9d, 0x74, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, +0x9d, 0x74, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, 0x9d, 0x74, 0x21, 0x40, +0x6b, 0x78, 0x21, 0x40, 0xf5, 0x7b, 0x21, 0x40, 0x31, 0x7c, 0x21, 0x40, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x18, 0x40, 0x58, 0x01, 0x18, 0x40, +0x24, 0xa3, 0x20, 0x40, 0x24, 0xa7, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x6c, 0x01, 0x18, 0x40, 0x68, 0x01, 0x18, 0x40, +0x24, 0x83, 0x20, 0x40, 0x24, 0xa3, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x18, 0x40, 0x78, 0x01, 0x18, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x8c, 0x01, 0x18, 0x40, +0x88, 0x01, 0x18, 0x40, 0x24, 0xa9, 0x20, 0x40, 0x24, 0xab, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x00, 0x12, 0x00, 0x18, 0x00, 0x12, 0x00, 0x0c, 0x00, 0x12, 0x00, +0x1c, 0x00, 0x12, 0x00, 0x24, 0xa8, 0x20, 0x40, 0xa4, 0xa8, 0x20, 0x40, +0xa4, 0xa8, 0x20, 0x40, 0x24, 0xa9, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, +0xd1, 0xa8, 0x21, 0x40, 0x2d, 0xaa, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, +0x89, 0x70, 0x21, 0x40, 0xc9, 0xa1, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x57, 0x89, 0x21, 0x40, 0xd1, 0xa8, 0x21, 0x40, 0xc5, 0x2f, 0xff, 0xff, +0x05, 0x21, 0xff, 0xff, 0xef, 0x20, 0xff, 0xff, 0x59, 0xa7, 0x21, 0x40, +0x34, 0x2e, 0x00, 0x80, 0x48, 0x2e, 0x00, 0x80, 0x5c, 0x2e, 0x00, 0x80, +0x30, 0x33, 0x3a, 0x31, 0x31, 0x3a, 0x31, 0x31, 0x00, 0x30, 0x37, 0x2f, +0x32, 0x33, 0x2f, 0x30, 0x31, 0x00, 0x30, 0x30, 0x30, 0x30, 0x31, 0x35, +0x36, 0x39, 0x00, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, +0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x30, 0x31, 0x20, 0x33, 0x43, +0x6f, 0x6d, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, +0x6f, 0x6e, 0x0a, 0x00, 0x08, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x53, 0xff, 0xff, +0x27, 0xf0, 0x7d, 0xfd, 0x00, 0x01, 0x00, 0x02, 0xda, 0x0e, 0x82, 0x00, +0x01, 0x40, 0x64, 0x04, 0x64, 0x2d, 0x00, 0x80, 0xe4, 0x2c, 0x00, 0x80, +0x69, 0x3e, 0xff, 0xff, 0xc9, 0x4f, 0xff, 0xff, 0xd5, 0x24, 0xff, 0xff, +0xc9, 0x3b, 0xff, 0xff, 0x29, 0x3c, 0xff, 0xff, 0x19, 0x1a, 0xff, 0xff, +0x65, 0x11, 0xff, 0xff, 0xcc, 0x53, 0xff, 0xff, 0x21, 0x40, 0xff, 0xff, +0x89, 0x70, 0x21, 0x40, 0x49, 0x72, 0x21, 0x40, 0xd9, 0x3f, 0xff, 0xff, +0x21, 0x9a, 0x21, 0x40, 0x85, 0x24, 0xff, 0xff, 0x64, 0x53, 0xff, 0xff, +0x8c, 0x53, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, +0x80, 0x30, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, +0x00, 0x00, 0x20, 0x40, 0xb0, 0x50, 0x00, 0x00, 0x7b, 0x0e, 0x00, 0x00, +0x00, 0x6e, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xed, 0x89, 0x21, 0x40, 0x8b, 0x89, 0x21, 0x40, 0xa5, 0x8c, 0x21, 0x40, +0x05, 0x8d, 0x21, 0x40, 0xcd, 0x8d, 0x21, 0x40, 0x8b, 0x8b, 0x21, 0x40, +0xa9, 0x8e, 0x21, 0x40, 0x15, 0x8f, 0x21, 0x40, 0x69, 0x8b, 0x21, 0x40, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, -0xe9, 0xd6, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, 0xb9, 0xcb, 0x21, 0x40, -0x55, 0xcd, 0x21, 0x40, 0x00, 0x00, 0x00, 0x00, 0x25, 0xd5, 0x21, 0x40, -0x8d, 0xd5, 0x21, 0x40, 0xf9, 0xd5, 0x21, 0x40, 0x09, 0x29, 0x09, 0xd1, -0x20, 0x28, 0x07, 0xd2, 0x04, 0x48, 0x01, 0x78, 0x00, 0x29, 0x03, 0xd1, -0x01, 0x21, 0x01, 0x70, 0x02, 0x48, 0x70, 0x47, 0x00, 0x20, 0xfc, 0xe7, -0x00, 0x6e, 0x21, 0x40, 0x24, 0xab, 0x20, 0x40, 0x03, 0x49, 0x88, 0x42, -0x03, 0xd1, 0x00, 0x20, 0x02, 0x49, 0xc0, 0x46, 0x08, 0x70, 0x70, 0x47, -0x24, 0xab, 0x20, 0x40, 0x00, 0x6e, 0x21, 0x40, 0x00, 0xb5, 0x00, 0x20, -0x0b, 0x4a, 0x0b, 0x23, 0x1b, 0x02, 0xd1, 0x18, 0x2d, 0x23, 0x9b, 0x01, -0xd3, 0x18, 0x88, 0x61, 0xd8, 0x60, 0xd8, 0x63, 0x80, 0x32, 0xc8, 0x60, -0x08, 0x61, 0x48, 0x61, 0xd0, 0x62, 0x05, 0x48, 0xc0, 0x46, 0x48, 0x60, -0x88, 0x60, 0x05, 0xf0, 0xcb, 0xfd, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0xfe, 0x03, 0x00, 0x00, 0xf0, 0xb5, 0x84, 0xb0, -0x0c, 0x1c, 0x05, 0x1c, 0x00, 0x23, 0x00, 0x93, 0xff, 0xf7, 0xda, 0xff, -0x68, 0x49, 0x0b, 0x23, 0x1b, 0x02, 0xcf, 0x18, 0x78, 0x68, 0x28, 0x40, +0x59, 0xbd, 0x21, 0x40, 0xc1, 0xbd, 0x21, 0x40, 0x2d, 0xbe, 0x21, 0x40, +0x00, 0x20, 0x0a, 0x4a, 0x0b, 0x23, 0x1b, 0x02, 0xd1, 0x18, 0x2d, 0x23, +0x9b, 0x01, 0xd3, 0x18, 0x88, 0x61, 0xd8, 0x60, 0xd8, 0x63, 0x80, 0x32, +0xc8, 0x60, 0x08, 0x61, 0x48, 0x61, 0xd0, 0x62, 0x03, 0x48, 0xc0, 0x46, +0x48, 0x60, 0x88, 0x60, 0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, +0xfe, 0x03, 0x00, 0x00, 0xf0, 0xb5, 0x84, 0xb0, 0x0c, 0x1c, 0x05, 0x1c, +0x00, 0x23, 0x00, 0x93, 0xff, 0xf7, 0xde, 0xff, 0x68, 0x49, 0x0b, 0x23, +0x1b, 0x02, 0xcf, 0x18, 0x78, 0x68, 0x28, 0x40, 0x00, 0x22, 0xf8, 0x60, 0x3a, 0x61, 0xba, 0x68, 0x22, 0x40, 0x7a, 0x61, 0x0c, 0x1c, 0x41, 0x09, 0x03, 0xd2, 0x51, 0x09, 0x01, 0xd2, 0x80, 0x0a, 0x02, 0xd3, 0x60, 0x48, 0x00, 0xf0, 0xc2, 0xf8, 0x01, 0x20, 0xf9, 0x68, 0x49, 0x09, 0x03, 0xd2, 0x79, 0x69, 0x49, 0x09, 0x00, 0xd2, 0x00, 0x20, -0x00, 0x06, 0x00, 0x0e, 0x04, 0xf0, 0xc8, 0xf9, 0xf8, 0x68, 0x00, 0x28, +0x00, 0x06, 0x00, 0x0e, 0x03, 0xf0, 0xd4, 0xfa, 0xf8, 0x68, 0x00, 0x28, 0x70, 0xd0, 0x00, 0x23, 0x02, 0x93, 0x01, 0x93, 0x54, 0x4a, 0x01, 0x23, 0x18, 0x43, 0xf8, 0x60, 0x00, 0x20, 0xd5, 0x1d, 0x79, 0x35, 0x03, 0x95, 0x01, 0x24, 0x00, 0x21, 0x4f, 0x4d, 0xfa, 0x68, 0x22, 0x40, 0x39, 0xd0, @@ -2138,300 +2078,301 @@ 0x9b, 0x01, 0xc9, 0x18, 0xc8, 0x60, 0x00, 0x9b, 0x00, 0x2b, 0x0c, 0xd1, 0x81, 0x00, 0x89, 0x18, 0x0b, 0x23, 0x1b, 0x02, 0xc9, 0x18, 0xcb, 0x69, 0xc0, 0x46, 0x8b, 0x61, 0x01, 0x30, 0x0b, 0x28, 0xf4, 0xd3, 0x08, 0xe0, -0x07, 0xe0, 0x03, 0x9d, 0xe8, 0x6a, 0x30, 0x28, -0x03, 0xd2, 0x30, 0x20, 0x03, 0x9d, 0xc0, 0x46, 0xe8, 0x62, 0x19, 0x4a, -0x78, 0x69, 0x00, 0x28, 0x2a, 0xd0, 0x00, 0x21, 0x01, 0x23, 0x18, 0x43, -0x78, 0x61, 0x00, 0x20, 0x01, 0x24, 0x00, 0x22, 0x13, 0x4e, 0x7b, 0x69, -0x23, 0x40, 0x10, 0xd0, 0x93, 0x00, 0x9b, 0x18, 0x9b, 0x00, 0x12, 0x4d, -0x5b, 0x19, 0x9d, 0x78, 0x85, 0x42, 0x08, 0xd1, 0x1d, 0x69, 0x0b, 0x1c, -0x9b, 0x00, 0x9e, 0x19, 0x2d, 0x23, 0x9b, 0x01, 0xf3, 0x18, 0xdd, 0x63, -0x01, 0x31, 0x64, 0x00, 0x01, 0x32, 0x0b, 0x2a, 0xe6, 0xd3, 0x01, 0x30, -0x09, 0x28, 0xe1, 0xd3, 0x00, 0x20, 0x89, 0x00, 0x04, 0x4a, 0x89, 0x18, -0x2d, 0x23, 0x9b, 0x01, 0xc9, 0x18, 0xc8, 0x63, 0x04, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x1c, 0x53, 0xff, 0xff, -0x00, 0x01, 0x00, 0x80, 0x00, 0x47, 0x08, 0x47, 0x10, 0x47, 0x18, 0x47, -0x78, 0x47, 0xc0, 0x46, 0x34, 0xc0, 0x9f, 0xe5, 0x1c, 0xff, 0x2f, 0xe1, -0x78, 0x47, 0xc0, 0x46, 0x2c, 0xc0, 0x9f, 0xe5, 0x1c, 0xff, 0x2f, 0xe1, -0x78, 0x47, 0xc0, 0x46, 0x24, 0xc0, 0x9f, 0xe5, 0x1c, 0xff, 0x2f, 0xe1, -0xc0, 0x46, 0xff, 0xb4, 0x75, 0x46, 0x20, 0xb4, 0x01, 0x21, 0x08, 0x43, -0x01, 0xa4, 0xa6, 0x46, 0x00, 0x47, 0xc0, 0x46, 0x20, 0xbc, 0xae, 0x46, -0xff, 0xbc, 0xf7, 0x46, 0x24, 0x52, 0xff, 0xff, 0x74, 0x51, 0xff, 0xff, -0x51, 0xc0, 0x21, 0x40, 0xf0, 0xb5, 0x04, 0x20, 0x1a, 0x49, 0x01, 0x25, -0x08, 0x60, 0x1a, 0x4f, 0xbb, 0x23, 0x1b, 0x01, 0xf8, 0x18, 0x05, 0x73, -0x18, 0x48, 0x41, 0x6b, 0x2c, 0x05, 0x00, 0x20, 0x7a, 0x6e, 0x17, 0x4b, -0x8a, 0x42, 0x1d, 0xd0, 0x19, 0x7b, 0x00, 0x29, 0x17, 0xd1, 0xd9, 0x1d, -0xff, 0x31, 0x3a, 0x31, 0x49, 0x78, 0x1e, 0x1c, 0x00, 0x29, 0x10, 0xd1, -0xb0, 0x60, 0x10, 0x20, 0x70, 0x60, 0x10, 0x4a, 0x10, 0x49, 0xff, 0xf7, -0xb5, 0xff, 0x00, 0x28, 0x07, 0xd0, 0x35, 0x73, 0x04, 0x23, 0xb8, 0x69, -0x18, 0x43, 0xb8, 0x61, 0x20, 0x61, 0x00, 0xf0, 0x17, 0xf8, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x18, 0x73, 0x04, 0x23, 0xb8, 0x69, 0x98, 0x43, -0xb8, 0x61, 0x20, 0x61, 0xf5, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, -0x68, 0x0e, 0x00, 0x80, 0x00, 0x01, 0x18, 0x40, 0x28, 0x05, 0x00, 0x80, -0x0c, 0x55, 0xff, 0xff, 0x85, 0x74, 0x21, 0x40, 0xf8, 0xb5, 0x15, 0x4f, -0x39, 0x6c, 0x15, 0x48, 0x40, 0x6e, 0x0c, 0x1a, 0x14, 0x4e, 0x71, 0x68, -0x14, 0x4d, 0xa1, 0x42, 0x06, 0xd8, 0x14, 0x4a, 0x0a, 0x43, 0x00, 0x92, -0xb9, 0x6b, 0x09, 0x18, 0xfa, 0x6b, 0x11, 0xe0, 0x11, 0x22, 0x52, 0x05, -0x22, 0x43, 0x00, 0x92, 0xb9, 0x6b, 0x09, 0x18, 0x00, 0x20, 0xfa, 0x6b, -0x2b, 0x1c, 0xff, 0xf7, 0x7f, 0xff, 0x70, 0x68, 0x00, 0x1b, 0x0a, 0x4a, -0x02, 0x43, 0x00, 0x92, 0xb9, 0x6b, 0xfa, 0x6b, 0x00, 0x20, 0x2b, 0x1c, -0xff, 0xf7, 0x74, 0xff, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x7c, 0x29, 0x00, 0x80, 0x68, 0x0e, 0x00, 0x80, 0x28, 0x05, 0x00, 0x80, -0x44, 0x80, 0x20, 0x40, 0x00, 0x00, 0x37, 0x02, 0xf0, 0xb5, 0x2b, 0x4f, -0xb8, 0x68, 0x79, 0x68, 0xc0, 0x19, 0x20, 0x30, 0x29, 0x4a, 0xff, 0xf7, -0x55, 0xff, 0x01, 0x20, 0xc0, 0x02, 0x28, 0x49, 0xc0, 0x46, 0x08, 0x60, -0xb9, 0x68, 0x38, 0x1c, 0x26, 0x4d, 0x00, 0x24, 0x26, 0x4e, 0xef, 0x1d, -0x79, 0x37, 0x00, 0x29, 0x31, 0xd1, 0x31, 0x68, 0x0a, 0x78, 0x12, 0x0a, -0x03, 0xd2, 0x04, 0x73, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x49, 0x78, 0x00, 0x29, 0x0c, 0xd1, 0x05, 0x1c, 0x40, 0x68, -0x00, 0xf0, 0x3e, 0xf9, 0x30, 0x68, 0x00, 0xf0, 0x67, 0xf8, 0x00, 0x28, -0x26, 0xd1, 0x2c, 0x73, 0xff, 0xf7, 0x58, 0xff, 0x22, 0xe0, 0x09, 0x01, -0x07, 0x1c, 0x41, 0x60, 0x08, 0x1c, 0x17, 0x4a, 0x17, 0x49, 0xff, 0xf7, -0x27, 0xff, 0x00, 0x28, 0x07, 0xd1, 0x3c, 0x73, 0x04, 0x23, 0xa8, 0x69, -0x98, 0x43, 0x99, 0x04, 0xa8, 0x61, 0x08, 0x61, 0xda, 0xe7, 0x10, 0x20, -0x00, 0xf0, 0x20, 0xf9, 0x10, 0x20, 0xb8, 0x60, 0xff, 0xf7, 0x82, 0xff, -0xd2, 0xe7, 0x05, 0x1c, 0x40, 0x68, 0x00, 0xf0, 0x17, 0xf9, 0x30, 0x68, -0x00, 0xf0, 0x40, 0xf8, 0x00, 0x28, 0xd8, 0xd0, 0x02, 0x23, 0xf8, 0x6b, -0x18, 0x43, 0xf8, 0x63, 0xc4, 0xe7, 0x00, 0x00, 0x28, 0x05, 0x00, 0x80, -0x91, 0x55, 0xff, 0xff, 0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, -0xe4, 0x01, 0x00, 0x80, 0x0c, 0x55, 0xff, 0xff, 0x85, 0x74, 0x21, 0x40, -0x90, 0xb5, 0x01, 0x20, 0x40, 0x03, 0x10, 0x49, 0x00, 0x27, 0x08, 0x60, -0x0f, 0x4c, 0xe0, 0x1d, 0xff, 0x30, 0x3a, 0x30, 0x47, 0x70, 0xe0, 0x69, -0x80, 0x00, 0x00, 0x19, 0x00, 0x69, 0x00, 0xf0, 0xd7, 0xf8, 0xe0, 0x69, -0x00, 0x28, 0x01, 0xd0, 0xe7, 0x61, 0x01, 0xe0, 0x01, 0x20, 0xe0, 0x61, -0x07, 0x48, 0x02, 0x23, 0xc1, 0x6b, 0x19, 0x43, 0xc1, 0x63, 0x27, 0x73, -0xff, 0xf7, 0x00, 0xff, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x00, 0x00, 0x00, 0xb0, 0x28, 0x05, 0x00, 0x80, 0xe8, 0x0e, 0x00, 0x80, -0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x78, 0x88, 0x6d, 0x28, 0x03, 0xdb, -0x38, 0x1c, 0x00, 0xf0, 0xf7, 0xf8, 0x17, 0xe0, 0x80, 0x00, 0x0d, 0x49, -0x09, 0x58, 0x38, 0x1c, 0xff, 0xf7, 0xbd, 0xfe, 0x00, 0x28, 0x0f, 0xd1, -0x39, 0x78, 0xc9, 0x09, 0x0c, 0xd3, 0x69, 0x46, 0x38, 0x1c, 0x00, 0xf0, -0xcf, 0xf8, 0x68, 0x46, 0x00, 0x21, 0x00, 0xf0, 0x0b, 0xf8, 0x00, 0x28, -0x01, 0xd1, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x20, 0x04, 0xb0, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0xe8, 0x01, 0x00, 0x80, 0xf0, 0xb5, 0x82, 0xb0, -0x02, 0x1c, 0x41, 0x4b, 0xdd, 0x1d, 0xff, 0x35, 0x3a, 0x35, 0x2f, 0x78, -0x00, 0x2f, 0x01, 0xd0, 0x00, 0x27, 0x00, 0xe0, 0x01, 0x27, 0x2f, 0x70, -0x2f, 0x78, 0xfb, 0x00, 0xdb, 0x19, 0x5b, 0x01, 0x3a, 0x4f, 0xdc, 0x19, -0x40, 0x78, 0x00, 0x01, 0xc7, 0x1d, 0x09, 0x37, 0x00, 0x20, 0x83, 0x00, -0xd6, 0x58, 0xc0, 0x46, 0xe6, 0x50, 0x01, 0x30, 0x04, 0x28, 0xf8, 0xd3, -0x00, 0x29, 0x0f, 0xd0, 0x00, 0x22, 0xbb, 0x08, 0x01, 0x93, 0x83, 0x42, -0x0b, 0xd9, 0x13, 0x1c, 0x9b, 0x00, 0xcb, 0x58, 0x86, 0x00, 0xa3, 0x51, -0x01, 0x9b, 0x01, 0x30, 0x01, 0x32, 0x83, 0x42, 0xf5, 0xd8, 0x00, 0xe0, -0x10, 0x27, 0x2b, 0x48, 0x02, 0x6d, 0x80, 0x6e, 0x2a, 0x49, 0x82, 0x42, -0x03, 0xd8, 0x82, 0x1a, 0xcb, 0x6c, 0x9a, 0x1a, 0x00, 0xe0, 0x12, 0x1a, -0xba, 0x42, 0x05, 0xd8, 0x26, 0x48, 0x81, 0x6b, 0x01, 0x31, 0x81, 0x63, -0x01, 0x20, 0x37, 0xe0, 0xc3, 0x19, 0xca, 0x6c, 0x93, 0x42, 0x08, 0xd8, -0x22, 0x4a, 0x3a, 0x43, 0x00, 0x92, 0x0a, 0x1c, 0x49, 0x6c, 0x09, 0x18, -0x92, 0x6c, 0x23, 0x1c, 0x12, 0xe0, 0x16, 0x1a, 0x00, 0x96, 0x1b, 0x49, -0x49, 0x6c, 0x09, 0x18, 0x19, 0x48, 0x82, 0x6c, 0x03, 0x20, 0x23, 0x1c, -0xff, 0xf7, 0x50, 0xfe, 0xb8, 0x1b, 0x18, 0x4a, 0x02, 0x43, 0x00, 0x92, -0xa3, 0x19, 0x14, 0x48, 0x82, 0x6c, 0x41, 0x6c, -0x03, 0x20, 0xff, 0xf7, 0x45, 0xfe, 0x01, 0x20, 0x0d, 0x49, 0xc0, 0x46, -0x68, 0x70, 0x8a, 0x69, 0x92, 0x00, 0x52, 0x18, 0x17, 0x61, 0x8a, 0x69, -0x00, 0x2a, 0x02, 0xd0, 0x00, 0x27, 0x8f, 0x61, 0x00, 0xe0, 0x88, 0x61, -0x0c, 0x48, 0x02, 0x23, 0xc1, 0x6b, 0x19, 0x43, 0xc1, 0x63, 0x00, 0x20, -0x01, 0x27, 0x0a, 0x49, 0xc0, 0x46, 0x4f, 0x73, 0x02, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x28, 0x05, 0x00, 0x80, 0xfc, 0xba, 0x20, 0x40, -0x68, 0x0e, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, -0x00, 0x00, 0x19, 0x02, 0xe8, 0x0e, 0x00, 0x80, 0x18, 0x1a, 0x00, 0x80, -0x07, 0x49, 0x8a, 0x6e, 0x10, 0x18, 0x07, 0x4a, 0xd2, 0x6c, 0x13, 0x04, -0x1b, 0x0c, 0x83, 0x42, 0x00, 0xd8, 0x80, 0x1a, 0x88, 0x66, 0x88, 0x6e, -0x03, 0x49, 0xc0, 0x46, 0x48, 0x61, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, -0x7c, 0x29, 0x00, 0x80, 0x3c, 0xef, 0x20, 0x40, 0x06, 0x49, 0x4a, 0x6e, -0x10, 0x18, 0x06, 0x4a, 0x12, 0x6c, 0x82, 0x42, 0x00, 0xd8, 0x80, 0x1a, -0x48, 0x66, 0x48, 0x6e, 0x03, 0x49, 0xc0, 0x46, 0x08, 0x61, 0x70, 0x47, -0x68, 0x0e, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, 0x3c, 0xef, 0x20, 0x40, -0x05, 0x22, 0x0a, 0x60, 0x82, 0x88, 0xc0, 0x46, 0x8a, 0x80, 0x00, 0x22, -0x4a, 0x70, 0x40, 0x88, 0xc0, 0x46, 0x48, 0x80, 0xca, 0x80, 0x8a, 0x60, -0xca, 0x60, 0x70, 0x47, 0x05, 0x22, 0x02, 0x60, 0x00, 0x22, 0x82, 0x80, -0x42, 0x70, 0x41, 0x80, 0xc2, 0x80, 0x82, 0x60, 0xc2, 0x60, 0x70, 0x47, -0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x0e, 0x48, 0x41, 0x6b, 0x01, 0x31, -0x41, 0x63, 0x69, 0x46, 0x38, 0x1c, 0xff, 0xf7, 0xdd, 0xff, 0x38, 0x68, -0xc0, 0x46, 0x00, 0x90, 0x45, 0x20, 0x00, 0xab, 0x18, 0x70, 0x01, 0x27, -0xdf, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x11, 0xff, 0x00, 0x28, -0x01, 0xd1, 0x38, 0x1c, 0x00, 0xe0, 0x00, 0x20, 0x04, 0xb0, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0xa0, 0x82, 0x20, 0x40, 0x00, 0xb5, 0x84, 0xb0, -0xc1, 0x88, 0x09, 0x4a, 0xc0, 0x46, 0x91, 0x81, 0x69, 0x46, 0xff, 0xf7, -0xbd, 0xff, 0x01, 0x20, 0x40, 0x02, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, -0x00, 0x21, 0xff, 0xf7, 0xf5, 0xfe, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0xe8, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0xff, 0xf7, -0xc3, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x01, 0x20, 0x03, 0x49, 0xc0, 0x46, -0x08, 0x71, 0xa1, 0x21, 0x49, 0x03, 0x88, 0x60, 0x00, 0x20, 0x70, 0x47, -0x28, 0x0f, 0x00, 0x80, 0x00, 0x20, 0x04, 0x49, 0xc0, 0x46, 0x08, 0x71, -0xff, 0x21, 0xa1, 0x22, 0x52, 0x03, 0x01, 0x31, 0x91, 0x60, 0x70, 0x47, -0x28, 0x0f, 0x00, 0x80, 0x02, 0x20, 0xa1, 0x21, 0x49, 0x03, 0x88, 0x60, -0x00, 0x20, 0x70, 0x47, 0x01, 0x20, 0x40, 0x02, 0xa1, 0x21, 0x49, 0x03, -0x88, 0x60, 0x00, 0x20, 0x70, 0x47, 0xc0, 0x88, 0xc0, 0x06, 0xc0, 0x0e, -0xa1, 0x21, 0x49, 0x03, 0x48, 0x61, 0x02, 0x49, 0xc0, 0x46, 0xc8, 0x63, -0x00, 0x20, 0x70, 0x47, 0xe8, 0x1a, 0x00, 0x80, 0x80, 0xb5, 0x84, 0xb0, -0x08, 0x49, 0x0f, 0x6b, 0x69, 0x46, 0xff, 0xf7, 0x71, 0xff, 0xf8, 0x06, -0xc0, 0x0e, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, -0xa9, 0xfe, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x80, 0x00, 0x14, 0x40, 0x80, 0xb5, 0x85, 0xb0, 0x07, 0x1c, 0x69, 0x46, -0x38, 0x1c, 0xff, 0xf7, 0x5b, 0xff, 0xf8, 0x88, -0x04, 0xa9, 0x05, 0xf0, 0xf7, 0xf9, 0x01, 0xab, 0x58, 0x80, 0x01, 0xa8, -0x40, 0x88, 0x00, 0x28, 0x0f, 0xd0, 0x01, 0xa8, 0x40, 0x88, 0x80, 0x08, -0x03, 0x38, 0x80, 0x08, 0x01, 0x30, 0x04, 0x3b, 0x58, 0x70, 0x04, 0x98, -0x01, 0x68, 0xc0, 0x46, 0x02, 0x91, 0x40, 0x68, 0xc0, 0x46, 0x03, 0x90, -0x05, 0xe0, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, -0x18, 0x70, 0x04, 0x98, 0xc1, 0x1d, 0x01, 0x31, 0x68, 0x46, 0xff, 0xf7, -0x75, 0xfe, 0x01, 0x20, 0x05, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x90, 0xb5, 0x84, 0xb0, 0x14, 0x4f, 0x39, 0x7b, 0x00, 0x29, 0x20, 0xd1, -0xf9, 0x1d, 0xff, 0x31, 0x3a, 0x31, 0x49, 0x78, 0x00, 0x29, 0x1a, 0xd1, -0x10, 0x49, 0x05, 0x22, 0x00, 0x92, 0x08, 0x22, 0x00, 0xab, 0x5a, 0x80, -0x98, 0x80, 0x06, 0x20, 0x00, 0xab, 0x58, 0x70, 0x00, 0x24, 0xdc, 0x80, -0x08, 0x68, 0xc0, 0x46, 0x02, 0x90, 0x48, 0x68, 0xc0, 0x46, 0x03, 0x90, -0x01, 0x20, 0x38, 0x73, 0x68, 0x46, 0x08, 0x31, 0xff, 0xf7, 0x4c, 0xfe, -0x00, 0x28, 0x00, 0xd0, 0x3c, 0x73, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x28, 0x05, 0x00, 0x80, 0xa4, 0x2a, 0x00, 0x80, -0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xff, 0xf7, -0xf9, 0xfe, 0xba, 0x68, 0x0d, 0x4c, 0x0e, 0x48, 0x00, 0x2a, 0x05, 0xd1, -0x0d, 0x49, 0xff, 0xf7, 0xd6, 0xfc, 0x00, 0x28, 0x0c, 0xda, 0x05, 0xe0, -0xb9, 0x88, 0x0b, 0x4b, 0xff, 0xf7, 0xd1, 0xfc, 0x00, 0x28, 0x05, 0xda, -0x01, 0xab, 0x5c, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x22, 0xfe, -0x00, 0x20, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xff, 0xff, 0x00, 0x00, 0x15, 0x79, 0x21, 0x40, 0x8d, 0xd5, 0x21, 0x40, -0x25, 0xd5, 0x21, 0x40, 0x00, 0xb5, 0xc0, 0x88, 0x05, 0xf0, 0x5c, 0xf9, -0x00, 0x20, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xff, 0xf7, 0xe2, 0xfe, -0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xff, 0xf7, 0xdd, 0xfe, 0x08, 0xbc, -0x18, 0x47, 0x00, 0xb5, 0x01, 0x1c, 0x02, 0x20, 0x00, 0xf0, 0x02, 0xf8, -0x08, 0xbc, 0x18, 0x47, 0xb0, 0xb5, 0xc6, 0xb0, 0x04, 0x1c, 0x08, 0x1c, -0x69, 0x46, 0xff, 0xf7, 0xb5, 0xfe, 0x1c, 0x48, 0xff, 0xf7, 0x96, 0xfc, -0x07, 0x1c, 0x1b, 0x4a, 0x00, 0x21, 0x20, 0x1c, 0xff, 0xf7, 0x92, 0xfc, -0x00, 0x28, 0x1d, 0xd0, 0x04, 0xa9, 0x18, 0x4a, 0x20, 0x1c, 0xff, 0xf7, -0x8b, 0xfc, 0x04, 0x98, 0x04, 0x28, 0x05, 0xd9, 0x04, 0x98, 0x80, 0x08, -0x03, 0x38, 0x80, 0x08, 0x01, 0x30, 0x00, 0xe0, 0x00, 0x20, 0x00, 0xab, -0x58, 0x70, 0x06, 0xa8, 0x00, 0x78, 0xc0, 0x46, 0xd8, 0x80, 0x04, 0x98, -0xc0, 0x46, 0x02, 0x90, 0x07, 0x98, 0xc0, 0x46, 0x03, 0x90, 0x04, 0x33, -0x08, 0xad, 0x02, 0xe0, 0x45, 0x20, 0x00, 0xab, 0x18, 0x70, 0x09, 0x49, -0x38, 0x1c, 0xff, 0xf7, 0x6a, 0xfc, 0x68, 0x46, 0x29, 0x1c, 0xff, 0xf7, -0xc1, 0xfd, 0x01, 0x20, 0x46, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x24, 0x02, 0xff, 0xff, 0xcd, 0xc0, 0x21, 0x40, 0x29, 0xbf, 0x21, 0x40, -0x3c, 0x02, 0xff, 0xff, 0x00, 0xb5, 0x01, 0x1c, 0x02, 0x20, 0x00, 0xf0, -0x10, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x01, 0x1c, 0x01, 0x20, -0xff, 0xf7, 0xac, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x01, 0x1c, -0x01, 0x20, 0x00, 0xf0, 0x02, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0xf3, 0xb5, -0xc6, 0xb0, 0x0f, 0x1c, 0x69, 0x46, 0x38, 0x1c, -0xff, 0xf7, 0x58, 0xfe, 0x20, 0x48, 0xff, 0xf7, 0x39, 0xfc, 0x04, 0x1c, -0x78, 0x78, 0x00, 0x01, 0xba, 0x68, 0x04, 0x30, 0xfc, 0x2a, 0x23, 0xd8, -0xff, 0x23, 0x09, 0x33, 0x98, 0x42, 0x1f, 0xd8, 0xfd, 0x88, 0xf8, 0x68, -0xc0, 0x46, 0x04, 0x90, 0x05, 0xa9, 0xfb, 0x1d, 0x09, 0x33, 0x00, 0x20, -0x7e, 0x78, 0x00, 0x2e, 0x0d, 0xdd, 0x40, 0xcb, 0x40, 0xc1, 0x40, 0xcb, -0x40, 0xc1, 0x40, 0xcb, 0x40, 0xc1, 0x40, 0xcb, 0x40, 0xc1, 0x01, 0x30, -0x00, 0x04, 0x00, 0x0c, 0x7e, 0x78, 0x86, 0x42, 0xf1, 0xdc, 0x46, 0x98, -0x04, 0xa9, 0x2b, 0x1c, 0xff, 0xf7, 0x20, 0xfc, 0x00, 0x28, 0x05, 0xd0, -0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, 0x18, 0x70, -0x07, 0x49, 0x20, 0x1c, 0xff, 0xf7, 0x05, 0xfc, 0x68, 0x46, 0x00, 0x21, -0xff, 0xf7, 0x5c, 0xfd, 0x01, 0x20, 0x48, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x24, 0x02, 0xff, 0xff, 0x3c, 0x02, 0xff, 0xff, -0x00, 0xb5, 0xff, 0xf7, 0x27, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, -0xc6, 0xb0, 0x07, 0x1c, 0xfc, 0x88, 0x25, 0x4d, 0x68, 0x68, 0x01, 0x30, -0x69, 0x46, 0x68, 0x60, 0x38, 0x1c, 0xff, 0xf7, 0x01, 0xfe, 0x10, 0x2c, -0x08, 0xd3, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, -0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x17, 0xe0, 0x78, 0x78, 0x82, 0x00, -0xfb, 0x1d, 0x09, 0x33, 0x00, 0x20, 0xb9, 0x68, 0x00, 0x2a, 0x15, 0xd9, -0x40, 0xcb, 0x0f, 0x1c, 0x01, 0x31, 0xbe, 0x42, 0x0d, 0xd0, 0x00, 0xaa, -0x12, 0x78, 0x40, 0x23, 0x1a, 0x43, 0x00, 0xab, 0x1a, 0x70, 0x04, 0x22, -0xda, 0x80, 0x02, 0x90, 0x03, 0x91, 0x04, 0x33, 0x68, 0x46, 0x00, 0x21, -0x15, 0xe0, 0x01, 0x30, 0x90, 0x42, 0xe9, 0xd3, 0x00, 0xab, 0x5c, 0x70, -0x02, 0x94, 0x69, 0x68, 0xc0, 0x46, 0x03, 0x91, 0xa2, 0x00, 0x00, 0x20, -0x10, 0x33, 0x00, 0x2a, 0x05, 0xd9, 0x0f, 0x1c, 0x80, 0xc3, 0x01, 0x30, -0x01, 0x31, 0x90, 0x42, 0xf9, 0xd3, 0x68, 0x46, 0x04, 0xa9, 0xff, 0xf7, -0x03, 0xfd, 0x01, 0x20, 0x46, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x9c, 0x03, 0x00, 0x80, 0x90, 0xb4, 0x23, 0x48, 0x00, 0x68, 0x01, 0x21, -0x42, 0x09, 0x00, 0xd3, 0x00, 0x21, 0x00, 0x27, 0x3a, 0x1c, 0x43, 0x0b, -0x00, 0xd2, 0x02, 0x22, 0x11, 0x43, 0x1e, 0x4a, 0x20, 0x24, 0xd3, 0x68, -0x01, 0x2b, 0x2e, 0xd1, 0x80, 0x0a, 0x00, 0xd2, 0x00, 0x24, 0x0c, 0x43, -0x20, 0x1c, 0x1b, 0x23, 0xdb, 0x01, 0xd1, 0x18, 0x89, 0x8b, 0x09, 0x0b, -0x00, 0xd2, 0x04, 0x27, 0x38, 0x43, 0xd1, 0x6f, 0x09, 0x68, 0x09, 0x0a, -0x07, 0xd2, 0xd1, 0x1d, 0x79, 0x31, 0x09, 0x68, 0x09, 0x68, 0x09, 0x0a, -0x01, 0xd3, 0x08, 0x23, 0x18, 0x43, 0xe3, 0x23, 0x1b, 0x01, 0xd1, 0x18, -0x89, 0x79, 0x03, 0x29, 0x02, 0xd1, 0xff, 0x23, 0x01, 0x33, 0x18, 0x43, -0x0b, 0x49, 0x09, 0x6a, 0x10, 0x22, 0x4b, 0x0a, 0x00, 0xd2, 0x00, 0x22, -0x10, 0x43, 0x89, 0x07, 0x89, 0x0f, 0x89, 0x01, 0x08, 0x43, 0x90, 0xbc, -0x70, 0x47, 0x40, 0x0c, 0x00, 0xd2, 0x00, 0x24, 0x0c, 0x43, 0x20, 0x1c, -0xec, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x68, 0x0e, 0x00, 0x80, -0xc0, 0x00, 0x18, 0x40, 0xf0, 0xb5, 0x3a, 0x4c, 0x20, 0x1c, 0x05, 0xf0, -0x75, 0xfc, 0x39, 0x48, 0xe3, 0x23, 0x1b, 0x01, 0xc7, 0x18, 0xb9, 0x79, -0x37, 0x4e, 0xc5, 0x1d, 0x79, 0x35, 0x06, 0x29, 0x62, 0xd2, 0x02, 0xa3, -0x5b, 0x5c, 0x5b, 0x00, 0x9f, 0x44, 0x00, 0x1c, -0x03, 0x0e, 0x1e, 0x37, 0x4e, 0x55, 0x01, 0x20, 0xb8, 0x71, 0x00, 0x20, -0xb0, 0x60, 0xff, 0xf7, 0x95, 0xff, 0x05, 0x23, 0x98, 0x43, 0x00, 0xf0, -0x6f, 0xf8, 0x0c, 0xe0, 0xff, 0xf7, 0x8e, 0xff, 0xc0, 0x08, 0x06, 0xd3, -0xb0, 0x68, 0x41, 0x1c, 0xb1, 0x60, 0x0a, 0x28, 0x03, 0xd9, 0x04, 0x20, -0x00, 0xe0, 0x02, 0x20, 0xb8, 0x71, 0x64, 0x22, 0x20, 0x1c, 0x2b, 0xe0, -0x06, 0x1c, 0xc0, 0x6f, 0x80, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, -0x03, 0x20, 0xb8, 0x71, 0x20, 0x1c, 0x20, 0x4a, 0x00, 0x21, 0x05, 0xf0, -0x07, 0xfc, 0xf0, 0x6f, 0x04, 0x23, 0x01, 0x68, 0x99, 0x43, 0x01, 0x60, -0x28, 0x68, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x05, 0x21, 0xb9, 0x71, 0x29, 0x68, 0x04, 0x23, 0x0a, 0x68, -0x9a, 0x43, 0x0a, 0x60, 0xc0, 0x6f, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, -0xff, 0xf7, 0x5a, 0xff, 0x08, 0x23, 0x18, 0x43, 0x00, 0xf0, 0x34, 0xf8, -0x20, 0x1c, 0x10, 0x4a, 0x00, 0x21, 0x05, 0xf0, 0xe5, 0xfb, 0xe5, 0xe7, -0xff, 0xf7, 0x4e, 0xff, 0x04, 0x23, 0x18, 0x43, 0x00, 0xf0, 0x28, 0xf8, -0xde, 0xe7, 0x00, 0x20, 0x29, 0x68, 0x60, 0x23, 0x0a, 0x68, 0x9a, 0x43, -0x0a, 0x60, 0xff, 0xf7, 0xe1, 0xfa, 0xd5, 0xe7, 0x06, 0x20, 0xb8, 0x71, -0xd2, 0xe7, 0x00, 0x00, 0x99, 0x7c, 0x21, 0x40, 0x68, 0x0e, 0x00, 0x80, -0x9c, 0x03, 0x00, 0x80, 0x30, 0x75, 0x00, 0x00, 0x10, 0x27, 0x00, 0x00, -0x00, 0xb5, 0x00, 0x20, 0x04, 0x49, 0xc0, 0x46, 0x88, 0x71, 0x04, 0x48, -0x01, 0x22, 0x00, 0x21, 0x05, 0xf0, 0xbc, 0xfb, 0x08, 0xbc, 0x18, 0x47, -0x98, 0x1c, 0x00, 0x80, 0x99, 0x7c, 0x21, 0x40, 0x90, 0xb5, 0x07, 0x1c, -0x31, 0x48, 0x00, 0x68, 0x79, 0x08, 0x03, 0xd3, 0x10, 0x23, 0x01, 0x1c, -0x99, 0x43, 0x01, 0xe0, 0x10, 0x21, 0x01, 0x43, 0x2d, 0x4c, 0xe2, 0x68, -0x01, 0x2a, 0x05, 0xd1, 0x22, 0x79, 0x00, 0x2a, 0x02, 0xd0, 0x01, 0x23, -0x9b, 0x02, 0x19, 0x43, 0x81, 0x42, 0x02, 0xd0, 0x01, 0x20, 0x00, 0x05, -0x01, 0x60, 0xe0, 0x68, 0x01, 0x28, 0x20, 0xd1, 0x1b, 0x23, 0xdb, 0x01, -0xe0, 0x18, 0x80, 0x8b, 0xf9, 0x08, 0x04, 0xd3, 0x01, 0x23, 0xdb, 0x02, -0x01, 0x1c, 0x99, 0x43, 0x01, 0xe0, 0x01, 0x21, 0xc9, 0x02, 0x81, 0x42, -0x02, 0xd0, 0x00, 0x20, 0x03, 0xf0, 0xca, 0xf9, 0x38, 0x09, 0x07, 0xd3, -0xe0, 0x6f, 0x80, 0x23, 0x01, 0x68, 0x99, 0x43, 0x01, 0x60, 0xe0, 0x18, -0x00, 0x68, 0x00, 0xe0, 0xe0, 0x6f, 0x80, 0x23, 0x01, 0x68, 0x19, 0x43, -0x01, 0x60, 0x15, 0x48, 0x01, 0x6a, 0x78, 0x09, 0x03, 0xd3, 0xff, 0x20, -0x01, 0x30, 0x08, 0x43, 0x03, 0xe0, 0xff, 0x23, 0x08, 0x1c, 0x01, 0x33, -0x98, 0x43, 0x80, 0x08, 0x80, 0x00, 0xba, 0x09, 0x92, 0x07, 0x92, 0x0f, -0x10, 0x43, 0x88, 0x42, 0x02, 0xd0, 0x0c, 0x49, 0xc0, 0x46, 0x08, 0x62, -0xe1, 0x68, 0x01, 0x29, 0x08, 0xd1, 0x79, 0x0a, 0x06, 0xd3, 0xff, 0x23, -0x04, 0x33, 0x18, 0x40, 0x03, 0x28, 0x01, 0xd1, 0xff, 0xf7, 0x8e, 0xff, -0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, -0x68, 0x0e, 0x00, 0x80, 0xc0, 0x00, 0x18, 0x40, 0xc0, 0x00, 0x18, 0x00, -0x80, 0xb5, 0xff, 0xf7, 0xb1, 0xfe, 0x80, 0x09, 0x1b, 0xd2, 0x0f, 0x48, -0xe3, 0x23, 0x1b, 0x01, 0xc1, 0x18, 0x4a, 0x79, 0x00, 0x2a, 0x14, 0xd1, -0x01, 0x22, 0x4a, 0x71, 0x00, 0x27, 0x80, 0x30, 0x00, 0x68, 0x60, 0x23, -0x01, 0x68, 0x99, 0x43, 0x01, 0x60, 0x08, 0x48, -0x06, 0xe0, 0x02, 0x20, 0x03, 0xf0, 0x7e, 0xfb, 0x07, 0x20, 0x03, 0xf0, -0x4d, 0xfb, 0x38, 0x1c, 0xff, 0xf7, 0x34, 0xfa, 0xf5, 0xe7, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0xf4, 0x01, 0xff, 0xff, -0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xff, 0xf7, 0x43, 0xfc, 0xff, 0xf7, -0x85, 0xfe, 0x01, 0xab, 0x58, 0x80, 0x08, 0x48, 0x00, 0x68, 0xc0, 0x46, -0x02, 0x90, 0x07, 0x48, 0x00, 0x6a, 0xc0, 0x46, 0x03, 0x90, 0x68, 0x46, -0x00, 0x21, 0xff, 0xf7, 0x73, 0xfb, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0xc0, 0x00, 0x18, 0x40, -0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xff, 0xf7, -0x23, 0xfc, 0xf8, 0x88, 0xff, 0xf7, 0x42, 0xff, 0xff, 0xf7, 0x62, 0xfe, -0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x58, 0xfb, -0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xb0, 0xb5, -0xc6, 0xb0, 0xc7, 0x88, 0x69, 0x46, 0xff, 0xf7, 0x0d, 0xfc, 0x01, 0x24, -0x16, 0x4b, 0x9f, 0x42, 0x0a, 0xd9, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, -0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x68, 0x46, -0x00, 0x21, 0x17, 0xe0, 0x10, 0x48, 0xff, 0xf7, 0xdf, 0xf9, 0x05, 0x1c, -0x0f, 0x4a, 0x38, 0x1c, 0x04, 0xa9, 0xff, 0xf7, 0xdb, 0xf9, 0x0e, 0x49, -0x28, 0x1c, 0xff, 0xf7, 0xd6, 0xf9, 0x10, 0x20, 0x00, 0xab, 0x58, 0x70, -0x04, 0x98, 0xc0, 0x46, 0x02, 0x90, 0x05, 0x98, 0xc0, 0x46, 0x03, 0x90, -0x68, 0x46, 0x06, 0xa9, 0xff, 0xf7, 0x24, 0xfb, 0x20, 0x1c, 0x46, 0xb0, -0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, -0x24, 0x02, 0xff, 0xff, 0x29, 0xbf, 0x21, 0x40, 0x3c, 0x02, 0xff, 0xff, +0x07, 0xe0, 0x03, 0x9d, 0xe8, 0x6a, 0x30, 0x28, 0x03, 0xd2, 0x30, 0x20, +0x03, 0x9d, 0xc0, 0x46, 0xe8, 0x62, 0x19, 0x4a, 0x78, 0x69, 0x00, 0x28, +0x2a, 0xd0, 0x00, 0x21, 0x01, 0x23, 0x18, 0x43, 0x78, 0x61, 0x00, 0x20, +0x01, 0x24, 0x00, 0x22, 0x13, 0x4e, 0x7b, 0x69, 0x23, 0x40, 0x10, 0xd0, +0x93, 0x00, 0x9b, 0x18, 0x9b, 0x00, 0x12, 0x4d, 0x5b, 0x19, 0x9d, 0x78, +0x85, 0x42, 0x08, 0xd1, 0x1d, 0x69, 0x0b, 0x1c, 0x9b, 0x00, 0x9e, 0x19, +0x2d, 0x23, 0x9b, 0x01, 0xf3, 0x18, 0xdd, 0x63, 0x01, 0x31, 0x64, 0x00, +0x01, 0x32, 0x0b, 0x2a, 0xe6, 0xd3, 0x01, 0x30, 0x09, 0x28, 0xe1, 0xd3, +0x00, 0x20, 0x89, 0x00, 0x04, 0x4a, 0x89, 0x18, 0x2d, 0x23, 0x9b, 0x01, +0xc9, 0x18, 0xc8, 0x63, 0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x68, 0x0e, 0x00, 0x80, 0x30, 0x53, 0xff, 0xff, 0x00, 0x01, 0x00, 0x80, +0x00, 0x47, 0x08, 0x47, 0x10, 0x47, 0x18, 0x47, 0x78, 0x47, 0xc0, 0x46, +0x18, 0xc0, 0x9f, 0xe5, 0x1c, 0xff, 0x2f, 0xe1, 0x78, 0x47, 0xc0, 0x46, +0x10, 0xc0, 0x9f, 0xe5, 0x1c, 0xff, 0x2f, 0xe1, 0x78, 0x47, 0xc0, 0x46, +0x08, 0xc0, 0x9f, 0xe5, 0x1c, 0xff, 0x2f, 0xe1, 0x38, 0x52, 0xff, 0xff, +0x88, 0x51, 0xff, 0xff, 0xd5, 0xb0, 0x21, 0x40, 0xf0, 0xb5, 0x04, 0x20, +0x1a, 0x49, 0x01, 0x25, 0x08, 0x60, 0x1a, 0x4f, 0xbb, 0x23, 0x1b, 0x01, +0xf8, 0x18, 0x05, 0x73, 0x18, 0x48, 0x41, 0x6b, 0x2c, 0x05, 0x00, 0x20, +0x7a, 0x6e, 0x17, 0x4b, 0x8a, 0x42, 0x1d, 0xd0, +0x19, 0x7b, 0x00, 0x29, 0x17, 0xd1, 0xd9, 0x1d, 0xff, 0x31, 0x3a, 0x31, +0x49, 0x78, 0x1e, 0x1c, 0x00, 0x29, 0x10, 0xd1, 0xb0, 0x60, 0x10, 0x20, +0x70, 0x60, 0x10, 0x4a, 0x10, 0x49, 0xff, 0xf7, 0xc3, 0xff, 0x00, 0x28, +0x07, 0xd0, 0x35, 0x73, 0x04, 0x23, 0xb8, 0x69, 0x18, 0x43, 0xb8, 0x61, +0x20, 0x61, 0x00, 0xf0, 0x17, 0xf8, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x18, 0x73, 0x04, 0x23, 0xb8, 0x69, 0x98, 0x43, 0xb8, 0x61, 0x20, 0x61, +0xf5, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x68, 0x0e, 0x00, 0x80, +0x00, 0x01, 0x18, 0x40, 0x28, 0x05, 0x00, 0x80, 0x20, 0x55, 0xff, 0xff, +0x7d, 0x71, 0x21, 0x40, 0xf8, 0xb5, 0x15, 0x4f, 0x39, 0x6c, 0x15, 0x48, +0x40, 0x6e, 0x0c, 0x1a, 0x14, 0x4e, 0x71, 0x68, 0x14, 0x4d, 0xa1, 0x42, +0x06, 0xd8, 0x14, 0x4a, 0x0a, 0x43, 0x00, 0x92, 0xb9, 0x6b, 0x09, 0x18, +0xfa, 0x6b, 0x11, 0xe0, 0x11, 0x22, 0x52, 0x05, 0x22, 0x43, 0x00, 0x92, +0xb9, 0x6b, 0x09, 0x18, 0x00, 0x20, 0xfa, 0x6b, 0x2b, 0x1c, 0xff, 0xf7, +0x8d, 0xff, 0x70, 0x68, 0x00, 0x1b, 0x0a, 0x4a, 0x02, 0x43, 0x00, 0x92, +0xb9, 0x6b, 0xfa, 0x6b, 0x00, 0x20, 0x2b, 0x1c, 0xff, 0xf7, 0x82, 0xff, +0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x7c, 0x29, 0x00, 0x80, +0x68, 0x0e, 0x00, 0x80, 0x28, 0x05, 0x00, 0x80, 0x44, 0x80, 0x20, 0x40, +0x00, 0x00, 0x37, 0x02, 0xf0, 0xb5, 0x2b, 0x4f, 0xb8, 0x68, 0x79, 0x68, +0xc0, 0x19, 0x20, 0x30, 0x29, 0x4a, 0xff, 0xf7, 0x63, 0xff, 0x01, 0x20, +0xc0, 0x02, 0x28, 0x49, 0xc0, 0x46, 0x08, 0x60, 0xb9, 0x68, 0x38, 0x1c, +0x26, 0x4d, 0x00, 0x24, 0x26, 0x4e, 0xef, 0x1d, 0x79, 0x37, 0x00, 0x29, +0x31, 0xd1, 0x31, 0x68, 0x0a, 0x78, 0x12, 0x0a, 0x03, 0xd2, 0x04, 0x73, +0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x49, 0x78, 0x00, 0x29, 0x0c, 0xd1, +0x05, 0x1c, 0x40, 0x68, 0x00, 0xf0, 0x3e, 0xf9, 0x30, 0x68, 0x00, 0xf0, +0x67, 0xf8, 0x00, 0x28, 0x26, 0xd1, 0x2c, 0x73, 0xff, 0xf7, 0x58, 0xff, +0x22, 0xe0, 0x09, 0x01, 0x07, 0x1c, 0x41, 0x60, 0x08, 0x1c, 0x17, 0x4a, +0x17, 0x49, 0xff, 0xf7, 0x35, 0xff, 0x00, 0x28, 0x07, 0xd1, 0x3c, 0x73, +0x04, 0x23, 0xa8, 0x69, 0x98, 0x43, 0x99, 0x04, 0xa8, 0x61, 0x08, 0x61, +0xda, 0xe7, 0x10, 0x20, 0x00, 0xf0, 0x20, 0xf9, 0x10, 0x20, 0xb8, 0x60, +0xff, 0xf7, 0x82, 0xff, 0xd2, 0xe7, 0x05, 0x1c, 0x40, 0x68, 0x00, 0xf0, +0x17, 0xf9, 0x30, 0x68, 0x00, 0xf0, 0x40, 0xf8, 0x00, 0x28, 0xd8, 0xd0, +0x02, 0x23, 0xf8, 0x6b, 0x18, 0x43, 0xf8, 0x63, 0xc4, 0xe7, 0x00, 0x00, +0x28, 0x05, 0x00, 0x80, 0xa5, 0x55, 0xff, 0xff, 0x00, 0x00, 0x00, 0xb0, +0x68, 0x0e, 0x00, 0x80, 0xe4, 0x01, 0x00, 0x80, 0x20, 0x55, 0xff, 0xff, +0x7d, 0x71, 0x21, 0x40, 0x90, 0xb5, 0x01, 0x20, 0x40, 0x03, 0x10, 0x49, +0x00, 0x27, 0x08, 0x60, 0x0f, 0x4c, 0xe0, 0x1d, 0xff, 0x30, 0x3a, 0x30, +0x47, 0x70, 0xe0, 0x69, 0x80, 0x00, 0x00, 0x19, 0x00, 0x69, 0x00, 0xf0, +0xd7, 0xf8, 0xe0, 0x69, 0x00, 0x28, 0x01, 0xd0, 0xe7, 0x61, 0x01, 0xe0, +0x01, 0x20, 0xe0, 0x61, 0x07, 0x48, 0x02, 0x23, 0xc1, 0x6b, 0x19, 0x43, +0xc1, 0x63, 0x27, 0x73, 0xff, 0xf7, 0x00, 0xff, 0x90, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x28, 0x05, 0x00, 0x80, +0xe8, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x78, 0x88, +0x6d, 0x28, 0x03, 0xdb, 0x38, 0x1c, 0x00, 0xf0, +0xf7, 0xf8, 0x17, 0xe0, 0x80, 0x00, 0x0d, 0x49, 0x09, 0x58, 0x38, 0x1c, +0xff, 0xf7, 0xcb, 0xfe, 0x00, 0x28, 0x0f, 0xd1, 0x39, 0x78, 0xc9, 0x09, +0x0c, 0xd3, 0x69, 0x46, 0x38, 0x1c, 0x00, 0xf0, 0xcf, 0xf8, 0x68, 0x46, +0x00, 0x21, 0x00, 0xf0, 0x0b, 0xf8, 0x00, 0x28, 0x01, 0xd1, 0x01, 0x20, +0x00, 0xe0, 0x00, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0xe8, 0x01, 0x00, 0x80, 0xf0, 0xb5, 0x82, 0xb0, 0x02, 0x1c, 0x41, 0x4b, +0xdd, 0x1d, 0xff, 0x35, 0x3a, 0x35, 0x2f, 0x78, 0x00, 0x2f, 0x01, 0xd0, +0x00, 0x27, 0x00, 0xe0, 0x01, 0x27, 0x2f, 0x70, 0x2f, 0x78, 0xfb, 0x00, +0xdb, 0x19, 0x5b, 0x01, 0x3a, 0x4f, 0xdc, 0x19, 0x40, 0x78, 0x00, 0x01, +0xc7, 0x1d, 0x09, 0x37, 0x00, 0x20, 0x83, 0x00, 0xd6, 0x58, 0xc0, 0x46, +0xe6, 0x50, 0x01, 0x30, 0x04, 0x28, 0xf8, 0xd3, 0x00, 0x29, 0x0f, 0xd0, +0x00, 0x22, 0xbb, 0x08, 0x01, 0x93, 0x83, 0x42, 0x0b, 0xd9, 0x13, 0x1c, +0x9b, 0x00, 0xcb, 0x58, 0x86, 0x00, 0xa3, 0x51, 0x01, 0x9b, 0x01, 0x30, +0x01, 0x32, 0x83, 0x42, 0xf5, 0xd8, 0x00, 0xe0, 0x10, 0x27, 0x2b, 0x48, +0x02, 0x6d, 0x80, 0x6e, 0x2a, 0x49, 0x82, 0x42, 0x03, 0xd8, 0x82, 0x1a, +0xcb, 0x6c, 0x9a, 0x1a, 0x00, 0xe0, 0x12, 0x1a, 0xba, 0x42, 0x05, 0xd8, +0x26, 0x48, 0x81, 0x6b, 0x01, 0x31, 0x81, 0x63, 0x01, 0x20, 0x37, 0xe0, +0xc3, 0x19, 0xca, 0x6c, 0x93, 0x42, 0x08, 0xd8, 0x22, 0x4a, 0x3a, 0x43, +0x00, 0x92, 0x0a, 0x1c, 0x49, 0x6c, 0x09, 0x18, 0x92, 0x6c, 0x23, 0x1c, +0x12, 0xe0, 0x16, 0x1a, 0x00, 0x96, 0x1b, 0x49, 0x49, 0x6c, 0x09, 0x18, +0x19, 0x48, 0x82, 0x6c, 0x03, 0x20, 0x23, 0x1c, 0xff, 0xf7, 0x5e, 0xfe, +0xb8, 0x1b, 0x18, 0x4a, 0x02, 0x43, 0x00, 0x92, 0xa3, 0x19, 0x14, 0x48, +0x82, 0x6c, 0x41, 0x6c, 0x03, 0x20, 0xff, 0xf7, 0x53, 0xfe, 0x01, 0x20, +0x0d, 0x49, 0xc0, 0x46, 0x68, 0x70, 0x8a, 0x69, 0x92, 0x00, 0x52, 0x18, +0x17, 0x61, 0x8a, 0x69, 0x00, 0x2a, 0x02, 0xd0, 0x00, 0x27, 0x8f, 0x61, +0x00, 0xe0, 0x88, 0x61, 0x0c, 0x48, 0x02, 0x23, 0xc1, 0x6b, 0x19, 0x43, +0xc1, 0x63, 0x00, 0x20, 0x01, 0x27, 0x0a, 0x49, 0xc0, 0x46, 0x4f, 0x73, +0x02, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x28, 0x05, 0x00, 0x80, +0x50, 0xba, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, +0xa0, 0x82, 0x20, 0x40, 0x00, 0x00, 0x19, 0x02, 0xe8, 0x0e, 0x00, 0x80, +0x18, 0x1a, 0x00, 0x80, 0x07, 0x49, 0x8a, 0x6e, 0x10, 0x18, 0x07, 0x4a, +0xd2, 0x6c, 0x13, 0x04, 0x1b, 0x0c, 0x83, 0x42, 0x00, 0xd8, 0x80, 0x1a, +0x88, 0x66, 0x88, 0x6e, 0x03, 0x49, 0xc0, 0x46, 0x48, 0x61, 0x70, 0x47, +0x68, 0x0e, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, 0x90, 0xee, 0x20, 0x40, +0x06, 0x49, 0x4a, 0x6e, 0x10, 0x18, 0x06, 0x4a, 0x12, 0x6c, 0x82, 0x42, +0x00, 0xd8, 0x80, 0x1a, 0x48, 0x66, 0x48, 0x6e, 0x03, 0x49, 0xc0, 0x46, +0x08, 0x61, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x7c, 0x29, 0x00, 0x80, +0x90, 0xee, 0x20, 0x40, 0x05, 0x22, 0x0a, 0x60, 0x82, 0x88, 0xc0, 0x46, +0x8a, 0x80, 0x00, 0x22, 0x4a, 0x70, 0x40, 0x88, 0xc0, 0x46, 0x48, 0x80, +0xca, 0x80, 0x8a, 0x60, 0xca, 0x60, 0x70, 0x47, 0x05, 0x22, 0x02, 0x60, +0x00, 0x22, 0x82, 0x80, 0x42, 0x70, 0x41, 0x80, 0xc2, 0x80, 0x82, 0x60, +0xc2, 0x60, 0x70, 0x47, 0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x0e, 0x48, +0x41, 0x6b, 0x01, 0x31, 0x41, 0x63, 0x69, 0x46, +0x38, 0x1c, 0xff, 0xf7, 0xdd, 0xff, 0x38, 0x68, 0xc0, 0x46, 0x00, 0x90, +0x45, 0x20, 0x00, 0xab, 0x18, 0x70, 0x01, 0x27, 0xdf, 0x80, 0x68, 0x46, +0x00, 0x21, 0xff, 0xf7, 0x11, 0xff, 0x00, 0x28, 0x01, 0xd1, 0x38, 0x1c, +0x00, 0xe0, 0x00, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0xa0, 0x82, 0x20, 0x40, 0x00, 0xb5, 0x84, 0xb0, 0xc1, 0x88, 0x09, 0x4a, +0xc0, 0x46, 0x91, 0x81, 0x69, 0x46, 0xff, 0xf7, 0xbd, 0xff, 0x01, 0x20, +0x40, 0x02, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, +0xf5, 0xfe, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0xe8, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0xff, 0xf7, 0xc3, 0xff, 0x08, 0xbc, +0x18, 0x47, 0x01, 0x20, 0x03, 0x49, 0xc0, 0x46, 0x08, 0x71, 0xa1, 0x21, +0x49, 0x03, 0x88, 0x60, 0x00, 0x20, 0x70, 0x47, 0x28, 0x0f, 0x00, 0x80, +0x00, 0x20, 0x04, 0x49, 0xc0, 0x46, 0x08, 0x71, 0xff, 0x21, 0xa1, 0x22, +0x52, 0x03, 0x01, 0x31, 0x91, 0x60, 0x70, 0x47, 0x28, 0x0f, 0x00, 0x80, +0x02, 0x20, 0xa1, 0x21, 0x49, 0x03, 0x88, 0x60, 0x00, 0x20, 0x70, 0x47, +0x01, 0x20, 0x40, 0x02, 0xa1, 0x21, 0x49, 0x03, 0x88, 0x60, 0x00, 0x20, +0x70, 0x47, 0xc0, 0x88, 0xc0, 0x06, 0xc0, 0x0e, 0xa1, 0x21, 0x49, 0x03, +0x48, 0x61, 0x02, 0x49, 0xc0, 0x46, 0xc8, 0x63, 0x00, 0x20, 0x70, 0x47, +0xe8, 0x1a, 0x00, 0x80, 0x80, 0xb5, 0x84, 0xb0, 0x08, 0x49, 0x0f, 0x6b, +0x69, 0x46, 0xff, 0xf7, 0x71, 0xff, 0xf8, 0x06, 0xc0, 0x0e, 0x01, 0xab, +0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0xa9, 0xfe, 0x01, 0x20, +0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x80, 0x00, 0x14, 0x40, +0x80, 0xb5, 0x85, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xff, 0xf7, +0x5b, 0xff, 0xf8, 0x88, 0x04, 0xa9, 0x03, 0xf0, 0xc9, 0xff, 0x01, 0xab, +0x58, 0x80, 0x01, 0xa8, 0x40, 0x88, 0x00, 0x28, 0x0f, 0xd0, 0x01, 0xa8, +0x40, 0x88, 0x80, 0x08, 0x03, 0x38, 0x80, 0x08, 0x01, 0x30, 0x04, 0x3b, +0x58, 0x70, 0x04, 0x98, 0x01, 0x68, 0xc0, 0x46, 0x02, 0x91, 0x40, 0x68, +0xc0, 0x46, 0x03, 0x90, 0x05, 0xe0, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, +0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x04, 0x98, 0xc1, 0x1d, 0x01, 0x31, +0x68, 0x46, 0xff, 0xf7, 0x75, 0xfe, 0x01, 0x20, 0x05, 0xb0, 0x80, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0x14, 0x4f, 0x39, 0x7b, +0x00, 0x29, 0x20, 0xd1, 0xf9, 0x1d, 0xff, 0x31, 0x3a, 0x31, 0x49, 0x78, +0x00, 0x29, 0x1a, 0xd1, 0x10, 0x49, 0x05, 0x22, 0x00, 0x92, 0x08, 0x22, +0x00, 0xab, 0x5a, 0x80, 0x98, 0x80, 0x06, 0x20, 0x00, 0xab, 0x58, 0x70, +0x00, 0x24, 0xdc, 0x80, 0x08, 0x68, 0xc0, 0x46, 0x02, 0x90, 0x48, 0x68, +0xc0, 0x46, 0x03, 0x90, 0x01, 0x20, 0x38, 0x73, 0x68, 0x46, 0x08, 0x31, +0xff, 0xf7, 0x4c, 0xfe, 0x00, 0x28, 0x00, 0xd0, 0x3c, 0x73, 0x04, 0xb0, +0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x28, 0x05, 0x00, 0x80, +0xa4, 0x2a, 0x00, 0x80, 0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, +0x38, 0x1c, 0xff, 0xf7, 0xf9, 0xfe, 0xba, 0x68, 0x0d, 0x4c, 0x0e, 0x48, +0x00, 0x2a, 0x05, 0xd1, 0x0d, 0x49, 0xff, 0xf7, 0xe4, 0xfc, 0x00, 0x28, +0x0c, 0xda, 0x05, 0xe0, 0xb9, 0x88, 0x0b, 0x4b, 0xff, 0xf7, 0xdf, 0xfc, +0x00, 0x28, 0x05, 0xda, 0x01, 0xab, 0x5c, 0x80, 0x68, 0x46, 0x00, 0x21, +0xff, 0xf7, 0x22, 0xfe, 0x00, 0x20, 0x04, 0xb0, +0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, +0x0d, 0x76, 0x21, 0x40, 0xc1, 0xbd, 0x21, 0x40, 0x59, 0xbd, 0x21, 0x40, +0x00, 0xb5, 0xc0, 0x88, 0x03, 0xf0, 0x2e, 0xff, 0x00, 0x20, 0x08, 0xbc, +0x18, 0x47, 0x00, 0xb5, 0xff, 0xf7, 0xe2, 0xfe, 0x08, 0xbc, 0x18, 0x47, +0x00, 0xb5, 0xff, 0xf7, 0xdd, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, +0x01, 0x1c, 0x02, 0x20, 0x00, 0xf0, 0x02, 0xf8, 0x08, 0xbc, 0x18, 0x47, +0xb0, 0xb5, 0xc6, 0xb0, 0x07, 0x1c, 0x08, 0x1c, 0x69, 0x46, 0xff, 0xf7, +0xb5, 0xfe, 0x21, 0x48, 0xff, 0xf7, 0xa4, 0xfc, 0x04, 0x1c, 0x20, 0x4a, +0x00, 0x21, 0x38, 0x1c, 0xff, 0xf7, 0xa0, 0xfc, 0x00, 0x28, 0x27, 0xd0, +0x04, 0xa9, 0x1d, 0x4a, 0x38, 0x1c, 0xff, 0xf7, 0x99, 0xfc, 0x04, 0xa8, +0x00, 0x23, 0x01, 0x2f, 0x06, 0xd1, 0x0c, 0xaa, 0x02, 0x32, 0x00, 0x21, +0x13, 0x60, 0x01, 0x31, 0x10, 0x29, 0xfb, 0xd3, 0x01, 0x68, 0x04, 0x29, +0x04, 0xd9, 0x89, 0x08, 0x03, 0x39, 0x89, 0x08, 0x01, 0x31, 0x00, 0xe0, +0x19, 0x1c, 0x00, 0xab, 0x59, 0x70, 0x06, 0xa9, 0x09, 0x78, 0xc0, 0x46, +0xd9, 0x80, 0x00, 0x68, 0xc0, 0x46, 0x02, 0x90, 0x07, 0x98, 0xc0, 0x46, +0x03, 0x90, 0x04, 0x33, 0x08, 0xad, 0x02, 0xe0, 0x45, 0x20, 0x00, 0xab, +0x18, 0x70, 0x09, 0x49, 0x20, 0x1c, 0xff, 0xf7, 0x6e, 0xfc, 0x68, 0x46, +0x29, 0x1c, 0xff, 0xf7, 0xb7, 0xfd, 0x01, 0x20, 0x46, 0xb0, 0xb0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x24, 0x02, 0xff, 0xff, 0x59, 0xb1, 0x21, 0x40, +0x9d, 0xaf, 0x21, 0x40, 0x3c, 0x02, 0xff, 0xff, 0x00, 0xb5, 0x01, 0x1c, +0x02, 0x20, 0x00, 0xf0, 0x10, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, +0x01, 0x1c, 0x01, 0x20, 0xff, 0xf7, 0xa2, 0xff, 0x08, 0xbc, 0x18, 0x47, +0x00, 0xb5, 0x01, 0x1c, 0x01, 0x20, 0x00, 0xf0, 0x02, 0xf8, 0x08, 0xbc, +0x18, 0x47, 0xf0, 0xb5, 0xc7, 0xb0, 0x04, 0x1c, 0x0f, 0x1c, 0x38, 0x1c, +0x01, 0xa9, 0xff, 0xf7, 0x4d, 0xfe, 0x21, 0x48, 0xff, 0xf7, 0x3c, 0xfc, +0x00, 0x90, 0x78, 0x78, 0x00, 0x01, 0xba, 0x68, 0x04, 0x30, 0xfc, 0x2a, +0x25, 0xd8, 0xff, 0x23, 0x09, 0x33, 0x98, 0x42, 0x21, 0xd8, 0x19, 0x2c, +0x1f, 0xd8, 0xfd, 0x88, 0xf8, 0x68, 0xc0, 0x46, 0x05, 0x90, 0xf9, 0x1d, +0x09, 0x31, 0x06, 0xab, 0x00, 0x20, 0x7e, 0x78, 0x00, 0x2e, 0x0d, 0xdd, +0x40, 0xc9, 0x40, 0xc3, 0x40, 0xc9, 0x40, 0xc3, 0x40, 0xc9, 0x40, 0xc3, +0x40, 0xc9, 0x40, 0xc3, 0x01, 0x30, 0x00, 0x04, 0x00, 0x0c, 0x7e, 0x78, +0x86, 0x42, 0xf1, 0xdc, 0x20, 0x1c, 0x05, 0xa9, 0x2b, 0x1c, 0xff, 0xf7, +0x21, 0xfc, 0x00, 0x28, 0x05, 0xd0, 0x01, 0xa8, 0x00, 0x78, 0x40, 0x23, +0x18, 0x43, 0x01, 0xab, 0x18, 0x70, 0x07, 0x49, 0x00, 0x98, 0xff, 0xf7, +0x06, 0xfc, 0x00, 0x21, 0x01, 0xa8, 0xff, 0xf7, 0x4f, 0xfd, 0x01, 0x20, +0x47, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x24, 0x02, 0xff, 0xff, +0x3c, 0x02, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xf7, 0x1b, 0xfe, 0x08, 0xbc, +0x18, 0x47, 0xf0, 0xb5, 0xc6, 0xb0, 0x07, 0x1c, 0xfc, 0x88, 0x25, 0x4d, +0x68, 0x68, 0x01, 0x30, 0x69, 0x46, 0x68, 0x60, 0x38, 0x1c, 0xff, 0xf7, +0xf5, 0xfd, 0x10, 0x2c, 0x08, 0xd3, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, +0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x17, 0xe0, +0x78, 0x78, 0x82, 0x00, 0xfb, 0x1d, 0x09, 0x33, 0x00, 0x20, 0xb9, 0x68, +0x00, 0x2a, 0x15, 0xd9, 0x40, 0xcb, 0x0f, 0x1c, +0x01, 0x31, 0xbe, 0x42, 0x0d, 0xd0, 0x00, 0xaa, 0x12, 0x78, 0x40, 0x23, +0x1a, 0x43, 0x00, 0xab, 0x1a, 0x70, 0x04, 0x22, 0xda, 0x80, 0x02, 0x90, +0x03, 0x91, 0x04, 0x33, 0x68, 0x46, 0x00, 0x21, 0x15, 0xe0, 0x01, 0x30, +0x90, 0x42, 0xe9, 0xd3, 0x00, 0xab, 0x5c, 0x70, 0x02, 0x94, 0x69, 0x68, +0xc0, 0x46, 0x03, 0x91, 0xa2, 0x00, 0x00, 0x20, 0x10, 0x33, 0x00, 0x2a, +0x05, 0xd9, 0x0f, 0x1c, 0x80, 0xc3, 0x01, 0x30, 0x01, 0x31, 0x90, 0x42, +0xf9, 0xd3, 0x68, 0x46, 0x04, 0xa9, 0xff, 0xf7, 0xf7, 0xfc, 0x01, 0x20, +0x46, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x9c, 0x03, 0x00, 0x80, +0x90, 0xb4, 0x23, 0x48, 0x00, 0x68, 0x01, 0x21, 0x42, 0x09, 0x00, 0xd3, +0x00, 0x21, 0x00, 0x27, 0x3a, 0x1c, 0x43, 0x0b, 0x00, 0xd2, 0x02, 0x22, +0x11, 0x43, 0x1e, 0x4a, 0x20, 0x24, 0xd3, 0x68, 0x01, 0x2b, 0x2e, 0xd1, +0x80, 0x0a, 0x00, 0xd2, 0x00, 0x24, 0x0c, 0x43, 0x20, 0x1c, 0x1b, 0x23, +0xdb, 0x01, 0xd1, 0x18, 0x89, 0x8b, 0x09, 0x0b, 0x00, 0xd2, 0x04, 0x27, +0x38, 0x43, 0xd1, 0x6f, 0x09, 0x68, 0x09, 0x0a, 0x07, 0xd2, 0xd1, 0x1d, +0x79, 0x31, 0x09, 0x68, 0x09, 0x68, 0x09, 0x0a, 0x01, 0xd3, 0x08, 0x23, +0x18, 0x43, 0xe3, 0x23, 0x1b, 0x01, 0xd1, 0x18, 0x89, 0x79, 0x03, 0x29, +0x02, 0xd1, 0xff, 0x23, 0x01, 0x33, 0x18, 0x43, 0x0b, 0x49, 0x09, 0x6a, +0x10, 0x22, 0x4b, 0x0a, 0x00, 0xd2, 0x00, 0x22, 0x10, 0x43, 0x89, 0x07, +0x89, 0x0f, 0x89, 0x01, 0x08, 0x43, 0x90, 0xbc, 0x70, 0x47, 0x40, 0x0c, +0x00, 0xd2, 0x00, 0x24, 0x0c, 0x43, 0x20, 0x1c, 0xec, 0xe7, 0x00, 0x00, +0x00, 0x00, 0x10, 0x40, 0x68, 0x0e, 0x00, 0x80, 0xc0, 0x00, 0x18, 0x40, +0xf0, 0xb5, 0x3a, 0x4c, 0x20, 0x1c, 0x04, 0xf0, 0x07, 0xfa, 0x39, 0x48, +0xe3, 0x23, 0x1b, 0x01, 0xc7, 0x18, 0xb9, 0x79, 0x37, 0x4e, 0xc5, 0x1d, +0x79, 0x35, 0x06, 0x29, 0x62, 0xd2, 0x02, 0xa3, 0x5b, 0x5c, 0x5b, 0x00, +0x9f, 0x44, 0x00, 0x1c, 0x03, 0x0e, 0x1e, 0x37, 0x4e, 0x55, 0x01, 0x20, +0xb8, 0x71, 0x00, 0x20, 0xb0, 0x60, 0xff, 0xf7, 0x95, 0xff, 0x05, 0x23, +0x98, 0x43, 0x00, 0xf0, 0x6f, 0xf8, 0x0c, 0xe0, 0xff, 0xf7, 0x8e, 0xff, +0xc0, 0x08, 0x06, 0xd3, 0xb0, 0x68, 0x41, 0x1c, 0xb1, 0x60, 0x0a, 0x28, +0x03, 0xd9, 0x04, 0x20, 0x00, 0xe0, 0x02, 0x20, 0xb8, 0x71, 0x64, 0x22, +0x20, 0x1c, 0x2b, 0xe0, 0x06, 0x1c, 0xc0, 0x6f, 0x80, 0x23, 0x01, 0x68, +0x19, 0x43, 0x01, 0x60, 0x03, 0x20, 0xb8, 0x71, 0x20, 0x1c, 0x20, 0x4a, +0x00, 0x21, 0x04, 0xf0, 0x99, 0xf9, 0xf0, 0x6f, 0x04, 0x23, 0x01, 0x68, +0x99, 0x43, 0x01, 0x60, 0x28, 0x68, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, +0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x05, 0x21, 0xb9, 0x71, 0x29, 0x68, +0x04, 0x23, 0x0a, 0x68, 0x9a, 0x43, 0x0a, 0x60, 0xc0, 0x6f, 0x01, 0x68, +0x19, 0x43, 0x01, 0x60, 0xff, 0xf7, 0x5a, 0xff, 0x08, 0x23, 0x18, 0x43, +0x00, 0xf0, 0x34, 0xf8, 0x20, 0x1c, 0x10, 0x4a, 0x00, 0x21, 0x04, 0xf0, +0x77, 0xf9, 0xe5, 0xe7, 0xff, 0xf7, 0x4e, 0xff, 0x04, 0x23, 0x18, 0x43, +0x00, 0xf0, 0x28, 0xf8, 0xde, 0xe7, 0x00, 0x20, 0x29, 0x68, 0x60, 0x23, +0x0a, 0x68, 0x9a, 0x43, 0x0a, 0x60, 0xff, 0xf7, 0xe3, 0xfa, 0xd5, 0xe7, +0x06, 0x20, 0xb8, 0x71, 0xd2, 0xe7, 0x00, 0x00, 0xa9, 0x79, 0x21, 0x40, +0x68, 0x0e, 0x00, 0x80, 0x9c, 0x03, 0x00, 0x80, 0x30, 0x75, 0x00, 0x00, +0x10, 0x27, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x20, +0x04, 0x49, 0xc0, 0x46, 0x88, 0x71, 0x04, 0x48, 0x01, 0x22, 0x00, 0x21, +0x04, 0xf0, 0x4e, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0x98, 0x1c, 0x00, 0x80, +0xa9, 0x79, 0x21, 0x40, 0x90, 0xb5, 0x07, 0x1c, 0x31, 0x48, 0x00, 0x68, +0x79, 0x08, 0x03, 0xd3, 0x10, 0x23, 0x01, 0x1c, 0x99, 0x43, 0x01, 0xe0, +0x10, 0x21, 0x01, 0x43, 0x2d, 0x4c, 0xe2, 0x68, 0x01, 0x2a, 0x05, 0xd1, +0x22, 0x79, 0x00, 0x2a, 0x02, 0xd0, 0x01, 0x23, 0x9b, 0x02, 0x19, 0x43, +0x81, 0x42, 0x02, 0xd0, 0x01, 0x20, 0x00, 0x05, 0x01, 0x60, 0xe0, 0x68, +0x01, 0x28, 0x20, 0xd1, 0x1b, 0x23, 0xdb, 0x01, 0xe0, 0x18, 0x80, 0x8b, +0xf9, 0x08, 0x04, 0xd3, 0x01, 0x23, 0xdb, 0x02, 0x01, 0x1c, 0x99, 0x43, +0x01, 0xe0, 0x01, 0x21, 0xc9, 0x02, 0x81, 0x42, 0x02, 0xd0, 0x00, 0x20, +0x02, 0xf0, 0x1a, 0xfb, 0x38, 0x09, 0x07, 0xd3, 0xe0, 0x6f, 0x80, 0x23, +0x01, 0x68, 0x99, 0x43, 0x01, 0x60, 0xe0, 0x18, 0x00, 0x68, 0x00, 0xe0, +0xe0, 0x6f, 0x80, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x15, 0x48, +0x01, 0x6a, 0x78, 0x09, 0x03, 0xd3, 0xff, 0x20, 0x01, 0x30, 0x08, 0x43, +0x03, 0xe0, 0xff, 0x23, 0x08, 0x1c, 0x01, 0x33, 0x98, 0x43, 0x80, 0x08, +0x80, 0x00, 0xba, 0x09, 0x92, 0x07, 0x92, 0x0f, 0x10, 0x43, 0x88, 0x42, +0x02, 0xd0, 0x0c, 0x49, 0xc0, 0x46, 0x08, 0x62, 0xe1, 0x68, 0x01, 0x29, +0x08, 0xd1, 0x79, 0x0a, 0x06, 0xd3, 0xff, 0x23, 0x04, 0x33, 0x18, 0x40, +0x03, 0x28, 0x01, 0xd1, 0xff, 0xf7, 0x8e, 0xff, 0x90, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x68, 0x0e, 0x00, 0x80, +0xc0, 0x00, 0x18, 0x40, 0xc0, 0x00, 0x18, 0x00, 0x80, 0xb5, 0xff, 0xf7, +0xb1, 0xfe, 0x80, 0x09, 0x1b, 0xd2, 0x0f, 0x48, 0xe3, 0x23, 0x1b, 0x01, +0xc1, 0x18, 0x4a, 0x79, 0x00, 0x2a, 0x14, 0xd1, 0x01, 0x22, 0x4a, 0x71, +0x00, 0x27, 0x80, 0x30, 0x00, 0x68, 0x60, 0x23, 0x01, 0x68, 0x99, 0x43, +0x01, 0x60, 0x08, 0x48, 0x06, 0xe0, 0x02, 0x20, 0x02, 0xf0, 0x8c, 0xfc, +0x07, 0x20, 0x02, 0xf0, 0x5b, 0xfc, 0x38, 0x1c, 0xff, 0xf7, 0x36, 0xfa, +0xf5, 0xe7, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, +0xf4, 0x01, 0xff, 0xff, 0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xff, 0xf7, +0x37, 0xfc, 0xff, 0xf7, 0x85, 0xfe, 0x01, 0xab, 0x58, 0x80, 0x08, 0x48, +0x00, 0x68, 0xc0, 0x46, 0x02, 0x90, 0x07, 0x48, 0x00, 0x6a, 0xc0, 0x46, +0x03, 0x90, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x67, 0xfb, 0x01, 0x20, +0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, +0xc0, 0x00, 0x18, 0x40, 0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, +0x38, 0x1c, 0xff, 0xf7, 0x17, 0xfc, 0xf8, 0x88, 0xff, 0xf7, 0x42, 0xff, +0xff, 0xf7, 0x62, 0xfe, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, +0xff, 0xf7, 0x4c, 0xfb, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0xb0, 0xb5, 0xc6, 0xb0, 0xc7, 0x88, 0x69, 0x46, 0xff, 0xf7, +0x01, 0xfc, 0x01, 0x24, 0x1a, 0x4b, 0x9f, 0x42, 0x0a, 0xd9, 0x00, 0xa8, +0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, +0xd8, 0x80, 0x68, 0x46, 0x00, 0x21, 0x20, 0xe0, 0x14, 0x48, 0xff, 0xf7, +0xe1, 0xf9, 0x05, 0x1c, 0x13, 0x4a, 0x38, 0x1c, 0x04, 0xa9, 0xff, 0xf7, +0xdd, 0xf9, 0x12, 0x49, 0x28, 0x1c, 0xff, 0xf7, 0xd8, 0xf9, 0x01, 0x2f, +0x06, 0xd1, 0x0c, 0xa9, 0x00, 0x20, 0x00, 0x22, +0x0a, 0x60, 0x01, 0x30, 0x10, 0x28, 0xfb, 0xd3, 0x10, 0x20, 0x00, 0xab, +0x58, 0x70, 0x04, 0x98, 0xc0, 0x46, 0x02, 0x90, 0x05, 0x98, 0xc0, 0x46, +0x03, 0x90, 0x68, 0x46, 0x06, 0xa9, 0xff, 0xf7, 0x0f, 0xfb, 0x20, 0x1c, +0x46, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xff, 0x01, 0x00, 0x00, +0x24, 0x02, 0xff, 0xff, 0x9d, 0xaf, 0x21, 0x40, 0x3c, 0x02, 0xff, 0xff, 0xf0, 0xb5, 0xc6, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xff, 0xf7, -0xcf, 0xfb, 0xfc, 0x88, 0x78, 0x78, 0x01, 0x25, 0x10, 0x28, 0x02, 0xd1, -0x43, 0x01, 0x9c, 0x42, 0x09, 0xd3, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, -0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x04, 0x33, -0x27, 0xe0, 0xb8, 0x68, 0xc0, 0x46, 0x04, 0x90, 0xf8, 0x68, 0xc0, 0x46, -0x05, 0x90, 0x06, 0xaa, 0xfb, 0x1d, 0x09, 0x33, 0x00, 0x21, 0x78, 0x78, -0x00, 0x28, 0x0d, 0xdd, 0x00, 0x20, 0x40, 0xcb, 0x40, 0xc2, 0x01, 0x30, -0x00, 0x04, 0x00, 0x0c, 0x04, 0x28, 0xf8, 0xdb, 0x48, 0x1c, 0x01, 0x04, -0x09, 0x0c, 0x78, 0x78, 0x88, 0x42, 0xf1, 0xdc, 0x0a, 0x48, 0xff, 0xf7, -0x83, 0xf9, 0x07, 0x1c, 0x09, 0x4a, 0x20, 0x1c, 0x04, 0xa9, 0xff, 0xf7, -0x7f, 0xf9, 0x08, 0x49, 0x38, 0x1c, 0xff, 0xf7, 0x7a, 0xf9, 0x68, 0x46, -0x00, 0x21, 0xff, 0xf7, 0xd1, 0xfa, 0x28, 0x1c, 0x46, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x24, 0x02, 0xff, 0xff, 0x51, 0xbf, 0x21, 0x40, +0xbb, 0xfb, 0xfc, 0x88, 0x78, 0x78, 0x01, 0x25, 0x10, 0x28, 0x01, 0xd1, +0x19, 0x2c, 0x09, 0xd9, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, +0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x04, 0x33, 0x27, 0xe0, +0xb8, 0x68, 0xc0, 0x46, 0x04, 0x90, 0xf8, 0x68, 0xc0, 0x46, 0x05, 0x90, +0x06, 0xaa, 0xfb, 0x1d, 0x09, 0x33, 0x00, 0x21, 0x78, 0x78, 0x00, 0x28, +0x0d, 0xdd, 0x00, 0x20, 0x40, 0xcb, 0x40, 0xc2, 0x01, 0x30, 0x00, 0x04, +0x00, 0x0c, 0x04, 0x28, 0xf8, 0xdb, 0x48, 0x1c, 0x01, 0x04, 0x09, 0x0c, +0x78, 0x78, 0x88, 0x42, 0xf1, 0xdc, 0x0b, 0x48, 0xff, 0xf7, 0x7e, 0xf9, +0x07, 0x1c, 0x0a, 0x4a, 0x20, 0x1c, 0x04, 0xa9, 0xff, 0xf7, 0x7a, 0xf9, +0x08, 0x49, 0x38, 0x1c, 0xff, 0xf7, 0x75, 0xf9, 0x68, 0x46, 0x00, 0x21, +0xff, 0xf7, 0xbe, 0xfa, 0x28, 0x1c, 0x46, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x24, 0x02, 0xff, 0xff, 0xc5, 0xaf, 0x21, 0x40, 0x3c, 0x02, 0xff, 0xff, 0xf0, 0xb5, 0x84, 0xb0, 0x04, 0x1c, 0x00, 0x27, 0xe6, 0x88, 0xa2, 0x68, 0x47, 0x49, 0x08, 0x79, 0x00, 0x28, 0x08, 0xd0, 0x00, 0x2e, 0x01, 0xd0, 0x01, 0x2e, 0x01, 0xd1, 0x01, 0x27, 0x01, 0xe0, @@ -2439,110 +2380,110 @@ 0x66, 0xd2, 0x02, 0xa3, 0x9b, 0x5d, 0x5b, 0x00, 0x9f, 0x44, 0x00, 0x1c, 0x03, 0x06, 0x08, 0x0c, 0x10, 0x00, 0x05, 0x80, 0x00, 0x23, 0x03, 0xe0, 0x05, 0x80, 0x05, 0xe0, 0x00, 0x23, 0x03, 0x80, 0x43, 0x80, 0x06, 0xe0, -0x00, 0x23, 0x03, 0x80, 0x45, 0x80, 0x02, 0xe0, -0xff, 0x23, 0x01, 0x33, 0x03, 0x80, 0xcb, 0x1d, 0x79, 0x33, 0x9e, 0x89, -0x01, 0x23, 0x5b, 0x02, 0x9e, 0x42, 0x02, 0xdb, 0xd2, 0x07, 0xd2, 0x0f, -0x00, 0xe0, 0x01, 0x22, 0x6d, 0x23, 0x5b, 0x01, 0xc9, 0x18, 0x89, 0x88, -0xff, 0x23, 0xe1, 0x33, 0x99, 0x43, 0x01, 0x23, 0x19, 0x43, 0x06, 0x88, -0xff, 0x33, 0x9e, 0x42, 0x0d, 0xd1, 0xff, 0x20, 0xe1, 0x30, 0x08, 0x43, -0x00, 0x2a, 0x04, 0xd1, 0x01, 0x23, 0x9b, 0x02, 0x98, 0x43, 0x01, 0x1c, -0x20, 0xe0, 0x01, 0x21, 0x89, 0x02, 0x01, 0x43, 0x1c, 0xe0, 0x01, 0x2e, -0x0a, 0xd1, 0x40, 0x88, 0x01, 0x28, 0x04, 0xd1, 0x60, 0x23, 0x19, 0x43, -0x00, 0x2a, 0x13, 0xd0, 0x0c, 0xe0, 0x20, 0x23, 0x19, 0x43, 0x0f, 0xe0, -0x00, 0x2e, 0x0d, 0xd1, 0x40, 0x88, 0x01, 0x28, 0x08, 0xd1, 0xff, 0x23, -0x81, 0x33, 0x19, 0x43, 0x00, 0x2a, 0x05, 0xd0, 0x01, 0x23, 0x9b, 0x02, -0x19, 0x43, 0x01, 0xe0, 0x80, 0x23, 0x19, 0x43, 0x04, 0x20, 0x03, 0xf0, -0x2d, 0xf8, 0x09, 0x21, 0x49, 0x02, 0x00, 0x20, 0x03, 0xf0, 0x28, 0xf8, -0x00, 0x2f, 0x02, 0xd1, 0x00, 0x20, 0x12, 0xe0, 0xff, 0xe7, 0x69, 0x46, -0x20, 0x1c, 0xff, 0xf7, 0x03, 0xfb, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, -0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x68, 0x46, -0x00, 0x21, 0x04, 0x33, 0xff, 0xf7, 0x36, 0xfa, 0x28, 0x1c, 0x04, 0xb0, +0x00, 0x23, 0x03, 0x80, 0x45, 0x80, 0x02, 0xe0, 0xff, 0x23, 0x01, 0x33, +0x03, 0x80, 0xcb, 0x1d, 0x79, 0x33, 0x9e, 0x89, 0x01, 0x23, 0x5b, 0x02, +0x9e, 0x42, 0x02, 0xdb, 0xd2, 0x07, 0xd2, 0x0f, 0x00, 0xe0, 0x01, 0x22, +0x6d, 0x23, 0x5b, 0x01, 0xc9, 0x18, 0x89, 0x88, 0xff, 0x23, 0xe1, 0x33, +0x99, 0x43, 0x01, 0x23, 0x19, 0x43, 0x06, 0x88, 0xff, 0x33, 0x9e, 0x42, +0x0d, 0xd1, 0xff, 0x20, 0xe1, 0x30, 0x08, 0x43, 0x00, 0x2a, 0x04, 0xd1, +0x01, 0x23, 0x9b, 0x02, 0x98, 0x43, 0x01, 0x1c, 0x20, 0xe0, 0x01, 0x21, +0x89, 0x02, 0x01, 0x43, 0x1c, 0xe0, 0x01, 0x2e, 0x0a, 0xd1, 0x40, 0x88, +0x01, 0x28, 0x04, 0xd1, 0x60, 0x23, 0x19, 0x43, 0x00, 0x2a, 0x13, 0xd0, +0x0c, 0xe0, 0x20, 0x23, 0x19, 0x43, 0x0f, 0xe0, 0x00, 0x2e, 0x0d, 0xd1, +0x40, 0x88, 0x01, 0x28, 0x08, 0xd1, 0xff, 0x23, 0x81, 0x33, 0x19, 0x43, +0x00, 0x2a, 0x05, 0xd0, 0x01, 0x23, 0x9b, 0x02, 0x19, 0x43, 0x01, 0xe0, +0x80, 0x23, 0x19, 0x43, 0x04, 0x20, 0x02, 0xf0, 0x75, 0xf9, 0x09, 0x21, +0x49, 0x02, 0x00, 0x20, 0x02, 0xf0, 0x70, 0xf9, 0x00, 0x2f, 0x02, 0xd1, +0x00, 0x20, 0x12, 0xe0, 0xff, 0xe7, 0x69, 0x46, 0x20, 0x1c, 0xff, 0xf7, +0xef, 0xfa, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, +0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, 0x68, 0x46, 0x00, 0x21, 0x04, 0x33, +0xff, 0xf7, 0x22, 0xfa, 0x28, 0x1c, 0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x88, 0x1c, 0x00, 0x80, 0xc0, 0x88, 0x51, 0x21, 0x89, 0x03, 0x08, 0x62, 0x00, 0x20, 0x70, 0x47, 0x80, 0xb5, 0x16, 0x4f, 0xf8, 0x68, 0x01, 0x28, 0x07, 0xd1, 0x37, 0x23, 0x9b, 0x01, 0xf8, 0x18, 0x40, 0x8a, 0x80, 0x21, 0x01, 0x43, 0x1b, 0x20, 0x07, 0xe0, 0x6d, 0x23, 0x5b, 0x01, 0xf8, 0x18, 0x80, 0x8b, 0x01, 0x21, 0x49, 0x03, 0x01, 0x43, 0x10, 0x20, 0x02, 0xf0, -0xeb, 0xff, 0x01, 0x20, 0x71, 0x23, 0x5b, 0x01, 0xf9, 0x18, 0x08, 0x80, +0x33, 0xf9, 0x01, 0x20, 0x71, 0x23, 0x5b, 0x01, 0xf9, 0x18, 0x08, 0x80, 0x48, 0x80, 0x1b, 0x23, 0xdb, 0x01, 0xf8, 0x18, 0x80, 0x8b, 0x01, 0x23, 0x1b, 0x03, 0x98, 0x43, 0x41, 0x21, 0x09, 0x02, 0x01, 0x43, 0x00, 0x20, -0x02, 0xf0, 0xd8, 0xff, 0x00, 0x20, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x02, 0xf0, 0x20, 0xf9, 0x00, 0x20, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x17, 0x4f, 0xf8, 0x68, 0x01, 0x28, 0x08, 0xd1, 0x37, 0x23, 0x9b, 0x01, 0xf8, 0x18, 0x40, 0x8a, 0x80, 0x23, 0x98, 0x43, 0x01, 0x1c, 0x1b, 0x20, 0x08, 0xe0, 0x6d, 0x23, 0x5b, 0x01, 0xf8, 0x18, 0x80, 0x8b, 0x01, 0x23, 0x5b, 0x03, 0x98, 0x43, 0x01, 0x1c, -0x10, 0x20, 0x02, 0xf0, 0xb9, 0xff, 0xff, 0x20, 0x71, 0x23, 0x5b, 0x01, +0x10, 0x20, 0x02, 0xf0, 0x01, 0xf9, 0xff, 0x20, 0x71, 0x23, 0x5b, 0x01, 0xf9, 0x18, 0x01, 0x30, 0x08, 0x80, 0x1b, 0x23, 0xdb, 0x01, 0xf8, 0x18, 0x80, 0x8b, 0x41, 0x23, 0x1b, 0x02, 0x98, 0x43, 0x09, 0x21, 0x49, 0x02, -0x01, 0x43, 0x00, 0x20, 0x02, 0xf0, 0xa6, 0xff, 0x00, 0x20, 0x80, 0xbc, +0x01, 0x43, 0x00, 0x20, 0x02, 0xf0, 0xee, 0xf8, 0x00, 0x20, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0x84, 0xb0, -0x08, 0x49, 0xcf, 0x6a, 0x69, 0x46, 0xff, 0xf7, 0x7d, 0xfa, 0xb8, 0x05, +0x08, 0x49, 0xcf, 0x6a, 0x69, 0x46, 0xff, 0xf7, 0x69, 0xfa, 0xb8, 0x05, 0x80, 0x0d, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, -0xb5, 0xf9, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0xa1, 0xf9, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x40, 0x00, 0x14, 0x40, 0xc0, 0x88, 0x9f, 0x23, 0x18, 0x40, 0x05, 0x49, 0xc9, 0x6a, 0x1b, 0x23, 0x5b, 0x01, 0x19, 0x40, 0x08, 0x43, 0x03, 0x49, 0xc0, 0x46, 0xc8, 0x62, 0x00, 0x20, 0x70, 0x47, 0x40, 0x00, 0x14, 0x40, -0x40, 0x00, 0x14, 0x00, 0x80, 0xb5, 0x84, 0xb0, -0x0d, 0x49, 0x0f, 0x6a, 0x01, 0x2f, 0x01, 0xd1, 0xff, 0x03, 0x07, 0xe0, -0x02, 0x2f, 0x01, 0xd1, 0x3f, 0x03, 0x03, 0xe0, 0x00, 0x2f, 0x01, 0xd1, -0x01, 0x27, 0xff, 0x02, 0x69, 0x46, 0xff, 0xf7, 0x49, 0xfa, 0x01, 0xab, -0x5f, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x83, 0xf9, 0x01, 0x20, -0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0x14, 0x40, -0xc2, 0x88, 0xa1, 0x20, 0x40, 0x03, 0x00, 0x21, 0x01, 0x23, 0x5b, 0x03, -0x9a, 0x42, 0x01, 0xd1, 0x02, 0x22, 0x04, 0xe0, 0x01, 0x23, 0xdb, 0x03, -0x9a, 0x42, 0x02, 0xd1, 0x01, 0x22, 0x02, 0x62, 0x00, 0xe0, 0x01, 0x62, -0x08, 0x1c, 0x70, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x02, 0xf0, -0x57, 0xff, 0x69, 0x46, 0x04, 0x1c, 0x38, 0x1c, 0xff, 0xf7, 0x1e, 0xfa, -0x01, 0xab, 0x5c, 0x80, 0x09, 0x4f, 0xf8, 0x6d, 0xc0, 0x46, 0x02, 0x90, -0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x54, 0xf9, 0xf8, 0x6d, 0xc0, 0x07, -0xc0, 0x0f, 0x05, 0x49, 0xc0, 0x46, 0xc8, 0x62, 0x01, 0x20, 0x04, 0xb0, -0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, -0x68, 0x1c, 0x00, 0x80, 0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0x48, 0x61, -0x00, 0x20, 0x70, 0x47, 0x80, 0x00, 0x14, 0x00, 0x00, 0xb5, 0x84, 0xb0, -0x69, 0x46, 0xff, 0xf7, 0xf7, 0xf9, 0x06, 0x48, 0xc0, 0x68, 0x01, 0xab, -0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x2f, 0xf9, 0x01, 0x20, +0x40, 0x00, 0x14, 0x00, 0x80, 0xb5, 0x84, 0xb0, 0x0d, 0x49, 0x0f, 0x6a, +0x01, 0x2f, 0x01, 0xd1, 0xff, 0x03, 0x07, 0xe0, 0x02, 0x2f, 0x01, 0xd1, +0x3f, 0x03, 0x03, 0xe0, 0x00, 0x2f, 0x01, 0xd1, 0x01, 0x27, 0xff, 0x02, +0x69, 0x46, 0xff, 0xf7, 0x35, 0xfa, 0x01, 0xab, 0x5f, 0x80, 0x68, 0x46, +0x00, 0x21, 0xff, 0xf7, 0x6f, 0xf9, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0x14, 0x40, 0xc2, 0x88, 0xa1, 0x20, +0x40, 0x03, 0x00, 0x21, 0x01, 0x23, 0x5b, 0x03, 0x9a, 0x42, 0x01, 0xd1, +0x02, 0x22, 0x04, 0xe0, 0x01, 0x23, 0xdb, 0x03, 0x9a, 0x42, 0x02, 0xd1, +0x01, 0x22, 0x02, 0x62, 0x00, 0xe0, 0x01, 0x62, 0x08, 0x1c, 0x70, 0x47, +0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x02, 0xf0, 0x9f, 0xf8, 0x69, 0x46, +0x04, 0x1c, 0x38, 0x1c, 0xff, 0xf7, 0x0a, 0xfa, 0x01, 0xab, 0x5c, 0x80, +0x09, 0x4f, 0xf8, 0x6d, 0xc0, 0x46, 0x02, 0x90, 0x68, 0x46, 0x00, 0x21, +0xff, 0xf7, 0x40, 0xf9, 0xf8, 0x6d, 0xc0, 0x07, 0xc0, 0x0f, 0x05, 0x49, +0xc0, 0x46, 0xc8, 0x62, 0x01, 0x20, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, 0x68, 0x1c, 0x00, 0x80, +0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0x48, 0x61, 0x00, 0x20, 0x70, 0x47, +0x80, 0x00, 0x14, 0x00, 0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xff, 0xf7, +0xe3, 0xf9, 0x06, 0x48, 0xc0, 0x68, 0x01, 0xab, +0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x1b, 0xf9, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x80, 0x00, 0x14, 0x40, 0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0xc8, 0x60, 0x00, 0x20, 0x70, 0x47, 0x80, 0x00, 0x14, 0x00, 0x80, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0x87, 0x68, -0xff, 0xf7, 0xda, 0xf9, 0x20, 0x2f, 0x07, 0xd2, 0x78, 0x00, 0x0c, 0x49, +0xff, 0xf7, 0xc6, 0xf9, 0x20, 0x2f, 0x07, 0xd2, 0x78, 0x00, 0x0c, 0x49, 0x40, 0x18, 0x1b, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x80, 0x8b, 0x06, 0xe0, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, -0x03, 0xf9, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0xef, 0xf8, 0x01, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0x84, 0xb0, 0xc1, 0x88, 0x82, 0x68, -0x20, 0x2a, 0x04, 0xd2, 0x10, 0x1c, 0x02, 0xf0, 0xcf, 0xfe, 0x00, 0x20, -0x10, 0xe0, 0x69, 0x46, 0xff, 0xf7, 0xae, 0xf9, 0x00, 0xa8, 0x00, 0x78, +0x20, 0x2a, 0x04, 0xd2, 0x10, 0x1c, 0x02, 0xf0, 0x17, 0xf8, 0x00, 0x20, +0x10, 0xe0, 0x69, 0x46, 0xff, 0xf7, 0x9a, 0xf9, 0x00, 0xa8, 0x00, 0x78, 0x40, 0x23, 0x18, 0x43, 0x00, 0xab, 0x18, 0x70, 0x02, 0x20, 0xd8, 0x80, -0x68, 0x46, 0x00, 0x21, 0x04, 0x33, 0xff, 0xf7, 0xe1, 0xf8, 0x01, 0x20, +0x68, 0x46, 0x00, 0x21, 0x04, 0x33, 0xff, 0xf7, 0xcd, 0xf8, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0xc7, 0x88, -0x69, 0x46, 0xff, 0xf7, 0x97, 0xf9, 0x10, 0x48, 0xfe, 0xf7, 0x78, 0xff, -0x02, 0x20, 0x39, 0x1c, 0x03, 0xf0, 0x3c, 0xfe, 0x00, 0x28, 0x06, 0xd0, -0x02, 0x20, 0x39, 0x1c, 0x03, 0xf0, 0x8c, 0xfd, 0x01, 0xab, 0x58, 0x80, +0x69, 0x46, 0xff, 0xf7, 0x83, 0xf9, 0x10, 0x48, 0xfe, 0xf7, 0x72, 0xff, +0x02, 0x20, 0x39, 0x1c, 0x02, 0xf0, 0xf2, 0xff, 0x00, 0x28, 0x06, 0xd0, +0x02, 0x20, 0x39, 0x1c, 0x02, 0xf0, 0x36, 0xff, 0x01, 0xab, 0x58, 0x80, 0x02, 0xe0, 0x45, 0x20, 0x00, 0xab, 0x18, 0x70, 0x07, 0x49, 0x20, 0x1c, -0xfe, 0xf7, 0x65, 0xff, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0xbc, 0xf8, +0xfe, 0xf7, 0x5f, 0xff, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0xa8, 0xf8, 0x01, 0x20, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x24, 0x02, 0xff, 0xff, 0x3c, 0x02, 0xff, 0xff, 0xb0, 0xb5, 0x84, 0xb0, -0xc7, 0x88, 0x69, 0x46, 0x84, 0x68, 0xff, 0xf7, 0x6b, 0xf9, 0x10, 0x48, -0xfe, 0xf7, 0x4c, 0xff, 0x0f, 0x4a, 0x02, 0x20, 0x39, 0x1c, 0xfe, 0xf7, -0x49, 0xff, 0x00, 0x28, 0x06, 0xd0, 0x0d, 0x4b, 0x02, 0x20, 0x39, 0x1c, -0x22, 0x1c, 0xfe, 0xf7, 0x42, 0xff, 0x02, 0xe0, -0x45, 0x20, 0x00, 0xab, 0x18, 0x70, 0x09, 0x49, 0x28, 0x1c, 0xfe, 0xf7, -0x38, 0xff, 0x68, 0x46, 0x00, 0x21, 0xff, 0xf7, 0x8f, 0xf8, 0x01, 0x20, -0x04, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x24, 0x02, 0xff, 0xff, -0xcd, 0xc0, 0x21, 0x40, 0xd9, 0xbf, 0x21, 0x40, 0x3c, 0x02, 0xff, 0xff, -0x00, 0xb5, 0xff, 0xf7, 0x57, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, -0x70, 0x47, 0x80, 0xb4, 0xc2, 0x88, 0x19, 0x4b, 0xa1, 0x21, 0x49, 0x03, -0x00, 0x2a, 0x03, 0xd1, 0x18, 0x6b, 0x10, 0x23, 0x98, 0x43, 0x04, 0xe0, -0x01, 0x2a, 0x04, 0xd1, 0x18, 0x6b, 0x10, 0x23, 0x18, 0x43, 0x48, 0x61, -0x1f, 0xe0, 0x02, 0x2a, 0x1d, 0xd1, 0xc2, 0x68, 0x87, 0x68, 0x00, 0x20, -0x3b, 0x1c, 0xc3, 0x40, 0xdb, 0x07, 0xdb, 0x0f, 0x9b, 0x02, 0x03, 0x43, -0x0b, 0x61, 0x01, 0x30, 0x00, 0x04, 0x00, 0x0c, 0x20, 0x28, 0xf3, 0xdb, -0x00, 0x20, 0x13, 0x1c, 0xc3, 0x40, 0xdb, 0x07, 0xdb, 0x0f, 0x9b, 0x02, -0xc7, 0x1d, 0x19, 0x37, 0x3b, 0x43, 0x0b, 0x61, 0x01, 0x30, 0x00, 0x04, -0x00, 0x0c, 0x20, 0x28, 0xf1, 0xdb, 0x00, 0x20, 0x80, 0xbc, 0x70, 0x47, -0x80, 0x00, 0x14, 0x40, 0x80, 0xb4, 0xc2, 0x88, 0x81, 0x68, 0x10, 0x02, -0x12, 0x0a, 0x10, 0x43, 0x02, 0x04, 0x12, 0x0c, 0x0c, 0x48, 0xc0, 0x46, -0x02, 0x60, 0x0c, 0x4b, 0xc0, 0x46, 0x1a, 0x80, 0x0a, 0x0c, 0x17, 0x02, +0xc7, 0x88, 0x69, 0x46, 0x84, 0x68, 0xff, 0xf7, 0x57, 0xf9, 0x10, 0x48, +0xfe, 0xf7, 0x46, 0xff, 0x0f, 0x4a, 0x02, 0x20, 0x39, 0x1c, 0xfe, 0xf7, +0x43, 0xff, 0x00, 0x28, 0x06, 0xd0, 0x0d, 0x4b, 0x02, 0x20, 0x39, 0x1c, +0x22, 0x1c, 0xfe, 0xf7, 0x3c, 0xff, 0x02, 0xe0, 0x45, 0x20, 0x00, 0xab, +0x18, 0x70, 0x09, 0x49, 0x28, 0x1c, 0xfe, 0xf7, 0x32, 0xff, 0x68, 0x46, +0x00, 0x21, 0xff, 0xf7, 0x7b, 0xf8, 0x01, 0x20, 0x04, 0xb0, 0xb0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x24, 0x02, 0xff, 0xff, 0x59, 0xb1, 0x21, 0x40, +0x59, 0xb0, 0x21, 0x40, 0x3c, 0x02, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xf7, +0x43, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0x70, 0x47, 0x80, 0xb4, +0xc2, 0x88, 0x19, 0x4b, 0xa1, 0x21, 0x49, 0x03, 0x00, 0x2a, 0x03, 0xd1, +0x18, 0x6b, 0x10, 0x23, 0x98, 0x43, 0x04, 0xe0, 0x01, 0x2a, 0x04, 0xd1, +0x18, 0x6b, 0x10, 0x23, 0x18, 0x43, 0x48, 0x61, 0x1f, 0xe0, 0x02, 0x2a, +0x1d, 0xd1, 0xc2, 0x68, 0x87, 0x68, 0x00, 0x20, 0x3b, 0x1c, 0xc3, 0x40, +0xdb, 0x07, 0xdb, 0x0f, 0x9b, 0x02, 0x03, 0x43, 0x0b, 0x61, 0x01, 0x30, +0x00, 0x04, 0x00, 0x0c, 0x20, 0x28, 0xf3, 0xdb, 0x00, 0x20, 0x13, 0x1c, +0xc3, 0x40, 0xdb, 0x07, 0xdb, 0x0f, 0x9b, 0x02, 0xc7, 0x1d, 0x19, 0x37, +0x3b, 0x43, 0x0b, 0x61, 0x01, 0x30, 0x00, 0x04, 0x00, 0x0c, 0x20, 0x28, +0xf1, 0xdb, 0x00, 0x20, 0x80, 0xbc, 0x70, 0x47, 0x80, 0x00, 0x14, 0x40, +0x80, 0xb4, 0xc2, 0x88, 0x81, 0x68, 0x10, 0x02, 0x12, 0x0a, 0x10, 0x43, +0x02, 0x04, 0x12, 0x0c, 0x0c, 0x48, 0xc0, 0x46, 0x02, 0x60, 0x0c, 0x4b, +0xc0, 0x46, 0x1a, 0x80, 0x0a, 0x0c, 0x17, 0x02, 0x12, 0x12, 0x3a, 0x43, 0x12, 0x04, 0x12, 0x0c, 0x42, 0x60, 0x5a, 0x80, 0x09, 0x04, 0x09, 0x0c, 0x0a, 0x02, 0x09, 0x0a, 0x11, 0x43, 0x09, 0x04, 0x09, 0x0c, 0x81, 0x60, 0x99, 0x80, 0x00, 0x20, 0x80, 0xbc, 0x70, 0x47, @@ -2551,8 +2492,8 @@ 0x13, 0x43, 0x4a, 0x68, 0x12, 0x04, 0x12, 0x0c, 0x1f, 0x1c, 0x13, 0x02, 0x12, 0x12, 0x13, 0x43, 0x89, 0x68, 0x09, 0x04, 0x09, 0x0c, 0x0a, 0x02, 0x09, 0x12, 0x11, 0x43, 0x0c, 0x04, 0x24, 0x0c, 0x69, 0x46, 0x1d, 0x1c, -0xff, 0xf7, 0xc2, 0xf8, 0x01, 0xab, 0x5f, 0x80, 0x28, 0x04, 0x20, 0x43, -0x02, 0x90, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0xf9, 0xff, 0x01, 0x20, +0xff, 0xf7, 0xae, 0xf8, 0x01, 0xab, 0x5f, 0x80, 0x28, 0x04, 0x20, 0x43, +0x02, 0x90, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0xe5, 0xff, 0x01, 0x20, 0x04, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x40, 0x00, 0x14, 0x40, 0xc1, 0x88, 0x82, 0x68, 0x08, 0x02, 0x09, 0x0a, 0x08, 0x43, 0x00, 0x04, 0x00, 0x0c, 0x0a, 0x49, 0xc0, 0x46, 0xc8, 0x60, 0x10, 0x0c, 0x03, 0x02, @@ -2566,415 +2507,126 @@ 0x00, 0x93, 0x84, 0x88, 0x01, 0xab, 0x1c, 0x80, 0x00, 0x24, 0x04, 0x3b, 0x5c, 0x70, 0x40, 0x88, 0x00, 0xab, 0x58, 0x80, 0xd9, 0x80, 0x10, 0x04, 0x38, 0x43, 0x02, 0x90, 0x03, 0x94, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, -0xa9, 0xff, 0x01, 0x20, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x95, 0xff, 0x01, 0x20, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x40, 0x00, 0x14, 0x40, 0x00, 0xb5, 0x84, 0xb0, 0x0b, 0x49, 0x8a, 0x6a, -0x05, 0x21, 0x00, 0x91, 0x81, 0x88, 0x01, 0xab, -0x19, 0x80, 0x00, 0x21, 0x04, 0x3b, 0x59, 0x70, 0x40, 0x88, 0x00, 0xab, -0x58, 0x80, 0xda, 0x80, 0x02, 0x91, 0x03, 0x91, 0x68, 0x46, 0xfe, 0xf7, -0x8d, 0xff, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xc0, 0x00, 0x14, 0x40, 0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0x88, 0x62, -0x00, 0x20, 0x70, 0x47, 0xc0, 0x00, 0x14, 0x00, 0x00, 0xb5, 0x84, 0xb0, -0x0b, 0x49, 0x0a, 0x6a, 0x05, 0x21, 0x00, 0x91, 0x81, 0x88, 0x01, 0xab, -0x19, 0x80, 0x00, 0x21, 0x04, 0x3b, 0x59, 0x70, 0x40, 0x88, 0x00, 0xab, -0x58, 0x80, 0xda, 0x80, 0x02, 0x91, 0x03, 0x91, 0x68, 0x46, 0xfe, 0xf7, -0x69, 0xff, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xc0, 0x00, 0x14, 0x40, 0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0x08, 0x62, -0x00, 0x20, 0x70, 0x47, 0xc0, 0x00, 0x14, 0x00, 0x00, 0xb5, 0xc0, 0x88, -0x02, 0x49, 0xfe, 0xf7, 0xfa, 0xfd, 0x00, 0x20, 0x08, 0xbc, 0x18, 0x47, -0x75, 0x02, 0xff, 0xff, 0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xff, 0xf7, -0x0b, 0xf8, 0x06, 0x48, 0x00, 0x6b, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, -0x00, 0x21, 0xfe, 0xf7, 0x43, 0xff, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0xff, 0xf7, -0x11, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xff, 0xf7, 0x0c, 0xf8, -0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xff, 0xf7, 0x07, 0xf8, 0x08, 0xbc, -0x18, 0x47, 0x80, 0xb5, 0x07, 0x1c, 0x10, 0x48, 0xfe, 0xf7, 0xcc, 0xfd, +0x05, 0x21, 0x00, 0x91, 0x81, 0x88, 0x01, 0xab, 0x19, 0x80, 0x00, 0x21, +0x04, 0x3b, 0x59, 0x70, 0x40, 0x88, 0x00, 0xab, 0x58, 0x80, 0xda, 0x80, +0x02, 0x91, 0x03, 0x91, 0x68, 0x46, 0xfe, 0xf7, 0x79, 0xff, 0x01, 0x20, +0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xc0, 0x00, 0x14, 0x40, +0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0x88, 0x62, 0x00, 0x20, 0x70, 0x47, +0xc0, 0x00, 0x14, 0x00, 0x00, 0xb5, 0x84, 0xb0, 0x0b, 0x49, 0x0a, 0x6a, +0x05, 0x21, 0x00, 0x91, 0x81, 0x88, 0x01, 0xab, 0x19, 0x80, 0x00, 0x21, +0x04, 0x3b, 0x59, 0x70, 0x40, 0x88, 0x00, 0xab, 0x58, 0x80, 0xda, 0x80, +0x02, 0x91, 0x03, 0x91, 0x68, 0x46, 0xfe, 0xf7, 0x55, 0xff, 0x01, 0x20, +0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xc0, 0x00, 0x14, 0x40, +0xc0, 0x88, 0x02, 0x49, 0xc0, 0x46, 0x08, 0x62, 0x00, 0x20, 0x70, 0x47, +0xc0, 0x00, 0x14, 0x00, 0x00, 0xb5, 0xc0, 0x88, 0x02, 0x49, 0xfe, 0xf7, +0xf4, 0xfd, 0x00, 0x20, 0x08, 0xbc, 0x18, 0x47, 0x75, 0x02, 0xff, 0xff, +0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xfe, 0xf7, 0xf7, 0xff, 0x06, 0x48, +0x00, 0x6b, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, +0x2f, 0xff, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x68, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0xfe, 0xf7, 0xfd, 0xff, 0x08, 0xbc, +0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0xf8, 0xff, +0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0xf3, 0xff, 0x08, 0xbc, +0x18, 0x47, 0x80, 0xb5, 0x07, 0x1c, 0x10, 0x48, 0xfe, 0xf7, 0xc6, 0xfd, 0x01, 0x20, 0x40, 0x02, 0xa1, 0x21, 0x49, 0x03, 0x88, 0x60, 0x00, 0x21, 0x0c, 0x48, 0xc0, 0x46, 0x01, 0x71, 0x0c, 0x48, 0x02, 0x68, 0x52, 0x0c, 0x05, 0xd2, 0x02, 0x68, 0x12, 0x0c, 0x06, 0xd1, 0x00, 0x68, 0x80, 0x0a, 0x03, 0xd3, 0x08, 0x48, 0xc0, 0x46, 0xc7, 0x60, 0x02, 0xe0, 0x07, 0x48, 0xc0, 0x46, 0x07, 0x64, 0x08, 0x1c, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x21, 0xa5, 0x21, 0x40, 0x28, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, +0xd5, 0x94, 0x21, 0x40, 0x28, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, 0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xb5, 0x01, 0x20, 0x03, 0x49, 0xc0, 0x46, 0x08, 0x72, 0x12, 0x20, 0xff, 0xf7, 0xcb, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x88, 0x1c, 0x00, 0x80, 0x00, 0xb5, 0x01, 0x20, 0x03, 0x49, 0xc0, 0x46, 0x48, 0x72, 0x15, 0x20, 0xff, 0xf7, 0xbf, 0xff, -0x08, 0xbc, 0x18, 0x47, 0x88, 0x1c, 0x00, 0x80, 0x00, 0xb5, 0x02, 0xf0, -0xf3, 0xfe, 0x01, 0x20, 0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x84, 0xb0, -0x07, 0x1c, 0xf8, 0x88, 0x02, 0xf0, 0xf8, 0xff, 0x00, 0x28, 0x0c, 0xd1, -0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, 0x96, 0xff, 0x06, 0x48, 0x01, 0xab, -0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0xcf, 0xfe, 0x01, 0x20, +0x08, 0xbc, 0x18, 0x47, 0x88, 0x1c, 0x00, 0x80, 0x00, 0xb5, 0x01, 0xf0, +0xf9, 0xff, 0x01, 0x20, 0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x84, 0xb0, +0x07, 0x1c, 0xf8, 0x88, 0x02, 0xf0, 0xfe, 0xf8, 0x00, 0x28, 0x0c, 0xd1, +0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, 0x82, 0xff, 0x06, 0x48, 0x01, 0xab, +0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0xbb, 0xfe, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0xff, 0xff, 0x00, 0x00, 0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xfe, 0xf7, -0x81, 0xff, 0x04, 0xf0, 0x47, 0xfa, 0x01, 0xab, 0x58, 0x80, 0x09, 0x48, -0x81, 0x89, 0x09, 0x04, 0xc2, 0x89, 0x11, 0x43, 0x02, 0x91, 0x81, 0x88, -0x09, 0x04, 0xc0, 0x88, 0x08, 0x43, 0x03, 0x90, 0x68, 0x46, 0x00, 0x21, -0xfe, 0xf7, 0xae, 0xfe, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, -0x4c, 0x2a, 0x00, 0x80, 0x00, 0xb5, 0xfe, 0xf7, 0x7d, 0xff, 0x08, 0xbc, -0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x78, 0xff, 0x08, 0xbc, 0x18, 0x47, -0x00, 0xb5, 0xfe, 0xf7, 0x73, 0xff, 0x08, 0xbc, -0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x6e, 0xff, 0x08, 0xbc, 0x18, 0x47, -0x00, 0xb5, 0xfe, 0xf7, 0x69, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, -0xfe, 0xf7, 0x64, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, -0x5f, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x5a, 0xff, -0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x55, 0xff, 0x08, 0xbc, -0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x50, 0xff, 0x08, 0xbc, 0x18, 0x47, -0x00, 0xb5, 0xfe, 0xf7, 0x4b, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, -0xfe, 0xf7, 0x46, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x8c, 0xb0, -0x08, 0xa9, 0xfe, 0xf7, 0x27, 0xff, 0x69, 0x46, 0x08, 0xa8, 0x04, 0xf0, -0x75, 0xfa, 0x02, 0x20, 0x08, 0xab, 0x58, 0x70, 0x69, 0x46, 0x08, 0xa8, -0xfe, 0xf7, 0x5c, 0xfe, 0x01, 0x20, 0x0c, 0xb0, 0x08, 0xbc, 0x18, 0x47, -0x00, 0xb5, 0xfe, 0xf7, 0x2d, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, -0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, 0x0c, 0xff, -0xfa, 0x88, 0x12, 0x49, 0x01, 0x24, 0xc8, 0x1d, 0x89, 0x30, 0x00, 0x2a, -0x0f, 0xd0, 0x04, 0x70, 0x44, 0x70, 0xb8, 0x68, 0x00, 0x0c, 0x80, 0x31, -0xc8, 0x82, 0xb8, 0x68, 0xc0, 0x46, 0x08, 0x83, 0xf8, 0x68, 0x00, 0x0c, -0x48, 0x83, 0xf8, 0x68, 0xc0, 0x46, 0x88, 0x83, 0x02, 0xe0, 0x00, 0x21, +0xff, 0xff, 0x00, 0x00, 0x80, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xfe, 0xf7, +0x6d, 0xff, 0x01, 0x27, 0x01, 0xab, 0x5f, 0x80, 0x09, 0x48, 0x81, 0x89, +0x09, 0x04, 0xc2, 0x89, 0x11, 0x43, 0x02, 0x91, 0x81, 0x88, 0x09, 0x04, +0xc0, 0x88, 0x08, 0x43, 0x03, 0x90, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, +0x9b, 0xfe, 0x38, 0x1c, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x4c, 0x2a, 0x00, 0x80, 0x00, 0xb5, 0xfe, 0xf7, 0x69, 0xff, 0x08, 0xbc, +0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x64, 0xff, 0x08, 0xbc, 0x18, 0x47, +0x00, 0xb5, 0xfe, 0xf7, 0x5f, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, +0xfe, 0xf7, 0x5a, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, +0x55, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x50, 0xff, +0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x4b, 0xff, 0x08, 0xbc, +0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x46, 0xff, 0x08, 0xbc, 0x18, 0x47, +0x00, 0xb5, 0xfe, 0xf7, 0x41, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, +0xfe, 0xf7, 0x3c, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, +0x37, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0x32, 0xff, +0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x8c, 0xb0, 0x08, 0xa9, 0xfe, 0xf7, +0x13, 0xff, 0x69, 0x46, 0x08, 0xa8, 0x02, 0xf0, 0xa9, 0xff, 0x02, 0x20, +0x08, 0xab, 0x58, 0x70, 0x69, 0x46, 0x08, 0xa8, 0xfe, 0xf7, 0x48, 0xfe, +0x01, 0x20, 0x0c, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, +0x19, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, +0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, 0xf8, 0xfe, 0xfa, 0x88, 0x12, 0x49, +0x01, 0x24, 0xc8, 0x1d, 0x89, 0x30, 0x00, 0x2a, 0x0f, 0xd0, 0x04, 0x70, +0x44, 0x70, 0xb8, 0x68, 0x00, 0x0c, 0x80, 0x31, 0xc8, 0x82, 0xb8, 0x68, +0xc0, 0x46, 0x08, 0x83, 0xf8, 0x68, 0x00, 0x0c, 0x48, 0x83, 0xf8, 0x68, +0xc0, 0x46, 0x88, 0x83, 0x02, 0xe0, 0x00, 0x21, 0x01, 0x70, 0x41, 0x70, 0x06, 0x48, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, -0x00, 0x21, 0xfe, 0xf7, 0x2b, 0xfe, 0x20, 0x1c, 0x04, 0xb0, 0x90, 0xbc, +0x00, 0x21, 0xfe, 0xf7, 0x17, 0xfe, 0x20, 0x1c, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, -0x00, 0xb5, 0xfe, 0xf7, 0xf7, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, -0xfe, 0xf7, 0xf2, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, -0xed, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0xe8, 0xfe, -0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0xe3, 0xfe, 0x08, 0xbc, +0x00, 0xb5, 0xfe, 0xf7, 0xe3, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, +0xfe, 0xf7, 0xde, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, +0xd9, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0xd4, 0xfe, +0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0xfe, 0xf7, 0xcf, 0xfe, 0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, -0xfe, 0xf7, 0xc2, 0xfe, 0xf8, 0x88, 0x03, 0x24, 0xe4, 0x04, 0x04, 0x43, +0xfe, 0xf7, 0xae, 0xfe, 0xf8, 0x88, 0x03, 0x24, 0xe4, 0x04, 0x04, 0x43, 0x03, 0x23, 0xdb, 0x04, 0x9c, 0x42, 0x02, 0xd3, 0x0f, 0x4b, 0x9c, 0x42, 0x06, 0xd9, 0x0f, 0x48, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, 0x00, 0x21, -0xfe, 0xf7, 0xf0, 0xfd, 0x01, 0x20, 0x80, 0x07, 0x20, 0x43, 0x00, 0x68, +0xfe, 0xf7, 0xdc, 0xfd, 0x01, 0x20, 0x80, 0x07, 0x20, 0x43, 0x00, 0x68, 0x00, 0x21, 0x00, 0xab, 0x59, 0x70, 0xfa, 0x88, 0xc0, 0x46, 0xda, 0x80, -0x02, 0x90, 0x03, 0x91, 0x68, 0x46, 0x04, 0x33, 0xfe, 0xf7, 0xe0, 0xfd, +0x02, 0x90, 0x03, 0x91, 0x68, 0x46, 0x04, 0x33, 0xfe, 0xf7, 0xcc, 0xfd, 0x01, 0x20, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xe0, 0x00, 0x18, 0x00, 0xff, 0xff, 0x00, 0x00, 0x80, 0xb5, 0x84, 0xb0, -0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, 0x8f, 0xfe, 0xf8, 0x88, +0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, 0x7b, 0xfe, 0xf8, 0x88, 0x03, 0x23, 0xdb, 0x04, 0x18, 0x43, 0x98, 0x42, 0x02, 0xd3, 0x0a, 0x4b, 0x98, 0x42, 0x08, 0xd9, 0x09, 0x48, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, -0x00, 0x21, 0xfe, 0xf7, 0xbf, 0xfd, 0x01, 0x20, 0x03, 0xe0, 0xb9, 0x68, +0x00, 0x21, 0xfe, 0xf7, 0xab, 0xfd, 0x01, 0x20, 0x03, 0xe0, 0xb9, 0x68, 0xc0, 0x46, 0x01, 0x60, 0x00, 0x20, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xe0, 0x00, 0x18, 0x00, 0xff, 0xff, 0x00, 0x00, -0x80, 0xb5, 0x86, 0xb0, 0x07, 0x1c, 0x04, 0xf0, 0x33, 0xf9, 0x38, 0x1c, -0x02, 0xa9, 0xfe, 0xf7, 0x67, 0xfe, 0x01, 0x27, 0x02, 0xab, 0x5f, 0x70, -0x00, 0x20, 0xd8, 0x80, 0x0a, 0x48, 0x41, 0x68, 0xc0, 0x46, 0x04, 0x91, -0x81, 0x68, 0xc0, 0x46, 0x05, 0x91, 0xc1, 0x68, +0x80, 0xb5, 0x86, 0xb0, 0x02, 0xa9, 0xfe, 0xf7, 0x57, 0xfe, 0x01, 0x27, +0x02, 0xab, 0x5f, 0x70, 0x00, 0x20, 0xd8, 0x80, 0x0a, 0x48, 0x41, 0x68, +0xc0, 0x46, 0x04, 0x91, 0x81, 0x68, 0xc0, 0x46, 0x05, 0x91, 0xc1, 0x68, 0xc0, 0x46, 0x00, 0x91, 0x40, 0x69, 0xc0, 0x46, 0x01, 0x90, 0x69, 0x46, -0x02, 0xa8, 0xfe, 0xf7, 0x91, 0xfd, 0x38, 0x1c, 0x06, 0xb0, 0x80, 0xbc, +0x02, 0xa8, 0xfe, 0xf7, 0x81, 0xfd, 0x38, 0x1c, 0x06, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x19, 0x00, 0x80, 0x00, 0xb5, 0xc1, 0x68, -0x80, 0x68, 0xfe, 0xf7, 0x49, 0xfb, 0x00, 0x20, 0x08, 0xbc, 0x18, 0x47, +0x80, 0x68, 0xfe, 0xf7, 0x47, 0xfb, 0x00, 0x20, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0x70, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0x04, 0x1c, 0x0f, 0x1c, -0x68, 0x46, 0x50, 0x21, 0xfe, 0xf7, 0x46, 0xfe, 0x01, 0xab, 0x5c, 0x80, -0x02, 0x97, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x71, 0xfd, 0x04, 0xb0, +0x68, 0x46, 0x50, 0x21, 0xfe, 0xf7, 0x36, 0xfe, 0x01, 0xab, 0x5c, 0x80, +0x02, 0x97, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x61, 0xfd, 0x04, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x84, 0xb0, 0x07, 0x1c, -0x68, 0x46, 0x51, 0x21, 0xfe, 0xf7, 0x34, 0xfe, 0x01, 0xab, 0x5f, 0x80, -0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x60, 0xfd, 0x04, 0xb0, 0x80, 0xbc, +0x68, 0x46, 0x51, 0x21, 0xfe, 0xf7, 0x24, 0xfe, 0x01, 0xab, 0x5f, 0x80, +0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x50, 0xfd, 0x04, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0x90, 0xb5, 0x84, 0xb0, 0x00, 0x27, 0x12, 0x49, 0x09, 0x68, 0x12, 0x4a, 0x12, 0x6b, 0x10, 0x23, 0x1a, 0x40, 0x01, 0x24, 0x00, 0x2a, 0x00, 0xd0, 0x01, 0x27, 0x8a, 0x0c, 0x03, 0xd3, 0x3a, 0x04, 0x12, 0x0c, 0x02, 0x27, 0x17, 0x43, 0xc9, 0x0c, 0x03, 0xd3, 0x39, 0x04, 0x09, 0x0c, 0x04, 0x27, -0x0f, 0x43, 0x69, 0x46, 0xfe, 0xf7, 0xfc, 0xfd, 0x01, 0xab, 0x5f, 0x80, -0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x36, 0xfd, 0x20, 0x1c, 0x04, 0xb0, -0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, -0xc0, 0x00, 0x18, 0x40, 0x00, 0xb5, 0x84, 0xb0, 0x69, 0x46, 0xfe, 0xf7, -0xe7, 0xfd, 0x06, 0x48, 0xc0, 0x6d, 0x01, 0xab, 0x58, 0x80, 0x68, 0x46, -0x00, 0x21, 0xfe, 0xf7, 0x1f, 0xfd, 0x01, 0x20, 0x04, 0xb0, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, 0x00, 0xb5, 0xfe, 0xf7, -0xed, 0xfd, 0x08, 0xbc, 0x18, 0x47, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, +0x0f, 0x43, 0x69, 0x46, 0xfe, 0xf7, 0xec, 0xfd, 0x01, 0xab, 0x5f, 0x80, +0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x26, 0xfd, 0x20, 0x1c, 0x04, 0xb0, +0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x00, 0x00, 0x10, 0x40, 0xc0, 0x00, 0x18, 0x40, 0x00, 0xb5, 0x84, 0xb0, +0x69, 0x46, 0xfe, 0xf7, 0xd7, 0xfd, 0x06, 0x48, 0xc0, 0x6d, 0x01, 0xab, +0x58, 0x80, 0x68, 0x46, 0x00, 0x21, 0xfe, 0xf7, 0x0f, 0xfd, 0x01, 0x20, +0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, +0x00, 0xb5, 0xfe, 0xf7, 0xdd, 0xfd, 0x08, 0xbc, 0x18, 0x47, 0x70, 0x47, +0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, -0x00, 0x20, 0x70, 0x47, 0x00, 0x20, 0x70, 0x47, 0x00, 0xb5, 0xfe, 0xf7, -0xdb, 0xfd, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x80, 0xb5, 0x85, 0xb0, -0x01, 0xa9, 0xfe, 0xf7, 0xbb, 0xfd, 0x00, 0x20, 0x01, 0xab, 0x58, 0x70, -0x10, 0x49, 0xc9, 0x68, 0x01, 0x27, 0x01, 0x29, 0x0a, 0xd1, 0x04, 0xf0, -0xc7, 0xf8, 0x03, 0x90, 0x04, 0x97, 0x03, 0x98, 0x00, 0x28, 0x06, 0xd0, -0x68, 0x46, 0x02, 0xf0, 0xe5, 0xfb, 0x04, 0xe0, 0x03, 0x97, 0x04, 0x90, -0xf8, 0xe7, 0x00, 0x20, 0x00, 0x90, 0x02, 0xab, 0x00, 0x98, 0xc0, 0x46, -0x58, 0x80, 0x00, 0x21, 0x01, 0xa8, 0xfe, 0xf7, 0xdb, 0xfc, 0x38, 0x1c, +0x00, 0xb5, 0xfe, 0xf7, 0xcb, 0xfd, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x80, 0xb5, 0x85, 0xb0, 0x01, 0xa9, 0xfe, 0xf7, 0xab, 0xfd, 0x00, 0x20, +0x01, 0xab, 0x58, 0x70, 0x0c, 0x49, 0xc9, 0x68, 0x01, 0x27, 0x01, 0x29, +0x02, 0xd1, 0x03, 0x97, 0x04, 0x97, 0x01, 0xe0, 0x03, 0x97, 0x04, 0x90, +0x68, 0x46, 0x01, 0xf0, 0x33, 0xfd, 0x02, 0xab, 0x00, 0x98, 0xc0, 0x46, +0x58, 0x80, 0x00, 0x21, 0x01, 0xa8, 0xfe, 0xf7, 0xd3, 0xfc, 0x38, 0x1c, 0x05, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, -0x90, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xfe, 0xf7, -0x8d, 0xfd, 0x00, 0x20, 0x00, 0xab, 0x58, 0x70, 0x01, 0x24, 0x20, 0x1c, -0x12, 0x49, 0xc9, 0x68, 0x01, 0x29, 0x00, 0xd0, 0x00, 0x20, 0x00, 0x06, -0x00, 0x0e, 0x13, 0xd0, 0xf8, 0x88, 0x0f, 0x4a, 0x90, 0x42, 0x02, 0xd0, -0x0e, 0x4b, 0x98, 0x42, 0x08, 0xd1, 0xb9, 0x68, 0x27, 0x1c, 0x90, 0x42, -0x00, 0xd0, 0x00, 0x27, 0x38, 0x06, 0x00, 0x0e, 0x04, 0xf0, 0x88, 0xf8, -0x04, 0xf0, 0x84, 0xf8, 0x02, 0x90, 0x00, 0xe0, 0x02, 0x94, 0x68, 0x46, -0x00, 0x21, 0xfe, 0xf7, 0xa7, 0xfc, 0x20, 0x1c, 0x04, 0xb0, 0x90, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0xed, 0xfe, 0x00, 0x00, -0xfe, 0xca, 0x00, 0x00, 0xf1, 0xb5, 0xd6, 0xb0, -0x00, 0x20, 0x81, 0x00, 0x56, 0x9c, 0x0a, 0x19, 0x12, 0x6a, 0x6b, 0x46, -0x5a, 0x50, 0x01, 0x30, 0x10, 0x28, 0xf6, 0xdb, 0x10, 0x20, 0x82, 0x00, -0x11, 0x1c, 0x69, 0x44, 0x40, 0x39, 0x4b, 0x6b, 0x0f, 0x6a, 0x7b, 0x40, -0x8f, 0x68, 0x7b, 0x40, 0x09, 0x68, 0x59, 0x40, 0x4b, 0x00, 0xc9, 0x0f, -0x19, 0x43, 0x6b, 0x46, 0x99, 0x50, 0x01, 0x30, 0x50, 0x28, 0xec, 0xdb, -0x56, 0x98, 0x01, 0x68, 0xc0, 0x46, 0x55, 0x91, 0x42, 0x68, 0xc0, 0x46, -0x54, 0x92, 0x86, 0x68, 0xc0, 0x46, 0x53, 0x96, 0xc5, 0x68, 0xc0, 0x46, -0x52, 0x95, 0x04, 0x69, 0xc0, 0x46, 0x51, 0x94, 0x48, 0x01, 0xcb, 0x0e, -0x18, 0x43, 0x13, 0x1c, 0x33, 0x40, 0x07, 0x1c, 0x28, 0x1c, 0x90, 0x43, -0x18, 0x43, 0x38, 0x18, 0x00, 0x19, 0x00, 0x9b, 0xc0, 0x18, 0xcf, 0x4b, -0xc0, 0x18, 0x93, 0x07, 0x92, 0x08, 0x13, 0x43, 0x42, 0x01, 0x1f, 0x1c, -0xc3, 0x0e, 0x1a, 0x43, 0x0b, 0x1c, 0x3b, 0x40, 0x14, 0x1c, 0x32, 0x1c, -0x8a, 0x43, 0x1a, 0x43, 0xa2, 0x18, 0x52, 0x19, 0x01, 0x9b, 0xd2, 0x18, -0xc5, 0x4b, 0xd4, 0x18, 0x8a, 0x07, 0x89, 0x08, 0x11, 0x43, 0x62, 0x01, -0xe3, 0x0e, 0x1a, 0x43, 0x03, 0x1c, 0x0b, 0x40, 0x15, 0x1c, 0x3a, 0x1c, -0x82, 0x43, 0x1a, 0x43, 0xaa, 0x18, 0x92, 0x19, 0x02, 0x9b, 0xd2, 0x18, -0xbc, 0x4b, 0xd2, 0x18, 0x3b, 0x1c, 0x87, 0x07, 0x80, 0x08, 0x38, 0x43, -0x57, 0x01, 0xd5, 0x0e, 0x3d, 0x43, 0x27, 0x1c, 0x07, 0x40, 0x0e, 0x1c, -0xa6, 0x43, 0x37, 0x43, 0xed, 0x19, 0xeb, 0x18, 0x03, 0x9f, 0xdf, 0x19, -0xb3, 0x4b, 0xff, 0x18, 0xa3, 0x07, 0xa4, 0x08, 0x1c, 0x43, 0x7b, 0x01, -0xfd, 0x0e, 0x2b, 0x43, 0x15, 0x1c, 0x25, 0x40, 0x1e, 0x1c, 0x03, 0x1c, -0x93, 0x43, 0x2b, 0x43, 0xf3, 0x18, 0x59, 0x18, 0x04, 0x9b, 0xc9, 0x18, -0xaa, 0x4b, 0xc9, 0x18, 0x93, 0x07, 0x92, 0x08, 0x1a, 0x43, 0x4b, 0x01, -0xcd, 0x0e, 0x1d, 0x43, 0x3e, 0x1c, 0x16, 0x40, 0x23, 0x1c, 0xbb, 0x43, -0x33, 0x43, 0xeb, 0x18, 0x18, 0x18, 0x05, 0x9b, 0xc0, 0x18, 0xa2, 0x4b, -0xc0, 0x18, 0xbb, 0x07, 0xbf, 0x08, 0x1f, 0x43, 0x43, 0x01, 0xc5, 0x0e, -0x2b, 0x43, 0x0d, 0x1c, 0x3d, 0x40, 0x1e, 0x1c, 0x13, 0x1c, 0x8b, 0x43, -0x2b, 0x43, 0xf3, 0x18, 0x1b, 0x19, 0x06, 0x9c, 0x1c, 0x19, 0x99, 0x4b, -0xe4, 0x18, 0x8b, 0x07, 0x89, 0x08, 0x19, 0x43, 0x63, 0x01, 0xe5, 0x0e, -0x1d, 0x43, 0x03, 0x1c, 0x0b, 0x40, 0x3e, 0x1c, 0x86, 0x43, 0x33, 0x43, -0xeb, 0x18, 0x9a, 0x18, 0x07, 0x9b, 0xd2, 0x18, 0x90, 0x4b, 0xd2, 0x18, -0x3b, 0x1c, 0x87, 0x07, 0x80, 0x08, 0x38, 0x43, 0x57, 0x01, 0xd5, 0x0e, -0x2f, 0x43, 0x25, 0x1c, 0x05, 0x40, 0x3e, 0x1c, 0x0f, 0x1c, 0xa7, 0x43, -0x2f, 0x43, 0xf5, 0x19, 0xeb, 0x18, 0x08, 0x9f, 0xdf, 0x19, 0x87, 0x4b, -0xff, 0x18, 0xa3, 0x07, 0xa4, 0x08, 0x1c, 0x43, 0x7b, 0x01, 0xfd, 0x0e, -0x1d, 0x43, 0x16, 0x1c, 0x26, 0x40, 0x03, 0x1c, 0x93, 0x43, 0x33, 0x43, -0xeb, 0x18, 0x59, 0x18, 0x09, 0x9b, 0xc9, 0x18, 0x7e, 0x4b, 0xc9, 0x18, -0x93, 0x07, 0x92, 0x08, 0x1a, 0x43, 0x4b, 0x01, 0xcd, 0x0e, 0x1d, 0x43, -0x3b, 0x1c, 0x13, 0x40, 0x26, 0x1c, 0xbe, 0x43, 0x33, 0x43, 0xeb, 0x18, -0x18, 0x18, 0x0a, 0x9b, 0xc0, 0x18, 0x76, 0x4b, 0xc0, 0x18, 0x23, 0x1c, -0xbc, 0x07, 0xbf, 0x08, 0x27, 0x43, 0x44, 0x01, 0xc5, 0x0e, 0x2c, 0x43, -0x0d, 0x1c, 0x3d, 0x40, 0x26, 0x1c, 0x14, 0x1c, 0x8c, 0x43, 0x2c, 0x43, -0x35, 0x19, 0xeb, 0x18, 0x0b, 0x9c, 0x1c, 0x19, -0x6c, 0x4b, 0xe4, 0x18, 0x8b, 0x07, 0x89, 0x08, 0x19, 0x43, 0x63, 0x01, -0xe5, 0x0e, 0x1d, 0x43, 0x03, 0x1c, 0x0b, 0x40, 0x3e, 0x1c, 0x86, 0x43, -0x33, 0x43, 0xeb, 0x18, 0x9a, 0x18, 0x0c, 0x9b, 0xd2, 0x18, 0x64, 0x4b, -0xd2, 0x18, 0x3b, 0x1c, 0x87, 0x07, 0x80, 0x08, 0x38, 0x43, 0x57, 0x01, -0xd5, 0x0e, 0x3d, 0x43, 0x27, 0x1c, 0x07, 0x40, 0x0e, 0x1c, 0xa6, 0x43, -0x37, 0x43, 0xed, 0x19, 0xeb, 0x18, 0x0d, 0x9f, 0xdf, 0x19, 0x5b, 0x4b, -0xff, 0x18, 0xa3, 0x07, 0xa4, 0x08, 0x1c, 0x43, 0x7b, 0x01, 0xfd, 0x0e, -0x1d, 0x43, 0x13, 0x1c, 0x23, 0x40, 0x06, 0x1c, 0x96, 0x43, 0x33, 0x43, -0xeb, 0x18, 0x59, 0x18, 0x0e, 0x9b, 0xc9, 0x18, 0x52, 0x4b, 0xc9, 0x18, -0x93, 0x07, 0x92, 0x08, 0x1a, 0x43, 0x4b, 0x01, 0xcd, 0x0e, 0x2b, 0x43, -0x3d, 0x1c, 0x15, 0x40, 0x1e, 0x1c, 0x23, 0x1c, 0xbb, 0x43, 0x2b, 0x43, -0xf3, 0x18, 0x18, 0x18, 0x0f, 0x9b, 0xc0, 0x18, 0x49, 0x4b, 0xc0, 0x18, -0x23, 0x1c, 0xbc, 0x07, 0xbf, 0x08, 0x27, 0x43, 0x10, 0x24, 0x50, 0x94, -0x44, 0x01, 0xc5, 0x0e, 0x25, 0x43, 0x0e, 0x1c, 0x3e, 0x40, 0x14, 0x1c, -0x8c, 0x43, 0x34, 0x43, 0x2c, 0x19, 0xe3, 0x18, 0x50, 0x9c, 0xa5, 0x00, -0x6c, 0x46, 0x64, 0x59, 0x1c, 0x19, 0x3e, 0x4b, 0xe4, 0x18, 0x13, 0x1c, -0x3a, 0x1c, 0x8f, 0x07, 0x89, 0x08, 0x0f, 0x43, 0x01, 0x1c, 0x20, 0x1c, -0x50, 0x9c, 0x01, 0x34, 0x50, 0x94, 0x14, 0x2c, 0xe2, 0xdb, 0x14, 0x24, -0x45, 0x01, 0xc6, 0x0e, 0x2e, 0x43, 0x0d, 0x1c, 0x7d, 0x40, 0x55, 0x40, -0x75, 0x19, 0xeb, 0x18, 0xa5, 0x00, 0x6e, 0x46, 0x75, 0x59, 0x5d, 0x19, -0x31, 0x4b, 0xed, 0x18, 0x13, 0x1c, 0x3a, 0x1c, 0x8f, 0x07, 0x89, 0x08, -0x0f, 0x43, 0x01, 0x1c, 0x28, 0x1c, 0x01, 0x34, 0x28, 0x2c, 0xe7, 0xdb, -0x28, 0x24, 0x50, 0x94, 0x44, 0x01, 0xc5, 0x0e, 0x25, 0x43, 0x3c, 0x1c, -0x14, 0x43, 0x0c, 0x40, 0x3e, 0x1c, 0x16, 0x40, 0x34, 0x43, 0x2c, 0x19, -0xe3, 0x18, 0x50, 0x9c, 0xa5, 0x00, 0x6c, 0x46, 0x64, 0x59, 0x1c, 0x19, -0x23, 0x4b, 0xe4, 0x18, 0x13, 0x1c, 0x3a, 0x1c, 0x8f, 0x07, 0x89, 0x08, -0x0f, 0x43, 0x01, 0x1c, 0x20, 0x1c, 0x50, 0x9c, 0x01, 0x34, 0x50, 0x94, -0x3c, 0x2c, 0xe1, 0xdb, 0x3c, 0x24, 0x45, 0x01, 0xc6, 0x0e, 0x2e, 0x43, -0x0d, 0x1c, 0x7d, 0x40, 0x55, 0x40, 0x75, 0x19, 0xeb, 0x18, 0xa6, 0x00, -0x6d, 0x46, 0xad, 0x59, 0x5d, 0x19, 0x17, 0x4b, 0xed, 0x18, 0x13, 0x1c, -0x3a, 0x1c, 0x8f, 0x07, 0x89, 0x08, 0x0f, 0x43, 0x01, 0x1c, 0x28, 0x1c, -0x01, 0x34, 0x50, 0x2c, 0xe7, 0xdb, 0x55, 0x9c, 0x20, 0x18, 0x56, 0x9c, -0xc0, 0x46, 0x20, 0x60, 0x54, 0x98, 0x40, 0x18, 0x56, 0x9c, 0xc0, 0x46, -0x60, 0x60, 0x53, 0x9e, 0xf0, 0x19, 0x56, 0x9c, 0xc0, 0x46, 0xa0, 0x60, -0x52, 0x9d, 0xa8, 0x18, 0x56, 0x9c, 0xc0, 0x46, 0xe0, 0x60, 0x51, 0x9c, -0xe0, 0x18, 0x56, 0x9c, 0xc0, 0x46, 0x20, 0x61, 0x57, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x99, 0x79, 0x82, 0x5a, 0xa1, 0xeb, 0xd9, 0x6e, -0xdc, 0xbc, 0x1b, 0x8f, 0xd6, 0xc1, 0x62, 0xca, 0x88, 0xb4, 0x8a, 0x08, -0x89, 0x07, 0x00, 0xd0, 0x01, 0x32, 0x00, 0x21, 0x00, 0x2a, 0x1e, 0xdd, -0x07, 0x78, 0x00, 0xab, 0x1f, 0x70, 0x47, 0x78, 0xc0, 0x46, 0x5f, 0x70, -0x87, 0x78, 0xc0, 0x46, 0x9f, 0x70, 0xc7, 0x78, 0xc0, 0x46, 0xdf, 0x70, -0xdb, 0x78, 0xc0, 0x46, 0x03, 0x70, 0x00, 0xab, 0x9b, 0x78, 0xc0, 0x46, -0x43, 0x70, 0x00, 0xab, 0x5b, 0x78, 0xc0, 0x46, -0x83, 0x70, 0x00, 0xab, 0x1b, 0x78, 0xc0, 0x46, 0xc3, 0x70, 0x04, 0x30, -0x01, 0x31, 0x91, 0x42, 0xe0, 0xdb, 0x88, 0xbc, 0x70, 0x47, 0x00, 0x21, -0xc1, 0x61, 0x09, 0x4a, 0xc0, 0x46, 0x02, 0x60, 0x08, 0x4a, 0xc0, 0x46, -0x42, 0x60, 0x08, 0x4a, 0xc0, 0x46, 0x82, 0x60, 0x07, 0x4a, 0xc0, 0x46, -0xc2, 0x60, 0x07, 0x4a, 0xc0, 0x46, 0x02, 0x61, 0x41, 0x61, 0x81, 0x61, -0x70, 0x47, 0x00, 0x00, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, -0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, 0xf0, 0xe1, 0xd2, 0xc3, -0xf0, 0xb5, 0x14, 0x1c, 0x0d, 0x1c, 0x07, 0x1c, 0xe1, 0x00, 0x78, 0x69, -0x41, 0x18, 0x81, 0x42, 0x02, 0xd2, 0xb8, 0x69, 0x01, 0x30, 0xb8, 0x61, -0x79, 0x61, 0x61, 0x0f, 0xb8, 0x69, 0x40, 0x18, 0xb8, 0x61, 0x40, 0x2c, -0x14, 0xdb, 0xfe, 0x1d, 0x19, 0x36, 0x00, 0x20, 0x29, 0x78, 0x3a, 0x18, -0x20, 0x32, 0x11, 0x70, 0x01, 0x35, 0x01, 0x30, 0x40, 0x28, 0xf7, 0xd3, -0x40, 0x21, 0x30, 0x1c, 0xff, 0xf7, 0x96, 0xff, 0x38, 0x1c, 0xff, 0xf7, -0xaf, 0xfd, 0x40, 0x3c, 0x40, 0x2c, 0xec, 0xda, 0x00, 0x20, 0x00, 0x2c, -0x07, 0xd9, 0x29, 0x78, 0x3a, 0x18, 0x20, 0x32, 0x11, 0x70, 0x01, 0x35, -0x01, 0x30, 0xa0, 0x42, 0xf7, 0xd3, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0xf8, 0xb5, 0x07, 0x1c, 0xd3, 0x00, 0x78, 0x69, 0xc6, 0x18, 0x86, 0x42, -0x02, 0xd2, 0xb8, 0x69, 0x01, 0x30, 0xb8, 0x61, 0x7e, 0x61, 0x53, 0x0f, -0xb8, 0x69, 0xc0, 0x18, 0xb8, 0x61, 0x00, 0x90, 0x00, 0x20, 0x00, 0x2a, -0x07, 0xdd, 0x0b, 0x78, 0x3c, 0x18, 0x20, 0x34, 0x23, 0x70, 0x01, 0x31, -0x01, 0x30, 0x90, 0x42, 0xf7, 0xdb, 0x80, 0x20, 0xd1, 0x19, 0x20, 0x31, -0x08, 0x70, 0x54, 0x1c, 0xfd, 0x1d, 0x19, 0x35, 0x38, 0x2c, 0x1c, 0xdd, -0x38, 0x19, 0x20, 0x30, 0x00, 0x21, 0x40, 0x22, 0x12, 0x1b, 0x00, 0x2a, -0x05, 0xdd, 0x00, 0x23, 0x03, 0x70, 0x01, 0x30, 0x01, 0x31, 0x8a, 0x42, -0xfa, 0xdc, 0x28, 0x1c, 0x21, 0x1c, 0xff, 0xf7, 0x4d, 0xff, 0x38, 0x1c, -0xff, 0xf7, 0x66, 0xfd, 0x28, 0x1c, 0x00, 0x21, 0x00, 0x23, 0x03, 0x70, -0x01, 0x30, 0x01, 0x31, 0x38, 0x29, 0xfa, 0xdb, 0x0c, 0xe0, 0x38, 0x19, -0x20, 0x30, 0x00, 0x21, 0x38, 0x22, 0x12, 0x1b, 0x00, 0x2a, 0x05, 0xdd, -0x00, 0x23, 0x03, 0x70, 0x01, 0x30, 0x01, 0x31, 0x8a, 0x42, 0xfa, 0xdc, -0x28, 0x1c, 0x21, 0x1c, 0xff, 0xf7, 0x30, 0xff, 0x00, 0x98, 0xc0, 0x46, -0xb8, 0x65, 0xfe, 0x65, 0x38, 0x1c, 0xff, 0xf7, 0x45, 0xfd, 0x01, 0x20, -0xf8, 0x61, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, 0x0c, 0x1c, -0x05, 0x1c, 0x17, 0x1c, 0x38, 0x1c, 0x00, 0x2f, 0x04, 0xda, 0x40, 0x42, -0x80, 0x06, 0x80, 0x0e, 0x40, 0x42, 0x01, 0xe0, 0x80, 0x06, 0x80, 0x0e, -0x00, 0x28, 0x07, 0xd1, 0x28, 0x1c, 0x21, 0x1c, 0x3a, 0x1c, 0xff, 0xf7, -0x57, 0xff, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x38, 0x1c, 0x00, 0x2f, -0x00, 0xda, 0x3f, 0x30, 0x80, 0x11, 0x00, 0x28, 0x07, 0xdd, 0x86, 0x01, -0x28, 0x1c, 0x21, 0x1c, 0x32, 0x1c, 0xff, 0xf7, 0x47, 0xff, 0xa4, 0x19, -0xbf, 0x1b, 0x00, 0x2f, 0xeb, 0xd0, 0x28, 0x1c, 0x21, 0x1c, 0x3a, 0x1c, -0xff, 0xf7, 0x74, 0xff, 0xe5, 0xe7, 0x98, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, -0x30, 0x20, 0x00, 0xab, 0x18, 0x70, 0xf8, 0x69, 0x00, 0x28, 0x04, 0xd1, -0x69, 0x46, 0x00, 0x22, 0x38, 0x1c, 0xff, 0xf7, 0x65, 0xff, 0x14, 0x21, -0x38, 0x1c, 0xff, 0xf7, 0xe3, 0xfe, 0x00, 0x20, -0x81, 0x00, 0x79, 0x58, 0x02, 0xc4, 0x01, 0x30, 0x05, 0x28, 0xf9, 0xdb, -0x98, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xb0, 0xb5, 0x98, 0xb0, 0x07, 0x1c, -0x78, 0x68, 0x40, 0x28, 0x10, 0xd9, 0x68, 0x46, 0xff, 0xf7, 0xf9, 0xfe, -0x68, 0x46, 0x06, 0xcf, 0x08, 0x3f, 0xff, 0xf7, 0xa7, 0xff, 0xf8, 0x1d, -0xc5, 0x30, 0x69, 0x46, 0x04, 0x1c, 0xff, 0xf7, 0xd0, 0xff, 0x14, 0x20, -0x78, 0x60, 0x3c, 0x60, 0x00, 0x20, 0x00, 0x24, 0x39, 0x18, 0xca, 0x1d, -0x39, 0x32, 0x14, 0x72, 0x80, 0x31, 0x4c, 0x72, 0x7b, 0x68, 0x83, 0x42, -0x06, 0xd9, 0x3b, 0x68, 0x5d, 0x1c, 0x3d, 0x60, 0x1b, 0x78, 0xc0, 0x46, -0x13, 0x72, 0x4b, 0x72, 0x15, 0x7a, 0x36, 0x23, 0x6b, 0x40, 0x13, 0x72, -0x4a, 0x7a, 0x5c, 0x23, 0x5a, 0x40, 0x4a, 0x72, 0x01, 0x30, 0x40, 0x28, -0xe4, 0xd3, 0x18, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf7, 0xb5, -0xe0, 0xb0, 0x14, 0x1c, 0x0f, 0x1c, 0x00, 0x25, 0xae, 0x00, 0x01, 0x20, -0xf1, 0x1d, 0x1d, 0x31, 0x02, 0xf0, 0x10, 0xfe, 0x01, 0x04, 0x00, 0x91, -0x01, 0x20, 0xf1, 0x1d, 0x1b, 0x31, 0x02, 0xf0, 0x09, 0xfe, 0x00, 0x99, -0x08, 0x43, 0x19, 0xa9, 0x71, 0x18, 0x88, 0x60, 0x01, 0x35, 0x10, 0x2d, -0xea, 0xd3, 0x1b, 0xa8, 0x19, 0x90, 0x40, 0x20, 0x1a, 0x90, 0x19, 0xa8, -0xff, 0xf7, 0xa7, 0xff, 0x01, 0xa8, 0xff, 0xf7, 0xa6, 0xfe, 0x40, 0x22, -0x01, 0xa8, 0x2b, 0xa9, 0xff, 0xf7, 0x54, 0xff, 0x00, 0x2f, 0x0b, 0xd0, -0x40, 0x2f, 0x01, 0xd9, 0x40, 0x25, 0x00, 0xe0, 0x3d, 0x1c, 0x60, 0x99, -0x01, 0xa8, 0x2a, 0x1c, 0xff, 0xf7, 0x48, 0xff, 0x7f, 0x1b, 0xf3, 0xd1, -0x51, 0xa8, 0x01, 0xa9, 0x07, 0x1c, 0xff, 0xf7, 0x70, 0xff, 0x01, 0xa8, -0xff, 0xf7, 0x8b, 0xfe, 0x40, 0x22, 0x01, 0xa8, 0x3b, 0xa9, 0x01, 0x31, -0xff, 0xf7, 0x38, 0xff, 0x14, 0x22, 0x01, 0xa8, 0x39, 0x1c, 0xff, 0xf7, -0x33, 0xff, 0x56, 0xa8, 0x01, 0xa9, 0xff, 0xf7, 0x5e, 0xff, 0x00, 0x20, -0x82, 0x00, 0x19, 0xa9, 0x51, 0x18, 0xc0, 0x31, 0x49, 0x6b, 0x02, 0xc4, -0x01, 0x30, 0x05, 0x28, 0xf6, 0xd3, 0x63, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x90, 0xb5, 0x07, 0x1c, 0x00, 0x24, 0x00, 0x2f, -0x04, 0xd3, 0x04, 0xf0, 0x15, 0xf9, 0x01, 0x34, 0xbc, 0x42, 0xfa, 0xd9, -0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, 0x14, 0x1c, 0x0d, 0x1c, -0x06, 0x1c, 0x1f, 0x1c, 0x1b, 0x4b, 0x32, 0x04, 0x12, 0x0c, 0x3c, 0x21, -0x02, 0x20, 0xfd, 0xf7, 0x8a, 0xff, 0x32, 0x0c, 0x17, 0x4b, 0x3e, 0x21, -0x02, 0x20, 0xfd, 0xf7, 0x84, 0xff, 0x15, 0x4b, 0x2a, 0x04, 0x12, 0x0c, -0x40, 0x21, 0x02, 0x20, 0xfd, 0xf7, 0x7d, 0xff, 0x2a, 0x0c, 0x11, 0x4b, -0x42, 0x21, 0x02, 0x20, 0xfd, 0xf7, 0x77, 0xff, 0x0e, 0x4b, 0x22, 0x04, -0x12, 0x0c, 0x44, 0x21, 0x02, 0x20, 0xfd, 0xf7, 0x70, 0xff, 0x22, 0x0c, -0x0a, 0x4b, 0x46, 0x21, 0x02, 0x20, 0xfd, 0xf7, 0x6a, 0xff, 0x08, 0x4b, -0x3a, 0x04, 0x12, 0x0c, 0x48, 0x21, 0x02, 0x20, 0xfd, 0xf7, 0x63, 0xff, -0x3a, 0x0c, 0x04, 0x4b, 0x4a, 0x21, 0x02, 0x20, 0xfd, 0xf7, 0x5d, 0xff, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0xd9, 0xbf, 0x21, 0x40, -0x88, 0xb5, 0x11, 0x27, 0x3f, 0x04, 0x38, 0x62, 0x79, 0x62, 0xba, 0x62, -0xfb, 0x62, 0x04, 0x20, 0xff, 0xf7, 0xaa, 0xff, 0x07, 0x48, 0x40, 0x6b, -0xc0, 0x46, 0x00, 0x90, 0x00, 0x98, 0x80, 0x07, 0x80, 0x0f, 0x03, 0x28, -0x01, 0xd1, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x20, -0x88, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x11, 0x40, -0xf0, 0xb5, 0x8a, 0xb0, 0x00, 0x24, 0x05, 0x94, 0x69, 0x49, 0xc9, 0x68, -0xc0, 0x46, 0x00, 0x91, 0x68, 0x4a, 0x11, 0x68, 0x01, 0x22, 0x12, 0x04, -0x0a, 0x40, 0x17, 0x21, 0x66, 0x4e, 0x00, 0x2a, 0x06, 0xd1, 0x64, 0x4a, -0x13, 0x68, 0x1b, 0x0c, 0x04, 0xd1, 0x12, 0x68, 0x92, 0x0a, 0x01, 0xd3, -0xf1, 0x60, 0x02, 0xe0, 0x61, 0x4a, 0xc0, 0x46, 0x11, 0x64, 0x61, 0x49, -0x89, 0x68, 0x09, 0x04, 0x09, 0x0c, 0x03, 0x29, 0x54, 0xd1, 0xe9, 0x21, -0x01, 0x91, 0x02, 0x99, 0xc0, 0x46, 0xb1, 0x60, 0x06, 0x94, 0x06, 0x99, -0x8a, 0x00, 0x5b, 0x49, 0x8a, 0x58, 0x00, 0x2a, 0x73, 0xd0, 0x80, 0x20, -0x02, 0x90, 0x06, 0x98, 0x81, 0x00, 0x57, 0x48, 0x41, 0x58, 0x02, 0x9a, -0x11, 0x43, 0x02, 0x91, 0x00, 0x24, 0x00, 0x27, 0x25, 0x02, 0x28, 0x1c, -0x38, 0x43, 0x09, 0x90, 0x09, 0x98, 0x00, 0x04, 0x51, 0x4b, 0x18, 0x43, -0x04, 0x90, 0x09, 0x98, 0xef, 0x23, 0xdb, 0x05, 0x18, 0x43, 0x03, 0x90, -0x06, 0x98, 0x80, 0x00, 0x4b, 0x49, 0x08, 0x58, 0x00, 0x04, 0x03, 0x99, -0x08, 0x43, 0x03, 0x90, 0x00, 0x2f, 0x02, 0xd1, 0x03, 0x98, 0xc0, 0x46, -0x70, 0x60, 0x01, 0x9b, 0x03, 0x9a, 0x02, 0x99, 0x04, 0x98, 0xff, 0xf7, -0x89, 0xff, 0x00, 0x28, 0x06, 0xd0, 0x02, 0x99, 0xc0, 0x46, 0xb1, 0x60, -0x03, 0x99, 0xc0, 0x46, 0x71, 0x60, 0x5c, 0xe0, 0x79, 0x1c, 0x0f, 0x04, -0x3f, 0x0c, 0x17, 0x2f, 0xd1, 0xdd, 0x61, 0x1c, 0x0c, 0x04, 0x24, 0x0c, -0x16, 0x2c, 0xca, 0xdd, 0x06, 0x99, 0x01, 0x31, 0x06, 0x91, 0x06, 0x99, -0x89, 0x00, 0x37, 0x4a, 0x51, 0x58, 0x00, 0x29, 0xb7, 0xd1, 0x48, 0xe0, -0xbf, 0x21, 0xc9, 0x43, 0x04, 0x91, 0xff, 0x21, 0x02, 0x91, 0x97, 0x21, -0x01, 0x91, 0x06, 0x94, 0x06, 0x99, 0x89, 0x00, 0x31, 0x4f, 0x79, 0x58, -0x00, 0x29, 0x1c, 0xd0, 0x09, 0x94, 0x08, 0x94, 0x06, 0x98, 0x80, 0x00, -0x38, 0x58, 0xc0, 0x46, 0x07, 0x90, 0x07, 0x98, 0x00, 0x04, 0x26, 0xe0, -0x05, 0x98, 0x15, 0x23, 0x1b, 0x06, 0x18, 0x43, 0x03, 0x90, 0x01, 0x9b, -0x03, 0x9a, 0x02, 0x99, 0x04, 0x98, 0xff, 0xf7, 0x49, 0xff, 0x00, 0x28, -0x23, 0xd1, 0x09, 0x99, 0x01, 0x31, 0x09, 0x91, 0x17, 0x29, 0x06, 0xd8, -0x00, 0xe0, 0x1c, 0xe0, 0x08, 0x98, 0x00, 0x02, 0x09, 0x99, 0x08, 0x43, -0x07, 0xe0, 0x08, 0x99, 0x01, 0x31, 0x08, 0x91, 0x17, 0x29, 0x0a, 0xd8, -0x09, 0x94, 0x08, 0x98, 0x00, 0x02, 0x07, 0x99, 0x09, 0x04, 0x08, 0x43, -0x15, 0x23, 0x1b, 0x06, 0x18, 0x43, 0x05, 0x90, 0xd6, 0xe7, 0x06, 0x99, -0x01, 0x31, 0x06, 0x91, 0x06, 0x99, 0x89, 0x00, 0x79, 0x58, 0x00, 0x29, -0xc4, 0xd1, 0x0c, 0x4a, 0x11, 0x68, 0x49, 0x0c, 0x05, 0xd2, 0x11, 0x68, -0x09, 0x0c, 0x06, 0xd1, 0x11, 0x68, 0x89, 0x0a, 0x03, 0xd3, 0x00, 0x99, -0xc0, 0x46, 0xf1, 0x60, 0x03, 0xe0, 0x00, 0x99, 0x06, 0x4a, 0xc0, 0x46, -0x11, 0x64, 0x0a, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x40, 0x01, 0x18, 0x40, 0x00, 0x00, 0x10, 0x40, 0x40, 0x01, 0x18, 0x00, -0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x18, 0x40, 0x30, 0x6e, 0x21, 0x40, -0x43, 0xff, 0x00, 0x00, 0x0c, 0x6e, 0x21, 0x40, 0x80, 0xb5, 0x82, 0xb0, -0x00, 0x20, 0x01, 0x90, 0x1e, 0x48, 0xc1, 0x68, 0x01, 0x29, 0x1b, 0xd1, -0x40, 0x88, 0x00, 0x28, 0x18, 0xd1, 0x68, 0x46, 0x01, 0xf0, 0x9a, 0xfe, -0x00, 0x28, 0x13, 0xd1, 0xa8, 0x20, 0x01, 0xf0, -0xdb, 0xfe, 0x18, 0x4f, 0x00, 0x28, 0x11, 0xd0, 0x04, 0x20, 0xff, 0xf7, -0x97, 0xfe, 0x78, 0x6b, 0xc0, 0x46, 0x01, 0x90, 0x01, 0x98, 0x80, 0x07, -0x80, 0x0f, 0x03, 0x28, 0x06, 0xd1, 0x00, 0x20, 0x01, 0xf0, 0xca, 0xfe, -0x02, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x23, 0x00, 0x22, -0x00, 0x21, 0x00, 0x20, 0xff, 0xf7, 0x8f, 0xfe, 0x00, 0x23, 0xdb, 0x43, -0x18, 0x1c, 0x19, 0x1c, 0x1a, 0x1c, 0xff, 0xf7, 0xc7, 0xfe, 0x00, 0x28, -0x03, 0xd1, 0xff, 0xf7, 0xdf, 0xfe, 0x00, 0x28, 0xe5, 0xd0, 0x38, 0x6a, -0x79, 0x6a, 0xba, 0x6a, 0xfb, 0x6a, 0xff, 0xf7, 0x7c, 0xfe, 0xde, 0xe7, -0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x11, 0x40, 0xff, 0xb5, 0x85, 0xb0, -0x14, 0x1c, 0x1f, 0x1c, 0x00, 0x20, 0x01, 0x90, 0x01, 0x23, 0x5b, 0x04, -0x9f, 0x42, 0x01, 0xd9, 0x0f, 0x20, 0x82, 0xe0, 0x26, 0x1c, 0x43, 0x4d, -0xaf, 0x42, 0x00, 0xd2, 0x3d, 0x1c, 0x21, 0x0d, 0x09, 0x05, 0x41, 0x48, -0x41, 0x4b, 0x99, 0x42, 0x04, 0xd0, 0x80, 0x25, 0x06, 0x1c, 0x80, 0x2f, -0x00, 0xd8, 0x3d, 0x1c, 0x3e, 0x4a, 0x51, 0x69, 0xc0, 0x46, 0x03, 0x91, -0x92, 0x69, 0xc0, 0x46, 0x02, 0x92, 0xff, 0x23, 0x01, 0x33, 0x19, 0x43, -0x39, 0x4b, 0xc0, 0x46, 0x59, 0x61, 0xff, 0x23, 0x01, 0x33, 0x9a, 0x43, -0x36, 0x4b, 0xc0, 0x46, 0x9a, 0x61, 0x01, 0x22, 0x12, 0x05, 0xd1, 0x60, -0x33, 0x4a, 0x91, 0x69, 0x01, 0x22, 0x12, 0x05, 0x11, 0x61, 0x31, 0x4a, -0xff, 0x23, 0x01, 0x33, 0x91, 0x69, 0x19, 0x43, 0x91, 0x61, 0x01, 0x22, -0x12, 0x05, 0x11, 0x61, 0x85, 0x21, 0x89, 0x04, 0x04, 0x91, 0x00, 0x2f, -0x34, 0xd0, 0x28, 0x48, 0x86, 0x42, 0x04, 0xd1, 0x30, 0x1c, 0x21, 0x1c, -0x2a, 0x1c, 0x03, 0xf0, 0x4f, 0xff, 0x2a, 0x1c, 0x04, 0x98, 0x02, 0x43, -0x00, 0x92, 0x01, 0x20, 0x06, 0x99, 0x05, 0x9a, 0x33, 0x1c, 0xfd, 0xf7, -0xbd, 0xfd, 0x22, 0x48, 0x22, 0x49, 0x4a, 0x68, 0x52, 0x0a, 0x09, 0xd3, -0xff, 0x21, 0x01, 0x31, 0x20, 0x4a, 0xc0, 0x46, 0x11, 0x60, 0x00, 0x28, -0x05, 0xd1, 0x11, 0x20, 0x01, 0x90, 0x13, 0xe0, 0x01, 0x38, 0xf0, 0xd1, -0xf9, 0xe7, 0x7f, 0x1b, 0x0e, 0xd0, 0x15, 0x48, 0x86, 0x42, 0x01, 0xd1, -0x64, 0x19, 0x00, 0xe0, 0x76, 0x19, 0x06, 0x99, 0x49, 0x19, 0x06, 0x91, -0x38, 0x1c, 0xaf, 0x42, 0x00, 0xd3, 0x28, 0x1c, 0x05, 0x1c, 0xca, 0xe7, -0x0f, 0x48, 0x41, 0x69, 0x03, 0x9b, 0x19, 0x43, 0x41, 0x61, 0x82, 0x69, -0x03, 0x9b, 0x9a, 0x43, 0x82, 0x61, 0x01, 0x22, 0x12, 0x05, 0xd1, 0x60, -0x81, 0x69, 0xc0, 0x46, 0x11, 0x61, 0x81, 0x69, 0x02, 0x9b, 0x19, 0x43, -0x81, 0x61, 0x11, 0x61, 0x01, 0x98, 0x09, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x50, 0xab, 0x20, 0x40, -0x00, 0x00, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, -0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0xb0, 0xff, 0xb5, 0x85, 0xb0, -0x04, 0x1c, 0x1f, 0x1c, 0x00, 0x20, 0x01, 0x90, 0x01, 0x23, 0x5b, 0x04, -0x9f, 0x42, 0x01, 0xd9, 0x0f, 0x20, 0x7d, 0xe0, 0x26, 0x1c, 0x40, 0x4d, -0xaf, 0x42, 0x00, 0xd2, 0x3d, 0x1c, 0x21, 0x0d, 0x09, 0x05, 0x3e, 0x48, -0x3e, 0x4b, 0x99, 0x42, 0x04, 0xd0, 0x80, 0x25, 0x06, 0x1c, 0x80, 0x2f, -0x00, 0xd8, 0x3d, 0x1c, 0x3b, 0x4a, 0x51, 0x69, 0xc0, 0x46, 0x03, 0x91, -0x92, 0x69, 0xc0, 0x46, 0x02, 0x92, 0x10, 0x23, 0x19, 0x43, 0x37, 0x4b, -0xc0, 0x46, 0x59, 0x61, 0x10, 0x23, 0x9a, 0x43, -0x34, 0x4b, 0xc0, 0x46, 0x9a, 0x61, 0x01, 0x22, 0x12, 0x05, 0xd1, 0x60, -0x31, 0x4a, 0x91, 0x69, 0x01, 0x22, 0x12, 0x05, 0x11, 0x61, 0x2f, 0x4a, -0x10, 0x23, 0x91, 0x69, 0x19, 0x43, 0x91, 0x61, 0x1a, 0x04, 0x11, 0x61, -0x21, 0x21, 0x09, 0x05, 0x04, 0x91, 0x00, 0x2f, 0x33, 0xd0, 0x2a, 0x1c, -0x04, 0x98, 0x02, 0x43, 0x00, 0x92, 0x00, 0x20, 0x06, 0x99, 0x07, 0x9a, -0x33, 0x1c, 0xfd, 0xf7, 0x27, 0xfd, 0x25, 0x48, 0x25, 0x49, 0x4a, 0x68, -0x52, 0x09, 0x08, 0xd3, 0x10, 0x21, 0x24, 0x4a, 0xc0, 0x46, 0x11, 0x60, -0x00, 0x28, 0x05, 0xd1, 0x11, 0x20, 0x01, 0x90, 0x1b, 0xe0, 0x01, 0x38, -0xf1, 0xd1, 0xf9, 0xe7, 0x19, 0x48, 0x86, 0x42, 0x04, 0xd1, 0x20, 0x1c, -0x31, 0x1c, 0x2a, 0x1c, 0x03, 0xf0, 0x96, 0xfe, 0x7f, 0x1b, 0x0e, 0xd0, -0x14, 0x48, 0x86, 0x42, 0x01, 0xd0, 0x76, 0x19, 0x00, 0xe0, 0x64, 0x19, -0x06, 0x99, 0x49, 0x19, 0x06, 0x91, 0x38, 0x1c, 0xaf, 0x42, 0x00, 0xd3, -0x28, 0x1c, 0x05, 0x1c, 0xcb, 0xe7, 0x0f, 0x48, 0x41, 0x69, 0x03, 0x9b, -0x19, 0x43, 0x41, 0x61, 0x82, 0x69, 0x03, 0x9b, 0x9a, 0x43, 0x82, 0x61, -0x01, 0x22, 0x12, 0x05, 0xd1, 0x60, 0x81, 0x69, 0xc0, 0x46, 0x11, 0x61, -0x81, 0x69, 0x02, 0x9b, 0x19, 0x43, 0x81, 0x61, 0x11, 0x61, 0x01, 0x98, -0x09, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xff, 0x00, 0x00, -0x50, 0xab, 0x20, 0x40, 0x00, 0x00, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, -0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0xb0, 0x70, 0x47, 0x04, 0x49, 0x00, 0x20, 0x00, 0x22, 0x0a, 0x70, 0x01, 0x30, 0x01, 0x31, 0x68, 0x28, 0xfa, 0xd3, 0x70, 0x47, 0xa0, 0x82, 0x20, 0x40, 0x00, 0x22, 0x88, 0x42, 0x03, 0xd3, 0x40, 0x1a, 0x01, 0x32, 0x88, 0x42, @@ -2987,7 +2639,7 @@ 0xc0, 0x46, 0x93, 0x60, 0x0b, 0x69, 0xc0, 0x46, 0x13, 0x61, 0x4b, 0x69, 0xc0, 0x46, 0x53, 0x61, 0xc9, 0x68, 0xc0, 0x46, 0xd1, 0x60, 0x90, 0xbc, 0x70, 0x47, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x04, 0x28, 0xd9, 0xdb, -0x38, 0x1c, 0xf6, 0xe7, 0xd0, 0xab, 0x20, 0x40, 0xf7, 0xb5, 0xc4, 0xb0, +0x38, 0x1c, 0xf6, 0xe7, 0x40, 0xab, 0x20, 0x40, 0xf7, 0xb5, 0xc4, 0xb0, 0x04, 0x1c, 0x00, 0x20, 0x46, 0x9a, 0x11, 0x21, 0x11, 0x40, 0x6e, 0xd0, 0x00, 0x27, 0x79, 0x00, 0xc9, 0x19, 0xc9, 0x00, 0x57, 0x4a, 0x51, 0x58, 0x49, 0x0c, 0x03, 0xd2, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x04, 0xe0, @@ -2998,12 +2650,12 @@ 0x72, 0x1c, 0x16, 0x06, 0x36, 0x0e, 0x04, 0xe0, 0x01, 0x30, 0x00, 0x06, 0x00, 0x0e, 0x10, 0x28, 0xf0, 0xdb, 0x00, 0x2e, 0x3d, 0xd0, 0x04, 0x2c, 0x3e, 0xd1, 0x80, 0x00, 0x08, 0x58, 0x40, 0x01, 0x80, 0x0d, 0x00, 0x22, -0x00, 0x92, 0x10, 0x23, 0x00, 0x21, 0x02, 0xaa, -0x00, 0xf0, 0x68, 0xfa, 0x00, 0x21, 0x01, 0x91, 0x02, 0xa8, 0x05, 0x99, -0x49, 0x0c, 0x89, 0x05, 0x29, 0xd0, 0xc1, 0x68, 0x0a, 0x06, 0x12, 0x0e, -0x45, 0x9b, 0x9a, 0x42, 0x11, 0xd1, 0xc0, 0x68, 0x40, 0x01, 0x86, 0x0d, -0x00, 0x22, 0x00, 0x92, 0x0c, 0x23, 0x00, 0x21, 0x30, 0x1c, 0x02, 0xaa, -0x00, 0xf0, 0x50, 0xfa, 0x01, 0x99, 0x02, 0x9d, 0x48, 0x1c, 0x01, 0x06, +0x00, 0x92, 0x10, 0x23, 0x00, 0x21, 0x02, 0xaa, 0x00, 0xf0, 0x68, 0xfa, +0x00, 0x21, 0x01, 0x91, 0x02, 0xa8, 0x05, 0x99, 0x49, 0x0c, 0x89, 0x05, +0x29, 0xd0, 0xc1, 0x68, 0x0a, 0x06, 0x12, 0x0e, 0x45, 0x9b, 0x9a, 0x42, +0x11, 0xd1, 0xc0, 0x68, 0x40, 0x01, 0x86, 0x0d, 0x00, 0x22, 0x00, 0x92, +0x0c, 0x23, 0x00, 0x21, 0x30, 0x1c, 0x02, 0xaa, 0x00, 0xf0, 0x50, 0xfa, +0x01, 0x99, 0x02, 0x9d, 0x48, 0x1c, 0x01, 0x06, 0x09, 0x0e, 0x01, 0x91, 0x0e, 0xe0, 0x48, 0x01, 0x86, 0x0d, 0x00, 0x22, 0x00, 0x92, 0x10, 0x23, 0x00, 0x21, 0x30, 0x1c, 0x02, 0xaa, 0x00, 0xf0, 0x3f, 0xfa, 0x02, 0xa8, 0x05, 0x99, 0x49, 0x0c, 0x89, 0x05, 0xd8, 0xd1, @@ -3019,7 +2671,7 @@ 0x18, 0x18, 0xc0, 0x00, 0x00, 0x1b, 0x70, 0x61, 0x00, 0x20, 0x50, 0x21, 0x46, 0x9a, 0x11, 0x40, 0x50, 0x29, 0x00, 0xd1, 0x28, 0x1c, 0xf0, 0x60, 0x38, 0x1c, 0x47, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xff, 0x20, -0xf9, 0xe7, 0x00, 0x00, 0xd0, 0xab, 0x20, 0x40, 0x80, 0xb4, 0x00, 0x23, +0xf9, 0xe7, 0x00, 0x00, 0x40, 0xab, 0x20, 0x40, 0x80, 0xb4, 0x00, 0x23, 0x00, 0x22, 0x00, 0x29, 0x06, 0xd9, 0x87, 0x5c, 0x7b, 0x40, 0x1b, 0x06, 0x1b, 0x0e, 0x01, 0x32, 0x8a, 0x42, 0xf8, 0xd3, 0xd8, 0x43, 0x00, 0x06, 0x00, 0x0e, 0x80, 0xbc, 0x70, 0x47, 0xf0, 0xb5, 0xc6, 0xb0, 0x04, 0x28, @@ -3041,12 +2693,12 @@ 0x05, 0x98, 0x00, 0x0a, 0x00, 0x02, 0x39, 0x06, 0x09, 0x0e, 0x08, 0x43, 0x05, 0x90, 0xff, 0x23, 0x1b, 0x02, 0x98, 0x43, 0x05, 0x90, 0x0c, 0x21, 0x03, 0xa8, 0xff, 0xf7, 0x83, 0xff, 0xff, 0x23, 0x1b, 0x02, 0x05, 0x99, -0x99, 0x43, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x02, -0x08, 0x43, 0x05, 0x90, 0x0c, 0x23, 0x00, 0x21, 0x60, 0x68, 0x03, 0xaa, -0x00, 0xf0, 0xca, 0xf9, 0x00, 0x20, 0x45, 0x99, 0x06, 0x4a, 0xc0, 0x46, -0x50, 0x50, 0xc1, 0x43, 0x61, 0x60, 0xa1, 0x60, 0xe1, 0x60, 0x21, 0x61, -0x61, 0x61, 0x46, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xd0, 0xab, 0x20, 0x40, 0xb0, 0xb4, 0x4c, 0x42, 0x00, 0x29, 0x00, 0xdb, +0x99, 0x43, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x02, 0x08, 0x43, 0x05, 0x90, +0x0c, 0x23, 0x00, 0x21, 0x60, 0x68, 0x03, 0xaa, 0x00, 0xf0, 0xca, 0xf9, +0x00, 0x20, 0x45, 0x99, 0x06, 0x4a, 0xc0, 0x46, 0x50, 0x50, 0xc1, 0x43, +0x61, 0x60, 0xa1, 0x60, 0xe1, 0x60, 0x21, 0x61, 0x61, 0x61, 0x46, 0xb0, +0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x40, 0xab, 0x20, 0x40, +0xb0, 0xb4, 0x4c, 0x42, 0x00, 0x29, 0x00, 0xdb, 0x0c, 0x1c, 0x00, 0x27, 0xff, 0x43, 0x04, 0x28, 0x21, 0xda, 0x12, 0x4d, 0x43, 0x00, 0x18, 0x18, 0xc0, 0x00, 0x40, 0x19, 0x01, 0x2a, 0x05, 0xd0, 0x02, 0x2a, 0x09, 0xd0, 0x03, 0x2a, 0x16, 0xd1, 0x01, 0x69, 0x0b, 0xe0, @@ -3054,7 +2706,7 @@ 0x00, 0x29, 0x07, 0xda, 0xc1, 0x68, 0xa1, 0x42, 0x09, 0xd3, 0x09, 0x1b, 0xc1, 0x60, 0xc0, 0x68, 0xb0, 0xbc, 0x70, 0x47, 0xc1, 0x68, 0x09, 0x19, 0x02, 0x69, 0x91, 0x42, 0xf6, 0xd9, 0x38, 0x1c, 0xf6, 0xe7, 0x00, 0x00, -0xd0, 0xab, 0x20, 0x40, 0xf0, 0xb5, 0x84, 0xb0, 0x17, 0x1c, 0x0d, 0x1c, +0x40, 0xab, 0x20, 0x40, 0xf0, 0xb5, 0x84, 0xb0, 0x17, 0x1c, 0x0d, 0x1c, 0x00, 0x21, 0x02, 0x91, 0x42, 0x00, 0x12, 0x18, 0xd2, 0x00, 0x2c, 0x49, 0x8b, 0x58, 0x1b, 0x06, 0x1b, 0x0e, 0x01, 0x93, 0x00, 0x23, 0xdb, 0x43, 0x04, 0x28, 0x02, 0xda, 0x01, 0x98, 0x40, 0x08, 0x01, 0xd2, 0x18, 0x1c, @@ -3070,7 +2722,7 @@ 0x00, 0x92, 0x01, 0x1c, 0x30, 0x1c, 0x2a, 0x1c, 0x3b, 0x1c, 0x00, 0xf0, 0xcd, 0xf8, 0xe0, 0x68, 0xc0, 0x19, 0xed, 0x19, 0xe0, 0x60, 0x02, 0x98, 0xc0, 0x19, 0x02, 0x90, 0x00, 0x27, 0x00, 0x2f, 0xc2, 0xd8, 0x02, 0x98, -0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xd0, 0xab, 0x20, 0x40, +0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x40, 0xab, 0x20, 0x40, 0xf0, 0xb5, 0x83, 0xb0, 0x17, 0x1c, 0x0d, 0x1c, 0x00, 0x21, 0x01, 0x91, 0x42, 0x00, 0x12, 0x18, 0xd2, 0x00, 0x02, 0x92, 0x30, 0x49, 0x8a, 0x58, 0x12, 0x06, 0x12, 0x0e, 0x00, 0x24, 0xe4, 0x43, 0x04, 0x28, 0x01, 0xda, @@ -3084,12 +2736,12 @@ 0x91, 0x42, 0x13, 0xd9, 0x13, 0x1a, 0x01, 0x1c, 0x00, 0x98, 0x2a, 0x1c, 0x1e, 0x1c, 0x00, 0xf0, 0xdf, 0xf8, 0xe0, 0x68, 0x80, 0x19, 0x75, 0x19, 0xe0, 0x60, 0x21, 0x69, 0x88, 0x42, 0x00, 0xd9, 0x20, 0x61, 0xbf, 0x1b, -0x01, 0x98, 0x30, 0x18, 0x01, 0x90, 0x12, 0xe0, -0x01, 0x1c, 0x00, 0x9e, 0x30, 0x1c, 0x2a, 0x1c, 0x3b, 0x1c, 0x00, 0xf0, -0xcb, 0xf8, 0xe0, 0x68, 0xc0, 0x19, 0xed, 0x19, 0xe0, 0x60, 0x21, 0x69, -0x88, 0x42, 0x00, 0xd9, 0x20, 0x61, 0x01, 0x98, 0xc0, 0x19, 0x01, 0x90, -0x00, 0x27, 0x00, 0x2f, 0xb9, 0xd8, 0x01, 0x98, 0x03, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0xd0, 0xab, 0x20, 0x40, 0xb0, 0xb5, 0xc3, 0xb0, +0x01, 0x98, 0x30, 0x18, 0x01, 0x90, 0x12, 0xe0, 0x01, 0x1c, 0x00, 0x9e, +0x30, 0x1c, 0x2a, 0x1c, 0x3b, 0x1c, 0x00, 0xf0, 0xcb, 0xf8, 0xe0, 0x68, +0xc0, 0x19, 0xed, 0x19, 0xe0, 0x60, 0x21, 0x69, 0x88, 0x42, 0x00, 0xd9, +0x20, 0x61, 0x01, 0x98, 0xc0, 0x19, 0x01, 0x90, 0x00, 0x27, 0x00, 0x2f, +0xb9, 0xd8, 0x01, 0x98, 0x03, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x40, 0xab, 0x20, 0x40, 0xb0, 0xb5, 0xc3, 0xb0, 0x0c, 0x1c, 0x00, 0x27, 0xfa, 0x43, 0x04, 0x28, 0x06, 0xda, 0x41, 0x00, 0x09, 0x18, 0xc9, 0x00, 0x14, 0x48, 0x45, 0x58, 0x6b, 0x0c, 0x04, 0xd2, 0x10, 0x1c, 0x43, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x62, 0x09, @@ -3098,222 +2750,222 @@ 0x12, 0x2c, 0x0d, 0xd0, 0x13, 0x2c, 0x05, 0xd0, 0x14, 0x2c, 0x0a, 0xd1, 0x03, 0x98, 0x00, 0x04, 0x07, 0x0e, 0x06, 0xe0, 0x03, 0x98, 0x07, 0x06, 0x3f, 0x0e, 0x02, 0xe0, 0x01, 0x9f, 0x00, 0xe0, 0x02, 0x9f, 0x38, 0x1c, -0xdb, 0xe7, 0x00, 0x00, 0xd0, 0xab, 0x20, 0x40, 0x03, 0x49, 0x00, 0x20, +0xdb, 0xe7, 0x00, 0x00, 0x40, 0xab, 0x20, 0x40, 0x03, 0x49, 0x00, 0x20, 0x00, 0x22, 0x0a, 0x54, 0x01, 0x30, 0x60, 0x28, 0xfb, 0xd3, 0x70, 0x47, -0xd0, 0xab, 0x20, 0x40, 0x00, 0xb5, 0x02, 0xf0, 0x01, 0xfa, 0x57, 0x20, -0x02, 0xf0, 0x5e, 0xf9, 0x02, 0xf0, 0xd2, 0xf8, 0x00, 0x0a, 0xfb, 0xd3, -0x02, 0xf0, 0xe0, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, 0x82, 0xb0, +0x40, 0xab, 0x20, 0x40, 0x00, 0xb5, 0x02, 0xf0, 0x6f, 0xfa, 0x57, 0x20, +0x02, 0xf0, 0xcc, 0xf9, 0x02, 0xf0, 0x40, 0xf9, 0x00, 0x0a, 0xfb, 0xd3, +0x02, 0xf0, 0x4e, 0xfa, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, 0x82, 0xb0, 0x07, 0x9d, 0x14, 0x1c, 0x1f, 0x1c, 0x30, 0x4a, 0xd2, 0x6f, 0x20, 0x23, 0x16, 0x68, 0x9e, 0x43, 0x16, 0x60, 0x33, 0x1c, 0xff, 0x22, 0x01, 0x32, 0x2a, 0x40, 0x40, 0x02, 0x08, 0x43, 0x05, 0x0a, 0x06, 0x1c, 0x00, 0x0c, -0x01, 0x90, 0x00, 0x2a, 0x20, 0xd0, 0x02, 0xf0, 0xdd, 0xf9, 0x53, 0x20, -0x02, 0xf0, 0x3a, 0xf9, 0x01, 0x98, 0xc0, 0x46, 0x00, 0x90, 0x02, 0xf0, -0x35, 0xf9, 0x28, 0x1c, 0x02, 0xf0, 0x32, 0xf9, 0x30, 0x1c, 0x02, 0xf0, -0x2f, 0xf9, 0x02, 0xf0, 0xb5, 0xf9, 0xff, 0xf7, 0xc7, 0xff, 0x02, 0xf0, -0xc9, 0xf9, 0x54, 0x20, 0x02, 0xf0, 0x26, 0xf9, 0x00, 0x98, 0x02, 0xf0, -0x23, 0xf9, 0x28, 0x1c, 0x02, 0xf0, 0x20, 0xf9, 0x30, 0x1c, 0x14, 0xe0, -0x02, 0xf0, 0xbc, 0xf9, 0x52, 0x20, 0x02, 0xf0, 0x19, 0xf9, 0x01, 0x98, -0x02, 0xf0, 0x16, 0xf9, 0x28, 0x1c, 0x02, 0xf0, 0x13, 0xf9, 0x30, 0x1c, -0x02, 0xf0, 0x10, 0xf9, 0x00, 0x20, 0x02, 0xf0, 0x0d, 0xf9, 0x00, 0x20, -0x02, 0xf0, 0x0a, 0xf9, 0x00, 0x20, 0x02, 0xf0, 0x07, 0xf9, 0x00, 0x20, -0x02, 0xf0, 0x04, 0xf9, 0x00, 0x2f, 0x05, 0xd9, 0x02, 0xf0, 0x76, 0xf8, -0x20, 0x70, 0x01, 0x34, 0x01, 0x3f, 0xf9, 0xd1, 0x02, 0xf0, 0x82, 0xf9, +0x01, 0x90, 0x00, 0x2a, 0x20, 0xd0, 0x02, 0xf0, 0x4b, 0xfa, 0x53, 0x20, +0x02, 0xf0, 0xa8, 0xf9, 0x01, 0x98, 0xc0, 0x46, 0x00, 0x90, 0x02, 0xf0, +0xa3, 0xf9, 0x28, 0x1c, 0x02, 0xf0, 0xa0, 0xf9, 0x30, 0x1c, 0x02, 0xf0, +0x9d, 0xf9, 0x02, 0xf0, 0x23, 0xfa, 0xff, 0xf7, 0xc7, 0xff, 0x02, 0xf0, +0x37, 0xfa, 0x54, 0x20, 0x02, 0xf0, 0x94, 0xf9, 0x00, 0x98, 0x02, 0xf0, +0x91, 0xf9, 0x28, 0x1c, 0x02, 0xf0, 0x8e, 0xf9, 0x30, 0x1c, 0x14, 0xe0, +0x02, 0xf0, 0x2a, 0xfa, 0x52, 0x20, 0x02, 0xf0, 0x87, 0xf9, 0x01, 0x98, +0x02, 0xf0, 0x84, 0xf9, 0x28, 0x1c, 0x02, 0xf0, 0x81, 0xf9, 0x30, 0x1c, +0x02, 0xf0, 0x7e, 0xf9, 0x00, 0x20, 0x02, 0xf0, 0x7b, 0xf9, 0x00, 0x20, +0x02, 0xf0, 0x78, 0xf9, 0x00, 0x20, 0x02, 0xf0, 0x75, 0xf9, 0x00, 0x20, +0x02, 0xf0, 0x72, 0xf9, 0x00, 0x2f, 0x05, 0xd9, 0x02, 0xf0, 0xe4, 0xf8, +0x20, 0x70, 0x01, 0x34, 0x01, 0x3f, 0xf9, 0xd1, 0x02, 0xf0, 0xf0, 0xf9, 0x04, 0x4a, 0xd0, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x02, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, -0xf0, 0xb5, 0x82, 0xb0, 0x14, 0x1c, 0x1f, 0x1c, 0x40, 0x02, 0x08, 0x43, -0x05, 0x1c, 0x2c, 0x49, 0xc8, 0x6f, 0x20, 0x23, 0x02, 0x68, 0x9a, 0x43, -0x02, 0x60, 0xc8, 0x6f, 0x40, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, -0x02, 0xf0, 0x7a, 0xf9, 0x53, 0x20, 0x02, 0xf0, 0xd7, 0xf8, 0x28, 0x0c, -0x06, 0x1c, 0x02, 0xf0, 0xd3, 0xf8, 0x28, 0x0a, 0x01, 0x90, 0x00, 0x90, -0x02, 0xf0, 0xce, 0xf8, 0x28, 0x1c, 0x02, 0xf0, 0xcb, 0xf8, 0x02, 0xf0, -0x51, 0xf9, 0xff, 0xf7, 0x63, 0xff, 0x02, 0xf0, 0x65, 0xf9, 0x84, 0x20, -0x02, 0xf0, 0xc2, 0xf8, 0x30, 0x1c, 0x02, 0xf0, -0xbf, 0xf8, 0x00, 0x98, 0x02, 0xf0, 0xbc, 0xf8, 0x28, 0x1c, 0x02, 0xf0, -0xb9, 0xf8, 0x00, 0x2f, 0x05, 0xd9, 0x20, 0x78, 0x01, 0x34, 0x02, 0xf0, -0xb3, 0xf8, 0x01, 0x3f, 0xf9, 0xd1, 0x02, 0xf0, 0x37, 0xf9, 0x02, 0xf0, -0x4d, 0xf9, 0x83, 0x20, 0x02, 0xf0, 0xaa, 0xf8, 0x30, 0x1c, 0x02, 0xf0, -0xa7, 0xf8, 0x01, 0x98, 0x02, 0xf0, 0xa4, 0xf8, 0x28, 0x1c, 0x02, 0xf0, -0xa1, 0xf8, 0x02, 0xf0, 0x27, 0xf9, 0xff, 0xf7, 0x39, 0xff, 0x07, 0x49, -0xc8, 0x6f, 0x40, 0x23, 0x02, 0x68, 0x9a, 0x43, 0x02, 0x60, 0xc8, 0x6f, -0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x02, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x70, 0x47, 0x00, 0x00, -0x80, 0xb5, 0x01, 0xf0, 0x91, 0xf8, 0x06, 0x4f, 0xc0, 0x46, 0xf8, 0x60, -0x01, 0xf0, 0xf4, 0xf8, 0x78, 0x80, 0x01, 0xf0, 0xb3, 0xf8, 0x38, 0x71, -0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, -0x00, 0xb5, 0x01, 0xf0, 0x07, 0xf9, 0x02, 0x49, 0xc0, 0x46, 0x08, 0x80, -0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x0b, 0x48, 0xc1, 0x68, -0x01, 0x29, 0x11, 0xd1, 0xc1, 0x6f, 0x02, 0x23, 0x0a, 0x68, 0x1a, 0x43, -0x0a, 0x60, 0xc1, 0x6f, 0x80, 0x23, 0x0a, 0x68, 0x1a, 0x43, 0x0a, 0x60, -0xc1, 0x18, 0x08, 0x68, 0x82, 0x23, 0x02, 0x68, 0x1a, 0x43, 0x02, 0x60, -0x00, 0x20, 0x08, 0x81, 0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, -0xf0, 0xb4, 0x4a, 0x49, 0xca, 0x1d, 0x9d, 0x32, 0x00, 0x20, 0x00, 0x27, -0x83, 0x00, 0xd7, 0x50, 0x01, 0x30, 0x17, 0x28, 0xfa, 0xd3, 0x46, 0x4c, -0x00, 0x20, 0x82, 0x00, 0xa7, 0x50, 0x01, 0x30, 0x20, 0x28, 0xfa, 0xd3, -0x43, 0x4a, 0x00, 0x20, 0x83, 0x00, 0xd7, 0x50, 0x01, 0x30, 0x20, 0x28, -0xfa, 0xd3, 0xa7, 0x61, 0x97, 0x61, 0x4f, 0x65, 0x8f, 0x65, 0x3f, 0x4d, -0xc0, 0x46, 0x2f, 0x60, 0x6f, 0x60, 0xaf, 0x60, 0xaf, 0x61, 0xef, 0x60, -0x2f, 0x61, 0x6f, 0x61, 0x00, 0x20, 0xc1, 0x00, 0x09, 0x18, 0x49, 0x01, -0x35, 0x4b, 0xc9, 0x18, 0x86, 0x00, 0xcb, 0x1d, 0xf9, 0x33, 0x34, 0x4c, -0x34, 0x19, 0xe3, 0x63, 0x11, 0x23, 0x5b, 0x01, 0xcb, 0x18, 0x63, 0x63, -0x0d, 0x23, 0x9b, 0x01, 0xcb, 0x18, 0xb4, 0x18, 0xe3, 0x63, 0x23, 0x23, -0x5b, 0x01, 0xc9, 0x18, 0x61, 0x63, 0x01, 0x30, 0x02, 0x28, 0xe4, 0xdb, -0x29, 0x48, 0xc1, 0x1d, 0xf9, 0x31, 0x29, 0x4c, 0xc0, 0x46, 0xa1, 0x62, -0x61, 0x6b, 0x0d, 0x23, 0x9b, 0x01, 0xe1, 0x62, 0xc1, 0x18, 0x91, 0x62, -0x51, 0x6b, 0xc0, 0x46, 0xd1, 0x62, 0x08, 0x21, 0xe1, 0x64, 0x25, 0x49, -0xc0, 0x46, 0x21, 0x65, 0x24, 0x49, 0x0b, 0x69, 0xc0, 0x46, 0x63, 0x65, -0xc3, 0x1d, 0x4d, 0x33, 0xe3, 0x65, 0x25, 0x66, 0x8b, 0x68, 0xc0, 0x46, -0x63, 0x66, 0xcb, 0x68, 0xc0, 0x46, 0xa3, 0x66, 0x1e, 0x4b, 0xc0, 0x46, -0xe3, 0x66, 0x27, 0x67, 0x0b, 0x23, 0xdb, 0x01, 0xc3, 0x18, 0xa3, 0x67, -0x67, 0x67, 0x01, 0x26, 0xe3, 0x1d, 0x69, 0x33, 0x66, 0x61, 0xe7, 0x61, -0x1f, 0x73, 0x02, 0x23, 0xd3, 0x64, 0x17, 0x4b, 0xc0, 0x46, 0x13, 0x65, -0xcb, 0x69, 0xc0, 0x46, 0x53, 0x65, 0xc3, 0x1d, 0x51, 0x33, 0xd3, 0x65, -0x2b, 0x1d, 0x13, 0x66, 0x4b, 0x69, 0xc0, 0x46, 0x53, 0x66, 0x89, 0x69, -0xc0, 0x46, 0x91, 0x66, 0x0f, 0x49, 0xc0, 0x46, 0xd1, 0x66, 0x16, 0x67, -0x0f, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x90, 0x67, 0x56, 0x67, 0xd7, 0x61, -0xd0, 0x1d, 0x69, 0x30, 0x56, 0x61, 0x07, 0x73, +0xf0, 0xb5, 0x82, 0xb0, 0x14, 0x1c, 0x1f, 0x1c, 0x42, 0x02, 0x0a, 0x43, +0x15, 0x1c, 0x01, 0x28, 0x54, 0xd0, 0x2c, 0x49, 0xc8, 0x6f, 0x20, 0x23, +0x02, 0x68, 0x9a, 0x43, 0x02, 0x60, 0xc8, 0x6f, 0x40, 0x23, 0x01, 0x68, +0x19, 0x43, 0x01, 0x60, 0x02, 0xf0, 0xe6, 0xf9, 0x53, 0x20, 0x02, 0xf0, +0x43, 0xf9, 0x28, 0x0c, 0x06, 0x1c, 0x02, 0xf0, 0x3f, 0xf9, 0x28, 0x0a, +0x01, 0x90, 0x00, 0x90, 0x02, 0xf0, 0x3a, 0xf9, 0x28, 0x1c, 0x02, 0xf0, +0x37, 0xf9, 0x02, 0xf0, 0xbd, 0xf9, 0xff, 0xf7, 0x61, 0xff, 0x02, 0xf0, +0xd1, 0xf9, 0x84, 0x20, 0x02, 0xf0, 0x2e, 0xf9, 0x30, 0x1c, 0x02, 0xf0, +0x2b, 0xf9, 0x00, 0x98, 0x02, 0xf0, 0x28, 0xf9, 0x28, 0x1c, 0x02, 0xf0, +0x25, 0xf9, 0x00, 0x2f, 0x05, 0xd9, 0x20, 0x78, 0x01, 0x34, 0x02, 0xf0, +0x1f, 0xf9, 0x01, 0x3f, 0xf9, 0xd1, 0x02, 0xf0, 0xa3, 0xf9, 0x02, 0xf0, +0xb9, 0xf9, 0x83, 0x20, 0x02, 0xf0, 0x16, 0xf9, 0x30, 0x1c, 0x02, 0xf0, +0x13, 0xf9, 0x01, 0x98, 0x02, 0xf0, 0x10, 0xf9, +0x28, 0x1c, 0x02, 0xf0, 0x0d, 0xf9, 0x02, 0xf0, 0x93, 0xf9, 0xff, 0xf7, +0x37, 0xff, 0x07, 0x49, 0xc8, 0x6f, 0x40, 0x23, 0x02, 0x68, 0x9a, 0x43, +0x02, 0x60, 0xc8, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, +0x02, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, +0x70, 0x47, 0x00, 0x00, 0x80, 0xb5, 0x01, 0xf0, 0x8f, 0xf8, 0x06, 0x4f, +0xc0, 0x46, 0xf8, 0x60, 0x01, 0xf0, 0xf2, 0xf8, 0x78, 0x80, 0x01, 0xf0, +0xb1, 0xf8, 0x38, 0x71, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x68, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0x01, 0xf0, 0x05, 0xf9, 0x02, 0x49, +0xc0, 0x46, 0x08, 0x80, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, +0x0b, 0x48, 0xc1, 0x68, 0x01, 0x29, 0x11, 0xd1, 0xc1, 0x6f, 0x02, 0x23, +0x0a, 0x68, 0x1a, 0x43, 0x0a, 0x60, 0xc1, 0x6f, 0x80, 0x23, 0x0a, 0x68, +0x1a, 0x43, 0x0a, 0x60, 0xc1, 0x18, 0x08, 0x68, 0x82, 0x23, 0x02, 0x68, +0x1a, 0x43, 0x02, 0x60, 0x00, 0x20, 0x08, 0x81, 0x70, 0x47, 0x00, 0x00, +0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb4, 0x4a, 0x49, 0xca, 0x1d, 0x9d, 0x32, +0x00, 0x20, 0x00, 0x27, 0x83, 0x00, 0xd7, 0x50, 0x01, 0x30, 0x17, 0x28, +0xfa, 0xd3, 0x46, 0x4c, 0x00, 0x20, 0x82, 0x00, 0xa7, 0x50, 0x01, 0x30, +0x20, 0x28, 0xfa, 0xd3, 0x43, 0x4a, 0x00, 0x20, 0x83, 0x00, 0xd7, 0x50, +0x01, 0x30, 0x20, 0x28, 0xfa, 0xd3, 0xa7, 0x61, 0x97, 0x61, 0x4f, 0x65, +0x8f, 0x65, 0x3f, 0x4d, 0xc0, 0x46, 0x2f, 0x60, 0x6f, 0x60, 0xaf, 0x60, +0xaf, 0x61, 0xef, 0x60, 0x2f, 0x61, 0x6f, 0x61, 0x00, 0x20, 0xc1, 0x00, +0x09, 0x18, 0x49, 0x01, 0x35, 0x4b, 0xc9, 0x18, 0x86, 0x00, 0xcb, 0x1d, +0xf9, 0x33, 0x34, 0x4c, 0x34, 0x19, 0xe3, 0x63, 0x11, 0x23, 0x5b, 0x01, +0xcb, 0x18, 0x63, 0x63, 0x0d, 0x23, 0x9b, 0x01, 0xcb, 0x18, 0xb4, 0x18, +0xe3, 0x63, 0x23, 0x23, 0x5b, 0x01, 0xc9, 0x18, 0x61, 0x63, 0x01, 0x30, +0x02, 0x28, 0xe4, 0xdb, 0x29, 0x48, 0xc1, 0x1d, 0xf9, 0x31, 0x29, 0x4c, +0xc0, 0x46, 0xa1, 0x62, 0x61, 0x6b, 0x0d, 0x23, 0x9b, 0x01, 0xe1, 0x62, +0xc1, 0x18, 0x91, 0x62, 0x51, 0x6b, 0xc0, 0x46, 0xd1, 0x62, 0x08, 0x21, +0xe1, 0x64, 0x25, 0x49, 0xc0, 0x46, 0x21, 0x65, 0x24, 0x49, 0x0b, 0x69, +0xc0, 0x46, 0x63, 0x65, 0xc3, 0x1d, 0x4d, 0x33, 0xe3, 0x65, 0x25, 0x66, +0x8b, 0x68, 0xc0, 0x46, 0x63, 0x66, 0xcb, 0x68, 0xc0, 0x46, 0xa3, 0x66, +0x1e, 0x4b, 0xc0, 0x46, 0xe3, 0x66, 0x27, 0x67, 0x0b, 0x23, 0xdb, 0x01, +0xc3, 0x18, 0xa3, 0x67, 0x67, 0x67, 0x01, 0x26, 0xe3, 0x1d, 0x69, 0x33, +0x66, 0x61, 0xe7, 0x61, 0x1f, 0x73, 0x02, 0x23, 0xd3, 0x64, 0x17, 0x4b, +0xc0, 0x46, 0x13, 0x65, 0xcb, 0x69, 0xc0, 0x46, 0x53, 0x65, 0xc3, 0x1d, +0x51, 0x33, 0xd3, 0x65, 0x2b, 0x1d, 0x13, 0x66, 0x4b, 0x69, 0xc0, 0x46, +0x53, 0x66, 0x89, 0x69, 0xc0, 0x46, 0x91, 0x66, 0x0f, 0x49, 0xc0, 0x46, +0xd1, 0x66, 0x16, 0x67, 0x0f, 0x23, 0xdb, 0x01, 0xc0, 0x18, 0x90, 0x67, +0x56, 0x67, 0xd7, 0x61, 0xd0, 0x1d, 0x69, 0x30, 0x56, 0x61, 0x07, 0x73, 0xf0, 0xbc, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, 0xe4, 0x2c, 0x00, 0x80, -0x64, 0x2d, 0x00, 0x80, 0x3c, 0xef, 0x20, 0x40, 0x30, 0x01, 0x18, 0x00, -0x7c, 0x29, 0x00, 0x80, 0xec, 0x54, 0xff, 0xff, 0x38, 0x01, 0x18, 0x00, -0xfc, 0x54, 0xff, 0xff, 0x90, 0xb4, 0x00, 0x21, 0x1e, 0x4a, 0xbb, 0x23, -0x1b, 0x01, 0xd7, 0x18, 0xf9, 0x73, 0x19, 0x23, 0xdb, 0x01, 0xd0, 0x18, -0x01, 0x24, 0xcd, 0x23, 0x1b, 0x01, 0xd3, 0x18, 0xc1, 0x61, 0x1c, 0x70, -0x33, 0x23, 0x9b, 0x01, 0xd3, 0x18, 0x99, 0x60, 0xb9, 0x73, 0x59, 0x61, -0x2f, 0x23, 0x9b, 0x01, 0xd3, 0x18, 0x19, 0x60, 0x13, 0x4b, 0x51, 0x27, -0xbf, 0x03, 0x03, 0x63, 0x3b, 0x60, 0x84, 0x69, 0xe4, 0x18, 0x44, 0x63, -0x04, 0x3c, 0x7c, 0x60, 0x01, 0x24, 0xe4, 0x02, 0x84, 0x63, 0x0e, 0x4c, -0xc0, 0x46, 0xbc, 0x60, 0x04, 0x6b, 0xc0, 0x46, 0x44, 0x62, 0x84, 0x69, -0xe4, 0x18, 0x0b, 0x4b, 0xe3, 0x18, 0xfb, 0x60, 0x03, 0x6b, 0xc0, 0x46, -0x83, 0x62, 0x43, 0x6a, 0xc0, 0x46, 0x03, 0x62, 0xc1, 0x63, 0x51, 0x64, -0x91, 0x64, 0xd1, 0x65, 0xd1, 0x66, 0x90, 0xbc, 0x70, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x20, 0x40, 0xfc, 0x07, 0x00, 0x00, -0xfc, 0xf7, 0xff, 0xff, 0x90, 0xb4, 0x00, 0x22, 0x1b, 0x49, 0xc9, 0x23, -0x1b, 0x01, 0xc8, 0x18, 0x02, 0x71, 0x01, 0x20, 0xbb, 0x23, 0x1b, 0x01, -0xcb, 0x18, 0x58, 0x73, 0x17, 0x48, 0x03, 0x1c, 0x00, 0x27, 0xdc, 0x1d, -0xc1, 0x34, 0x1c, 0x65, 0x23, 0x1c, 0x01, 0x37, 0x3f, 0x2f, 0xf8, 0xd3, -0x1a, 0x65, 0x19, 0x23, 0xdb, 0x01, 0xcf, 0x18, 0x33, 0x23, 0x9b, 0x01, -0xcb, 0x18, 0x3a, 0x61, 0x98, 0x61, 0x40, 0x20, 0xf8, 0x60, 0xda, 0x61, -0x1a, 0x62, 0xca, 0x64, 0x0a, 0x66, 0x0c, 0x48, 0xc0, 0x46, 0xc2, 0x60, -0x0b, 0x48, 0x00, 0x6b, 0xc0, 0x06, 0xc0, 0x0e, 0xf8, 0x63, 0x0a, 0x48, -0x01, 0x68, 0xc0, 0x46, 0x19, 0x80, 0x41, 0x68, 0xc0, 0x46, 0x59, 0x80, -0x80, 0x68, 0xc0, 0x46, 0x98, 0x80, 0x90, 0xbc, 0x70, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0x3c, 0xbd, 0x20, 0x40, 0x3c, 0xef, 0x20, 0x40, -0x80, 0x00, 0x14, 0x40, 0x40, 0x00, 0x14, 0x40, 0x00, 0x20, 0x0a, 0x49, -0xc0, 0x46, 0x08, 0x73, 0xcb, 0x1d, 0xff, 0x33, 0x3a, 0x33, 0x88, 0x61, -0xc8, 0x61, 0x18, 0x70, 0x06, 0x4a, 0xc0, 0x46, 0x10, 0x65, 0x50, 0x66, -0x90, 0x66, 0x08, 0x70, 0x58, 0x70, 0xbb, 0x23, 0x1b, 0x01, 0xd1, 0x18, -0x08, 0x73, 0x70, 0x47, 0x28, 0x05, 0x00, 0x80, 0x68, 0x0e, 0x00, 0x80, -0xf0, 0xb4, 0x2f, 0x49, 0x2f, 0x4a, 0xc0, 0x46, 0x11, 0x61, 0x01, 0x23, -0x9b, 0x02, 0xc8, 0x18, 0x50, 0x61, 0x2d, 0x48, 0xc0, 0x46, 0x10, 0x62, -0xdb, 0x00, 0xc3, 0x18, 0x53, 0x62, 0x00, 0x23, 0x13, 0x63, 0x53, 0x63, -0x29, 0x4a, 0x2a, 0x4f, 0xd4, 0x1d, 0xff, 0x34, 0xfa, 0x34, 0x14, 0xc7, -0x08, 0x3f, 0x3b, 0x61, 0x1c, 0x1f, 0x7c, 0x61, 0x26, 0x4f, 0xc0, 0x46, -0x39, 0x60, 0xb8, 0x61, 0x79, 0x61, 0xf8, 0x62, 0x3b, 0x63, 0x7b, 0x64, -0xba, 0x64, 0xfa, 0x65, 0x22, 0x4f, 0xfe, 0x1d, 0xf9, 0x36, 0x22, 0x4d, -0xec, 0x1d, 0x79, 0x34, 0x26, 0x62, 0x51, 0x26, 0xb6, 0x03, 0x37, 0x61, -0x24, 0x6a, 0xc0, 0x46, 0x74, 0x61, 0x2f, 0x67, 0x1d, 0x4d, 0x09, 0x27, -0x7f, 0x04, 0xec, 0x1d, 0x75, 0x34, 0x7c, 0x60, 0x3d, 0x60, 0x1b, 0x4c, -0xc0, 0x46, 0x3c, 0x61, 0xe6, 0x1d, 0x75, 0x36, 0x7e, 0x61, 0x19, 0x4f, -0xc0, 0x46, 0x7c, 0x60, 0x3d, 0x60, 0x0f, 0x1c, +0x64, 0x2d, 0x00, 0x80, 0x90, 0xee, 0x20, 0x40, 0x30, 0x01, 0x18, 0x00, +0x7c, 0x29, 0x00, 0x80, 0x00, 0x55, 0xff, 0xff, 0x38, 0x01, 0x18, 0x00, +0x10, 0x55, 0xff, 0xff, 0x90, 0xb4, 0x00, 0x21, 0x1e, 0x4a, 0xbb, 0x23, +0x1b, 0x01, 0xd7, 0x18, 0xf9, 0x73, 0x19, 0x23, +0xdb, 0x01, 0xd0, 0x18, 0x01, 0x24, 0xcd, 0x23, 0x1b, 0x01, 0xd3, 0x18, +0xc1, 0x61, 0x1c, 0x70, 0x33, 0x23, 0x9b, 0x01, 0xd3, 0x18, 0x99, 0x60, +0xb9, 0x73, 0x59, 0x61, 0x2f, 0x23, 0x9b, 0x01, 0xd3, 0x18, 0x19, 0x60, +0x13, 0x4b, 0x51, 0x27, 0xbf, 0x03, 0x03, 0x63, 0x3b, 0x60, 0x84, 0x69, +0xe4, 0x18, 0x44, 0x63, 0x04, 0x3c, 0x7c, 0x60, 0x01, 0x24, 0xe4, 0x02, +0x84, 0x63, 0x0e, 0x4c, 0xc0, 0x46, 0xbc, 0x60, 0x04, 0x6b, 0xc0, 0x46, +0x44, 0x62, 0x84, 0x69, 0xe4, 0x18, 0x0b, 0x4b, 0xe3, 0x18, 0xfb, 0x60, +0x03, 0x6b, 0xc0, 0x46, 0x83, 0x62, 0x43, 0x6a, 0xc0, 0x46, 0x03, 0x62, +0xc1, 0x63, 0x51, 0x64, 0x91, 0x64, 0xd1, 0x65, 0xd1, 0x66, 0x90, 0xbc, +0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x20, 0x40, +0xfc, 0x07, 0x00, 0x00, 0xfc, 0xf7, 0xff, 0xff, 0x90, 0xb4, 0x00, 0x22, +0x1b, 0x49, 0xc9, 0x23, 0x1b, 0x01, 0xc8, 0x18, 0x02, 0x71, 0x01, 0x20, +0xbb, 0x23, 0x1b, 0x01, 0xcb, 0x18, 0x58, 0x73, 0x17, 0x48, 0x03, 0x1c, +0x00, 0x27, 0xdc, 0x1d, 0xc1, 0x34, 0x1c, 0x65, 0x23, 0x1c, 0x01, 0x37, +0x3f, 0x2f, 0xf8, 0xd3, 0x1a, 0x65, 0x19, 0x23, 0xdb, 0x01, 0xcf, 0x18, +0x33, 0x23, 0x9b, 0x01, 0xcb, 0x18, 0x3a, 0x61, 0x98, 0x61, 0x40, 0x20, +0xf8, 0x60, 0xda, 0x61, 0x1a, 0x62, 0xca, 0x64, 0x0a, 0x66, 0x0c, 0x48, +0xc0, 0x46, 0xc2, 0x60, 0x0b, 0x48, 0x00, 0x6b, 0xc0, 0x06, 0xc0, 0x0e, +0xf8, 0x63, 0x0a, 0x48, 0x01, 0x68, 0xc0, 0x46, 0x19, 0x80, 0x41, 0x68, +0xc0, 0x46, 0x59, 0x80, 0x80, 0x68, 0xc0, 0x46, 0x98, 0x80, 0x90, 0xbc, +0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x90, 0xbc, 0x20, 0x40, +0x90, 0xee, 0x20, 0x40, 0x80, 0x00, 0x14, 0x40, 0x40, 0x00, 0x14, 0x40, +0x00, 0x20, 0x0a, 0x49, 0xc0, 0x46, 0x08, 0x73, 0xcb, 0x1d, 0xff, 0x33, +0x3a, 0x33, 0x88, 0x61, 0xc8, 0x61, 0x18, 0x70, 0x06, 0x4a, 0xc0, 0x46, +0x10, 0x65, 0x50, 0x66, 0x90, 0x66, 0x08, 0x70, 0x58, 0x70, 0xbb, 0x23, +0x1b, 0x01, 0xd1, 0x18, 0x08, 0x73, 0x70, 0x47, 0x28, 0x05, 0x00, 0x80, +0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb4, 0x2f, 0x49, 0x2f, 0x4a, 0xc0, 0x46, +0x11, 0x61, 0x01, 0x23, 0x9b, 0x02, 0xc8, 0x18, 0x50, 0x61, 0x2d, 0x48, +0xc0, 0x46, 0x10, 0x62, 0xdb, 0x00, 0xc3, 0x18, 0x53, 0x62, 0x00, 0x23, +0x13, 0x63, 0x53, 0x63, 0x29, 0x4a, 0x2a, 0x4f, 0xd4, 0x1d, 0xff, 0x34, +0xfa, 0x34, 0x14, 0xc7, 0x08, 0x3f, 0x3b, 0x61, 0x1c, 0x1f, 0x7c, 0x61, +0x26, 0x4f, 0xc0, 0x46, 0x39, 0x60, 0xb8, 0x61, 0x79, 0x61, 0xf8, 0x62, +0x3b, 0x63, 0x7b, 0x64, 0xba, 0x64, 0xfa, 0x65, 0x22, 0x4f, 0xfe, 0x1d, +0xf9, 0x36, 0x22, 0x4d, 0xec, 0x1d, 0x79, 0x34, 0x26, 0x62, 0x51, 0x26, +0xb6, 0x03, 0x37, 0x61, 0x24, 0x6a, 0xc0, 0x46, 0x74, 0x61, 0x2f, 0x67, +0x1d, 0x4d, 0x09, 0x27, 0x7f, 0x04, 0xec, 0x1d, 0x75, 0x34, 0x7c, 0x60, +0x3d, 0x60, 0x1b, 0x4c, 0xc0, 0x46, 0x3c, 0x61, 0xe6, 0x1d, 0x75, 0x36, +0x7e, 0x61, 0x19, 0x4f, 0xc0, 0x46, 0x7c, 0x60, 0x3d, 0x60, 0x0f, 0x1c, 0x00, 0x21, 0xff, 0x24, 0x01, 0x34, 0x1d, 0x1c, 0x8b, 0x00, 0xfd, 0x50, 0x01, 0x31, 0xa1, 0x42, 0xfa, 0xd3, 0x01, 0x1c, 0x00, 0x20, 0x01, 0x27, 0xff, 0x02, 0x83, 0x00, 0xcd, 0x50, 0x01, 0x30, 0xb8, 0x42, 0xfa, 0xd3, 0x00, 0x20, 0x81, 0x00, 0x55, 0x50, 0x01, 0x30, 0x80, 0x28, 0xfa, 0xd3, -0xf0, 0xbc, 0x70, 0x47, 0x24, 0xa3, 0x20, 0x40, 0x40, 0x01, 0x18, 0x00, -0x24, 0x83, 0x20, 0x40, 0x24, 0xa9, 0x20, 0x40, 0x80, 0x01, 0x18, 0x00, -0xa8, 0x03, 0x00, 0x80, 0x24, 0xa7, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, -0x24, 0xa8, 0x20, 0x40, 0xa4, 0xa8, 0x20, 0x40, 0x08, 0x04, 0x00, 0x80, -0xb8, 0xb5, 0x2c, 0x48, 0xfc, 0xf7, 0x0a, 0xff, 0x01, 0x20, 0x2b, 0x49, -0x0a, 0x68, 0x52, 0x0c, 0x06, 0xd2, 0x0a, 0x68, 0x12, 0x0c, 0x02, 0xd1, -0x0a, 0x68, 0x92, 0x0a, 0x00, 0xd2, 0x00, 0x20, 0x04, 0x06, 0x24, 0x0e, -0x25, 0x4a, 0xd7, 0x1d, 0x0d, 0x37, 0x00, 0x23, 0x00, 0x20, 0x9d, 0x00, -0x78, 0x51, 0x01, 0x33, 0x04, 0x2b, 0xfa, 0xd3, 0x01, 0x27, 0x3f, 0x05, -0x50, 0x61, 0xf8, 0x60, 0xd0, 0x61, 0xf8, 0x61, 0x00, 0x23, 0xdb, 0x43, -0x93, 0x61, 0x3b, 0x61, 0x13, 0x62, 0x3b, 0x62, 0x00, 0x27, 0x1b, 0x4b, -0x8d, 0x68, 0xc0, 0x46, 0x00, 0x95, 0x8d, 0x69, 0xc0, 0x46, 0x00, 0x95, -0x00, 0x2c, 0x0b, 0xd0, 0xdd, 0x6b, 0xc0, 0x46, 0x00, 0x95, 0x9d, 0x6b, -0xc0, 0x46, 0x00, 0x95, 0x5d, 0x6b, 0xc0, 0x46, 0x00, 0x95, 0x1d, 0x6b, -0xc0, 0x46, 0x00, 0x95, 0x01, 0x37, 0x40, 0x2f, 0xe8, 0xd3, 0x00, 0x27, -0x6c, 0x46, 0x01, 0x23, 0x5b, 0x07, 0x1c, 0x43, 0x01, 0xe0, 0x20, 0x60, -0x01, 0x37, 0x0d, 0x68, 0x2b, 0x09, 0x02, 0xd2, 0x80, 0x2f, 0xf8, 0xd3, -0x01, 0xe0, 0x80, 0x2f, 0x03, 0xd3, 0x08, 0x49, 0x4b, 0x6e, 0x01, 0x33, -0x4b, 0x66, 0xd0, 0x62, 0xb8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0xf4, 0x01, 0xff, 0xff, 0x00, 0x00, 0x10, 0x40, 0x68, 0x0e, 0x00, 0x80, -0x00, 0x01, 0x18, 0x40, 0xa0, 0x82, 0x20, 0x40, 0x90, 0xb4, 0x00, 0x21, -0x0e, 0x4f, 0x0f, 0x4a, 0x00, 0x20, 0x4c, 0x01, 0x64, 0x1a, 0xa4, 0x00, -0xa3, 0x18, 0x58, 0x60, 0x98, 0x60, 0x18, 0x64, 0x58, 0x64, 0x10, 0x53, -0x58, 0x80, 0xcc, 0x00, 0xe4, 0x19, 0x98, 0x67, 0xdc, 0x62, 0x01, 0x31, -0x03, 0x29, 0xee, 0xd3, 0x06, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x48, 0x60, -0x88, 0x60, 0xc8, 0x60, 0x08, 0x61, 0x90, 0xbc, 0x70, 0x47, 0x00, 0x00, -0x58, 0x67, 0x21, 0x40, 0x5c, 0x2b, 0x00, 0x80, 0xd0, 0x2c, 0x00, 0x80, -0x64, 0x21, 0x05, 0x48, 0xc0, 0x46, 0x01, 0x63, 0x00, 0x21, 0xc9, 0x43, -0x41, 0x63, 0x81, 0x63, 0x00, 0x21, 0xc1, 0x63, 0x01, 0x64, 0x70, 0x47, -0x68, 0x0e, 0x00, 0x80, 0x80, 0xb4, 0x01, 0x20, 0x40, 0x02, 0x0a, 0x49, -0xc0, 0x46, 0x08, 0x60, 0x3c, 0x20, 0x48, 0x60, 0x88, 0x60, 0x08, 0x48, -0xc0, 0x46, 0xc8, 0x60, 0x00, 0x20, 0x07, 0x4a, 0x87, 0x00, 0xcb, 0x68, -0xc0, 0x46, 0xda, 0x51, 0x01, 0x30, 0x10, 0x28, 0xf8, 0xd3, 0x80, 0xbc, -0x70, 0x47, 0x00, 0x00, 0xe4, 0x2d, 0x00, 0x80, 0xf4, 0x2d, 0x00, 0x80, -0x49, 0x4c, 0xff, 0xff, 0x12, 0x49, 0x13, 0x48, 0x67, 0x23, 0x9b, 0x01, -0xca, 0x18, 0x06, 0xc0, 0x08, 0x38, 0x11, 0x4b, 0xca, 0x18, 0xc1, 0x60, -0x82, 0x60, 0x01, 0x61, 0x0f, 0x49, 0x10, 0x48, 0xa7, 0x23, 0x9b, 0x01, -0xca, 0x18, 0x06, 0xc0, 0x08, 0x38, 0x0e, 0x4b, 0xca, 0x18, 0xc1, 0x60, -0x82, 0x60, 0x01, 0x61, 0x0c, 0x48, 0x0d, 0x49, +0xf0, 0xbc, 0x70, 0x47, 0x24, 0xa3, 0x20, 0x40, +0x40, 0x01, 0x18, 0x00, 0x24, 0x83, 0x20, 0x40, 0x24, 0xa9, 0x20, 0x40, +0x80, 0x01, 0x18, 0x00, 0xa8, 0x03, 0x00, 0x80, 0x24, 0xa7, 0x20, 0x40, +0x68, 0x0e, 0x00, 0x80, 0x24, 0xa8, 0x20, 0x40, 0xa4, 0xa8, 0x20, 0x40, +0x08, 0x04, 0x00, 0x80, 0xb8, 0xb5, 0x2c, 0x48, 0xfd, 0xf7, 0xba, 0xfd, +0x01, 0x20, 0x2b, 0x49, 0x0a, 0x68, 0x52, 0x0c, 0x06, 0xd2, 0x0a, 0x68, +0x12, 0x0c, 0x02, 0xd1, 0x0a, 0x68, 0x92, 0x0a, 0x00, 0xd2, 0x00, 0x20, +0x04, 0x06, 0x24, 0x0e, 0x25, 0x4a, 0xd7, 0x1d, 0x0d, 0x37, 0x00, 0x23, +0x00, 0x20, 0x9d, 0x00, 0x78, 0x51, 0x01, 0x33, 0x04, 0x2b, 0xfa, 0xd3, +0x01, 0x27, 0x3f, 0x05, 0x50, 0x61, 0xf8, 0x60, 0xd0, 0x61, 0xf8, 0x61, +0x00, 0x23, 0xdb, 0x43, 0x93, 0x61, 0x3b, 0x61, 0x13, 0x62, 0x3b, 0x62, +0x00, 0x27, 0x1b, 0x4b, 0x8d, 0x68, 0xc0, 0x46, 0x00, 0x95, 0x8d, 0x69, +0xc0, 0x46, 0x00, 0x95, 0x00, 0x2c, 0x0b, 0xd0, 0xdd, 0x6b, 0xc0, 0x46, +0x00, 0x95, 0x9d, 0x6b, 0xc0, 0x46, 0x00, 0x95, 0x5d, 0x6b, 0xc0, 0x46, +0x00, 0x95, 0x1d, 0x6b, 0xc0, 0x46, 0x00, 0x95, 0x01, 0x37, 0x40, 0x2f, +0xe8, 0xd3, 0x00, 0x27, 0x6c, 0x46, 0x01, 0x23, 0x5b, 0x07, 0x1c, 0x43, +0x01, 0xe0, 0x20, 0x60, 0x01, 0x37, 0x0d, 0x68, 0x2b, 0x09, 0x02, 0xd2, +0x80, 0x2f, 0xf8, 0xd3, 0x01, 0xe0, 0x80, 0x2f, 0x03, 0xd3, 0x08, 0x49, +0x4b, 0x6e, 0x01, 0x33, 0x4b, 0x66, 0xd0, 0x62, 0xb8, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0xf4, 0x01, 0xff, 0xff, 0x00, 0x00, 0x10, 0x40, +0x68, 0x0e, 0x00, 0x80, 0x00, 0x01, 0x18, 0x40, 0xa0, 0x82, 0x20, 0x40, +0x90, 0xb4, 0x00, 0x21, 0x0e, 0x4f, 0x0f, 0x4a, 0x00, 0x20, 0x4c, 0x01, +0x64, 0x1a, 0xa4, 0x00, 0xa3, 0x18, 0x58, 0x60, 0x98, 0x60, 0x18, 0x64, +0x58, 0x64, 0x10, 0x53, 0x58, 0x80, 0xcc, 0x00, 0xe4, 0x19, 0x98, 0x67, +0xdc, 0x62, 0x01, 0x31, 0x03, 0x29, 0xee, 0xd3, 0x06, 0x49, 0xc0, 0x46, +0x08, 0x60, 0x48, 0x60, 0x88, 0x60, 0xc8, 0x60, 0x08, 0x61, 0x90, 0xbc, +0x70, 0x47, 0x00, 0x00, 0xac, 0x66, 0x21, 0x40, 0x5c, 0x2b, 0x00, 0x80, +0xd0, 0x2c, 0x00, 0x80, 0x64, 0x21, 0x05, 0x48, 0xc0, 0x46, 0x01, 0x63, +0x00, 0x21, 0xc9, 0x43, 0x41, 0x63, 0x81, 0x63, 0x00, 0x21, 0xc1, 0x63, +0x01, 0x64, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x80, 0xb4, 0x01, 0x20, +0x40, 0x02, 0x0a, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x3c, 0x20, 0x48, 0x60, +0x88, 0x60, 0x08, 0x48, 0xc0, 0x46, 0xc8, 0x60, 0x00, 0x20, 0x07, 0x4a, +0x87, 0x00, 0xcb, 0x68, 0xc0, 0x46, 0xda, 0x51, 0x01, 0x30, 0x10, 0x28, +0xf8, 0xd3, 0x80, 0xbc, 0x70, 0x47, 0x00, 0x00, 0xe4, 0x2d, 0x00, 0x80, +0xf4, 0x2d, 0x00, 0x80, 0x5d, 0x4c, 0xff, 0xff, 0x12, 0x49, 0x13, 0x48, +0x67, 0x23, 0x9b, 0x01, 0xca, 0x18, 0x06, 0xc0, 0x08, 0x38, 0x11, 0x4b, +0xca, 0x18, 0xc1, 0x60, 0x82, 0x60, 0x01, 0x61, 0x0f, 0x49, 0x10, 0x48, +0xa7, 0x23, 0x9b, 0x01, 0xca, 0x18, 0x06, 0xc0, 0x08, 0x38, 0x0e, 0x4b, +0xca, 0x18, 0xc1, 0x60, 0x82, 0x60, 0x01, 0x61, 0x0c, 0x48, 0x0d, 0x49, 0x67, 0x23, 0x9b, 0x01, 0xc2, 0x18, 0x05, 0xc1, 0x08, 0x39, 0x05, 0x4b, 0xc2, 0x18, 0xc8, 0x60, 0x8a, 0x60, 0x08, 0x61, 0x70, 0x47, 0x00, 0x00, -0x58, 0x1f, 0x21, 0x40, 0x48, 0x2e, 0x00, 0x80, 0xfc, 0x1f, 0x00, 0x00, -0x58, 0xef, 0x20, 0x40, 0x34, 0x2e, 0x00, 0x80, 0xfc, 0x2f, 0x00, 0x00, -0x58, 0x3f, 0x21, 0x40, 0x5c, 0x2e, 0x00, 0x80, 0x90, 0xb4, 0x00, 0x21, -0x40, 0x4c, 0x00, 0x20, 0x0a, 0x01, 0x12, 0x19, 0x19, 0x23, 0xdb, 0x01, -0xd2, 0x18, 0xd0, 0x62, 0x10, 0x63, 0x50, 0x63, 0x90, 0x63, 0x01, 0x31, -0x03, 0x29, 0xf3, 0xd3, 0x3a, 0x49, 0xc0, 0x46, 0x08, 0x63, 0x48, 0x63, -0x88, 0x63, 0x20, 0x60, 0x01, 0x21, 0xe3, 0x1d, 0x59, 0x33, 0x60, 0x60, -0x19, 0x71, 0x18, 0x72, 0x98, 0x71, 0x98, 0x72, 0x59, 0x71, 0x58, 0x72, -0xd8, 0x71, 0xd8, 0x72, 0xe2, 0x1d, 0x49, 0x32, 0x11, 0x73, 0x19, 0x70, -0x90, 0x73, 0x98, 0x70, 0x51, 0x73, 0x59, 0x70, 0xd0, 0x73, 0xd8, 0x70, -0x11, 0x71, 0x11, 0x72, 0x90, 0x71, 0x90, 0x72, 0x50, 0x71, 0x50, 0x72, -0xd0, 0x71, 0xd0, 0x72, 0x18, 0x73, 0x02, 0x22, 0xe7, 0x1d, 0x69, 0x37, -0x3a, 0x70, 0x99, 0x73, 0xba, 0x70, 0x58, 0x73, 0x78, 0x70, 0xd8, 0x73, -0xf8, 0x70, 0x39, 0x71, 0x3a, 0x72, 0xb9, 0x71, 0xb9, 0x72, 0x78, 0x71, -0x7a, 0x72, 0xf9, 0x71, 0xf9, 0x72, 0x39, 0x73, 0xe3, 0x1d, 0x79, 0x33, -0x1a, 0x70, 0xb9, 0x73, 0x99, 0x70, 0x78, 0x73, 0x5a, 0x70, 0xf9, 0x73, -0xd9, 0x70, 0x1a, 0x71, 0x1a, 0x72, 0x99, 0x71, 0x9a, 0x72, 0x58, 0x71, -0x5a, 0x72, 0xd9, 0x71, 0xda, 0x72, 0x19, 0x73, 0xe7, 0x1d, 0x89, 0x37, -0x3a, 0x70, 0x99, 0x73, 0xb9, 0x70, 0x58, 0x73, 0x7a, 0x70, 0xd9, 0x73, -0xf9, 0x70, 0x39, 0x71, 0x3a, 0x72, 0xb9, 0x71, 0xb9, 0x72, 0x78, 0x71, -0x7a, 0x72, 0xf9, 0x71, 0xf9, 0x72, 0x3a, 0x73, 0xe3, 0x1d, 0x99, 0x33, -0x1a, 0x70, 0xb9, 0x73, 0x9a, 0x70, 0x78, 0x73, 0x5a, 0x70, 0xf9, 0x73, -0xda, 0x70, 0x19, 0x71, 0x1a, 0x72, 0x99, 0x71, 0x99, 0x72, 0x58, 0x71, -0x5a, 0x72, 0xd9, 0x71, 0xd9, 0x72, 0x20, 0x61, 0xe0, 0x60, 0x60, 0x61, -0xa0, 0x60, 0x90, 0xbc, 0x70, 0x47, 0x00, 0x00, 0xa0, 0x1c, 0x00, 0x80, -0xe8, 0x19, 0x00, 0x80, 0x81, 0x20, 0x00, 0x02, 0x01, 0x49, 0xc0, 0x46, -0x88, 0x62, 0x70, 0x47, 0xc0, 0x00, 0x14, 0x00, 0x09, 0x49, 0x0a, 0x4b, -0xc8, 0x18, 0x04, 0x3b, 0xc9, 0x18, 0x08, 0x60, 0x00, 0x21, 0xc2, 0x1d, -0x29, 0x32, 0xc2, 0x61, 0x10, 0x1c, 0x01, 0x31, 0x08, 0x29, 0xf8, 0xd3, -0xc1, 0x1f, 0x29, 0x39, 0x00, 0x20, 0xc8, 0x61, 0x70, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0x84, 0x09, 0x00, 0x00, 0x06, 0x48, 0x07, 0x49, -0xc0, 0x46, 0x08, 0x80, 0x48, 0x80, 0x00, 0x20, 0x88, 0x80, 0xc8, 0x80, -0x88, 0x60, 0x04, 0x49, 0xc0, 0x46, 0x48, 0x61, 0x88, 0x61, 0x70, 0x47, -0xff, 0xff, 0x00, 0x00, 0x4c, 0x2a, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, -0x00, 0x21, 0x06, 0x48, 0xc2, 0x1d, 0x19, 0x32, 0xc1, 0x60, 0x01, 0x61, -0xc1, 0x61, 0x01, 0x62, 0x11, 0x71, 0xff, 0x30, 0x01, 0x30, 0x41, 0x62, -0x70, 0x47, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0x09, 0x48, 0x0a, 0x4b, -0xc0, 0x46, 0x18, 0x60, 0x00, 0x21, 0xc2, 0x1d, 0x4d, 0x32, 0xc2, 0x60, -0x10, 0x1c, 0x01, 0x31, 0x14, 0x29, 0xf8, 0xd3, 0xc1, 0x1f, 0x4d, 0x39, -0x00, 0x20, 0xc8, 0x60, 0x58, 0x60, 0x98, 0x60, 0x70, 0x47, 0x00, 0x00, -0xd8, 0x07, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, -0x00, 0xb5, 0x0b, 0x49, 0x0b, 0x48, 0xfc, 0xf7, 0x3a, 0xfd, 0x0b, 0x48, +0xac, 0x1e, 0x21, 0x40, 0x48, 0x2e, 0x00, 0x80, 0xfc, 0x1f, 0x00, 0x00, +0xac, 0xee, 0x20, 0x40, 0x34, 0x2e, 0x00, 0x80, 0xfc, 0x2f, 0x00, 0x00, +0xac, 0x3e, 0x21, 0x40, 0x5c, 0x2e, 0x00, 0x80, +0x90, 0xb4, 0x00, 0x21, 0x40, 0x4c, 0x00, 0x20, 0x0a, 0x01, 0x12, 0x19, +0x19, 0x23, 0xdb, 0x01, 0xd2, 0x18, 0xd0, 0x62, 0x10, 0x63, 0x50, 0x63, +0x90, 0x63, 0x01, 0x31, 0x03, 0x29, 0xf3, 0xd3, 0x3a, 0x49, 0xc0, 0x46, +0x08, 0x63, 0x48, 0x63, 0x88, 0x63, 0x20, 0x60, 0x01, 0x21, 0xe3, 0x1d, +0x59, 0x33, 0x60, 0x60, 0x19, 0x71, 0x18, 0x72, 0x98, 0x71, 0x98, 0x72, +0x59, 0x71, 0x58, 0x72, 0xd8, 0x71, 0xd8, 0x72, 0xe2, 0x1d, 0x49, 0x32, +0x11, 0x73, 0x19, 0x70, 0x90, 0x73, 0x98, 0x70, 0x51, 0x73, 0x59, 0x70, +0xd0, 0x73, 0xd8, 0x70, 0x11, 0x71, 0x11, 0x72, 0x90, 0x71, 0x90, 0x72, +0x50, 0x71, 0x50, 0x72, 0xd0, 0x71, 0xd0, 0x72, 0x18, 0x73, 0x02, 0x22, +0xe7, 0x1d, 0x69, 0x37, 0x3a, 0x70, 0x99, 0x73, 0xba, 0x70, 0x58, 0x73, +0x78, 0x70, 0xd8, 0x73, 0xf8, 0x70, 0x39, 0x71, 0x3a, 0x72, 0xb9, 0x71, +0xb9, 0x72, 0x78, 0x71, 0x7a, 0x72, 0xf9, 0x71, 0xf9, 0x72, 0x39, 0x73, +0xe3, 0x1d, 0x79, 0x33, 0x1a, 0x70, 0xb9, 0x73, 0x99, 0x70, 0x78, 0x73, +0x5a, 0x70, 0xf9, 0x73, 0xd9, 0x70, 0x1a, 0x71, 0x1a, 0x72, 0x99, 0x71, +0x9a, 0x72, 0x58, 0x71, 0x5a, 0x72, 0xd9, 0x71, 0xda, 0x72, 0x19, 0x73, +0xe7, 0x1d, 0x89, 0x37, 0x3a, 0x70, 0x99, 0x73, 0xb9, 0x70, 0x58, 0x73, +0x7a, 0x70, 0xd9, 0x73, 0xf9, 0x70, 0x39, 0x71, 0x3a, 0x72, 0xb9, 0x71, +0xb9, 0x72, 0x78, 0x71, 0x7a, 0x72, 0xf9, 0x71, 0xf9, 0x72, 0x3a, 0x73, +0xe3, 0x1d, 0x99, 0x33, 0x1a, 0x70, 0xb9, 0x73, 0x9a, 0x70, 0x78, 0x73, +0x5a, 0x70, 0xf9, 0x73, 0xda, 0x70, 0x19, 0x71, 0x1a, 0x72, 0x99, 0x71, +0x99, 0x72, 0x58, 0x71, 0x5a, 0x72, 0xd9, 0x71, 0xd9, 0x72, 0x20, 0x61, +0xe0, 0x60, 0x60, 0x61, 0xa0, 0x60, 0x90, 0xbc, 0x70, 0x47, 0x00, 0x00, +0xa0, 0x1c, 0x00, 0x80, 0xe8, 0x19, 0x00, 0x80, 0x81, 0x20, 0x00, 0x02, +0x01, 0x49, 0xc0, 0x46, 0x88, 0x62, 0x70, 0x47, 0xc0, 0x00, 0x14, 0x00, +0x09, 0x49, 0x0a, 0x4b, 0xc8, 0x18, 0x04, 0x3b, 0xc9, 0x18, 0x08, 0x60, +0x00, 0x21, 0xc2, 0x1d, 0x29, 0x32, 0xc2, 0x61, 0x10, 0x1c, 0x01, 0x31, +0x08, 0x29, 0xf8, 0xd3, 0xc1, 0x1f, 0x29, 0x39, 0x00, 0x20, 0xc8, 0x61, +0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x84, 0x09, 0x00, 0x00, +0x06, 0x48, 0x07, 0x49, 0xc0, 0x46, 0x08, 0x80, 0x48, 0x80, 0x00, 0x20, +0x88, 0x80, 0xc8, 0x80, 0x88, 0x60, 0x04, 0x49, 0xc0, 0x46, 0x48, 0x61, +0x88, 0x61, 0x70, 0x47, 0xff, 0xff, 0x00, 0x00, 0x4c, 0x2a, 0x00, 0x80, +0x6c, 0x06, 0x00, 0x80, 0x00, 0x21, 0x06, 0x48, 0xc2, 0x1d, 0x19, 0x32, +0xc1, 0x60, 0x01, 0x61, 0xc1, 0x61, 0x01, 0x62, 0x11, 0x71, 0xff, 0x30, +0x01, 0x30, 0x41, 0x62, 0x70, 0x47, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, +0x09, 0x48, 0x0a, 0x4b, 0xc0, 0x46, 0x18, 0x60, 0x00, 0x21, 0xc2, 0x1d, +0x4d, 0x32, 0xc2, 0x60, 0x10, 0x1c, 0x01, 0x31, 0x14, 0x29, 0xf8, 0xd3, +0xc1, 0x1f, 0x4d, 0x39, 0x00, 0x20, 0xc8, 0x60, 0x58, 0x60, 0x98, 0x60, +0x70, 0x47, 0x00, 0x00, 0xd8, 0x07, 0x00, 0x80, 0x6c, 0x06, 0x00, 0x80, +0x00, 0xb5, 0x0b, 0x49, 0x0b, 0x48, 0xfd, 0xf7, 0xea, 0xfb, 0x0b, 0x48, 0x00, 0x6a, 0x01, 0x23, 0xdb, 0x03, 0x98, 0x43, 0x09, 0x49, 0xc0, 0x46, 0x08, 0x62, 0x09, 0x48, 0xc1, 0x68, 0x01, 0x29, 0x04, 0xd1, 0xc0, 0x6f, 0x80, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x08, 0xbc, 0x18, 0x47, -0x8d, 0xd5, 0x21, 0x40, 0xc1, 0xa8, 0x21, 0x40, 0xc0, 0x00, 0x18, 0x40, -0xc0, 0x00, 0x18, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x00, 0xb5, 0x0f, 0x48, -0xc1, 0x68, 0x01, 0x29, 0x04, 0xd1, 0xc0, 0x6f, 0x80, 0x23, 0x01, 0x68, -0x99, 0x43, 0x01, 0x60, 0x0b, 0x4b, 0x0c, 0x48, 0x0c, 0x4a, 0x00, 0x21, -0xfc, 0xf7, 0x0f, 0xfd, 0x0b, 0x48, 0x41, 0x8d, 0x01, 0x31, 0x41, 0x85, -0x00, 0x21, 0xc1, 0x85, 0x09, 0x48, 0x00, 0x6a, 0x01, 0x23, 0xdb, 0x03, -0x18, 0x43, 0x08, 0x49, 0xc0, 0x46, 0x08, 0x62, 0x08, 0xbc, 0x18, 0x47, -0x68, 0x0e, 0x00, 0x80, 0x25, 0xd5, 0x21, 0x40, 0xc1, 0xa8, 0x21, 0x40, -0xb8, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x00, 0x18, 0x40, -0xc0, 0x00, 0x18, 0x00, 0xf0, 0xb5, 0xfe, 0xf7, 0x9b, 0xfe, 0x1b, 0x4c, +0xc1, 0xbd, 0x21, 0x40, 0x75, 0x98, 0x21, 0x40, +0xc0, 0x00, 0x18, 0x40, 0xc0, 0x00, 0x18, 0x00, 0x68, 0x0e, 0x00, 0x80, +0x00, 0xb5, 0x0f, 0x48, 0xc1, 0x68, 0x01, 0x29, 0x04, 0xd1, 0xc0, 0x6f, +0x80, 0x23, 0x01, 0x68, 0x99, 0x43, 0x01, 0x60, 0x0b, 0x4b, 0x0c, 0x48, +0x0c, 0x4a, 0x00, 0x21, 0xfd, 0xf7, 0xbf, 0xfb, 0x0b, 0x48, 0x41, 0x8d, +0x01, 0x31, 0x41, 0x85, 0x00, 0x21, 0xc1, 0x85, 0x09, 0x48, 0x00, 0x6a, +0x01, 0x23, 0xdb, 0x03, 0x18, 0x43, 0x08, 0x49, 0xc0, 0x46, 0x08, 0x62, +0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x59, 0xbd, 0x21, 0x40, +0x75, 0x98, 0x21, 0x40, 0xb8, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +0xc0, 0x00, 0x18, 0x40, 0xc0, 0x00, 0x18, 0x00, 0xf0, 0xb5, 0x1b, 0x4c, 0x10, 0x26, 0xe0, 0x68, 0x01, 0x28, 0x08, 0xd1, 0x60, 0x88, 0x00, 0x28, 0x05, 0xd1, 0x20, 0x79, 0x00, 0x28, 0x02, 0xd1, 0x19, 0x20, 0xa0, 0x67, 0x00, 0xe0, 0xa6, 0x67, 0x00, 0x20, 0x07, 0x23, 0x5b, 0x02, 0xe5, 0x18, @@ -3342,12 +2994,12 @@ 0x03, 0x03, 0x1b, 0x0b, 0x4e, 0x4c, 0x27, 0x6f, 0x3d, 0x03, 0x2d, 0x0b, 0xe7, 0x1d, 0x79, 0x37, 0xab, 0x42, 0x1c, 0xd0, 0xe3, 0x1d, 0x79, 0x33, 0x1b, 0x6a, 0xc0, 0x46, 0x40, 0x93, 0x01, 0x23, 0x9b, 0x07, 0x03, 0x43, -0x1b, 0x68, 0xcc, 0x00, 0x6e, 0x46, 0x33, 0x51, -0x01, 0x23, 0x9b, 0x07, 0x06, 0x1d, 0x33, 0x43, 0x1b, 0x68, 0x6c, 0x44, -0x63, 0x60, 0x08, 0x30, 0x01, 0x31, 0x40, 0x9b, 0x83, 0x42, 0x00, 0xd8, -0x3f, 0x48, 0x03, 0x03, 0x1b, 0x0b, 0xab, 0x42, 0xe7, 0xd1, 0x00, 0x20, -0x01, 0x23, 0x1b, 0x03, 0x13, 0x40, 0x3c, 0x4c, 0x03, 0xd0, 0x63, 0x6a, -0x01, 0x33, 0x63, 0x62, 0x09, 0xe0, 0x13, 0x0b, 0x03, 0xd3, 0x23, 0x6a, +0x1b, 0x68, 0xcc, 0x00, 0x6e, 0x46, 0x33, 0x51, 0x01, 0x23, 0x9b, 0x07, +0x06, 0x1d, 0x33, 0x43, 0x1b, 0x68, 0x6c, 0x44, 0x63, 0x60, 0x08, 0x30, +0x01, 0x31, 0x40, 0x9b, 0x83, 0x42, 0x00, 0xd8, 0x3f, 0x48, 0x03, 0x03, +0x1b, 0x0b, 0xab, 0x42, 0xe7, 0xd1, 0x00, 0x20, 0x01, 0x23, 0x1b, 0x03, +0x13, 0x40, 0x3c, 0x4c, 0x03, 0xd0, 0x63, 0x6a, 0x01, 0x33, 0x63, 0x62, +0x09, 0xe0, 0x13, 0x0b, 0x03, 0xd3, 0x23, 0x6a, 0x01, 0x33, 0x23, 0x62, 0x03, 0xe0, 0x37, 0x4b, 0x5c, 0x6d, 0x01, 0x34, 0x5c, 0x65, 0x00, 0x29, 0x09, 0xd0, 0x03, 0x1c, 0xdc, 0x00, 0x23, 0x1c, 0x6b, 0x44, 0x5c, 0x68, 0x01, 0x30, 0x23, 0x0d, 0x01, 0xd2, 0x88, 0x42, @@ -3363,12 +3015,12 @@ 0x12, 0x4b, 0xc0, 0x46, 0x2b, 0x67, 0x03, 0x1c, 0xdb, 0x00, 0x6b, 0x44, 0x5c, 0x68, 0x01, 0x30, 0x23, 0x0d, 0x04, 0xd3, 0x51, 0x24, 0xa4, 0x03, 0x2b, 0x6f, 0xc0, 0x46, 0xa3, 0x61, 0x88, 0x42, 0xde, 0xd1, 0x10, 0x0b, -0x03, 0xd3, 0x0e, 0x49, 0x01, 0x20, 0xfc, 0xf7, 0xc2, 0xfb, 0x41, 0xb0, +0x03, 0xd3, 0x0e, 0x49, 0x01, 0x20, 0xfd, 0xf7, 0x74, 0xfa, 0x41, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x01, 0x14, 0x40, 0x00, 0x40, 0x14, 0x40, 0x00, 0x00, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x24, 0xa7, 0x20, 0x40, 0xa4, 0x2a, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, 0x00, 0x00, 0x10, 0x40, 0xc0, 0x00, 0x18, 0x00, -0xb5, 0x4f, 0xff, 0xff, 0xf0, 0xb4, 0x00, 0x21, 0x00, 0x23, 0x07, 0x22, +0xc9, 0x4f, 0xff, 0xff, 0xf0, 0xb4, 0x00, 0x21, 0x00, 0x23, 0x07, 0x22, 0x06, 0x24, 0x47, 0x4f, 0xc0, 0x46, 0x3c, 0x61, 0x3a, 0x61, 0x01, 0x33, 0x20, 0x2b, 0xf9, 0xd3, 0x04, 0x25, 0x3d, 0x61, 0x05, 0x23, 0x3b, 0x61, 0x3c, 0x61, 0x3a, 0x61, 0x3c, 0x61, 0x3a, 0x61, 0x3d, 0x61, 0x3b, 0x61, @@ -3385,12 +3037,12 @@ 0x02, 0x23, 0x1d, 0x40, 0x04, 0x23, 0x2b, 0x43, 0x3b, 0x61, 0x05, 0x23, 0x2b, 0x43, 0x3b, 0x61, 0x45, 0x08, 0x02, 0x23, 0x1d, 0x40, 0x04, 0x23, 0x2b, 0x43, 0x3b, 0x61, 0x05, 0x23, 0x2b, 0x43, 0x3b, 0x61, 0x02, 0x25, -0x05, 0x40, 0x04, 0x23, 0x2b, 0x43, 0x3b, 0x61, -0x05, 0x23, 0x2b, 0x43, 0x3b, 0x61, 0x40, 0x00, 0x02, 0x23, 0x18, 0x40, -0x04, 0x23, 0x03, 0x43, 0x3b, 0x61, 0x05, 0x23, 0x18, 0x43, 0x38, 0x61, -0x00, 0x25, 0x3d, 0x61, 0x01, 0x23, 0x3b, 0x61, 0x3d, 0x61, 0x3b, 0x61, -0x00, 0x20, 0x3d, 0x61, 0x0d, 0x4b, 0x1b, 0x69, 0x49, 0x00, 0x1e, 0x1c, -0x02, 0x23, 0x33, 0x40, 0x19, 0x43, 0x01, 0x23, 0x3b, 0x61, 0x01, 0x30, +0x05, 0x40, 0x04, 0x23, 0x2b, 0x43, 0x3b, 0x61, 0x05, 0x23, 0x2b, 0x43, +0x3b, 0x61, 0x40, 0x00, 0x02, 0x23, 0x18, 0x40, 0x04, 0x23, 0x03, 0x43, +0x3b, 0x61, 0x05, 0x23, 0x18, 0x43, 0x38, 0x61, 0x00, 0x25, 0x3d, 0x61, +0x01, 0x23, 0x3b, 0x61, 0x3d, 0x61, 0x3b, 0x61, 0x00, 0x20, 0x3d, 0x61, +0x0d, 0x4b, 0x1b, 0x69, 0x49, 0x00, 0x1e, 0x1c, 0x02, 0x23, 0x33, 0x40, +0x19, 0x43, 0x01, 0x23, 0x3b, 0x61, 0x01, 0x30, 0x10, 0x28, 0xf2, 0xd3, 0x02, 0x20, 0x38, 0x61, 0x03, 0x20, 0x38, 0x61, 0x3c, 0x61, 0x3a, 0x61, 0x3c, 0x61, 0x3a, 0x61, 0x38, 0x61, 0x48, 0x08, 0xf0, 0xbc, 0x70, 0x47, 0x80, 0x00, 0x14, 0x00, 0x68, 0x0e, 0x00, 0x80, @@ -3419,21 +3071,21 @@ 0x10, 0x28, 0xf1, 0xd3, 0x17, 0x61, 0x07, 0x23, 0x13, 0x61, 0x17, 0x61, 0x13, 0x61, 0x03, 0x20, 0x10, 0x61, 0xf0, 0xbc, 0x70, 0x47, 0x00, 0x00, 0x80, 0x00, 0x14, 0x00, 0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb5, 0x4f, 0x4d, -0x08, 0x21, 0x02, 0x20, 0x2a, 0x1c, 0xfc, 0xf7, 0x75, 0xfa, 0x4d, 0x4c, +0x08, 0x21, 0x02, 0x20, 0x2a, 0x1c, 0xfd, 0xf7, 0x27, 0xf9, 0x4d, 0x4c, 0x71, 0x23, 0x5b, 0x01, 0xe7, 0x18, 0x38, 0x80, 0x1a, 0x21, 0x02, 0x20, -0x2a, 0x1c, 0xfc, 0xf7, 0x6b, 0xfa, 0x78, 0x80, 0x20, 0x79, 0x00, 0x28, +0x2a, 0x1c, 0xfd, 0xf7, 0x1d, 0xf9, 0x78, 0x80, 0x20, 0x79, 0x00, 0x28, 0x0b, 0xd0, 0x00, 0x20, 0x38, 0x80, 0xe0, 0x68, 0x01, 0x28, 0x10, 0xd1, 0x44, 0x48, 0x00, 0x68, 0x01, 0x23, 0x9b, 0x02, 0x18, 0x43, 0x99, 0x02, 0x08, 0x60, 0xe0, 0x68, 0x01, 0x28, 0x06, 0xd1, 0x60, 0x88, 0x00, 0x28, 0x03, 0xd1, 0xf9, 0x21, 0x12, 0x20, 0xff, 0xf7, 0x43, 0xff, 0x01, 0x21, 0xc9, 0x03, 0x00, 0x20, 0xff, 0xf7, 0x3e, 0xff, 0x00, 0x25, 0x7d, 0x26, 0xf6, 0x00, 0x00, 0xe0, 0x01, 0x35, 0x00, 0x20, 0xff, 0xf7, 0x9c, 0xfe, -0x00, 0x0c, 0x01, 0xd3, 0xb5, 0x42, 0xf7, 0xd3, -0x00, 0x25, 0x05, 0xe0, 0x03, 0x21, 0x09, 0x03, 0x00, 0x20, 0xff, 0xf7, -0x2b, 0xff, 0x01, 0x35, 0x00, 0x20, 0xff, 0xf7, 0x8d, 0xfe, 0x40, 0x0b, -0x01, 0xd2, 0xb5, 0x42, 0xf2, 0xd3, 0x04, 0x20, 0xff, 0xf7, 0x86, 0xfe, -0xff, 0x23, 0xe1, 0x33, 0x98, 0x43, 0x01, 0x21, 0x01, 0x43, 0x38, 0x88, -0xff, 0x23, 0x01, 0x33, 0x98, 0x42, 0x03, 0xd1, 0x2f, 0x23, 0x5b, 0x01, +0x00, 0x0c, 0x01, 0xd3, 0xb5, 0x42, 0xf7, 0xd3, 0x00, 0x25, 0x05, 0xe0, +0x03, 0x21, 0x09, 0x03, 0x00, 0x20, 0xff, 0xf7, 0x2b, 0xff, 0x01, 0x35, +0x00, 0x20, 0xff, 0xf7, 0x8d, 0xfe, 0x40, 0x0b, 0x01, 0xd2, 0xb5, 0x42, +0xf2, 0xd3, 0x04, 0x20, 0xff, 0xf7, 0x86, 0xfe, 0xff, 0x23, 0xe1, 0x33, +0x98, 0x43, 0x01, 0x21, 0x01, 0x43, 0x38, 0x88, 0xff, 0x23, 0x01, 0x33, +0x98, 0x42, 0x03, 0xd1, 0x2f, 0x23, 0x5b, 0x01, 0x19, 0x43, 0x16, 0xe0, 0x01, 0x28, 0x09, 0xd1, 0x78, 0x88, 0x01, 0x28, 0x03, 0xd1, 0x23, 0x23, 0x5b, 0x01, 0x19, 0x43, 0x0d, 0xe0, 0x20, 0x23, 0x19, 0x43, 0x0a, 0xe0, 0x00, 0x28, 0x08, 0xd1, 0x78, 0x88, 0x01, 0x28, @@ -3445,7 +3097,7 @@ 0xe3, 0xfe, 0x00, 0x27, 0x03, 0xe0, 0x08, 0x2f, 0x01, 0xd3, 0x0f, 0x2f, 0x08, 0xd9, 0x38, 0x1c, 0xff, 0xf7, 0x40, 0xfe, 0x79, 0x00, 0x09, 0x19, 0x1b, 0x23, 0xdb, 0x01, 0xc9, 0x18, 0x88, 0x83, 0x01, 0x37, 0x20, 0x2f, -0xef, 0xd3, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x79, 0xbf, 0x21, 0x40, +0xef, 0xd3, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xed, 0xaf, 0x21, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, 0x81, 0xb0, 0x13, 0x48, 0x01, 0x68, 0xc0, 0x46, 0x00, 0x91, 0x41, 0x68, 0xc0, 0x46, 0x00, 0x91, 0x81, 0x68, 0xc0, 0x46, 0x00, 0x91, 0xc1, 0x68, 0xc0, 0x46, 0x00, 0x91, @@ -3471,12 +3123,12 @@ 0x16, 0xd1, 0x51, 0x8b, 0xc9, 0x08, 0x13, 0xd2, 0x0f, 0xe0, 0x51, 0x8b, 0x09, 0x09, 0x0f, 0xd2, 0x0b, 0xe0, 0x0a, 0x79, 0x00, 0x2a, 0x0b, 0xd1, 0x6d, 0x23, 0x5b, 0x01, 0xc9, 0x18, 0x8a, 0x88, 0xc9, 0x88, 0x11, 0x40, -0x49, 0x09, 0x09, 0x07, 0x02, 0xd1, 0x04, 0x23, -0x98, 0x43, 0xf8, 0x83, 0xf8, 0x8b, 0x04, 0x21, 0x01, 0x40, 0x02, 0x9a, -0x1f, 0xd0, 0xb9, 0x8b, 0x4a, 0x0b, 0x27, 0xd3, 0x80, 0x09, 0x25, 0xd3, -0xff, 0x23, 0x01, 0x98, 0x01, 0x33, 0x98, 0x42, 0x20, 0xd0, 0x00, 0x25, -0x00, 0x98, 0x01, 0x28, 0x00, 0xd1, 0x05, 0x02, 0x01, 0x98, 0x00, 0x28, -0x02, 0xd1, 0x01, 0x23, 0x5b, 0x03, 0x1d, 0x43, 0xa9, 0x42, 0x13, 0xd0, +0x49, 0x09, 0x09, 0x07, 0x02, 0xd1, 0x04, 0x23, 0x98, 0x43, 0xf8, 0x83, +0xf8, 0x8b, 0x04, 0x21, 0x01, 0x40, 0x02, 0x9a, 0x1f, 0xd0, 0xb9, 0x8b, +0x4a, 0x0b, 0x27, 0xd3, 0x80, 0x09, 0x25, 0xd3, 0xff, 0x23, 0x01, 0x98, +0x01, 0x33, 0x98, 0x42, 0x20, 0xd0, 0x00, 0x25, 0x00, 0x98, 0x01, 0x28, +0x00, 0xd1, 0x05, 0x02, 0x01, 0x98, 0x00, 0x28, 0x02, 0xd1, 0x01, 0x23, +0x5b, 0x03, 0x1d, 0x43, 0xa9, 0x42, 0x13, 0xd0, 0x00, 0x20, 0x29, 0x1c, 0xff, 0xf7, 0x10, 0xfe, 0xbd, 0x83, 0x00, 0x20, 0xc0, 0x43, 0x60, 0x62, 0x0a, 0xe0, 0xb8, 0x8b, 0x40, 0x0b, 0x07, 0xd2, 0x09, 0x21, 0x49, 0x02, 0x00, 0x20, 0xff, 0xf7, 0x03, 0xfe, 0x09, 0x20, @@ -3504,7 +3156,7 @@ 0xff, 0xf7, 0xde, 0xff, 0x01, 0x1c, 0x05, 0x20, 0x00, 0x90, 0x00, 0x20, 0x01, 0xab, 0x18, 0x80, 0x04, 0x3b, 0x58, 0x70, 0x1b, 0x22, 0x00, 0xab, 0x5a, 0x80, 0xd9, 0x80, 0x05, 0x49, 0xc9, 0x6d, 0xc0, 0x46, 0x02, 0x91, -0x03, 0x90, 0x68, 0x46, 0x00, 0x21, 0xfc, 0xf7, 0xd5, 0xf9, 0x04, 0xb0, +0x03, 0x90, 0x68, 0x46, 0x00, 0x21, 0xfd, 0xf7, 0x79, 0xf8, 0x04, 0xb0, 0x08, 0xbc, 0x18, 0x47, 0xa4, 0x2a, 0x00, 0x80, 0x0f, 0x48, 0x01, 0x68, 0x49, 0x0c, 0x05, 0xd2, 0x01, 0x68, 0x09, 0x0c, 0x06, 0xd1, 0x00, 0x68, 0x80, 0x0a, 0x03, 0xd3, 0x0b, 0x48, 0x00, 0x68, 0x00, 0x0c, 0x01, 0xe0, @@ -3514,12 +3166,12 @@ 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x18, 0x40, 0x00, 0x00, 0x00, 0x80, 0x04, 0x99, 0x00, 0x00, 0x07, 0x99, 0x00, 0x00, 0x90, 0xb4, 0x01, 0x24, 0x21, 0x1c, 0x18, 0x48, 0x02, 0x68, 0x52, 0x0c, 0x06, 0xd2, 0x02, 0x68, -0x12, 0x0c, 0x02, 0xd1, 0x00, 0x68, 0x80, 0x0a, -0x00, 0xd2, 0x00, 0x21, 0x09, 0x06, 0x09, 0x0e, 0x12, 0x4f, 0x13, 0x4a, -0x02, 0xd0, 0x38, 0x68, 0x00, 0x0c, 0x00, 0xe0, 0x90, 0x6c, 0x00, 0x04, -0x00, 0x0c, 0x10, 0x4b, 0x98, 0x42, 0x08, 0xd0, 0x02, 0x33, 0x98, 0x42, -0x05, 0xd0, 0x0e, 0x4b, 0x98, 0x42, 0x02, 0xd0, 0x02, 0x3b, 0x98, 0x42, -0x0c, 0xd1, 0x00, 0x29, 0x02, 0xd0, 0xf8, 0x6a, 0x00, 0x0c, 0x00, 0xe0, +0x12, 0x0c, 0x02, 0xd1, 0x00, 0x68, 0x80, 0x0a, 0x00, 0xd2, 0x00, 0x21, +0x09, 0x06, 0x09, 0x0e, 0x12, 0x4f, 0x13, 0x4a, 0x02, 0xd0, 0x38, 0x68, +0x00, 0x0c, 0x00, 0xe0, 0x90, 0x6c, 0x00, 0x04, 0x00, 0x0c, 0x10, 0x4b, +0x98, 0x42, 0x08, 0xd0, 0x02, 0x33, 0x98, 0x42, 0x05, 0xd0, 0x0e, 0x4b, +0x98, 0x42, 0x02, 0xd0, 0x02, 0x3b, 0x98, 0x42, 0x0c, 0xd1, 0x00, 0x29, +0x02, 0xd0, 0xf8, 0x6a, 0x00, 0x0c, 0x00, 0xe0, 0xd0, 0x6c, 0x40, 0x0a, 0x00, 0xd2, 0x00, 0x24, 0x20, 0x06, 0x00, 0x0e, 0x90, 0xbc, 0x70, 0x47, 0x00, 0x20, 0xfb, 0xe7, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x18, 0x40, 0x00, 0x00, 0x00, 0x80, 0x04, 0x99, 0x00, 0x00, @@ -3549,47 +3201,36 @@ 0x5b, 0x00, 0x9f, 0x44, 0x05, 0x03, 0x07, 0x03, 0x07, 0x07, 0x05, 0x03, 0x03, 0x20, 0x02, 0xe0, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x20, 0x01, 0x21, 0x38, 0x60, 0x80, 0x07, 0x00, 0xd1, 0x00, 0x21, 0x08, 0x06, 0x00, 0x0e, -0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x98, 0x6e, 0x21, 0x40, +0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x34, 0x6e, 0x21, 0x40, 0x00, 0x00, 0x11, 0x40, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x18, 0x40, -0x00, 0x00, 0x00, 0x80, 0xfe, 0x66, 0xff, 0xff, 0xf0, 0xb5, 0x83, 0xb0, -0x07, 0x1c, 0x01, 0x20, 0x02, 0x90, 0x01, 0x25, 0x02, 0x24, 0x10, 0x26, -0x20, 0x21, 0x00, 0x91, 0xff, 0xf7, 0xe2, 0xfe, 0x01, 0x28, 0x4d, 0xd1, -0x38, 0x2f, 0x01, 0xd0, 0xa8, 0x2f, 0x3a, 0xd1, 0x2e, 0x4e, 0x3c, 0x21, -0x02, 0x20, 0x32, 0x1c, 0xfb, 0xf7, 0x4c, 0xff, 0x3e, 0x21, 0x05, 0x1c, -0x02, 0x20, 0x32, 0x1c, 0xfb, 0xf7, 0x46, 0xff, 0x00, 0x04, 0x05, 0x43, -0x40, 0x21, 0x02, 0x20, 0x32, 0x1c, 0xfb, 0xf7, -0x3f, 0xff, 0x01, 0x90, 0x42, 0x21, 0x02, 0x20, 0x32, 0x1c, 0xfb, 0xf7, -0x39, 0xff, 0x00, 0x04, 0x01, 0x99, 0x08, 0x43, 0x06, 0x1c, 0xa8, 0x2f, -0x1b, 0xd1, 0x1f, 0x4a, 0x44, 0x21, 0x02, 0x20, 0xfb, 0xf7, 0x2e, 0xff, -0x04, 0x1c, 0x1c, 0x4a, 0x46, 0x21, 0x02, 0x20, 0xfb, 0xf7, 0x28, 0xff, -0x00, 0x04, 0x04, 0x43, 0x18, 0x4a, 0x48, 0x21, 0x02, 0x20, 0xfb, 0xf7, -0x21, 0xff, 0x00, 0x90, 0x15, 0x4a, 0x4a, 0x21, 0x02, 0x20, 0xfb, 0xf7, -0x1b, 0xff, 0x00, 0x04, 0x00, 0x99, 0x01, 0x43, 0x00, 0x91, 0x28, 0x1c, -0x30, 0x43, 0x20, 0x43, 0x00, 0x99, 0x08, 0x43, 0x00, 0xd1, 0x16, 0xe0, -0x11, 0x20, 0x00, 0x04, 0x05, 0x62, 0x46, 0x62, 0x84, 0x62, 0x00, 0x99, -0xc0, 0x46, 0xc1, 0x62, 0x00, 0x21, 0x0a, 0x48, 0xc0, 0x46, 0x01, 0x60, -0x38, 0x2f, 0x01, 0xd0, 0xa8, 0x2f, 0x05, 0xd1, 0x01, 0x21, 0x01, 0x60, -0xa8, 0x2f, 0x01, 0xd1, 0x03, 0x21, 0x01, 0x60, 0x02, 0x98, 0x03, 0xb0, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x79, 0xbf, 0x21, 0x40, -0x98, 0x6e, 0x21, 0x40, 0x70, 0x47, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, -0x90, 0xb5, 0x07, 0x1c, 0x12, 0x4c, 0x21, 0x68, 0x12, 0x48, 0x81, 0x42, -0x0b, 0xd0, 0x00, 0x23, 0x21, 0x1c, 0xe2, 0x1d, 0xc5, 0x32, 0x00, 0xe0, -0x08, 0xc1, 0x91, 0x42, 0xfc, 0xd3, 0x20, 0x60, 0xcc, 0x20, 0xa0, 0x80, +0x00, 0x00, 0x00, 0x80, 0xfe, 0x66, 0xff, 0xff, 0xf0, 0xb5, 0x82, 0xb0, +0x07, 0x1c, 0x01, 0x20, 0x01, 0x90, 0xff, 0xf7, 0xe7, 0xfe, 0x01, 0x28, +0x13, 0xd1, 0x38, 0x2f, 0x01, 0xd0, 0xa8, 0x2f, 0x07, 0xd1, 0x00, 0x26, +0xf6, 0x43, 0x34, 0x1c, 0xa8, 0x2f, 0x02, 0xd1, 0x30, 0x1c, 0x00, 0x96, +0x35, 0x1c, 0x11, 0x20, 0x00, 0x04, 0x06, 0x62, 0x44, 0x62, 0x85, 0x62, +0x00, 0x99, 0xc0, 0x46, 0xc1, 0x62, 0x00, 0x21, 0x08, 0x48, 0xc0, 0x46, +0x01, 0x60, 0x38, 0x2f, 0x01, 0xd0, 0xa8, 0x2f, 0x05, 0xd1, 0x01, 0x21, +0x01, 0x60, 0xa8, 0x2f, 0x01, 0xd1, 0x03, 0x21, 0x01, 0x60, 0x01, 0x98, +0x02, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x34, 0x6e, 0x21, 0x40, +0x70, 0x47, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, 0x90, 0xb5, 0x07, 0x1c, +0x12, 0x4c, 0x21, 0x68, 0x12, 0x48, 0x81, 0x42, 0x0b, 0xd0, 0x00, 0x23, +0x21, 0x1c, 0xe2, 0x1d, 0xc1, 0x32, 0x00, 0xe0, +0x08, 0xc1, 0x91, 0x42, 0xfc, 0xd3, 0x20, 0x60, 0xc8, 0x20, 0xa0, 0x80, 0x67, 0x72, 0x38, 0x01, 0x00, 0xf0, 0x18, 0xf8, 0x27, 0x72, 0x0a, 0x48, 0xc0, 0x46, 0xe0, 0x60, 0x09, 0x2f, 0x00, 0xdb, 0x00, 0x27, 0xe0, 0x19, 0x01, 0x7d, 0x01, 0x31, 0x01, 0x75, 0xe0, 0x88, 0x01, 0x30, 0xe0, 0x80, 0x01, 0x20, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x80, -0xee, 0xff, 0xc0, 0xd0, 0x02, 0x10, 0x00, 0x03, 0x80, 0xb4, 0x08, 0x4a, -0xd1, 0x1d, 0x89, 0x31, 0x0b, 0x7b, 0x20, 0x2b, 0x01, 0xd3, 0x00, 0x23, -0x0b, 0x73, 0x07, 0x1c, 0x08, 0x7b, 0x43, 0x1c, 0x0b, 0x73, 0x80, 0x18, -0x90, 0x30, 0x47, 0x73, 0x80, 0xbc, 0x70, 0x47, 0x00, 0x00, 0x00, 0x80, +0xee, 0xff, 0xc0, 0xd0, 0x08, 0x10, 0x00, 0x03, 0x80, 0xb4, 0x08, 0x4a, +0xd1, 0x1d, 0x89, 0x31, 0x0b, 0x7a, 0x20, 0x2b, 0x01, 0xd3, 0x00, 0x23, +0x0b, 0x72, 0x07, 0x1c, 0x08, 0x7a, 0x43, 0x1c, 0x0b, 0x72, 0x80, 0x18, +0x90, 0x30, 0x47, 0x72, 0x80, 0xbc, 0x70, 0x47, 0x00, 0x00, 0x00, 0x80, 0x07, 0x49, 0x01, 0x22, 0x12, 0x04, 0x08, 0x68, 0x02, 0x40, 0x01, 0x20, 0x00, 0x2a, 0x06, 0xd1, 0x0a, 0x68, 0x12, 0x0c, 0x02, 0xd1, 0x09, 0x68, 0x89, 0x0a, 0x00, 0xd2, 0x00, 0x20, 0x70, 0x47, 0x00, 0x00, 0x10, 0x40, 0x90, 0xb5, 0x07, 0x1c, 0x09, 0x4c, 0x38, 0x1c, 0x21, 0x1c, 0xfc, 0xf7, -0xab, 0xf8, 0x38, 0x1c, 0x00, 0xf0, 0x0e, 0xf8, 0x01, 0x23, 0xd8, 0x42, -0x01, 0xd1, 0x00, 0x0c, 0xe0, 0x80, 0x00, 0x21, 0x20, 0x1c, 0xfb, 0xf7, -0xdf, 0xff, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x70, 0x67, 0x21, 0x40, +0x91, 0xff, 0x38, 0x1c, 0x00, 0xf0, 0x0e, 0xf8, 0x01, 0x23, 0xd8, 0x42, +0x01, 0xd1, 0x00, 0x0c, 0xe0, 0x80, 0x00, 0x21, 0x20, 0x1c, 0xfc, 0xf7, +0xc5, 0xfe, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xc4, 0x66, 0x21, 0x40, 0xf8, 0xb5, 0x07, 0x1c, 0x79, 0x7a, 0x76, 0x48, 0x00, 0x23, 0x76, 0x4c, 0x01, 0x29, 0x5d, 0xd1, 0xa2, 0x88, 0xc0, 0x46, 0x00, 0x92, 0xa1, 0x89, 0x8a, 0x42, 0x74, 0xda, 0xfa, 0x7a, 0x00, 0x2a, 0x15, 0xd0, 0x7a, 0x6c, @@ -3600,23 +3241,23 @@ 0x12, 0x0c, 0x22, 0x80, 0x8a, 0x42, 0x00, 0xdb, 0x23, 0x80, 0x00, 0x22, 0x00, 0x29, 0x69, 0xdd, 0x5f, 0x4c, 0xa4, 0x6a, 0x5e, 0x4b, 0x1d, 0x88, 0x58, 0x23, 0x6b, 0x43, 0xe3, 0x18, 0xde, 0x1d, 0x01, 0x36, 0x01, 0x23, -0x9b, 0x07, 0x33, 0x43, 0x1b, 0x68, 0x1b, 0x06, -0x15, 0xd1, 0x58, 0x49, 0x00, 0x9a, 0x01, 0x32, 0x8a, 0x80, 0x8a, 0x88, -0xc0, 0x46, 0x42, 0x81, 0x08, 0x88, 0x01, 0x30, 0x54, 0x4e, 0xc0, 0x46, -0xf0, 0x80, 0x58, 0x20, 0x68, 0x43, 0x21, 0x18, 0x38, 0x1c, 0x00, 0xf0, -0x8d, 0xfa, 0xf0, 0x88, 0x00, 0x04, 0x00, 0x14, 0x95, 0xe0, 0x4d, 0x4b, -0x01, 0x35, 0x2d, 0x04, 0x2d, 0x0c, 0x1d, 0x80, 0x8d, 0x42, 0x01, 0xdb, -0x00, 0x25, 0x1d, 0x80, 0x01, 0x32, 0x12, 0x04, 0x12, 0x14, 0x91, 0x42, -0xce, 0xdc, 0x81, 0xe0, 0xe1, 0x88, 0xe2, 0x89, 0x91, 0x42, 0x18, 0xda, -0xf9, 0x7a, 0x00, 0x29, 0x2f, 0xd0, 0x79, 0x6c, 0x49, 0x04, 0x49, 0x0c, -0x79, 0x64, 0x2a, 0xd0, 0xe2, 0x89, 0x91, 0x42, 0x27, 0xd8, 0xe1, 0x88, -0x01, 0x31, 0xe1, 0x80, 0xe1, 0x88, 0xc0, 0x46, 0x81, 0x81, 0x01, 0x23, -0xdb, 0x03, 0x78, 0x6c, 0x18, 0x43, 0x3a, 0x4e, 0xc0, 0x46, 0xf0, 0x80, -0x00, 0xe0, 0x63, 0xe0, 0xe0, 0x6a, 0x79, 0x6c, 0x4b, 0x00, 0x59, 0x18, -0x49, 0x01, 0x40, 0x18, 0xc1, 0x1f, 0x59, 0x39, 0x38, 0x1c, 0x00, 0xf0, -0x79, 0xfa, 0xe0, 0x6a, 0x79, 0x6c, 0x4a, 0x00, 0x52, 0x18, 0x52, 0x01, -0x80, 0x18, 0x01, 0x39, 0x09, 0x04, 0x09, 0x0c, 0x60, 0x38, 0x00, 0xf0, -0xf3, 0xfa, 0xb6, 0xe7, 0x4a, 0xe0, 0x61, 0x88, 0x01, 0x31, 0x09, 0x04, +0x9b, 0x07, 0x33, 0x43, 0x1b, 0x68, 0x1b, 0x06, 0x15, 0xd1, 0x58, 0x49, +0x00, 0x9a, 0x01, 0x32, 0x8a, 0x80, 0x8a, 0x88, 0xc0, 0x46, 0x42, 0x81, +0x08, 0x88, 0x01, 0x30, 0x54, 0x4e, 0xc0, 0x46, 0xf0, 0x80, 0x58, 0x20, +0x68, 0x43, 0x21, 0x18, 0x38, 0x1c, 0x00, 0xf0, 0x39, 0xfb, 0xf0, 0x88, +0x00, 0x04, 0x00, 0x14, 0x95, 0xe0, 0x4d, 0x4b, 0x01, 0x35, 0x2d, 0x04, +0x2d, 0x0c, 0x1d, 0x80, 0x8d, 0x42, 0x01, 0xdb, 0x00, 0x25, 0x1d, 0x80, +0x01, 0x32, 0x12, 0x04, 0x12, 0x14, 0x91, 0x42, 0xce, 0xdc, 0x81, 0xe0, +0xe1, 0x88, 0xe2, 0x89, 0x91, 0x42, 0x18, 0xda, 0xf9, 0x7a, 0x00, 0x29, +0x2f, 0xd0, 0x79, 0x6c, 0x49, 0x04, 0x49, 0x0c, 0x79, 0x64, 0x2a, 0xd0, +0xe2, 0x89, 0x91, 0x42, 0x27, 0xd8, 0xe1, 0x88, 0x01, 0x31, 0xe1, 0x80, +0xe1, 0x88, 0xc0, 0x46, 0x81, 0x81, 0x01, 0x23, 0xdb, 0x03, 0x78, 0x6c, +0x18, 0x43, 0x3a, 0x4e, 0xc0, 0x46, 0xf0, 0x80, 0x00, 0xe0, 0x63, 0xe0, +0xe0, 0x6a, 0x79, 0x6c, 0x4b, 0x00, 0x59, 0x18, 0x49, 0x01, 0x40, 0x18, +0xc1, 0x1f, 0x59, 0x39, 0x38, 0x1c, 0x00, 0xf0, 0x0f, 0xfb, 0xe0, 0x6a, +0x79, 0x6c, 0x4a, 0x00, 0x52, 0x18, 0x52, 0x01, 0x80, 0x18, 0x01, 0x39, +0x09, 0x04, 0x09, 0x0c, 0x60, 0x38, 0x00, 0xf0, 0x89, 0xfb, 0xb6, 0xe7, +0x4a, 0xe0, 0x61, 0x88, 0x01, 0x31, 0x09, 0x04, 0x09, 0x0c, 0x61, 0x80, 0xe2, 0x89, 0x91, 0x42, 0x00, 0xdb, 0x63, 0x80, 0x00, 0x21, 0x00, 0x2a, 0x3e, 0xdd, 0x24, 0x4c, 0xe4, 0x6a, 0x23, 0x4b, 0x5d, 0x88, 0x6b, 0x00, 0x5b, 0x19, 0x5b, 0x01, 0xe3, 0x18, 0xde, 0x1d, @@ -3624,14 +3265,14 @@ 0x20, 0xd1, 0x1c, 0x4e, 0xf1, 0x88, 0x01, 0x31, 0xf1, 0x80, 0xf1, 0x88, 0xc0, 0x46, 0x81, 0x81, 0x70, 0x88, 0x01, 0x23, 0xdb, 0x03, 0x01, 0x30, 0x18, 0x43, 0x17, 0x49, 0xc0, 0x46, 0xc8, 0x80, 0x68, 0x00, 0x40, 0x19, -0x40, 0x01, 0x21, 0x18, 0x38, 0x1c, 0x00, 0xf0, 0x39, 0xfa, 0x71, 0x88, +0x40, 0x01, 0x21, 0x18, 0x38, 0x1c, 0x00, 0xf0, 0xcf, 0xfa, 0x71, 0x88, 0x4a, 0x00, 0x52, 0x18, 0x52, 0x01, 0xf0, 0x6a, 0x80, 0x18, 0x00, 0xf0, -0xb7, 0xfa, 0x0e, 0x49, 0xc8, 0x88, 0x79, 0xe7, 0x0b, 0x4b, 0x01, 0x35, +0x4d, 0xfb, 0x0e, 0x49, 0xc8, 0x88, 0x79, 0xe7, 0x0b, 0x4b, 0x01, 0x35, 0x2d, 0x04, 0x2d, 0x0c, 0x5d, 0x80, 0x95, 0x42, 0x01, 0xdb, 0x00, 0x25, 0x5d, 0x80, 0x01, 0x31, 0x09, 0x04, 0x09, 0x14, 0x8a, 0x42, 0xc2, 0xdc, 0x01, 0x89, 0x01, 0x31, 0x01, 0x81, 0x00, 0x20, 0xc0, 0x43, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x4c, 0x2b, 0x00, 0x80, 0x4c, 0x2a, 0x00, 0x80, -0x70, 0x67, 0x21, 0x40, 0xf0, 0xb4, 0x06, 0x1c, 0x01, 0x23, 0xdb, 0x03, +0xc4, 0x66, 0x21, 0x40, 0xf0, 0xb4, 0x06, 0x1c, 0x01, 0x23, 0xdb, 0x03, 0x33, 0x40, 0x01, 0x24, 0x44, 0x4f, 0x00, 0x20, 0x44, 0x4a, 0x45, 0x4d, 0xd1, 0x1d, 0x39, 0x31, 0x00, 0x2b, 0x41, 0xd0, 0xe3, 0x03, 0xf3, 0x1a, 0x73, 0xd0, 0xee, 0x89, 0x9e, 0x42, 0x71, 0xd3, 0xee, 0x88, 0x00, 0x2e, @@ -3643,23 +3284,23 @@ 0xd2, 0x18, 0x90, 0x63, 0xf2, 0x6a, 0xd2, 0x18, 0xd0, 0x63, 0xf2, 0x6a, 0xd2, 0x18, 0x10, 0x64, 0xf2, 0x6a, 0xd2, 0x18, 0x50, 0x64, 0xf2, 0x6a, 0xd2, 0x18, 0x90, 0x64, 0xf2, 0x6a, 0xd2, 0x18, 0xd0, 0x64, 0xf0, 0x88, -0x01, 0x38, 0xf0, 0x80, 0xf0, 0x88, 0xc0, 0x46, -0x88, 0x81, 0x24, 0x49, 0x00, 0x28, 0x39, 0xd1, 0x4f, 0x80, 0x37, 0xe0, -0x00, 0x2e, 0x38, 0xd9, 0xab, 0x89, 0xb3, 0x42, 0x30, 0xd3, 0xab, 0x88, -0x00, 0x2b, 0x2c, 0xd0, 0x53, 0x89, 0x01, 0x33, 0x53, 0x81, 0x2a, 0x1c, -0xad, 0x6a, 0x58, 0x23, 0x01, 0x3e, 0x73, 0x43, 0xed, 0x18, 0xae, 0x68, -0x36, 0x06, 0x36, 0x0e, 0x03, 0x2e, 0x02, 0xd0, 0xce, 0x89, 0x01, 0x36, -0xce, 0x81, 0xa8, 0x60, 0x95, 0x6a, 0xed, 0x18, 0xa8, 0x63, 0x95, 0x6a, -0xed, 0x18, 0xe8, 0x63, 0x95, 0x6a, 0xed, 0x18, 0x28, 0x64, 0x95, 0x6a, -0xed, 0x18, 0x68, 0x64, 0x95, 0x6a, 0xed, 0x18, 0xa8, 0x64, 0x95, 0x6a, -0xeb, 0x18, 0xd8, 0x64, 0x90, 0x88, 0x01, 0x38, 0x90, 0x80, 0x90, 0x88, -0xc0, 0x46, 0x48, 0x81, 0x00, 0x28, 0x03, 0xd1, 0x01, 0xe0, 0x04, 0xe0, -0x03, 0xe0, 0x17, 0x80, 0x20, 0x1c, 0xf0, 0xbc, 0x70, 0x47, 0xca, 0x89, -0x01, 0x32, 0xca, 0x81, 0xf9, 0xe7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, -0x0c, 0x2b, 0x00, 0x80, 0x4c, 0x2a, 0x00, 0x80, 0x00, 0xb5, 0x00, 0x21, -0x41, 0x60, 0x10, 0x49, 0x4a, 0x68, 0x00, 0x2a, 0x10, 0xd1, 0xca, 0x68, -0x00, 0x2a, 0x04, 0xd0, 0xca, 0x1d, 0x19, 0x32, 0x12, 0x79, 0x00, 0x2a, -0x08, 0xd0, 0x4a, 0x69, 0x00, 0x2a, 0x0b, 0xd1, 0x88, 0x61, 0x48, 0x61, +0x01, 0x38, 0xf0, 0x80, 0xf0, 0x88, 0xc0, 0x46, 0x88, 0x81, 0x24, 0x49, +0x00, 0x28, 0x39, 0xd1, 0x4f, 0x80, 0x37, 0xe0, 0x00, 0x2e, 0x38, 0xd9, +0xab, 0x89, 0xb3, 0x42, 0x30, 0xd3, 0xab, 0x88, 0x00, 0x2b, 0x2c, 0xd0, +0x53, 0x89, 0x01, 0x33, 0x53, 0x81, 0x2a, 0x1c, 0xad, 0x6a, 0x58, 0x23, +0x01, 0x3e, 0x73, 0x43, 0xed, 0x18, 0xae, 0x68, 0x36, 0x06, 0x36, 0x0e, +0x03, 0x2e, 0x02, 0xd0, 0xce, 0x89, 0x01, 0x36, 0xce, 0x81, 0xa8, 0x60, +0x95, 0x6a, 0xed, 0x18, 0xa8, 0x63, 0x95, 0x6a, 0xed, 0x18, 0xe8, 0x63, +0x95, 0x6a, 0xed, 0x18, 0x28, 0x64, 0x95, 0x6a, 0xed, 0x18, 0x68, 0x64, +0x95, 0x6a, 0xed, 0x18, 0xa8, 0x64, 0x95, 0x6a, 0xeb, 0x18, 0xd8, 0x64, +0x90, 0x88, 0x01, 0x38, 0x90, 0x80, 0x90, 0x88, 0xc0, 0x46, 0x48, 0x81, +0x00, 0x28, 0x03, 0xd1, 0x01, 0xe0, 0x04, 0xe0, 0x03, 0xe0, 0x17, 0x80, +0x20, 0x1c, 0xf0, 0xbc, 0x70, 0x47, 0xca, 0x89, 0x01, 0x32, 0xca, 0x81, +0xf9, 0xe7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x0c, 0x2b, 0x00, 0x80, +0x4c, 0x2a, 0x00, 0x80, 0x00, 0xb5, 0x00, 0x21, 0x41, 0x60, 0x10, 0x49, +0x4a, 0x68, 0x00, 0x2a, 0x10, 0xd1, 0xca, 0x68, 0x00, 0x2a, 0x04, 0xd0, +0xca, 0x1d, 0x19, 0x32, 0x12, 0x79, 0x00, 0x2a, 0x08, 0xd0, 0x4a, 0x69, +0x00, 0x2a, 0x0b, 0xd1, 0x88, 0x61, 0x48, 0x61, 0x00, 0xf0, 0x10, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0x4a, 0x69, 0x00, 0x2a, 0x02, 0xd1, 0x88, 0x61, 0x48, 0x61, 0xf7, 0xe7, 0x8a, 0x69, 0xc0, 0x46, 0x50, 0x60, 0x88, 0x61, 0xf2, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, @@ -3677,32 +3318,32 @@ 0x01, 0x31, 0x91, 0x42, 0xf4, 0xd3, 0x10, 0x29, 0x07, 0xd2, 0x8a, 0x00, 0xd2, 0x18, 0xff, 0x32, 0x01, 0x32, 0x57, 0x62, 0x01, 0x31, 0x10, 0x29, 0xf7, 0xd3, 0x11, 0x49, 0x00, 0xf0, 0x22, 0xf8, 0xb0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0x1c, 0xad, 0x20, 0x40, +0x18, 0x47, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0xac, 0xab, 0x20, 0x40, 0x28, 0x01, 0x40, 0x00, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, 0x20, 0x01, 0x40, 0x00, 0x67, 0x45, 0x23, 0x01, 0xef, 0xcd, 0xab, 0x89, 0x98, 0xba, 0xdc, 0xfe, 0x10, 0x32, 0x54, 0x76, 0xc3, 0xd2, 0xe1, 0xf0, 0x36, 0x36, 0x36, 0x36, 0x30, 0x80, 0x20, 0x40, 0xb0, 0xb5, 0x0f, 0x1c, 0x15, 0x4d, 0xe9, 0x1d, -0xc9, 0x31, 0x15, 0x4c, 0x23, 0x1c, 0x15, 0x4a, 0x00, 0x20, 0xfb, 0xf7, -0x50, 0xfc, 0xe9, 0x1d, 0xff, 0x31, 0x1e, 0x31, 0x23, 0x1c, 0x0d, 0x1c, -0x11, 0x4a, 0x01, 0x20, 0xfb, 0xf7, 0x47, 0xfc, 0x29, 0x1c, 0x23, 0x1c, -0x0e, 0x4a, 0x00, 0x20, 0xfb, 0xf7, 0x41, 0xfc, -0x39, 0x1c, 0x23, 0x1c, 0x0c, 0x4a, 0x01, 0x20, 0xfb, 0xf7, 0x3b, 0xfc, -0x00, 0x21, 0x0b, 0x48, 0xc2, 0x1d, 0x19, 0x32, 0x51, 0x71, 0x01, 0x21, -0xff, 0x30, 0x01, 0x30, 0x41, 0x62, 0x08, 0x1c, 0xb0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x1c, 0xad, 0x20, 0x40, 0x75, 0x08, 0xff, 0xff, -0x28, 0x00, 0x03, 0x00, 0x40, 0x00, 0x02, 0x00, 0x14, 0x00, 0x07, 0x00, -0x6c, 0x06, 0x00, 0x80, 0xf0, 0xb5, 0x37, 0x4a, 0x50, 0x69, 0x01, 0x23, -0x9b, 0x07, 0x08, 0x30, 0x18, 0x43, 0x00, 0x68, 0x01, 0x06, 0x09, 0x0e, -0x33, 0x4b, 0x01, 0x29, 0x49, 0xd1, 0x1f, 0x68, 0x19, 0x1c, 0x32, 0x4b, -0x9f, 0x42, 0x04, 0xd1, 0xff, 0xf7, 0x3e, 0xff, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x23, 0x9f, 0x00, 0xcc, 0x59, 0x55, 0x69, 0xef, 0x19, -0x3c, 0x61, 0x01, 0x33, 0x05, 0x2b, 0xf7, 0xd3, 0x00, 0x0a, 0x00, 0x02, -0x02, 0x23, 0x18, 0x43, 0x53, 0x69, 0xc0, 0x46, 0x98, 0x60, 0x50, 0x69, -0x08, 0x23, 0xc2, 0x68, 0x13, 0x40, 0x25, 0x4f, 0xfa, 0x1d, 0xb9, 0x32, -0x00, 0x2b, 0x02, 0xd0, 0x04, 0x23, 0x23, 0x4c, 0x01, 0xe0, 0x05, 0x23, -0x22, 0x4c, 0xc0, 0x46, 0x14, 0x61, 0x40, 0x24, 0xd4, 0x82, 0x00, 0x24, -0x54, 0x83, 0x20, 0x4c, 0x00, 0x22, 0x00, 0x2b, 0x0c, 0xd9, 0x95, 0x00, +0xc9, 0x31, 0x15, 0x4c, 0x23, 0x1c, 0x15, 0x4a, 0x00, 0x20, 0xfc, 0xf7, +0x44, 0xfb, 0xe9, 0x1d, 0xff, 0x31, 0x1e, 0x31, 0x23, 0x1c, 0x0d, 0x1c, +0x11, 0x4a, 0x01, 0x20, 0xfc, 0xf7, 0x3b, 0xfb, 0x29, 0x1c, 0x23, 0x1c, +0x0e, 0x4a, 0x00, 0x20, 0xfc, 0xf7, 0x35, 0xfb, 0x39, 0x1c, 0x23, 0x1c, +0x0c, 0x4a, 0x01, 0x20, 0xfc, 0xf7, 0x2f, 0xfb, 0x00, 0x21, 0x0b, 0x48, +0xc2, 0x1d, 0x19, 0x32, 0x51, 0x71, 0x01, 0x21, 0xff, 0x30, 0x01, 0x30, +0x41, 0x62, 0x08, 0x1c, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0xac, 0xab, 0x20, 0x40, 0x75, 0x08, 0xff, 0xff, 0x28, 0x00, 0x03, 0x00, +0x40, 0x00, 0x02, 0x00, 0x14, 0x00, 0x07, 0x00, 0x6c, 0x06, 0x00, 0x80, +0xf0, 0xb5, 0x37, 0x4a, 0x50, 0x69, 0x01, 0x23, 0x9b, 0x07, 0x08, 0x30, +0x18, 0x43, 0x00, 0x68, 0x01, 0x06, 0x09, 0x0e, 0x33, 0x4b, 0x01, 0x29, +0x49, 0xd1, 0x1f, 0x68, 0x19, 0x1c, 0x32, 0x4b, 0x9f, 0x42, 0x04, 0xd1, +0xff, 0xf7, 0x3e, 0xff, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x23, +0x9f, 0x00, 0xcc, 0x59, 0x55, 0x69, 0xef, 0x19, 0x3c, 0x61, 0x01, 0x33, +0x05, 0x2b, 0xf7, 0xd3, 0x00, 0x0a, 0x00, 0x02, 0x02, 0x23, 0x18, 0x43, +0x53, 0x69, 0xc0, 0x46, 0x98, 0x60, 0x50, 0x69, 0x08, 0x23, 0xc2, 0x68, +0x13, 0x40, 0x25, 0x4f, 0xfa, 0x1d, 0xb9, 0x32, 0x00, 0x2b, 0x02, 0xd0, +0x04, 0x23, 0x23, 0x4c, 0x01, 0xe0, 0x05, 0x23, 0x22, 0x4c, 0xc0, 0x46, +0x14, 0x61, 0x40, 0x24, 0xd4, 0x82, 0x00, 0x24, 0x54, 0x83, 0x20, 0x4c, +0x00, 0x22, 0x00, 0x2b, 0x0c, 0xd9, 0x95, 0x00, 0x46, 0x19, 0x76, 0x6a, 0x66, 0x40, 0xed, 0x19, 0xff, 0x35, 0x01, 0x35, 0x6e, 0x62, 0x01, 0x32, 0x9a, 0x42, 0xf4, 0xd3, 0x10, 0x2a, 0x07, 0xd2, 0x93, 0x00, 0xdb, 0x19, 0xff, 0x33, 0x01, 0x33, 0x5c, 0x62, 0x01, 0x32, @@ -3710,26 +3351,51 @@ 0x8f, 0x00, 0xdc, 0x59, 0x55, 0x69, 0xef, 0x19, 0x7c, 0x62, 0x01, 0x31, 0x05, 0x29, 0xf7, 0xd3, 0x00, 0x0a, 0x00, 0x02, 0x03, 0x23, 0x18, 0x43, 0x51, 0x69, 0xc0, 0x46, 0x88, 0x60, 0x50, 0x69, 0x40, 0x68, 0xc0, 0x46, -0x50, 0x61, 0x09, 0x48, 0xfb, 0xf7, 0xb0, 0xfb, 0xa4, 0xe7, 0x00, 0x00, +0x50, 0x61, 0x09, 0x48, 0xfc, 0xf7, 0xa4, 0xfa, 0xa4, 0xe7, 0x00, 0x00, 0x6c, 0x06, 0x00, 0x80, 0x30, 0x80, 0x20, 0x40, 0x67, 0x45, 0x23, 0x01, -0x1c, 0xad, 0x20, 0x40, 0x28, 0x01, 0x40, 0x00, 0x20, 0x01, 0x40, 0x00, -0x5c, 0x5c, 0x5c, 0x5c, 0xfd, 0x30, 0xff, 0xff, 0x80, 0xb5, 0x87, 0xb0, -0x0f, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x48, 0xf8, 0x0e, 0x49, 0xc8, 0x68, -0x02, 0x04, 0x89, 0x69, 0x4a, 0x40, 0x05, 0x92, 0x09, 0x04, 0xc9, 0x43, -0xc0, 0x43, 0x48, 0x40, 0x06, 0x90, 0x08, 0x21, 0x6a, 0x46, 0x05, 0xa8, -0xfd, 0xf7, 0x8b, 0xfb, 0x00, 0x98, 0xc0, 0x46, 0x38, 0x65, 0x03, 0x98, -0xc0, 0x46, 0x78, 0x65, 0x04, 0x48, 0x01, 0x89, 0x01, 0x31, 0x01, 0x81, -0x07, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x08, 0x83, 0x20, 0x40, -0x0c, 0x2b, 0x00, 0x80, 0x90, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, 0x20, 0x1c, -0x39, 0x1c, 0x00, 0xf0, 0x1f, 0xf8, 0xe0, 0x68, 0x01, 0x0e, 0xff, 0x22, -0x12, 0x04, 0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, 0xff, 0x22, 0x12, 0x02, -0x02, 0x40, 0x12, 0x02, 0x11, 0x43, 0x00, 0x06, 0x08, 0x43, 0x38, 0x65, -0x20, 0x69, 0xc0, 0x46, 0x78, 0x65, 0x60, 0x69, 0xc0, 0x46, 0xb8, 0x65, -0x03, 0x48, 0x01, 0x89, 0x01, 0x31, 0x01, 0x81, 0x90, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x0c, 0x2b, 0x00, 0x80, 0x90, 0xb5, 0x00, 0x22, -0x93, 0x00, 0x1f, 0x18, 0xbf, 0x69, 0x5b, 0x18, 0x5f, 0x62, 0x01, 0x32, -0x05, 0x2a, 0xf7, 0xd3, 0x07, 0x7a, 0xfb, 0x08, 0x03, 0xd3, 0x00, 0x23, -0x92, 0x00, 0x52, 0x18, 0x13, 0x62, 0x07, 0x6b, +0xac, 0xab, 0x20, 0x40, 0x28, 0x01, 0x40, 0x00, 0x20, 0x01, 0x40, 0x00, +0x5c, 0x5c, 0x5c, 0x5c, 0x11, 0x31, 0xff, 0xff, 0xf0, 0xb5, 0x07, 0x1c, +0x3b, 0x48, 0x3c, 0x4c, 0x08, 0x21, 0x20, 0x60, 0xa1, 0x80, 0x00, 0x20, +0x20, 0x81, 0xe1, 0x80, 0x60, 0x81, 0x39, 0x48, 0xc0, 0x46, 0xe0, 0x60, +0x38, 0x48, 0xc0, 0x46, 0x20, 0x61, 0x38, 0x48, 0xc0, 0x46, 0x60, 0x61, +0x37, 0x48, 0xc0, 0x46, 0xa0, 0x61, 0x37, 0x48, 0xc0, 0x46, 0xe0, 0x61, +0x36, 0x48, 0xc0, 0x46, 0x20, 0x62, 0x36, 0x48, 0xc0, 0x46, 0x60, 0x62, +0x35, 0x48, 0xc0, 0x46, 0xa0, 0x62, 0x35, 0x48, 0xc0, 0x46, 0xe0, 0x62, +0x34, 0x48, 0xc0, 0x46, 0x20, 0x63, 0x34, 0x48, 0xc0, 0x46, 0x60, 0x63, +0x33, 0x48, 0xc0, 0x46, 0xa0, 0x63, 0x33, 0x48, 0xc0, 0x46, 0xe0, 0x63, +0x32, 0x48, 0xc0, 0x46, 0x20, 0x64, 0x32, 0x48, 0xc0, 0x46, 0x60, 0x64, +0x31, 0x48, 0xc0, 0x46, 0xa0, 0x64, 0x31, 0x48, 0xc0, 0x46, 0xe0, 0x64, +0x30, 0x48, 0xc0, 0x46, 0x20, 0x65, 0x30, 0x49, 0xc8, 0x68, 0x02, 0x04, +0x89, 0x69, 0x4a, 0x40, 0xe3, 0x1d, 0x79, 0x33, 0x09, 0x04, 0xc9, 0x43, +0xc0, 0x43, 0x48, 0x40, 0xe1, 0x1d, 0xb9, 0x31, 0xda, 0x63, 0x08, 0x60, +0x29, 0x4d, 0x21, 0x1c, 0x2b, 0x1c, 0x29, 0x4a, 0x00, 0x20, 0xfc, 0xf7, +0x3e, 0xfa, 0x28, 0x4a, 0xe1, 0x1d, 0xb5, 0x31, 0x01, 0x20, 0x2b, 0x1c, +0x0e, 0x1c, 0xfc, 0xf7, 0x36, 0xfa, 0x24, 0x4a, 0x00, 0x20, 0x31, 0x1c, +0x2b, 0x1c, 0xfc, 0xf7, 0x30, 0xfa, 0xe1, 0x1d, 0x4d, 0x31, 0x2b, 0x1c, +0x20, 0x4a, 0x01, 0x20, 0xfc, 0xf7, 0x29, 0xfa, 0xe0, 0x1d, 0x5d, 0x30, +0x01, 0x68, 0x00, 0x29, 0xfc, 0xd0, 0x60, 0x6d, 0xc0, 0x46, 0x38, 0x65, +0x20, 0x6e, 0xc0, 0x46, 0x78, 0x65, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x80, 0x00, 0x08, 0x00, 0x8c, 0xb9, 0x20, 0x40, 0x81, 0x81, 0x48, 0xbd, +0x79, 0x56, 0x23, 0x8c, 0x93, 0x0c, 0x82, 0x95, 0x1d, 0x0e, 0x12, 0xcf, +0x9b, 0x3b, 0xc0, 0xe9, 0xe6, 0x55, 0x7c, 0x82, 0x99, 0xf6, 0x78, 0x02, +0xd1, 0xd7, 0x25, 0x73, 0x72, 0x8c, 0x33, 0x10, 0xf7, 0x03, 0xf1, 0x42, +0x6c, 0x9b, 0x4a, 0xa7, 0x82, 0x8e, 0x23, 0xa9, 0x90, 0xb1, 0x82, 0x8e, +0xdc, 0x3f, 0xfb, 0x29, 0x00, 0x62, 0x22, 0x45, 0x88, 0x2b, 0xf1, 0x85, +0x12, 0x61, 0xd1, 0x73, 0x6e, 0xb1, 0x11, 0x16, 0x08, 0x83, 0x20, 0x40, +0x75, 0x08, 0xff, 0xff, 0x54, 0x00, 0x03, 0x00, 0x08, 0x00, 0x02, 0x00, +0x14, 0x00, 0x03, 0x00, 0x80, 0xb5, 0x0f, 0x1c, 0x39, 0x1c, 0x00, 0xf0, +0x33, 0xf8, 0x38, 0x1c, 0xff, 0xf7, 0x4c, 0xff, 0x03, 0x48, 0x01, 0x89, +0x01, 0x31, 0x01, 0x81, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x0c, 0x2b, 0x00, 0x80, 0x90, 0xb5, 0x04, 0x1c, +0x0f, 0x1c, 0x20, 0x1c, 0x39, 0x1c, 0x00, 0xf0, 0x1f, 0xf8, 0xe0, 0x68, +0x01, 0x0e, 0xff, 0x22, 0x12, 0x04, 0x02, 0x40, 0x12, 0x0a, 0x11, 0x43, +0xff, 0x22, 0x12, 0x02, 0x02, 0x40, 0x12, 0x02, 0x11, 0x43, 0x00, 0x06, +0x08, 0x43, 0x38, 0x65, 0x20, 0x69, 0xc0, 0x46, 0x78, 0x65, 0x60, 0x69, +0xc0, 0x46, 0xb8, 0x65, 0x03, 0x48, 0x01, 0x89, 0x01, 0x31, 0x01, 0x81, +0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x0c, 0x2b, 0x00, 0x80, +0x90, 0xb5, 0x00, 0x22, 0x93, 0x00, 0x1f, 0x18, 0xbf, 0x69, 0x5b, 0x18, +0x5f, 0x62, 0x01, 0x32, 0x05, 0x2a, 0xf7, 0xd3, 0x07, 0x7a, 0xfb, 0x08, +0x03, 0xd3, 0x00, 0x23, 0x92, 0x00, 0x52, 0x18, 0x13, 0x62, 0x07, 0x6b, 0xc0, 0x46, 0x8f, 0x63, 0xc7, 0x6a, 0xc0, 0x46, 0xcf, 0x63, 0x87, 0x6b, 0xc0, 0x46, 0x0f, 0x64, 0x47, 0x6b, 0xc0, 0x46, 0x4f, 0x64, 0x07, 0x6c, 0xc0, 0x46, 0x8f, 0x64, 0xc2, 0x6b, 0xc0, 0x46, 0xca, 0x64, 0xc2, 0x88, @@ -3740,7 +3406,7 @@ 0x00, 0x22, 0x00, 0x7a, 0x43, 0x08, 0x10, 0xd3, 0xc0, 0x08, 0x02, 0xd3, 0x88, 0x20, 0x10, 0x43, 0x01, 0xe0, 0x80, 0x20, 0x10, 0x43, 0x3a, 0x0a, 0x12, 0x02, 0x01, 0x23, 0x1a, 0x43, 0xc8, 0x60, 0x8a, 0x60, 0x08, 0x1c, -0xff, 0xf7, 0x0e, 0xfe, 0x05, 0xe0, 0x38, 0x0a, 0x00, 0x02, 0x03, 0x23, +0xff, 0xf7, 0x78, 0xfd, 0x05, 0xe0, 0x38, 0x0a, 0x00, 0x02, 0x03, 0x23, 0x18, 0x43, 0x88, 0x60, 0xca, 0x60, 0x03, 0x48, 0x01, 0x89, 0x01, 0x31, 0x01, 0x81, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x0c, 0x2b, 0x00, 0x80, 0xf0, 0xb4, 0x02, 0x6d, 0x14, 0x4c, 0x15, 0x1c, 0xe7, 0x69, 0xbd, 0x40, @@ -3754,458 +3420,283 @@ 0x80, 0xb4, 0x00, 0x22, 0x00, 0x23, 0x00, 0x29, 0x05, 0xd9, 0x07, 0x78, 0x7a, 0x40, 0x01, 0x30, 0x01, 0x33, 0x8b, 0x42, 0xf9, 0xd3, 0xd0, 0x43, 0x00, 0x06, 0x00, 0x0e, 0x80, 0xbc, 0x70, 0x47, 0xf0, 0xb5, 0x07, 0x1c, -0x00, 0x24, 0xff, 0x26, 0x09, 0x36, 0x20, 0x1c, 0x00, 0xf0, 0x8c, 0xf8, -0x00, 0xf0, 0x9e, 0xf9, 0x05, 0x1c, 0x00, 0xf0, 0xad, 0xfa, 0x3d, 0x70, +0x00, 0x24, 0xff, 0x26, 0x09, 0x36, 0x20, 0x1c, 0x00, 0xf0, 0x9a, 0xf8, +0x00, 0xf0, 0xb8, 0xf9, 0x05, 0x1c, 0x00, 0xf0, 0xc7, 0xfa, 0x3d, 0x70, 0x28, 0x1c, 0x01, 0x37, 0x01, 0x34, 0xb4, 0x42, 0xf1, 0xd3, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x00, 0xf0, 0x85, 0xf8, 0x00, 0xf0, -0x8d, 0xf9, 0x07, 0x1c, 0x00, 0xf0, 0x9c, 0xfa, 0x38, 0x0a, 0xf6, 0xd3, -0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf3, 0xb5, 0x81, 0xb0, 0x41, 0x02, -0x53, 0x20, 0x00, 0xf0, 0x57, 0xf8, 0x00, 0xf0, 0x8f, 0xfa, 0xff, 0xf7, -0xe9, 0xff, 0x00, 0x24, 0x00, 0x26, 0x00, 0x25, 0x00, 0x27, 0x30, 0x1c, -0x01, 0x36, 0x00, 0xf0, 0x5f, 0xf8, 0x00, 0xf0, 0x71, 0xf9, 0x00, 0x90, -0x00, 0xf0, 0x80, 0xfa, 0xf8, 0x00, 0x00, 0x99, 0x81, 0x40, 0x0d, 0x43, -0x01, 0x34, 0x01, 0x37, 0x04, 0x2f, 0xee, 0xd3, 0x02, 0x99, 0x20, 0xc1, -0x02, 0x91, 0xff, 0x23, 0x09, 0x33, 0x9c, 0x42, 0xe5, 0xd3, 0x03, 0xb0, -0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, -0x16, 0x48, 0xc0, 0x6f, 0x40, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, -0x00, 0x26, 0x20, 0xcf, 0xb1, 0x00, 0x84, 0x20, 0x00, 0xf0, 0x24, 0xf8, -0x28, 0x1c, 0x00, 0xf0, 0xd3, 0xf9, 0x28, 0x0a, 0x00, 0xf0, 0xd0, 0xf9, -0x28, 0x0c, 0x00, 0xf0, 0xcd, 0xf9, 0x28, 0x0e, 0x00, 0xf0, 0xca, 0xf9, -0x00, 0xf0, 0x50, 0xfa, 0x01, 0x36, 0x42, 0x2e, 0xe9, 0xd3, 0x61, 0x02, -0x83, 0x20, 0x00, 0xf0, 0x0f, 0xf8, 0x00, 0xf0, -0x47, 0xfa, 0xff, 0xf7, 0xa1, 0xff, 0x04, 0x48, 0xc0, 0x6f, 0x40, 0x23, -0x01, 0x68, 0x99, 0x43, 0x01, 0x60, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x68, 0x0e, 0x00, 0x80, 0x90, 0xb5, 0x04, 0x1c, 0x0f, 0x1c, 0x00, 0xf0, -0x4d, 0xfa, 0x20, 0x1c, 0x00, 0xf0, 0xaa, 0xf9, 0x38, 0x0c, 0x00, 0xf0, -0xa7, 0xf9, 0x38, 0x0a, 0x00, 0xf0, 0xa4, 0xf9, 0x38, 0x1c, 0x00, 0xf0, -0xa1, 0xf9, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x01, 0x1c, -0x54, 0x20, 0xff, 0xf7, 0xe7, 0xff, 0x00, 0x20, 0x00, 0xf0, 0x96, 0xf9, -0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x00, 0xf0, 0x31, 0xfa, 0x57, 0x20, -0x00, 0xf0, 0x8e, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, 0x08, 0x4f, -0xfa, 0x6f, 0x20, 0x23, 0x14, 0x68, 0x9c, 0x43, 0x14, 0x60, 0x23, 0x1c, -0xff, 0xf7, 0x73, 0xff, 0xf8, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, -0x01, 0x60, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, +0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, 0x00, 0xf0, 0x93, 0xf8, 0x00, 0xf0, +0xa7, 0xf9, 0x07, 0x1c, 0x00, 0xf0, 0xb6, 0xfa, 0x38, 0x0a, 0xf6, 0xd3, +0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf3, 0xb5, 0x82, 0xb0, 0x02, 0x98, +0x41, 0x02, 0x53, 0x20, 0x00, 0xf0, 0x64, 0xf8, 0x00, 0xf0, 0xa8, 0xfa, +0xff, 0xf7, 0xe8, 0xff, 0x00, 0x24, 0x00, 0x20, 0x01, 0x90, 0x2e, 0x20, +0x00, 0x90, 0x00, 0x25, 0x00, 0x27, 0x02, 0x98, 0x01, 0x28, 0x04, 0xd1, +0x00, 0x98, 0x84, 0x42, 0x01, 0xd3, 0x00, 0x26, +0x09, 0xe0, 0x01, 0x98, 0x41, 0x1c, 0x01, 0x91, 0x00, 0xf0, 0x60, 0xf8, +0x00, 0xf0, 0x7e, 0xf9, 0x06, 0x1c, 0x00, 0xf0, 0x8d, 0xfa, 0xf8, 0x00, +0x86, 0x40, 0x35, 0x43, 0x01, 0x34, 0x01, 0x37, 0x04, 0x2f, 0xe6, 0xd3, +0x03, 0x99, 0x20, 0xc1, 0x03, 0x91, 0xff, 0x23, 0x09, 0x33, 0x9c, 0x42, +0xdd, 0xd3, 0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, +0x04, 0x1c, 0x0f, 0x1c, 0x01, 0x2c, 0x2a, 0xd0, 0x16, 0x48, 0xc0, 0x6f, +0x40, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x00, 0x26, 0x20, 0xcf, +0xb1, 0x00, 0x84, 0x20, 0x00, 0xf0, 0x24, 0xf8, 0x28, 0x1c, 0x00, 0xf0, +0xdf, 0xf9, 0x28, 0x0a, 0x00, 0xf0, 0xdc, 0xf9, 0x28, 0x0c, 0x00, 0xf0, +0xd9, 0xf9, 0x28, 0x0e, 0x00, 0xf0, 0xd6, 0xf9, 0x00, 0xf0, 0x5c, 0xfa, +0x01, 0x36, 0x42, 0x2e, 0xe9, 0xd3, 0x61, 0x02, 0x83, 0x20, 0x00, 0xf0, +0x0f, 0xf8, 0x00, 0xf0, 0x53, 0xfa, 0xff, 0xf7, 0x93, 0xff, 0x04, 0x48, +0xc0, 0x6f, 0x40, 0x23, 0x01, 0x68, 0x99, 0x43, 0x01, 0x60, 0xf0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x90, 0xb5, 0x04, 0x1c, +0x0f, 0x1c, 0x00, 0xf0, 0x59, 0xfa, 0x20, 0x1c, 0x00, 0xf0, 0xb6, 0xf9, +0x38, 0x0c, 0x00, 0xf0, 0xb3, 0xf9, 0x38, 0x0a, 0x00, 0xf0, 0xb0, 0xf9, +0x38, 0x1c, 0x00, 0xf0, 0xad, 0xf9, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x00, 0xb5, 0x01, 0x1c, 0x54, 0x20, 0xff, 0xf7, 0xe7, 0xff, 0x00, 0x20, +0x00, 0xf0, 0xa2, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x00, 0xf0, +0x3d, 0xfa, 0x57, 0x20, 0x00, 0xf0, 0x9a, 0xf9, 0x08, 0xbc, 0x18, 0x47, 0x90, 0xb5, 0x08, 0x4f, 0xfa, 0x6f, 0x20, 0x23, 0x14, 0x68, 0x9c, 0x43, -0x14, 0x60, 0x23, 0x1c, 0xff, 0xf7, 0x89, 0xff, 0xf8, 0x6f, 0x20, 0x23, +0x14, 0x60, 0x23, 0x1c, 0xff, 0xf7, 0x65, 0xff, 0xf8, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x68, 0x0e, 0x00, 0x80, 0xb0, 0xb5, 0x0f, 0x1c, 0x15, 0x4d, 0xe9, 0x6f, -0x20, 0x23, 0x0a, 0x68, 0x9a, 0x43, 0x0a, 0x60, 0x41, 0x02, 0x53, 0x20, -0xff, 0xf7, 0xa6, 0xff, 0x00, 0xf0, 0xde, 0xf9, 0xff, 0xf7, 0x38, 0xff, -0xf8, 0x1d, 0x05, 0x30, 0x44, 0x1c, 0xff, 0xf7, 0xb1, 0xff, 0x00, 0xf0, -0xc3, 0xf8, 0x07, 0x1c, 0x00, 0xf0, 0xd2, 0xf9, 0x20, 0x1c, 0xff, 0xf7, -0xa9, 0xff, 0x00, 0xf0, 0xbb, 0xf8, 0x04, 0x1c, 0x00, 0xf0, 0xca, 0xf9, -0xe8, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x21, 0x02, -0x39, 0x43, 0x08, 0x1c, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb5, 0xc2, 0xb0, 0x04, 0x1c, 0x0d, 0x1c, -0x17, 0x1c, 0x61, 0x02, 0x19, 0x4e, 0xf0, 0x6f, 0x20, 0x23, 0x02, 0x68, -0x9a, 0x43, 0x02, 0x60, 0x53, 0x20, 0xff, 0xf7, 0x73, 0xff, 0x00, 0xf0, -0xab, 0xf9, 0xff, 0xf7, 0x05, 0xff, 0x68, 0x46, 0xff, 0xf7, 0xec, 0xfe, -0x6a, 0x46, 0xe8, 0x1d, 0x05, 0x30, 0x17, 0x54, 0x39, 0x0a, 0x68, 0x44, -0x41, 0x70, 0x68, 0x46, 0x00, 0x99, 0x0c, 0x30, 0xff, 0xf7, 0xd0, 0xfe, -0x02, 0xab, 0x18, 0x70, 0x00, 0x20, 0x58, 0x70, 0x68, 0x46, 0x0c, 0x21, -0xff, 0xf7, 0xc8, 0xfe, 0x02, 0xab, 0x58, 0x70, 0x69, 0x46, 0x20, 0x1c, -0xff, 0xf7, 0x1f, 0xff, 0xf0, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, +0x68, 0x0e, 0x00, 0x80, 0x90, 0xb5, 0x08, 0x4f, 0xfa, 0x6f, 0x20, 0x23, +0x14, 0x68, 0x9c, 0x43, 0x14, 0x60, 0x23, 0x1c, 0xff, 0xf7, 0x87, 0xff, +0xf8, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x90, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb5, 0x04, 0x1c, +0x0f, 0x1c, 0x18, 0x4e, 0xf0, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x99, 0x43, +0x01, 0x60, 0x61, 0x02, 0x53, 0x20, 0xff, 0xf7, 0xa5, 0xff, 0x00, 0xf0, +0xe9, 0xf9, 0xff, 0xf7, 0x29, 0xff, 0xf8, 0x1d, 0x05, 0x30, 0x01, 0x2c, +0x03, 0xd1, 0x22, 0x2f, 0x01, 0xd3, 0x00, 0x27, 0x0f, 0xe0, 0x44, 0x1c, +0xff, 0xf7, 0xaa, 0xff, 0x00, 0xf0, 0xc8, 0xf8, 0x07, 0x1c, 0x00, 0xf0, +0xd7, 0xf9, 0x20, 0x1c, 0xff, 0xf7, 0xa2, 0xff, 0x00, 0xf0, 0xc0, 0xf8, +0x05, 0x1c, 0x00, 0xf0, 0xcf, 0xf9, 0xf0, 0x6f, 0x20, 0x23, 0x01, 0x68, +0x19, 0x43, 0x01, 0x60, 0x28, 0x02, 0x38, 0x43, 0xf0, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0xf0, 0xb5, 0xc2, 0xb0, +0x14, 0x1c, 0x0d, 0x1c, 0x07, 0x1c, 0x01, 0x2f, 0x2f, 0xd0, 0x79, 0x02, +0x19, 0x4e, 0xf0, 0x6f, 0x20, 0x23, 0x02, 0x68, 0x9a, 0x43, 0x02, 0x60, +0x53, 0x20, 0xff, 0xf7, 0x6b, 0xff, 0x00, 0xf0, 0xaf, 0xf9, 0xff, 0xf7, +0xef, 0xfe, 0x68, 0x46, 0xff, 0xf7, 0xd6, 0xfe, 0x6a, 0x46, 0xe8, 0x1d, +0x05, 0x30, 0x14, 0x54, 0x21, 0x0a, 0x68, 0x44, 0x41, 0x70, 0x68, 0x46, +0x00, 0x99, 0x0c, 0x30, 0xff, 0xf7, 0xba, 0xfe, 0x02, 0xab, 0x18, 0x70, +0x00, 0x20, 0x58, 0x70, 0x68, 0x46, 0x0c, 0x21, +0xff, 0xf7, 0xb2, 0xfe, 0x02, 0xab, 0x58, 0x70, 0x69, 0x46, 0x38, 0x1c, +0xff, 0xf7, 0x15, 0xff, 0xf0, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0x42, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x68, 0x0e, 0x00, 0x80, 0xff, 0xb5, 0xc2, 0xb0, 0x07, 0x1c, 0x6b, 0x46, -0x00, 0x20, 0xc4, 0x43, 0x10, 0xc3, 0x01, 0x30, 0x42, 0x28, 0xfb, 0xd3, -0x68, 0x46, 0x0c, 0x30, 0x03, 0x1c, 0x00, 0x24, 0x00, 0x2a, 0x0a, 0xd9, -0x0e, 0x88, 0xc0, 0x46, 0x06, 0x70, 0x0e, 0x88, 0x36, 0x12, 0x46, 0x70, -0x02, 0x30, 0x02, 0x31, 0x02, 0x34, 0x94, 0x42, 0xf4, 0xd3, 0x00, 0x92, -0x18, 0x1c, 0x11, 0x1c, 0xff, 0xf7, 0x96, 0xfe, 0x04, 0x1c, 0x00, 0x20, -0x01, 0x90, 0x02, 0xab, 0x1c, 0x70, 0x58, 0x70, 0x9d, 0x70, 0x68, 0x46, -0x0c, 0x21, 0xff, 0xf7, 0x8b, 0xfe, 0x02, 0xab, 0x58, 0x70, 0x45, 0x9b, -0x1d, 0x06, 0x2d, 0x0e, 0xac, 0x42, 0x03, 0xd1, 0x69, 0x46, 0x38, 0x1c, -0xff, 0xf7, 0x4a, 0xff, 0x01, 0x20, 0xac, 0x42, -0x00, 0xd1, 0x00, 0x20, 0x46, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0xb0, 0xb5, 0xc2, 0xb0, 0x0f, 0x1c, 0x41, 0x02, 0x14, 0x4c, 0xe0, 0x6f, -0x20, 0x23, 0x02, 0x68, 0x9a, 0x43, 0x02, 0x60, 0x53, 0x20, 0xff, 0xf7, -0xfb, 0xfe, 0x00, 0xf0, 0x33, 0xf9, 0xff, 0xf7, 0x8d, 0xfe, 0x68, 0x46, -0xff, 0xf7, 0x74, 0xfe, 0xe0, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, -0x02, 0xad, 0x01, 0x60, 0x6d, 0x78, 0x00, 0x24, 0x02, 0xab, 0x5c, 0x70, -0x68, 0x46, 0x0c, 0x21, 0xff, 0xf7, 0x56, 0xfe, 0xa8, 0x42, 0x02, 0xd1, -0x00, 0x98, 0x87, 0x42, 0x01, 0xd3, 0x20, 0x1c, 0x00, 0xe0, 0x01, 0x20, -0x42, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, -0xfc, 0x46, 0x60, 0x47, 0x00, 0x00, 0xa0, 0xe3, 0xb4, 0x22, 0x9f, 0xe5, -0xb4, 0x32, 0x9f, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, +0x68, 0x0e, 0x00, 0x80, 0xff, 0xb5, 0xc2, 0xb0, 0x07, 0x1c, 0x01, 0x2f, +0x01, 0xd1, 0x01, 0x20, 0x36, 0xe0, 0x6b, 0x46, 0x00, 0x20, 0xc4, 0x43, +0x10, 0xc3, 0x01, 0x30, 0x42, 0x28, 0xfb, 0xd3, 0x68, 0x46, 0x0c, 0x30, +0x03, 0x1c, 0x00, 0x24, 0x00, 0x2a, 0x0a, 0xd9, 0x0e, 0x88, 0xc0, 0x46, +0x06, 0x70, 0x0e, 0x88, 0x36, 0x12, 0x46, 0x70, 0x02, 0x30, 0x02, 0x31, +0x02, 0x34, 0x94, 0x42, 0xf4, 0xd3, 0x00, 0x92, 0x18, 0x1c, 0x11, 0x1c, +0xff, 0xf7, 0x7c, 0xfe, 0x04, 0x1c, 0x00, 0x20, 0x01, 0x90, 0x02, 0xab, +0x1c, 0x70, 0x58, 0x70, 0x9d, 0x70, 0x68, 0x46, 0x0c, 0x21, 0xff, 0xf7, +0x71, 0xfe, 0x02, 0xab, 0x58, 0x70, 0x45, 0x9b, 0x1d, 0x06, 0x2d, 0x0e, +0xac, 0x42, 0x03, 0xd1, 0x69, 0x46, 0x38, 0x1c, 0xff, 0xf7, 0x3e, 0xff, +0x01, 0x20, 0xac, 0x42, 0x00, 0xd1, 0x00, 0x20, 0x46, 0xb0, 0xf0, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0xb0, 0xb5, 0xc2, 0xb0, 0x0f, 0x1c, 0x41, 0x02, +0x14, 0x4c, 0xe0, 0x6f, 0x20, 0x23, 0x02, 0x68, 0x9a, 0x43, 0x02, 0x60, +0x53, 0x20, 0xff, 0xf7, 0xef, 0xfe, 0x00, 0xf0, 0x33, 0xf9, 0xff, 0xf7, +0x73, 0xfe, 0x68, 0x46, 0xff, 0xf7, 0x5a, 0xfe, 0xe0, 0x6f, 0x20, 0x23, +0x01, 0x68, 0x19, 0x43, 0x02, 0xad, 0x01, 0x60, 0x6d, 0x78, 0x00, 0x24, +0x02, 0xab, 0x5c, 0x70, 0x68, 0x46, 0x0c, 0x21, 0xff, 0xf7, 0x3c, 0xfe, +0xa8, 0x42, 0x02, 0xd1, 0x00, 0x98, 0x87, 0x42, 0x01, 0xd3, 0x20, 0x1c, +0x00, 0xe0, 0x01, 0x20, 0x42, 0xb0, 0xb0, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x68, 0x0e, 0x00, 0x80, 0xfc, 0x46, 0x60, 0x47, 0x00, 0x00, 0xa0, 0xe3, +0xb4, 0x22, 0x9f, 0xe5, 0xb4, 0x32, 0x9f, 0xe5, 0x01, 0x10, 0xa0, 0xe3, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, +0x81, 0x03, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, 0x81, 0x03, 0x80, 0xe1, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, 0x01, 0x03, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x93, 0xe5, 0x01, 0x03, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, +0x00, 0x10, 0x93, 0xe5, 0x81, 0x02, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, -0x81, 0x02, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, +0x01, 0x02, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, 0x01, 0x02, 0x80, 0xe1, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, 0x81, 0x01, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x93, 0xe5, 0x81, 0x01, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, +0x00, 0x10, 0x93, 0xe5, 0x01, 0x01, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, +0x81, 0x00, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, -0x01, 0x01, 0x80, 0xe1, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, +0x01, 0x00, 0x80, 0xe1, 0x1e, 0xff, 0x2f, 0xe1, 0xfc, 0x46, 0x60, 0x47, +0xa4, 0x21, 0x9f, 0xe5, 0xa8, 0x31, 0x9f, 0xe5, 0xa0, 0x13, 0xa0, 0xe1, +0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x93, 0xe5, 0x81, 0x00, 0x80, 0xe1, +0x00, 0x10, 0x82, 0xe5, 0x20, 0x13, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x93, 0xe5, 0x01, 0x00, 0x80, 0xe1, 0x1e, 0xff, 0x2f, 0xe1, -0xfc, 0x46, 0x60, 0x47, 0xa4, 0x21, 0x9f, 0xe5, 0xa8, 0x31, 0x9f, 0xe5, -0xa0, 0x13, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, +0xa0, 0x12, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x20, 0x13, 0xa0, 0xe1, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x20, 0x12, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x82, 0xe5, 0xa0, 0x12, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, +0x00, 0x10, 0x82, 0xe5, 0xa0, 0x11, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x20, 0x12, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0xa0, 0x11, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, +0x20, 0x11, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x20, 0x11, 0xa0, 0xe1, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0xa0, 0x10, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0x82, 0xe5, 0xa0, 0x10, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, +0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x00, 0x10, 0xa0, 0xe1, 0x00, 0x10, 0x83, 0xe5, 0x01, 0x10, 0xa0, 0xe3, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0xa0, 0xe3, -0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, -0xfc, 0x46, 0x60, 0x47, 0xa0, 0x30, 0x9f, 0xe5, 0x01, 0x10, 0xa0, 0xe3, +0x1e, 0xff, 0x2f, 0xe1, 0xfc, 0x46, 0x60, 0x47, 0xa0, 0x30, 0x9f, 0xe5, +0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, -0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, -0xfc, 0x46, 0x60, 0x47, 0x70, 0x30, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, +0x1e, 0xff, 0x2f, 0xe1, 0xfc, 0x46, 0x60, 0x47, 0x70, 0x30, 0x9f, 0xe5, +0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, -0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, -0xfc, 0x46, 0x60, 0x47, 0x34, 0x20, 0x9f, 0xe5, 0x3c, 0x30, 0x9f, 0xe5, -0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, 0x00, 0x10, 0x82, 0xe5, -0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, +0x1e, 0xff, 0x2f, 0xe1, 0xfc, 0x46, 0x60, 0x47, 0x34, 0x20, 0x9f, 0xe5, +0x3c, 0x30, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x82, 0xe5, +0x00, 0x10, 0x82, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, 0x00, 0x10, 0x83, 0xe5, -0x1e, 0xff, 0x2f, 0xe1, 0xf8, 0x00, 0x18, 0x40, 0x04, 0x01, 0x18, 0x40, -0x00, 0x01, 0x18, 0x40, 0xfc, 0x00, 0x18, 0x40, 0x02, 0x1c, 0x00, 0x20, -0x00, 0x29, 0x07, 0xdd, 0x13, 0x78, 0xc0, 0x18, 0x00, 0x06, 0x00, 0x0e, -0x01, 0x32, 0x01, 0x39, 0x00, 0x29, 0xf7, 0xdc, 0x70, 0x47, 0x09, 0x4b, -0xc9, 0x18, 0x04, 0x29, 0x08, 0xd8, 0x8c, 0x22, 0x4a, 0x43, 0x07, 0x4b, -0xd2, 0x18, 0x13, 0x7a, 0x09, 0x06, 0x09, 0x0e, 0x8b, 0x42, 0x01, 0xd0, -0x14, 0x20, 0x70, 0x47, 0x02, 0x60, 0x00, 0x20, 0xfb, 0xe7, 0x00, 0x00, -0xf3, 0x0f, 0x01, 0x35, 0xb0, 0x6e, 0x21, 0x40, 0x01, 0x1c, 0x00, 0x22, -0x06, 0x48, 0x03, 0x7a, 0xff, 0x2b, 0x04, 0xd0, 0x8c, 0x30, 0x01, 0x32, -0x04, 0x2a, 0xf8, 0xd3, 0x01, 0xe0, 0x04, 0x2a, 0x00, 0xd3, 0x00, 0x20, -0x0a, 0x60, 0x70, 0x47, 0xb0, 0x6e, 0x21, 0x40, 0xf0, 0xb5, 0x07, 0x1c, -0x00, 0x24, 0x00, 0x2f, 0x21, 0xd0, 0x00, 0x26, 0xf8, 0x79, 0x00, 0x28, -0x1b, 0xdd, 0x30, 0x01, 0xc0, 0x19, 0xc5, 0x1d, 0x05, 0x35, 0x00, 0x7b, -0x00, 0x06, 0x00, 0x16, 0x00, 0xf0, 0x9e, 0xfb, 0x01, 0x1c, 0x8b, 0x68, -0x00, 0x2b, 0x08, 0xd0, 0x68, 0x68, 0x00, 0x28, 0x05, 0xd0, 0xca, 0x68, -0xa9, 0x68, 0xfa, 0xf7, 0x4e, 0xff, 0x00, 0x20, 0x68, 0x60, 0x70, 0x1c, -0x06, 0x06, 0x36, 0x0e, 0xf8, 0x79, 0xb0, 0x42, 0xe3, 0xdc, 0xff, 0x20, -0x38, 0x72, 0x20, 0x1c, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0xf3, 0xb5, 0x81, 0xb0, 0x0f, 0x1c, 0x68, 0x46, 0xff, 0xf7, -0xbd, 0xff, 0x00, 0x28, 0x01, 0xd1, 0x0d, 0x20, 0x37, 0xe0, 0xb9, 0x88, -0xc0, 0x46, 0x01, 0x80, 0xf9, 0x88, 0xc0, 0x46, 0x41, 0x80, 0xb9, 0x7a, -0xc0, 0x46, 0x41, 0x71, 0xf9, 0x7a, 0xc0, 0x46, 0x81, 0x71, 0x8c, 0x21, -0x01, 0x71, 0x3d, 0x7e, 0x00, 0x21, 0x00, 0x23, 0x00, 0x2d, 0x1f, 0xdd, -0x1a, 0x01, 0xd2, 0x19, 0x1c, 0x32, 0x16, 0x78, 0x05, 0x2e, 0x0d, 0xdc, -0x0c, 0x01, 0x24, 0x18, 0x26, 0x73, 0x96, 0x68, 0xc0, 0x46, 0x66, 0x61, -0xd6, 0x68, 0xc0, 0x46, 0x26, 0x61, 0x00, 0x24, 0x01, 0x31, 0x09, 0x06, -0x09, 0x0e, 0xd4, 0x60, 0x5a, 0x1c, 0x13, 0x06, 0x1b, 0x0e, 0xab, 0x42, -0xe6, 0xdb, 0x00, 0x29, 0x04, 0xd0, 0xc1, 0x71, 0x00, 0x99, 0xc0, 0x46, -0x01, 0x72, 0x00, 0xe0, 0x00, 0x20, 0x01, 0x99, 0xc0, 0x46, 0x08, 0x60, -0x00, 0x20, 0x03, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xf0, 0xb5, -0x07, 0x1c, 0x38, 0x7e, 0x00, 0x28, 0x28, 0xd0, 0x01, 0x38, 0x05, 0x06, -0x2d, 0x0e, 0x00, 0x26, 0xff, 0x2d, 0x21, 0xd0, 0x28, 0x01, 0xc0, 0x19, -0xc4, 0x1d, 0x15, 0x34, 0x00, 0x7f, 0x00, 0x06, 0x00, 0x16, 0x00, 0xf0, -0x2b, 0xfb, 0x01, 0x1c, 0x11, 0xd0, 0x8a, 0x68, 0x00, 0x2a, 0x0c, 0xd0, -0xe0, 0x68, 0x00, 0x28, 0x09, 0xd0, 0x00, 0x23, 0xcb, 0x56, 0x05, 0x2b, -0x05, 0xdc, 0x13, 0x1c, 0xca, 0x68, 0xa1, 0x68, 0xfa, 0xf7, 0xd5, 0xfe, -0xe6, 0x60, 0xff, 0x20, 0x20, 0x70, 0x68, 0x1e, 0x05, 0x06, 0x2d, 0x0e, -0xff, 0x2d, 0xdd, 0xd1, 0x3e, 0x76, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x13, 0x20, 0x70, 0x47, 0xf0, 0xb5, 0x82, 0xb0, 0x07, 0x1c, 0xf8, 0x1d, -0xd5, 0x30, 0x39, 0x1c, 0xff, 0xf7, 0x7f, 0xff, 0x00, 0x90, 0x00, 0x98, -0x00, 0x28, 0x3b, 0xd1, 0x38, 0x7e, 0xc0, 0x46, 0x01, 0x90, 0x00, 0x26, -0x01, 0x98, 0x00, 0x28, 0x2d, 0xdd, 0x30, 0x01, 0xc0, 0x19, 0xc5, 0x1d, -0x15, 0x35, 0x00, 0x7f, 0x00, 0x06, 0x00, 0x16, 0x00, 0xf0, 0xf0, 0xfa, -0x04, 0x1c, 0x20, 0x69, 0x00, 0x28, 0x17, 0xd0, 0x28, 0x78, 0x05, 0x28, -0x0d, 0xdd, 0xe9, 0x68, 0xaa, 0x68, 0x60, 0x68, 0x40, 0x08, 0x40, 0x00, -0x01, 0xf0, 0x2c, 0xf8, 0x09, 0x22, 0xe8, 0x68, 0xa9, 0x68, 0xfa, 0xf7, -0x8b, 0xfd, 0x00, 0x20, 0xe8, 0x60, 0x21, 0x69, 0x28, 0x1c, 0xfa, 0xf7, -0x90, 0xfe, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 0x98, 0x00, 0x28, -0x0c, 0xd1, 0x70, 0x1c, 0x06, 0x06, 0x36, 0x0e, 0x01, 0x98, 0x86, 0x42, -0xd1, 0xdb, 0x00, 0x20, 0x38, 0x76, 0x00, 0x98, 0x02, 0xb0, 0xf0, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x38, 0x1c, 0xff, 0xf7, 0x82, 0xff, 0xf6, 0xe7, -0xc1, 0x1d, 0x79, 0x31, 0x4a, 0x6b, 0xc0, 0x46, 0xca, 0x63, 0xc1, 0x1d, -0xb9, 0x31, 0x0a, 0x60, 0x00, 0x22, 0x8a, 0x60, 0x04, 0x4a, 0xc0, 0x46, -0x4a, 0x61, 0x8a, 0x61, 0x01, 0x21, 0xd0, 0x30, 0x41, 0x70, 0x08, 0x1c, -0x70, 0x47, 0x00, 0x00, 0xb1, 0xc5, 0x21, 0x40, 0xf8, 0xb5, 0x07, 0x1c, -0x00, 0x20, 0x00, 0x90, 0xfe, 0x1d, 0xc9, 0x36, 0x30, 0x78, 0x00, 0x01, -0xc0, 0x19, 0xc4, 0x1d, 0x15, 0x34, 0x80, 0x6a, 0x45, 0x08, 0x6d, 0x00, -0x04, 0x21, 0x38, 0x1c, 0xff, 0xf7, 0xb2, 0xfe, 0x31, 0x78, 0x40, 0x18, -0x01, 0x06, 0x09, 0x0e, 0x00, 0x20, 0xa2, 0x68, 0x00, 0x2a, 0x0a, 0xd9, -0x2a, 0x78, 0x4a, 0x40, 0x2a, 0x70, 0x01, 0x30, 0x09, 0x18, 0x09, 0x06, -0x09, 0x0e, 0xa2, 0x68, 0x01, 0x35, 0x82, 0x42, -0xf4, 0xd8, 0xe0, 0x68, 0xa1, 0x68, 0x40, 0x08, 0x40, 0x00, 0xff, 0xf7, -0x99, 0xfe, 0x61, 0x78, 0x81, 0x42, 0x0a, 0xd0, 0x38, 0x1c, 0x00, 0xf0, -0x0f, 0xf8, 0xf8, 0x1d, 0x79, 0x30, 0x80, 0x6b, 0xf9, 0x1d, 0xb9, 0x31, -0xc8, 0x60, 0x0c, 0x20, 0x00, 0x90, 0x30, 0x78, 0x01, 0x30, 0x30, 0x70, -0x00, 0x98, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xc2, 0x1d, 0xc9, 0x32, -0x11, 0x78, 0x09, 0x01, 0x09, 0x18, 0x09, 0x6a, 0xc3, 0x1d, 0x79, 0x33, -0xd9, 0x63, 0x13, 0x78, 0x1b, 0x01, 0x1b, 0x18, 0x5b, 0x6a, 0xcb, 0x18, -0xc1, 0x1d, 0xb9, 0x31, 0x0b, 0x60, 0x13, 0x78, 0x1b, 0x01, 0x1b, 0x18, -0x9b, 0x6a, 0xc0, 0x46, 0x8b, 0x60, 0x07, 0x4b, 0xc0, 0x46, 0x4b, 0x61, -0x12, 0x78, 0x00, 0x7e, 0x01, 0x32, 0x82, 0x42, 0x01, 0xdb, 0x04, 0x48, -0x00, 0xe0, 0x04, 0x48, 0xc0, 0x46, 0x88, 0x61, 0x00, 0x20, 0x70, 0x47, -0x79, 0xc6, 0x21, 0x40, 0x4d, 0xc6, 0x21, 0x40, 0xf9, 0xc6, 0x21, 0x40, -0xf8, 0xb5, 0x04, 0x1c, 0x00, 0x20, 0x00, 0x90, 0x25, 0x7e, 0x29, 0x01, -0xe0, 0x1d, 0x15, 0x30, 0xff, 0xf7, 0x4e, 0xfe, 0xa1, 0x7e, 0x81, 0x42, -0x0a, 0xd0, 0x20, 0x1c, 0x00, 0xf0, 0x61, 0xf8, 0xe0, 0x1d, 0x79, 0x30, -0x80, 0x6b, 0xe1, 0x1d, 0xb9, 0x31, 0xc8, 0x60, 0x0b, 0x20, 0x55, 0xe0, -0x00, 0x27, 0x00, 0x2d, 0x0f, 0xdd, 0x38, 0x01, 0x00, 0x19, 0x00, 0x7f, -0x00, 0x06, 0x00, 0x16, 0x00, 0xf0, 0x1c, 0xfa, 0x00, 0x28, 0x01, 0xd1, -0x09, 0x20, 0x47, 0xe0, 0x78, 0x1c, 0x07, 0x06, 0x3f, 0x0e, 0xaf, 0x42, -0xef, 0xdb, 0x00, 0x26, 0x00, 0x2d, 0x38, 0xdd, 0x30, 0x01, 0x00, 0x19, -0xc7, 0x1d, 0x15, 0x37, 0x00, 0x7f, 0x00, 0x06, 0x00, 0x16, 0x00, 0xf0, -0x07, 0xfa, 0x00, 0x23, 0xc1, 0x56, 0x05, 0x29, 0x0c, 0xdc, 0x42, 0x68, -0x00, 0x2a, 0x04, 0xd0, 0xc1, 0x68, 0xb8, 0x68, 0xfa, 0xf7, 0xb6, 0xfd, -0xf8, 0x60, 0xf8, 0x68, 0x00, 0x28, 0x1b, 0xd1, 0x0e, 0x20, 0x17, 0xe0, -0xc0, 0x68, 0x00, 0x28, 0x07, 0xd0, 0xfa, 0xf7, 0xa9, 0xfd, 0x00, 0x28, -0x05, 0xda, 0x40, 0x42, 0xb9, 0x68, 0x81, 0x42, 0x04, 0xd0, 0x05, 0x20, -0x0a, 0xe0, 0xb9, 0x68, 0x81, 0x42, 0xfa, 0xd8, 0x09, 0x21, 0xb8, 0x68, -0xfa, 0xf7, 0x7e, 0xfc, 0xf8, 0x60, 0x00, 0x28, 0x02, 0xd1, 0x06, 0x20, -0x00, 0x90, 0x07, 0xe0, 0x70, 0x1c, 0x06, 0x06, 0x36, 0x0e, 0xae, 0x42, -0xc6, 0xdb, 0x00, 0x98, 0x00, 0x28, 0x02, 0xd0, 0x20, 0x1c, 0xff, 0xf7, -0x92, 0xfe, 0x00, 0x98, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0xc2, 0x1d, -0x79, 0x32, 0x41, 0x69, 0xc0, 0x46, 0xd1, 0x63, 0x02, 0x7e, 0x12, 0x01, -0x8a, 0x18, 0xc1, 0x1d, 0xb9, 0x31, 0x0a, 0x60, 0xc2, 0x1d, 0x15, 0x32, -0x8a, 0x60, 0x05, 0x4a, 0xc0, 0x46, 0x4a, 0x61, 0x04, 0x4a, 0xc0, 0x46, -0x8a, 0x61, 0x00, 0x21, 0xd0, 0x30, 0x01, 0x70, 0x08, 0x1c, 0x70, 0x47, -0x51, 0xc7, 0x21, 0x40, 0xf9, 0xc6, 0x21, 0x40, 0x90, 0xb5, 0x07, 0x1c, -0x38, 0x68, 0x1d, 0x4b, 0x98, 0x42, 0x03, 0xd0, 0x03, 0x20, 0x90, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x1c, 0x21, 0x38, 0x1c, 0xff, 0xf7, 0xbc, 0xfd, -0xfc, 0x1d, 0x79, 0x34, 0x00, 0x28, 0x09, 0xd0, 0x38, 0x1c, 0x00, 0xf0, -0x2d, 0xf8, 0xf9, 0x1d, 0xb9, 0x31, 0xa0, 0x6b, 0xc0, 0x46, 0xc8, 0x60, -0x0a, 0x20, 0xea, 0xe7, 0x38, 0x7a, 0x1c, 0x28, 0x04, 0xd0, 0x78, 0x7a, -0x10, 0x28, 0x01, 0xd0, 0x04, 0x20, 0xe2, 0xe7, 0xb8, 0x7a, 0x01, 0x28, -0x01, 0xd0, 0x07, 0x20, 0xdd, 0xe7, 0x60, 0x6b, -0xf9, 0x68, 0x88, 0x42, 0x01, 0xd0, 0x05, 0x20, 0xd7, 0xe7, 0x38, 0x69, -0x00, 0x28, 0x04, 0xd0, 0x06, 0x4b, 0x98, 0x42, 0x01, 0xd0, 0x08, 0x20, -0xcf, 0xe7, 0x38, 0x7e, 0x08, 0x28, 0x01, 0xdd, 0x12, 0x20, 0xca, 0xe7, -0x00, 0x20, 0xc8, 0xe7, 0x73, 0x6e, 0x69, 0x70, 0x02, 0x10, 0x00, 0x03, -0xb8, 0xb5, 0x07, 0x1c, 0x38, 0x1c, 0xff, 0xf7, 0x2a, 0xfe, 0x00, 0x25, -0xf8, 0x1d, 0xc9, 0x30, 0x45, 0x70, 0xfc, 0x1d, 0xb9, 0x34, 0xe5, 0x61, -0x68, 0x46, 0xff, 0xf7, 0x9d, 0xfd, 0x00, 0x28, 0x01, 0xd1, 0x0d, 0x20, -0x0d, 0xe0, 0xf8, 0x1d, 0x79, 0x30, 0x85, 0x63, 0xc5, 0x63, 0x1b, 0x20, -0x20, 0x60, 0xa7, 0x60, 0x04, 0x48, 0xc0, 0x46, 0x60, 0x61, 0x04, 0x48, -0xc0, 0x46, 0xa0, 0x61, 0x28, 0x1c, 0xb8, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x6d, 0xc8, 0x21, 0x40, 0x33, 0xc8, 0x21, 0x40, 0xf0, 0xb5, 0x82, 0xb0, -0x07, 0x1c, 0x00, 0x20, 0xfd, 0x1d, 0x79, 0x35, 0xfc, 0x1d, 0xb9, 0x34, -0xe9, 0x6a, 0xc0, 0x46, 0x61, 0x60, 0x62, 0x68, 0xe9, 0x6b, 0x8a, 0x42, -0x03, 0xd2, 0x61, 0x60, 0x2a, 0x6b, 0x91, 0x42, 0x34, 0xd2, 0x66, 0x68, -0xc0, 0x46, 0x01, 0x96, 0xe9, 0x6b, 0x73, 0x1a, 0xe9, 0x6a, 0x71, 0x1a, -0x26, 0x68, 0x2a, 0x6b, 0x96, 0x42, 0x00, 0xd2, 0x32, 0x1c, 0x01, 0x9e, -0x96, 0x1b, 0xa2, 0x68, 0xc0, 0x46, 0x00, 0x92, 0x00, 0x2a, 0x09, 0xd0, -0x28, 0x6a, 0x6a, 0x6a, 0x41, 0x18, 0x00, 0x98, 0xc0, 0x18, 0x33, 0x1c, -0xfc, 0xf7, 0x68, 0xff, 0x00, 0x28, 0x1b, 0xd1, 0x61, 0x68, 0x89, 0x19, -0x61, 0x60, 0x22, 0x68, 0x91, 0x42, 0x0d, 0xd1, 0x61, 0x69, 0x38, 0x1c, -0xfa, 0xf7, 0xc5, 0xfc, 0x00, 0x06, 0x00, 0x0e, 0x0e, 0xd1, 0xa1, 0x69, -0x38, 0x1c, 0xfa, 0xf7, 0xbe, 0xfc, 0x00, 0x06, 0x00, 0x0e, 0x07, 0xd1, -0x61, 0x68, 0x2a, 0x6b, 0x91, 0x42, 0xc2, 0xd3, 0xa9, 0x6b, 0xaa, 0x6a, -0x89, 0x18, 0xa9, 0x63, 0x02, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0xf0, 0xb5, 0x84, 0xb0, 0x07, 0x1c, 0x69, 0x46, 0x38, 0x1c, 0xfa, 0xf7, -0xc3, 0xfe, 0xfa, 0x1d, 0x09, 0x32, 0x37, 0x49, 0x00, 0x20, 0xc0, 0x43, -0xcc, 0x1d, 0xb9, 0x34, 0xe0, 0x60, 0xf8, 0x88, 0xcb, 0x1d, 0x89, 0x33, -0x18, 0x73, 0xc8, 0x1d, 0x79, 0x30, 0xbd, 0x68, 0xc0, 0x46, 0x05, 0x62, -0xff, 0x68, 0xc0, 0x46, 0x47, 0x62, 0x17, 0x68, 0xc0, 0x46, 0x87, 0x62, -0x57, 0x68, 0xc0, 0x46, 0xc7, 0x62, 0x92, 0x68, 0xc0, 0x46, 0x42, 0x63, -0xc2, 0x6a, 0x87, 0x6a, 0xd2, 0x19, 0x02, 0x63, 0x1a, 0x7b, 0x28, 0x4d, -0x01, 0x2a, 0x0d, 0xd0, 0x02, 0x2a, 0x1c, 0xd0, 0x03, 0x2a, 0x35, 0xd1, -0xca, 0x1d, 0xc9, 0x32, 0x52, 0x78, 0x00, 0x2a, 0x08, 0xd1, 0x10, 0x27, -0x80, 0x6b, 0xc0, 0x46, 0xe0, 0x60, 0x2c, 0xe0, 0x08, 0x1c, 0xff, 0xf7, -0x4b, 0xff, 0x22, 0xe0, 0x08, 0x1c, 0xff, 0xf7, 0xa9, 0xfd, 0x07, 0x1c, -0x23, 0xd1, 0xe0, 0x69, 0x00, 0x28, 0x1c, 0xd0, 0x00, 0x7a, 0x1a, 0x4b, -0xc0, 0x18, 0x02, 0x90, 0x17, 0xe0, 0x82, 0x6a, 0xc3, 0x6a, 0x9f, 0x18, -0x46, 0x6b, 0xb7, 0x42, 0x05, 0xd8, 0x00, 0x2a, 0x03, 0xd0, 0x9f, 0x07, -0x01, 0xd1, 0x92, 0x07, 0x01, 0xd0, 0x0f, 0x27, 0x0d, 0xe0, 0x80, 0x6b, -0x98, 0x42, 0x01, 0xd0, 0xe0, 0x60, 0xf8, 0xe7, 0x08, 0x1c, 0xff, 0xf7, -0x4f, 0xff, 0x07, 0x1c, 0x03, 0xd1, 0x00, 0xf0, 0x1f, 0xfe, 0x01, 0xe0, -0x10, 0x27, 0x00, 0x20, 0x28, 0x65, 0x01, 0xab, 0x5f, 0x80, 0xe0, 0x68, -0xc0, 0x46, 0x03, 0x90, 0x68, 0x46, 0x00, 0x21, -0xfa, 0xf7, 0x98, 0xfd, 0x01, 0x20, 0x04, 0xb0, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x3c, 0xac, 0x20, 0x40, 0x00, 0x00, 0x00, 0x80, -0x0d, 0xf0, 0xfe, 0xca, 0x80, 0xb5, 0x85, 0xb0, 0x07, 0x1c, 0x38, 0x1c, -0x01, 0xa9, 0xfa, 0xf7, 0x45, 0xfe, 0x68, 0x46, 0xb9, 0x68, 0xff, 0xf7, -0x94, 0xfc, 0x00, 0x28, 0x02, 0xd1, 0x00, 0x98, 0xff, 0xf7, 0xb8, 0xfc, -0x02, 0xab, 0x58, 0x80, 0x00, 0x21, 0x01, 0xa8, 0xfa, 0xf7, 0x76, 0xfd, -0x01, 0x20, 0x05, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x80, 0xb5, -0x85, 0xb0, 0x07, 0x1c, 0x38, 0x1c, 0x01, 0xa9, 0xfa, 0xf7, 0x2a, 0xfe, -0x68, 0x46, 0xb9, 0x68, 0xff, 0xf7, 0x79, 0xfc, 0x00, 0x28, 0x00, 0xd1, -0x02, 0x20, 0x02, 0xab, 0x58, 0x80, 0x00, 0x21, 0x01, 0xa8, 0xfa, 0xf7, -0x5d, 0xfd, 0x01, 0x20, 0x05, 0xb0, 0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x90, 0xb5, 0x85, 0xb0, 0x07, 0x1c, 0x38, 0x1c, 0x01, 0xa9, 0xfa, 0xf7, -0x11, 0xfe, 0x3c, 0x69, 0x38, 0x1c, 0x01, 0xa9, 0xfa, 0xf7, 0x0c, 0xfe, -0x68, 0x46, 0x21, 0x1c, 0xff, 0xf7, 0x5b, 0xfc, 0x8c, 0x24, 0x00, 0x28, -0x0e, 0xd1, 0xb9, 0x68, 0x00, 0x29, 0x02, 0xd1, 0xfa, 0x68, 0x00, 0x2a, -0x08, 0xd0, 0xf8, 0x88, 0x23, 0x1c, 0x8c, 0x28, 0x00, 0xd8, 0x03, 0x1c, -0xf8, 0x68, 0x00, 0x9a, 0xfc, 0xf7, 0xd0, 0xfd, 0x02, 0xab, 0x58, 0x80, -0x03, 0x94, 0x00, 0x21, 0x01, 0xa8, 0xfa, 0xf7, 0x2f, 0xfd, 0x01, 0x20, -0x05, 0xb0, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x21, 0x04, 0x48, -0xff, 0x22, 0x02, 0x72, 0x8c, 0x30, 0x01, 0x31, 0x04, 0x29, 0xfa, 0xd3, -0x70, 0x47, 0x00, 0x00, 0xb0, 0x6e, 0x21, 0x40, 0x02, 0x48, 0x03, 0x49, -0x40, 0x1a, 0x40, 0x42, 0x70, 0x47, 0x00, 0x00, 0xed, 0xd6, 0x21, 0x40, -0xe9, 0xd6, 0x21, 0x40, 0x00, 0x21, 0x08, 0x4a, 0x8b, 0x00, 0x5b, 0x18, -0x9b, 0x00, 0xd3, 0x56, 0x83, 0x42, 0x04, 0xd1, 0x88, 0x00, 0x40, 0x18, -0x80, 0x00, 0x80, 0x18, 0x70, 0x47, 0x01, 0x31, 0x01, 0x29, 0xf1, 0xd3, -0x00, 0x20, 0xf9, 0xe7, 0xe0, 0x70, 0x21, 0x40, 0x80, 0xb5, 0x00, 0xf0, -0x0c, 0xf8, 0x00, 0x27, 0x38, 0x1c, 0x00, 0xf0, 0x45, 0xf8, 0x78, 0x1c, -0x07, 0x04, 0x3f, 0x0c, 0x0c, 0x2f, 0xf7, 0xdd, 0x80, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x1c, 0x48, 0x02, 0x68, 0x1c, 0x49, 0x8b, 0x69, 0xd2, 0x18, -0x02, 0x60, 0x8a, 0x6a, 0x43, 0x68, 0x9b, 0x18, 0x43, 0x60, 0x93, 0x42, -0x02, 0xd2, 0x82, 0x68, 0x01, 0x32, 0x82, 0x60, 0xc2, 0x68, 0x0b, 0x6a, -0xd2, 0x18, 0xc2, 0x60, 0x42, 0x69, 0xcb, 0x68, 0xd2, 0x18, 0x42, 0x61, -0xc2, 0x69, 0x8b, 0x68, 0xd2, 0x18, 0xc2, 0x61, 0x02, 0x69, 0x0b, 0x69, -0xd2, 0x18, 0x02, 0x61, 0x82, 0x69, 0x0b, 0x68, 0xd2, 0x18, 0x82, 0x61, -0x02, 0x6b, 0xcb, 0x69, 0xd2, 0x18, 0x02, 0x63, 0x4a, 0x6a, 0x43, 0x6b, -0x9b, 0x18, 0x43, 0x63, 0x93, 0x42, 0x02, 0xd2, 0x82, 0x6b, 0x01, 0x32, -0x82, 0x63, 0xc2, 0x6b, 0x4b, 0x69, 0xd2, 0x18, 0xc2, 0x63, 0x02, 0x6c, -0xc9, 0x6a, 0x51, 0x18, 0x01, 0x64, 0x70, 0x47, 0xa4, 0x2a, 0x00, 0x80, +0x00, 0x10, 0x83, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0xf8, 0x00, 0x18, 0x40, +0x04, 0x01, 0x18, 0x40, 0x00, 0x01, 0x18, 0x40, 0xfc, 0x00, 0x18, 0x40, +0x80, 0xb5, 0x00, 0xf0, 0x0c, 0xf8, 0x00, 0x27, 0x38, 0x1c, 0x00, 0xf0, +0x47, 0xf8, 0x78, 0x1c, 0x07, 0x04, 0x3f, 0x0c, 0x0c, 0x2f, 0xf7, 0xdd, +0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x1d, 0x48, +0x02, 0x68, 0x1d, 0x49, 0x8b, 0x69, 0xd2, 0x18, 0x02, 0x60, 0x02, 0x66, +0x8a, 0x6a, 0x43, 0x68, 0x9b, 0x18, 0x43, 0x60, 0x93, 0x42, 0x02, 0xd2, +0x82, 0x68, 0x01, 0x32, 0x82, 0x60, 0xc2, 0x68, 0x0b, 0x6a, 0xd2, 0x18, +0xc2, 0x60, 0x42, 0x69, 0xcb, 0x68, 0xd2, 0x18, 0x42, 0x61, 0xc2, 0x69, +0x8b, 0x68, 0xd2, 0x18, 0xc2, 0x61, 0x02, 0x69, 0x0b, 0x69, 0xd2, 0x18, +0x02, 0x61, 0x82, 0x69, 0x0b, 0x68, 0xd2, 0x18, 0x82, 0x61, 0x02, 0x6b, +0xcb, 0x69, 0xd2, 0x18, 0x02, 0x63, 0x4a, 0x6a, 0x43, 0x6b, 0x9b, 0x18, +0x43, 0x63, 0x93, 0x42, 0x02, 0xd2, 0x82, 0x6b, 0x01, 0x32, 0x82, 0x63, +0xc2, 0x6b, 0x4b, 0x69, 0xd2, 0x18, 0xc2, 0x63, 0x02, 0x6c, 0xc9, 0x6a, +0x51, 0x18, 0x01, 0x64, 0x70, 0x47, 0x00, 0x00, 0xa4, 0x2a, 0x00, 0x80, 0x00, 0x08, 0x14, 0x40, 0x88, 0xb5, 0x69, 0x46, 0x00, 0xf0, 0x17, 0xf8, 0x81, 0x08, 0x0a, 0xd0, 0x00, 0x20, 0x00, 0x29, 0x07, 0xd9, 0x00, 0x22, 0x83, 0x00, 0x00, 0x9f, 0xc0, 0x46, 0xfa, 0x50, 0x01, 0x30, 0x88, 0x42, 0xf8, 0xd3, 0x88, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0xb5, 0x00, 0xf0, -0x04, 0xf8, 0x00, 0x04, 0x00, 0x0c, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x22, 0x00, 0x28, 0x0a, 0xd0, 0x01, 0x28, 0x0a, 0xd0, -0x02, 0x28, 0x0c, 0xd0, 0x03, 0x28, 0x02, 0xd1, 0x07, 0x48, 0x1c, 0x22, -0x08, 0x60, 0x10, 0x1c, 0x70, 0x47, 0x06, 0x48, 0x04, 0xe0, 0x06, 0x48, -0x50, 0x22, 0x08, 0x60, 0xf7, 0xe7, 0x05, 0x48, 0x68, 0x22, 0x08, 0x60, -0xf3, 0xe7, 0x00, 0x00, 0x08, 0x83, 0x20, 0x40, 0xa4, 0x2a, 0x00, 0x80, -0x0c, 0x2b, 0x00, 0x80, 0xa0, 0x82, 0x20, 0x40, 0x98, 0xb5, 0x00, 0x27, -0x68, 0x46, 0xfe, 0xf7, 0x6f, 0xfb, 0x10, 0x4c, 0x00, 0x28, 0x0b, 0xd0, -0x00, 0xf0, 0x44, 0xf8, 0x00, 0x28, 0x07, 0xd0, 0x01, 0x27, 0x10, 0x23, -0x60, 0x68, 0x18, 0x43, 0x60, 0x60, 0xa0, 0x68, 0x18, 0x43, 0x0b, 0xe0, -0x10, 0x23, 0xe0, 0x68, 0x98, 0x43, 0xe0, 0x60, 0x60, 0x69, 0x98, 0x43, -0x60, 0x61, 0x60, 0x68, 0x98, 0x43, 0x60, 0x60, 0xa0, 0x68, 0x98, 0x43, -0xa0, 0x60, 0x38, 0x1c, 0x98, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, -0x68, 0x19, 0x00, 0x80, 0x00, 0xb5, 0x00, 0xf0, 0xc7, 0xfc, 0x04, 0x49, -0x09, 0x6d, 0x08, 0x43, 0xfe, 0xf7, 0x8a, 0xfb, 0x00, 0x20, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xb5, 0x14, 0x24, -0x00, 0x25, 0x00, 0x27, 0x08, 0x4e, 0x02, 0x20, 0x21, 0x1c, 0x32, 0x1c, -0xfa, 0xf7, 0xde, 0xfa, 0x78, 0x40, 0x07, 0x04, 0x3f, 0x0c, 0x02, 0x34, -0x01, 0x35, 0x03, 0x2d, 0xf3, 0xd3, 0x38, 0x1c, 0xf0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x79, 0xbf, 0x21, 0x40, 0x01, 0x20, 0x70, 0x47, -0xb0, 0xb5, 0x01, 0x27, 0x3a, 0x1c, 0x18, 0x4b, 0xdb, 0x68, 0x01, 0x2b, -0x00, 0xd0, 0x00, 0x22, 0x12, 0x06, 0x12, 0x0e, 0x00, 0x24, 0x00, 0x2a, -0x23, 0xd0, 0x14, 0x4a, 0x53, 0x68, 0x1b, 0x04, 0x1b, 0x0c, 0x1d, 0x02, -0x1b, 0x12, 0x2b, 0x43, 0x92, 0x68, 0x12, 0x04, 0x12, 0x0c, 0x15, 0x02, -0x12, 0x12, 0x2a, 0x43, 0x12, 0x04, 0x12, 0x0c, 0x1b, 0x04, 0x1a, 0x43, -0x51, 0x40, 0x01, 0x31, 0x0f, 0xd1, 0x00, 0x28, 0x02, 0xd0, 0xff, 0xf7, -0xc1, 0xff, 0xc4, 0x43, 0x22, 0x04, 0x12, 0x0c, 0x07, 0x4b, 0x3a, 0x21, -0x02, 0x20, 0xfa, 0xf7, 0xa2, 0xfa, 0x38, 0x1c, 0xb0, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x20, 0x1c, 0xfa, 0xe7, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, -0x40, 0x00, 0x14, 0x40, 0xd9, 0xbf, 0x21, 0x40, 0x80, 0xb4, 0x03, 0x22, -0xc2, 0x80, 0x15, 0x4a, 0xc0, 0x46, 0x82, 0x60, 0x14, 0x4a, 0x12, 0x88, -0x01, 0x32, 0xc2, 0x60, 0x00, 0x20, 0x13, 0x4a, 0x13, 0x5c, 0xc0, 0x46, -0x0b, 0x70, 0x01, 0x30, 0x01, 0x31, 0x08, 0x28, 0xf8, 0xd3, 0x20, 0x22, -0x0a, 0x70, 0x01, 0x31, 0x00, 0x20, 0x0e, 0x4b, 0x1f, 0x5c, 0xc0, 0x46, -0x0f, 0x70, 0x01, 0x30, 0x01, 0x31, 0x08, 0x28, 0xf8, 0xd3, 0x0a, 0x70, -0x01, 0x31, 0x00, 0x20, 0x09, 0x4a, 0x13, 0x5c, 0xc0, 0x46, 0x0b, 0x70, -0x01, 0x30, 0x01, 0x31, 0x08, 0x28, 0xf8, 0xd3, 0x00, 0x20, 0x08, 0x70, -0x80, 0xbc, 0x70, 0x47, 0x02, 0x10, 0x00, 0x03, 0x68, 0x0e, 0x00, 0x80, -0x7c, 0x04, 0x00, 0x80, 0x85, 0x04, 0x00, 0x80, 0x8e, 0x04, 0x00, 0x80, -0x00, 0xb5, 0x01, 0x23, 0x0a, 0x48, 0xc1, 0x1d, 0x89, 0x31, 0x4b, 0x70, -0x00, 0x22, 0x0a, 0x70, 0x64, 0x21, 0x80, 0x30, 0xc1, 0x82, 0x01, 0x83, -0x43, 0x83, 0x7d, 0x21, 0xc9, 0x00, 0x81, 0x83, 0xc2, 0x83, 0x04, 0x48, -0x01, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x38, 0xfb, 0x08, 0xbc, 0x18, 0x47, -0x68, 0x0e, 0x00, 0x80, 0xa1, 0x22, 0xff, 0xff, -0x00, 0xb5, 0xff, 0xf7, 0xe1, 0xff, 0x13, 0x48, 0x02, 0x22, 0x00, 0x21, -0x00, 0xf0, 0x2a, 0xfb, 0x01, 0x23, 0xd8, 0x42, 0x0a, 0xd1, 0x10, 0x48, -0xc1, 0x1d, 0x39, 0x31, 0xca, 0x88, 0x01, 0x32, 0xca, 0x80, 0x81, 0x79, -0x01, 0x31, 0x81, 0x71, 0xfc, 0xf7, 0x5c, 0xfd, 0x0b, 0x48, 0xc0, 0x68, -0x01, 0x28, 0x05, 0xd1, 0x0a, 0x48, 0x7d, 0x22, 0xd2, 0x00, 0x00, 0x21, -0x00, 0xf0, 0x12, 0xfb, 0x08, 0x48, 0xfa, 0xf7, 0x1b, 0xfa, 0x08, 0x48, -0x28, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x0a, 0xfb, 0x08, 0xbc, 0x18, 0x47, -0x65, 0x21, 0xff, 0xff, 0xa0, 0x82, 0x20, 0x40, 0x68, 0x0e, 0x00, 0x80, -0x95, 0x7e, 0x21, 0x40, 0x81, 0x2c, 0xff, 0xff, 0x59, 0x03, 0xff, 0xff, -0x00, 0xb5, 0x10, 0x20, 0x0f, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x0f, 0x4a, -0x0f, 0x48, 0x64, 0x21, 0xfa, 0xf7, 0x00, 0xfa, 0x0e, 0x48, 0x01, 0x22, -0x12, 0x04, 0x01, 0x68, 0x0a, 0x40, 0x08, 0x21, 0x00, 0x2a, 0x05, 0xd1, -0x02, 0x68, 0x12, 0x0c, 0x07, 0xd1, 0x00, 0x68, 0x80, 0x0a, 0x04, 0xd3, -0x08, 0x48, 0xc0, 0x46, 0xc1, 0x60, 0x08, 0xbc, 0x18, 0x47, 0x07, 0x48, -0xc0, 0x46, 0x01, 0x64, 0xf9, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, -0x91, 0x55, 0xff, 0xff, 0x7c, 0x29, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, -0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf8, 0xb5, 0x27, 0x48, -0x01, 0x22, 0x12, 0x04, 0x01, 0x68, 0x0a, 0x40, 0x07, 0x21, 0x00, 0x2a, -0x05, 0xd1, 0x02, 0x68, 0x12, 0x0c, 0x06, 0xd1, 0x00, 0x68, 0x80, 0x0a, -0x03, 0xd3, 0x21, 0x48, 0xc0, 0x46, 0xc1, 0x60, 0x02, 0xe0, 0x20, 0x48, -0xc0, 0x46, 0x01, 0x64, 0x1f, 0x48, 0xfa, 0xf7, 0xc1, 0xf9, 0x1f, 0x48, -0xc1, 0x6b, 0xff, 0x29, 0xfc, 0xd1, 0x81, 0x6b, 0x42, 0x6b, 0x16, 0x1c, -0x0f, 0x1c, 0x1c, 0x4c, 0x10, 0x23, 0x60, 0x69, 0x18, 0x43, 0x60, 0x61, -0xa1, 0x69, 0x99, 0x43, 0x1d, 0x04, 0xa1, 0x61, 0xe8, 0x60, 0xa0, 0x69, -0xc0, 0x46, 0x28, 0x61, 0x16, 0x4a, 0x17, 0x49, 0x64, 0x20, 0xfa, 0xf7, -0xa9, 0xf9, 0x16, 0x4a, 0xc0, 0x46, 0x00, 0x92, 0x15, 0x4b, 0x00, 0x20, -0x39, 0x1c, 0x32, 0x1c, 0xfa, 0xf7, 0xa8, 0xf9, 0x13, 0x48, 0xc1, 0x68, -0x08, 0x29, 0xfc, 0xd1, 0x12, 0x48, 0xfa, 0xf7, 0x97, 0xf9, 0x10, 0x23, -0x60, 0x69, 0x98, 0x43, 0x60, 0x61, 0xe8, 0x60, 0x01, 0x20, 0xe3, 0x23, -0x1b, 0x01, 0xe1, 0x18, 0xc8, 0x71, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, -0x00, 0x00, 0x10, 0x40, 0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, -0x04, 0x02, 0xff, 0xff, 0x00, 0x01, 0x18, 0x40, 0x68, 0x0e, 0x00, 0x80, -0x0c, 0x55, 0xff, 0xff, 0x2d, 0xcf, 0x21, 0x40, 0x64, 0x00, 0x30, 0x02, -0x44, 0x80, 0x20, 0x40, 0x40, 0x01, 0x18, 0x40, 0xf4, 0x01, 0xff, 0xff, -0x00, 0xb5, 0xfd, 0xf7, 0xeb, 0xfa, 0x06, 0x48, 0xfa, 0xf7, 0x6c, 0xf9, -0xfd, 0xf7, 0xc0, 0xfa, 0xfd, 0xf7, 0xee, 0xfb, 0xfd, 0xf7, 0x00, 0xfc, -0xfd, 0xf7, 0x0e, 0xfc, 0x08, 0xbc, 0x18, 0x47, 0x91, 0x03, 0xff, 0xff, -0x90, 0xb5, 0xfd, 0xf7, 0x55, 0xf8, 0x34, 0x4f, 0x00, 0x24, 0xf9, 0x68, -0xf8, 0x1d, 0x79, 0x30, 0x01, 0x29, 0x0f, 0xd1, 0x31, 0x49, 0xc0, 0x46, -0xf9, 0x67, 0x31, 0x49, 0xc0, 0x46, 0x01, 0x60, 0x30, 0x49, 0xc0, 0x46, -0x0c, 0x60, 0x4c, 0x60, 0x8c, 0x60, 0xcc, 0x60, 0x0c, 0x61, 0x4c, 0x61, -0x8c, 0x61, 0x04, 0xe0, 0xf9, 0x1d, 0x7d, 0x31, 0xf9, 0x67, 0x12, 0xc0, -0x08, 0x38, 0x00, 0x68, 0x60, 0x23, 0x01, 0x68, -0x19, 0x43, 0x01, 0x60, 0xf8, 0x6f, 0x20, 0x23, 0x01, 0x68, 0x19, 0x43, -0x01, 0x60, 0xf8, 0x6f, 0x40, 0x23, 0x01, 0x68, 0x99, 0x43, 0x01, 0x60, -0x00, 0xf0, 0x54, 0xf8, 0xfd, 0xf7, 0x38, 0xf8, 0x00, 0xf0, 0x08, 0xf9, -0xfc, 0xf7, 0x5f, 0xfc, 0xff, 0xf7, 0x84, 0xfd, 0xfd, 0xf7, 0x18, 0xfa, -0xfd, 0xf7, 0xa0, 0xf9, 0xfd, 0xf7, 0xac, 0xfa, 0xfd, 0xf7, 0x3e, 0xf9, -0xfd, 0xf7, 0xf4, 0xf8, 0xfd, 0xf7, 0x7e, 0xf9, 0x00, 0xf0, 0xc4, 0xf9, -0xfd, 0xf7, 0x86, 0xfb, 0xfd, 0xf7, 0xf4, 0xfa, 0xfd, 0xf7, 0xbc, 0xfa, -0xfd, 0xf7, 0x26, 0xf8, 0xfa, 0xf7, 0x12, 0xf8, 0xff, 0xf7, 0x40, 0xfd, -0x00, 0x20, 0xff, 0xf7, 0x17, 0xfe, 0xff, 0xf7, 0x97, 0xff, 0x71, 0x23, -0x5b, 0x01, 0xf8, 0x18, 0x04, 0x72, 0x44, 0x72, 0x07, 0x23, 0x5b, 0x02, -0xf8, 0x18, 0x04, 0x63, 0x09, 0x48, 0xc0, 0x46, 0x44, 0x62, 0x00, 0xf0, -0xc3, 0xf9, 0x08, 0x48, 0xfa, 0xf7, 0xf8, 0xf8, 0x90, 0xbc, 0x08, 0xbc, -0x18, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x01, 0x11, 0x40, -0x04, 0x01, 0x11, 0x40, 0x00, 0x01, 0x11, 0x00, 0xc0, 0x00, 0x18, 0x00, -0x65, 0x9f, 0x21, 0x40, 0x00, 0xb5, 0x04, 0x48, 0xfa, 0xf7, 0xe4, 0xf8, -0xfd, 0xf7, 0x48, 0xfb, 0xfd, 0xf7, 0x0e, 0xf8, 0x08, 0xbc, 0x18, 0x47, -0x61, 0xa9, 0x21, 0x40, 0xfa, 0x21, 0x03, 0x48, 0xc0, 0x46, 0x41, 0x62, -0x40, 0x21, 0x41, 0x62, 0x70, 0x47, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, -0x07, 0x48, 0x41, 0x69, 0x07, 0x4b, 0x19, 0x43, 0x41, 0x61, 0x82, 0x69, -0x9a, 0x43, 0x82, 0x61, 0x01, 0x22, 0x12, 0x05, 0xd1, 0x60, 0x80, 0x69, -0xc0, 0x46, 0x10, 0x61, 0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, -0xfe, 0xaf, 0x9a, 0x10, 0x00, 0xb5, 0x02, 0x48, 0xfa, 0xf7, 0xba, 0xf8, -0x08, 0xbc, 0x18, 0x47, 0xb4, 0x57, 0xff, 0xff, 0xf0, 0xb5, 0x24, 0x4c, -0x01, 0x21, 0x09, 0x04, 0x20, 0x68, 0x01, 0x40, 0x09, 0x20, 0x22, 0x4e, -0x22, 0x4d, 0x00, 0x29, 0x05, 0xd1, 0x21, 0x68, 0x09, 0x0c, 0x04, 0xd1, -0x21, 0x68, 0x89, 0x0a, 0x01, 0xd3, 0xf0, 0x60, 0x00, 0xe0, 0x28, 0x64, -0x1d, 0x48, 0xfa, 0xf7, 0x9f, 0xf8, 0x1d, 0x4f, 0x1d, 0x49, 0x88, 0x69, -0x01, 0x30, 0x88, 0x61, 0x38, 0x7a, 0x00, 0x28, 0x02, 0xd1, 0x78, 0x7a, -0x00, 0x28, 0x1f, 0xd0, 0x19, 0x48, 0xfa, 0xf7, 0x91, 0xf8, 0x19, 0x48, -0xfa, 0xf7, 0x8e, 0xf8, 0x00, 0x28, 0xfa, 0xd1, 0x38, 0x7a, 0x00, 0x28, -0x02, 0xd0, 0x16, 0x48, 0xfa, 0xf7, 0x86, 0xf8, 0x01, 0x21, 0x09, 0x04, -0x20, 0x68, 0x01, 0x40, 0x14, 0x20, 0x00, 0x29, 0x05, 0xd1, 0x21, 0x68, -0x09, 0x0c, 0x04, 0xd1, 0x21, 0x68, 0x89, 0x0a, 0x01, 0xd3, 0xf0, 0x60, -0x01, 0xe0, 0x28, 0x64, 0xff, 0xe7, 0xfe, 0xe7, 0xff, 0xf7, 0xdd, 0xfc, -0x0b, 0x48, 0xfa, 0xf7, 0x6f, 0xf8, 0xff, 0xf7, 0xaf, 0xff, 0xcd, 0xe7, -0x00, 0x00, 0x10, 0x40, 0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, -0x04, 0x02, 0xff, 0xff, 0x88, 0x1c, 0x00, 0x80, 0x08, 0x83, 0x20, 0x40, -0xf4, 0x01, 0xff, 0xff, 0xb5, 0x07, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, -0xe9, 0xaf, 0x21, 0x40, 0x00, 0xb5, 0x16, 0x49, 0x01, 0x22, 0x12, 0x04, +0x04, 0xf8, 0x00, 0x04, 0x00, 0x0c, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x22, +0x00, 0x28, 0x0a, 0xd0, 0x01, 0x28, 0x0a, 0xd0, 0x02, 0x28, 0x0c, 0xd0, +0x03, 0x28, 0x02, 0xd1, 0x07, 0x48, 0x1c, 0x22, 0x08, 0x60, 0x10, 0x1c, +0x70, 0x47, 0x06, 0x48, 0x04, 0xe0, 0x06, 0x48, 0x50, 0x22, 0x08, 0x60, +0xf7, 0xe7, 0x05, 0x48, 0x68, 0x22, 0x08, 0x60, 0xf3, 0xe7, 0x00, 0x00, +0x08, 0x83, 0x20, 0x40, 0xa4, 0x2a, 0x00, 0x80, 0x0c, 0x2b, 0x00, 0x80, +0xa0, 0x82, 0x20, 0x40, 0x80, 0xb4, 0x03, 0x22, 0xc2, 0x80, 0x15, 0x4a, +0xc0, 0x46, 0x82, 0x60, 0x14, 0x4a, 0x12, 0x88, 0x01, 0x32, 0xc2, 0x60, +0x00, 0x20, 0x13, 0x4a, 0x13, 0x5c, 0xc0, 0x46, 0x0b, 0x70, 0x01, 0x30, +0x01, 0x31, 0x08, 0x28, 0xf8, 0xd3, 0x20, 0x22, 0x0a, 0x70, 0x01, 0x31, +0x00, 0x20, 0x0e, 0x4b, 0x1f, 0x5c, 0xc0, 0x46, 0x0f, 0x70, 0x01, 0x30, +0x01, 0x31, 0x08, 0x28, 0xf8, 0xd3, 0x0a, 0x70, 0x01, 0x31, 0x00, 0x20, +0x09, 0x4a, 0x13, 0x5c, 0xc0, 0x46, 0x0b, 0x70, 0x01, 0x30, 0x01, 0x31, +0x08, 0x28, 0xf8, 0xd3, 0x00, 0x20, 0x08, 0x70, 0x80, 0xbc, 0x70, 0x47, +0x08, 0x10, 0x00, 0x03, 0x68, 0x0e, 0x00, 0x80, 0x7c, 0x04, 0x00, 0x80, +0x85, 0x04, 0x00, 0x80, 0x8e, 0x04, 0x00, 0x80, 0x00, 0xb5, 0x01, 0x23, +0x0a, 0x48, 0xc1, 0x1d, 0x89, 0x31, 0x4b, 0x70, 0x00, 0x22, 0x0a, 0x70, +0x64, 0x21, 0x80, 0x30, 0xc1, 0x82, 0x01, 0x83, 0x43, 0x83, 0x7d, 0x21, +0xc9, 0x00, 0x81, 0x83, 0xc2, 0x83, 0x04, 0x48, 0x01, 0x22, 0x00, 0x21, +0x00, 0xf0, 0x8e, 0xfb, 0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, +0xb5, 0x22, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xf7, 0xe1, 0xff, 0x13, 0x48, +0x02, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x80, 0xfb, 0x01, 0x23, 0xd8, 0x42, +0x0a, 0xd1, 0x10, 0x48, 0xc1, 0x1d, 0x39, 0x31, 0xca, 0x88, 0x01, 0x32, +0xca, 0x80, 0x81, 0x79, 0x01, 0x31, 0x81, 0x71, 0xfd, 0xf7, 0x70, 0xf9, +0x0b, 0x48, 0xc0, 0x68, 0x01, 0x28, 0x05, 0xd1, 0x0a, 0x48, 0x7d, 0x22, +0xd2, 0x00, 0x00, 0x21, 0x00, 0xf0, 0x68, 0xfb, 0x08, 0x48, 0xfb, 0xf7, +0xe1, 0xfc, 0x08, 0x48, 0x28, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x60, 0xfb, +0x08, 0xbc, 0x18, 0x47, 0x79, 0x21, 0xff, 0xff, 0xa0, 0x82, 0x20, 0x40, +0x68, 0x0e, 0x00, 0x80, 0xa5, 0x7b, 0x21, 0x40, +0x95, 0x2c, 0xff, 0xff, 0x59, 0x03, 0xff, 0xff, 0x00, 0xb5, 0x10, 0x20, +0x0f, 0x49, 0xc0, 0x46, 0x08, 0x60, 0x0f, 0x4a, 0x0f, 0x48, 0x64, 0x21, +0xfb, 0xf7, 0xc6, 0xfc, 0x0e, 0x48, 0x01, 0x22, 0x12, 0x04, 0x01, 0x68, +0x0a, 0x40, 0x08, 0x21, 0x00, 0x2a, 0x05, 0xd1, 0x02, 0x68, 0x12, 0x0c, +0x07, 0xd1, 0x00, 0x68, 0x80, 0x0a, 0x04, 0xd3, 0x08, 0x48, 0xc0, 0x46, +0xc1, 0x60, 0x08, 0xbc, 0x18, 0x47, 0x07, 0x48, 0xc0, 0x46, 0x01, 0x64, +0xf9, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xa5, 0x55, 0xff, 0xff, +0x7c, 0x29, 0x00, 0x80, 0x00, 0x00, 0x10, 0x40, 0x40, 0x01, 0x18, 0x00, +0x00, 0x00, 0x00, 0x80, 0xf8, 0xb5, 0x27, 0x48, 0x01, 0x22, 0x12, 0x04, +0x01, 0x68, 0x0a, 0x40, 0x07, 0x21, 0x00, 0x2a, 0x05, 0xd1, 0x02, 0x68, +0x12, 0x0c, 0x06, 0xd1, 0x00, 0x68, 0x80, 0x0a, 0x03, 0xd3, 0x21, 0x48, +0xc0, 0x46, 0xc1, 0x60, 0x02, 0xe0, 0x20, 0x48, 0xc0, 0x46, 0x01, 0x64, +0x1f, 0x48, 0xfb, 0xf7, 0x87, 0xfc, 0x1f, 0x48, 0xc1, 0x6b, 0xff, 0x29, +0xfc, 0xd1, 0x81, 0x6b, 0x42, 0x6b, 0x16, 0x1c, 0x0f, 0x1c, 0x1c, 0x4c, +0x10, 0x23, 0x60, 0x69, 0x18, 0x43, 0x60, 0x61, 0xa1, 0x69, 0x99, 0x43, +0x1d, 0x04, 0xa1, 0x61, 0xe8, 0x60, 0xa0, 0x69, 0xc0, 0x46, 0x28, 0x61, +0x16, 0x4a, 0x17, 0x49, 0x64, 0x20, 0xfb, 0xf7, 0x6f, 0xfc, 0x16, 0x4a, +0xc0, 0x46, 0x00, 0x92, 0x15, 0x4b, 0x00, 0x20, 0x39, 0x1c, 0x32, 0x1c, +0xfb, 0xf7, 0x6e, 0xfc, 0x13, 0x48, 0xc1, 0x68, 0x08, 0x29, 0xfc, 0xd1, +0x12, 0x48, 0xfb, 0xf7, 0x5d, 0xfc, 0x10, 0x23, 0x60, 0x69, 0x98, 0x43, +0x60, 0x61, 0xe8, 0x60, 0x01, 0x20, 0xe3, 0x23, 0x1b, 0x01, 0xe1, 0x18, +0xc8, 0x71, 0xf8, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x10, 0x40, +0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x02, 0xff, 0xff, +0x00, 0x01, 0x18, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x20, 0x55, 0xff, 0xff, +0xb5, 0xb6, 0x21, 0x40, 0x64, 0x00, 0x30, 0x02, 0x44, 0x80, 0x20, 0x40, +0x40, 0x01, 0x18, 0x40, 0xf4, 0x01, 0xff, 0xff, 0x00, 0xb5, 0xfd, 0xf7, +0x01, 0xff, 0x06, 0x48, 0xfb, 0xf7, 0x32, 0xfc, 0xfd, 0xf7, 0xd6, 0xfe, +0xfe, 0xf7, 0x04, 0xf8, 0xfe, 0xf7, 0x16, 0xf8, 0xfe, 0xf7, 0x24, 0xf8, +0x08, 0xbc, 0x18, 0x47, 0x91, 0x03, 0xff, 0xff, 0x90, 0xb5, 0xfd, 0xf7, +0x6b, 0xfc, 0x34, 0x4f, 0x00, 0x24, 0xf9, 0x68, 0xf8, 0x1d, 0x79, 0x30, +0x01, 0x29, 0x0f, 0xd1, 0x31, 0x49, 0xc0, 0x46, 0xf9, 0x67, 0x31, 0x49, +0xc0, 0x46, 0x01, 0x60, 0x30, 0x49, 0xc0, 0x46, 0x0c, 0x60, 0x4c, 0x60, +0x8c, 0x60, 0xcc, 0x60, 0x0c, 0x61, 0x4c, 0x61, 0x8c, 0x61, 0x04, 0xe0, +0xf9, 0x1d, 0x7d, 0x31, 0xf9, 0x67, 0x12, 0xc0, 0x08, 0x38, 0x00, 0x68, +0x60, 0x23, 0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0xf8, 0x6f, 0x20, 0x23, +0x01, 0x68, 0x19, 0x43, 0x01, 0x60, 0xf8, 0x6f, 0x40, 0x23, 0x01, 0x68, +0x99, 0x43, 0x01, 0x60, 0x00, 0xf0, 0x54, 0xf8, 0xfd, 0xf7, 0x4e, 0xfc, +0x00, 0xf0, 0x5e, 0xf9, 0xfd, 0xf7, 0x73, 0xf8, 0xff, 0xf7, 0x0c, 0xfe, +0xfd, 0xf7, 0x2e, 0xfe, 0xfd, 0xf7, 0xb6, 0xfd, 0xfd, 0xf7, 0xc2, 0xfe, +0xfd, 0xf7, 0x54, 0xfd, 0xfd, 0xf7, 0x0a, 0xfd, 0xfd, 0xf7, 0x94, 0xfd, +0x00, 0xf0, 0x1a, 0xfa, 0xfd, 0xf7, 0x9c, 0xff, 0xfd, 0xf7, 0x0a, 0xff, +0xfd, 0xf7, 0xd2, 0xfe, 0xfd, 0xf7, 0x3c, 0xfc, 0xfb, 0xf7, 0xdc, 0xfa, +0xff, 0xf7, 0x9c, 0xff, 0x71, 0x23, 0x5b, 0x01, +0xf8, 0x18, 0x04, 0x72, 0x44, 0x72, 0x07, 0x23, 0x5b, 0x02, 0xf8, 0x18, +0x04, 0x63, 0xf8, 0x68, 0x01, 0x28, 0x02, 0xd1, 0xa8, 0x20, 0xfe, 0xf7, +0xb1, 0xfd, 0x09, 0x48, 0xc0, 0x46, 0x44, 0x62, 0x00, 0xf0, 0x18, 0xfa, +0x07, 0x48, 0xfb, 0xf7, 0xbd, 0xfb, 0x90, 0xbc, 0x08, 0xbc, 0x18, 0x47, +0x68, 0x0e, 0x00, 0x80, 0x00, 0x01, 0x11, 0x40, 0x04, 0x01, 0x11, 0x40, +0x00, 0x01, 0x11, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x15, 0x8f, 0x21, 0x40, +0x00, 0xb5, 0x04, 0x48, 0xfb, 0xf7, 0xaa, 0xfb, 0xfd, 0xf7, 0x5e, 0xff, +0xfd, 0xf7, 0x24, 0xfc, 0x08, 0xbc, 0x18, 0x47, 0x15, 0x99, 0x21, 0x40, +0xfa, 0x21, 0x03, 0x48, 0xc0, 0x46, 0x41, 0x62, 0x40, 0x21, 0x41, 0x62, +0x70, 0x47, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x07, 0x48, 0x41, 0x69, +0x07, 0x4b, 0x19, 0x43, 0x41, 0x61, 0x82, 0x69, 0x9a, 0x43, 0x82, 0x61, +0x01, 0x22, 0x12, 0x05, 0xd1, 0x60, 0x80, 0x69, 0xc0, 0x46, 0x10, 0x61, +0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0xfe, 0xaf, 0x9a, 0x10, +0x00, 0xb5, 0x02, 0x48, 0xfb, 0xf7, 0x80, 0xfb, 0x08, 0xbc, 0x18, 0x47, +0xc8, 0x57, 0xff, 0xff, 0xf0, 0xb5, 0x24, 0x4c, 0x01, 0x21, 0x09, 0x04, +0x20, 0x68, 0x01, 0x40, 0x09, 0x20, 0x22, 0x4e, 0x22, 0x4d, 0x00, 0x29, +0x05, 0xd1, 0x21, 0x68, 0x09, 0x0c, 0x04, 0xd1, 0x21, 0x68, 0x89, 0x0a, +0x01, 0xd3, 0xf0, 0x60, 0x00, 0xe0, 0x28, 0x64, 0x1d, 0x48, 0xfb, 0xf7, +0x65, 0xfb, 0x1d, 0x4f, 0x1d, 0x49, 0x88, 0x69, 0x01, 0x30, 0x88, 0x61, +0x38, 0x7a, 0x00, 0x28, 0x02, 0xd1, 0x78, 0x7a, 0x00, 0x28, 0x1f, 0xd0, +0x19, 0x48, 0xfb, 0xf7, 0x57, 0xfb, 0x19, 0x48, 0xfb, 0xf7, 0x54, 0xfb, +0x00, 0x28, 0xfa, 0xd1, 0x38, 0x7a, 0x00, 0x28, 0x02, 0xd0, 0x16, 0x48, +0xfb, 0xf7, 0x4c, 0xfb, 0x01, 0x21, 0x09, 0x04, 0x20, 0x68, 0x01, 0x40, +0x14, 0x20, 0x00, 0x29, 0x05, 0xd1, 0x21, 0x68, 0x09, 0x0c, 0x04, 0xd1, +0x21, 0x68, 0x89, 0x0a, 0x01, 0xd3, 0xf0, 0x60, 0x01, 0xe0, 0x28, 0x64, +0xff, 0xe7, 0xfe, 0xe7, 0xff, 0xf7, 0x65, 0xfd, 0x0b, 0x48, 0xfb, 0xf7, +0x35, 0xfb, 0xff, 0xf7, 0xaf, 0xff, 0xcd, 0xe7, 0x00, 0x00, 0x10, 0x40, +0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x02, 0xff, 0xff, +0x88, 0x1c, 0x00, 0x80, 0x08, 0x83, 0x20, 0x40, 0xf4, 0x01, 0xff, 0xff, +0xb5, 0x07, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x99, 0x9f, 0x21, 0x40, +0x00, 0x20, 0x07, 0x4a, 0x01, 0x21, 0x09, 0x05, 0x50, 0x61, 0xc8, 0x60, +0xd0, 0x61, 0xc8, 0x61, 0x03, 0x23, 0xdb, 0x04, 0x03, 0x4a, 0x01, 0x21, +0xd1, 0x63, 0x58, 0x60, 0xfc, 0xe7, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, +0xc0, 0x00, 0x18, 0x00, 0x80, 0xb5, 0xc0, 0xb0, 0x01, 0x22, 0x00, 0x21, +0x0a, 0x20, 0xfc, 0xf7, 0xd1, 0xff, 0x07, 0x1c, 0xff, 0x2f, 0x28, 0xd0, +0x69, 0x46, 0xff, 0x22, 0x38, 0x1c, 0x01, 0x32, 0xfd, 0xf7, 0x54, 0xf9, +0xff, 0x23, 0x01, 0x33, 0x98, 0x42, 0x1b, 0xd1, 0x0d, 0x98, 0x00, 0x09, +0x18, 0xd3, 0x38, 0x1c, 0xfd, 0xf7, 0x8d, 0xf8, 0x0e, 0x49, 0x01, 0x22, +0x12, 0x04, 0x08, 0x68, 0x02, 0x40, 0x0d, 0x48, 0x05, 0xd1, 0x0a, 0x68, +0x12, 0x0c, 0x06, 0xd1, 0x09, 0x68, 0x89, 0x0a, 0x03, 0xd3, 0x0a, 0x49, +0xc0, 0x46, 0xc8, 0x60, 0x02, 0xe0, 0x09, 0x49, 0xc0, 0x46, 0x08, 0x64, +0xff, 0xf7, 0xbc, 0xff, 0x38, 0x1c, 0xfd, 0xf7, 0x74, 0xf8, 0x40, 0xb0, +0x80, 0xbc, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, +0x00, 0x00, 0x10, 0x40, 0x07, 0x80, 0x00, 0x00, 0x40, 0x01, 0x18, 0x00, +0x00, 0x00, 0x00, 0x80, 0x00, 0xb5, 0x17, 0x49, 0x01, 0x22, 0x12, 0x04, 0x08, 0x68, 0x02, 0x40, 0x06, 0x20, 0x00, 0x2a, 0x05, 0xd1, 0x0a, 0x68, -0x12, 0x0c, 0x06, 0xd1, 0x09, 0x68, 0x89, 0x0a, 0x03, 0xd3, 0x10, 0x49, -0xc0, 0x46, 0xc8, 0x60, 0x02, 0xe0, 0x0f, 0x49, 0xc0, 0x46, 0x08, 0x64, -0x03, 0x20, 0xfe, 0xf7, 0x55, 0xf9, 0xfa, 0xf7, -0x9d, 0xfc, 0x01, 0x23, 0x18, 0x43, 0xfa, 0xf7, 0x77, 0xfd, 0xff, 0xf7, -0xd7, 0xfe, 0xff, 0xf7, 0x5b, 0xfe, 0xff, 0xf7, 0x4b, 0xff, 0xff, 0xf7, -0x5f, 0xff, 0xff, 0xf7, 0xf1, 0xfd, 0xff, 0xf7, 0x77, 0xff, 0x08, 0xbc, +0x12, 0x0c, 0x06, 0xd1, 0x09, 0x68, 0x89, 0x0a, 0x03, 0xd3, 0x11, 0x49, +0xc0, 0x46, 0xc8, 0x60, 0x02, 0xe0, 0x10, 0x49, 0xc0, 0x46, 0x08, 0x64, +0x03, 0x20, 0xfe, 0xf7, 0xd3, 0xfc, 0xfb, 0xf7, 0x0d, 0xff, 0x01, 0x23, +0x18, 0x43, 0xfb, 0xf7, 0xe7, 0xff, 0xff, 0xf7, 0x83, 0xfe, 0xff, 0xf7, +0x9d, 0xff, 0xff, 0xf7, 0x05, 0xfe, 0xff, 0xf7, 0xf5, 0xfe, 0xff, 0xf7, +0x09, 0xff, 0xff, 0xf7, 0x9b, 0xfd, 0xff, 0xf7, 0x21, 0xff, 0x08, 0xbc, 0x18, 0x47, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x40, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xb4, 0x46, 0x4a, 0x01, 0x21, 0xc9, 0x03, 0x45, 0x4d, 0x19, 0x23, 0xdb, 0x01, 0xec, 0x18, 0xa1, 0x61, 0x28, 0x88, @@ -4231,7 +3722,7 @@ 0x00, 0x2b, 0x07, 0xd9, 0x87, 0x00, 0x4b, 0x6a, 0xc0, 0x46, 0xda, 0x51, 0x0b, 0x69, 0x01, 0x30, 0x83, 0x42, 0xf7, 0xd8, 0x49, 0x6a, 0x80, 0x00, 0x08, 0x18, 0x04, 0x38, 0x28, 0x61, 0xf0, 0xbc, 0x70, 0x47, 0x00, 0x00, -0xec, 0xd6, 0x21, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x20, 0x40, +0xb0, 0xbe, 0x21, 0x40, 0x68, 0x0e, 0x00, 0x80, 0x00, 0x00, 0x20, 0x40, 0x4c, 0x2a, 0x00, 0x80, 0x00, 0x00, 0x20, 0x40, 0x00, 0xad, 0xde, 0x00, 0x0a, 0x48, 0x01, 0x23, 0x1b, 0x06, 0x41, 0x69, 0x99, 0x43, 0x1a, 0x09, 0x41, 0x61, 0xd1, 0x60, 0x00, 0x21, 0xa1, 0x22, 0x52, 0x03, 0x91, 0x61, @@ -4239,14 +3730,14 @@ 0x59, 0x05, 0x08, 0x60, 0x70, 0x47, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x80, 0x80, 0xb4, 0x02, 0x1c, 0x0b, 0x48, 0x1b, 0x23, 0xdb, 0x01, 0xc3, 0x18, 0x9a, 0x61, 0x01, 0x23, 0x1b, 0x06, 0x42, 0x69, 0x1a, 0x43, 0x42, 0x61, -0x87, 0x69, 0x9f, 0x43, 0x01, 0x23, 0x1b, 0x05, 0x87, 0x61, 0xda, 0x60, -0x80, 0x69, 0xc0, 0x46, 0x18, 0x61, 0xa1, 0x20, 0x40, 0x03, 0x81, 0x61, -0x80, 0xbc, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x80, 0xb5, 0xff, 0xf7, -0xc9, 0xff, 0x00, 0x20, 0x00, 0xf0, 0x20, 0xf8, 0x00, 0x20, 0x09, 0x49, -0x00, 0x22, 0x03, 0x01, 0x5f, 0x18, 0x33, 0x23, 0x9b, 0x01, 0xfb, 0x18, -0x9a, 0x62, 0x01, 0x30, 0x0b, 0x28, 0xf6, 0xd3, 0x04, 0x48, 0x01, 0x22, -0x00, 0x21, 0x00, 0xf0, 0x33, 0xf8, 0x80, 0xbc, -0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x09, 0x3e, 0xff, 0xff, +0x87, 0x69, 0x9f, 0x43, 0x01, 0x23, 0x1b, 0x05, +0x87, 0x61, 0xda, 0x60, 0x80, 0x69, 0xc0, 0x46, 0x18, 0x61, 0xa1, 0x20, +0x40, 0x03, 0x81, 0x61, 0x80, 0xbc, 0x70, 0x47, 0x68, 0x0e, 0x00, 0x80, +0x80, 0xb5, 0xff, 0xf7, 0xc9, 0xff, 0x00, 0x20, 0x00, 0xf0, 0x20, 0xf8, +0x00, 0x20, 0x09, 0x49, 0x00, 0x22, 0x03, 0x01, 0x5f, 0x18, 0x33, 0x23, +0x9b, 0x01, 0xfb, 0x18, 0x9a, 0x62, 0x01, 0x30, 0x0b, 0x28, 0xf6, 0xd3, +0x04, 0x48, 0x01, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x33, 0xf8, 0x80, 0xbc, +0x08, 0xbc, 0x18, 0x47, 0x68, 0x0e, 0x00, 0x80, 0x1d, 0x3e, 0xff, 0xff, 0x00, 0xb5, 0x02, 0x48, 0x00, 0xf0, 0x04, 0xf8, 0x08, 0xbc, 0x18, 0x47, 0xa8, 0x61, 0x00, 0x00, 0x80, 0xb4, 0x01, 0x22, 0x12, 0x05, 0x0f, 0x4b, 0xa1, 0x21, 0x49, 0x03, 0x00, 0x28, 0x0e, 0xd0, 0xc8, 0x61, 0x18, 0x1c, @@ -4280,17 +3771,8 @@ 0x90, 0xb4, 0x08, 0x4a, 0xd0, 0x69, 0x00, 0x21, 0x07, 0x4f, 0xd3, 0x69, 0x83, 0x42, 0x02, 0xd9, 0xfc, 0x1a, 0x20, 0x18, 0x00, 0xe0, 0xc0, 0x1a, 0x09, 0x18, 0x18, 0x1c, 0xb9, 0x42, 0xf4, 0xd9, 0x90, 0xbc, 0x70, 0x47, -0x00, 0x20, 0x14, 0x40, 0xa8, 0x61, 0x00, 0x00, 0x43, 0x1a, 0x93, 0x42, -0x30, 0xd3, 0x84, 0x46, 0x8b, 0x07, 0x07, 0xd0, 0x52, 0x1e, 0x29, 0xd3, -0x0b, 0x78, 0x03, 0x70, 0x40, 0x1c, 0x49, 0x1c, 0x8b, 0x07, 0xf7, 0xd1, -0x83, 0x07, 0x17, 0xd1, 0x10, 0x3a, 0x05, 0xd3, 0xb0, 0xb4, 0xb8, 0xc9, -0xb8, 0xc0, 0x10, 0x3a, 0xfb, 0xd2, 0xb0, 0xbc, 0x0c, 0x32, 0x0f, 0xd3, -0x08, 0xc9, 0x08, 0xc0, 0x12, 0x1f, 0xfb, 0xd2, 0x0a, 0xe0, 0x08, 0xc9, -0x03, 0x70, 0x1b, 0x0a, 0x43, 0x70, 0x1b, 0x0a, 0x83, 0x70, 0x1b, 0x0a, -0xc3, 0x70, 0x00, 0x1d, 0x12, 0x1f, 0xf4, 0xd2, 0xd2, 0x1c, 0x05, 0xd3, -0x0b, 0x78, 0x03, 0x70, 0x49, 0x1c, 0x40, 0x1c, -0x52, 0x1e, 0xf9, 0xd2, 0x60, 0x46, 0x70, 0x47, 0x03, 0x1c, 0x0b, 0x43, -0x13, 0x43, 0x9b, 0x07, 0x04, 0xd1, 0x12, 0x1f, 0x8b, 0x58, 0x83, 0x50, -0xfb, 0xd1, 0x70, 0x47, 0x52, 0x1e, 0x8b, 0x5c, 0x83, 0x54, 0xfb, 0xd1, -0x70, 0x47, 0x00, 0x00, 0x00, 0x20, 0x70, 0x47, +0x00, 0x20, 0x14, 0x40, 0xa8, 0x61, 0x00, 0x00, 0x90, 0xb5, 0x07, 0x1c, +0x00, 0x24, 0x00, 0x2f, 0x04, 0xd3, 0xff, 0xf7, 0xe3, 0xff, 0x01, 0x34, +0xbc, 0x42, 0xfa, 0xd9, 0x90, 0xbc, 0x08, 0xbc, +0x18, 0x47, 0x00, 0x00, }; diff -Nru a/drivers/net/typhoon.c b/drivers/net/typhoon.c --- a/drivers/net/typhoon.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/typhoon.c 2005-03-07 14:54:17 -08:00 @@ -50,6 +50,13 @@ */ static int rx_copybreak = 200; +/* Should we use MMIO or Port IO? + * 0: Port IO + * 1: MMIO + * 2: Try MMIO, fallback to Port IO + */ +static unsigned int use_mmio = 2; + /* end user-configurable values */ /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). @@ -93,8 +100,8 @@ #define PKT_BUF_SZ 1536 #define DRV_MODULE_NAME "typhoon" -#define DRV_MODULE_VERSION "1.5.4" -#define DRV_MODULE_RELDATE "04/09/09" +#define DRV_MODULE_VERSION "1.5.7" +#define DRV_MODULE_RELDATE "05/01/07" #define PFX DRV_MODULE_NAME ": " #define ERR_PFX KERN_ERR PFX @@ -131,9 +138,16 @@ "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; MODULE_AUTHOR("David Dillow "); +MODULE_VERSION(DRV_MODULE_VERSION); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("3Com Typhoon Family (3C990, 3CR990, and variants)"); -MODULE_PARM(rx_copybreak, "i"); +MODULE_PARM_DESC(rx_copybreak, "Packets smaller than this are copied and " + "the buffer given back to the NIC. Default " + "is 200."); +MODULE_PARM_DESC(use_mmio, "Use MMIO (1) or PIO(0) to access the NIC. " + "Default is to try MMIO and fallback to PIO."); +module_param(rx_copybreak, int, 0); +module_param(use_mmio, int, 0); #if defined(NETIF_F_TSO) && MAX_SKB_FRAGS > 32 #warning Typhoon only supports 32 entries in its SG list for TSO, disabling TSO @@ -310,7 +324,7 @@ * cannot pass a read, so this forces current writes to post. */ #define typhoon_post_pci_writes(x) \ - do { readl(x + TYPHOON_REG_HEARTBEAT); } while(0) + do { if(likely(use_mmio)) ioread32(x+TYPHOON_REG_HEARTBEAT); } while(0) /* We'll wait up to six seconds for a reset, and half a second normally. */ @@ -391,17 +405,17 @@ else timeout = TYPHOON_RESET_TIMEOUT_SLEEP; - writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); - writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS); - writel(TYPHOON_RESET_ALL, ioaddr + TYPHOON_REG_SOFT_RESET); + iowrite32(TYPHOON_RESET_ALL, ioaddr + TYPHOON_REG_SOFT_RESET); typhoon_post_pci_writes(ioaddr); udelay(1); - writel(TYPHOON_RESET_NONE, ioaddr + TYPHOON_REG_SOFT_RESET); + iowrite32(TYPHOON_RESET_NONE, ioaddr + TYPHOON_REG_SOFT_RESET); if(wait_type != NoWait) { for(i = 0; i < timeout; i++) { - if(readl(ioaddr + TYPHOON_REG_STATUS) == + if(ioread32(ioaddr + TYPHOON_REG_STATUS) == TYPHOON_STATUS_WAITING_FOR_HOST) goto out; @@ -416,8 +430,8 @@ } out: - writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); - writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS); /* The 3XP seems to need a little extra time to complete the load * of the sleep image before we can reliably boot it. Failure to @@ -442,7 +456,7 @@ int i, err = 0; for(i = 0; i < TYPHOON_WAIT_TIMEOUT; i++) { - if(readl(ioaddr + TYPHOON_REG_STATUS) == wait_value) + if(ioread32(ioaddr + TYPHOON_REG_STATUS) == wait_value) goto out; udelay(TYPHOON_UDELAY); } @@ -478,7 +492,7 @@ INIT_COMMAND_NO_RESPONSE(cmd, TYPHOON_CMD_HELLO_RESP); smp_wmb(); - writel(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); + iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); spin_unlock(&tp->command_lock); } } @@ -633,7 +647,7 @@ /* "I feel a presence... another warrior is on the the mesa." */ wmb(); - writel(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); + iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); typhoon_post_pci_writes(tp->ioaddr); if((cmd->flags & TYPHOON_CMD_RESPOND) == 0) @@ -687,7 +701,7 @@ * is the case. */ if(indexes->respCleared != indexes->respReady) - writel(1, tp->ioaddr + TYPHOON_REG_SELF_INTERRUPT); + iowrite32(1, tp->ioaddr + TYPHOON_REG_SELF_INTERRUPT); } spin_unlock(&tp->command_lock); @@ -889,7 +903,7 @@ /* Kick the 3XP */ wmb(); - writel(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); + iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); dev->trans_start = jiffies; @@ -1058,8 +1072,10 @@ if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) { strcpy(info->fw_version, "Unknown runtime"); } else { - strncpy(info->fw_version, (char *) &xp_resp[1], 32); - info->fw_version[31] = 0; + u32 sleep_ver = xp_resp[0].parm2; + snprintf(info->fw_version, 32, "%02x.%03x.%03x", + sleep_ver >> 24, (sleep_ver >> 12) & 0xfff, + sleep_ver & 0xfff); } } @@ -1251,7 +1267,7 @@ int i, err = 0; for(i = 0; i < TYPHOON_WAIT_TIMEOUT; i++) { - if(readl(ioaddr + TYPHOON_REG_INTR_STATUS) & + if(ioread32(ioaddr + TYPHOON_REG_INTR_STATUS) & TYPHOON_INTR_BOOTCMD) goto out; udelay(TYPHOON_UDELAY); @@ -1260,7 +1276,7 @@ err = -ETIMEDOUT; out: - writel(TYPHOON_INTR_BOOTCMD, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(TYPHOON_INTR_BOOTCMD, ioaddr + TYPHOON_REG_INTR_STATUS); return err; } @@ -1394,11 +1410,11 @@ goto err_out; } - irqEnabled = readl(ioaddr + TYPHOON_REG_INTR_ENABLE); - writel(irqEnabled | TYPHOON_INTR_BOOTCMD, + irqEnabled = ioread32(ioaddr + TYPHOON_REG_INTR_ENABLE); + iowrite32(irqEnabled | TYPHOON_INTR_BOOTCMD, ioaddr + TYPHOON_REG_INTR_ENABLE); - irqMasked = readl(ioaddr + TYPHOON_REG_INTR_MASK); - writel(irqMasked | TYPHOON_INTR_BOOTCMD, + irqMasked = ioread32(ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(irqMasked | TYPHOON_INTR_BOOTCMD, ioaddr + TYPHOON_REG_INTR_MASK); err = -ETIMEDOUT; @@ -1410,24 +1426,24 @@ numSections = le32_to_cpu(fHdr->numSections); load_addr = le32_to_cpu(fHdr->startAddr); - writel(TYPHOON_INTR_BOOTCMD, ioaddr + TYPHOON_REG_INTR_STATUS); - writel(load_addr, ioaddr + TYPHOON_REG_DOWNLOAD_BOOT_ADDR); + iowrite32(TYPHOON_INTR_BOOTCMD, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(load_addr, ioaddr + TYPHOON_REG_DOWNLOAD_BOOT_ADDR); hmac = le32_to_cpu(fHdr->hmacDigest[0]); - writel(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_0); + iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_0); hmac = le32_to_cpu(fHdr->hmacDigest[1]); - writel(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_1); + iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_1); hmac = le32_to_cpu(fHdr->hmacDigest[2]); - writel(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_2); + iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_2); hmac = le32_to_cpu(fHdr->hmacDigest[3]); - writel(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_3); + iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_3); hmac = le32_to_cpu(fHdr->hmacDigest[4]); - writel(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_4); + iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_4); typhoon_post_pci_writes(ioaddr); - writel(TYPHOON_BOOTCMD_RUNTIME_IMAGE, ioaddr + TYPHOON_REG_COMMAND); + iowrite32(TYPHOON_BOOTCMD_RUNTIME_IMAGE, ioaddr + TYPHOON_REG_COMMAND); image_data += sizeof(struct typhoon_file_header); - /* The readl() in typhoon_wait_interrupt() will force the + /* The ioread32() in typhoon_wait_interrupt() will force the * last write to the command register to post, so * we don't need a typhoon_post_pci_writes() after it. */ @@ -1441,7 +1457,7 @@ len = min_t(u32, section_len, PAGE_SIZE); if(typhoon_wait_interrupt(ioaddr) < 0 || - readl(ioaddr + TYPHOON_REG_STATUS) != + ioread32(ioaddr + TYPHOON_REG_STATUS) != TYPHOON_STATUS_WAITING_FOR_SEGMENT) { printk(KERN_ERR "%s: segment ready timeout\n", tp->name); @@ -1458,13 +1474,14 @@ csum = csum_fold(csum); csum = le16_to_cpu(csum); - writel(len, ioaddr + TYPHOON_REG_BOOT_LENGTH); - writel(csum, ioaddr + TYPHOON_REG_BOOT_CHECKSUM); - writel(load_addr, ioaddr + TYPHOON_REG_BOOT_DEST_ADDR); - writel(0, ioaddr + TYPHOON_REG_BOOT_DATA_HI); - writel(dpage_dma, ioaddr + TYPHOON_REG_BOOT_DATA_LO); + iowrite32(len, ioaddr + TYPHOON_REG_BOOT_LENGTH); + iowrite32(csum, ioaddr + TYPHOON_REG_BOOT_CHECKSUM); + iowrite32(load_addr, + ioaddr + TYPHOON_REG_BOOT_DEST_ADDR); + iowrite32(0, ioaddr + TYPHOON_REG_BOOT_DATA_HI); + iowrite32(dpage_dma, ioaddr + TYPHOON_REG_BOOT_DATA_LO); typhoon_post_pci_writes(ioaddr); - writel(TYPHOON_BOOTCMD_SEG_AVAILABLE, + iowrite32(TYPHOON_BOOTCMD_SEG_AVAILABLE, ioaddr + TYPHOON_REG_COMMAND); image_data += len; @@ -1474,25 +1491,25 @@ } if(typhoon_wait_interrupt(ioaddr) < 0 || - readl(ioaddr + TYPHOON_REG_STATUS) != + ioread32(ioaddr + TYPHOON_REG_STATUS) != TYPHOON_STATUS_WAITING_FOR_SEGMENT) { printk(KERN_ERR "%s: final segment ready timeout\n", tp->name); goto err_out_irq; } - writel(TYPHOON_BOOTCMD_DNLD_COMPLETE, ioaddr + TYPHOON_REG_COMMAND); + iowrite32(TYPHOON_BOOTCMD_DNLD_COMPLETE, ioaddr + TYPHOON_REG_COMMAND); if(typhoon_wait_status(ioaddr, TYPHOON_STATUS_WAITING_FOR_BOOT) < 0) { printk(KERN_ERR "%s: boot ready timeout, status 0x%0x\n", - tp->name, readl(ioaddr + TYPHOON_REG_STATUS)); + tp->name, ioread32(ioaddr + TYPHOON_REG_STATUS)); goto err_out_irq; } err = 0; err_out_irq: - writel(irqMasked, ioaddr + TYPHOON_REG_INTR_MASK); - writel(irqEnabled, ioaddr + TYPHOON_REG_INTR_ENABLE); + iowrite32(irqMasked, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(irqEnabled, ioaddr + TYPHOON_REG_INTR_ENABLE); pci_free_consistent(pdev, PAGE_SIZE, dpage, dpage_dma); @@ -1510,24 +1527,25 @@ goto out_timeout; } - writel(0, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_HI); - writel(tp->shared_dma, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_LO); + iowrite32(0, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_HI); + iowrite32(tp->shared_dma, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_LO); typhoon_post_pci_writes(ioaddr); - writel(TYPHOON_BOOTCMD_REG_BOOT_RECORD, ioaddr + TYPHOON_REG_COMMAND); + iowrite32(TYPHOON_BOOTCMD_REG_BOOT_RECORD, + ioaddr + TYPHOON_REG_COMMAND); if(typhoon_wait_status(ioaddr, TYPHOON_STATUS_RUNNING) < 0) { printk(KERN_ERR "%s: boot finish timeout (status 0x%x)\n", - tp->name, readl(ioaddr + TYPHOON_REG_STATUS)); + tp->name, ioread32(ioaddr + TYPHOON_REG_STATUS)); goto out_timeout; } /* Clear the Transmit and Command ready registers */ - writel(0, ioaddr + TYPHOON_REG_TX_HI_READY); - writel(0, ioaddr + TYPHOON_REG_CMD_READY); - writel(0, ioaddr + TYPHOON_REG_TX_LO_READY); + iowrite32(0, ioaddr + TYPHOON_REG_TX_HI_READY); + iowrite32(0, ioaddr + TYPHOON_REG_CMD_READY); + iowrite32(0, ioaddr + TYPHOON_REG_TX_LO_READY); typhoon_post_pci_writes(ioaddr); - writel(TYPHOON_BOOTCMD_BOOT, ioaddr + TYPHOON_REG_COMMAND); + iowrite32(TYPHOON_BOOTCMD_BOOT, ioaddr + TYPHOON_REG_COMMAND); return 0; @@ -1806,7 +1824,8 @@ if(done) { netif_rx_complete(dev); - writel(TYPHOON_INTR_NONE, tp->ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_NONE, + tp->ioaddr + TYPHOON_REG_INTR_MASK); typhoon_post_pci_writes(tp->ioaddr); } @@ -1821,14 +1840,14 @@ void __iomem *ioaddr = tp->ioaddr; u32 intr_status; - intr_status = readl(ioaddr + TYPHOON_REG_INTR_STATUS); + intr_status = ioread32(ioaddr + TYPHOON_REG_INTR_STATUS); if(!(intr_status & TYPHOON_INTR_HOST_INT)) return IRQ_NONE; - writel(intr_status, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(intr_status, ioaddr + TYPHOON_REG_INTR_STATUS); if(netif_rx_schedule_prep(dev)) { - writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); typhoon_post_pci_writes(ioaddr); __netif_rx_schedule(dev); } else { @@ -1855,7 +1874,7 @@ } static int -typhoon_sleep(struct typhoon *tp, int state, u16 events) +typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events) { struct pci_dev *pdev = tp->pdev; void __iomem *ioaddr = tp->ioaddr; @@ -1905,7 +1924,7 @@ * we can download the Runtime Image. But let's not make users of * the old firmware pay for the reset. */ - writel(TYPHOON_BOOTCMD_WAKEUP, ioaddr + TYPHOON_REG_COMMAND); + iowrite32(TYPHOON_BOOTCMD_WAKEUP, ioaddr + TYPHOON_REG_COMMAND); if(typhoon_wait_status(ioaddr, TYPHOON_STATUS_WAITING_FOR_HOST) < 0 || (tp->capabilities & TYPHOON_WAKEUP_NEEDS_RESET)) return typhoon_reset(ioaddr, wait_type); @@ -1994,8 +2013,8 @@ tp->card_state = Running; smp_wmb(); - writel(TYPHOON_INTR_ENABLE_ALL, ioaddr + TYPHOON_REG_INTR_ENABLE); - writel(TYPHOON_INTR_NONE, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_ENABLE_ALL, ioaddr + TYPHOON_REG_INTR_ENABLE); + iowrite32(TYPHOON_INTR_NONE, ioaddr + TYPHOON_REG_INTR_MASK); typhoon_post_pci_writes(ioaddr); return 0; @@ -2020,7 +2039,7 @@ * when called with !netif_running(). This will be posted * when we force the posting of the command. */ - writel(TYPHOON_INTR_NONE, ioaddr + TYPHOON_REG_INTR_ENABLE); + iowrite32(TYPHOON_INTR_NONE, ioaddr + TYPHOON_REG_INTR_ENABLE); INIT_COMMAND_NO_RESPONSE(&xp_cmd, TYPHOON_CMD_RX_DISABLE); typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); @@ -2136,7 +2155,7 @@ goto out; } - if(typhoon_sleep(tp, 3, 0) < 0) + if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) printk(KERN_ERR "%s: unable to go back to sleep\n", dev->name); out: @@ -2163,7 +2182,7 @@ if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) printk(KERN_ERR "%s: unable to boot sleep image\n", dev->name); - if(typhoon_sleep(tp, 3, 0) < 0) + if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) printk(KERN_ERR "%s: unable to put card to sleep\n", dev->name); return 0; @@ -2203,7 +2222,7 @@ } static int -typhoon_suspend(struct pci_dev *pdev, u32 state) +typhoon_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct typhoon *tp = netdev_priv(dev); @@ -2275,14 +2294,59 @@ #endif static int __devinit +typhoon_test_mmio(struct pci_dev *pdev) +{ + void __iomem *ioaddr = pci_iomap(pdev, 1, 128); + int mode = 0; + u32 val; + + if(!ioaddr) + goto out; + + if(ioread32(ioaddr + TYPHOON_REG_STATUS) != + TYPHOON_STATUS_WAITING_FOR_HOST) + goto out_unmap; + + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_ENABLE); + + /* Ok, see if we can change our interrupt status register by + * sending ourselves an interrupt. If so, then MMIO works. + * The 50usec delay is arbitrary -- it could probably be smaller. + */ + val = ioread32(ioaddr + TYPHOON_REG_INTR_STATUS); + if((val & TYPHOON_INTR_SELF) == 0) { + iowrite32(1, ioaddr + TYPHOON_REG_SELF_INTERRUPT); + ioread32(ioaddr + TYPHOON_REG_INTR_STATUS); + udelay(50); + val = ioread32(ioaddr + TYPHOON_REG_INTR_STATUS); + if(val & TYPHOON_INTR_SELF) + mode = 1; + } + + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK); + iowrite32(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS); + iowrite32(TYPHOON_INTR_NONE, ioaddr + TYPHOON_REG_INTR_ENABLE); + ioread32(ioaddr + TYPHOON_REG_INTR_STATUS); + +out_unmap: + pci_iounmap(pdev, ioaddr); + +out: + if(!mode) + printk(KERN_INFO PFX "falling back to port IO\n"); + return mode; +} + +static int __devinit typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { static int did_version = 0; struct net_device *dev; struct typhoon *tp; int card_id = (int) ent->driver_data; - unsigned long ioaddr; - void __iomem *ioaddr_mapped; + void __iomem *ioaddr; void *shared; dma_addr_t shared_dma; struct cmd_desc xp_cmd; @@ -2323,8 +2387,21 @@ goto error_out_mwi; } - /* sanity checks, resource #1 is our mmio area + /* sanity checks on IO and MMIO BARs */ + if(!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) { + printk(ERR_PFX + "%s: region #1 not a PCI IO resource, aborting\n", + pci_name(pdev)); + err = -ENODEV; + goto error_out_mwi; + } + if(pci_resource_len(pdev, 0) < 128) { + printk(ERR_PFX "%s: Invalid PCI IO region size, aborting\n", + pci_name(pdev)); + err = -ENODEV; + goto error_out_mwi; + } if(!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { printk(ERR_PFX "%s: region #1 not a PCI MMIO resource, aborting\n", @@ -2346,12 +2423,14 @@ goto error_out_mwi; } - /* map our MMIO region + /* map our registers */ - ioaddr = pci_resource_start(pdev, 1); - ioaddr_mapped = ioremap(ioaddr, 128); - if (!ioaddr_mapped) { - printk(ERR_PFX "%s: cannot remap MMIO, aborting\n", + if(use_mmio != 0 && use_mmio != 1) + use_mmio = typhoon_test_mmio(pdev); + + ioaddr = pci_iomap(pdev, use_mmio, 128); + if (!ioaddr) { + printk(ERR_PFX "%s: cannot remap registers, aborting\n", pci_name(pdev)); err = -EIO; goto error_out_regions; @@ -2374,13 +2453,10 @@ tp->shared_dma = shared_dma; tp->pdev = pdev; tp->tx_pdev = pdev; - tp->ioaddr = ioaddr_mapped; - tp->tx_ioaddr = ioaddr_mapped; + tp->ioaddr = ioaddr; + tp->tx_ioaddr = ioaddr; tp->dev = dev; - /* need to be able to restore PCI state after a suspend */ - pci_save_state(pdev); - /* Init sequence: * 1) Reset the adapter to clear any bad juju * 2) Reload the sleep image @@ -2388,16 +2464,18 @@ * 4) Get the hardware address. * 5) Put the card to sleep. */ - if (typhoon_reset(ioaddr_mapped, WaitSleep) < 0) { + if (typhoon_reset(ioaddr, WaitSleep) < 0) { printk(ERR_PFX "%s: could not reset 3XP\n", pci_name(pdev)); err = -EIO; goto error_out_dma; } /* Now that we've reset the 3XP and are sure it's not going to - * write all over memory, enable bus mastering. + * write all over memory, enable bus mastering, and save our + * state for resuming after a suspend. */ pci_set_master(pdev); + pci_save_state(pdev); /* dev->name is not valid until we register, but we need to * use some common routines to initialize the card. So that those @@ -2438,7 +2516,7 @@ INIT_COMMAND_WITH_RESPONSE(&xp_cmd, TYPHOON_CMD_READ_VERSIONS); if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) { printk(ERR_PFX "%s: Could not get Sleep Image version\n", - pdev->slot_name); + pci_name(pdev)); goto error_out_reset; } @@ -2454,7 +2532,7 @@ if(xp_resp[0].numDesc != 0) tp->capabilities |= TYPHOON_WAKEUP_NEEDS_RESET; - if(typhoon_sleep(tp, 3, 0) < 0) { + if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) { printk(ERR_PFX "%s: cannot put adapter to sleep\n", pci_name(pdev)); err = -EIO; @@ -2491,8 +2569,9 @@ pci_set_drvdata(pdev, dev); - printk(KERN_INFO "%s: %s at 0x%lx, ", - dev->name, typhoon_card_info[card_id].name, ioaddr); + printk(KERN_INFO "%s: %s at %s 0x%lx, ", + dev->name, typhoon_card_info[card_id].name, + use_mmio ? "MMIO" : "IO", pci_resource_start(pdev, use_mmio)); for(i = 0; i < 5; i++) printk("%2.2x:", dev->dev_addr[i]); printk("%2.2x\n", dev->dev_addr[i]); @@ -2515,7 +2594,8 @@ u8 *ver_string = (u8 *) &xp_resp[1]; ver_string[25] = 0; printk(KERN_INFO "%s: Typhoon 1.1+ Sleep Image version " - "%u.%u.%u.%u %s\n", dev->name, HIPQUAD(sleep_ver), + "%02x.%03x.%03x %s\n", dev->name, sleep_ver >> 24, + (sleep_ver >> 12) & 0xfff, sleep_ver & 0xfff, ver_string); } else { printk(KERN_WARNING "%s: Unknown Sleep Image version " @@ -2526,13 +2606,13 @@ return 0; error_out_reset: - typhoon_reset(ioaddr_mapped, NoWait); + typhoon_reset(ioaddr, NoWait); error_out_dma: pci_free_consistent(pdev, sizeof(struct typhoon_shared), shared, shared_dma); error_out_remap: - iounmap(ioaddr_mapped); + pci_iounmap(pdev, ioaddr); error_out_regions: pci_release_regions(pdev); error_out_mwi: @@ -2555,7 +2635,7 @@ pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); typhoon_reset(tp->ioaddr, NoWait); - iounmap(tp->ioaddr); + pci_iounmap(pdev, tp->ioaddr); pci_free_consistent(pdev, sizeof(struct typhoon_shared), tp->shared, tp->shared_dma); pci_release_regions(pdev); diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/via-rhine.c 2005-03-07 14:54:18 -08:00 @@ -1937,7 +1937,7 @@ } #ifdef CONFIG_PM -static int rhine_suspend(struct pci_dev *pdev, u32 state) +static int rhine_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct rhine_private *rp = netdev_priv(dev); diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/via-velocity.c 2005-03-07 14:54:17 -08:00 @@ -263,7 +263,7 @@ #ifdef CONFIG_PM -static int velocity_suspend(struct pci_dev *pdev, u32 state); +static int velocity_suspend(struct pci_dev *pdev, pm_message_t state); static int velocity_resume(struct pci_dev *pdev); static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr); @@ -2898,7 +2898,7 @@ struct velocity_info *vptr = dev->priv; strcpy(info->driver, VELOCITY_NAME); strcpy(info->version, VELOCITY_VERSION); - strcpy(info->bus_info, vptr->pdev->slot_name); + strcpy(info->bus_info, pci_name(vptr->pdev)); } static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) @@ -3210,7 +3210,7 @@ return 0; } -static int velocity_suspend(struct pci_dev *pdev, u32 state) +static int velocity_suspend(struct pci_dev *pdev, pm_message_t state) { struct velocity_info *vptr = pci_get_drvdata(pdev); unsigned long flags; diff -Nru a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig --- a/drivers/net/wan/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/wan/Kconfig 2005-03-07 14:54:16 -08:00 @@ -155,7 +155,8 @@ Network) card supported by this driver and you are planning to connect the box to a WAN. - You will need supporting software from . + You will need supporting software from + . Generic HDLC driver currently supports raw HDLC, Cisco HDLC, Frame Relay, synchronous Point-to-Point Protocol (PPP) and X.25. @@ -225,7 +226,7 @@ Driver for PCI200SYN cards by Goramo sp. j. If you have such a card, say Y here and see - . + . To compile this as a module, choose M here: the module will be called pci200syn. @@ -239,7 +240,7 @@ Driver for wanXL PCI cards by SBE Inc. If you have such a card, say Y here and see - . + . To compile this as a module, choose M here: the module will be called wanxl. @@ -292,7 +293,7 @@ SDL Communications Inc. If you have such a card, say Y here and see - . + . Note that N2csu and N2dds cards are not supported by this driver. @@ -308,7 +309,7 @@ Driver for C101 SuperSync ISA cards by Moxa Technologies Co., Ltd. If you have such a card, say Y here and see - + . To compile this driver as a module, choose M here: the module will be called c101. diff -Nru a/drivers/net/wan/hd6457x.c b/drivers/net/wan/hd6457x.c --- a/drivers/net/wan/hd6457x.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/wan/hd6457x.c 2005-03-07 14:54:16 -08:00 @@ -315,7 +315,7 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->dev->last_rx = jiffies; + dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); } diff -Nru a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c --- a/drivers/net/wan/sbni.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/wan/sbni.c 2005-03-07 14:54:16 -08:00 @@ -176,7 +176,7 @@ #ifndef MODULE typedef u32 iarr[]; -static iarr *dest[5] = { &io, &irq, &baud, &rxl, &mac }; +static iarr __initdata *dest[5] = { &io, &irq, &baud, &rxl, &mac }; #endif /* A zero-terminated list of I/O addresses to be probed on ISA bus */ diff -Nru a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c --- a/drivers/net/wan/wanxl.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/net/wan/wanxl.c 2005-03-07 14:54:18 -08:00 @@ -72,7 +72,7 @@ u8 irq; u8 __iomem *plx; /* PLX PCI9060 virtual base address */ - struct pci_dev *pdev; /* for pdev->slot_name */ + struct pci_dev *pdev; /* for pci_name(pdev) */ int rx_in; struct sk_buff *rx_skbs[RX_QUEUE_LENGTH]; card_status_t *status; /* shared between host and card */ @@ -88,12 +88,6 @@ } -static inline const char* card_name(struct pci_dev *pdev) -{ - return pdev->slot_name; -} - - static inline port_status_t* get_status(port_t *port) { return &port->card->status->port_status[port->node]; @@ -107,7 +101,7 @@ dma_addr_t addr = pci_map_single(pdev, ptr, size, direction); if (addr + size > 0x100000000LL) printk(KERN_CRIT "wanXL %s: pci_map_single() returned memory" - " at 0x%LX!\n", card_name(pdev), + " at 0x%LX!\n", pci_name(pdev), (unsigned long long)addr); return addr; } @@ -201,7 +195,7 @@ desc->stat != PACKET_EMPTY) { if ((desc->stat & PACKET_PORT_MASK) > card->n_ports) printk(KERN_CRIT "wanXL %s: received packet for" - " nonexistent port\n", card_name(card->pdev)); + " nonexistent port\n", pci_name(card->pdev)); else { struct sk_buff *skb = card->rx_skbs[card->rx_in]; port_t *port = &card->ports[desc->stat & @@ -604,7 +598,7 @@ card = kmalloc(alloc_size, GFP_KERNEL); if (card == NULL) { printk(KERN_ERR "wanXL %s: unable to allocate memory\n", - card_name(pdev)); + pci_name(pdev)); pci_release_regions(pdev); pci_disable_device(pdev); return -ENOBUFS; @@ -623,7 +617,7 @@ #ifdef DEBUG_PCI printk(KERN_DEBUG "wanXL %s: pci_alloc_consistent() returned memory" - " at 0x%LX\n", card_name(pdev), + " at 0x%LX\n", pci_name(pdev), (unsigned long long)card->status_address); #endif @@ -649,7 +643,7 @@ while ((stat = readl(card->plx + PLX_MAILBOX_0)) != 0) { if (time_before(timeout, jiffies)) { printk(KERN_WARNING "wanXL %s: timeout waiting for" - " PUTS to complete\n", card_name(pdev)); + " PUTS to complete\n", pci_name(pdev)); wanxl_pci_remove_one(pdev); return -ENODEV; } @@ -661,7 +655,7 @@ default: printk(KERN_WARNING "wanXL %s: PUTS test 0x%X" - " failed\n", card_name(pdev), stat & 0x30); + " failed\n", pci_name(pdev), stat & 0x30); wanxl_pci_remove_one(pdev); return -ENODEV; } @@ -681,7 +675,7 @@ (TX_BUFFERS + RX_BUFFERS) * BUFFER_LENGTH * ports) { printk(KERN_WARNING "wanXL %s: no enough on-board RAM" " (%u bytes detected, %u bytes required)\n", - card_name(pdev), ramsize, BUFFERS_ADDR + + pci_name(pdev), ramsize, BUFFERS_ADDR + (TX_BUFFERS + RX_BUFFERS) * BUFFER_LENGTH * ports); wanxl_pci_remove_one(pdev); return -ENODEV; @@ -689,7 +683,7 @@ if (wanxl_puts_command(card, MBX1_CMD_BSWAP)) { printk(KERN_WARNING "wanXL %s: unable to Set Byte Swap" - " Mode\n", card_name(pdev)); + " Mode\n", pci_name(pdev)); wanxl_pci_remove_one(pdev); return -ENODEV; } @@ -720,7 +714,7 @@ if (wanxl_puts_command(card, MBX1_CMD_ABORTJ)) { printk(KERN_WARNING "wanXL %s: unable to Abort and Jump\n", - card_name(pdev)); + pci_name(pdev)); wanxl_pci_remove_one(pdev); return -ENODEV; } @@ -735,7 +729,7 @@ if (!stat) { printk(KERN_WARNING "wanXL %s: timeout while initializing card" - "firmware\n", card_name(pdev)); + "firmware\n", pci_name(pdev)); wanxl_pci_remove_one(pdev); return -ENODEV; } @@ -745,12 +739,12 @@ #endif printk(KERN_INFO "wanXL %s: at 0x%X, %u KB of RAM at 0x%X, irq %u\n", - card_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); + pci_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); /* Allocate IRQ */ if (request_irq(pdev->irq, wanxl_intr, SA_SHIRQ, "wanXL", card)) { printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n", - card_name(pdev), pdev->irq); + pci_name(pdev), pdev->irq); wanxl_pci_remove_one(pdev); return -EBUSY; } @@ -762,7 +756,7 @@ struct net_device *dev = alloc_hdlcdev(port); if (!dev) { printk(KERN_ERR "wanXL %s: unable to allocate" - " memory\n", card_name(pdev)); + " memory\n", pci_name(pdev)); wanxl_pci_remove_one(pdev); return -ENOMEM; } @@ -783,7 +777,7 @@ get_status(port)->clocking = CLOCK_EXT; if (register_hdlc_device(dev)) { printk(KERN_ERR "wanXL %s: unable to register hdlc" - " device\n", card_name(pdev)); + " device\n", pci_name(pdev)); free_netdev(dev); wanxl_pci_remove_one(pdev); return -ENOBUFS; @@ -791,7 +785,7 @@ card->n_ports++; } - printk(KERN_INFO "wanXL %s: port", card_name(pdev)); + printk(KERN_INFO "wanXL %s: port", pci_name(pdev)); for (i = 0; i < ports; i++) printk("%s #%i: %s", i ? "," : "", i, card->ports[i].dev->name); diff -Nru a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c --- a/drivers/net/wan/z85230.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/wan/z85230.c 2005-03-07 14:54:16 -08:00 @@ -734,7 +734,7 @@ u8 intr; static volatile int locker=0; int work=0; - struct z8530_irqhandler *irqs=dev->chanA.irqs; + struct z8530_irqhandler *irqs; if(locker) { @@ -758,6 +758,8 @@ /* Now walk the chip and see what it is wanting - it may be an IRQ for someone else remember */ + irqs=dev->chanA.irqs; + if(intr & (CHARxIP|CHATxIP|CHAEXT)) { if(intr&CHARxIP) diff -Nru a/drivers/net/wireless/arlan.h b/drivers/net/wireless/arlan.h --- a/drivers/net/wireless/arlan.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/wireless/arlan.h 2005-03-07 14:54:17 -08:00 @@ -43,8 +43,8 @@ extern int init_arlan_proc(void); extern void cleanup_arlan_proc(void); #else -#define init_arlan_proc() (0) -#define cleanup_arlan_proc() do { } while (0); +#define init_arlan_proc() ({ 0; }) +#define cleanup_arlan_proc() do { } while (0) #endif extern struct net_device *arlan_device[MAX_ARLANS]; diff -Nru a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c --- a/drivers/net/wireless/atmel.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/net/wireless/atmel.c 2005-03-07 14:54:16 -08:00 @@ -69,6 +69,7 @@ #include #include #include "ieee802_11.h" +#include "atmel.h" #define DRIVER_MAJOR 0 #define DRIVER_MINOR 96 @@ -83,6 +84,23 @@ static char *firmware = NULL; module_param(firmware, charp, 0); +/* table of firmware file names */ +static struct { + AtmelFWType fw_type; + const char *fw_file; + const char *fw_file_ext; +} fw_table[] = { + { ATMEL_FW_TYPE_502, "atmel_at76c502", "bin" }, + { ATMEL_FW_TYPE_502D, "atmel_at76c502d", "bin" }, + { ATMEL_FW_TYPE_502E, "atmel_at76c502e", "bin" }, + { ATMEL_FW_TYPE_502_3COM, "atmel_at76c502_3com", "bin" }, + { ATMEL_FW_TYPE_504, "atmel_at76c504", "bin" }, + { ATMEL_FW_TYPE_504_2958, "atmel_at76c504_2958", "bin" }, + { ATMEL_FW_TYPE_504A_2958,"atmel_at76c504a_2958","bin" }, + { ATMEL_FW_TYPE_506, "atmel_at76c506", "bin" }, + { ATMEL_FW_TYPE_NONE, NULL, NULL } +}; + #define MAX_SSID_LENGTH 32 #define MGMT_JIFFIES (256 * HZ / 100) @@ -458,8 +476,8 @@ void *card; /* Bus dependent stucture varies for PCcard */ int (*present_callback)(void *); /* And callback which uses it */ char firmware_id[32]; - char firmware_template[32]; - unsigned char *firmware; + AtmelFWType firmware_type; + u8 *firmware; int firmware_length; struct timer_list management_timer; struct net_device *dev; @@ -1293,17 +1311,21 @@ if (priv->operating_mode == IW_MODE_INFRA) { if (priv->station_state != STATION_STATE_READY) { priv->wstats.qual.qual = 0; - priv->wstats.qual.level = 0; + priv->wstats.qual.level = 0; + priv->wstats.qual.updated = (IW_QUAL_QUAL_INVALID + | IW_QUAL_LEVEL_INVALID); } priv->wstats.qual.noise = 0; - priv->wstats.qual.updated = 7; + priv->wstats.qual.updated |= IW_QUAL_NOISE_INVALID; } else { /* Quality levels cannot be determined in ad-hoc mode, because we can 'hear' more that one remote station. */ priv->wstats.qual.qual = 0; priv->wstats.qual.level = 0; priv->wstats.qual.noise = 0; - priv->wstats.qual.updated = 0; + priv->wstats.qual.updated = IW_QUAL_QUAL_INVALID + | IW_QUAL_LEVEL_INVALID + | IW_QUAL_NOISE_INVALID; priv->wstats.miss.beacon = 0; } @@ -1482,7 +1504,7 @@ return len; } -struct net_device *init_atmel_card( unsigned short irq, int port, char *firmware_id, +struct net_device *init_atmel_card( unsigned short irq, int port, const AtmelFWType fw_type, struct device *sys_dev, int (*card_present)(void *), void *card) { struct net_device *dev; @@ -1507,11 +1529,9 @@ priv->card = card; priv->firmware = NULL; priv->firmware_id[0] = '\0'; - priv->firmware_template[0] = '\0'; + priv->firmware_type = fw_type; if (firmware) /* module parameter */ strcpy(priv->firmware_id, firmware); - else if (firmware_id) /* from PCMCIA card-matching or PCI */ - strcpy(priv->firmware_template, firmware_id); priv->bus_type = card_present ? BUS_TYPE_PCCARD : BUS_TYPE_PCI; priv->station_state = STATION_STATE_DOWN; priv->do_rx_crc = 0; @@ -1579,6 +1599,8 @@ dev->irq = irq; dev->base_addr = port; + SET_NETDEV_DEV(dev, sys_dev); + if ((rc = request_irq(dev->irq, service_interrupt, SA_SHIRQ, dev->name, dev))) { printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc ); goto err_out_free; @@ -2218,6 +2240,13 @@ range->max_qual.qual = 100; range->max_qual.level = 100; range->max_qual.noise = 0; + range->max_qual.updated = IW_QUAL_NOISE_INVALID; + + range->avg_qual.qual = 50; + range->avg_qual.level = 50; + range->avg_qual.noise = 0; + range->avg_qual.updated = IW_QUAL_NOISE_INVALID; + range->sensitivity = 0; range->bitrate[0] = 1000000; @@ -2247,9 +2276,6 @@ range->r_time_flags = 0; range->min_retry = 1; range->max_retry = 65535; - range->avg_qual.qual = 50; - range->avg_qual.level = 50; - range->avg_qual.noise = 0; return 0; } @@ -3025,16 +3051,23 @@ static void smooth_rssi(struct atmel_private *priv, u8 rssi) { u8 old = priv->wstats.qual.level; + u8 max_rssi = 42; /* 502-rmfd-revd max by experiment, default for now */ - /* 502-rmfd-revd gives max signal level as 42, by experiment. - This is going to break for other hardware variants. */ + switch (priv->firmware_type) { + case ATMEL_FW_TYPE_502E: + max_rssi = 63; /* 502-rmfd-reve max by experiment */ + break; + default: + break; + } - rssi = rssi * 100 / 42; + rssi = rssi * 100 / max_rssi; if((rssi + old) % 2) priv->wstats.qual.level = ((rssi + old)/2) + 1; else priv->wstats.qual.level = ((rssi + old)/2); - + priv->wstats.qual.updated |= IW_QUAL_LEVEL_UPDATED; + priv->wstats.qual.updated &= ~IW_QUAL_LEVEL_INVALID; } static void atmel_smooth_qual(struct atmel_private *priv) @@ -3047,8 +3080,10 @@ priv->beacons_this_sec * priv->beacon_period * (priv->wstats.qual.level + 100) / 4000; priv->beacons_this_sec = 0; } + priv->wstats.qual.updated |= IW_QUAL_QUAL_UPDATED; + priv->wstats.qual.updated &= ~IW_QUAL_QUAL_INVALID; } - + /* deals with incoming managment frames. */ static void atmel_management_frame(struct atmel_private *priv, struct ieee802_11_hdr *header, u16 frame_len, u8 rssi) @@ -3611,8 +3646,8 @@ const struct firmware *fw_entry = NULL; unsigned char *fw; int len = priv->firmware_length; - if (!(fw = priv->firmware)) { - if (strlen(priv->firmware_template) == 0) { + if (!(fw = priv->firmware)) { + if (priv->firmware_type == ATMEL_FW_TYPE_NONE) { if (strlen(priv->firmware_id) == 0) { printk(KERN_INFO "%s: card type is unknown: assuming at76c502 firmware is OK.\n", @@ -3627,24 +3662,36 @@ "%s: firmware %s is missing, cannot continue.\n", dev->name, priv->firmware_id); return 0; - - } + } } else { - int i; + int fw_index = 0; + int success = 0; + + /* get firmware filename entry based on firmware type ID */ + while (fw_table[fw_index].fw_type != priv->firmware_type + && fw_table[fw_index].fw_type != ATMEL_FW_TYPE_NONE) + fw_index++; - for (i = 0; firmware_modifier[i]; i++) { - sprintf(priv->firmware_id, priv->firmware_template, firmware_modifier[i]); - if (request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev) == 0) - break; + /* construct the actual firmware file name */ + if (fw_table[fw_index].fw_type != ATMEL_FW_TYPE_NONE) { + int i; + for (i = 0; firmware_modifier[i]; i++) { + snprintf(priv->firmware_id, 32, "%s%s.%s", fw_table[fw_index].fw_file, + firmware_modifier[i], fw_table[fw_index].fw_file_ext); + priv->firmware_id[31] = '\0'; + if (request_firmware(&fw_entry, priv->firmware_id, priv->sys_dev) == 0) { + success = 1; + break; + } + } } - if (!firmware_modifier[i]) { + if (!success) { printk(KERN_ALERT "%s: firmware %s is missing, cannot start.\n", dev->name, priv->firmware_id); priv->firmware_id[0] = '\0'; return 0; } - priv->firmware_template[0] = '\0'; } fw = fw_entry->data; diff -Nru a/drivers/net/wireless/atmel.h b/drivers/net/wireless/atmel.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/net/wireless/atmel.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,43 @@ +/*** -*- linux-c -*- ********************************************************** + + Driver for Atmel at76c502 at76c504 and at76c506 wireless cards. + + Copyright 2005 Dan Williams and Red Hat, 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. + + This software 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 Atmel wireless lan drivers; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +******************************************************************************/ + +#ifndef _ATMEL_H +#define _ATMEL_H + +typedef enum { + ATMEL_FW_TYPE_NONE = 0, + ATMEL_FW_TYPE_502, + ATMEL_FW_TYPE_502D, + ATMEL_FW_TYPE_502E, + ATMEL_FW_TYPE_502_3COM, + ATMEL_FW_TYPE_504, + ATMEL_FW_TYPE_504_2958, + ATMEL_FW_TYPE_504A_2958, + ATMEL_FW_TYPE_506 +} AtmelFWType; + +struct net_device *init_atmel_card(unsigned short, int, const AtmelFWType, struct device *, + int (*present_func)(void *), void * ); +void stop_atmel_card( struct net_device *, int ); +int atmel_open( struct net_device * ); + +#endif diff -Nru a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c --- a/drivers/net/wireless/atmel_cs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/wireless/atmel_cs.c 2005-03-07 14:54:17 -08:00 @@ -55,6 +55,7 @@ #include #include +#include "atmel.h" /* All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If @@ -90,11 +91,6 @@ event handler. */ -struct net_device *init_atmel_card(int, int, char *, struct device *, - int (*present_func)(void *), void * ); -void stop_atmel_card( struct net_device *, int ); -int atmel_open( struct net_device * ); - static void atmel_config(dev_link_t *link); static void atmel_release(dev_link_t *link); static int atmel_event(event_t event, int priority, @@ -307,28 +303,29 @@ static struct { int manf, card; char *ver1; - char *firmware; + AtmelFWType firmware; char *name; } card_table[] = { - { 0, 0, "WLAN/802.11b PC CARD", "atmel_at76c502d%s.bin", "Actiontec 802CAT1" }, - { 0, 0, "ATMEL/AT76C502AR", "atmel_at76c502%s.bin", "NoName-RFMD" }, - { 0, 0, "ATMEL/AT76C502AR_D", "atmel_at76c502d%s.bin", "NoName-revD" }, - { 0, 0, "ATMEL/AT76C502AR_E", "atmel_at76c502e%s.bin", "NoName-revE" }, - { 0, 0, "ATMEL/AT76C504", "atmel_at76c504%s.bin", "NoName-504" }, - { 0, 0, "ATMEL/AT76C504A", "atmel_at76c504a_2958%s.bin", "NoName-504a-2958" }, - { 0, 0, "ATMEL/AT76C504_R", "atmel_at76c504_2958%s.bin", "NoName-504-2958" }, - { MANFID_3COM, 0x0620, NULL, "atmel_at76c502_3com%s.bin", "3com 3CRWE62092B" }, - { MANFID_3COM, 0x0696, NULL, "atmel_at76c502_3com%s.bin", "3com 3CRSHPW196" }, - { 0, 0, "SMC/2632W-V2", "atmel_at76c502%s.bin", "SMC 2632W-V2" }, - { 0, 0, "SMC/2632W", "atmel_at76c502d%s.bin", "SMC 2632W-V3" }, - { 0xd601, 0x0007, NULL, "atmel_at76c502%s.bin", "Sitecom WLAN-011" }, - { 0x01bf, 0x3302, NULL, "atmel_at76c502e%s.bin", "Belkin F5D6020-V2" }, - { 0, 0, "BT/Voyager 1020 Laptop Adapter", "atmel_at76c502%s.bin", "BT Voyager 1020" }, - { 0, 0, "IEEE 802.11b/Wireless LAN PC Card", "atmel_at76c502%s.bin", "Siemens Gigaset PC Card II" }, - { 0, 0, "CNet/CNWLC 11Mbps Wireless PC Card V-5", "atmel_at76c502e%s.bin", "CNet CNWLC-811ARL" }, - { 0, 0, "Wireless/PC_CARD", "atmel_at76c502d%s.bin", "Planet WL-3552" }, - { 0, 0, "OEM/11Mbps Wireless LAN PC Card V-3", "atmel_at76c502%s.bin", "OEM 11Mbps WLAN PCMCIA Card" }, - { 0, 0, "11WAVE/11WP611AL-E", "atmel_at76c502e%s.bin", "11WAVE WaveBuddy" } + { 0, 0, "WLAN/802.11b PC CARD", ATMEL_FW_TYPE_502D, "Actiontec 802CAT1" }, + { 0, 0, "ATMEL/AT76C502AR", ATMEL_FW_TYPE_502, "NoName-RFMD" }, + { 0, 0, "ATMEL/AT76C502AR_D", ATMEL_FW_TYPE_502D, "NoName-revD" }, + { 0, 0, "ATMEL/AT76C502AR_E", ATMEL_FW_TYPE_502E, "NoName-revE" }, + { 0, 0, "ATMEL/AT76C504", ATMEL_FW_TYPE_504, "NoName-504" }, + { 0, 0, "ATMEL/AT76C504A", ATMEL_FW_TYPE_504A_2958, "NoName-504a-2958" }, + { 0, 0, "ATMEL/AT76C504_R", ATMEL_FW_TYPE_504_2958, "NoName-504-2958" }, + { MANFID_3COM, 0x0620, NULL, ATMEL_FW_TYPE_502_3COM, "3com 3CRWE62092B" }, + { MANFID_3COM, 0x0696, NULL, ATMEL_FW_TYPE_502_3COM, "3com 3CRSHPW196" }, + { 0, 0, "SMC/2632W-V2", ATMEL_FW_TYPE_502, "SMC 2632W-V2" }, + { 0, 0, "SMC/2632W", ATMEL_FW_TYPE_502D, "SMC 2632W-V3" }, + { 0xd601, 0x0007, NULL, ATMEL_FW_TYPE_502, "Sitecom WLAN-011" }, + { 0x01bf, 0x3302, NULL, ATMEL_FW_TYPE_502E, "Belkin F5D6020-V2" }, + { 0, 0, "BT/Voyager 1020 Laptop Adapter", ATMEL_FW_TYPE_502, "BT Voyager 1020" }, + { 0, 0, "IEEE 802.11b/Wireless LAN PC Card", ATMEL_FW_TYPE_502, "Siemens Gigaset PC Card II" }, + { 0, 0, "CNet/CNWLC 11Mbps Wireless PC Card V-5", ATMEL_FW_TYPE_502E, "CNet CNWLC-811ARL" }, + { 0, 0, "Wireless/PC_CARD", ATMEL_FW_TYPE_502D, "Planet WL-3552" }, + { 0, 0, "OEM/11Mbps Wireless LAN PC Card V-3", ATMEL_FW_TYPE_502, "OEM 11Mbps WLAN PCMCIA Card" }, + { 0, 0, "11WAVE/11WP611AL-E", ATMEL_FW_TYPE_502E, "11WAVE WaveBuddy" }, + { 0, 0, "LG/LW2100N", ATMEL_FW_TYPE_502E, "LG LW2100N 11Mbps WLAN PCMCIA Card" }, }; static void atmel_config(dev_link_t *link) @@ -520,7 +517,7 @@ ((local_info_t*)link->priv)->eth_dev = init_atmel_card(link->irq.AssignedIRQ, link->io.BasePort1, - card_index == -1 ? NULL : card_table[card_index].firmware, + card_index == -1 ? ATMEL_FW_TYPE_NONE : card_table[card_index].firmware, &handle_to_dev(handle), card_present, link); diff -Nru a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c --- a/drivers/net/wireless/atmel_pci.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/wireless/atmel_pci.c 2005-03-07 14:54:17 -08:00 @@ -25,6 +25,7 @@ #include #include #include +#include "atmel.h" MODULE_AUTHOR("Simon Kelley"); MODULE_DESCRIPTION("Support for Atmel at76c50x 802.11 wireless ethernet cards."); @@ -40,9 +41,6 @@ static int atmel_pci_probe(struct pci_dev *, const struct pci_device_id *); static void atmel_pci_remove(struct pci_dev *); -struct net_device *init_atmel_card(int, int, char *, struct device *, - int (*present_func)(void *), void * ); -void stop_atmel_card( struct net_device *, int ); static struct pci_driver atmel_driver = { .name = "atmel", @@ -63,7 +61,7 @@ pci_set_master(pdev); dev = init_atmel_card(pdev->irq, pdev->resource[1].start, - "atmel_at76c506%s.bin", + ATMEL_FW_TYPE_506, &pdev->dev, NULL, NULL); if (!dev) return -ENODEV; diff -Nru a/drivers/net/wireless/prism54/isl_38xx.c b/drivers/net/wireless/prism54/isl_38xx.c --- a/drivers/net/wireless/prism54/isl_38xx.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/net/wireless/prism54/isl_38xx.c 2005-03-07 14:54:17 -08:00 @@ -125,11 +125,11 @@ #if VERBOSE > SHOW_ERROR_MESSAGES do_gettimeofday(¤t_time); DEBUG(SHOW_TRACING, "%08li.%08li Device wakeup triggered\n", - current_time.tv_sec, current_time.tv_usec); + current_time.tv_sec, (long)current_time.tv_usec); #endif DEBUG(SHOW_TRACING, "%08li.%08li Device register read %08x\n", - current_time.tv_sec, current_time.tv_usec, + current_time.tv_sec, (long)current_time.tv_usec, readl(device_base + ISL38XX_CTRL_STAT_REG)); udelay(ISL38XX_WRITEIO_DELAY); @@ -139,7 +139,7 @@ do_gettimeofday(¤t_time); DEBUG(SHOW_TRACING, "%08li.%08li Device register abadface\n", - current_time.tv_sec, current_time.tv_usec); + current_time.tv_sec, (long)current_time.tv_usec); #endif /* read the Device Status Register until Sleepmode bit is set */ while (reg = readl(device_base + ISL38XX_CTRL_STAT_REG), @@ -150,7 +150,7 @@ DEBUG(SHOW_TRACING, "%08li.%08li Device register read %08x\n", - current_time.tv_sec, current_time.tv_usec, + current_time.tv_sec, (long)current_time.tv_usec, readl(device_base + ISL38XX_CTRL_STAT_REG)); udelay(ISL38XX_WRITEIO_DELAY); @@ -158,7 +158,7 @@ do_gettimeofday(¤t_time); DEBUG(SHOW_TRACING, "%08li.%08li Device asleep counter %i\n", - current_time.tv_sec, current_time.tv_usec, + current_time.tv_sec, (long)current_time.tv_usec, counter); #endif } @@ -174,7 +174,7 @@ #if VERBOSE > SHOW_ERROR_MESSAGES do_gettimeofday(¤t_time); DEBUG(SHOW_TRACING, "%08li.%08li Device register read %08x\n", - current_time.tv_sec, current_time.tv_usec, reg); + current_time.tv_sec, (long)current_time.tv_usec, reg); #endif } else { /* device is (still) awake */ diff -Nru a/drivers/parisc/Kconfig b/drivers/parisc/Kconfig --- a/drivers/parisc/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/drivers/parisc/Kconfig 2005-03-07 14:54:17 -08:00 @@ -110,6 +110,14 @@ # help # Say Y here for V-class PCI, DMA/IOMMU, IRQ subsystem support. +source "drivers/pcmcia/Kconfig" + +source "drivers/pci/hotplug/Kconfig" + +endmenu + +menu "PA-RISC specific drivers" + config SUPERIO bool "SuperIO (SuckyIO) support" depends on PCI_LBA @@ -144,9 +152,18 @@ If unsure, say Y. -source "drivers/pcmcia/Kconfig" - -source "drivers/pci/hotplug/Kconfig" - +config PDC_STABLE + tristate "PDC Stable Storage support" + depends on SYSFS + default y + help + Say Y here if you want to enable support for accessing Stable Storage + variables (PDC non volatile variables such as Primary Boot Path, + Console Path, Autoboot, Autosearch, etc) through SysFS. + + If unsure, say Y. + + To compile this driver as a module, choose M here. + The module will be called pdc_stable. endmenu diff -Nru a/drivers/parisc/Makefile b/drivers/parisc/Makefile --- a/drivers/parisc/Makefile 2005-03-07 14:54:16 -08:00 +++ b/drivers/parisc/Makefile 2005-03-07 14:54:16 -08:00 @@ -22,5 +22,6 @@ obj-$(CONFIG_SUPERIO) += superio.o obj-$(CONFIG_CHASSIS_LCD_LED) += led.o +obj-$(CONFIG_PDC_STABLE) += pdc_stable.o obj-y += power.o diff -Nru a/drivers/parisc/dino.c b/drivers/parisc/dino.c --- a/drivers/parisc/dino.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/parisc/dino.c 2005-03-07 14:54:16 -08:00 @@ -653,14 +653,13 @@ PCI_INTERRUPT_PIN, 1, &irq_pin); irq_pin = (irq_pin + PCI_SLOT(dev->devfn) - 1) % 4 ; printk(KERN_WARNING "Device %s has undefined IRQ, " - "setting to %d\n", dev->slot_name, - irq_pin); + "setting to %d\n", pci_name(dev), irq_pin); dino_cfg_write(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, 1, irq_pin); dino_assign_irq(dino_dev, irq_pin, &dev->irq); #else dev->irq = 65535; - printk(KERN_WARNING "Device %s has unassigned IRQ\n", dev->slot_name); + printk(KERN_WARNING "Device %s has unassigned IRQ\n", pci_name(dev)); #endif } else { diff -Nru a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c --- a/drivers/parisc/iosapic.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/parisc/iosapic.c 2005-03-07 14:54:18 -08:00 @@ -158,31 +158,9 @@ #ifdef DEBUG_IOSAPIC -static char assert_buf[128]; - -static int -assert_failed (char *a, char *f, int l) -{ - sprintf(assert_buf, - "ASSERT(%s) failed!\nline %d in %s\n", - a, /* assertion text */ - l, /* line number */ - f); /* file name */ - panic(assert_buf); - return 0; -} - -#undef ASSERT -#define ASSERT(EX) { if (!(EX)) assert_failed(# EX, __FILE__, __LINE__); } - #define DBG(x...) printk(x) - #else /* DEBUG_IOSAPIC */ - #define DBG(x...) -#undef ASSERT -#define ASSERT(EX) - #endif /* DEBUG_IOSAPIC */ #ifdef DEBUG_IOSAPIC_IRT @@ -191,6 +169,12 @@ #define DBG_IRT(x...) #endif +#ifdef CONFIG_64BIT +#define COMPARE_IRTE_ADDR(irte, hpa) ((irte)->dest_iosapic_addr == (hpa)) +#else +#define COMPARE_IRTE_ADDR(irte, hpa) \ + ((irte)->dest_iosapic_addr == ((hpa) | 0xffffffff00000000ULL)) +#endif #define IOSAPIC_REG_SELECT 0x00 #define IOSAPIC_REG_WINDOW 0x10 @@ -201,33 +185,18 @@ #define IOSAPIC_IRDT_ENTRY(idx) (0x10+(idx)*2) #define IOSAPIC_IRDT_ENTRY_HI(idx) (0x11+(idx)*2) -static inline unsigned int iosapic_read(unsigned long iosapic, unsigned int reg) +static inline unsigned int iosapic_read(void __iomem *iosapic, unsigned int reg) { writel(reg, iosapic + IOSAPIC_REG_SELECT); return readl(iosapic + IOSAPIC_REG_WINDOW); } -static inline void iosapic_write(unsigned long iosapic, unsigned int reg, u32 val) +static inline void iosapic_write(void __iomem *iosapic, unsigned int reg, u32 val) { writel(reg, iosapic + IOSAPIC_REG_SELECT); writel(val, iosapic + IOSAPIC_REG_WINDOW); } -/* -** GFP_KERNEL includes __GFP_WAIT flag and that may not -** be acceptable. Since this is boot time, we shouldn't have -** to wait ever and this code should (will?) never get called -** from the interrrupt context. -*/ -#define IOSAPIC_KALLOC(a_type, cnt) \ - (a_type *) kmalloc(sizeof(a_type)*(cnt), GFP_KERNEL) -#define IOSAPIC_FREE(addr, f_type, cnt) kfree((void *)addr) - - -#define IOSAPIC_LOCK(lck) spin_lock_irqsave(lck, irqflags) -#define IOSAPIC_UNLOCK(lck) spin_unlock_irqrestore(lck, irqflags) - - #define IOSAPIC_VERSION_MASK 0x000000ff #define IOSAPIC_VERSION(ver) ((int) (ver & IOSAPIC_VERSION_MASK)) @@ -265,52 +234,64 @@ static struct irt_entry *irt_cell; static size_t irt_num_entry; +static struct irt_entry *iosapic_alloc_irt(int num_entries) +{ + unsigned long a; + /* The IRT needs to be 8-byte aligned for the PDC call. + * Normally kmalloc would guarantee larger alignment, but + * if CONFIG_DEBUG_SLAB is enabled, then we can get only + * 4-byte alignment on 32-bit kernels + */ + a = (unsigned long)kmalloc(sizeof(struct irt_entry) * num_entries + 8, GFP_KERNEL); + a = (a + 7) & ~7; + return (struct irt_entry *)a; +} -/* -** iosapic_load_irt -** -** The "Get PCI INT Routing Table Size" option returns the number of -** entries in the PCI interrupt routing table for the cell specified -** in the cell_number argument. The cell number must be for a cell -** within the caller's protection domain. -** -** The "Get PCI INT Routing Table" option returns, for the cell -** specified in the cell_number argument, the PCI interrupt routing -** table in the caller allocated memory pointed to by mem_addr. -** We assume the IRT only contains entries for I/O SAPIC and -** calculate the size based on the size of I/O sapic entries. -** -** The PCI interrupt routing table entry format is derived from the -** IA64 SAL Specification 2.4. The PCI interrupt routing table defines -** the routing of PCI interrupt signals between the PCI device output -** "pins" and the IO SAPICs' input "lines" (including core I/O PCI -** devices). This table does NOT include information for devices/slots -** behind PCI to PCI bridges. See PCI to PCI Bridge Architecture Spec. -** for the architected method of routing of IRQ's behind PPB's. -*/ +/** + * iosapic_load_irt - Fill in the interrupt routing table + * @cell_num: The cell number of the CPU we're currently executing on + * @irt: The address to place the new IRT at + * @return The number of entries found + * + * The "Get PCI INT Routing Table Size" option returns the number of + * entries in the PCI interrupt routing table for the cell specified + * in the cell_number argument. The cell number must be for a cell + * within the caller's protection domain. + * + * The "Get PCI INT Routing Table" option returns, for the cell + * specified in the cell_number argument, the PCI interrupt routing + * table in the caller allocated memory pointed to by mem_addr. + * We assume the IRT only contains entries for I/O SAPIC and + * calculate the size based on the size of I/O sapic entries. + * + * The PCI interrupt routing table entry format is derived from the + * IA64 SAL Specification 2.4. The PCI interrupt routing table defines + * the routing of PCI interrupt signals between the PCI device output + * "pins" and the IO SAPICs' input "lines" (including core I/O PCI + * devices). This table does NOT include information for devices/slots + * behind PCI to PCI bridges. See PCI to PCI Bridge Architecture Spec. + * for the architected method of routing of IRQ's behind PPB's. + */ -static int __init /* return number of entries as success/fail flag */ +static int __init iosapic_load_irt(unsigned long cell_num, struct irt_entry **irt) { long status; /* PDC return value status */ struct irt_entry *table; /* start of interrupt routing tbl */ unsigned long num_entries = 0UL; - ASSERT(NULL != irt); + BUG_ON(!irt); if (is_pdc_pat()) { - /* Use pat pdc routine to get interrupt routing table size */ DBG("calling get_irt_size (cell %ld)\n", cell_num); status = pdc_pat_get_irt_size(&num_entries, cell_num); DBG("get_irt_size: %ld\n", status); - ASSERT(status == PDC_OK); - - /* save the number of entries in the table */ - ASSERT(0UL != num_entries); + BUG_ON(status != PDC_OK); + BUG_ON(num_entries == 0); /* ** allocate memory for interrupt routing table @@ -318,45 +299,47 @@ ** the contents of the table are exclusively ** for I/O sapic devices. */ - table = IOSAPIC_KALLOC(struct irt_entry, num_entries); + table = iosapic_alloc_irt(num_entries); if (table == NULL) { - printk(KERN_WARNING MODULE_NAME ": read_irt : can not alloc mem for IRT\n"); + printk(KERN_WARNING MODULE_NAME ": read_irt : can " + "not alloc mem for IRT\n"); return 0; } /* get PCI INT routing table */ status = pdc_pat_get_irt(table, cell_num); DBG("pdc_pat_get_irt: %ld\n", status); - ASSERT(status == PDC_OK); + WARN_ON(status != PDC_OK); } else { /* ** C3000/J5000 (and similar) platforms with Sprockets PDC ** will return exactly one IRT for all iosapics. ** So if we have one, don't need to get it again. */ - if (NULL != irt_cell) + if (irt_cell) return 0; /* Should be using the Elroy's HPA, but it's ignored anyway */ status = pdc_pci_irt_size(&num_entries, 0); DBG("pdc_pci_irt_size: %ld\n", status); - if (PDC_OK != status) { + if (status != PDC_OK) { /* Not a "legacy" system with I/O SAPIC either */ return 0; } - ASSERT(0UL != num_entries); + BUG_ON(num_entries == 0); - table = IOSAPIC_KALLOC(struct irt_entry, num_entries); - if (table == NULL) { - printk(KERN_WARNING MODULE_NAME ": read_irt : can not alloc mem for IRT\n"); + table = iosapic_alloc_irt(num_entries); + if (!table) { + printk(KERN_WARNING MODULE_NAME ": read_irt : can " + "not alloc mem for IRT\n"); return 0; } /* HPA ignored by this call too. */ status = pdc_pci_irt(num_entries, 0, table); - ASSERT(PDC_OK == status); + BUG_ON(status != PDC_OK); } /* return interrupt table address */ @@ -390,16 +373,10 @@ -void __init -iosapic_init(void) +void __init iosapic_init(void) { unsigned long cell = 0; - /* init global data */ - spin_lock_init(&iosapic_lock); - iosapic_list = (struct iosapic_info *) NULL; - iosapic_count = 0; - DBG("iosapic_init()\n"); #ifdef __LP64__ @@ -414,11 +391,9 @@ } #endif - /* - ** get IRT for this cell. - */ - irt_num_entry = iosapic_load_irt(cell, &irt_cell); - if (0 == irt_num_entry) + /* get interrupt routing table for this cell */ + irt_num_entry = iosapic_load_irt(cell, &irt_cell); + if (irt_num_entry == 0) irt_cell = NULL; /* old PDC w/o iosapic */ } @@ -459,10 +434,7 @@ continue; } - /* - ** Compare: dest_iosapic_addr, src_bus_irq_devno - */ - if (i->dest_iosapic_addr != (u64) ((long) isi->isi_hpa)) + if (!COMPARE_IRTE_ADDR(i, isi->isi_hpa)) continue; if ((i->src_bus_irq_devno & IRT_IRQ_DEVNO_MASK) != irq_devno) @@ -506,10 +478,10 @@ pci_read_config_byte(pcidev, PCI_INTERRUPT_PIN, &intr_pin); - DBG_IRT("iosapic_xlate_pin() SLOT %d pin %d\n", - PCI_SLOT(pcidev->devfn), intr_pin); + DBG_IRT("iosapic_xlate_pin(%s) SLOT %d pin %d\n", + pcidev->slot_name, PCI_SLOT(pcidev->devfn), intr_pin); - if (0 == intr_pin) { + if (intr_pin == 0) { /* The device does NOT support/use IRQ lines. */ return NULL; } @@ -606,7 +578,6 @@ { u32 mode = 0; struct irt_entry *p = vi->irte; - ASSERT(NULL != vi->irte); if ((p->polarity_trigger & IRT_PO_MASK) == IRT_ACTIVE_LO) mode |= IOSAPIC_IRDT_PO_LOW; @@ -619,7 +590,6 @@ ** PA doesn't support EXTINT or LPRIO bits. */ - ASSERT(vi->txn_data); *dp0 = mode | (u32) vi->txn_data; /* @@ -802,22 +772,23 @@ vi->irte = irte; - /* Allocate processor IRQ */ - vi->txn_irq = txn_alloc_irq(); - /* + * Allocate processor IRQ + * * XXX/FIXME The txn_alloc_irq() code and related code should be * moved to enable_irq(). That way we only allocate processor IRQ * bits for devices that actually have drivers claiming them. * Right now we assign an IRQ to every PCI device present, * regardless of whether it's used or not. */ + vi->txn_irq = txn_alloc_irq(8); + if (vi->txn_irq < 0) panic("I/O sapic: couldn't get TXN IRQ\n"); /* enable_irq() will use txn_* to program IRdT */ vi->txn_addr = txn_alloc_addr(vi->txn_irq); - vi->txn_data = txn_alloc_data(vi->txn_irq, 8); + vi->txn_data = txn_alloc_data(vi->txn_irq); vi->eoi_addr = isi->addr + IOSAPIC_REG_EOI; vi->eoi_data = cpu_to_le32(vi->txn_data); @@ -841,10 +812,7 @@ static unsigned int iosapic_rd_version(struct iosapic_info *isi) { - ASSERT(isi); - ASSERT(isi->isi_hpa); - - return iosapic_read(isi->isi_hpa, IOSAPIC_REG_VERSION); + return iosapic_read(isi->addr, IOSAPIC_REG_VERSION); } @@ -866,44 +834,38 @@ int cnt; /* track how many entries we've looked at */ /* - ** Astro based platforms can't support PCI OLARD if they - ** implement the legacy PDC (not PAT). Though Legacy PDC - ** supports an IRT, LBA's with no device under them - ** are *not* listed in the IRT. - ** Search the IRT and ignore iosapic's which aren't - ** in the IRT. - */ - ASSERT(NULL != irte); /* always have built-in devices */ + * Astro based platforms can only support PCI OLARD if they implement + * PAT PDC. Legacy PDC omits LBAs with no PCI devices from the IRT. + * Search the IRT and ignore iosapic's which aren't in the IRT. + */ for (cnt=0; cnt < irt_num_entry; cnt++, irte++) { - ASSERT(IRT_IOSAPIC_TYPE == irte->entry_type); - /* - ** We need sign extension of the hpa on 32-bit kernels. - ** The address in the IRT is *always* 64 bit and really - ** is an unsigned quantity (like all physical addresses). - */ - if (irte->dest_iosapic_addr == (s64) ((long) hpa)) + WARN_ON(IRT_IOSAPIC_TYPE != irte->entry_type); + if (COMPARE_IRTE_ADDR(irte, hpa)) break; } - if (cnt >= irt_num_entry) - return (NULL); + if (cnt >= irt_num_entry) { + DBG("iosapic_register() ignoring 0x%lx (NOT FOUND)\n", hpa); + return NULL; + } - if ((isi = IOSAPIC_KALLOC(struct iosapic_info, 1)) == NULL) { + isi = (struct iosapic_info *)kmalloc(sizeof(struct iosapic_info), GFP_KERNEL); + if (!isi) { BUG(); - return (NULL); + return NULL; } memset(isi, 0, sizeof(struct iosapic_info)); - isi->isi_hpa = hpa; - isi->isi_version = iosapic_rd_version(isi); + isi->addr = ioremap(hpa, 4096); + isi->isi_hpa = hpa; + isi->isi_version = iosapic_rd_version(isi); isi->isi_num_vectors = IOSAPIC_IRDT_MAX_ENTRY(isi->isi_version) + 1; - vip = isi->isi_vector = - IOSAPIC_KALLOC(struct vector_info, isi->isi_num_vectors); - + vip = isi->isi_vector = (struct vector_info *) + kmalloc(sizeof(struct vector_info) * isi->isi_num_vectors, GFP_KERNEL); if (vip == NULL) { - IOSAPIC_FREE(isi, struct iosapic_info, 1); + kfree(isi); return NULL; } @@ -924,7 +886,6 @@ { unsigned int i, *irp = (unsigned int *) irt; - ASSERT(NULL != irt); printk(KERN_DEBUG MODULE_NAME ": Interrupt Routing Table (%lx entries)\n", num_entry); @@ -938,8 +899,6 @@ static void iosapic_prt_vi(struct vector_info *vi) { - ASSERT(NULL != vi); - printk(KERN_DEBUG MODULE_NAME ": vector_info[%d] is at %p\n", vi->irqline, vi); printk(KERN_DEBUG "\t\tstatus: %.4x\n", vi->status); printk(KERN_DEBUG "\t\ttxn_irq: %d\n", vi->txn_irq); @@ -953,10 +912,9 @@ static void iosapic_prt_isi(struct iosapic_info *isi) { - ASSERT(NULL != isi); printk(KERN_DEBUG MODULE_NAME ": io_sapic_info at %p\n", isi); printk(KERN_DEBUG "\t\tisi_hpa: %lx\n", isi->isi_hpa); - printk(KERN_DEBUG "\t\tisi_status: %x\n", isi->isi_status); + printk(KERN_DEBUG "\t\tisi_status: %x\n", isi->isi_status); printk(KERN_DEBUG "\t\tisi_version: %x\n", isi->isi_version); printk(KERN_DEBUG "\t\tisi_vector: %p\n", isi->isi_vector); } diff -Nru a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c --- a/drivers/parisc/lba_pci.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/parisc/lba_pci.c 2005-03-07 14:54:17 -08:00 @@ -51,11 +51,6 @@ #include /* for iosapic_register() */ #include /* read/write stuff */ -#ifndef TRUE -#define TRUE (1 == 1) -#define FALSE (1 == 0) -#endif - #undef DEBUG_LBA /* general stuff */ #undef DEBUG_LBA_PORT /* debug I/O Port access */ #undef DEBUG_LBA_CFG /* debug Config Space Access (ie PCI Bus walk) */ @@ -88,18 +83,6 @@ #define DBG_PAT(x...) #endif -#ifdef DEBUG_LBA -#undef ASSERT -#define ASSERT(expr) \ - if(!(expr)) { \ - printk("\n%s:%d: Assertion " #expr " failed!\n", \ - __FILE__, __LINE__); \ - panic(#expr); \ - } -#else -#define ASSERT(expr) -#endif - /* ** Config accessor functions only pass in the 8-bit bus number and not @@ -184,6 +167,7 @@ /* non-postable I/O port space, densely packed */ #define LBA_PORT_BASE (PCI_F_EXTEND | 0xfee00000UL) +static void __iomem *astro_iop_base; #define ELROY_HVERS 0x782 #define MERCURY_HVERS 0x783 @@ -214,8 +198,8 @@ spinlock_t lba_lock; void *iosapic_obj; -#ifdef CONFIG_PARISC64 - unsigned long iop_base; /* PA_VIEW - for IO port accessor funcs */ +#ifdef CONFIG_64BIT + void __iomem * iop_base; /* PA_VIEW - for IO port accessor funcs */ #endif int flags; /* state/functionality enabled */ @@ -225,15 +209,9 @@ static u32 lba_t32; -/* -** lba "flags" -*/ -#define LBA_FLAG_NO_DMA_DURING_CFG 0x01 +/* lba flags */ #define LBA_FLAG_SKIP_PROBE 0x10 -/* Tape Release 4 == hw_rev 5 */ -#define LBA_TR4PLUS(d) ((d)->hw_rev > 0x4) -#define LBA_DMA_DURING_CFG_DISABLED(d) ((d)->flags & LBA_FLAG_NO_DMA_DURING_CFG) #define LBA_SKIP_PROBE(d) ((d)->flags & LBA_FLAG_SKIP_PROBE) @@ -293,7 +271,7 @@ printk(KERN_DEBUG "(%p)", r->parent); for (i = d; i ; --i) printk(" "); - printk(KERN_DEBUG "%p [%lx,%lx]/%x\n", r, r->start, r->end, (int) r->flags); + printk(KERN_DEBUG "%p [%lx,%lx]/%lx\n", r, r->start, r->end, r->flags); lba_dump_res(r->child, d+2); lba_dump_res(r->sibling, d); } @@ -303,7 +281,7 @@ ** LBA rev 2.0, 2.1, 2.2, and 3.0 bus walks require a complex ** workaround for cfg cycles: ** -- preserve LBA state -** -- LBA_FLAG_NO_DMA_DURING_CFG workaround +** -- prevent any DMA from occurring ** -- turn on smart mode ** -- probe with config writes before doing config reads ** -- check ERROR_STATUS @@ -313,25 +291,18 @@ ** The workaround is only used for device discovery. */ -static int -lba_device_present( u8 bus, u8 dfn, struct lba_device *d) +static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d) { u8 first_bus = d->hba.hba_bus->secondary; u8 last_sub_bus = d->hba.hba_bus->subordinate; - ASSERT(bus >= first_bus); - ASSERT(bus <= last_sub_bus); - ASSERT((bus - first_bus) < LBA_MAX_NUM_BUSES); - if ((bus < first_bus) || (bus > last_sub_bus) || - ((bus - first_bus) >= LBA_MAX_NUM_BUSES)) - { - /* devices that fall into any of these cases won't get claimed */ - return(FALSE); + ((bus - first_bus) >= LBA_MAX_NUM_BUSES)) { + return 0; } - return TRUE; + return 1; } @@ -346,7 +317,6 @@ /* For LBA rev 2.0, 2.1, 2.2, and 3.0, we must disable DMA \ ** arbitration for full bus walks. \ */ \ - if (LBA_DMA_DURING_CFG_DISABLED(d)) { \ /* Save contents of arb mask register. */ \ arb_mask = READ_REG32(d->hba.base_addr + LBA_ARB_MASK); \ \ @@ -354,8 +324,7 @@ * Turn off all device arbitration bits (i.e. everything \ * except arbitration enable bit). \ */ \ - WRITE_REG32(0x1, d->hba.base_addr + LBA_ARB_MASK); \ - } \ + WRITE_REG32(0x1, d->hba.base_addr + LBA_ARB_MASK); \ \ /* \ * Set the smart mode bit so that master aborts don't cause \ @@ -375,7 +344,7 @@ * Read address register to ensure that LBA is the bus master, \ * which implies that DMA traffic has stopped when DMA arb is off. \ */ \ - lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ + lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ /* \ * Generate a cfg write cycle (will have no affect on \ * Vendor ID register since read-only). \ @@ -385,7 +354,7 @@ * Make sure write has completed before proceeding further, \ * i.e. before setting clear enable. \ */ \ - lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ + lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ } @@ -439,20 +408,16 @@ } \ } -#define LBA_CFG_TR4_ADDR_SETUP(d, addr) \ - WRITE_REG32(((addr) & ~3), (d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ - lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR) +#define LBA_CFG_TR4_ADDR_SETUP(d, addr) \ + WRITE_REG32(((addr) & ~3), (d)->hba.base_addr + LBA_PCI_CFG_ADDR); -#define LBA_CFG_ADDR_SETUP(d, addr) { \ +#define LBA_CFG_ADDR_SETUP(d, addr) { \ WRITE_REG32(((addr) & ~3), (d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ /* \ - * HPREVISIT: \ - * -- Potentially could skip this once DMA bug fixed. \ - * \ * Read address register to ensure that LBA is the bus master, \ * which implies that DMA traffic has stopped when DMA arb is off. \ */ \ - lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ + lba_t32 = READ_REG32((d)->hba.base_addr + LBA_PCI_CFG_ADDR); \ } @@ -465,12 +430,10 @@ * Restore error config register (turn off smart mode). \ */ \ WRITE_REG32(error_config, base + LBA_ERROR_CONFIG); \ - if (LBA_DMA_DURING_CFG_DISABLED(d)) { \ /* \ * Restore arb mask register (reenables DMA arbitration). \ */ \ WRITE_REG32(arb_mask, base + LBA_ARB_MASK); \ - } \ } @@ -478,39 +441,23 @@ static unsigned int lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size) { - u32 data = ~0; + u32 data = ~0U; int error = 0; u32 arb_mask = 0; /* used by LBA_CFG_SETUP/RESTORE */ u32 error_config = 0; /* used by LBA_CFG_SETUP/RESTORE */ u32 status_control = 0; /* used by LBA_CFG_SETUP/RESTORE */ - ASSERT((size == sizeof(u8)) || - (size == sizeof(u16)) || - (size == sizeof(u32))); - - if ((size != sizeof(u8)) && - (size != sizeof(u16)) && - (size != sizeof(u32))) { - return(data); - } - LBA_CFG_SETUP(d, tok); LBA_CFG_PROBE(d, tok); LBA_CFG_MASTER_ABORT_CHECK(d, d->hba.base_addr, tok, error); if (!error) { + void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; + LBA_CFG_ADDR_SETUP(d, tok | reg); switch (size) { - case sizeof(u8): - data = (u32) READ_REG8(d->hba.base_addr + LBA_PCI_CFG_DATA + (reg & 3)); - break; - case sizeof(u16): - data = (u32) READ_REG16(d->hba.base_addr + LBA_PCI_CFG_DATA + (reg & 2)); - break; - case sizeof(u32): - data = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_DATA); - break; - default: - break; /* leave data as -1 */ + case 1: data = (u32) READ_REG8(data_reg + (reg & 3)); break; + case 2: data = (u32) READ_REG16(data_reg+ (reg & 2)); break; + case 4: data = READ_REG32(data_reg); break; } } LBA_CFG_RESTORE(d, d->hba.base_addr); @@ -518,142 +465,26 @@ } -#if USE_PAT_PDC_CFG - -/* PAT PDC needs to be relocated in order to perform properly. - * tg3 driver does about 1600 PCI Cfg writes to initialize the card. - * On 440Mhz A500, PDC takes ~20ms/write, or ~30 seconds per card. - * On PA8800, that takes about 5ms/write (8 seconds). - * But relocating PDC will burn at least 4MB of RAM. - * Easier/Cheaper to just maintain our own mercury cfg ops. - */ -#define pat_cfg_addr(bus, devfn, addr) (((bus) << 16) | ((devfn) << 8) | (addr)) - -static int pat_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) -{ - int tok = pat_cfg_addr(bus->number, devfn, pos); - u32 tmp; - int ret = pdc_pat_io_pci_cfg_read(tok, size, &tmp); - - DBG_CFG("%s(%d:%d.%d+0x%02x) -> 0x%x %d\n", __FUNCTION__, bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), pos, tmp, ret); - - switch (size) { - case 1: *data = (u8) tmp; return (tmp == (u8) ~0); - case 2: *data = (u16) tmp; return (tmp == (u16) ~0); - case 4: *data = (u32) tmp; return (tmp == (u32) ~0); - } - *data = ~0; - return (ret); -} - -static int pat_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) -{ - int tok = pat_cfg_addr(bus->number, devfn, pos); - int ret = pdc_pat_io_pci_cfg_write(tok, size, data); - - DBG_CFG("%s(%d:%d.%d+0x%02x, 0x%lx/%d)\n", __FUNCTION__, bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), pos, data, size); - return (ret); -} - -static struct pci_ops pat_cfg_ops = { - .read = pat_cfg_read, - .write = pat_cfg_write, -}; -#endif - - -#ifdef CONFIG_PARISC64 -static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) +static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) { struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; u32 tok = LBA_CFG_TOK(local_bus, devfn); + void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; - /* Basic Algorithm - ** Should only get here on fully working LBA rev. - ** This is how simple the original LBA code should have been. - */ - LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); - switch(size) { - case 1: *(u8 *) data = READ_REG8(d->hba.base_addr + LBA_PCI_CFG_DATA - + (pos & 3)); - DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, - *(u8 *)data); - return(*(u8 *)data == (u8) ~0U); - case 2: *(u16 *) data = READ_REG16(d->hba.base_addr + LBA_PCI_CFG_DATA - + (pos & 2)); - DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, - *(u16 *)data); - return(*(u16 *)data == (u16) ~0U); - case 4: *(u32 *) data = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_DATA); - DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, *data); - return(*data == ~0U); - } - DBG_CFG("%s(%x+%2x) -> bad size (%d)\n", __FUNCTION__, tok, pos, size); - *data = ~0U; - return(!PCIBIOS_SUCCESSFUL); /* failed */ -} - -/* - * LBA 4.0 config write code implements non-postable semantics - * by doing a read of CONFIG ADDR after the write. - */ - -static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) -{ - struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); - unsigned long data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; - u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; - u32 tok = LBA_CFG_TOK(local_bus,devfn); - - ASSERT((tok & 0xff) == 0); - ASSERT(pos < 0x100); - - DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __FUNCTION__, tok, pos, data); - - /* Basic Algorithm */ - LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); - switch(size) { - case 1: WRITE_REG8 (data, data_reg + (pos & 3)); break; - case 2: WRITE_REG16(data, data_reg + (pos & 2)); break; - case 4: WRITE_REG32(data, data_reg); break; - default: - DBG_CFG("%s(%x+%2x) WTF! size %d\n", __FUNCTION__, tok, pos, - size); - } - - /* flush posted write */ - lba_t32 = READ_U32(d->hba.base_addr + LBA_PCI_CFG_ADDR); - return PCIBIOS_SUCCESSFUL; -} - - -static struct pci_ops mercury_cfg_ops = { - .read = mercury_cfg_read, - .write = mercury_cfg_write, -}; -#else -#define mercury_cfg_ops lba_cfg_ops -#endif /* CONFIG_PARISC64 */ - - -static int lba_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) -{ - struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); - u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; - u32 tok = LBA_CFG_TOK(local_bus, devfn); + if ((pos > 255) || (devfn > 255)) + return -EINVAL; /* FIXME: B2K/C3600 workaround is always use old method... */ - /* if (!LBA_TR4PLUS(d) && !LBA_SKIP_PROBE(d)) */ { + /* if (!LBA_SKIP_PROBE(d)) */ { /* original - Generate config cycle on broken elroy with risk we will miss PCI bus errors. */ *data = lba_rd_cfg(d, tok, pos, size); DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __FUNCTION__, tok, pos, *data); - return(*data == ~0U); + return 0; } - if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) - { + if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) { DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __FUNCTION__, tok, pos); /* either don't want to look or know device isn't present. */ *data = ~0U; @@ -664,52 +495,32 @@ ** Should only get here on fully working LBA rev. ** This is how simple the code should have been. */ - LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); + LBA_CFG_ADDR_SETUP(d, tok | pos); switch(size) { - case 1: *(u8 *) data = READ_REG8(d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 3)); - break; - case 2: *(u16 *) data = READ_REG16(d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 2)); - break; - case 4: *(u32 *) data = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_DATA); - break; + case 1: *data = READ_REG8 (data_reg + (pos & 3)); break; + case 2: *data = READ_REG16(data_reg + (pos & 2)); break; + case 4: *data = READ_REG32(data_reg); break; } DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, *data); - return(*data == ~0U); + return 0; } static void -lba_wr_cfg( struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) +lba_wr_cfg(struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) { int error = 0; u32 arb_mask = 0; u32 error_config = 0; u32 status_control = 0; - - ASSERT((size == sizeof(u8)) || - (size == sizeof(u16)) || - (size == sizeof(u32))); - - if ((size != sizeof(u8)) && - (size != sizeof(u16)) && - (size != sizeof(u32))) { - return; - } + void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; LBA_CFG_SETUP(d, tok); LBA_CFG_ADDR_SETUP(d, tok | reg); switch (size) { - case sizeof(u8): - WRITE_REG8((u8) data, d->hba.base_addr + LBA_PCI_CFG_DATA + (reg&3)); - break; - case sizeof(u16): - WRITE_REG16((u8) data, d->hba.base_addr + LBA_PCI_CFG_DATA +(reg&2)); - break; - case sizeof(u32): - WRITE_REG32(data, d->hba.base_addr + LBA_PCI_CFG_DATA); - break; - default: - break; + case 1: WRITE_REG8 (data, data_reg + (reg & 3)); break; + case 2: WRITE_REG16(data, data_reg + (reg & 2)); break; + case 4: WRITE_REG32(data, data_reg); break; } LBA_CFG_MASTER_ABORT_CHECK(d, d->hba.base_addr, tok, error); LBA_CFG_RESTORE(d, d->hba.base_addr); @@ -721,16 +532,16 @@ * by doing a read of CONFIG ADDR after the write. */ -static int lba_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) +static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) { struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; u32 tok = LBA_CFG_TOK(local_bus,devfn); - ASSERT((tok & 0xff) == 0); - ASSERT(pos < 0x100); + if ((pos > 255) || (devfn > 255)) + return -EINVAL; - if (!LBA_TR4PLUS(d) && !LBA_SKIP_PROBE(d)) { + if (!LBA_SKIP_PROBE(d)) { /* Original Workaround */ lba_wr_cfg(d, tok, pos, (u32) data, size); DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __FUNCTION__, tok, pos,data); @@ -745,7 +556,7 @@ DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __FUNCTION__, tok, pos, data); /* Basic Algorithm */ - LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); + LBA_CFG_ADDR_SETUP(d, tok | pos); switch(size) { case 1: WRITE_REG8 (data, d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 3)); break; @@ -760,9 +571,82 @@ } -static struct pci_ops lba_cfg_ops = { - .read = lba_cfg_read, - .write = lba_cfg_write, +static struct pci_ops elroy_cfg_ops = { + .read = elroy_cfg_read, + .write = elroy_cfg_write, +}; + +/* + * The mercury_cfg_ops are slightly misnamed; they're also used for Elroy + * TR4.0 as no additional bugs were found in this areea between Elroy and + * Mercury + */ + +static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) +{ + struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); + u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; + u32 tok = LBA_CFG_TOK(local_bus, devfn); + void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; + + if ((pos > 255) || (devfn > 255)) + return -EINVAL; + + LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); + switch(size) { + case 1: + *data = READ_REG8(data_reg + (pos & 3)); + break; + case 2: + *data = READ_REG16(data_reg + (pos & 2)); + break; + case 4: + *data = READ_REG32(data_reg); break; + break; + } + + DBG_CFG("mercury_cfg_read(%x+%2x) -> 0x%x\n", tok, pos, *data); + return 0; +} + +/* + * LBA 4.0 config write code implements non-postable semantics + * by doing a read of CONFIG ADDR after the write. + */ + +static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) +{ + struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); + void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; + u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; + u32 tok = LBA_CFG_TOK(local_bus,devfn); + + if ((pos > 255) || (devfn > 255)) + return -EINVAL; + + DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __FUNCTION__, tok, pos, data); + + LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); + switch(size) { + case 1: + WRITE_REG8 (data, data_reg + (pos & 3)); + break; + case 2: + WRITE_REG16(data, data_reg + (pos & 2)); + break; + case 4: + WRITE_REG32(data, data_reg); + break; + } + + /* flush posted write */ + lba_t32 = READ_U32(d->hba.base_addr + LBA_PCI_CFG_ADDR); + return 0; +} + +static struct pci_ops mercury_cfg_ops = { + .read = mercury_cfg_read, + .write = mercury_cfg_write, }; @@ -773,7 +657,7 @@ } -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT /* ** Determine if a device is already configured. @@ -802,11 +686,11 @@ for (i = 0; i <= PCI_ROM_RESOURCE; i++) { if (dev->resource[i].flags & srch_flags) { pci_claim_resource(dev, i); - DBG(" claimed %s %d [%lx,%lx]/%x\n", + DBG(" claimed %s %d [%lx,%lx]/%lx\n", pci_name(dev), i, dev->resource[i].start, dev->resource[i].end, - (int) dev->resource[i].flags + dev->resource[i].flags ); } } @@ -835,7 +719,7 @@ struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); int lba_portbase = HBA_PORT_BASE(ldev->hba.hba_num); - DBG("lba_fixup_bus(0x%p) bus %d sysdata 0x%p\n", + DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n", bus, bus->secondary, bus->bridge->platform_data); /* @@ -849,14 +733,14 @@ /* Host-PCI Bridge */ int err, i; - DBG("lba_fixup_bus() %s [%lx/%lx]/%x\n", + DBG("lba_fixup_bus() %s [%lx/%lx]/%lx\n", ldev->hba.io_space.name, ldev->hba.io_space.start, ldev->hba.io_space.end, - (int) ldev->hba.io_space.flags); - DBG("lba_fixup_bus() %s [%lx/%lx]/%x\n", + ldev->hba.io_space.flags); + DBG("lba_fixup_bus() %s [%lx/%lx]/%lx\n", ldev->hba.lmmio_space.name, ldev->hba.lmmio_space.start, ldev->hba.lmmio_space.end, - (int) ldev->hba.lmmio_space.flags); + ldev->hba.lmmio_space.flags); err = request_resource(&ioport_resource, &(ldev->hba.io_space)); if (err < 0) { @@ -895,7 +779,7 @@ /* lba_dump_res(&iomem_resource, 2); */ } -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT /* GMMIO is distributed range. Every LBA/Rope gets part it. */ if (ldev->hba.gmmio_space.flags) { err = request_resource(&iomem_resource, &(ldev->hba.gmmio_space)); @@ -1035,7 +919,7 @@ static u##size lba_astro_in##size (struct pci_hba_data *d, u16 addr) \ { \ u##size t; \ - t = READ_REG##size(LBA_PORT_BASE + addr); \ + t = READ_REG##size(astro_iop_base + addr); \ DBG_PORT(" 0x%x\n", t); \ return (t); \ } @@ -1075,9 +959,8 @@ #define LBA_PORT_OUT(size, mask) \ static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \ { \ - ASSERT(d != NULL); \ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \ - WRITE_REG##size(val, LBA_PORT_BASE + addr); \ + WRITE_REG##size(val, astro_iop_base + addr); \ if (LBA_DEV(d)->hw_rev < 3) \ lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \ } @@ -1097,7 +980,7 @@ }; -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT #define PIOP_TO_GMMIO(lba, addr) \ ((lba)->iop_base + (((addr)&0xFFFC)<<10) + ((addr)&3)) @@ -1215,16 +1098,19 @@ case PAT_LMMIO: /* used to fix up pre-initialized MEM BARs */ if (!lba_dev->hba.lmmio_space.start) { - sprintf(lba_dev->hba.lmmio_name, "PCI%02x LMMIO", - (int) lba_dev->hba.bus_num.start); - lba_dev->hba.lmmio_space_offset = p->start - io->start; - r = &(lba_dev->hba.lmmio_space); - r->name = lba_dev->hba.lmmio_name; + sprintf(lba_dev->hba.lmmio_name, + "PCI%02lx LMMIO", + lba_dev->hba.bus_num.start); + lba_dev->hba.lmmio_space_offset = p->start - + io->start; + r = &lba_dev->hba.lmmio_space; + r->name = lba_dev->hba.lmmio_name; } else if (!lba_dev->hba.elmmio_space.start) { - sprintf(lba_dev->hba.elmmio_name, "PCI%02x ELMMIO", - (int) lba_dev->hba.bus_num.start); - r = &(lba_dev->hba.elmmio_space); - r->name = lba_dev->hba.elmmio_name; + sprintf(lba_dev->hba.elmmio_name, + "PCI%02lx ELMMIO", + lba_dev->hba.bus_num.start); + r = &lba_dev->hba.elmmio_space; + r->name = lba_dev->hba.elmmio_name; } else { printk(KERN_WARNING MODULE_NAME " only supports 2 LMMIO resources!\n"); @@ -1239,9 +1125,9 @@ case PAT_GMMIO: /* MMIO space > 4GB phys addr; for 64-bit BAR */ - sprintf(lba_dev->hba.gmmio_name, "PCI%02x GMMIO", - (int) lba_dev->hba.bus_num.start); - r = &(lba_dev->hba.gmmio_space); + sprintf(lba_dev->hba.gmmio_name, "PCI%02lx GMMIO", + lba_dev->hba.bus_num.start); + r = &lba_dev->hba.gmmio_space; r->name = lba_dev->hba.gmmio_name; r->start = p->start; r->end = p->end; @@ -1260,11 +1146,11 @@ ** Postable I/O port space is per PCI host adapter. ** base of 64MB PIOP region */ - lba_dev->iop_base = p->start; + lba_dev->iop_base = ioremap(p->start, 64 * 1024 * 1024); - sprintf(lba_dev->hba.io_name, "PCI%02x Ports", - (int) lba_dev->hba.bus_num.start); - r = &(lba_dev->hba.io_space); + sprintf(lba_dev->hba.io_name, "PCI%02lx Ports", + lba_dev->hba.bus_num.start); + r = &lba_dev->hba.io_space; r->name = lba_dev->hba.io_name; r->start = HBA_PORT_BASE(lba_dev->hba.hba_num); r->end = r->start + HBA_PORT_SPACE_SIZE - 1; @@ -1284,7 +1170,7 @@ /* keep compiler from complaining about missing declarations */ #define lba_pat_port_ops lba_astro_port_ops #define lba_pat_resources(pa_dev, lba_dev) -#endif /* CONFIG_PARISC64 */ +#endif /* CONFIG_64BIT */ extern void sba_distributed_lmmio(struct parisc_device *, struct resource *); @@ -1306,7 +1192,7 @@ ** PCI bus walk *should* end up with the same result. ** FIXME: But we don't have sanity checks in PCI or LBA. */ - lba_num = READ_REG32(pa_dev->hpa + LBA_FW_SCRATCH); + lba_num = READ_REG32(lba_dev->hba.base_addr + LBA_FW_SCRATCH); r = &(lba_dev->hba.bus_num); r->name = "LBA PCI Busses"; r->start = lba_num & 0xff; @@ -1316,8 +1202,8 @@ ** Legacy boxes but it's nice to see in /proc/iomem. */ r = &(lba_dev->hba.lmmio_space); - sprintf(lba_dev->hba.lmmio_name, "PCI%02x LMMIO", - (int) lba_dev->hba.bus_num.start); + sprintf(lba_dev->hba.lmmio_name, "PCI%02lx LMMIO", + lba_dev->hba.bus_num.start); r->name = lba_dev->hba.lmmio_name; #if 1 @@ -1387,7 +1273,7 @@ * * All is well now. */ - r->start = (long) READ_REG32(pa_dev->hpa + LBA_LMMIO_BASE); + r->start = READ_REG32(lba_dev->hba.base_addr + LBA_LMMIO_BASE); if (r->start & 1) { unsigned long rsize; @@ -1395,7 +1281,7 @@ /* mmio_mask also clears Enable bit */ r->start &= mmio_mask; r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), r->start); - rsize = ~ READ_REG32(pa_dev->hpa + LBA_LMMIO_MASK); + rsize = ~ READ_REG32(lba_dev->hba.base_addr + LBA_LMMIO_MASK); /* ** Each rope only gets part of the distributed range. @@ -1425,15 +1311,15 @@ ** an existing (but unused portion of) distributed range. */ r = &(lba_dev->hba.elmmio_space); - sprintf(lba_dev->hba.elmmio_name, "PCI%02x ELMMIO", - (int) lba_dev->hba.bus_num.start); + sprintf(lba_dev->hba.elmmio_name, "PCI%02lx ELMMIO", + lba_dev->hba.bus_num.start); r->name = lba_dev->hba.elmmio_name; #if 1 /* See comment which precedes call to sba_directed_lmmio() */ sba_directed_lmmio(pa_dev, r); #else - r->start = READ_REG32(pa_dev->hpa + LBA_ELMMIO_BASE); + r->start = READ_REG32(lba_dev->hba.base_addr + LBA_ELMMIO_BASE); if (r->start & 1) { unsigned long rsize; @@ -1441,18 +1327,18 @@ /* mmio_mask also clears Enable bit */ r->start &= mmio_mask; r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), r->start); - rsize = READ_REG32(pa_dev->hpa + LBA_ELMMIO_MASK); + rsize = READ_REG32(lba_dev->hba.base_addr + LBA_ELMMIO_MASK); r->end = r->start + ~rsize; } #endif r = &(lba_dev->hba.io_space); - sprintf(lba_dev->hba.io_name, "PCI%02x Ports", - (int) lba_dev->hba.bus_num.start); + sprintf(lba_dev->hba.io_name, "PCI%02lx Ports", + lba_dev->hba.bus_num.start); r->name = lba_dev->hba.io_name; r->flags = IORESOURCE_IO; - r->start = READ_REG32(pa_dev->hpa + LBA_IOS_BASE) & ~1L; - r->end = r->start + (READ_REG32(pa_dev->hpa + LBA_IOS_MASK) ^ (HBA_PORT_SPACE_SIZE - 1)); + r->start = READ_REG32(lba_dev->hba.base_addr + LBA_IOS_BASE) & ~1L; + r->end = r->start + (READ_REG32(lba_dev->hba.base_addr + LBA_IOS_MASK) ^ (HBA_PORT_SPACE_SIZE - 1)); /* Virtualize the I/O Port space ranges */ lba_num = HBA_PORT_BASE(lba_dev->hba.hba_num); @@ -1501,7 +1387,7 @@ printk("\n"); #endif /* DEBUG_LBA_PAT */ -#ifdef CONFIG_PARISC64 +#ifdef CONFIG_64BIT /* * FIXME add support for PDC_PAT_IO "Get slot status" - OLAR support * Only N-Class and up can really make use of Get slot status. @@ -1558,23 +1444,6 @@ -static void __init -lba_common_init(struct lba_device *lba_dev) -{ - pci_bios = &lba_bios_ops; - pcibios_register_hba(HBA_DATA(lba_dev)); - spin_lock_init(&lba_dev->lba_lock); - - /* - ** Set flags which depend on hw_rev - */ - if (!LBA_TR4PLUS(lba_dev)) { - lba_dev->flags |= LBA_FLAG_NO_DMA_DURING_CFG; - } -} - - - /* ** Determine if lba should claim this chip (return 0) or not (return 1). ** If so, initialize the chip and tell other partners in crime they @@ -1585,12 +1454,14 @@ { struct lba_device *lba_dev; struct pci_bus *lba_bus; + struct pci_ops *cfg_ops; u32 func_class; void *tmp_obj; char *version; + void __iomem *addr = ioremap(dev->hpa, 4096); /* Read HW Rev First */ - func_class = READ_REG32(dev->hpa + LBA_FCLASS); + func_class = READ_REG32(addr + LBA_FCLASS); if (IS_ELROY(dev)) { func_class &= 0xf; @@ -1603,24 +1474,40 @@ case 5: version = "TR4.0"; break; default: version = "TR4+"; } + printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n", MODULE_NAME, version, func_class & 0xf, dev->hpa); - /* Just in case we find some prototypes... */ + if (func_class < 2) { + printk(KERN_WARNING "Can't support LBA older than " + "TR2.1 - continuing under adversity.\n"); + } + +#if 0 +/* Elroy TR4.0 should work with simple algorithm. + But it doesn't. Still missing something. *sigh* +*/ + if (func_class > 4) { + cfg_ops = &mercury_cfg_ops; + } else +#endif + { + cfg_ops = &elroy_cfg_ops; + } + } else if (IS_MERCURY(dev) || IS_QUICKSILVER(dev)) { func_class &= 0xff; version = kmalloc(6, GFP_KERNEL); sprintf(version,"TR%d.%d",(func_class >> 4),(func_class & 0xf)); - /* We could use one printk for both and have it outside, + /* We could use one printk for both Elroy and Mercury, * but for the mask for func_class. */ printk(KERN_INFO "%s version %s (0x%x) found at 0x%lx\n", MODULE_NAME, version, func_class & 0xff, dev->hpa); - } - - if (func_class < 2) { - printk(KERN_WARNING "Can't support LBA older than TR2.1" - " - continuing under adversity.\n"); + cfg_ops = &mercury_cfg_ops; + } else { + printk(KERN_ERR "Unknown LBA found at 0x%lx\n", dev->hpa); + return -ENODEV; } /* @@ -1633,8 +1520,7 @@ */ lba_dev = kmalloc(sizeof(struct lba_device), GFP_KERNEL); - if (NULL == lba_dev) - { + if (!lba_dev) { printk(KERN_ERR "lba_init_chip - couldn't alloc lba_device\n"); return(1); } @@ -1644,19 +1530,16 @@ /* ---------- First : initialize data we already have --------- */ - /* - ** Need hw_rev to adjust configuration space behavior. - ** LBA_TR4PLUS macro uses hw_rev field. - */ lba_dev->hw_rev = func_class; - - lba_dev->hba.base_addr = dev->hpa; /* faster access */ + lba_dev->hba.base_addr = addr; lba_dev->hba.dev = dev; lba_dev->iosapic_obj = tmp_obj; /* save interrupt handle */ lba_dev->hba.iommu = sba_get_iommu(dev); /* get iommu data */ /* ------------ Second : initialize common stuff ---------- */ - lba_common_init(lba_dev); + pci_bios = &lba_bios_ops; + pcibios_register_hba(HBA_DATA(lba_dev)); + spin_lock_init(&lba_dev->lba_lock); if (lba_hw_init(lba_dev)) return(1); @@ -1669,8 +1552,11 @@ /* Go ask PDC PAT what resources this LBA has */ lba_pat_resources(dev, lba_dev); } else { - /* Sprockets PDC uses NPIOP region */ - pci_port = &lba_astro_port_ops; + if (!astro_iop_base) { + /* Sprockets PDC uses NPIOP region */ + astro_iop_base = ioremap(LBA_PORT_BASE, 64 * 1024); + pci_port = &lba_astro_port_ops; + } /* Poke the chip a bit for /proc output */ lba_legacy_resources(dev, lba_dev); @@ -1683,8 +1569,7 @@ dev->dev.platform_data = lba_dev; lba_bus = lba_dev->hba.hba_bus = pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, - IS_ELROY(dev) ? &lba_cfg_ops : &mercury_cfg_ops, - NULL); + cfg_ops, NULL); /* This is in lieu of calling pci_assign_unassigned_resources() */ if (is_pdc_pat()) { @@ -1711,7 +1596,7 @@ ** space is restricted. Avoids master aborts on config cycles. ** Early LBA revs go fatal on *any* master abort. */ - if (!LBA_TR4PLUS(lba_dev)) { + if (cfg_ops == &elroy_cfg_ops) { lba_dev->flags |= LBA_FLAG_SKIP_PROBE; } @@ -1746,18 +1631,19 @@ ** Only called from sba_iommu.c in order to route ranges (MMIO vs DMA). ** sba_iommu is responsible for locking (none needed at init time). */ -void -lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask) +void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask) { - unsigned long base_addr = lba->hpa; + void __iomem * base_addr = ioremap(lba->hpa, 4096); imask <<= 2; /* adjust for hints - 2 more bits */ - ASSERT((ibase & 0x003fffff) == 0); - ASSERT((imask & 0x003fffff) == 0); + /* Make sure we aren't trying to set bits that aren't writeable. */ + WARN_ON((ibase & 0x001fffff) != 0); + WARN_ON((imask & 0x001fffff) != 0); DBG("%s() ibase 0x%x imask 0x%x\n", __FUNCTION__, ibase, imask); WRITE_REG32( imask, base_addr + LBA_IMASK); WRITE_REG32( ibase, base_addr + LBA_IBASE); + iounmap(base_addr); } diff -Nru a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/parisc/pdc_stable.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,735 @@ +/* + * Interfaces to retrieve and set PDC Stable options (firmware) + * + * Copyright (C) 2005 Thibaut VARENE + * + * 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 + * + * + * DEV NOTE: the PDC Procedures reference states that: + * "A minimum of 96 bytes of Stable Storage is required. Providing more than + * 96 bytes of Stable Storage is optional [...]. Failure to provide the + * optional locations from 96 to 192 results in the loss of certain + * functionality during boot." + * + * Since locations between 96 and 192 are the various paths, most (if not + * all) PA-RISC machines should have them. Anyway, for safety reasons, the + * following code can deal with only 96 bytes of Stable Storage, and all + * sizes between 96 and 192 bytes (provided they are multiple of struct + * device_path size, eg: 128, 160 and 192) to provide full information. + * The code makes no use of data above 192 bytes. One last word: there's one + * path we can always count on: the primary path. + */ + +#undef PDCS_DEBUG +#ifdef PDCS_DEBUG +#define DPRINTK(fmt, args...) printk(KERN_DEBUG fmt, ## args) +#else +#define DPRINTK(fmt, args...) +#endif + +#include +#include +#include /* for capable() */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define PDCS_VERSION "0.09" + +#define PDCS_ADDR_PPRI 0x00 +#define PDCS_ADDR_OSID 0x40 +#define PDCS_ADDR_FSIZ 0x5C +#define PDCS_ADDR_PCON 0x60 +#define PDCS_ADDR_PALT 0x80 +#define PDCS_ADDR_PKBD 0xA0 + +MODULE_AUTHOR("Thibaut VARENE "); +MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(PDCS_VERSION); + +static unsigned long pdcs_size = 0; + +/* This struct defines what we need to deal with a parisc pdc path entry */ +struct pdcspath_entry { + short ready; /* entry record is valid if != 0 */ + unsigned long addr; /* entry address in stable storage */ + char *name; /* entry name */ + struct device_path devpath; /* device path in parisc representation */ + struct device *dev; /* corresponding device */ + struct kobject kobj; +}; + +struct pdcspath_attribute { + struct attribute attr; + ssize_t (*show)(struct pdcspath_entry *entry, char *buf); + ssize_t (*store)(struct pdcspath_entry *entry, const char *buf, size_t count); +}; + +#define PDCSPATH_ENTRY(_addr, _name) \ +struct pdcspath_entry pdcspath_entry_##_name = { \ + .ready = 0, \ + .addr = _addr, \ + .name = __stringify(_name), \ +}; + +#define PDCS_ATTR(_name, _mode, _show, _store) \ +struct subsys_attribute pdcs_attr_##_name = { \ + .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE}, \ + .show = _show, \ + .store = _store, \ +}; + +#define PATHS_ATTR(_name, _mode, _show, _store) \ +struct pdcspath_attribute paths_attr_##_name = { \ + .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE}, \ + .show = _show, \ + .store = _store, \ +}; + +#define to_pdcspath_attribute(_attr) container_of(_attr, struct pdcspath_attribute, attr) +#define to_pdcspath_entry(obj) container_of(obj, struct pdcspath_entry, kobj) + +/** + * pdcspath_fetch - This function populates the path entry structs. + * @entry: A pointer to an allocated pdcspath_entry. + * + * The general idea is that you don't read from the Stable Storage every time + * you access the files provided by the facilites. We store a copy of the + * content of the stable storage WRT various paths in these structs. We read + * these structs when reading the files, and we will write to these structs when + * writing to the files, and only then write them back to the Stable Storage. + */ +static int +pdcspath_fetch(struct pdcspath_entry *entry) +{ + struct device_path *devpath; + + if (!entry) + return -EINVAL; + + devpath = &entry->devpath; + + DPRINTK("%s: fetch: 0x%p, 0x%p, addr: 0x%lx\n", __func__, + entry, devpath, entry->addr); + + /* addr, devpath and count must be word aligned */ + if (pdc_stable_read(entry->addr, devpath, sizeof(*devpath)) != PDC_OK) + return -EIO; + + /* Find the matching device. + NOTE: hardware_path overlays with device_path, so the nice cast can + be used */ + entry->dev = hwpath_to_device((struct hardware_path *)devpath); + + entry->ready = 1; + + DPRINTK("%s: device: 0x%p\n", __func__, entry->dev); + + return 0; +} + +/** + * pdcspath_store - This function writes a path to stable storage. + * @entry: A pointer to an allocated pdcspath_entry. + * + * It can be used in two ways: either by passing it a preset devpath struct + * containing an already computed hardware path, or by passing it a device + * pointer, from which it'll find out the corresponding hardware path. + * For now we do not handle the case where there's an error in writing to the + * Stable Storage area, so you'd better not mess up the data :P + */ +static int +pdcspath_store(struct pdcspath_entry *entry) +{ + struct device_path *devpath; + + if (!entry) + return -EINVAL; + + devpath = &entry->devpath; + + /* We expect the caller to set the ready flag to 0 if the hardware + path struct provided is invalid, so that we know we have to fill it. + First case, we don't have a preset hwpath... */ + if (!entry->ready) { + /* ...but we have a device, map it */ + if (entry->dev) + device_to_hwpath(entry->dev, (struct hardware_path *)devpath); + else + return -EINVAL; + } + /* else, we expect the provided hwpath to be valid. */ + + DPRINTK("%s: store: 0x%p, 0x%p, addr: 0x%lx\n", __func__, + entry, devpath, entry->addr); + + /* addr, devpath and count must be word aligned */ + if (pdc_stable_write(entry->addr, devpath, sizeof(*devpath)) != PDC_OK) { + printk(KERN_ERR "%s: an error occured when writing to PDC.\n" + "It is likely that the Stable Storage data has been corrupted.\n" + "Please check it carefully upon next reboot.\n", __func__); + return -EIO; + } + + entry->ready = 1; + + DPRINTK("%s: device: 0x%p\n", __func__, entry->dev); + + return 0; +} + +/** + * pdcspath_hwpath_read - This function handles hardware path pretty printing. + * @entry: An allocated and populated pdscpath_entry struct. + * @buf: The output buffer to write to. + * + * We will call this function to format the output of the hwpath attribute file. + */ +static ssize_t +pdcspath_hwpath_read(struct pdcspath_entry *entry, char *buf) +{ + char *out = buf; + struct device_path *devpath; + unsigned short i; + + if (!entry || !buf) + return -EINVAL; + + devpath = &entry->devpath; + + if (!entry->ready) + return -ENODATA; + + for (i = 0; i < 6; i++) { + if (devpath->bc[i] >= 128) + continue; + out += sprintf(out, "%u/", (unsigned char)devpath->bc[i]); + } + out += sprintf(out, "%u\n", (unsigned char)devpath->mod); + + return out - buf; +} + +/** + * pdcspath_hwpath_write - This function handles hardware path modifying. + * @entry: An allocated and populated pdscpath_entry struct. + * @buf: The input buffer to read from. + * @count: The number of bytes to be read. + * + * We will call this function to change the current hardware path. + * Hardware paths are to be given '/'-delimited, without brackets. + * We take care to make sure that the provided path actually maps to an existing + * device, BUT nothing would prevent some foolish user to set the path to some + * PCI bridge or even a CPU... + * A better work around would be to make sure we are at the end of a device tree + * for instance, but it would be IMHO beyond the simple scope of that driver. + * The aim is to provide a facility. Data correctness is left to userland. + */ +static ssize_t +pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t count) +{ + struct hardware_path hwpath; + unsigned short i; + char in[count+1], *temp; + struct device *dev; + + if (!entry || !buf || !count) + return -EINVAL; + + /* We'll use a local copy of buf */ + memset(in, 0, count+1); + strncpy(in, buf, count); + + /* Let's clean up the target. 0xff is a blank pattern */ + memset(&hwpath, 0xff, sizeof(hwpath)); + + /* First, pick the mod field (the last one of the input string) */ + if (!(temp = strrchr(in, '/'))) + return -EINVAL; + + hwpath.mod = simple_strtoul(temp+1, NULL, 10); + in[temp-in] = '\0'; /* truncate the remaining string. just precaution */ + DPRINTK("%s: mod: %d\n", __func__, hwpath.mod); + + /* Then, loop for each delimiter, making sure we don't have too many. + we write the bc fields in a down-top way. No matter what, we stop + before writing the last field. If there are too many fields anyway, + then the user is a moron and it'll be caught up later when we'll + check the consistency of the given hwpath. */ + for (i=5; ((temp = strrchr(in, '/'))) && (temp-in > 0) && (likely(i)); i--) { + hwpath.bc[i] = simple_strtoul(temp+1, NULL, 10); + in[temp-in] = '\0'; + DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.bc[i]); + } + + /* Store the final field */ + hwpath.bc[i] = simple_strtoul(in, NULL, 10); + DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.bc[i]); + + /* Now we check that the user isn't trying to lure us */ + if (!(dev = hwpath_to_device((struct hardware_path *)&hwpath))) { + printk(KERN_WARNING "%s: attempt to set invalid \"%s\" " + "hardware path: %s\n", __func__, entry->name, buf); + return -EINVAL; + } + + /* So far so good, let's get in deep */ + entry->ready = 0; + entry->dev = dev; + + /* Now, dive in. Write back to the hardware */ + WARN_ON(pdcspath_store(entry)); /* this warn should *NEVER* happen */ + + /* Update the symlink to the real device */ + sysfs_remove_link(&entry->kobj, "device"); + sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); + + printk(KERN_INFO "PDC Stable Storage: changed \"%s\" path to \"%s\"\n", + entry->name, buf); + + return count; +} + +/** + * pdcspath_layer_read - Extended layer (eg. SCSI ids) pretty printing. + * @entry: An allocated and populated pdscpath_entry struct. + * @buf: The output buffer to write to. + * + * We will call this function to format the output of the layer attribute file. + */ +static ssize_t +pdcspath_layer_read(struct pdcspath_entry *entry, char *buf) +{ + char *out = buf; + struct device_path *devpath; + unsigned short i; + + if (!entry || !buf) + return -EINVAL; + + devpath = &entry->devpath; + + if (!entry->ready) + return -ENODATA; + + for (i = 0; devpath->layers[i] && (likely(i < 6)); i++) + out += sprintf(out, "%u ", devpath->layers[i]); + + out += sprintf(out, "\n"); + + return out - buf; +} + +/** + * pdcspath_layer_write - This function handles extended layer modifying. + * @entry: An allocated and populated pdscpath_entry struct. + * @buf: The input buffer to read from. + * @count: The number of bytes to be read. + * + * We will call this function to change the current layer value. + * Layers are to be given '.'-delimited, without brackets. + * XXX beware we are far less checky WRT input data provided than for hwpath. + * Potential harm can be done, since there's no way to check the validity of + * the layer fields. + */ +static ssize_t +pdcspath_layer_write(struct pdcspath_entry *entry, const char *buf, size_t count) +{ + unsigned int layers[6]; /* device-specific info (ctlr#, unit#, ...) */ + unsigned short i; + char in[count+1], *temp; + + if (!entry || !buf || !count) + return -EINVAL; + + /* We'll use a local copy of buf */ + memset(in, 0, count+1); + strncpy(in, buf, count); + + /* Let's clean up the target. 0 is a blank pattern */ + memset(&layers, 0, sizeof(layers)); + + /* First, pick the first layer */ + if (unlikely(!isdigit(*in))) + return -EINVAL; + layers[0] = simple_strtoul(in, NULL, 10); + DPRINTK("%s: layer[0]: %d\n", __func__, layers[0]); + + temp = in; + for (i=1; ((temp = strchr(temp, '.'))) && (likely(i<6)); i++) { + if (unlikely(!isdigit(*(++temp)))) + return -EINVAL; + layers[i] = simple_strtoul(temp, NULL, 10); + DPRINTK("%s: layer[%d]: %d\n", __func__, i, layers[i]); + } + + /* So far so good, let's get in deep */ + + /* First, overwrite the current layers with the new ones, not touching + the hardware path. */ + memcpy(&entry->devpath.layers, &layers, sizeof(layers)); + + /* Now, dive in. Write back to the hardware */ + WARN_ON(pdcspath_store(entry)); /* this warn should *NEVER* happen */ + + printk(KERN_INFO "PDC Stable Storage: changed \"%s\" layers to \"%s\"\n", + entry->name, buf); + + return count; +} + +/** + * pdcspath_attr_show - Generic read function call wrapper. + * @kobj: The kobject to get info from. + * @attr: The attribute looked upon. + * @buf: The output buffer. + */ +static ssize_t +pdcspath_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) +{ + struct pdcspath_entry *entry = to_pdcspath_entry(kobj); + struct pdcspath_attribute *pdcs_attr = to_pdcspath_attribute(attr); + ssize_t ret = 0; + + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + + if (pdcs_attr->show) + ret = pdcs_attr->show(entry, buf); + + return ret; +} + +/** + * pdcspath_attr_store - Generic write function call wrapper. + * @kobj: The kobject to write info to. + * @attr: The attribute to be modified. + * @buf: The input buffer. + * @count: The size of the buffer. + */ +static ssize_t +pdcspath_attr_store(struct kobject *kobj, struct attribute *attr, + const char *buf, size_t count) +{ + struct pdcspath_entry *entry = to_pdcspath_entry(kobj); + struct pdcspath_attribute *pdcs_attr = to_pdcspath_attribute(attr); + ssize_t ret = 0; + + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + + if (pdcs_attr->store) + ret = pdcs_attr->store(entry, buf, count); + + return ret; +} + +static struct sysfs_ops pdcspath_attr_ops = { + .show = pdcspath_attr_show, + .store = pdcspath_attr_store, +}; + +/* These are the two attributes of any PDC path. */ +static PATHS_ATTR(hwpath, 0600, pdcspath_hwpath_read, pdcspath_hwpath_write); +static PATHS_ATTR(layer, 0600, pdcspath_layer_read, pdcspath_layer_write); + +static struct attribute *paths_subsys_attrs[] = { + &paths_attr_hwpath.attr, + &paths_attr_layer.attr, + NULL, +}; + +/* Specific kobject type for our PDC paths */ +static struct kobj_type ktype_pdcspath = { + .sysfs_ops = &pdcspath_attr_ops, + .default_attrs = paths_subsys_attrs, +}; + +/* We hard define the 4 types of path we expect to find */ +static PDCSPATH_ENTRY(PDCS_ADDR_PPRI, primary); +static PDCSPATH_ENTRY(PDCS_ADDR_PCON, console); +static PDCSPATH_ENTRY(PDCS_ADDR_PALT, alternative); +static PDCSPATH_ENTRY(PDCS_ADDR_PKBD, keyboard); + +/* An array containing all PDC paths we will deal with */ +static struct pdcspath_entry *pdcspath_entries[] = { + &pdcspath_entry_primary, + &pdcspath_entry_alternative, + &pdcspath_entry_console, + &pdcspath_entry_keyboard, + NULL, +}; + +/** + * pdcs_info_read - Pretty printing of the remaining useful data. + * @entry: An allocated and populated subsytem struct. We don't use it tho. + * @buf: The output buffer to write to. + * + * We will call this function to format the output of the 'info' attribute file. + * Please refer to PDC Procedures documentation, section PDC_STABLE to get a + * better insight of what we're doing here. + */ +static ssize_t +pdcs_info_read(struct subsystem *entry, char *buf) +{ + char *out = buf; + __u32 result; + struct device_path devpath; + char *tmpstr = NULL; + + if (!entry || !buf) + return -EINVAL; + + /* show the size of the stable storage */ + out += sprintf(out, "Stable Storage size: %ld bytes\n", pdcs_size); + + /* deal with flags */ + if (pdc_stable_read(PDCS_ADDR_PPRI, &devpath, sizeof(devpath)) != PDC_OK) + return -EIO; + + out += sprintf(out, "Autoboot: %s\n", (devpath.flags & PF_AUTOBOOT) ? "On" : "Off"); + out += sprintf(out, "Autosearch: %s\n", (devpath.flags & PF_AUTOSEARCH) ? "On" : "Off"); + out += sprintf(out, "Timer: %u s\n", (devpath.flags & PF_TIMER) ? (1 << (devpath.flags & PF_TIMER)) : 0); + + /* get OSID */ + if (pdc_stable_read(PDCS_ADDR_OSID, &result, sizeof(result)) != PDC_OK) + return -EIO; + + /* the actual result is 16 bits away */ + switch (result >> 16) { + case 0x0000: tmpstr = "No OS-dependent data"; break; + case 0x0001: tmpstr = "HP-UX dependent data"; break; + case 0x0002: tmpstr = "MPE-iX dependent data"; break; + case 0x0003: tmpstr = "OSF dependent data"; break; + case 0x0004: tmpstr = "HP-RT dependent data"; break; + case 0x0005: tmpstr = "Novell Netware dependent data"; break; + default: tmpstr = "Unknown"; break; + } + out += sprintf(out, "OS ID: %s (0x%.4x)\n", tmpstr, (result >> 16)); + + /* get fast-size */ + if (pdc_stable_read(PDCS_ADDR_FSIZ, &result, sizeof(result)) != PDC_OK) + return -EIO; + + out += sprintf(out, "Memory tested: "); + if ((result & 0x0F) < 0x0E) + out += sprintf(out, "%.3f MB", 0.256*(1<<(result & 0x0F))); + else + out += sprintf(out, "All"); + out += sprintf(out, "\n"); + + return out - buf; +} + +/** + * pdcs_info_write - This function handles boot flag modifying. + * @entry: An allocated and populated subsytem struct. We don't use it tho. + * @buf: The input buffer to read from. + * @count: The number of bytes to be read. + * + * We will call this function to change the current boot flags. + * We expect a precise syntax: + * \"n n\" (n == 0 or 1) to toggle respectively AutoBoot and AutoSearch + * + * As of now there is no incentive on my side to provide more "knobs" to that + * interface, since modifying the rest of the data is pretty meaningless when + * the machine is running and for the expected use of that facility, such as + * PALO setting up the boot disk when installing a Linux distribution... + */ +static ssize_t +pdcs_info_write(struct subsystem *entry, const char *buf, size_t count) +{ + struct pdcspath_entry *pathentry; + unsigned char flags; + char in[count+1], *temp; + char c; + + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + + if (!entry || !buf || !count) + return -EINVAL; + + /* We'll use a local copy of buf */ + memset(in, 0, count+1); + strncpy(in, buf, count); + + /* Current flags are stored in primary boot path entry */ + pathentry = &pdcspath_entry_primary; + + /* Be nice to the existing flag record */ + flags = pathentry->devpath.flags; + + DPRINTK("%s: flags before: 0x%X\n", __func__, flags); + + temp = in; + + while (*temp && isspace(*temp)) + temp++; + + c = *temp++ - '0'; + if ((c != 0) && (c != 1)) + goto parse_error; + if (c == 0) + flags &= ~PF_AUTOBOOT; + else + flags |= PF_AUTOBOOT; + + if (*temp++ != ' ') + goto parse_error; + + c = *temp++ - '0'; + if ((c != 0) && (c != 1)) + goto parse_error; + if (c == 0) + flags &= ~PF_AUTOSEARCH; + else + flags |= PF_AUTOSEARCH; + + DPRINTK("%s: flags after: 0x%X\n", __func__, flags); + + /* So far so good, let's get in deep */ + + /* Change the path entry flags first */ + pathentry->devpath.flags = flags; + + /* Now, dive in. Write back to the hardware */ + WARN_ON(pdcspath_store(pathentry)); /* this warn should *NEVER* happen */ + + printk(KERN_INFO "PDC Stable Storage: changed flags to \"%s\"\n", buf); + + return count; + +parse_error: + printk(KERN_WARNING "%s: Parse error: expect \"n n\" (n == 0 or 1) for AB and AS\n", __func__); + return -EINVAL; +} + +/* The last attribute (the 'root' one actually) with all remaining data. */ +static PDCS_ATTR(info, 0600, pdcs_info_read, pdcs_info_write); + +static struct subsys_attribute *pdcs_subsys_attrs[] = { + &pdcs_attr_info, + NULL, /* maybe more in the future? */ +}; + +static decl_subsys(paths, &ktype_pdcspath, NULL); +static decl_subsys(pdc, NULL, NULL); + +/** + * pdcs_register_pathentries - Prepares path entries kobjects for sysfs usage. + * + * It creates kobjects corresponding to each path entry with nice sysfs + * links to the real device. This is where the magic takes place: when + * registering the subsystem attributes during module init, each kobject hereby + * created will show in the sysfs tree as a folder containing files as defined + * by path_subsys_attr[]. + */ +static inline int __init +pdcs_register_pathentries(void) +{ + unsigned short i; + struct pdcspath_entry *entry; + + for (i = 0; (entry = pdcspath_entries[i]); i++) { + if (pdcspath_fetch(entry) < 0) + continue; + + kobject_set_name(&entry->kobj, "%s", entry->name); + kobj_set_kset_s(entry, paths_subsys); + kobject_register(&entry->kobj); + + if (!entry->dev) + continue; + + /* Add a nice symlink to the real device */ + sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); + } + + return 0; +} + +/** + * pdcs_unregister_pathentries - Routine called when unregistering the module. + */ +static inline void __exit +pdcs_unregister_pathentries(void) +{ + unsigned short i; + struct pdcspath_entry *entry; + + for (i = 0; (entry = pdcspath_entries[i]); i++) + if (entry->ready) + kobject_unregister(&entry->kobj); +} + +/* + * For now we register the pdc subsystem with the firmware subsystem + * and the paths subsystem with the pdc subsystem + */ +static int __init +pdc_stable_init(void) +{ + struct subsys_attribute *attr; + int i, rc = 0, error = 0; + + /* find the size of the stable storage */ + if (pdc_stable_get_size(&pdcs_size) != PDC_OK) + return -ENODEV; + + printk(KERN_INFO "PDC Stable Storage facility v%s\n", PDCS_VERSION); + + /* For now we'll register the pdc subsys within this driver */ + if ((rc = firmware_register(&pdc_subsys))) + return rc; + + /* Don't forget the info entry */ + for (i = 0; (attr = pdcs_subsys_attrs[i]) && !error; i++) + if (attr->show) + error = subsys_create_file(&pdc_subsys, attr); + + /* register the paths subsys as a subsystem of pdc subsys */ + kset_set_kset_s(&paths_subsys, pdc_subsys); + subsystem_register(&paths_subsys); + + /* now we create all "files" for the paths subsys */ + pdcs_register_pathentries(); + + return 0; +} + +static void __exit +pdc_stable_exit(void) +{ + pdcs_unregister_pathentries(); + subsystem_unregister(&paths_subsys); + + firmware_unregister(&pdc_subsys); +} + + +module_init(pdc_stable_init); +module_exit(pdc_stable_exit); diff -Nru a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c --- a/drivers/parisc/sba_iommu.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/parisc/sba_iommu.c 2005-03-07 14:54:17 -08:00 @@ -58,7 +58,6 @@ ** Don't even think about messing with it unless you have ** plenty of 710's to sacrifice to the computer gods. :^) */ -#undef DEBUG_SBA_ASSERT #undef DEBUG_SBA_INIT #undef DEBUG_SBA_RUN #undef DEBUG_SBA_RUN_SG @@ -92,19 +91,6 @@ #define DBG_RES(x...) #endif -#ifdef DEBUG_SBA_ASSERT -#undef ASSERT -#define ASSERT(expr) \ - if(!(expr)) { \ - printk("\n%s:%d: Assertion " #expr " failed!\n", \ - __FILE__, __LINE__); \ - panic(#expr); \ - } -#else -#define ASSERT(expr) -#endif - - #if defined(__LP64__) && !defined(CONFIG_PDC_NARROW) /* "low end" PA8800 machines use ZX1 chipset */ #define ZX1_SUPPORT @@ -125,39 +111,24 @@ #define DEFAULT_DMA_HINT_REG 0 #define ASTRO_RUNWAY_PORT 0x582 -#define ASTRO_ROPES_PORT 0x780 - #define IKE_MERCED_PORT 0x803 -#define IKE_ROPES_PORT 0x781 - #define REO_MERCED_PORT 0x804 -#define REO_ROPES_PORT 0x782 - #define REOG_MERCED_PORT 0x805 -#define REOG_ROPES_PORT 0x783 - #define PLUTO_MCKINLEY_PORT 0x880 -#define PLUTO_ROPES_PORT 0x784 #define SBA_FUNC_ID 0x0000 /* function id */ #define SBA_FCLASS 0x0008 /* function class, bist, header, rev... */ -#define IS_ASTRO(id) \ -(((id)->hversion == ASTRO_RUNWAY_PORT) || ((id)->hversion == ASTRO_ROPES_PORT)) - -#define IS_IKE(id) \ -(((id)->hversion == IKE_MERCED_PORT) || ((id)->hversion == IKE_ROPES_PORT)) - -#define IS_PLUTO(id) \ -(((id)->hversion == PLUTO_MCKINLEY_PORT) || ((id)->hversion == PLUTO_ROPES_PORT)) +#define IS_ASTRO(id) ((id)->hversion == ASTRO_RUNWAY_PORT) +#define IS_IKE(id) ((id)->hversion == IKE_MERCED_PORT) +#define IS_PLUTO(id) ((id)->hversion == PLUTO_MCKINLEY_PORT) #define SBA_FUNC_SIZE 4096 /* SBA configuration function reg set */ -#define ASTRO_IOC_OFFSET 0x20000 -/* Ike's IOC's occupy functions 2 and 3 (not 0 and 1) */ -#define IKE_IOC_OFFSET(p) ((p+2)*SBA_FUNC_SIZE) - -#define PLUTO_IOC_OFFSET 0x1000 +#define ASTRO_IOC_OFFSET (32 * SBA_FUNC_SIZE) +#define PLUTO_IOC_OFFSET (1 * SBA_FUNC_SIZE) +/* Ike's IOC's occupy functions 2 and 3 */ +#define IKE_IOC_OFFSET(p) ((p+2) * SBA_FUNC_SIZE) #define IOC_CTRL 0x8 /* IOC_CTRL offset */ #define IOC_CTRL_TC (1 << 0) /* TOC Enable */ @@ -165,6 +136,8 @@ #define IOC_CTRL_DE (1 << 2) /* Dillon Enable */ #define IOC_CTRL_RM (1 << 8) /* Real Mode */ #define IOC_CTRL_NC (1 << 9) /* Non Coherent Mode */ +#define IOC_CTRL_D4 (1 << 11) /* Disable 4-byte coalescing */ +#define IOC_CTRL_DD (1 << 13) /* Disable distr. LMMIO range coalescing */ #define MAX_IOC 2 /* per Ike. Pluto/Astro only have 1. */ @@ -246,9 +219,9 @@ struct ioc { - unsigned long ioc_hpa; /* I/O MMU base address */ - char *res_map; /* resource map, bit == pdir entry */ - u64 *pdir_base; /* physical base address */ + void __iomem *ioc_hpa; /* I/O MMU base address */ + char *res_map; /* resource map, bit == pdir entry */ + u64 *pdir_base; /* physical base address */ unsigned long ibase; /* pdir IOV Space base - shared w/lba_pci */ unsigned long imask; /* pdir IOV Space mask - shared w/lba_pci */ #ifdef ZX1_SUPPORT @@ -295,7 +268,7 @@ struct parisc_device *dev; /* dev found in bus walk */ struct parisc_device_id *iodc; /* data about dev from firmware */ const char *name; - unsigned long sba_hpa; /* base address */ + void __iomem *sba_hpa; /* base address */ spinlock_t sba_lock; unsigned int flags; /* state/functionality enabled */ unsigned int hw_rev; /* HW revision of chip */ @@ -312,9 +285,6 @@ static unsigned long ioc_needs_fdc = 0; -/* Ratio of Host MEM to IOV Space size */ -static unsigned long sba_mem_ratio = 8; - /* global count of IOMMUs in the system */ static unsigned int global_ioc_cnt = 0; @@ -364,9 +334,9 @@ * IO Adapter (aka Bus Converter). */ static void -sba_dump_ranges(unsigned long hpa) +sba_dump_ranges(void __iomem *hpa) { - DBG_INIT("SBA at 0x%lx\n", hpa); + DBG_INIT("SBA at 0x%p\n", hpa); DBG_INIT("IOS_DIST_BASE : %Lx\n", READ_REG64(hpa+IOS_DIST_BASE)); DBG_INIT("IOS_DIST_MASK : %Lx\n", READ_REG64(hpa+IOS_DIST_MASK)); DBG_INIT("IOS_DIST_ROUTE : %Lx\n", READ_REG64(hpa+IOS_DIST_ROUTE)); @@ -382,10 +352,9 @@ * * Print the size/location of the IO MMU PDIR. */ -static void -sba_dump_tlb(unsigned long hpa) +static void sba_dump_tlb(void __iomem *hpa) { - DBG_INIT("IO TLB at 0x%lx\n", hpa); + DBG_INIT("IO TLB at 0x%p\n", hpa); DBG_INIT("IOC_IBASE : 0x%Lx\n", READ_REG64(hpa+IOC_IBASE)); DBG_INIT("IOC_IMASK : 0x%Lx\n", READ_REG64(hpa+IOC_IMASK)); DBG_INIT("IOC_TCNFG : 0x%Lx\n", READ_REG64(hpa+IOC_TCNFG)); @@ -547,8 +516,6 @@ unsigned long *res_end = (unsigned long *) &(ioc->res_map[ioc->res_size]); unsigned long pide = ~0UL; - ASSERT(((unsigned long) ioc->res_hint & (sizeof(unsigned long) - 1UL)) == 0); - ASSERT(res_ptr < res_end); if (bits_wanted > (BITS_PER_LONG/2)) { /* Search word at a time - no mask needed */ for(; res_ptr < res_end; ++res_ptr) { @@ -583,8 +550,8 @@ while(res_ptr < res_end) { DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); - BUG_ON(0 == mask); - if(0 == ((*res_ptr) & mask)) { + WARN_ON(mask == 0); + if(((*res_ptr) & mask) == 0) { *res_ptr |= mask; /* mark resources busy! */ pide = ((unsigned long)res_ptr - (unsigned long)ioc->res_map); pide <<= 3; /* convert to bit address */ @@ -593,7 +560,7 @@ } mask >>= o; bitshiftcnt += o; - if (0 == mask) { + if (mask == 0) { mask = RESMAP_MASK(bits_wanted); bitshiftcnt=0; res_ptr++; @@ -631,21 +598,11 @@ #endif unsigned long pide; - ASSERT(pages_needed); - ASSERT((pages_needed * IOVP_SIZE) <= DMA_CHUNK_SIZE); - ASSERT(pages_needed <= BITS_PER_LONG); - ASSERT(0 == (size & ~IOVP_MASK)); - - /* - ** "seek and ye shall find"...praying never hurts either... - ** ggg sacrifices another 710 to the computer gods. - */ - pide = sba_search_bitmap(ioc, pages_needed); if (pide >= (ioc->res_size << 3)) { pide = sba_search_bitmap(ioc, pages_needed); if (pide >= (ioc->res_size << 3)) - panic("%s: I/O MMU @ %lx is out of mapping resources\n", + panic("%s: I/O MMU @ %p is out of mapping resources\n", __FILE__, ioc->ioc_hpa); } @@ -707,11 +664,6 @@ ioc->used_pages -= bits_not_wanted; #endif - ASSERT(m != 0); - ASSERT(bits_not_wanted); - ASSERT((bits_not_wanted * IOVP_SIZE) <= DMA_CHUNK_SIZE); - ASSERT(bits_not_wanted <= BITS_PER_LONG); - ASSERT((*res_ptr & m) == m); /* verify same bits are set */ *res_ptr &= ~m; } @@ -732,8 +684,9 @@ /** * sba_io_pdir_entry - fill in one IO PDIR entry * @pdir_ptr: pointer to IO PDIR entry - * @sid: process Space ID + * @sid: process Space ID - currently only support KERNEL_SPACE * @vba: Virtual CPU address of buffer to map + * @hint: DMA hint set to use for this mapping * * SBA Mapping Routine * @@ -768,7 +721,6 @@ * IOMMU uses little endian for the pdir. */ - void SBA_INLINE sba_io_pdir_entry(u64 *pdir_ptr, space_t sid, unsigned long vba, unsigned long hint) @@ -776,12 +728,6 @@ u64 pa; /* physical address */ register unsigned ci; /* coherent index */ - /* We currently only support kernel addresses. - * fdc instr below will need to reload sr1 with KERNEL_SPACE - * once we try to support direct DMA to user space. - */ - ASSERT(sid == KERNEL_SPACE); - pa = virt_to_phys(vba); pa &= IOVP_MASK; @@ -830,10 +776,6 @@ */ int off = PDIR_INDEX(iovp)*sizeof(u64)+7; - /* Must be non-zero and rounded up */ - ASSERT(byte_cnt > 0); - ASSERT(0 == (byte_cnt & ~IOVP_MASK)); - #ifdef ASSERT_PDIR_SANITY /* Assert first pdir entry is set */ if (0x80 != (((u8 *) ioc->pdir_base)[off])) { @@ -843,8 +785,6 @@ if (byte_cnt <= IOVP_SIZE) { - ASSERT( off < ioc->pdir_size); - iovp |= IOVP_SHIFT; /* set "size" field for PCOM */ /* @@ -858,11 +798,7 @@ u32 t = get_order(byte_cnt) + PAGE_SHIFT; iovp |= t; - ASSERT(t <= 31); /* 2GB! Max value of "size" field */ - do { - /* verify this pdir entry is enabled */ - ASSERT(0x80 == (((u8 *) ioc->pdir_base)[off] & 0x80)); /* clear I/O Pdir entry "valid" bit first */ ((u8 *)(ioc->pdir_base))[off] = 0; off += sizeof(u64); @@ -880,17 +816,21 @@ * * See Documentation/DMA-mapping.txt */ -static int -sba_dma_supported( struct device *dev, u64 mask) +static int sba_dma_supported( struct device *dev, u64 mask) { + struct ioc *ioc; if (dev == NULL) { printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n"); BUG(); return(0); } - /* only support 32-bit PCI devices - no DAC support (yet) */ - return((int) (mask == 0xffffffffUL)); + ioc = GET_IOC(dev); + + /* check if mask is > than the largest IO Virt Address */ + + return((int) (mask >= (ioc->ibase + + (ioc->pdir_size / sizeof(u64) * IOVP_SIZE) ))); } @@ -914,11 +854,7 @@ u64 *pdir_start; int pide; - ASSERT(size > 0); - ASSERT(size <= DMA_CHUNK_SIZE); - ioc = GET_IOC(dev); - ASSERT(ioc); /* save offset bits */ offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK; @@ -944,7 +880,6 @@ pdir_start = &(ioc->pdir_base[pide]); while (size > 0) { - ASSERT(((u8 *)pdir_start)[7] == 0); /* verify availability */ sba_io_pdir_entry(pdir_start, KERNEL_SPACE, (unsigned long) addr, 0); DBG_RUN(" pdir 0x%p %02x%02x%02x%02x%02x%02x%02x%02x\n", @@ -992,14 +927,10 @@ unsigned long flags; dma_addr_t offset; - ioc = GET_IOC(dev); - ASSERT(ioc); + DBG_RUN("%s() iovp 0x%lx/%x\n", __FUNCTION__, (long) iova, size); + ioc = GET_IOC(dev); offset = iova & ~IOVP_MASK; - - DBG_RUN("%s() iovp 0x%lx/%x\n", - __FUNCTION__, (long) iova, size); - iova ^= offset; /* clear offset bits */ size += offset; size = ROUNDUP(size, IOVP_SIZE); @@ -1131,7 +1062,6 @@ DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); ioc = GET_IOC(dev); - ASSERT(ioc); /* Fast path single entry scatterlists. */ if (nents == 1) { @@ -1186,7 +1116,6 @@ spin_unlock_irqrestore(&ioc->res_lock, flags); - ASSERT(coalesced == filled); DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled); return filled; @@ -1215,7 +1144,6 @@ __FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); ioc = GET_IOC(dev); - ASSERT(ioc); #ifdef SBA_COLLECT_STATS ioc->usg_calls++; @@ -1394,16 +1322,27 @@ return (void *) pdir_base; } -static void -sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) +/* setup Mercury or Elroy IBASE/IMASK registers. */ +static void setup_ibase_imask(struct parisc_device *sba, struct ioc *ioc, int ioc_num) { - /* lba_set_iregs() is in arch/parisc/kernel/lba_pci.c */ + /* lba_set_iregs() is in drivers/parisc/lba_pci.c */ extern void lba_set_iregs(struct parisc_device *, u32, u32); + struct device *dev; + + list_for_each_entry(dev, &sba->dev.children, node) { + struct parisc_device *lba = to_parisc_device(dev); + int rope_num = (lba->hpa >> 13) & 0xf; + if (rope_num >> 3 == ioc_num) + lba_set_iregs(lba, ioc->ibase, ioc->imask); + } +} +static void +sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) +{ u32 iova_space_mask; u32 iova_space_size; int iov_order, tcnfg; - struct parisc_device *lba; #if SBA_AGP_SUPPORT int agp_found = 0; #endif @@ -1449,7 +1388,7 @@ ioc->hint_shift_pdir, ioc->hint_mask_pdir); #endif - ASSERT((((unsigned long) ioc->pdir_base) & PAGE_MASK) == (unsigned long) ioc->pdir_base); + WARN_ON((((unsigned long) ioc->pdir_base) & PAGE_MASK) != (unsigned long) ioc->pdir_base); WRITE_REG(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE); /* build IMASK for IOC and Elroy */ @@ -1461,14 +1400,7 @@ #endif sba_dump_tlb(ioc->ioc_hpa); - /* - ** setup Mercury IBASE/IMASK registers as well. - */ - for (lba = sba->child; lba; lba = lba->sibling) { - int rope_num = (lba->hpa >> 13) & 0xf; - if (rope_num >> 3 == ioc_num) - lba_set_iregs(lba, ioc->ibase, ioc->imask); - } + setup_ibase_imask(sba, ioc, ioc_num); WRITE_REG(ioc->imask, ioc->ioc_hpa + IOC_IMASK); @@ -1534,13 +1466,8 @@ static void sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) { - /* lba_set_iregs() is in arch/parisc/kernel/lba_pci.c */ - extern void lba_set_iregs(struct parisc_device *, u32, u32); - u32 iova_space_size, iova_space_mask; - int pdir_size, iov_order; - unsigned long physmem; - struct parisc_device *lba; + unsigned int pdir_size, iov_order; /* ** Determine IOVA Space size from memory size. @@ -1556,16 +1483,15 @@ ** for DMA hints - ergo only 30 bits max. */ - physmem = num_physpages << PAGE_SHIFT; - iova_space_size = (u32) (physmem/(sba_mem_ratio*global_ioc_cnt)); + iova_space_size = (u32) (num_physpages/global_ioc_cnt); /* limit IOVA space size to 1MB-1GB */ - if (iova_space_size < 1024*1024) { - iova_space_size = 1024*1024; + if (iova_space_size < (1 << (20 - PAGE_SHIFT))) { + iova_space_size = 1 << (20 - PAGE_SHIFT); } #ifdef __LP64__ - else if (iova_space_size > 512*1024*1024) { - iova_space_size = 512*1024*1024; + else if (iova_space_size > (1 << (30 - PAGE_SHIFT))) { + iova_space_size = 1 << (30 - PAGE_SHIFT); } #endif @@ -1574,21 +1500,19 @@ ** thus, pdir/res_map will also be log2(). ** PIRANHA BUG: Exception is when IO Pdir is 2MB (gets reduced) */ - iov_order = get_order(iova_space_size >> (IOVP_SHIFT-PAGE_SHIFT)); - ASSERT(iov_order <= (30 - IOVP_SHIFT)); /* iova_space_size <= 1GB */ - ASSERT(iov_order >= (20 - IOVP_SHIFT)); /* iova_space_size >= 1MB */ - iova_space_size = 1 << (iov_order + IOVP_SHIFT); + iov_order = get_order(iova_space_size << PAGE_SHIFT); - ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64); + /* iova_space_size is now bytes, not pages */ + iova_space_size = 1 << (iov_order + PAGE_SHIFT); - ASSERT(pdir_size < 4*1024*1024); /* max pdir size == 2MB */ - - /* Verify it's a power of two */ - ASSERT((1 << get_order(pdir_size)) == (pdir_size >> PAGE_SHIFT)); + ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64); - DBG_INIT("%s() hpa 0x%lx mem %dMB IOV %dMB (%d bits) PDIR size 0x%0x\n", - __FUNCTION__, ioc->ioc_hpa, (int) (physmem>>20), - iova_space_size>>20, iov_order + PAGE_SHIFT, pdir_size); + DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n", + __FUNCTION__, + ioc->ioc_hpa, + (unsigned long) num_physpages >> (20 - PAGE_SHIFT), + iova_space_size>>20, + iov_order + PAGE_SHIFT); ioc->pdir_base = sba_alloc_pdir(pdir_size); @@ -1604,7 +1528,6 @@ ioc->hint_shift_pdir, ioc->hint_mask_pdir); #endif - ASSERT((((unsigned long) ioc->pdir_base) & PAGE_MASK) == (unsigned long) ioc->pdir_base); WRITE_REG64(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE); /* build IMASK for IOC and Elroy */ @@ -1630,14 +1553,7 @@ ** can't reprogram them the way drivers want. */ - /* - ** setup Elroy IBASE/IMASK registers as well. - */ - for (lba = sba->child; lba; lba = lba->sibling) { - int rope_num = (lba->hpa >> 13) & 0xf; - if (rope_num >> 3 == ioc_num) - lba_set_iregs(lba, ioc->ibase, ioc->imask); - } + setup_ibase_imask(sba, ioc, ioc_num); /* ** Program the IOC's ibase and enable IOVA translation @@ -1672,8 +1588,12 @@ ** **************************************************************************/ -static void -sba_hw_init(struct sba_device *sba_dev) +static void __iomem *ioc_remap(struct sba_device *sba_dev, int offset) +{ + return ioremap(sba_dev->dev->hpa + offset, SBA_FUNC_SIZE); +} + +static void sba_hw_init(struct sba_device *sba_dev) { int i; int num_ioc; @@ -1682,24 +1602,55 @@ if (!is_pdc_pat()) { /* Shutdown the USB controller on Astro-based workstations. ** Once we reprogram the IOMMU, the next DMA performed by - ** USB will HPMC the box. + ** USB will HPMC the box. USB is only enabled if a + ** keyboard is present and found. + ** + ** With serial console, j6k v5.0 firmware says: + ** mem_kbd hpa 0xfee003f8 sba 0x0 pad 0x0 cl_class 0x7 + ** + ** FIXME: Using GFX+USB console at power up but direct + ** linux to serial console is still broken. + ** USB could generate DMA so we must reset USB. + ** The proper sequence would be: + ** o block console output + ** o reset USB device + ** o reprogram serial port + ** o unblock console output */ - pdc_io_reset_devices(); + if (PAGE0->mem_kbd.cl_class == CL_KEYBD) { + pdc_io_reset_devices(); + } - /* - ** XXX May need something more sophisticated to deal - ** with DMA from LAN. Maybe use page zero boot device - ** as a handle to talk to PDC about which device to - ** shutdown. This also needs to work for is_pdc_pat(). - */ } + +#if 0 +printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, + PAGE0->mem_boot.spa, PAGE0->mem_boot.pad, PAGE0->mem_boot.cl_class); + + /* + ** Need to deal with DMA from LAN. + ** Maybe use page zero boot device as a handle to talk + ** to PDC about which device to shutdown. + ** + ** Netbooting, j6k v5.0 firmware says: + ** mem_boot hpa 0xf4008000 sba 0x0 pad 0x0 cl_class 0x1002 + ** ARGH! invalid class. + */ + if ((PAGE0->mem_boot.cl_class != CL_RANDOM) + && (PAGE0->mem_boot.cl_class != CL_SEQU)) { + pdc_io_reset(); + } +#endif + if (!IS_PLUTO(sba_dev->iodc)) { ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL); DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->", __FUNCTION__, sba_dev->sba_hpa, ioc_ctl); ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE); - ioc_ctl |= IOC_CTRL_TC; /* Astro: firmware enables this */ + ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC; + /* j6700 v1.6 firmware sets 0x294f */ + /* A500 firmware sets 0x4d */ WRITE_REG(ioc_ctl, sba_dev->sba_hpa+IOC_CTRL); @@ -1712,7 +1663,7 @@ if (IS_ASTRO(sba_dev->iodc)) { int err; /* PAT_PDC (L-class) also reports the same goofy base */ - sba_dev->ioc[0].ioc_hpa = ASTRO_IOC_OFFSET; + sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, ASTRO_IOC_OFFSET); num_ioc = 1; sba_dev->chip_resv.name = "Astro Intr Ack"; @@ -1730,32 +1681,32 @@ * corrected when we add it with IKE's IOC offset. * Doesnt look clean, but fewer code. */ - sba_dev->ioc[0].ioc_hpa = -PLUTO_IOC_OFFSET; + sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, PLUTO_IOC_OFFSET); num_ioc = 1; sba_dev->chip_resv.name = "Pluto Intr/PIOP/VGA"; sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfee00000UL; sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff200000UL - 1); err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); - BUG_ON(err < 0); + WARN_ON(err < 0); sba_dev->iommu_resv.name = "IOVA Space"; sba_dev->iommu_resv.start = 0x40000000UL; sba_dev->iommu_resv.end = 0x50000000UL - 1; err = request_resource(&iomem_resource, &(sba_dev->iommu_resv)); - BUG_ON(err < 0); + WARN_ON(err < 0); } else { /* IS_IKE (ie N-class, L3000, L1500) */ - sba_dev->ioc[0].ioc_hpa = sba_dev->ioc[1].ioc_hpa = 0; + sba_dev->ioc[0].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(0)); + sba_dev->ioc[1].ioc_hpa = ioc_remap(sba_dev, IKE_IOC_OFFSET(1)); num_ioc = 2; /* TODO - LOOKUP Ike/Stretch chipset mem map */ } + /* XXX: What about Reo? */ sba_dev->num_ioc = num_ioc; for (i = 0; i < num_ioc; i++) { - sba_dev->ioc[i].ioc_hpa += sba_dev->sba_hpa + IKE_IOC_OFFSET(i); - /* ** Make sure the box crashes if we get any errors on a rope. */ @@ -1771,6 +1722,16 @@ /* flush out the writes */ READ_REG(sba_dev->ioc[i].ioc_hpa + ROPE7_CTL); + DBG_INIT(" ioc[%d] ROPE_CFG 0x%Lx ROPE_DBG 0x%Lx\n", + i, + READ_REG(sba_dev->ioc[i].ioc_hpa + 0x40), + READ_REG(sba_dev->ioc[i].ioc_hpa + 0x50) + ); + DBG_INIT(" STATUS_CONTROL 0x%Lx FLUSH_CTRL 0x%Lx\n", + READ_REG(sba_dev->ioc[i].ioc_hpa + 0x108), + READ_REG(sba_dev->ioc[i].ioc_hpa + 0x400) + ); + if (IS_PLUTO(sba_dev->iodc)) { sba_ioc_init_pluto(sba_dev->dev, &(sba_dev->ioc[i]), i); } else { @@ -1984,16 +1945,6 @@ { HPHW_BCPORT, HVERSION_REV_ANY_ID, REO_MERCED_PORT, 0xc }, { HPHW_BCPORT, HVERSION_REV_ANY_ID, REOG_MERCED_PORT, 0xc }, { HPHW_IOA, HVERSION_REV_ANY_ID, PLUTO_MCKINLEY_PORT, 0xc }, -/* These two entries commented out because we don't find them in a - * buswalk yet. If/when we do, they would cause us to think we had - * many more SBAs then we really do. - * { HPHW_BCPORT, HVERSION_REV_ANY_ID, ASTRO_ROPES_PORT, 0xc }, - * { HPHW_BCPORT, HVERSION_REV_ANY_ID, IKE_ROPES_PORT, 0xc }, - */ -/* We shall also comment out Pluto Ropes Port since bus walk doesnt - * report it yet. - * { HPHW_BCPORT, HVERSION_REV_ANY_ID, PLUTO_ROPES_PORT, 0xc }, - */ { 0, } }; @@ -2017,18 +1968,19 @@ u32 func_class; int i; char *version; + void __iomem *sba_addr = ioremap(dev->hpa, SBA_FUNC_SIZE); - sba_dump_ranges(dev->hpa); + sba_dump_ranges(sba_addr); /* Read HW Rev First */ - func_class = READ_REG(dev->hpa + SBA_FCLASS); + func_class = READ_REG(sba_addr + SBA_FCLASS); if (IS_ASTRO(&dev->id)) { unsigned long fclass; static char astro_rev[]="Astro ?.?"; /* Astro is broken...Read HW Rev First */ - fclass = READ_REG(dev->hpa); + fclass = READ_REG(sba_addr); astro_rev[6] = '1' + (char) (fclass & 0x7); astro_rev[8] = '0' + (char) ((fclass & 0x18) >> 3); @@ -2061,12 +2013,12 @@ MODULE_NAME, version, dev->hpa); sba_dev = kmalloc(sizeof(struct sba_device), GFP_KERNEL); - if (NULL == sba_dev) { + if (!sba_dev) { printk(KERN_ERR MODULE_NAME " - couldn't alloc sba_device\n"); - return(1); + return -ENOMEM; } - dev->sysdata = (void *) sba_dev; + parisc_set_drvdata(dev, sba_dev); memset(sba_dev, 0, sizeof(struct sba_device)); for(i=0; ihw_rev = func_class; sba_dev->iodc = &dev->id; sba_dev->name = dev->name; - sba_dev->sba_hpa = dev->hpa; /* faster access */ + sba_dev->sba_hpa = sba_addr; sba_get_pat_resources(sba_dev); sba_hw_init(sba_dev); @@ -2100,7 +2052,7 @@ #endif parisc_vmerge_boundary = IOVP_SIZE; parisc_vmerge_max_size = IOVP_SIZE * BITS_PER_LONG; - + parisc_has_iommu(); return 0; } @@ -2129,7 +2081,7 @@ char t = sba_dev->id.hw_type; int iocnum = (pci_hba->hw_path >> 3); /* rope # */ - BUG_ON((t != HPHW_IOA) && (t != HPHW_BCPORT)); + WARN_ON((t != HPHW_IOA) && (t != HPHW_BCPORT)); return &(sba->ioc[iocnum]); } @@ -2159,7 +2111,7 @@ /* Astro has 4 directed ranges. Not sure about Ike/Pluto/et al */ for (i=0; i<4; i++) { int base, size; - unsigned long reg = sba->sba_hpa + i*0x18; + void __iomem *reg = sba->sba_hpa + i*0x18; base = READ_REG32(reg + LMMIO_DIRECT0_BASE); if ((base & 1) == 0) diff -Nru a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c --- a/drivers/parport/parport_gsc.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/parport/parport_gsc.c 2005-03-07 14:54:18 -08:00 @@ -42,7 +42,7 @@ #include #include #include -#include +#include "parport_gsc.h" MODULE_AUTHOR("Helge Deller "); @@ -85,95 +85,6 @@ { parport_generic_irq(irq, (struct parport *) dev_id, regs); return IRQ_HANDLED; -} - -void parport_gsc_write_data(struct parport *p, unsigned char d) -{ - parport_writeb (d, DATA (p)); -} - -unsigned char parport_gsc_read_data(struct parport *p) -{ - unsigned char c = parport_readb (DATA (p)); - return c; -} - -void parport_gsc_write_control(struct parport *p, unsigned char d) -{ - const unsigned char wm = (PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD | - PARPORT_CONTROL_INIT | - PARPORT_CONTROL_SELECT); - - /* Take this out when drivers have adapted to the newer interface. */ - if (d & 0x20) { - pr_debug("%s (%s): use data_reverse for this!\n", - p->name, p->cad->name); - parport_gsc_data_reverse (p); - } - - __parport_gsc_frob_control (p, wm, d & wm); -} - -unsigned char parport_gsc_read_control(struct parport *p) -{ - const unsigned char wm = (PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD | - PARPORT_CONTROL_INIT | - PARPORT_CONTROL_SELECT); - const struct parport_gsc_private *priv = p->physport->private_data; - return priv->ctr & wm; /* Use soft copy */ -} - -unsigned char parport_gsc_frob_control (struct parport *p, unsigned char mask, - unsigned char val) -{ - const unsigned char wm = (PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD | - PARPORT_CONTROL_INIT | - PARPORT_CONTROL_SELECT); - - /* Take this out when drivers have adapted to the newer interface. */ - if (mask & 0x20) { - pr_debug("%s (%s): use data_%s for this!\n", - p->name, p->cad->name, - (val & 0x20) ? "reverse" : "forward"); - if (val & 0x20) - parport_gsc_data_reverse (p); - else - parport_gsc_data_forward (p); - } - - /* Restrict mask and val to control lines. */ - mask &= wm; - val &= wm; - - return __parport_gsc_frob_control (p, mask, val); -} - -unsigned char parport_gsc_read_status(struct parport *p) -{ - return parport_readb (STATUS (p)); -} - -void parport_gsc_disable_irq(struct parport *p) -{ - __parport_gsc_frob_control (p, 0x10, 0); -} - -void parport_gsc_enable_irq(struct parport *p) -{ - __parport_gsc_frob_control (p, 0x10, 0x10); -} - -void parport_gsc_data_forward (struct parport *p) -{ - __parport_gsc_frob_control (p, 0x20, 0); -} - -void parport_gsc_data_reverse (struct parport *p) -{ - __parport_gsc_frob_control (p, 0x20, 0x20); } void parport_gsc_init_state(struct pardevice *dev, struct parport_state *s) diff -Nru a/drivers/parport/parport_gsc.h b/drivers/parport/parport_gsc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/parport/parport_gsc.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,222 @@ +/* + * Low-level parallel-support for PC-style hardware integrated in the + * LASI-Controller (on GSC-Bus) for HP-PARISC Workstations + * + * (C) 1999-2001 by Helge Deller + * + * + * 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 + * + * based on parport_pc.c by + * Grant Guenther + * Phil Blundell + * Tim Waugh + * Jose Renau + * David Campbell + * Andrea Arcangeli + */ + +#ifndef __DRIVERS_PARPORT_PARPORT_GSC_H +#define __DRIVERS_PARPORT_PARPORT_GSC_H + +#include +#include + +#undef DEBUG_PARPORT /* undefine for production */ +#define DELAY_TIME 0 + +#if DELAY_TIME == 0 +#define parport_readb gsc_readb +#define parport_writeb gsc_writeb +#else +static __inline__ unsigned char parport_readb( unsigned long port ) +{ + udelay(DELAY_TIME); + return gsc_readb(port); +} + +static __inline__ void parport_writeb( unsigned char value, unsigned long port ) +{ + gsc_writeb(value,port); + udelay(DELAY_TIME); +} +#endif + +/* --- register definitions ------------------------------- */ + +#define EPPDATA(p) ((p)->base + 0x4) +#define EPPADDR(p) ((p)->base + 0x3) +#define CONTROL(p) ((p)->base + 0x2) +#define STATUS(p) ((p)->base + 0x1) +#define DATA(p) ((p)->base + 0x0) + +struct parport_gsc_private { + /* Contents of CTR. */ + unsigned char ctr; + + /* Bitmask of writable CTR bits. */ + unsigned char ctr_writable; + + /* Number of bytes per portword. */ + int pword; + + /* Not used yet. */ + int readIntrThreshold; + int writeIntrThreshold; + + /* buffer suitable for DMA, if DMA enabled */ + char *dma_buf; + dma_addr_t dma_handle; + struct pci_dev *dev; +}; + +static inline void parport_gsc_write_data(struct parport *p, unsigned char d) +{ +#ifdef DEBUG_PARPORT + printk (KERN_DEBUG "parport_gsc_write_data(%p,0x%02x)\n", p, d); +#endif + parport_writeb(d, DATA(p)); +} + +static inline unsigned char parport_gsc_read_data(struct parport *p) +{ + unsigned char val = parport_readb (DATA (p)); +#ifdef DEBUG_PARPORT + printk (KERN_DEBUG "parport_gsc_read_data(%p) = 0x%02x\n", + p, val); +#endif + return val; +} + +/* __parport_gsc_frob_control differs from parport_gsc_frob_control in that + * it doesn't do any extra masking. */ +static inline unsigned char __parport_gsc_frob_control(struct parport *p, + unsigned char mask, + unsigned char val) +{ + struct parport_gsc_private *priv = p->physport->private_data; + unsigned char ctr = priv->ctr; +#ifdef DEBUG_PARPORT + printk (KERN_DEBUG + "__parport_gsc_frob_control(%02x,%02x): %02x -> %02x\n", + mask, val, ctr, ((ctr & ~mask) ^ val) & priv->ctr_writable); +#endif + ctr = (ctr & ~mask) ^ val; + ctr &= priv->ctr_writable; /* only write writable bits. */ + parport_writeb (ctr, CONTROL (p)); + priv->ctr = ctr; /* Update soft copy */ + return ctr; +} + +static inline void parport_gsc_data_reverse(struct parport *p) +{ + __parport_gsc_frob_control (p, 0x20, 0x20); +} + +static inline void parport_gsc_data_forward(struct parport *p) +{ + __parport_gsc_frob_control (p, 0x20, 0x00); +} + +static inline void parport_gsc_write_control(struct parport *p, + unsigned char d) +{ + const unsigned char wm = (PARPORT_CONTROL_STROBE | + PARPORT_CONTROL_AUTOFD | + PARPORT_CONTROL_INIT | + PARPORT_CONTROL_SELECT); + + /* Take this out when drivers have adapted to newer interface. */ + if (d & 0x20) { + printk (KERN_DEBUG "%s (%s): use data_reverse for this!\n", + p->name, p->cad->name); + parport_gsc_data_reverse (p); + } + + __parport_gsc_frob_control (p, wm, d & wm); +} + +static inline unsigned char parport_gsc_read_control(struct parport *p) +{ + const unsigned char rm = (PARPORT_CONTROL_STROBE | + PARPORT_CONTROL_AUTOFD | + PARPORT_CONTROL_INIT | + PARPORT_CONTROL_SELECT); + const struct parport_gsc_private *priv = p->physport->private_data; + return priv->ctr & rm; /* Use soft copy */ +} + +static inline unsigned char parport_gsc_frob_control(struct parport *p, + unsigned char mask, + unsigned char val) +{ + const unsigned char wm = (PARPORT_CONTROL_STROBE | + PARPORT_CONTROL_AUTOFD | + PARPORT_CONTROL_INIT | + PARPORT_CONTROL_SELECT); + + /* Take this out when drivers have adapted to newer interface. */ + if (mask & 0x20) { + printk (KERN_DEBUG "%s (%s): use data_%s for this!\n", + p->name, p->cad->name, + (val & 0x20) ? "reverse" : "forward"); + if (val & 0x20) + parport_gsc_data_reverse (p); + else + parport_gsc_data_forward (p); + } + + /* Restrict mask and val to control lines. */ + mask &= wm; + val &= wm; + + return __parport_gsc_frob_control (p, mask, val); +} + +static inline unsigned char parport_gsc_read_status(struct parport *p) +{ + return parport_readb (STATUS(p)); +} + +static inline void parport_gsc_disable_irq(struct parport *p) +{ + __parport_gsc_frob_control (p, 0x10, 0x00); +} + +static inline void parport_gsc_enable_irq(struct parport *p) +{ + __parport_gsc_frob_control (p, 0x10, 0x10); +} + +extern void parport_gsc_release_resources(struct parport *p); + +extern int parport_gsc_claim_resources(struct parport *p); + +extern void parport_gsc_init_state(struct pardevice *, struct parport_state *s); + +extern void parport_gsc_save_state(struct parport *p, struct parport_state *s); + +extern void parport_gsc_restore_state(struct parport *p, struct parport_state *s); + +extern void parport_gsc_inc_use_count(void); + +extern void parport_gsc_dec_use_count(void); + +extern struct parport *parport_gsc_probe_port(unsigned long base, + unsigned long base_hi, + int irq, int dma, + struct pci_dev *dev); + +#endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */ diff -Nru a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c --- a/drivers/pci/hotplug/ibmphp_pci.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/pci/hotplug/ibmphp_pci.c 2005-03-07 14:54:16 -08:00 @@ -1384,9 +1384,6 @@ return -EINVAL; } - pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); - sec_no = (int) sec_no; - pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SUBORDINATE_BUS, &sub_number); sub_no = (int) sub_number; debug ("sub_no is %d, sec_no is %d\n", sub_no, sec_no); diff -Nru a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c --- a/drivers/pci/hotplug/pciehp_ctrl.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/pci/hotplug/pciehp_ctrl.c 2005-03-07 14:54:16 -08:00 @@ -1354,10 +1354,11 @@ dbg("PCI Bridge Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", ctrl->seg, func->bus, func->device, func->function); bridge_slot_remove(func); - } else + } else { dbg("PCI Function Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", ctrl->seg, func->bus, func->device, func->function); slot_remove(func); + } func = pciehp_slot_find(ctrl->slot_bus, device, 0); } diff -Nru a/drivers/pci/hotplug/pciehprm_acpi.c b/drivers/pci/hotplug/pciehprm_acpi.c --- a/drivers/pci/hotplug/pciehprm_acpi.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/pci/hotplug/pciehprm_acpi.c 2005-03-07 14:54:18 -08:00 @@ -254,10 +254,9 @@ { acpi_status status; u8 *path_name = acpi_path_name(ab->handle); - struct acpi_buffer ret_buf = { 0, NULL}; /* run OSHP */ - status = acpi_evaluate_object(ab->handle, METHOD_NAME_OSHP, NULL, &ret_buf); + status = acpi_evaluate_object(ab->handle, METHOD_NAME_OSHP, NULL, NULL); if (ACPI_FAILURE(status)) { err("acpi_pciehprm:%s OSHP fails=0x%x\n", path_name, status); oshp_run_status = (status == AE_NOT_FOUND) ? OSHP_NOT_EXIST : OSHP_RUN_FAILED; diff -Nru a/drivers/pci/hotplug/shpchprm_acpi.c b/drivers/pci/hotplug/shpchprm_acpi.c --- a/drivers/pci/hotplug/shpchprm_acpi.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/pci/hotplug/shpchprm_acpi.c 2005-03-07 14:54:16 -08:00 @@ -242,10 +242,9 @@ { acpi_status status; u8 *path_name = acpi_path_name(ab->handle); - struct acpi_buffer ret_buf = { 0, NULL}; /* run OSHP */ - status = acpi_evaluate_object(ab->handle, METHOD_NAME_OSHP, NULL, &ret_buf); + status = acpi_evaluate_object(ab->handle, METHOD_NAME_OSHP, NULL, NULL); if (ACPI_FAILURE(status)) { err("acpi_pciehprm:%s OSHP fails=0x%x\n", path_name, status); } else diff -Nru a/drivers/pci/msi.c b/drivers/pci/msi.c --- a/drivers/pci/msi.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/pci/msi.c 2005-03-07 14:54:18 -08:00 @@ -616,15 +616,10 @@ bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); phys_addr = pci_resource_start (dev, bir); phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK); - if (!request_mem_region(phys_addr, - nr_entries * PCI_MSIX_ENTRY_SIZE, - "MSI-X vector table")) - return -ENOMEM; base = ioremap_nocache(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); - if (base == NULL) { - release_mem_region(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE); + if (base == NULL) return -ENOMEM; - } + /* MSI-X Table Initialization */ for (i = 0; i < nvec; i++) { entry = alloc_msi_entry(); @@ -859,8 +854,6 @@ phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK); iounmap(base); - release_mem_region(phys_addr, - nr_entries * PCI_MSIX_ENTRY_SIZE); } } @@ -1133,8 +1126,6 @@ phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK); iounmap(base); - release_mem_region(phys_addr, PCI_MSIX_ENTRY_SIZE * - multi_msix_capable(control)); printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() " "called without free_irq() on all MSI-X vectors\n", pci_name(dev)); diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c --- a/drivers/pci/pci-driver.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/pci/pci-driver.c 2005-03-07 14:54:17 -08:00 @@ -115,7 +115,6 @@ static inline void pci_init_dynids(struct pci_dynids *dynids) { - memset(dynids, 0, sizeof(*dynids)); spin_lock_init(&dynids->lock); INIT_LIST_HEAD(&dynids->list); } diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c --- a/drivers/pci/pci-sysfs.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/pci/pci-sysfs.c 2005-03-07 14:54:17 -08:00 @@ -481,7 +481,7 @@ struct pci_dev *pdev = NULL; sysfs_initialized = 1; - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) + while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) pci_create_sysfs_dev_files(pdev); return 0; diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c --- a/drivers/pci/pci.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/pci/pci.c 2005-03-07 14:54:16 -08:00 @@ -271,7 +271,7 @@ if ((pmc & PCI_PM_CAP_VER_MASK) > 2) { printk(KERN_DEBUG "PCI: %s has unsupported PM cap regs version (%u)\n", - dev->slot_name, pmc & PCI_PM_CAP_VER_MASK); + pci_name(dev), pmc & PCI_PM_CAP_VER_MASK); return -EIO; } diff -Nru a/drivers/pci/pci.ids b/drivers/pci/pci.ids --- a/drivers/pci/pci.ids 2005-03-07 14:54:17 -08:00 +++ b/drivers/pci/pci.ids 2005-03-07 14:54:17 -08:00 @@ -7,7 +7,7 @@ # so if you have anything to contribute, please visit the home page or # send a diff -u against the most recent pci.ids to pci-ids@ucw.cz. # -# Daily snapshot on Mon 2004-07-12 10:00:27 +# Partial sync-up to daily snapshot on Tue 2005-02-08 11:00:09 # # Vendors, devices and subsystems. Please keep sorted. @@ -28,6 +28,9 @@ 4001 WinTV PVR-250 (v1) 4009 WinTV PVR-250 4801 WinTV PVR-250 MCE +0071 Nebula Electronics Ltd. +0095 Silicon Image, Inc. (Wrong ID) + 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD 0100 Ncipher Corp Ltd # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne @@ -41,6 +44,11 @@ # SpeedStream is Efficient Networks, Inc, a Siemens Company 02ac SpeedStream 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] +0357 TTTech AG + 000a TTP-Monitoring Card V2.0 +0432 SCM Microsystems, Inc. +05e3 CyberDoor + 0701 CBD516 0675 Dynalink 1700 IS64PH ISDN Adapter 1702 IS64PH ISDN Adapter @@ -49,6 +57,9 @@ 09c1 Arris 0704 CM 200E Cable Modem 0a89 BREA Technologies Inc +0b49 ASCII Corporation +# see http://homepage1.nifty.com/mcn/lab/machines/trance_vibrator/usbview.vib.txt + 064f Trance Vibrator 0e11 Compaq Computer Corporation 0001 PCI to EISA Bridge 0002 PCI to ISA Bridge @@ -150,6 +161,8 @@ 0e11 4082 Smart Array 532 0e11 4083 Smart Array 5312 b1a4 NC7131 Gigabit Server Adapter +# HP Memory Hot-Plug Controller + b200 Memory Hot-Plug Controller b203 Integrated Lights Out Controller b204 Integrated Lights Out Processor f130 NetFlex-3/P ThunderLAN 1.0 @@ -169,6 +182,7 @@ 000a 53c1510 1000 1000 LSI53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Nonintelligent mode) 000b 53C896/897 + 0e11 6004 EOB003 Series SCSI host adapter 1000 1000 LSI53C896/7 PCI to Dual Channel Ultra2 SCSI Multifunction Controller 1000 1010 LSI22910 PCI to Dual Channel Ultra2 SCSI host adapter 1000 1020 LSI21002 PCI to Dual Channel Ultra2 SCSI host adapter @@ -191,7 +205,7 @@ 4c53 1050 CT7 mainboard 0010 53C1510 0e11 4040 Integrated Array Controller - 0e11 4048 Integrated Array Controller + 0e11 4048 RAID LC2 Controller 1000 1000 53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Intelligent mode) 0012 53c895a 1000 1000 LSI53C895A PCI to Ultra2 SCSI Controller @@ -202,6 +216,7 @@ 1de1 1020 DC-390U3W 0021 53c1010 66MHz Ultra3 SCSI Adapter 1000 1000 LSI53C1000/1000R/1010R/1010-66 PCI to Ultra160 SCSI Controller + 1000 1010 Asus TR-DLS onboard 53C1010-66 124b 1070 PMC-USCSI3 4c53 1080 CT8 mainboard 4c53 1300 P017 mezzanine (32-bit PMC) @@ -209,6 +224,7 @@ 0030 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI 1028 0123 PowerEdge 2600 1028 014a PowerEdge 1750 + 1028 016c PowerEdge 1850 MPT Fusion SCSI/RAID (Perc 4) 1028 1010 LSI U320 SCSI Controller 0031 53c1030ZC PCI-X Fusion-MPT Dual Ultra320 SCSI 0032 53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI @@ -226,21 +242,23 @@ 1000 0531 MegaRAID 531 SCSI 320-4X RAID Controller 1000 0532 MegaRAID 532 SCSI 320-2X RAID Controller 1028 0531 PowerEdge Expandable RAID Controller 4/QC + 1028 0533 PowerEdge Expandable RAID Controller 4/QC 8086 0530 MegaRAID Intel RAID Controller SRCZCRX 8086 0532 MegaRAID Intel RAID Controller SRCU42X 0408 MegaRAID 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 + 1025 004d MegaRAID ACER ROMB-2E RAID Controller + 1028 0001 PowerEdge RAID Controller PERC4e/SC + 1028 0002 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 + 8086 3008 MegaRAID RAID Controller SRCS28X + 8086 3431 MegaRAID RAID Controller Alief SROMBU42E + 8086 3499 MegaRAID RAID Controller Harwich SROMBU42E 0621 FC909 Fibre Channel Adapter 0622 FC929 Fibre Channel Adapter 1000 1020 44929 O Dual Fibre Channel card @@ -272,8 +290,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 + 8086 0520 MegaRAIDRAID Controller SRCU41L + 8086 0523 MegaRAID 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 @@ -285,7 +303,13 @@ 0017 PROTO-3 PCI Prototyping board 9100 INI-9100/9100W SCSI Host 1002 ATI Technologies Inc + 3150 M24 1P [Radeon Mobility X600] + 3154 M24 1T [FireGL M24 GL] + 3e50 RV380 0x3e50 [Radeon X600] + 3e54 RV380 0x3e54 [FireGL V3200] + 3e70 RV380 [Radeon X600] Secondary 4136 Radeon IGP 320 M + 4137 Radeon IGP330/340/350 4144 R300 AD [Radeon 9500 Pro] # New PCI ID provided by ATI developer relations (correction to above) 4145 R300 AE [Radeon 9700 Pro] @@ -294,19 +318,27 @@ 4147 R300 AG [FireGL Z1/X1] 4148 R350 AH [Radeon 9800] 4149 R350 AI [Radeon 9800] - 414b R350 AK [Fire GL ??] + 414a R350 AJ [Radeon 9800] + 414b R350 AK [Fire GL X2] # New PCI ID provided by ATI developer relations 4150 RV350 AP [Radeon 9600] + 1002 0002 R9600 Pro primary (Asus OEM for HP) + 1002 0003 R9600 Pro secondary (Asus OEM for HP) 1458 4024 Giga-Byte GV-R96128D Primary 148c 2064 PowerColor R96A-C3N 148c 2066 PowerColor R96A-C3N 174b 7c19 Sapphire Atlantis Radeon 9600 Pro 174b 7c29 GC-R9600PRO Primary [Sapphire] + 17ee 2002 Radeon 9600 256Mb Primary 18bc 0101 GC-R9600PRO Primary # New PCI ID provided by ATI developer relations 4151 RV350 AQ [Radeon 9600] + 1043 c004 A9600SE # New PCI ID provided by ATI developer relations 4152 RV350 AR [Radeon 9600] + 1002 0002 Radeon 9600XT + 1043 c002 Radeon 9600 XT TVD + 4153 RV350 AS [Radeon 9600 AS] 4154 RV350 AT [Fire GL T2] 4155 RV350 AU [Fire GL T2] 4156 RV350 AV [Fire GL T2] @@ -325,20 +357,35 @@ 1458 4025 Giga-Byte GV-R96128D Secondary 148c 2067 PowerColor R96A-C3N (Secondary) 174b 7c28 GC-R9600PRO Secondary [Sapphire] + 17ee 2003 Radeon 9600 256Mb Secondary 18bc 0100 GC-R9600PRO Secondary # New PCI ID provided by ATI developer relations (correction to above) 4171 RV350 AQ [Radeon 9600] (Secondary) + 1043 c005 A9600SE (Secondary) # New PCI ID provided by ATI developer relations (correction to above) 4172 RV350 AR [Radeon 9600] (Secondary) + 1002 0003 Radeon 9600XT (Secondary) + 1043 c003 A9600XT (Secondary) + 4173 RV350 ?? [Radeon 9550] (Secondary) + 4237 Radeon 7000 IGP 4242 R200 BB [Radeon All in Wonder 8500DV] 1002 02aa Radeon 8500 AIW DV Edition + 4243 R200 BC [Radeon All in Wonder 8500] 4336 Radeon Mobility U1 - 4337 Radeon IGP 340M + 103c 0024 Pavilion ze4400 builtin Video + 4337 Radeon IGP 330M/340M/350M + 1014 053a ThinkPad R40e (2684-HVG) builtin VGA controller + 103c 0850 Radeon IGP 345M 4341 IXP150 AC'97 Audio Controller + 4345 EHCI USB Controller + 4347 OHCI USB Controller #1 + 4348 OHCI USB Controller #2 + 434d IXP AC'97 Modem # Radeon 9100 IGP integrated 4353 ATI SMBus 4354 215CT [Mach64 CT] 4358 210888CX [Mach64 CX] + 4437 Radeon Mobility 7000 IGP 4554 210888ET [Mach64 ET] 4654 Mach64 VT 4742 3D Rage Pro AGP 1X/2X @@ -389,6 +436,7 @@ 1002 8008 Rage XL 1028 00ce PowerEdge 1400 1028 00d1 PowerEdge 2550 + 1028 00d9 PowerEdge 2500 8086 3411 SDS2 Mainboard 8086 3427 S875WP1-E mainboard 4753 Rage XC @@ -406,6 +454,7 @@ 4758 210888GX [Mach64 GX] 4759 3D Rage IIC 475a 3D Rage IIC AGP + 1002 0084 Rage 3D Pro AGP 2x XPERT 98 1002 0087 Rage 3D IIC 1002 475a Rage IIC AGP 4964 Radeon RV250 Id [Radeon 9000] @@ -422,6 +471,15 @@ 17af 2006 RV250 If [Excalibur Radeon 9000] 4967 Radeon RV250 Ig [Radeon 9000] 496e Radeon RV250 [Radeon 9000] (Secondary) + 4a48 R420 JH [Radeon X800] + 4a49 R420 JI [Radeon X800PRO] + 4a4a R420 JJ [Radeon X800SE] + 4a4b R420 JK [Radeon X800] + 4a4c R420 JL [Radeon X800] + 4a4d R420 JM [FireGL X3] + 4a4e M18 JN [Radeon Mobility 9800] + 4a50 R420 JP [Radeon X800XT] + 4a70 R420 [X800XT-PE] (Secondary) 4c42 3D Rage LT Pro AGP-133 0e11 b0e7 Rage LT Pro (Compaq Presario 5240) 0e11 b0e8 Rage 3D LT Pro @@ -452,6 +510,7 @@ 1002 4c50 Rage LT Pro 4c51 3D Rage LT Pro 4c52 Rage Mobility P/M + 1033 8112 Versa Note VXi 4c53 Rage Mobility L 4c54 264LT [Mach64 LT] 4c57 Radeon Mobility M7 LW [Radeon Mobility 7500] @@ -488,9 +547,14 @@ 4e4b R350 NK [Fire GL X2] # New PCI ID provided by ATI developer relations 4e50 RV350 [Mobility Radeon 9600 M10] -# New PCI ID provided by ATI developer relations + 1025 005a TravelMate 290 + 103c 0890 NC6000 laptop + 1734 1055 Amilo M1420W + 4e51 M10 NQ [Radeon Mobility 9600] 4e52 RV350 [Mobility Radeon 9600 M10] + 4e53 M10 NS [Radeon Mobility 9600] 4e54 M10 NT [FireGL Mobility T2] + 4e56 M11 NV [FireGL Mobility T2e] 4e64 Radeon R300 [Radeon 9700 Pro] (Secondary) 4e65 Radeon R300 [Radeon 9500 Pro] (Secondary) 1002 0003 Radeon R300 NE [Radeon 9500 Pro] @@ -568,6 +632,7 @@ 1002 003a Radeon R200 QL [Radeon 8500 LE] 1002 013a Radeon 8500 148c 2026 R200 QL [Radeon 8500 Evil Master II Multi Display Edition] + 1681 0010 Radeon 8500 [3D Prophet 8500 128Mb] 174b 7149 Radeon R200 QL [Sapphire Radeon 8500 LE] 514d Radeon R200 QM [Radeon 9100] 514e Radeon R200 QN [Radeon 8500LE] @@ -576,6 +641,7 @@ 5155 R200 QU [Radeon 9100] 5157 Radeon RV200 QW [Radeon 7500] 1002 013a Radeon 7500 + 1002 103a Dell Optiplex GX260 1458 4000 RV200 QW [RADEON 7500 PRO MAYA AR] 148c 2024 RV200 QW [Radeon 7500LE Dual Display] 148c 2025 RV200 QW [Radeon 7500 Evil Master Multi Display Edition] @@ -596,6 +662,7 @@ 148c 2003 RV100 QY [Radeon 7000 Multi-Display Edition] 148c 2023 RV100 QY [Radeon 7000 Evil Master Multi-Display] 174b 7112 RV100 QY [Sapphire Radeon VE 7000] + 174b 7c28 Sapphire Radeon VE 7000 DDR 1787 0202 RV100 QY [Excalibur Radeon 7000] 515a Radeon RV100 QZ [Radeon 7000/VE] 5168 Radeon R200 Qh @@ -650,29 +717,78 @@ 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT 5455 Rage 128 Pro Ultra TU + 5460 M22 [Radeon Mobility M300] + 5464 M22 [FireGL GL] + 5548 R423 UH [Radeon X800 (PCIE)] + 5549 R423 UI [Radeon X800PRO (PCIE)] + 554a R423 UJ [Radeon X800LE (PCIE)] + 554b R423 UK [Radeon X800SE (PCIE)] + 5551 R423 UQ [FireGL V7200 (PCIE)] + 5552 R423 UR [FireGL V5100 (PCIE)] + 5554 R423 UT [FireGL V7100 (PCIE)] + 556b Radeon R423 UK (PCIE) [X800 SE] (Secondary) 5654 264VT [Mach64 VT] 1002 5654 Mach64VT Reference 5655 264VT3 [Mach64 VT3] 5656 264VT4 [Mach64 VT4] + 5830 RS300 Host Bridge + 5831 RS300 Host Bridge + 5832 RS300 Host Bridge + 5833 Radeon 9100 IGP Host Bridge + 5834 Radeon 9100 IGP + 5835 RS300M AGP [Radeon Mobility 9100IGP] + 5838 Radeon 9100 IGP AGP Bridge 5941 RV280 [Radeon 9200] (Secondary) + 174b 7c12 Sapphire Radeon 9200 # http://www.hightech.com.hk/html/9200.htm 17af 200d Excalibur Radeon 9200 18bc 0050 GeXcube GC-R9200-C3 (Secondary) + 5944 RV280 [Radeon 9200 SE (PCI)] 5960 RV280 [Radeon 9200 PRO] 5961 RV280 [Radeon 9200] + 1002 2f72 All-in-Wonder 9200 Series + 12ab 5961 YUAN SMARTVGA Radeon 9200 + 1458 4018 Gigabyte Radeon 9200 + 174b 7c13 Sapphire Radeon 9200 # http://www.hightech.com.hk/html/9200.htm 17af 200c Excalibur Radeon 9200 + 18bc 0050 Radeon 9200 Game Buster 18bc 0051 GeXcube GC-R9200-C3 + 18bc 0053 Radeon 9200 Game Buster VIVO + 5962 RV280 [Radeon 9200] 5964 RV280 [Radeon 9200 SE] + 1043 c006 ASUS Radeon 9200 SE / TD / 128M + 1458 4018 Radeon 9200 SE 148c 2073 CN-AG92E + 174b 7c13 Sapphire Radeon 9200 SE + 1787 5964 Excalibur 9200SE VIVO 128M + 17af 2012 Radeon 9200 SE Excalibur + 18bc 0170 Sapphire Radeon 9200 SE 128MB Game Buster +# 128MB DDR, DVI/VGA/TV out + 18bc 0173 GC-R9200L(SE)-C3H [Radeon 9200 Game Buster] + 5b60 RV370 5B60 [Radeon X300 (PCIE)] + 1043 002a EAX300SE + 5b62 RV370 5B62 [Radeon X600 (PCIE)] + 5b64 RV370 5B64 [FireGL V3100 (PCIE)] + 5b65 RV370 5B65 [FireGL D1100 (PCIE)] 5c61 RV250 5c61 [Radeon Mobility 9200 M9+] 5c63 RV250 5c63 [Radeon Mobility 9200 M9+] 5d44 RV280 [Radeon 9200 SE] (Secondary) + 1458 4019 Radeon 9200 SE (Secondary) + 174b 7c12 Sapphire Radeon 9200 SE (Secondary) + 1787 5965 Excalibur 9200SE VIVO 128M (Secondary) + 17af 2013 Radeon 9200 SE Excalibur (Secondary) + 18bc 0171 Radeon 9200 SE 128MB Game Buster (Secondary) + 18bc 0172 GC-R9200L(SE)-C3H [Radeon 9200 Game Buster] + 5d57 R423 5F57 [Radeon X800XT (PCIE)] 700f PCI Bridge [IGP 320M] 7010 PCI Bridge [IGP 340M] + 7834 Radeon 9100 PRO IGP + 7835 Radeon Mobility 9200 IGP 7c37 RV350 AQ [Radeon 9600 SE] cab0 AGP Bridge [IGP 320M] cab2 RS200/RS200M AGP Bridge [IGP 340M] + cbb2 RS200/RS200M AGP Bridge [IGP 340M] 1003 ULSI Systems 0201 US201 1004 VLSI Technology Inc @@ -726,6 +842,7 @@ 0011 NS87560 National PCI System I/O 0012 USB Controller 0020 DP83815 (MacPhyter) Ethernet Controller + 103c 0024 Pavilion ze4400 builtin Network 1385 f311 FA311 / FA312 (FA311 with WoL HW) 0022 DP83820 10/100/1000 Ethernet Controller 0028 CS5535 Host bridge @@ -734,12 +851,16 @@ 002e CS5535 Audio 002f CS5535 USB 0030 CS5535 Video + 0035 DP83065 [Saturn] 10/100/1000 Ethernet Controller 0500 SCx200 Bridge 0501 SCx200 SMI 0502 SCx200 IDE 0503 SCx200 Audio 0504 SCx200 Video 0505 SCx200 XBus + 0510 SC1100 Bridge + 0511 SC1100 SMI + 0515 SC1100 XBus d001 87410 IDE 100c Tseng Labs Inc 3202 ET4000/W32p rev A @@ -820,6 +941,7 @@ 1385 2100 FA510 1395 0001 10/100 Ethernet CardBus PC Card 13d1 ab01 EtherFast 10/100 Cardbus (PCMPC200) + 14cb 0100 LNDL-100N 100Base-TX Ethernet PC Card 8086 0001 EtherExpress PRO/100 Mobile CardBus 32 001a Farallon PN9000SX Gigabit Ethernet 0021 DECchip 21052 @@ -915,6 +1037,7 @@ # AS400 iSeries PCI sync serial card 1014 0031 2721 WAN IOA - 2 Port Sync Serial Adapter 0036 Miami + 0037 82660 CPU to PCI Bridge 003a CPU to PCI Bridge 003c GXT250P/GXT255P Graphics Adapter 003e 16/4 Token ring UTP/STP controller @@ -940,6 +1063,7 @@ 005e GXT800P Graphics Adapter 007c ATM Controller (14107c00) 007d 3780IDSP [MWave] + 008b EADS PCI to PCI Bridge 008e GXT3000P Graphics Adapter 0090 GXT 3000P 1014 008e GXT-3000P @@ -953,6 +1077,7 @@ 00a5 ATM Controller (1410a500) 00a6 ATM 155MBPS MM Controller (1410a600) 00b7 256-bit Graphics Rasterizer [Fire GL1] + 1092 00b8 FireGL1 AGP 32Mb 00b8 GXT2000P Graphics Adapter 00be ATM 622MBPS Controller (1410be00) 00dc Advanced Systems Management Adapter (ASMA) @@ -974,6 +1099,7 @@ 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) + 0188 EADS-X PCI-X to PCI-X Bridge 01a7 PCI-X to PCI-X Bridge 01bd ServeRAID Controller 1014 01be ServeRAID-4M @@ -999,6 +1125,7 @@ 028C Citrine chipset SCSI controller 1014 02BE Dual Channel PCI-X U320 DDR SCSI RAID Adapter (571B) 0302 X-Architecture Bridge [Summit] + 0314 ZISC 036 Neural accelerator card ffff MPIC-2 interrupt controller 1015 LSI Logic Corp of Canada 1016 ICL Personal Systems @@ -1048,10 +1175,10 @@ 1020 Hitachi Computer Products 1021 OKI Electric Industry Co. Ltd. 1022 Advanced Micro Devices [AMD] - 1100 K8 NorthBridge - 1101 K8 NorthBridge - 1102 K8 NorthBridge - 1103 K8 NorthBridge + 1100 K8 [Athlon64/Opteron] HyperTransport Technology Configuration + 1101 K8 [Athlon64/Opteron] Address Map + 1102 K8 [Athlon64/Opteron] DRAM Controller + 1103 K8 [Athlon64/Opteron] Miscellaneous Control 2000 79c970 [PCnet32 LANCE] 1014 2000 NetFinity 10/100 Fast Ethernet 1022 2000 PCnet - Fast 79C971 @@ -1081,6 +1208,8 @@ 3000 ELanSC520 Microcontroller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge + 700a AMD-IGR4 AGP Host to PCI Bridge + 700b AMD-IGR4 PCI to PCI Bridge 700c AMD-760 MP [IGD4-2P] System Controller 700d AMD-760 MP [IGD4-2P] AGP Bridge 700e AMD-760 [IGD4-1P] System Controller @@ -1209,6 +1338,8 @@ 1631 M1631 Northbridge+3D Graphics [Aladdin TNT2] 1641 M1641 Northbridge [Aladdin-Pro IV] 1647 M1647 [MaGiK1] PCI North Bridge + 1671 M1671 Northbridge [ALADDiN-P4] + 1672 Northbridge [CyberALADDiN-P4] 3141 M3141 3143 M3143 3145 M3145 @@ -1353,6 +1484,7 @@ 102b 07c1 Millennium G450 SDR Dual Head LE 102b 0d41 Millennium G450 Dual Head PCI 102b 0d42 Millennium G450 Dual Head LX PCI + 102b 0d43 Millennium G450 32Mb Dual Head PCI 102b 0e00 Marvel G450 eTV 102b 0e01 Marvel G450 eTV 102b 0e02 Marvel G450 eTV @@ -1436,13 +1568,18 @@ 102e Olivetti Advanced Technology 102f Toshiba America 0009 r4x00 + 000a TX3927 MIPS RISC PCI Controller 0020 ATM Meteor 155 102f 00f8 ATM Meteor 155 + 0030 TC35815CF PCI 10/100 Mbit Ethernet Controller + 0031 TC35815CF PCI 10/100 Mbit Ethernet Controller with WOL 0105 TC86C001 [goku-s] IDE 0106 TC86C001 [goku-s] USB 1.1 Host 0107 TC86C001 [goku-s] USB Device Controller 0108 TC86C001 [goku-s] I2C/SIO/GPIO Controller - 0180 TX4927 + 0180 TX4927/38 MIPS RISC PCI Controller + 0181 TX4925 MIPS RISC PCI Controller + 0182 TX4937 MIPS RISC PCI Controller 1030 TMC Research 1031 Miro Computer Products AG 5601 DC20 ASIC @@ -1517,7 +1654,12 @@ 0006 85C501/2/3 0008 SiS85C503/5513 (LPC Bridge) 0009 ACPI +# source: http://members.datafast.net.au/dft0802/downloads/pcidevs.txt + 0016 SiS961/2 SMBus Controller 0018 SiS85C503/5513 (LPC Bridge) +# Controller for 2 PATA and 2 SATA channels + 0180 RAID bus controller 180 SATA/PATA [SiS] + 0181 SiS SATA 0200 5597/5598/6326 VGA 1039 0000 SiS5597 SVGA (Shared RAM) 0204 82C204 @@ -1557,6 +1699,7 @@ 0755 755 Host 0760 760/M760 Host 0900 SiS900 PCI Fast Ethernet + 1019 0a14 K7S5A motherboard 1039 0900 SiS900 10/100 Ethernet Adapter 1043 8035 CUSI-FX motherboard 0961 SiS961 [MuTIOL Media IO] @@ -1599,9 +1742,10 @@ 1092 4910 SpeedStar A70 1092 4920 SpeedStar A70 1569 6326 SiS6326 GUI Accelerator - 6330 661FX/M661FX/M661MX/741/M741/760/M760 PCI/AGP - 1039 6330 [M]661FX/M661MX/[M]741/[M]760 PCI/AGP VGA Display Adapter + 6330 661/741/760 PCI/AGP VGA Display Adapter + 1039 6330 [M]661xX/[M]741[GX]/[M]760 PCI/AGP VGA Adapter 7001 USB 1.0 Controller + 1019 0a14 K7S5A motherboard 1039 7000 Onboard USB Controller 7002 USB 2.0 Controller 1509 7002 Onboard USB Controller @@ -1694,13 +1838,14 @@ 3000 Samurai_0 3010 Samurai_1 3020 Samurai_IDE -1043 Asustek Computer, Inc. +1043 ASUSTeK Computer Inc. 0675 ISDNLink P-IN100-ST-D 4015 v7100 SDRAM [GeForce2 MX] 4021 v7100 Combo Deluxe [GeForce2 MX + TV tuner] 4057 v8200 GeForce 3 8043 v8240 PAL 128M [P4T] Motherboard 807b v9280/TD [Geforce4 TI4200 8X With TV-Out and DVI] + 80bb v9180 Magic/T [GeForce4 MX440 AGP 8x 64MB TV-out] 1044 Adaptec (formerly DPT) 1012 Domino RAID Engine a400 SmartCache/Raid I-IV Controller @@ -1769,9 +1914,11 @@ 1046 IPC Corporation, Ltd. 1047 Genoa Systems Corp 1048 Elsa AG + 0c60 Gladiac MX 0d22 Quadro4 900XGL [ELSA GLoria4 900XGL] 1000 QuickStep 1000 3000 QuickStep 3000 + 8901 Gloria XL 1049 Fountain Technologies, Inc. # # nee SGS Thomson Microelectronics 104a STMicroelectronics @@ -1841,15 +1988,19 @@ 8023 TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link) 8024 TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link) 8025 TSB82AA2 IEEE-1394b Link Layer Controller + 55aa 55aa FireWire 800 PCI Card 8026 TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link) 8027 PCI4451 IEEE-1394 Controller 1028 00e6 PCI4451 IEEE-1394 Controller (Dell Inspiron 8100) 8029 PCI4510 IEEE-1394 Controller + 1028 0163 Latitude D505 1071 8160 MIM2900 802e PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller + 8201 PCI1620 Firmware Loading Function 8400 ACX 100 22Mbps Wireless Interface 00fc 16ec U.S. Robotics 22 Mbps Wireless PC Card (model 2210) 00fd 16ec U.S. Robotics 22Mbps Wireless PCI Adapter (model 2216) + 1186 3b00 DWL-650+ PC Card cardbus 22Mbs Wireless Adapter [AirPlus] 1186 3b01 DWL-520+ 22Mbps PCI Wireless Adapter 8401 ACX 100 22Mbps Wireless Interface # OK, this info is almost useless as is, but at least it's known that it's a wireless card. More info requested from reporter (whi @@ -1891,6 +2042,7 @@ ac42 PCI4451 PC card Cardbus Controller 1028 00e6 PCI4451 PC card CardBus Controller (Dell Inspiron 8100) ac44 PCI4510 PC card Cardbus Controller + 1028 0163 Latitude D505 1071 8160 MIM2000 ac46 PCI4520 PC card Cardbus Controller ac50 PCI1410 PC card Cardbus Controller @@ -1898,20 +2050,23 @@ 1014 023b ThinkPad T23 (2647-4MG) 1028 00b1 Latitude C600 1028 012a Latitude C640 + 1033 80cd Versa Note VXi 10cf 1095 Lifebook C6155 e4bf 1000 CP2-2-HIPHOP ac52 PCI1451 PC card Cardbus Controller ac53 PCI1421 PC card Cardbus Controller + ac54 PCI1620 PC Card Controller ac55 PCI1520 PC card Cardbus Controller 1014 0512 ThinkPad T30/T40 ac56 PCI1510 PC card Cardbus Controller + 1014 0528 ThinkPad R40e (2684-HVG) Cardbus Controller ac60 PCI2040 PCI to DSP Bridge Controller 175c 5100 ASI51xx Audio Adapter 175c 6100 ASI61xx Audio Adapter 175c 6200 ASI62xx Audio Adapter ac8d PCI 7620 ac8e PCI7420 CardBus Controller - ac8f PCI7420 Flash Media Controller + ac8f PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. fe00 FireWire Host Controller fe03 12C01A FireWire Host Controller 104d Sony Corporation @@ -1937,6 +2092,8 @@ 0940 W89C940 5a5a W89C940F 6692 W6692 + 9921 W99200F MPEG-1 Video Encoder + 9922 W99200F/W9922PF MPEG-1/2 Video Encoder 9970 W9970CF 1051 Anigma, Inc. 1052 ?Young Micro Systems @@ -1975,6 +2132,7 @@ 175c 4400 ASI4401 Audio Adapter ecc0 0030 Layla 18c0 MPC8265A/MPC8266 + 18c1 MPC8271/MPC8272 4801 Raven 4802 Falcon 4803 Hawk @@ -1998,7 +2156,9 @@ 14c8 0302 SM56 PCI Fax Modem 1668 0300 SM56 PCI Speakerphone Modem 1668 0302 SM56 PCI Fax Modem + 5803 MPC5200 6400 MPC190 Security Processor (S1 family, encryption) + 6405 MPC184 Security Processor (S1 family) 1058 Electronics & Telecommunications RSH 1059 Teknor Industrial Computers Inc 105a Promise Technology, Inc. @@ -2018,6 +2178,8 @@ 3375 PDC20375 (SATA150 TX2plus) 3376 PDC20376 (FastTrak 376) 1043 809e A7V8X motherboard + 3574 PDC20579 SATAII 150 IDE Controller + 3d18 PDC20518 SATAII 150 IDE Controller 4d30 PDC20267 (FastTrak100/Ultra100) 105a 4d33 Ultra100 105a 4d39 FastTrak100 @@ -2189,8 +2351,16 @@ 0049 K2 HT-PCI Bridge 004b U3 AGP 004c K2 GMAC (Sun GEM) + 004f Shasta Mac I/O + 0050 Shasta IDE + 0051 Shasta (Sun GEM) + 0052 Shasta Firewire + 0053 Shasta PCI Bridge + 0054 Shasta PCI Bridge + 0055 Shasta PCI Bridge + 0058 U3L AGP Bridge 1645 Tigon3 Gigabit Ethernet NIC (BCM5701) -106c Hyundai Electronics America +106c Hynix Semiconductor 8801 Dual Pentium ISA/PCI Motherboard 8802 PowerPC ISA/PCI Motherboard 8803 Dual Window Graphics Accelerator @@ -2270,6 +2440,7 @@ 107d LeadTek Research Inc. 0000 P86C850 2134 WinFast 3D S320 II + 2971 [GeForce FX 5900] WinFast A350 TDH MyViVo 107e Interphase Corporation 0001 5515 ATM Adapter [Flipper] 0002 100 VG AnyLan Controller @@ -2347,6 +2518,7 @@ a000 Ultra IIi a001 Ultra IIe a801 Tomatillo PCI Bus Module + abba Cassini 10/100/1000 108f Systemsoft 1090 Encore Computer Corporation 1091 Intergraph Corporation @@ -2357,6 +2529,8 @@ 0060 Proprietary bus bridge 00e4 Powerstorm 4D50T 0720 Motion JPEG codec + 07a0 Sun Expert3D-Lite Graphics Accelerator + 1091 Sun Expert3D Graphics Accelerator 1092 Diamond Multimedia Systems 00a0 Speedstar Pro SE 00a8 Speedstar 64 @@ -2386,9 +2560,19 @@ 1190 PCI-MIO-16E-4 1330 PCI-6031E 1350 PCI-6071E + 14e0 PCI-6110 + 14f0 PCI-6111 17d0 PCI-6503 + 1870 PCI-6713 + 1880 PCI-6711 + 18b0 PCI-6052E 2410 PCI-6733 + 2890 PCI-6036E 2a60 PCI-6023E + 2a70 PCI-6024E + 2a80 PCI-6025E + 2c80 PCI-6035E + 2ca0 PCI-6034E b001 IMAQ-PCI-1408 b011 IMAQ-PXI-1408 b021 IMAQ-PCI-1424 @@ -2403,13 +2587,13 @@ c831 PCI-GPIB bridge 1094 First International Computers [FIC] 1095 Silicon Image, Inc. (formerly CMD Technology Inc) - 0240 Adaptec AAR-1210SA SATA HostRAID + 0240 Adaptec AAR-1210SA SATA HostRAID Contr. 0640 PCI0640 0643 PCI0643 0646 PCI0646 0647 PCI0647 0648 PCI0648 - 0649 PCI0649 + 0649 SiI 0649 Ultra ATA-100 Host Controller 0e11 005d Integrated Ultra ATA-100 Dual Channel Controller 0e11 007e Integrated Ultra ATA-100 IDE RAID Controller 101e 0649 AMI MegaRAID IDE 100 Controller @@ -2420,9 +2604,16 @@ 0680 PCI0680 Ultra ATA-133 Host Controller 1095 3680 Winic W-680 (Silicon Image 680 based) 3112 SiI 3112 [SATALink/SATARaid] Serial ATA Controller - 1095 6112 Asus A7N8X + 1095 3112 SiI 3112 SATALink Controller + 1095 6112 SiI 3112 SATARaid Controller 3114 SiI 3114 [SATALink/SATARaid] Serial ATA Controller + 1095 3114 SiI 3114 SATALink Controller + 1095 6114 SiI 3114 SATARaid Controller + 3124 SiI 3124 PCI-X Serial ATA Controller + 1095 3124 SiI 3124 PCI-X Serial ATA Controller 3512 SiI 3512 [SATALink/SATARaid] Serial ATA Controller + 1095 3512 SiI 3512 SATALink Controller + 1095 6512 SiI 3512 SATARaid Controller 1096 Alacron 1097 Appian Technology 1098 Quantum Designs (H.K.) Ltd @@ -2444,6 +2635,7 @@ 036e Bt878 Video Capture 0070 13eb WinTV Series 0070 ff01 Viewcast Osprey 200 + 0071 0101 DigiTV PCI 107d 6606 WinFast TV 2000 11bd 0012 PCTV pro (TV + FM stereo receiver) 11bd 001c PCTV Sat (DBC receiver) @@ -2454,6 +2646,7 @@ 144f 3000 MagicTView CPH060 - Video 1461 0002 TV98 Series (TV/No FM/Remote) 1461 0004 AVerTV WDM Video Capture + 1461 0761 AverTV DVB-T 14f1 0001 Bt878 Mediastream Controller NTSC 14f1 0002 Bt878 Mediastream Controller PAL BG 14f1 0003 Bt878a Mediastream Controller PAL BG @@ -2462,6 +2655,7 @@ 1851 1850 FlyVideo'98 - Video 1851 1851 FlyVideo II 1852 1852 FlyVideo'98 - Video (with FM Tuner) + 270f fc00 Digitop DTT-1000 bd11 1200 PCTV pro (TV + FM stereo receiver) 036f Bt879 Video Capture 127a 0044 Bt879 Video Capture NTSC @@ -2500,6 +2694,7 @@ 0878 Bt878 Audio Capture 0070 13eb WinTV Series 0070 ff01 Viewcast Osprey 200 + 0071 0101 DigiTV PCI 1002 0001 TV-Wonder 1002 0003 TV-Wonder/VE 11bd 0012 PCTV pro (TV + FM stereo receiver, audio section) @@ -2511,11 +2706,13 @@ 13e9 0070 Win/TV (Audio Section) 144f 3000 MagicTView CPH060 - Audio 1461 0004 AVerTV WDM Audio Capture + 1461 0761 AVerTV DVB-T 14f1 0001 Bt878 Video Capture (Audio Section) 14f1 0002 Bt878 Video Capture (Audio Section) 14f1 0003 Bt878 Video Capture (Audio Section) 14f1 0048 Bt878 Video Capture (Audio Section) 1822 0001 VisionPlus DVB Card + 270f fc00 Digitop DTT-1000 bd11 1200 PCTV pro (TV + FM stereo receiver, audio section) 0879 Bt879 Audio Capture 127a 0044 Bt879 Video Capture (Audio Section) @@ -2631,12 +2828,15 @@ 15ed 1003 MCCS 16-port Serial Hot Swap 9036 9036 9050 PCI <-> IOBus Bridge + 10b5 1067 IXXAT CAN i165 + 10b5 1172 IK220 (Heidenhain) 10b5 2036 SatPak GPS 10b5 2221 Alpermann+Velte PCL PCI LV: Timecode Reader Board 10b5 2273 SH-ARC SoHard ARCnet card 10b5 2431 Alpermann+Velte PCL PCI D: Timecode Reader Board 10b5 2905 Alpermann+Velte PCI TS: Time Synchronisation Board 10b5 9050 MP9050 + 1498 0362 TPMC866 8 Channel Serial Card 1522 0001 RockForce 4 Port V.90 Data/Fax/Voice Modem 1522 0002 RockForce 2 Port V.90 Data/Fax/Voice Modem 1522 0003 RockForce 6 Port V.90 Data/Fax/Voice Modem @@ -2689,6 +2889,8 @@ 125c 0640 Aries 16000P 906e 9060ES 9080 9080 + 103c 10eb (Agilent) E2777B 83K Series PCI based Optical Communication Interface + 103c 10ec (Agilent) E6978-66442 PCI CIC 10b5 9080 9080 [real subsystem ID not set] 129d 0002 Aculab PCI Prosidy card 12d9 0002 PCI Prosody Card @@ -2721,6 +2923,8 @@ 1001 Collage 155 ATM Server Adapter 10b7 3Com Corporation 0001 3c985 1000BaseSX (SX/TX) + 0013 AR5212 802.11abg NIC (3CRDAG675) + 10b7 2031 3CRDAG675 11a/b/g Wireless PCI Adapter 0910 3C910-A01 1006 MINI PCI type 3B Data Fax Modem 1007 Mini PCI 56k Winmodem @@ -2731,6 +2935,7 @@ 1043 80eb P4P800 Mainboard 10b7 0010 3C940 Gigabit LOM Ethernet Adapter 10b7 0020 3C941 Gigabit LOM Ethernet Adapter + 147b 1407 KV8-MAX3 motherboard 3390 3c339 TokenLink Velocity 3590 3c359 TokenLink Velocity XL 10b7 3590 TokenLink Velocity XL Adapter (3C359/359B) @@ -2769,6 +2974,7 @@ 7940 3c803 FDDILink UTP Controller 7980 3c804 FDDILink SAS Controller 7990 3c805 FDDILink DAS Controller + 80eb 3c940B 10/100/1000Base-T 8811 Token ring 9000 3c900 10BaseT [Boomerang] 9001 3c900 10Mbps Combo [Boomerang] @@ -2808,6 +3014,7 @@ 9200 3c905C-TX/TX-M [Tornado] 1028 0095 3C920 Integrated Fast Ethernet Controller 1028 0097 3C920 Integrated Fast Ethernet Controller + 1028 00fe Optiplex GX240 1028 012a 3C920 Integrated Fast Ethernet Controller [Latitude C640] 10b7 1000 3C905C-TX Fast Etherlink for PC Management NIC 10b7 7000 10/100 Mini PCI Ethernet Adapter @@ -2820,6 +3027,8 @@ 9800 3c980-TX Fast Etherlink XL Server Adapter [Cyclone] 10b7 9800 3c980-TX Fast Etherlink XL Server Adapter 9805 3c980-C 10/100baseTX NIC [Python-T] + 10b7 1201 EtherLink Server 10/100 Dual Port A + 10b7 1202 EtherLink Server 10/100 Dual Port B 10b7 9805 3c980 10/100baseTX NIC [Python-T] 10f1 2462 Thunder K7 S2462 9900 3C990-TX [Typhoon] @@ -2861,8 +3070,11 @@ a011 83C170QF b106 SMC34C90 10b9 ALi Corporation + 0101 CMI8338/C3DX PCI Audio Device 0111 C-Media CMI8738/C3DX Audio Device (OEM) 10b9 0111 C-Media CMI8738/C3DX Audio Device (OEM) + 0780 Multi-IO Card + 0782 Multi-IO Card 1435 M1435 1445 M1445 1449 M1449 @@ -2878,6 +3090,7 @@ 10b9 1523 ALI M1523 ISA Bridge 1531 M1531 [Aladdin IV] 1533 M1533 PCI to ISA Bridge [Aladdin IV] + 1014 053b ThinkPad R40e (2684-HVG) PCI to ISA Bridge 10b9 1533 ALI M1533 Aladdin IV ISA Bridge 1541 M1541 10b9 1541 ALI M1541 Aladdin V/V+ AGP System Controller @@ -2892,8 +3105,10 @@ 1647 M1647 Northbridge [MAGiK 1 / MobileMAGiK 1] 1651 M1651/M1651T Northbridge [Aladdin-Pro 5/5M,Aladdin-Pro 5T/5TM] 1671 M1671 Super P4 Northbridge [AGP4X,PCI and SDR/DDR] + 1672 M1672 Northbridge [CyberALADDiN-P4] 1681 M1681 P4 Northbridge [AGP8X,HyperTransport and SDR/DDR] 1687 M1687 K8 Northbridge [AGP8X and HyperTransport] + 1689 M1689 K8 Northbridge [Super K8 Single Chip] 3141 M3141 3143 M3143 3145 M3145 @@ -2910,22 +3125,34 @@ 5225 M5225 5229 M5229 IDE 1014 050f ThinkPad R30 + 1014 053d ThinkPad R40e (2684-HVG) builtin IDE + 103c 0024 Pavilion ze4400 builtin IDE 1043 8053 A7A266 Motherboard IDE 5235 M5225 5237 USB 1.1 Controller + 1014 0540 ThinkPad R40e (2684-HVG) builtin USB + 103c 0024 Pavilion ze4400 builtin USB 5239 USB 2.0 Controller 5243 M1541 PCI to AGP Controller + 5246 AGP8X Controller 5247 PCI to AGP Controller 5249 M5249 HTT to PCI Bridge 5251 M5251 P1394 OHCI 1.0 Controller 5253 M5253 P1394 OHCI 1.1 Controller 5261 M5261 Ethernet Controller + 5263 M5263 Ethernet Controller + 5281 ALi M5281 Serial ATA / RAID Host Controller 5450 Lucent Technologies Soft Modem AMR 5451 M5451 PCI AC-Link Controller Audio Device 1014 0506 ThinkPad R30 + 1014 053e ThinkPad R40e (2684-HVG) builtin Audio + 103c 0024 Pavilion ze4400 builtin Audio + 10b9 5451 HP Compaq nc4010 (DY885AA#ABN) 5453 M5453 PCI AC-Link Controller Modem Device 5455 M5455 PCI AC-Link Controller Audio Device 5457 M5457 AC'97 Modem Controller + 1014 0535 ThinkPad R40e (2684-HVG) builtin modem + 103c 0024 Pavilion ze4400 builtin Modem Device # Same but more usefull for driver's lookup 5459 SmartLink SmartPCI561 56K Modem # SmartLink PCI SoftModem @@ -2934,6 +3161,8 @@ 5473 M5473 SD-MMC Controller 7101 M7101 Power Management Controller [PMU] 1014 0510 ThinkPad R30 + 1014 053c ThinkPad R40e (2684-HVG) Power Management Controller + 103c 0024 Pavilion ze4400 10ba Mitsubishi Electric Corp. 0301 AccelGraphics AccelECLIPSE 0304 AccelGALAXY A2100 [OEM Evans & Sutherland] @@ -2990,6 +3219,7 @@ 0e11 b126 MagicMedia 256AV Audio Device on Durango 1014 00dd MagicMedia 256AV Audio Device on BlackTip Thinkpad 1025 1003 MagicMedia 256AV Audio Device on TravelMate 720 + 1028 0088 Latitude CPi A 1028 008f MagicMedia 256AV Audio Device on Colorado Inspiron 103c 0007 MagicMedia 256AV Audio Device on Voyager II 103c 0008 MagicMedia 256AV Audio Device on Voyager III @@ -3074,6 +3304,7 @@ 1043 0205 PCI-V3800 1043 4000 AGP-V3800PRO 1048 0c21 Synergy II + 1048 0c31 Erazor III 107d 2134 WinFast 3D S320 II + TV-Out 1092 4804 Viper V770 1092 4a00 Viper V770 @@ -3115,7 +3346,35 @@ 1554 1041 Pixelview RIVA TNT2 M64 002e NV6 [Vanta] 002f NV6 [Vanta] - 0041 NV40 OS1RT00B30 + 0034 MCP04 SMBus + 0035 MCP04 IDE + 0036 MCP04 Serial ATA Controller + 0037 MCP04 Ethernet Controller + 0038 MCP04 Ethernet Controller + 003a MCP04 AC'97 Audio Controller + 003b MCP04 USB Controller + 003c MCP04 USB Controller + 003d MCP04 PCI Bridge + 003e MCP04 Serial ATA Controller + 0040 NV40 [GeForce 6800 Ultra] + 0041 NV40 [GeForce 6800] + 0042 NV40.2 + 0043 NV40.3 + 0045 NV40 [GeForce 6800 GT] + 0049 NV40GL + 004e NV40GL [Quadro FX 4000] + 0052 CK804 SMBus + 0053 CK804 IDE + 0054 CK804 Serial ATA Controller + 0055 CK804 Serial ATA Controller + 0056 CK804 Ethernet Controller + 0057 CK804 Ethernet Controller + 0059 CK804 AC'97 Audio Controller + 005a CK804 USB Controller + 005b CK804 USB Controller + 005c CK804 PCI Bridge + 005d CK804 PCIE Bridge + 005e CK804 Memory Controller 0060 nForce2 ISA Bridge 1043 80ad A7N8X Mainboard 0064 nForce2 SMBus (MCP) @@ -3128,14 +3387,30 @@ 1043 0c11 A7N8X Mainboard 006a nForce2 AC97 Audio Controler (MCP) 006b nForce MultiMedia audio [Via VT82C686B] + 10de 006b nForce2 MCP Audio Processing Unit 006c nForce2 External PCI Bridge 006d nForce2 PCI Bridge 006e nForce2 FireWire (IEEE 1394) Controller + 0084 MCP2A SMBus + 0085 MCP2A IDE + 0086 MCP2A Ethernet Controller + 0087 MCP2A USB Controller + 0088 MCP2A USB Controller + 008a MCP2S AC'97 Audio Controller + 008b MCP2A PCI Bridge + 008c MCP2A Ethernet Controller + 008e nForce2 Serial ATA Controller 00a0 NV5 [Aladdin TNT2] 14af 5810 Maxi Gamer Xentor + 00c0 NV41.0 + 00c1 NV41.1 + 00c2 NV41.2 + 00c8 NV41.8 + 00ce NV41GL 00d0 nForce3 LPC Bridge 00d1 nForce3 Host Bridge 00d2 nForce3 AGP Bridge + 00d3 CK804 Memory Controller 00d4 nForce3 SMBus 00d5 nForce3 IDE 00d6 nForce3 Ethernet @@ -3143,6 +3418,29 @@ 00d8 nForce3 USB 2.0 00da nForce3 Audio 00dd nForce3 PCI Bridge + 00df CK8S Ethernet Controller + 00e1 nForce3 250Gb Host Bridge + 00e2 nForce3 250Gb AGP Host to PCI Bridge + 00e3 CK8S Serial ATA Controller (v2.5) + 00e4 nForce 250Gb PCI System Management + 00e5 CK8S Parallel ATA Controller (v2.5) + 00e6 CK8S Ethernet Controller + 00e7 CK8S USB Controller + 00e8 CK8S USB Controller + 00ea nForce3 250Gb AC'97 Audio Controller + 00ed nForce3 250Gb PCI-to-PCI Bridge + 00ee CK8S Serial ATA Controller (v2.5) + 00f0 NV40 [GeForce 6800/GeForce 6800 Ultra] + 00f1 NV43 [GeForce 6600/GeForce 6600 GT] + 00f2 NV43 [GeForce 6600 GT] + 00f8 NV45GL [Quadro FX 3400] + 00f9 NV40 [GeForce 6800 Ultra] + 00fa NV36 [GeForce PCX 5750] + 00fb NV35 [GeForce PCX 5900] + 00fc NV37GL [Quadro FX 330/GeForce PCX 5300] + 00fd NV37GL [Quadro FX 330] + 00fe NV38GL [Quadro FX 1300] + 00ff NV18 [GeForce PCX 4300] 0100 NV10 [GeForce 256 SDR] 1043 0200 AGP-V6600 SGRAM 1043 0201 AGP-V6600 SDRAM @@ -3161,6 +3459,7 @@ 0110 NV11 [GeForce2 MX/MX 400] 1043 4015 AGP-V7100 Pro 1043 4031 V7100 Pro with TV output + 10de 0091 Dell OEM GeForce 2 MX 400 1462 8817 MSI GeForce2 MX400 Pro32S [MS-8817] 14af 7102 3D Prophet II MX 14af 7103 3D Prophet II MX Dual-Display @@ -3197,6 +3496,7 @@ 017a NV17GL [Quadro4 200/400 NVS] 017b NV17GL [Quadro4 550 XGL] 017c NV17GL [Quadro4 550 GoGL] + 017d NV17 [GeForce4 410 Go 16M] 0181 NV18 [GeForce4 MX 440 AGP 8x] 1043 806f V9180 Magic 1462 8880 MS-StarForce GeForce4 MX 440 with AGP8X @@ -3206,14 +3506,18 @@ 0182 NV18 [GeForce4 MX 440SE AGP 8x] 0183 NV18 [GeForce4 MX 420 AGP 8x] 0185 NV18 [GeForce4 MX 4000 AGP 8x] + 0186 NV18M [GeForce4 448 Go] + 0187 NV18M [GeForce4 488 Go] 0188 NV18GL [Quadro4 580 XGL] 018a NV18GL [Quadro4 NVS AGP 8x] 018b NV18GL [Quadro4 380 XGL] + 018d NV18M [GeForce4 448 Go] 01a0 NVCrush11 [GeForce2 MX Integrated Graphics] 01a4 nForce CPU bridge 01ab nForce 420 Memory Controller (DDR) 01ac nForce 220/420 Memory Controller 01ad nForce 220/420 Memory Controller + 01b0 nForce Audio 01b1 nForce Audio 01b2 nForce ISA Bridge 01b4 nForce PCI System Management @@ -3241,6 +3545,7 @@ 0203 NV20DCC [Quadro DCC] 0250 NV25 [GeForce4 Ti 4600] 0251 NV25 [GeForce4 Ti 4400] + 1043 8023 v8440 GeForce 4 Ti4400 0252 NV25 [GeForce4 Ti] 0253 NV25 [GeForce4 Ti 4200] 107d 2896 WinFast A250 LE TD (Dual VGA/TV-out/DVI) @@ -3254,6 +3559,7 @@ 0286 NV28 [GeForce4 Ti 4200 Go AGP 8x] 0288 NV28GL [Quadro4 980 XGL] 0289 NV28GL [Quadro4 780 XGL] + 028c NV28GLM [Quadro4 700 GoGL] 0300 NV30 [GeForce FX] 0301 NV30 [GeForce FX 5800 Ultra] 0302 NV30 [GeForce FX 5800] @@ -3261,32 +3567,66 @@ 0309 NV30GL [Quadro FX 1000] 0311 NV31 [GeForce FX 5600 Ultra] 0312 NV31 [GeForce FX 5600] + 0313 NV31 0314 NV31 [GeForce FX 5600XT] + 1043 814a V9560XT/TD + 0316 NV31 + 0317 NV31 031a NV31M [GeForce FX Go 5600] + 031b NV31M [GeForce FX Go5650] 031c NVIDIA Quadro FX 700 Go + 031d NV31 + 031e NV31 + 031f NV31 + 0320 NV34 [GeForce FX 5200] 0321 NV34 [GeForce FX 5200 Ultra] 0322 NV34 [GeForce FX 5200] 1462 9171 MS-8917 (FX5200-T128) + 0323 NV34 [GeForce FX 5200LE] 0324 NV34M [GeForce FX Go 5200] 1071 8160 MIM2000 + 0325 NV34M [GeForce FX Go5250] + 0326 NV34 [GeForce FX 5500] + 0327 NV34 [GeForce FX 5100] 0328 NV34M [GeForce FX Go 5200] 0329 NV34M [GeForce FX Go5200] - 032b NV34GL [Quadro FX 500] + 032a NV34GL [Quadro NVS 280 PCI] + 032b NV34GL [Quadro FX 500/600 PCI] 032c NV34GLM [GeForce FX Go 5300] + 032d NV34 [GeForce FX Go5100] + 032f NV34 0330 NV35 [GeForce FX 5900 Ultra] 0331 NV35 [GeForce FX 5900] + 1043 8145 V9950GE 0332 NV35 [GeForce FX 5900XT] 0333 NV38 [GeForce FX 5950 Ultra] + 0334 NV35 [GeForce FX 5900ZT] 0338 NV35GL [Quadro FX 3000] - 0341 NV 36 [GeForce 5700 Ultra] - 0342 NV 36 [GeForce 5700] + 033f NV35GL [Quadro FX 700] + 0341 NV36.1 [GeForce FX 5700 Ultra] + 0342 NV36.2 [GeForce FX 5700] + 0343 NV36 [GeForce FX 5700LE] + 0344 NV36.4 [GeForce FX 5700VE] + 0345 NV36.5 + 0347 NV36 [GeForce FX Go5700] + 0348 NV36 [GeForce FX Go5700] + 0349 NV36 + 034b NV36 + 034c NV36 [Quadro FX Go1000] + 034e NV36GL [Quadro FX 1100] + 034f NV36GL 10df Emulex Corporation 1ae5 LP6000 Fibre Channel Host Adapter 1ae6 LP 8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2) 1ae7 LP 8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:2-3) + f015 LP1150e f085 LP850 Fibre Channel Adapter f095 LP952 Fibre Channel Adapter f098 LP982 Fibre Channel Adapter + f0a1 LightPulse Fibre Channel Adapter + f0a5 LP1050 + f0d5 LP1150 + f100 LP11000e f700 LP7000 Fibre Channel Host Adapter f701 LP 7000EFibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2) f800 LP8000 Fibre Channel Host Adapter @@ -3297,6 +3637,9 @@ f981 LP 9802 Fibre Channel Host Adapter Alternate ID f982 LP 9802 Fibre Channel Host Adapter Alternate ID fa00 LP10000 Fibre Channel Host Adapter + fa01 LP101 + fb00 LightPulse Fibre Channel Adapter + fd00 LP11000 10e0 Integrated Micro Solutions Inc. 5026 IMS5026/27/28 5027 IMS5027 @@ -3314,6 +3657,8 @@ 0000 CA91C042 [Universe] 0860 CA91C860 [QSpan] 0862 CA91C862A [QSpan-II] + 8260 CA91L8200B [Dual PCI PowerSpan II] + 8261 CA91L8260B [Single PCI PowerSpan II] 10e4 Tandem Computers 10e5 Micro Industries Corporation 10e6 Gainbery Computer Products Inc. @@ -3333,8 +3678,18 @@ 80d9 PCI-9118 80da PCI-9812 811a PCI-IEEE1355-DS-DE Interface + 814c Fastcom ESCC-PCI (Commtech, Inc.) 8170 S5933 [Matchmaker] (Chipset Development Tool) +# sold with Roper Scientifc(Photometrics) CoolSnap HQ camera + 81e6 Multimedia video controller + 8291 Fastcom 232/8-PCI (Commtech, Inc.) + 82c4 Fastcom 422/4-PCI (Commtech, Inc.) + 82c5 Fastcom 422/2-PCI (Commtech, Inc.) + 82c6 Fastcom IG422/1-PCI (Commtech, Inc.) + 82c7 Fastcom IG232/2-PCI (Commtech, Inc.) + 82ca Fastcom 232/4-PCI (Commtech, Inc.) 82db AJA HDNTV HD SDI Framestore + 82e2 Fastcom DIO24H-PCI (Commtech, Inc.) 8851 S5933 on Innes Corp FM Radio Capture card 10e9 Alps Electric Co., Ltd. 10ea Intergraphics Systems @@ -3363,6 +3718,8 @@ 8138 RT8139 (B/C) Cardbus Fast Ethernet Adapter 10ec 8138 RT8139 (B/C) Fast Ethernet Adapter 8139 RTL-8139/8139C/8139C+ + 0357 000a TTP-Monitoring Card V2.0 + 1025 005a TravelMate 290 1025 8920 ALN-325 1025 8921 ALN-325 1071 8160 MIM2000 @@ -3378,19 +3735,23 @@ 1429 d010 ND010 1432 9130 EN-9130TX 1436 8139 RT8139 - 1458 e000 GA-7VM400M Motherboard + 1458 e000 GA-7VM400M/7VT600 Motherboard 146c 1439 FE-1439TX 1489 6001 GF100TXRII 1489 6002 GF100TXRA 149c 139a LFE-8139ATX 149c 8139 LFE-8139TX + 14cb 0200 LNR-100 Family 10/100 Base-TX Ethernet 1799 5000 F5D5000 PCI Card/Desktop Network PCI Card 2646 0001 EtheRx 8e2e 7000 KF-230TX 8e2e 7100 KF-230TX/2 a0a0 0007 ALN-325C 8169 RTL-8169 Gigabit Ethernet + 1259 c107 CG-LAPCIGT 1371 434e ProG-2000L + 1458 e000 GA-K8VT800 Pro Motherboard + 1462 702c K8T NEO 2 motherboard 8180 RTL8180L 802.11b MAC 8197 SmartLAN56 56K Modem 10ed Ascii Corporation @@ -3455,6 +3816,7 @@ 1102 8061 SBLive! Player 5.1 1102 8064 SB Live! 5.1 Model SB0100 1102 8065 SBLive! 5.1 Digital Model SB0220 + 1102 8067 SBLive! 5.1 eMicro 28028 0004 SB Audigy 1102 0051 SB0090 Audigy Player 1102 0053 SB0090 Audigy Player/OEM @@ -3462,6 +3824,9 @@ 1102 2002 SB Audigy 2 ZS (SB0350) 0006 [SB Live! Value] EMU10k1X 0007 SB Audigy LS + 1102 1001 SB0310 Audigy LS + 1102 1002 SB0312 Audigy LS + 0008 SB0400 Audigy2 Value 4001 SB Audigy FireWire Port 1102 0010 SB Audigy FireWire Port 7002 SB Live! MIDI/Game Port @@ -3470,6 +3835,8 @@ 1102 0040 SB Audigy MIDI/Game Port 7004 [SB Live! Value] Input device controller 7005 SB Audigy LS MIDI/Game port + 1102 1001 SB0310 Audigy LS MIDI/Game port + 1102 1002 SB0312 Audigy LS MIDI/Game port 8064 SB0100 [SBLive! 5.1 OEM] 8938 Ectiva EV1938 1103 Triones Technologies, Inc. @@ -3477,7 +3844,12 @@ # Revisions: 01=HPT366, 03=HPT370, 04=HPT370A, 05=HPT372 0004 HPT366/368/370/370A/372 1103 0001 HPT370A + 1103 0003 HPT343 / HPT345 / HPT363 UDMA33 + 1103 0004 HPT366 UDMA66 (r1) / HPT368 UDMA66 (r2) / HPT370 UDMA100 (r3) / HPT370 UDMA100 RAID (r4) 1103 0005 HPT370 UDMA100 + 1103 0006 HPT302 + 1103 0007 HPT371 UDMA133 + 1103 0008 HPT374 UDMA/ATA133 RAID Controller 0005 HPT372A 0006 HPT302 0007 HPT371 @@ -3519,6 +3891,9 @@ 1179 0001 Magnia Z310 1297 f641 FX41 motherboard 1458 5002 GA-7VAX Mainboard + 1462 7020 K8T NEO 2 motherboard + 147b 1407 KV8-MAX3 motherboard + 1849 0571 K7VT2 motherboard 0576 VT82C576 3V [Apollo Master] 0585 VT82C585VP [Apollo VP1/VPX] 0586 VT82C586/A/B PCI-to-ISA [Apollo VP] @@ -3555,6 +3930,7 @@ 1106 VT82C570MV 1571 VT82C576M/VT82C586 1595 VT82C595/97 [Apollo VP2/97] + 3022 CLE266 # This is *not* USB 2.0 as the existing entry suggests 3038 VT82xxxxx UHCI USB 1.1 Controller 0925 1234 USB Controller @@ -3565,12 +3941,17 @@ 1043 80ed A7V600 motherboard 1179 0001 Magnia Z310 1458 5004 GA-7VAX Mainboard + 1462 7020 K8T NEO 2 motherboard + 147b 1407 KV8-MAX3 motherboard 3040 VT82C586B ACPI 3043 VT86C100A [Rhine] 10bd 0000 VT86C100A Fast Ethernet Adapter 1106 0100 VT86C100A Fast Ethernet Adapter 1186 1400 DFE-530TX rev A 3044 IEEE 1394 Host Controller + 1025 005a TravelMate 290 + 1458 1000 GA-7VT600-1394 Motherboard + 1462 702d K8T NEO 2 motherboard 3050 VT82C596 Power Management 3051 VT82C596 Power Management 3053 VT6105M [Rhine-III] @@ -3597,16 +3978,20 @@ 1043 80a1 A7V8X-X Motherboard 1043 80b0 A7V600 motherboard (ADI AD1980 codec [SoundMAX]) 1106 3059 L7VMM2 Motherboard + 1106 4161 K7VT2 motherboard 1297 c160 FX41 motherboard (Realtek ALC650 codec) 1458 a002 GA-7VAX Onboard Audio (Realtek ALC650) + 1462 0080 K8T NEO 2 motherboard 1462 3800 KT266 onboard audio + 147b 1407 KV8-MAX3 motherboard 3065 VT6102 [Rhine-II] 1043 80a1 A7V8X-X Motherboard 1106 0102 VT6102 [Rhine II] Embeded Ethernet Controller on VT8235 1186 1400 DFE-530TX rev A 1186 1401 DFE-530TX rev B 13b9 1421 LD-10/100AL PCI Fast Ethernet Adapter (rev.B) - 3068 Intel 537 [AC97 Modem] +# This hosts more than just the Intel 537 codec, it also hosts PCtel (SIL33) and SmartLink (SIL34) codecs + 3068 AC'97 Modem Controller 1462 309e MS-6309 Saturn Motherboard 3074 VT8233 PCI to ISA Bridge 1043 8052 VT8233A @@ -3614,6 +3999,7 @@ 3099 VT8366/A/7 [Apollo KT266/A/333] 1043 8064 A7V266-E Mainboard 1043 807f A7V333 Mainboard + 1849 3099 K7VT2 motherboard 3101 VT8653 Host Bridge 3102 VT8662 Host Bridge 3103 VT8615 Host Bridge @@ -3624,12 +4010,17 @@ 1043 80ed A7V600 motherboard 1297 f641 FX41 motherboard 1458 5004 GA-7VAX Mainboard + 1462 7020 K8T NEO 2 motherboard + 147b 1407 KV8-MAX3 motherboard 3106 VT6105 [Rhine-III] 1186 1403 DFE-530TX rev C + 3108 S3 Unichrome Pro VGA Adapter 3109 VT8233C PCI to ISA Bridge 3112 VT8361 [KLE133] Host Bridge 3116 VT8375 [KM266/KL266] Host Bridge 1297 f641 FX41 motherboard + 3118 S3 Unichrome Pro VGA Adapter + 3119 VT6120/VT6121/VT6122 Gigabit Ethernet Adapter # found on EPIA M6000/9000 mainboard 3122 VT8623 [Apollo CLE266] integrated CastleRock graphics # found on EPIA M6000/9000 mainboard @@ -3640,6 +4031,7 @@ 3148 P4M266 Host Bridge 3149 VIA VT6420 SATA RAID Controller 1043 80ed A7V600 motherboard + 1458 b003 GA-7VM400AM(F) Motherboard 1462 7020 MSI Neo K8T FIS2R mainboard 3156 P/KN266 Host Bridge # on ASUS P4P800 @@ -3651,20 +4043,27 @@ 1043 80a1 A7V8X-X motherboard 1297 f641 FX41 motherboard 1458 5001 GA-7VAX Mainboard + 1849 3177 K7VT2 motherboard 3188 VT8385 [K8T800 AGP] Host Bridge + 147b 1407 KV8-MAX3 motherboard 3189 VT8377 [KT400/KT600 AGP] Host Bridge 1043 807f A7V8X motherboard 1458 5000 GA-7VAX Mainboard -# Updated the entry to the proper "chip [name] desc" format - 3205 VT8378 [KM400] Chipset Host Bridge + 3204 K8M800 + 3205 VT8378 [KM400/A] Chipset Host Bridge 1458 5000 GA-7VM400M Motherboard - 3227 VT8237 ISA bridge [K8T800 South] + 3227 VT8237 ISA bridge [KT600/K8T800 South] 1043 80ed A7V600 motherboard + 1106 3227 DFI KT600-AL Motherboard + 1458 5001 GA-7VT600 Motherboard + 147b 1407 KV8-MAX3 motherboard + 4149 VIA VT6420 (ATA133) Controller 5030 VT82C596 ACPI [Apollo PRO] 6100 VT85C100A [Rhine II] + 7204 K8M800 # S3 Graphics UniChromeâ„¢ 2D/3D Graphics with motion compensation 7205 VT8378 [S3 UniChrome] Integrated Video - 1458 d000 GA-7VM400M Motherboard + 1458 d000 Gigabyte GA-7VM400(A)M(F) Motherboard 8231 VT8231 [PCI-to-ISA Bridge] 8235 VT8235 ACPI 8305 VT8363/8365 [KT133/KM133 AGP] @@ -3686,6 +4085,7 @@ b112 VT8361 [KLE133] AGP Bridge b168 VT8235 PCI Bridge b188 VT8237 PCI bridge [K8T800 South] + 147b 1407 KV8-MAX3 motherboard b198 VT8237 PCI Bridge # 32-Bit PCI bus master Ethernet MAC with standard MII interface d104 VT8237 Integrated Fast Ethernet Controller @@ -3711,9 +4111,12 @@ 007b FSC Remote Service Controller, mailbox device 007c FSC Remote Service Controller, shared memory device 007d FSC Remote Service Controller, SMIC device - 2102 DSCC4 WAN adapter +# Superfastcom-PCI (Commtech, Inc.) or DSCC4 WAN Adapter + 2102 DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Contr. 2104 Eicon Diva 2.02 compatible passive ISDN card + 3142 SIMATIC NET CP 5613A1 (Profibus Adapter) 4021 SIMATIC NET CP 5512 (Profibus and MPI Cardbus Adapter) + 4029 SIMATIC NET CP 5613A2 (Profibus Adapter) 4942 FPGA I-Bus Tracer for MBD 6120 SZB6120 110b Chromatic Research Inc. @@ -3745,6 +4148,8 @@ 9211 EN-1207D Fast Ethernet Adapter 1113 9211 EN-1207D Fast Ethernet Adapter 9511 21x4x DEC-Tulip compatible Fast Ethernet + d301 CPWNA100 (Philips wireless PCMCIA) + ec02 SMC 1244TX v3 1114 Atmel Corporation 0506 802.11b Wireless Network Adaptor (at76c506) 1115 3D Labs @@ -3854,9 +4259,11 @@ 111b Teledyne Electronic Systems 111c Tricord Systems Inc. 0001 Powerbis Bridge -111d Integrated Device Tech - 0001 IDT77211 ATM Adapter - 0003 IDT77252 ATM network controller +111d Integrated Device Technology, Inc. + 0001 IDT77201/77211 155Mbps ATM SAR Controller [NICStAR] + 0003 IDT77222/77252 155Mbps ATM MICRO ABR SAR Controller + 0004 IDT77V252 155Mbps ATM MICRO ABR SAR Controller + 0005 IDT77V222 155Mbps ATM MICRO ABR SAR Controller 111e Eldec 111f Precision Digital Images 4a47 Precision MX Video engine interface @@ -3890,10 +4297,13 @@ 1561 USB 1.1 Host Controller 1562 USB 2.0 Host Controller 3400 SmartPCI56(UCB1500) 56K Modem + 5400 TriMedia TM1000/1100 + 5402 TriMedia TM-1300 7130 SAA7130 Video Broadcast Decoder 5168 0138 LiveView FlyVideo 2000 - 7133 SAA7133 Audio+video broadcast decoder + 7133 SAA713X Audio+video broadcast decoder 5168 0138 LifeView FlyVideo 3000 + 5168 0212 LifeView FlyTV Platinum mini # PCI audio and video broadcast decoder (http://www.semiconductors.philips.com/pip/saa7134hl) 7134 SAA7134 7135 SAA7135 Audio+video broadcast decoder @@ -3906,7 +4316,7 @@ 114b 2003 DVRaptor Video Edit/Capture Card 11bd 0006 DV500 Overlay 11bd 000a DV500 Overlay - 13c2 0000 Siemens/Technotrend/Hauppauge DVB card rev1.3 + 13c2 0000 Siemens/Technotrend/Hauppauge DVB card rev1.3 or rev1.5 13c2 0001 Technotrend/Hauppauge DVB card rev1.3 or rev1.6 13c2 0002 Technotrend/Hauppauge DVB card rev2.1 13c2 0003 Technotrend/Hauppauge DVB card rev2.1 @@ -3998,9 +4408,14 @@ 1133 2002 Diva Server 4PRI/E1-120 1133 2003 Diva Server 4PRI/T1-96 e024 Diva Server Analog-4P + 1133 2400 Diva Server V-Analog-4P + 1133 e024 Diva Server Analog-4P e028 Diva Server Analog-8P + 1133 2800 Diva Server V-Analog-8P + 1133 e028 Diva Server Analog-8P 1134 Mercury Computer Systems 0001 Raceway Bridge + 0002 Dual PCI to RapidIO Bridge 1135 Fuji Xerox Co Ltd 0001 Printer controller 1136 Momentum Data Systems @@ -4048,7 +4463,8 @@ f015 NinjaSCSI-32 Melco 1146 Force Computers 1147 Interface Corp -1148 Syskonnect (Schneider & Koch) +# Formerly (Schneider & Koch) +1148 SysKonnect 4000 FDDI Adapter 0e11 b03b Netelligent 100 FDDI DAS Fibre SC 0e11 b03c Netelligent 100 FDDI SAS Fibre SC @@ -4106,6 +4522,14 @@ 1148 9521 SK-9521 10/100/1000Base-T Adapter 4400 SK-9Dxx Gigabit Ethernet Adapter 4500 SK-9Mxx Gigabit Ethernet Adapter + 9e00 SK-9Exx 10/100/1000Base-T Adapter + 1148 2100 SK-9E21 Server Adapter + 1148 21d0 SK-9E21D 10/100/1000Base-T Adapter + 1148 2200 SK-9E22 Server Adapter + 1148 8100 SK-9E81 Server Adapter + 1148 8200 SK-9E82 Server Adapter + 1148 9100 SK-9E91 Server Adapter + 1148 9200 SK-9E92 Server Adapter 1149 Win System Corporation 114a VMIC 5579 VMIPCI-5579 (Reflective Memory Card) @@ -4259,6 +4683,7 @@ 0212 CSB5 IDE Controller 4c53 1080 CT8 mainboard 0213 CSB6 RAID/IDE Controller + 0217 CSB6 IDE Controller 0220 OSB4/CSB5 OHCI USB Controller 4c53 1080 CT8 mainboard 0221 CSB6 OHCI USB Controller @@ -4268,6 +4693,7 @@ 0227 GCLE-2 Host Bridge 0230 CSB5 LPC bridge 4c53 1080 CT8 mainboard + 0240 K2 SATA 1167 Mutoh Industries Inc 1168 Thine Electronics Inc 1169 Centre for Development of Advanced Computing @@ -4300,7 +4726,7 @@ 0603 ToPIC95 PCI to CardBus Bridge for Notebooks 060a ToPIC95 060f ToPIC97 - 0617 ToPIC95 PCI to Cardbus Bridge with ZV Support + 0617 ToPIC100 PCI to Cardbus Bridge with ZV Support 0618 CPU to PCI and PCI to ISA bridge # Claimed to be Lucent DSP1645 [Mars], but that's apparently incorrect. Does anyone know the correct ID? 0701 FIR Port @@ -4342,16 +4768,33 @@ 1002 DL10050 Sundance Ethernet 1186 1002 DFE-550TX 1186 1012 DFE-580TX + 1025 AirPlus Xtreme G DWL-G650 Adapter + 1026 AirXpert DWL-AG650 Wireless Cardbus Adapter + 1043 AirXpert DWL-AG650 Wireless Cardbus Adapter 1300 RTL8139 Ethernet 1186 1300 DFE-538TX 10/100 Ethernet Adapter 1186 1301 DFE-530TX+ 10/100 Ethernet Adapter 1340 DFE-690TXD CardBus PC Card 1541 DFE-680TXD CardBus PC Card 1561 DRP-32TXD Cardbus PC Card + 2027 AirPlus Xtreme G DWL-G520 Adapter + 3203 AirPlus Xtreme G DWL-G520 Adapter 3300 DWL-510 2.4GHz Wireless PCI Adapter + 3a03 AirPro DWL-A650 Wireless Cardbus Adapter(rev.B) + 3a04 AirPro DWL-AB650 Multimode Wireless Cardbus Adapter + 3a05 AirPro DWL-AB520 Multimode Wireless PCI Adapter + 3a07 AirXpert DWL-AG650 Wireless Cardbus Adapter + 3a08 AirXpert DWL-AG520 Wireless PCI Adapter + 3a10 AirXpert DWL-AG650 Wireless Cardbus Adapter(rev.B) + 3a11 AirXpert DWL-AG520 Wireless PCI Adapter(rev.B) + 3a12 AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C) + 3a13 AirPlus DWL-G520 Wireless PCI Adapter(rev.B) + 3a14 AirPremier DWL-AG530 Wireless PCI Adapter + 3a63 AirXpert DWL-AG660 Wireless Cardbus Adapter 3b05 DWL-G650+ CardBus PC Card 4000 DL2000-based Gigabit Ethernet 4c00 Gigabit Ethernet Adapter + 1186 4c00 DGE-530T Gigabit Ethernet Adapter 8400 D-Link DWL-650+ CardBus PC Card 1187 Advanced Technology Laboratories, Inc. 1188 Shima Seiki Manufacturing Ltd. @@ -4432,9 +4875,118 @@ # Formerly Galileo Technology, Inc. 11ab Marvell Technology Group Ltd. 0146 GT-64010/64010A System Controller + 138f W8300 802.11 Adapter (rev 07) 1fa6 Marvell W8300 802.11 Adapter 4146 GT-64011/GT-64111 System Controller - 4320 Yukon Gigabit Ethernet 10/100/1000Base-T Adapter + 4320 Gigabit Ethernet Controller + 1019 0f38 Marvell 88E8001 Gigabit Ethernet Controller (ECS) + 1019 8001 Marvell 88E8001 Gigabit Ethernet Controller (ECS) + 1043 173c Marvell 88E8001 Gigabit Ethernet Controller (Asus) + 1043 811a Marvell 88E8001 Gigabit Ethernet Controller (Asus) + 105b 0c19 Marvell 88E8001 Gigabit Ethernet Controller (Foxconn) + 10b8 b452 SMC EZ Card 1000 (SMC9452TXV.2) + 11ab 0121 Marvell RDK-8001 + 11ab 0321 Marvell RDK-8003 + 11ab 1021 Marvell RDK-8010 + 11ab 5021 Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (64 bit) + 11ab 9521 Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (32 bit) + 1458 e000 Marvell 88E8001 Gigabit Ethernet Controller (Gigabyte) + 147b 1406 Marvell 88E8001 Gigabit Ethernet Controller (Abit) + 15d4 0047 Marvell 88E8001 Gigabit Ethernet Controller (Iwill) + 1695 9025 Marvell 88E8001 Gigabit Ethernet Controller (Epox) + 17f2 1c03 Marvell 88E8001 Gigabit Ethernet Controller (Albatron) + 270f 2803 Marvell 88E8001 Gigabit Ethernet Controller (Chaintech) + 4350 Fast Ethernet Controller + 1179 0001 Marvell 88E8035 Fast Ethernet Controller (Toshiba) + 11ab 3521 Marvell RDK-8035 + 1854 000d Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 000e Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 000f Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0011 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0012 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0016 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0017 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0018 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0019 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 001c Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 001e Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0020 Marvell 88E8035 Fast Ethernet Controller (LGE) + 4351 Fast Ethernet Controller + 107b 4009 Marvell 88E8036 Fast Ethernet Controller (Wistron) + 10f7 8338 Marvell 88E8036 Fast Ethernet Controller (Panasonic) + 1179 0001 Marvell 88E8036 Fast Ethernet Controller (Toshiba) + 1179 ff00 Marvell 88E8036 Fast Ethernet Controller (Compal) + 1179 ff10 Marvell 88E8036 Fast Ethernet Controller (Inventec) + 11ab 3621 Marvell RDK-8036 + 13d1 ac12 Abocom EFE3K - 10/100 Ethernet Expresscard + 161f 203d Marvell 88E8036 Fast Ethernet Controller (Arima) + 1854 000d Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 000e Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 000f Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0011 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0012 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0016 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0017 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0018 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0019 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 001c Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 001e Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0020 Marvell 88E8036 Fast Ethernet Controller (LGE) + 4360 Gigabit Ethernet Controller + 1043 8134 Marvell 88E8052 Gigabit Ethernet Controller (Asus) + 107b 4009 Marvell 88E8052 Gigabit Ethernet Controller (Wistron) + 11ab 5221 Marvell RDK-8052 + 1458 e000 Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte) + 1462 052c Marvell 88E8052 Gigabit Ethernet Controller (MSI) + 1849 8052 Marvell 88E8052 Gigabit Ethernet Controller (ASRock) + 1940 e000 Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte) + a0a0 0509 Marvell 88E8052 Gigabit Ethernet Controller (Aopen) + 4361 Gigabit Ethernet Controller + 107b 3015 Marvell 88E8050 Gigabit Ethernet Controller (Gateway) + 11ab 5021 Marvell 88E8050 Gigabit Ethernet Controller (Intel) + 8086 3063 D925XCVLK mainboard + 4362 Gigabit Ethernet Controller + 103c 2a0d Marvell 88E8053 Gigabit Ethernet Controller (Asus) + 1043 8142 Marvell 88E8053 Gigabit Ethernet Controller (Asus) + 109f 3197 Marvell 88E8053 Gigabit Ethernet Controller (Trigem) + 10f7 8338 Marvell 88E8053 Gigabit Ethernet Controller (Panasonic) + 10fd a430 Marvell 88E8053 Gigabit Ethernet Controller (SOYO) + 1179 0001 Marvell 88E8053 Gigabit Ethernet Controller (Toshiba) + 1179 ff00 Marvell 88E8053 Gigabit Ethernet Controller (Compal) + 1179 ff10 Marvell 88E8053 Gigabit Ethernet Controller (Inventec) + 11ab 5321 Marvell RDK-8053 + 1297 c240 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c241 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c242 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c243 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c244 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 13d1 ac11 Abocom EGE5K - Giga Ethernet Expresscard + 1458 e000 Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte) + 1462 058c Marvell 88E8053 Gigabit Ethernet Controller (MSI) + 14c0 0012 Marvell 88E8053 Gigabit Ethernet Controller (Compal) + 1558 04a0 Marvell 88E8053 Gigabit Ethernet Controller (Clevo) + 15bd 1003 Marvell 88E8053 Gigabit Ethernet Controller (DFI) + 161f 203c Marvell 88E8053 Gigabit Ethernet Controller (Arima) + 161f 203d Marvell 88E8053 Gigabit Ethernet Controller (Arima) + 1695 9029 Marvell 88E8053 Gigabit Ethernet Controller (Epox) + 17f2 2c08 Marvell 88E8053 Gigabit Ethernet Controller (Albatron) + 17ff 0585 Marvell 88E8053 Gigabit Ethernet Controller (Quanta) + 1849 8053 Marvell 88E8053 Gigabit Ethernet Controller (ASRock) + 1854 000b Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 000c Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0010 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0013 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0014 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0015 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001a Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001b Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001d Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001f Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0021 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0022 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1940 e000 Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte) + 270f 2801 Marvell 88E8053 Gigabit Ethernet Controller (Chaintech) + a0a0 0506 Marvell 88E8053 Gigabit Ethernet Controller (Aopen) 4611 GT-64115 System Controller 4620 GT-64120/64120A/64121A System Controller 4801 GT-48001 @@ -4483,7 +5035,7 @@ 11be International Microcircuits Inc 11bf Astrodesign, Inc. 11c0 Hewlett Packard -11c1 Lucent Microelectronics +11c1 Agere Systems (former Lucent Microelectronics) 0440 56k WinModem 1033 8015 LT WinModem 56k Data+Fax+Voice+Dsvd 1033 8047 LT WinModem 56k Data+Fax+Voice+Dsvd @@ -4586,12 +5138,25 @@ 0462 V90 WildWire Modem 0480 Venus Modem (V90, 56KFlex) 048c V.92 56K WinModem +# InPorte Home Internal 56k Modem/fax/answering machine/SMS Features + 048f V.92 56k WinModem 5801 USB 5802 USS-312 USB Controller # 4 port PCI USB Controller made by Agere (formely Lucent) 5803 USS-344S USB Controller 5811 FW323 + 8086 524c D865PERL mainboard dead 0800 FireWire Host Bus Adapter + ab10 WL60010 Wireless LAN MAC + ab11 WL60040 Multimode Wireles LAN MAC + 11c1 ab12 WaveLAN 11abg Cardbus card (Model 1102) + 11c1 ab13 WaveLAN 11abg MiniPCI card (Model 0512) + 11c1 ab15 WaveLAN 11abg Cardbus card (Model 1106) + 11c1 ab16 WaveLAN 11abg MiniPCI card (Model 0516) + ab20 ORiNOCO PCI Adapter + ab21 Agere Wireless PCI Adapter + ab30 Hermes2 Mini-PCI WaveLAN a/b/g + 14cd 2012 Hermes2 Mini-PCI WaveLAN a/b/g 11c2 Sand Microelectronics 11c3 NEC Corporation 11c4 Document Technologies, Inc @@ -4717,6 +5282,7 @@ 0903 RocketPort Compact PCI 16 port w/external I/F 8015 RocketPort 4-port UART 16954 11ff Scion Corporation + 0003 AG-5 1200 CSS Corporation 1201 Vista Controls Corp 1202 Network General Corp. @@ -4774,6 +5340,7 @@ 1014 020c ThinkPad R30 1179 0001 Magnia Z310 7110 OZ711Mx MultiMediaBay Accelerator + 103c 0890 NC6000 laptop 7112 OZ711EC1/M1 SmartCardBus MultiMediaBay Controller 7113 OZ711EC1 SmartCardBus Controller 7114 OZ711M1 SmartCardBus MultiMediaBay Controller @@ -4781,6 +5348,7 @@ 7212 OZ711M2 SmartCardBus MultiMediaBay Controller 7213 OZ6933E CardBus Controller 7223 OZ711M3 SmartCardBus MultiMediaBay Controller + 103c 0890 NC6000 laptop 1218 Hybricon Corp. 1219 First Virtual Corporation 121a 3Dfx Interactive, Inc. @@ -4808,7 +5376,7 @@ 121a 0030 Voodoo3 AGP 121a 0031 Voodoo3 AGP 121a 0034 Voodoo3 AGP - 121a 0036 Voodoo3 + 121a 0036 Voodoo3 2000 PCI 121a 0037 Voodoo3 AGP 121a 0038 Voodoo3 AGP 121a 003a Voodoo3 AGP @@ -4913,6 +5481,7 @@ 1100 C2 ISDN 1200 T1 ISDN 2700 Fritz!Card DSL SL + 2900 Fritz!Card DSL v2.0 1245 A.P.D., S.A. 1246 Dipix Technologies, Inc. 1247 Xylon Research, Inc. @@ -4929,7 +5498,7 @@ 0003 EasyIO 0004 EasyConnection/RA 124e Cylink -124f Infotrend Technology, Inc. +124f Infortrend Technology, Inc. 0041 IFT-2000 Series RAID Controller 1250 Hitachi Microcomputer System Ltd 1251 VLSI Solutions Oy @@ -4998,6 +5567,8 @@ 125e Specialvideo Engineering SRL 125f Concurrent Technologies, Inc. 1260 Intersil Corporation + 3872 Prism 2.5 Wavelan chipset + 1468 0202 LAN-Express IEEE 802.11b Wireless LAN 3873 Prism 2.5 Wavelan chipset 1186 3501 DWL-520 Wireless PCI Adapter 1186 3700 DWL-520 Wireless PCI Adapter, Rev E1 @@ -5007,10 +5578,18 @@ 1737 3874 WMP11 Wireless 802.11b PCI Adapter 8086 2513 Wireless 802.11b MiniPCI Adapter 3886 ISL3886 [Prism Javelin/Prism Xbow] + 17cf 0037 Z-Com XG-901 and clones Wireless Adapter 3890 Intersil ISL3890 [Prism GT/Prism Duette] + 10b8 2802 SMC2802W Wireless PCI Adapter + 10b8 2835 SMC2835W Wireless Cardbus Adapter 10b8 a835 SMC2835W V2 Wireless Cardbus Adapter + 1113 ee03 SMC2802W V2 Wireless PCI Adapter + 1186 3202 DWL-G650 A1 Wireless Adapter + 1259 c104 CG-WLCB54GT Wireless Adapter + 1385 4800 WG511 Wireless Adapter 16a5 1605 ALLNET ALL0271 Wireless PCI Adapter - 17cf 0014 Ovislink WL-5400PCM, Prism GT + 17cf 0014 Z-Com XG-600 and clones Wireless Adapter + 17cf 0020 Z-Com XG-900 and clones Wireless Adapter 8130 HMP8130 NTSC/PAL Video Decoder 8131 HMP8131 NTSC/PAL Video Decoder 1261 Matsushita-Kotobuki Electronics Industries, Ltd. @@ -5256,6 +5835,7 @@ 1283 Integrated Technology Express, Inc. 673a IT8330G 8212 IT/ITE8212 Dual channel ATA RAID controller + 1283 0001 IT/ITE8212 Dual channel ATA RAID controller 8330 IT8330G 8872 IT8874F PCI Dual Serial Port Controller 8888 IT8888F PCI to ISA Bridge with SMB @@ -5312,11 +5892,13 @@ 12a9 Xiotech Corporation 12aa SDL Communications, Inc. 12ab Yuan Yuan Enterprise Co., Ltd. + 0002 AU8830 [Vortex2] Based Sound Card With A3D Support 3000 MPG-200C PCI DVD Decoder Card 12ac Measurex Corporation 12ad Multidata GmbH 12ae Alteon Networks Inc. 0001 AceNIC Gigabit Ethernet + 1014 0104 Gigabit Ethernet-SX PCI Adapter 12ae 0001 Gigabit Ethernet-SX (Universal) 1410 0104 Gigabit Ethernet-SX PCI Adapter 0002 AceNIC Gigabit Ethernet (Copper) @@ -5333,7 +5915,7 @@ 12b6 Natural Microsystems 12b7 Cognex Modular Vision Systems Div. - Acumen Inc. 12b8 Korg -12b9 5610 56K FaxModem +12b9 3Com Corp, Modem Division (formerly US Robotics) 1006 WinModem 12b9 005c USR 56k Internal Voice WinModem (Model 3472) 12b9 005e USR 56k Internal WinModem (Models 662975) @@ -5417,7 +5999,7 @@ 12d3 Vingmed Sound A/S 12d4 Ulticom (Formerly DGM&S) 0200 T1 Card -12d5 Equator Technologies +12d5 Equator Technologies Inc 12d6 Analogic Corp 12d7 Biotronic SRL 12d8 Pericom Semiconductor @@ -5546,6 +6128,7 @@ 004c PCI-DAS1000 004d PCI-QUAD04 0052 PCI-DAS4020/12 + 005e PCI-DAS6025 1308 Jato Technologies Inc. 0001 NetCelerator Adapter 1308 0001 NetCelerator Adapter @@ -5569,6 +6152,7 @@ 8201 ADMtek ADM8211 802.11b Wireless Interface 10b8 2635 SMC2635W 802.11b (11Mbps) wireless lan pcmcia (cardbus) card 1317 8201 SMC2635W 802.11b (11mbps) wireless lan pcmcia (cardbus) card + 8211 ADMtek ADM8211 802.11b Wireless Interface 9511 21x4x DEC-Tulip compatible 10/100 Ethernet 1318 Packet Engines Inc. 0911 GNIC-II PCI Gigabit Ethernet [Hamachi] @@ -5620,6 +6204,7 @@ 2060 Trio 2S(16550)+1P 2061 Trio 2S(16650)+1P 2062 Trio 2S(16850)+1P + 2081 CyberSerial (8-port) ST16654 1320 Crypto AG 1321 Arcobel Graphics BV 1322 MTT Co., Ltd @@ -5636,6 +6221,7 @@ 132d Integrated Silicon Solution, Inc. 1330 MMC Networks 1331 Radisys Corp. + 0030 ENP-2611 8200 82600 Host Bridge 8201 82600 IDE 8202 82600 USB @@ -5667,6 +6253,8 @@ 134b ARK Research Corp. 134c Chori Joho System Co. Ltd 134d PCTel Inc + 2189 HSP56 MicroModem + 2486 2304WT V.92 MDC Modem 7890 HSP MicroModem 56 134d 0001 PCT789 adapter 7891 HSP MicroModem 56 @@ -5718,6 +6306,13 @@ 8001 8001 Digital I/O Adapter 135f I-Data International A-S 1360 Meinberg Funkuhren + 0101 PCI32 DCF77 Radio Clock + 0102 PCI509 DCF77 Radio Clock + 0103 PCI510 DCF77 Radio Clock + 0201 GPS167PCI GPS Receiver + 0202 GPS168PCI GPS Receiver + 0203 GPS169PCI GPS Receiver + 0301 TCR510PCI IRIG Receiver 1361 Soliton Systems K.K. 1362 Fujifacom Corporation 1363 Phoenix Technology Ltd @@ -5736,6 +6331,7 @@ 1370 ATL Products 1371 CNet Technology Inc 434e GigaCard Network Adapter + 1371 434e N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L) 1373 Silicon Vision Inc 1374 Silicom Ltd 1375 Argosystems Inc @@ -5753,13 +6349,21 @@ 1380 Sanritz Automation Co Ltd 1381 Brains Co. Ltd 1382 Marian - Electronic & Software + 0001 ARC88 audio recording card 2088 Marc-8 MIDI 8 channel audio card 1383 Controlnet Inc 1384 Reality Simulation Systems Inc 1385 Netgear +# Note: This lists as Atheros Communications, Inc. AR5212 802.11abg NIC because of Madwifi + 0013 WG311T 4100 802.11b Wireless Adapter (MA301) 4105 MA311 802.11b wireless adapter - 4a00 WAG311 802.11abg Wireless Adapter + 4400 WAG511 802.11a/b/g Dual Band Wireless PC Card + 4600 WAG511 802.11a/b/g Dual Band Wireless PC Card + 4601 WAG511 802.11a/b/g Dual Band Wireless PC Card + 4610 WAG511 802.11a/b/g Dual Band Wireless PC Card + 4a00 WAG311 802.11a/g Wireless PCI Adapter + 4c00 WG311v2 54 Mbps Wireless PCI Adapter 620a GA620 Gigabit Ethernet 622a GA622 630a GA630 Gigabit Ethernet @@ -5853,10 +6457,10 @@ 0030 SyncLink Multiport Adapter 0210 SyncLink Adapter v2 13c1 3ware Inc - 1000 3ware ATA-RAID - 1001 3ware 7000-series ATA-RAID + 1000 3ware Inc 3ware 5xxx/6xxx-series PATA-RAID + 1001 3ware Inc 3ware 7xxx/8xxx-series PATA/SATA-RAID 13c1 1001 3ware Inc 3ware 7xxx/8xxx-series PATA/SATA-RAID - 1002 3ware ATA-RAID + 1002 3ware Inc 3ware 9xxx-series SATA-RAID 13c2 Technotrend Systemtechnik GmbH 13c3 Janz Computer AG 13c4 Phase Metrics @@ -5944,6 +6548,7 @@ 13fc Computer Peripherals International 13fd Micro Science Inc 13fe Advantech Co. Ltd + 1240 PCI-1240 4-channel stepper motor controller card 1600 PCI-1612 4-port RS-232/422/485 PCI Communication Card 1752 PCI-1752 1754 PCI-1754 @@ -5998,6 +6603,7 @@ 1415 Oxford Semiconductor Ltd 8403 VScom 011H-EP1 1 port parallel adaptor 9501 OX16PCI954 (Quad 16950 UART) function 0 + 131f 2050 CyberPro (4-port) 15ed 2000 MCCR Serial p0-3 of 8 15ed 2001 MCCR Serial p0-3 of 16 950a EXSYS EX-41092 Dual 16950 Serial adapter @@ -6022,7 +6628,7 @@ 1422 Ygrec Systems Co Ltd 1423 Custom Technology Corp. 1424 Videoserver Connections -1425 ASIC Designers Inc +1425 Chelsio Communications Inc 1426 Storage Technology Corp. 1427 Better On-Line Solutions 1428 Edec Co Ltd @@ -6067,6 +6673,7 @@ 7434 PCI-7434 7841 PCI-7841 8133 PCI-8133 + 8164 PCI-8164 8554 PCI-8554 9111 PCI-9111 9113 PCI-9113 @@ -6156,6 +6763,7 @@ 1496 JOYTECH Computer Co., Ltd. 1497 SMA Regelsysteme GmBH 1498 TEWS Datentechnik GmBH + 30c8 TPCI200 1499 EMTEC CO., Ltd 149a ANDOR Technology Ltd 149b SEIKO Instruments Inc @@ -6208,6 +6816,7 @@ 4800 Cisco Aironet 340 802.11b WLAN Adapter/Aironet PC4800 a504 Cisco Aironet Wireless 802.11b a505 Cisco Aironet CB20a 802.11a Wireless LAN Adapter + a506 Cisco Aironet Mini PCI b/g 14ba INTERNIX Inc. 14bb SEMTECH Corporation 14bc Globespan Semiconductor Inc. @@ -6259,6 +6868,7 @@ # Formerly SiPackets, Inc., formerly API NetWorks, Inc., formerly Alpha Processor, Inc. 14d9 Alliance Semiconductor Corporation 0010 AP1011/SP1011 HyperTransport-PCI Bridge [Sturgeon] + 9000 AS90L10204/10208 HyperTransport to PCI-X Bridge 14da National Aerospace Laboratories 14db AFAVLAB Technology Inc 2120 TK9902 @@ -6353,17 +6963,27 @@ 10b7 2000 3C998-T Dual Port 10/100/1000 PCI-X 10b7 3000 3C999-T Quad Port 10/100/1000 PCI-X 1166 1648 NetXtreme CIOB-E 1000Base-T + 164a NetXtreme II BCM5706 Gigabit Ethernet 164d NetXtreme BCM5702FE Gigabit Ethernet 1653 NetXtreme BCM5705 Gigabit Ethernet + 0e11 00e3 NC7761 Gigabit Server Adapter 1654 NetXtreme BCM5705_2 Gigabit Ethernet + 0e11 00e3 NC7761 Gigabit Server Adapter + 103c 3100 NC1020 HP ProLiant Gigabit Server Adapter 32 PCI 1659 NetXtreme BCM5721 Gigabit Ethernet PCI Express 165d NetXtreme BCM5705M Gigabit Ethernet 165e NetXtreme BCM5705M_2 Gigabit Ethernet + 103c 0890 NC6000 laptop + 166e 570x 10/100 Integrated Controller 1677 NetXtreme BCM5751 Gigabit Ethernet PCI Express + 1028 0179 Optiplex GX280 + 167d NetXtreme BCM5751M Gigabit Ethernet PCI Express + 167e NetXtreme BCM5751F Fast Ethernet PCI Express 1696 NetXtreme BCM5782 Gigabit Ethernet 103c 12bc HP d530 CMT (DG746A) 14e4 000d NetXtreme BCM5782 1000Base-T 169c NetXtreme BCM5788 Gigabit Ethernet + 169d NetLink BCM5789 Gigabit Ethernet PCI Express 16a6 NetXtreme BCM5702X Gigabit Ethernet 0e11 00bb NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T) 1028 0126 BCM5702 1000Base-T @@ -6378,30 +6998,58 @@ 14e4 800a NetXtreme BCM5703 1000Base-T 16a8 NetXtreme BCM5704S Gigabit Ethernet 10b7 2001 3C998-SX Dual Port 1000-SX PCI-X + 16aa NetXtreme II BCM5706S Gigabit Ethernet 16c6 NetXtreme BCM5702A3 Gigabit Ethernet 10b7 1100 3C1000B-T 10/100/1000 PCI 14e4 000c BCM5702 1000Base-T 14e4 8009 BCM5702 1000Base-T 16c7 NetXtreme BCM5703 Gigabit Ethernet + 0e11 00ca NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T) + 0e11 00cb NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T) 103c 12c3 HP Combo FC/GigE-SX [A9782A] 103c 12ca HP Combo FC/GigE-T [A9784A] 14e4 0009 NetXtreme BCM5703 1000Base-T 14e4 000a NetXtreme BCM5703 1000Base-SX + 16dd NetLink BCM5781 Gigabit Ethernet PCI Express + 16f7 NetXtreme BCM5753 Gigabit Ethernet PCI Express + 16fd NetXtreme BCM5753M Gigabit Ethernet PCI Express + 16fe NetXtreme BCM5753F Fast Ethernet PCI Express 170c BCM4401-B0 100Base-TX 170d NetXtreme BCM5901 100Base-TX + 1014 0545 ThinkPad R40e (2684-HVG) builtin ethernet controller 170e NetXtreme BCM5901 100Base-TX 3352 BCM3352 3360 BCM3360 4210 BCM4210 iLine10 HomePNA 2.0 4211 BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem 4212 BCM4212 v.90 56k modem - 4301 BCM4301 802.11b + 4301 BCM4303 802.11b Wireless LAN Controller + 1028 0407 TrueMobile 1180 Onboard WLAN + 1043 0120 WL-103b Wireless LAN PC Card + 4305 BCM4307 V.90 56k Modem + 4306 BCM4307 Ethernet Controller 4307 BCM4307 802.11b Wireless LAN Controller + 4310 BCM4310 Chipcommon I/OController + 4312 BCM4310 UART + 4313 BCM4310 Ethernet Controller + 4315 BCM4310 USB Controller 4320 BCM4306 802.11b/g Wireless LAN Controller 1028 0001 TrueMobile 1300 WLAN Mini-PCI Card + 1028 0003 Wireless 1350 WLAN Mini-PCI Card + 1043 100f WL-100G + 14e4 4320 Linksys WMP54G PCI 1737 4320 WPC54G + 1799 7010 Belkin F5D7010 54g Wireless Network card + 4321 BCM4306 802.11a Wireless LAN Controller + 4322 BCM4306 UART 4324 BCM4309 802.11a/b/g 1028 0001 Truemobile 1400 + 1028 0003 Truemobile 1450 MiniPCI + 4325 BCM43xG 802.11b/g + 1414 0003 Wireless Notebook Adapter MN-720 + 1414 0004 Wireless PCI Adapter MN-730 +# probably this is a correct ID... + 4326 BCM4307 Chipcommon I/O Controller? 4401 BCM4401 100Base-T 1043 80a8 A7V8X motherboard 4402 BCM4402 Integrated 10/100BaseT @@ -6418,16 +7066,20 @@ 4614 BCM4610 Sentry5 External Interface 4615 BCM4610 Sentry5 USB Controller 4704 BCM4704 PCI to SB Bridge - 4708 BCM4708 Sentry5 PCI to SB Bridge + 4705 BCM4704 Sentry5 802.11b Wireless LAN Controller + 4706 BCM4704 Sentry5 Ethernet Controller + 4707 BCM4704 Sentry5 USB Controller + 4708 BCM4704 Crypto Accelerator 4710 BCM4710 Sentry5 PCI to SB Bridge 4711 BCM47xx Sentry5 iLine32 HomePNA 2.0 - 4712 Sentry5 UART + 4712 BCM47xx V.92 56k modem 4713 Sentry5 Ethernet Controller 4714 BCM47xx Sentry5 External Interface 4715 Sentry5 USB Controller 4716 BCM47xx Sentry5 USB Host Controller 4717 BCM47xx Sentry5 USB Device Controller 4718 Sentry5 Crypto Accelerator + 4720 BCM4712 MIPS CPU 5365 BCM5365P Sentry5 Host Bridge 5600 BCM5600 StrataSwitch 24+2 Ethernet Switch Controller 5605 BCM5605 StrataSwitch 24+2 Ethernet Switch Controller @@ -6595,6 +7247,8 @@ 13e0 8d84 IBM HSFi V.90 13e0 8d85 Compaq Stinger 14f1 2004 Dynalink 56PMi + 2f02 HSF 56k HSFi Data/Fax + 2f11 HSF 56k HSFi Modem 8234 RS8234 ATM SAR Controller [ServiceSAR Plus] 8800 Winfast TV2000 XP 14f2 MOBILITY Electronics @@ -6603,12 +7257,16 @@ 0122 EV1000 Serial port 0123 EV1000 Keyboard controller 0124 EV1000 Mouse controller -14f3 BROADLOGIC +14f3 BroadLogic + 2030 2030 DVB-S Satellite Reciever + 2050 2050 DVB-T Terrestrial (Cable) Reciever + 2060 2060 ATSC Terrestrial (Cable) Reciever 14f4 TOKYO Electronic Industry CO Ltd 14f5 SOPAC Ltd 14f6 COYOTE Technologies LLC 14f7 WOLF Technology Inc 14f8 AUDIOCODES Inc + 2077 TP-240 dual span E1 VoIP PCI card 14f9 AG COMMUNICATIONS 14fa WANDEL & GOCHERMANN 14fb TRANSAS MARINE (UK) Ltd @@ -6687,12 +7345,16 @@ 1523 MUSIC Semiconductors 1524 ENE Technology Inc 0510 CB710 Memory Card Reader Controller + 0610 PCI Smart Card Reader Controller 1211 CB1211 Cardbus Controller 1225 CB1225 Cardbus Controller 1410 CB1410 Cardbus Controller - 1411 CB710 Cardbus Controller + 1025 005a TravelMate 290 + 1411 CB-710/2/4 Cardbus Controller + 1412 CB-712/4 Cardbus Controller 1420 CB1420 Cardbus Controller - 1421 CB720 Cardbus Controller + 1421 CB-720/2/4 Cardbus Controller + 1422 CB-722/4 Cardbus Controller 1525 IMPACT Technologies 1526 ISS, Inc 1527 SOLECTRON @@ -6717,6 +7379,9 @@ 153a ONO SOKKI 153b TERRATEC Electronic GmbH 1144 Aureon 5.1 +# Terratec seems to use several IDs for the same card. + 1147 Aureon 5.1 Sky + 1158 Philips Semiconductors SAA7134 (rev 01) [Terratec Cinergy 600 TV] 153c ANTAL Electronic 153d FILANET Corp 153e TECHWELL Inc @@ -6859,18 +7524,24 @@ 15aa Moreton Bay 15ab Bluesteel Networks Inc 15ac North Atlantic Instruments -15ad VMWare Inc - 0405 [VMWare SVGA II] PCI Display Adapter +15ad VMware Inc + 0405 [VMware SVGA II] PCI Display Adapter 0710 Virtual SVGA + 0720 VMware High-Speed Virtual NIC [vmxnet] 15ae Amersham Pharmacia Biotech 15b0 Zoltrix International Ltd 15b1 Source Technology Inc 15b2 Mosaid Technologies Inc -15b3 Mellanox Technology +15b3 Mellanox Technologies 5274 MT21108 InfiniBridge 5a44 MT23108 InfiniHost - 5a45 MT23108 InfiniHost (Tavor) + 5a45 MT23108 [Infinihost HCA Flash Recovery] 5a46 MT23108 PCI Bridge + 5e8c MT24204 [InfiniHost III Lx HCA] + 5e8d MT24204 [InfiniHost III Lx HCA Flash Recovery] + 6278 MT25208 InfiniHost III Ex (Tavor compatibility mode) + 6279 MT25208 [InfiniHost III Ex HCA Flash Recovery] + 6282 MT25208 InfiniHost III Ex 15b4 CCI/TRIAD 15b5 Cimetrics Inc 15b6 Texas Memory Systems Inc @@ -6981,7 +7652,7 @@ 1637 Linksys 3874 Linksys 802.11b WMP11 PCI Wireless card 1638 Standard Microsystems Corp [SMC] - 1100 SMC2602W EZConnect/Addtron AWA-100/Eumitcom WL11000 + 1100 SMC2602W EZConnect/Addtron AWA-100/Eumitcom PCI WL11000 163c Smart Link Ltd. 3052 SmartLink SmartPCI562 56K Modem 5449 SmartPCI561 Modem @@ -6998,6 +7669,10 @@ 166d Broadcom Corporation 0001 SiByte BCM1125/1125H/1250 System-on-a-Chip PCI 0002 SiByte BCM1125H/1250 System-on-a-Chip HyperTransport +1677 Bernecker + Rainer + 104e 5LS172.6 B&R Dual CAN Interface Card + 12d7 5LS172.61 B&R Dual CAN Interface Card +167b ZyDAS Technology Corp. 1681 Hercules # More specs, more accurate desc. 0010 Hercules 3d Prophet II Ultra 64MB [ 350 MHz NV15BR core, 128-bit DDR @ 460 MHz, 1.5v AGP4x ] @@ -7010,9 +7685,13 @@ 0013 AR5212 802.11abg NIC 1186 3202 D-link DWL-G650 B3 Wireless cardbus adapter 1186 3203 DWL-G520 Wireless PCI Adapter + 1186 3a13 DWL-G520 Wireless PCI Adapter rev. B 1186 3a94 C54C Wireless 801.11g cardbus + 1385 4d00 Netgear WG311T Wireless PCI Adapter + 14b7 0a60 8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter 168c 0013 WG511T Wireless CardBus Adapter 168c 1025 DWL-G650B2 Wireless CardBus Adapter + 168c 2026 Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter 1014 AR5212 802.11abg NIC 16a5 Tekram Technology Co.,Ltd. 16ab Global Sun Technology Inc @@ -7021,10 +7700,12 @@ 1102 PCMCIA-to-PCI Wireless Network Bridge 16ae Safenet Inc 1141 SafeXcel-1141 +16b4 Aspex Semiconductor Ltd 16be Creatix Polymedia GmbH 16ca CENATEK Inc 0001 Rocket Drive DL 16cd Densitron Technologies +16ce Roland Corp. # www.pikatechnologies.com 16df PIKA Technologies Inc. 16e3 European Space Agency @@ -7032,6 +7713,9 @@ 16ec U.S. Robotics 00ff USR997900 10/100 Mbps PCI Network Card 3685 Wireless Access PCI Adapter Model 022415 +16ed Sycron N. V. + 1001 UMIO communication card +16f3 Jetway Information Co., Ltd. 16f4 Vweb Corp 8000 VW2010 16f6 VideoTele.com, Inc. @@ -7045,8 +7729,10 @@ 1725 Vitesse Semiconductor 7174 VSC7174 PCI/PCI-X Serial ATA Host Bus Controller 172a Accelerated Encryption +1734 Fujitsu Siemens Computer GmbH 1737 Linksys 0013 WMP54G Wireless Pci Card + 0015 WMP54GS Wireless Pci Card 1032 Gigabit Network Adapter 1737 0015 EG1032 v2 Instant Gigabit Network Adapter 1064 Gigabit Network Adapter @@ -7081,6 +7767,9 @@ 6020 Wireless PCMCIA Card - F5D6020 6060 Wireless PDA Card - F5D6060 7000 Wireless PCI Card - F5D7000 +17a0 Genesys Logic, Inc + 8033 GL880S USB 1.1 controller + 8034 GL880S USB 2.0 controller 17af Hightech Information System Ltd. 17b3 Hawking Technologies ab08 PN672TX 10/100 Ethernet @@ -7090,9 +7779,12 @@ 17c2 Newisys, Inc. 17cc NetChip Technology, Inc 2280 USB 2.0 +17d3 Areca Technology Corp. # S2io ships 10Gb PCI-X Ethernet adapters www.s2io.com 17d5 S2io Inc. -# Supplying full name for a currently green entry +17de KWorld Computer Co. Ltd. +# http://www.connect3d.com +17ee Connect Components Ltd 17fe Linksys, A Division of Cisco Systems 2220 [AirConn] INPROCOMM IPN 2220 WLAN Adapter (rev 01) 1813 Ambient Technologies Inc @@ -7103,15 +7795,30 @@ 1814 RaLink 0101 Wireless PCI Adpator RT2400 / RT2460 0201 Ralink RT2500 802.11 Cardbus Reference Card + 1371 001e CWC-854 Wireless-G CardBus Adapter + 1371 001f CWM-854 Wireless-G Mini PCI Adapter + 1371 0020 CWP-854 Wireless-G PCI Adapter 1820 InfiniCon Systems Inc. 1822 Twinhan Technology Co. Ltd +182d SiteCom Europe BV +# HFC-based ISDN card + 3069 ISDN PCI DC-105V2 1830 Credence Systems Corporation +183b MikroM GmbH + 08a7 MVC100 DVI + 08a8 MVC101 SDI + 08a9 MVC102 DVI+Audio +1849 ASRock Incorporation 1851 Microtune, Inc. 1852 Anritsu Corp. +185f Wistron NeWeb Corp. 1867 Topspin Communications 5a44 MT23108 PCI-X HCA 5a45 MT23108 PCI-X HCA flash recovery 5a46 MT23108 PCI-X HCA bridge + 6278 MT25208 InfiniHost III Ex (Tavor compatibility mode) + 6282 MT25208 InfiniHost III Ex +187e ZyXEL Communication Corporation 1888 Varisys Ltd 0301 VMFX1 FPGA PMC module 0601 VSM2 dual PMC carrier @@ -7119,14 +7826,30 @@ 0720 VS24x series PowerPC PCI board # found e.g. on KNC DVB-S card 1894 KNC One +1896 B&B Electronics Manufacturing Company, Inc. 18a1 Astute Networks Inc. +18ac DViCO Corporation + d810 FusionHDTV 3 Gold +18b8 Ammasso 18bc Info-Tek Corp. +# assigned to Octigabay System, which has been acquired by Cray +18c8 Cray Inc 18c9 ARVOO Engineering BV 18ca XGI - Xabre Graphics Inc 0040 Volari V8 18e6 MPL AG 0001 OSCI [Octal Serial Communication Interface] +18f7 Commtech, Inc. + 0001 Fastcom ESCC-PCI-335 + 0002 Fastcom 422/4-PCI-335 + 0004 Fastcom 422/2-PCI-335 + 0005 Fastcom IGESCC-PCI-ISO/1 + 000a Fastcom 232/4-PCI-335 18fb Resilience Corporation +1924 Level 5 Networks Inc. +1966 Orad Hi-Tec Systems +1975 Pudlis Co. Ltd. +1993 Innominate Security Technologies AG 1a08 Sierra semiconductor 0000 SC15064 1b13 Jaton Corp @@ -7165,6 +7888,7 @@ 4c53 10a0 CA3/CR3 mainboard 4c53 3010 PPCI mezzanine (32-bit PMC) 4c53 3011 PPCI mezzanine (64-bit PMC) + 0022 HiNT HB4 PCI-PCI Bridge (PCI6150) 0026 HB2 PCI-PCI Bridge 101a E.Band [AudioTrak Inca88] 101b E.Band [AudioTrak Inca88] @@ -7176,6 +7900,7 @@ 3388 8013 VXPro II Chipset EIDE Controller 3411 Quantum Designs (H.K.) Inc 3513 ARCOM Control Systems Ltd +3842 eVga.com. Corp. 38ef 4Links 3d3d 3DLabs 0001 GLINT 300SX @@ -7211,6 +7936,7 @@ 0024 VP9 visual processor 0100 Permedia II 2D+3D 07a1 Wildcat III 6210 + 07a2 Sun XVR-500 Graphics Accelerator 07a3 Wildcat IV 7210 1004 Permedia 3d04 Permedia @@ -7252,6 +7978,8 @@ 4916 RedCreek Communications Inc 1960 RedCreek PCI adapter 4943 Growth Networks +494f ACCES I/O Products, Inc. + 10e8 LPCI-COM-8SM 4978 Axil Computer Inc 4a14 NetVin 5000 NV5000SC @@ -7366,6 +8094,7 @@ 8a22 Savage 4 1033 8068 Savage 4 1033 8069 Savage 4 + 1033 8110 Savage4 LT 105d 0018 SR9 8Mb SDRAM 105d 002a SR9 Pro 16Mb SDRAM 105d 003a SR9 Pro 32Mb SDRAM @@ -7458,7 +8187,7 @@ 0011 PWDOG2 [PCI-Watchdog 2] # Wrong ID used in subsystem ID of AsusTek PCI-USB2 PCI card. 807d Asustek Computer, Inc. -8086 Intel Corp. +8086 Intel Corporation 0007 82379AB 0008 Extended Express System Support Controller 0008 1000 WorldMark 4300 INCA ASIC @@ -7466,11 +8195,11 @@ 0122 82437FX 0309 80303 I/O Processor PCI-to-PCI Bridge 030d 80312 I/O Companion Chip PCI-to-PCI Bridge - 0326 PCI Bridge Hub I/OxAPIC Interrupt Controller A - 0327 PCI Bridge Hub I/OxAPIC Interrupt Controller B - 0329 PCI Bridge Hub A - 032a PCI Bridge Hub B - 032c PCI Bridge Hub + 0326 6700/6702PXH I/OxAPIC Interrupt Controller A + 0327 6700PXH I/OxAPIC Interrupt Controller B + 0329 6700PXH PCI Express-to-PCI Bridge A + 032a 6700PXH PCI Express-to-PCI Bridge B + 032c 6702PXH PCI Express-to-PCI Bridge A # A-segment bridge 0330 80332 [Dobson] I/O processor # A-segment IOAPIC @@ -7521,6 +8250,8 @@ 0600 RAID Controller 8086 01c1 ICP Vortex GDT8546RZ 8086 01f7 SCRU32 +# uninitialized SRCU32 RAID Controller + 061f 80303 I/O Processor 0960 80960RP [i960 RP Microprocessor/Bridge] 0962 80960RM [i960RM Bridge] 0964 80960RP [i960 RP Microprocessor/Bridge] @@ -7533,6 +8264,7 @@ 1001 82543GC Gigabit Ethernet Controller (Fiber) 0e11 004a NC6136 Gigabit Server Adapter 1014 01ea Netfinity Gigabit Ethernet SX Adapter + 8086 1002 PRO/1000 F Server Adapter 8086 1003 PRO/1000 F Server Adapter 1002 Pro 100 LAN+Modem 56 Cardbus II 8086 200e Pro 100 LAN+Modem 56 Cardbus II @@ -7567,6 +8299,8 @@ 1014 0265 PRO/1000 MT Network Connection 1014 0267 PRO/1000 MT Network Connection 1014 026a PRO/1000 MT Network Connection + 1028 002e Optiplex GX260 + 1028 0151 PRO/1000 MT Network Connection 107b 8920 PRO/1000 MT Desktop Adapter 8086 001e PRO/1000 MT Desktop Adapter 8086 002e PRO/1000 MT Desktop Adapter @@ -7582,6 +8316,7 @@ 4c53 10a0 CA3/CR3 mainboard 8086 1011 PRO/1000 MT Dual Port Server Adapter 8086 101a PRO/1000 MT Dual Port Network Adapter + 8086 3424 SE7501HG2 Mainboard 1011 82545EM Gigabit Ethernet Controller (Fiber) 1014 0268 iSeries Gigabit Ethernet Adapter 8086 1002 PRO/1000 MF Server Adapter @@ -7590,6 +8325,7 @@ 8086 1012 PRO/1000 MF Dual Port Server Adapter 1013 82541EI Gigabit Ethernet Controller (Copper) 8086 0013 PRO/1000 MT Network Connection + 8086 1013 IBM ThinkCentre Network Card 8086 1113 PRO/1000 MT Desktop Adapter 1014 82541ER Gigabit Ethernet Controller 1015 82540EM Gigabit Ethernet Controller (LOM) @@ -7605,6 +8341,7 @@ 1019 82547EI Gigabit Ethernet Controller (LOM) 1458 1019 GA-8IPE1000 Pro2 motherboard (865PE) 8086 1019 PRO/1000 CT Desktop Connection + 8086 301f D865PERL mainboard 8086 3427 S875WP1-E mainboard 101d 82546EB Gigabit Ethernet Controller 8086 1000 PRO/1000 MT Quad Port Server Adapter @@ -7642,13 +8379,13 @@ 1036 82801CAM (ICH3) 82562EH Ethernet Controller 1037 82801CAM (ICH3) Chipset Ethernet Controller 1038 82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller - 1039 82801BD PRO/100 VE (LOM) Ethernet Controller + 1039 82801DB PRO/100 VE (LOM) Ethernet Controller 1014 0267 NetVista A30p - 103a 82801BD PRO/100 VE (CNR) Ethernet Controller - 103b 82801BD PRO/100 VM (LOM) Ethernet Controller - 103c 82801BD PRO/100 VM (CNR) Ethernet Controller - 103d 82801BD PRO/100 VE (MOB) Ethernet Controller - 103e 82801BD PRO/100 VM (MOB) Ethernet Controller + 103a 82801DB PRO/100 VE (CNR) Ethernet Controller + 103b 82801DB PRO/100 VM (LOM) Ethernet Controller + 103c 82801DB PRO/100 VM (CNR) Ethernet Controller + 103d 82801DB PRO/100 VE (MOB) Ethernet Controller + 103e 82801DB PRO/100 VM (MOB) Ethernet Controller 1040 536EP Data Fax Modem 16be 1040 V.9X DSP Data Fax Modem 1043 PRO/Wireless LAN 2100 3B Mini PCI Adapter @@ -7662,42 +8399,55 @@ 8086 3427 S875WP1-E mainboard 1051 82801EB/ER (ICH5/ICH5R) integrated LAN Controller 1059 82551QM Ethernet Controller - 1065 82801FB/FBM/FR/FW/FRW (ICH6 Family) LAN Controller -# Updated controller name from 82547EI to 82547GI +# ICH-6 Component + 1064 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller +# ICH-6 Component + 1065 82562ET/EZ/GT/GZ - PRO/100 VE Ethernet Controller +# ICH-6 Component + 1066 82562 EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller +# ICH-6 Component + 1067 82562 EM/EX/GX - PRO/100 VM Ethernet Controller +# ICH-6 Component + 1068 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile +# ICH-6 Component + 1069 82562 EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller Mobile +# ICH-6 Component + 106a 82562G \t- PRO/100 VE (LOM) Ethernet Controller +# ICH-6 Component + 106b 82562G \t- PRO/100 VE Ethernet Controller Mobile 1075 82547GI Gigabit Ethernet Controller + 1028 0165 PowerEdge 750 8086 0075 PRO/1000 CT Network Connection 8086 1075 PRO/1000 CT Network Connection -# Added PI to part name. Previous part name was 82541GI 1076 82541GI/PI Gigabit Ethernet Controller + 1028 0165 PowerEdge 750 8086 0076 PRO/1000 MT Network Connection 8086 1076 PRO/1000 MT Network Connection 8086 1176 PRO/1000 MT Desktop Adapter 8086 1276 PRO/1000 MT Desktop Adapter -# Update controller name from 82541EI to 82541GI 1077 82541GI Gigabit Ethernet Controller 1179 0001 PRO/1000 MT Mobile Connection 8086 0077 PRO/1000 MT Mobile Connection 8086 1077 PRO/1000 MT Mobile Connection 1078 82541EI Gigabit Ethernet Controller 8086 1078 PRO/1000 MT Network Connection -# Update from mistaken ID of 82546EB 1079 82546GB Gigabit Ethernet Controller 103c 12a6 HP Dual Port 1000Base-T [A9900A] 103c 12cf HP Core Dual Port 1000Base-T [AB352A] 4c53 1090 Cx9 / Vx9 mainboard + 4c53 10b0 CL9 mainboard 8086 0079 PRO/1000 MT Dual Port Network Connection 8086 1079 PRO/1000 MT Dual Port Network Connection 8086 1179 PRO/1000 MT Dual Port Network Connection 8086 117a PRO/1000 MT Dual Port Server Adapter -# Update from mistaken ID of 82546EB 107a 82546GB Gigabit Ethernet Controller 103c 12a8 HP Dual Port 1000base-SX [A9899A] 8086 107a PRO/1000 MF Dual Port Server Adapter 8086 127a PRO/1000 MF Dual Port Server Adapter -# Update from mistaken ID of 82546EB 107b 82546GB Gigabit Ethernet Controller 8086 007b PRO/1000 MB Dual Port Server Connection 8086 107b PRO/1000 MB Dual Port Server Connection + 1107 PRO/1000 MF Server Adapter (LX) 1130 82815 815 Chipset Host Bridge and Memory Controller Hub 1025 1016 Travelmate 612 TX 1043 8027 TUSL2-C Mainboard @@ -7715,7 +8465,7 @@ 1162 Xscale 80200 Big Endian Companion Chip 1200 Intel IXP1200 Network Processor 172a 0000 AEP SSL Accelerator - 1209 82559ER + 1209 8255xER/82551IT Fast Ethernet Controller 4c53 1050 CT7 mainboard 4c53 1051 CE7 mainboard 4c53 1070 PC6 mainboard @@ -7766,7 +8516,7 @@ 1014 605c 10/100 EtherJet Secure Management Adapter 1014 705c 10/100 Netfinity 10/100 Ethernet Security Adapter 1014 805c 10/100 Netfinity 10/100 Ethernet Security Adapter - 1028 009b PowerEdge 2550 + 1028 009b PowerEdge 2500/2550 1028 00ce PowerEdge 1400 1033 8000 PC-9821X-B06 1033 8016 PK-UG-X006 @@ -7937,6 +8687,7 @@ 1a23 82840 840 (Carmel) Chipset AGP Bridge 1a24 82840 840 (Carmel) Chipset PCI Bridge (Hub B) 1a30 82845 845 (Brookdale) Chipset Host Bridge + 1028 010e Optiplex GX240 1a31 82845 845 (Brookdale) Chipset AGP Bridge 2410 82801AA ISA Bridge (LPC) 2411 82801AA IDE @@ -7962,6 +8713,8 @@ 2442 82801BA/BAM USB (Hub #1) 1014 01c6 Netvista A40/A40p 1025 1016 Travelmate 612 TX + 1028 010e Optiplex GX240 + 1043 8027 TUSL2-C Mainboard 104d 80df Vaio PCG-FX403 147b 0507 TH7II-RAID 8086 4532 D815EEA2 mainboard @@ -7969,6 +8722,7 @@ 2443 82801BA/BAM SMBus 1014 01c6 Netvista A40/A40p 1025 1016 Travelmate 612 TX + 1028 010e Optiplex GX240 1043 8027 TUSL2-C Mainboard 104d 80df Vaio PCG-FX403 147b 0507 TH7II-RAID @@ -7976,6 +8730,8 @@ 8086 4557 D815EGEW Mainboard 2444 82801BA/BAM USB (Hub #2) 1025 1016 Travelmate 612 TX + 1028 010e Optiplex GX240 + 1043 8027 TUSL2-C Mainboard 104d 80df Vaio PCG-FX403 147b 0507 TH7II-RAID 8086 4532 D815EEA2 mainboard @@ -8026,6 +8782,7 @@ 104d 80df Vaio PCG-FX403 244b 82801BA IDE U100 1014 01c6 Netvista A40/A40p + 1028 010e Optiplex GX240 1043 8027 TUSL2-C Mainboard 147b 0507 TH7II-RAID 8086 4532 D815EEA2 mainboard @@ -8046,6 +8803,7 @@ 104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP 15d9 3480 P4DP6 8086 1958 vpr Matrix 170B4 + 8086 3424 SE7501HG2 Mainboard 8086 4541 Latitude C640 2483 82801CA/CAM SMBus Controller 1014 0220 ThinkPad A/T/X Series @@ -8058,6 +8816,7 @@ 15d9 3480 P4DP6 8086 1958 vpr Matrix 170B4 2485 82801CA/CAM AC'97 Audio Controller + 1013 5959 Crystal WMD Audio Codec 1014 0222 ThinkPad T23 (2647-4MG) or A30/A30p (2652/2653) 1014 0508 ThinkPad T30 1014 051c ThinkPad A/T/X Series @@ -8086,76 +8845,117 @@ 248b 82801CA Ultra ATA Storage Controller 15d9 3480 P4DP6 248c 82801CAM ISA Bridge (LPC) - 24c0 82801DB/DBL (ICH4/ICH4-L) LPC Bridge + 24c0 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge 1014 0267 NetVista A30p 1462 5800 845PE Max (MS-6580) 24c1 82801DBL (ICH4-L) IDE Controller 24c2 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 1014 0267 NetVista A30p + 1025 005a TravelMate 290 + 1028 0126 Optiplex GX260 + 1028 0163 Latitude D505 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 1462 5800 845PE Max (MS-6580) + 1509 2990 Averatec 5110H laptop + 4c53 1090 Cx9 / Vx9 mainboard 24c3 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller 1014 0267 NetVista A30p + 1025 005a TravelMate 290 + 1028 0126 Optiplex GX260 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 1458 24c2 GA-8PE667 Ultra 1462 5800 845PE Max (MS-6580) 4c53 1090 Cx9 / Vx9 mainboard 24c4 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 1014 0267 NetVista A30p + 1025 005a TravelMate 290 + 1028 0126 Optiplex GX260 + 1028 0163 Latitude D505 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 1462 5800 845PE Max (MS-6580) + 1509 2990 Averatec 5110H 4c53 1090 Cx9 / Vx9 mainboard 24c5 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller 0e11 00b8 Analog Devices Inc. codec [SoundMAX] 1014 0267 NetVista A30p + 1025 005a TravelMate 290 + 1028 0163 Latitude D505 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 1458 a002 GA-8PE667 Ultra 1462 5800 845PE Max (MS-6580) 24c6 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller + 1025 005a TravelMate 290 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 24c7 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 1014 0267 NetVista A30p + 1025 005a TravelMate 290 + 1028 0126 Optiplex GX260 + 1028 0163 Latitude D505 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 1462 5800 845PE Max (MS-6580) + 1509 2990 Averatec 5110H + 4c53 1090 Cx9 / Vx9 mainboard 24ca 82801DBM (ICH4) Ultra ATA Storage Controller + 1025 005a TravelMate 290 + 1028 0163 Latitude D505 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 24cb 82801DB/DBL (ICH4/ICH4-L) UltraATA-100 IDE Controller 1014 0267 NetVista A30p + 1028 0126 Optiplex GX260 1458 24c2 GA-8PE667 Ultra 1462 5800 845PE Max (MS-6580) 4c53 1090 Cx9 / Vx9 mainboard 24cc 82801DBM LPC Interface Controller 24cd 82801DB/DBM (ICH4/ICH4-M) USB 2.0 EHCI Controller 1014 0267 NetVista A30p + 1025 005a TravelMate 290 + 1028 0126 Optiplex GX260 + 1028 0163 Latitude D505 + 103c 0890 NC6000 laptop 1071 8160 MIM2000 1462 3981 845PE Max (MS-6580) + 1509 1968 Averatec 5110H 4c53 1090 Cx9 / Vx9 mainboard - 24d0 82801EB/ER (ICH5/ICH5R) LPC Bridge + 24d0 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge 24d1 82801EB (ICH5) Serial ATA 150 Storage Controller 103c 12bc d530 CMT (DG746A) 1458 24d1 GA-8IPE1000 Pro2 motherboard (865PE) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard - 24d2 82801EB/ER (ICH5/ICH5R) USB UHCI #1 + 8086 524c D865PERL mainboard + 24d2 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 103c 12bc d530 CMT (DG746A) 1043 80a6 P4P800 Mainboard + 1458 24d2 GA-8KNXP motherboard (875P) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard + 8086 524c D865PERL mainboard 24d3 82801EB/ER (ICH5/ICH5R) SMBus Controller 1043 80a6 P4P800 Mainboard 1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard - 24d4 82801EB/ER (ICH5/ICH5R) USB UHCI #2 + 8086 524c D865PERL mainboard + 24d4 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 103c 12bc d530 CMT (DG746A) 1043 80a6 P4P800 Mainboard 1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard + 8086 524c D865PERL mainboard 24d5 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller 103c 12bc Analog Devices codec [SoundMAX Integrated Digital Audio] 1043 80f3 P4P800 Mainboard + 1458 a002 GA-8KNXP motherboard (875P) 1462 7280 865PE Neo2 (MS-6728) + 8086 a000 D865PERL mainboard 24d6 82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller 24d7 82801EB/ER (ICH5/ICH5R) USB UHCI #3 103c 12bc d530 CMT (DG746A) @@ -8163,6 +8963,7 @@ 1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard + 8086 524c D865PERL mainboard 24db 82801EB/ER (ICH5/ICH5R) Ultra ATA 100 Storage Controller 103c 12bc d530 CMT (DG746A) 1043 80a6 P4P800 Mainboard @@ -8170,18 +8971,21 @@ 1462 7280 865PE Neo2 (MS-6728) 1462 7580 MSI 875P 8086 3427 S875WP1-E mainboard - 24dc 82801EB LPC Interface Controller + 8086 524c D865PERL mainboard + 24dc 82801EB (ICH5) LPC Interface Bridge 24dd 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller 103c 12bc d530 CMT (DG746A) 1043 80a6 P4P800 Mainboard 1458 5006 GA-8IPE1000 Pro2 motherboard (865PE) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard - 24de 82801EB/ER (ICH5/ICH5R) USB UHCI #4 + 8086 524c D865PERL mainboard + 24de 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 1043 80a6 P4P800 Mainboard 1458 24d2 GA-8IPE1000 Pro2 motherboard (865PE) 1462 7280 865PE Neo2 (MS-6728) 8086 3427 S875WP1-E mainboard + 8086 524c D865PERL mainboard 24df 82801EB (ICH5R) SATA (cc=RAID) 2500 82820 820 (Camino) Chipset Host Bridge (MCH) 1028 0095 Precision Workstation 220 Chipset @@ -8203,6 +9007,7 @@ 2541 E7500/E7501 Host RASUM Controller 15d9 3480 P4DP6 4c53 1090 Cx9 / Vx9 mainboard + 8086 3424 SE7501HG2 Mainboard 2543 E7500/E7501 Hub Interface B PCI-to-PCI Bridge 2544 E7500/E7501 Hub Interface B RASUM Controller 4c53 1090 Cx9 / Vx9 mainboard @@ -8212,6 +9017,7 @@ 2548 E7500/E7501 Hub Interface D RASUM Controller 254c E7501 Memory Controller Hub 4c53 1090 Cx9 / Vx9 mainboard + 8086 3424 SE7501HG2 Mainboard 2550 E7505 Memory Controller Hub 2551 E7505/E7205 Series RAS Controller 2552 E7505/E7205 PCI-to-AGP Bridge @@ -8219,6 +9025,7 @@ 2554 E7505 Hub Interface B PCI-to-PCI Bridge RAS Controller 255d E7205 Memory Controller Hub 2560 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface + 1028 0126 Optiplex GX260 1458 2560 GA-8PE667 Ultra 1462 5800 845PE Max (MS-6580) 2561 82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge @@ -8228,37 +9035,47 @@ 1043 80f2 P4P800 Mainboard 1458 2570 GA-8IPE1000 Pro2 motherboard (865PE) 2571 82865G/PE/P PCI to AGP Controller - 2572 82865G Integrated Graphics Device + 2572 82865G Integrated Graphics Controller 2573 82865G/PE/P PCI to CSA Bridge 2576 82865G/PE/P Processor to I/O Memory Interface - 2578 82875P Memory Controller Hub + 2578 82875P/E7210 Memory Controller Hub + 1458 2578 GA-8KNXP motherboard (875P) 1462 7580 MS-6758 (875P Neo) # Motherboard P4SCE 15d9 4580 Super Micro Computer Inc. P4SCE 2579 82875P Processor to AGP Controller - 257b 82875P Processor to PCI to CSA Bridge - 257e 82875P Processor to I/O Memory Interface + 257b 82875P/E7210 Processor to PCI to CSA Bridge + 257e 82875P/E7210 Processor to I/O Memory Interface 2580 915G/P/GV Processor to I/O Controller 2581 915G/P/GV PCI Express Root Port - 2582 82915G Express Chipset Family Graphics Controller - 2584 925X Memory Controller Hub - 2585 925X PCI Express Root Port - 2588 Server Memory Controller Hub - 2589 Server Memory Controller Hub PCI Express Port - 258a Graphics Controller - 2590 Mobile Memory Controller Hub - 2591 Mobile Memory Controller Hub PCI Express Port - 2592 Mobile Graphics Controller + 2582 82915G/GV/910GL Express Chipset Family Graphics Controller + 1028 1079 Optiplex GX280 + 2584 925X/XE Memory Controller Hub + 2585 925X/XE PCI Express Root Port + 2588 E7220/E7221 Memory Controller Hub + 2589 E7220/E7221 PCI Express Root Port + 258a E7221 Integrated Graphics Controller + 2590 Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller + 2591 Mobile 915GM/PM Express PCI Express Root Port + 2592 Mobile 915GM/GMS/910GML Express Graphics Controller 25a1 6300ESB LPC Interface Controller 25a2 6300ESB PATA Storage Controller + 4c53 10b0 CL9 mainboard 25a3 6300ESB SATA Storage Controller + 4c53 10b0 CL9 mainboard 25a4 6300ESB SMBus Controller + 4c53 10b0 CL9 mainboard 25a6 6300ESB AC'97 Audio Controller + 4c53 10b0 CL9 mainboard 25a7 6300ESB AC'97 Modem Controller 25a9 6300ESB USB Universal Host Controller + 4c53 10b0 CL9 mainboard 25aa 6300ESB USB Universal Host Controller + 4c53 10b0 CL9 mainboard 25ab 6300ESB Watchdog Timer + 4c53 10b0 CL9 mainboard 25ac 6300ESB I/O Advanced Programmable Interrupt Controller + 4c53 10b0 CL9 mainboard 25ad 6300ESB USB2 Enhanced Host Controller 25ae 6300ESB 64-bit PCI-X Bridge 25b0 6300ESB SATA RAID Controller @@ -8300,28 +9117,71 @@ 2641 82801FBM (ICH6M) LPC Interface Bridge 2642 82801FW/FRW (ICH6W/ICH6RW) LPC Interface Bridge 2651 82801FB/FW (ICH6/ICH6W) SATA Controller + 1028 0179 Optiplex GX280 2652 82801FR/FRW (ICH6R/ICH6RW) SATA Controller 2653 82801FBM (ICH6M) SATA Controller 2658 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 + 1028 0179 Optiplex GX280 2659 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 + 1028 0179 Optiplex GX280 265a 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 + 1028 0179 Optiplex GX280 265b 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 + 1028 0179 Optiplex GX280 265c 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller + 1028 0179 Optiplex GX280 2660 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 2662 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 2664 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 2666 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 4 2668 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller 266a 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller + 1028 0179 Optiplex GX280 266c 82801FB/FBM/FR/FW/FRW (ICH6 Family) LAN Controller 266d 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller 266e 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller + 1028 0179 Optiplex GX280 266f 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller + 2770 Memory Controller Hub + 2771 PCI Express Graphics Port + 2772 Integrated Graphics Controller + 2774 Workstation Memory Controller Hub + 2775 PCI Express Graphics Port + 2776 Integrated Graphics Controller + 2778 Server Memory Controller Hub + 2779 PCI Express Root Port 2782 82915G Express Chipset Family Graphics Controller - 2792 Mobile Graphics Controller + 2792 Mobile 915GM/GMS/910GML Express Graphics Controller + 27b1 Mobile I/O Controller Hub LPC + 27b8 I/O Controller Hub LPC + 27c0 I/O Controller Hub SATA cc=IDE + 27c1 I/O Controller Hub SATA cc=AHCI + 27c2 I/O Controller Hub SATA cc=RAID + 27c3 I/O Controller Hub SATA cc=RAID + 27c4 Mobile I/O Controller Hub SATA cc=IDE + 27c5 Mobile I/O Controller Hub SATA cc=AHCI + 27c8 I/O Controller Hub UHCI USB #1 + 27c9 I/O Controller Hub UHCI USB #2 + 27ca I/O Controller Hub UHCI USB #3 + 27cb I/O Controller Hub UHCI USB #4 + 27cc I/O Controller Hub EHCI USB + 27d0 I/O Controller Hub PCI Express Port 1 + 27d2 I/O Controller Hub PCI Express Port 2 + 27d4 I/O Controller Hub PCI Express Port 3 + 27d6 I/O Controller Hub PCI Express Port 4 + 27d8 I/O Controller Hub High Definition Audio + 27da I/O Controller Hub SMBus + 27dc I/O Controller Hub LAN + 27dd I/O Controller Hub AC'97 Modem + 27de I/O Controller Hub AC'97 Audio + 27df I/O Controller Hub PATA + 27e0 I/O Controller Hub PCI Express Port 5 + 27e2 I/O Controller Hub PCI Express Port 6 3092 Integrated RAID 3200 GD31244 PCI-X SATA HBA 3340 82855PM Processor to I/O Controller + 1025 005a TravelMate 290 + 103c 0890 NC6000 laptop 3341 82855PM Processor to AGP Controller 3575 82830 830 Chipset Host Bridge 1014 021d ThinkPad A/T/X Series @@ -8330,25 +9190,34 @@ 3577 82830 CGC [Chipset Graphics Controller] 1014 0513 ThinkPad A/T/X Series 3578 82830 830 Chipset Host Bridge - 3580 82852/855GM Host Bridge - 3581 855GME GMCH Host-to-AGP Bridge (Virtual PCI-to-PCI) + 3580 82852/82855 GM/GME/PM/GMV Processor to I/O Controller + 1028 0163 Latitude D505 + 4c53 10b0 CL9 mainboard + 3581 82852/82855 GM/GME/PM/GMV Processor to AGP Controller 3582 82852/855GM Integrated Graphics Device - 3584 855GM/GME GMCH Memory I/O Control Registers - 3585 855GM/GME GMCH Configuration Process Registers - 3590 Server Memory Controller Hub - 3591 Memory Controller Hub Error Reporting Register - 3592 Server Memory Controller Hub - 3593 Memory Controller Hub Error Reporting Register - 3594 Memory Controller Hub DMA Controller - 3595 Memory Controller Hub PCI Express Port A0 - 3596 Memory Controller Hub PCI Express Port A1 - 3597 Memory Controller Hub PCI Express Port B0 - 3598 Memory Controller Hub PCI Express Port B1 - 3599 Memory Controller Hub PCI Express Port C0 - 359a Memory Controller Hub PCI Express Port C1 - 359b Memory Controller Hub Extended Configuration Registers - 359e Workstation Memory Controller Hub + 1028 0163 Latitude D505 + 4c53 10b0 CL9 mainboard + 3584 82852/82855 GM/GME/PM/GMV Processor to I/O Controller + 1028 0163 Latitude D505 + 4c53 10b0 CL9 mainboard + 3585 82852/82855 GM/GME/PM/GMV Processor to I/O Controller + 1028 0163 Latitude D505 + 4c53 10b0 CL9 mainboard + 3590 E7520 Memory Controller Hub + 3591 E7525/E7520 Error Reporting Registers + 3592 E7320 Memory Controller Hub + 3593 E7320 Error Reporting Registers + 3594 E7520 DMA Controller + 3595 E7525/E7520/E7320 PCI Express Port A + 3596 E7525/E7520/E7320 PCI Express Port A1 + 3597 E7525/E7520 PCI Express Port B + 3598 E7520 PCI Express Port B1 + 3599 E7520 PCI Express Port C + 359a E7520 PCI Express Port C1 + 359b E7525/E7520/E7320 Extended Configuration Registers + 359e E7525 Memory Controller Hub 4220 PRO/Wireless 2200BG + 4223 PRO/Wireless 2915ABG MiniPCI Adapter 5200 EtherExpress PRO/100 Intelligent Server 5201 EtherExpress PRO/100 Intelligent Server 8086 0001 EtherExpress PRO/100 Server Ethernet Adapter @@ -8360,9 +9229,13 @@ 7050 Intel Intercast Video Capture Card 7100 430TX - 82439TX MTXC 7110 82371AB/EB/MB PIIX4 ISA + 15ad 1976 virtualHW v3 7111 82371AB/EB/MB PIIX4 IDE + 15ad 1976 virtualHW v3 7112 82371AB/EB/MB PIIX4 USB + 15ad 1976 virtualHW v3 7113 82371AB/EB/MB PIIX4 ACPI + 15ad 1976 virtualHW v3 7120 82810 GMCH [Graphics Memory Controller Hub] 4c53 1040 CL7 mainboard 4c53 1060 PC7 mainboard @@ -8383,6 +9256,7 @@ 0e11 0500 Armada 1750 Laptop System Chipset 0e11 b110 Armada M700/E500 1179 0001 Toshiba Tecra 8100 Laptop System Chipset + 15ad 1976 virtualHW v3 4c53 1050 CT7 mainboard 4c53 1051 CE7 mainboard 7191 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge @@ -8393,6 +9267,7 @@ 1033 0000 Versa Note Vxi 4c53 10a0 CA3/CR3 mainboard 7195 82440MX AC'97 Audio Controller + 1033 80cc Versa Note VXi 10cf 1099 QSound_SigmaTel Stac97 PCI Audio 11d4 0040 SoundMAX Integrated Digital Audio 11d4 0048 SoundMAX Integrated Digital Audio @@ -8430,7 +9305,7 @@ 84e4 460GX - 84460GX Memory Data Controller (MDC) 84e6 460GX - 82466GX Wide and fast PCI eXpander Bridge (WXB) 84ea 460GX - 84460GX AGP Bridge (GXB function 1) - 8500 IXP4xx Family Network Processor (IXP420, 421, 422, 425 and IXC1100) + 8500 IXP4XX Network Processor family. IXP420/IXP421/IXP422/IXP425/IXC1100 9000 IXP2000 Family Network Processor 9001 IXP2400 Network Processor 9004 IXP2800 Network Processor @@ -8438,10 +9313,15 @@ 9622 Integrated RAID 9641 Integrated RAID 96a1 Integrated RAID +# retail verson + a01f PRO/10GbE LR Server Adapter +# OEM version + a11f PRO/10GbE LR Server Adapter b152 21152 PCI-to-PCI Bridge # observed, and documented in Intel revision note; new mask of 1011:0026 b154 21154 PCI-to-PCI Bridge b555 21555 Non transparent PCI-to-PCI Bridge + 12d9 000a PCI VoIP Gateway 1331 0030 ENP-2611 4c53 1050 CT7 mainboard 4c53 1051 CE7 mainboard @@ -8616,6 +9496,7 @@ 00cf AIC-7899P U160/m 1028 00ce PowerEdge 1400 1028 00d1 PowerEdge 2550 + 1028 00d9 PowerEdge 2500 10f1 2462 Thunder K7 S2462 15d9 9005 Onboard SCSI Host Adapter 8086 3411 SDS2 Mainboard @@ -8685,12 +9566,14 @@ 9699 Omni Media Technology Inc 6565 6565 9710 NetMos Technology + 7780 USB IRDA-port 9815 PCI 9815 Multi-I/O Controller 1000 0020 2P0S (2 port parallel adaptor) 9835 PCI 9835 Multi-I/O Controller 1000 0002 2S (16C550 UART) 1000 0012 1P2S 9845 PCI 9845 Multi-I/O Controller + 1000 0004 0P4S (4 port 16550A serial card) 1000 0006 0P6S (6 port 16550a serial card) 9855 PCI 9855 Multi-I/O Controller 1000 0014 1P4S @@ -8705,8 +9588,10 @@ a25b Hewlett Packard GmbH PL24-MKT a304 Sony a727 3Com Corporation + 0013 3CRPAG175 Wireless PC Card aa42 Scitex Digital Video ac1e Digital Receiver Technology Inc +ac3d Actuality Systems aecb Adrienne Electronics Corporation b1b3 Shiva Europe Limited # Pinnacle should be 11bd, but they got it wrong several times --mj diff -Nru a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig --- a/drivers/pci/pcie/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/drivers/pci/pcie/Kconfig 2005-03-07 14:54:18 -08:00 @@ -3,7 +3,6 @@ # config PCIEPORTBUS bool "PCI Express support" - depends on PCI_GOMMCONFIG || PCI_GOANY default n ---help--- diff -Nru a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c --- a/drivers/pci/pcie/portdrv_pci.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/pci/pcie/portdrv_pci.c 2005-03-07 14:54:17 -08:00 @@ -106,7 +106,7 @@ int retval = 0; pcie_port_bus_register(); - retval = pci_module_init(&pcie_portdrv); + retval = pci_register_driver(&pcie_portdrv); if (retval) pcie_port_bus_unregister(); return retval; diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c --- a/drivers/pci/probe.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/pci/probe.c 2005-03-07 14:54:17 -08:00 @@ -64,9 +64,11 @@ void pci_remove_legacy_files(struct pci_bus *b) { - class_device_remove_bin_file(&b->class_dev, b->legacy_io); - class_device_remove_bin_file(&b->class_dev, b->legacy_mem); - kfree(b->legacy_io); /* both are allocated here */ + if (b->legacy_io) { + class_device_remove_bin_file(&b->class_dev, b->legacy_io); + class_device_remove_bin_file(&b->class_dev, b->legacy_mem); + kfree(b->legacy_io); /* both are allocated here */ + } } #else /* !HAVE_PCI_LEGACY */ static inline void pci_create_legacy_files(struct pci_bus *bus) { return; } @@ -549,7 +551,6 @@ { u32 class; - dev->slot_name = dev->dev.bus_id; sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus), dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); diff -Nru a/drivers/pci/proc.c b/drivers/pci/proc.c --- a/drivers/pci/proc.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/pci/proc.c 2005-03-07 14:54:17 -08:00 @@ -384,26 +384,32 @@ int pci_proc_attach_device(struct pci_dev *dev) { struct pci_bus *bus = dev->bus; - struct proc_dir_entry *de, *e; + struct proc_dir_entry *e; char name[16]; if (!proc_initialized) return -EACCES; - if (!(de = bus->procdir)) { - if (pci_name_bus(name, bus)) - return -EEXIST; - de = bus->procdir = proc_mkdir(name, proc_bus_pci_dir); - if (!de) + if (!bus->procdir) { + if (pci_proc_domain(bus)) { + sprintf(name, "%04x:%02x", pci_domain_nr(bus), + bus->number); + } else { + sprintf(name, "%02x", bus->number); + } + bus->procdir = proc_mkdir(name, proc_bus_pci_dir); + if (!bus->procdir) return -ENOMEM; } + sprintf(name, "%02x.%x", PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); - e = dev->procent = create_proc_entry(name, S_IFREG | S_IRUGO | S_IWUSR, de); + e = create_proc_entry(name, S_IFREG | S_IRUGO | S_IWUSR, bus->procdir); if (!e) return -ENOMEM; e->proc_fops = &proc_bus_pci_operations; e->data = dev; e->size = dev->cfg_size; + dev->procent = e; return 0; } diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c --- a/drivers/pci/quirks.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/pci/quirks.c 2005-03-07 14:54:16 -08:00 @@ -786,6 +786,7 @@ } if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) switch (dev->subsystem_device) { + case 0x184b: /* W1N notebook */ case 0x186a: /* M6Ne notebook */ asus_hides_smbus = 1; } @@ -801,6 +802,18 @@ case 0x12bc: /* HP D330L */ asus_hides_smbus = 1; } + } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) { + if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) + switch(dev->subsystem_device) { + case 0x0001: /* Toshiba Satellite A40 */ + asus_hides_smbus = 1; + } + } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) { + if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) + switch(dev->subsystem_device) { + case 0xC00C: /* Samsung P35 notebook */ + asus_hides_smbus = 1; + } } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845_HB, asus_hides_smbus_hostbridge ); diff -Nru a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c --- a/drivers/pci/setup-res.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/pci/setup-res.c 2005-03-07 14:54:18 -08:00 @@ -86,11 +86,11 @@ } res->flags &= ~IORESOURCE_UNSET; DBGC((KERN_INFO "PCI: moved device %s resource %d (%lx) to %x\n", - dev->slot_name, resno, res->flags, + pci_name(dev), resno, res->flags, new & ~PCI_REGION_FLAG_MASK)); } -int __init +int __devinit pci_claim_resource(struct pci_dev *dev, int resource) { struct resource *res = &dev->resource[resource]; diff -Nru a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c --- a/drivers/pcmcia/yenta_socket.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/pcmcia/yenta_socket.c 2005-03-07 14:54:17 -08:00 @@ -963,7 +963,7 @@ * the irq stuff... */ printk(KERN_INFO "Yenta: CardBus bridge found at %s [%04x:%04x]\n", - dev->slot_name, dev->subsystem_vendor, dev->subsystem_device); + pci_name(dev), dev->subsystem_vendor, dev->subsystem_device); yenta_config_init(socket); diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig --- a/drivers/scsi/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/drivers/scsi/Kconfig 2005-03-07 14:54:18 -08:00 @@ -273,8 +273,8 @@ tristate "ACARD SCSI support" depends on PCI && SCSI help - This driver supports the ACARD 870U/W SCSI host adapter. - + This driver supports the ACARD SCSI host adapter. + Support Chip To compile this driver as a module, choose M here: the module will be called atp870u. diff -Nru a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c --- a/drivers/scsi/ahci.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/ahci.c 2005-03-07 14:54:16 -08:00 @@ -574,7 +574,7 @@ writel(tmp, port_mmio + PORT_CMD); readl(port_mmio + PORT_CMD); /* flush */ - printk(KERN_WARNING "ata%u: error occurred, port reset\n", ap->port_no); + printk(KERN_WARNING "ata%u: error occurred, port reset\n", ap->id); } static void ahci_eng_timeout(struct ata_port *ap) @@ -766,10 +766,10 @@ using_dac = hpriv->cap & HOST_CAP_64; if (using_dac && - !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { - rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL); + !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { + rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); if (rc) { - rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL); + rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { printk(KERN_ERR DRV_NAME "(%s): 64-bit DMA enable failed\n", pci_name(pdev)); @@ -779,13 +779,13 @@ hpriv->flags |= HOST_CAP_64; } else { - rc = pci_set_dma_mask(pdev, 0xffffffffULL); + rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { printk(KERN_ERR DRV_NAME "(%s): 32-bit DMA enable failed\n", pci_name(pdev)); return rc; } - rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL); + rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { printk(KERN_ERR DRV_NAME "(%s): 32-bit consistent DMA enable failed\n", pci_name(pdev)); diff -Nru a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c --- a/drivers/scsi/arm/arxescsi.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/scsi/arm/arxescsi.c 2005-03-07 14:54:17 -08:00 @@ -43,6 +43,7 @@ struct arxescsi_info { FAS216_Info info; struct expansion_card *ec; + void __iomem *base; }; #define DMADATA_OFFSET (0x200) @@ -73,7 +74,7 @@ return fasdma_pseudo; } -static void arxescsi_pseudo_dma_write(unsigned char *addr, unsigned char *base) +static void arxescsi_pseudo_dma_write(unsigned char *addr, void __iomem *base) { __asm__ __volatile__( " stmdb sp!, {r0-r12}\n" @@ -115,7 +116,7 @@ { struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; unsigned int length, error = 0; - unsigned char *base = info->info.scsi.io_base; + void __iomem *base = info->info.scsi.io_base; unsigned char *addr; length = SCp->this_residual; @@ -283,7 +284,7 @@ struct Scsi_Host *host; struct arxescsi_info *info; unsigned long resbase, reslen; - unsigned char *base; + void __iomem *base; int ret; ret = ecard_request_resources(ec); @@ -304,15 +305,13 @@ goto out_unmap; } - host->base = (unsigned long)base; - host->irq = NO_IRQ; - host->dma_channel = NO_DMA; - info = (struct arxescsi_info *)host->hostdata; info->ec = ec; + info->base = base; info->info.scsi.io_base = base + 0x2000; - info->info.scsi.irq = host->irq; + info->info.scsi.irq = NO_IRQ; + info->info.scsi.dma = NO_DMA; info->info.scsi.io_shift = 5; info->info.ifcfg.clockrate = 24; /* MHz */ info->info.ifcfg.select_timeout = 255; @@ -351,11 +350,12 @@ static void __devexit arxescsi_remove(struct expansion_card *ec) { struct Scsi_Host *host = ecard_get_drvdata(ec); + struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata; ecard_set_drvdata(ec, NULL); fas216_remove(host); - iounmap((void *)host->base); + iounmap(info->base); fas216_release(host); scsi_host_put(host); diff -Nru a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c --- a/drivers/scsi/arm/cumana_2.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/scsi/arm/cumana_2.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /* * linux/drivers/acorn/scsi/cumana_2.c * - * Copyright (C) 1997-2002 Russell King + * Copyright (C) 1997-2005 Russell King * * 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 @@ -78,11 +78,8 @@ struct cumanascsi2_info { FAS216_Info info; struct expansion_card *ec; - - void *status; /* card status register */ - void *alatch; /* Control register */ + void __iomem *base; unsigned int terms; /* Terminator state */ - void *dmaarea; /* Pseudo DMA area */ struct scatterlist sg[NR_SG]; /* Scatter DMA list */ }; @@ -97,7 +94,8 @@ static void cumanascsi_2_irqenable(struct expansion_card *ec, int irqnr) { - writeb(ALATCH_ENA_INT, ec->irq_data); + struct cumanascsi2_info *info = ec->irq_data; + writeb(ALATCH_ENA_INT, info->base + CUMANASCSI2_ALATCH); } /* Prototype: void cumanascsi_2_irqdisable(ec, irqnr) @@ -108,7 +106,8 @@ static void cumanascsi_2_irqdisable(struct expansion_card *ec, int irqnr) { - writeb(ALATCH_DIS_INT, ec->irq_data); + struct cumanascsi2_info *info = ec->irq_data; + writeb(ALATCH_DIS_INT, info->base + CUMANASCSI2_ALATCH); } static const expansioncard_ops_t cumanascsi_2_ops = { @@ -128,10 +127,10 @@ if (on_off) { info->terms = 1; - writeb(ALATCH_ENA_TERM, info->alatch); + writeb(ALATCH_ENA_TERM, info->base + CUMANASCSI2_ALATCH); } else { info->terms = 0; - writeb(ALATCH_DIS_TERM, info->alatch); + writeb(ALATCH_DIS_TERM, info->base + CUMANASCSI2_ALATCH); } } @@ -163,9 +162,9 @@ { struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; struct device *dev = scsi_get_device(host); - int dmach = host->dma_channel; + int dmach = info->info.scsi.dma; - writeb(ALATCH_DIS_DMA, info->alatch); + writeb(ALATCH_DIS_DMA, info->base + CUMANASCSI2_ALATCH); if (dmach != NO_DMA && (min_type == fasdma_real_all || SCp->this_residual >= 512)) { @@ -186,11 +185,11 @@ disable_dma(dmach); set_dma_sg(dmach, info->sg, bufs + 1); - writeb(alatch_dir, info->alatch); + writeb(alatch_dir, info->base + CUMANASCSI2_ALATCH); set_dma_mode(dmach, dma_dir); enable_dma(dmach); - writeb(ALATCH_ENA_DMA, info->alatch); - writeb(ALATCH_DIS_BIT32, info->alatch); + writeb(ALATCH_ENA_DMA, info->base + CUMANASCSI2_ALATCH); + writeb(ALATCH_DIS_BIT32, info->base + CUMANASCSI2_ALATCH); return fasdma_real_all; } @@ -224,7 +223,7 @@ #if 0 while (length > 1) { unsigned long word; - unsigned int status = readb(info->status); + unsigned int status = readb(info->base + CUMANASCSI2_STATUS); if (status & STATUS_INT) goto end; @@ -233,7 +232,7 @@ continue; word = *addr | *(addr + 1) << 8; - writew(word, info->dmaarea); + writew(word, info->base + CUMANASCSI2_PSEUDODMA); addr += 2; length -= 2; } @@ -243,7 +242,7 @@ else { if (transfer && (transfer & 255)) { while (length >= 256) { - unsigned int status = readb(info->status); + unsigned int status = readb(info->base + CUMANASCSI2_STATUS); if (status & STATUS_INT) return; @@ -251,7 +250,8 @@ if (!(status & STATUS_DRQ)) continue; - readsw(info->dmaarea, addr, 256 >> 1); + readsw(info->base + CUMANASCSI2_PSEUDODMA, + addr, 256 >> 1); addr += 256; length -= 256; } @@ -259,7 +259,7 @@ while (length > 0) { unsigned long word; - unsigned int status = readb(info->status); + unsigned int status = readb(info->base + CUMANASCSI2_STATUS); if (status & STATUS_INT) return; @@ -267,7 +267,7 @@ if (!(status & STATUS_DRQ)) continue; - word = readw(info->dmaarea); + word = readw(info->base + CUMANASCSI2_PSEUDODMA); *addr++ = word; if (--length > 0) { *addr++ = word >> 8; @@ -286,9 +286,9 @@ cumanascsi_2_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp) { struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata; - if (host->dma_channel != NO_DMA) { - writeb(ALATCH_DIS_DMA, info->alatch); - disable_dma(host->dma_channel); + if (info->info.scsi.dma != NO_DMA) { + writeb(ALATCH_DIS_DMA, info->base + CUMANASCSI2_ALATCH); + disable_dma(info->info.scsi.dma); } } @@ -405,7 +405,7 @@ struct Scsi_Host *host; struct cumanascsi2_info *info; unsigned long resbase, reslen; - unsigned char *base; + void __iomem *base; int ret; ret = ecard_request_resources(ec); @@ -427,28 +427,18 @@ goto out_unmap; } - host->base = (unsigned long)base; - host->irq = ec->irq; - host->dma_channel = ec->dma; - ecard_set_drvdata(ec, host); info = (struct cumanascsi2_info *)host->hostdata; info->ec = ec; - info->dmaarea = base + CUMANASCSI2_PSEUDODMA; - info->status = base + CUMANASCSI2_STATUS; - info->alatch = base + CUMANASCSI2_ALATCH; - - ec->irqaddr = info->status; - ec->irqmask = STATUS_INT; - ec->irq_data = base + CUMANASCSI2_ALATCH; - ec->ops = &cumanascsi_2_ops; + info->base = base; cumanascsi_2_terminator_ctl(host, term[ec->slot_no]); info->info.scsi.io_base = base + CUMANASCSI2_FAS216_OFFSET; info->info.scsi.io_shift = CUMANASCSI2_FAS216_SHIFT; - info->info.scsi.irq = host->irq; + info->info.scsi.irq = ec->irq; + info->info.scsi.dma = ec->dma; info->info.ifcfg.clockrate = 40; /* MHz */ info->info.ifcfg.select_timeout = 255; info->info.ifcfg.asyncperiod = 200; /* ns */ @@ -461,25 +451,30 @@ info->info.dma.pseudo = cumanascsi_2_dma_pseudo; info->info.dma.stop = cumanascsi_2_dma_stop; + ec->irqaddr = info->base + CUMANASCSI2_STATUS; + ec->irqmask = STATUS_INT; + ec->irq_data = info; + ec->ops = &cumanascsi_2_ops; + ret = fas216_init(host); if (ret) goto out_free; - ret = request_irq(host->irq, cumanascsi_2_intr, + ret = request_irq(ec->irq, cumanascsi_2_intr, SA_INTERRUPT, "cumanascsi2", info); if (ret) { printk("scsi%d: IRQ%d not free: %d\n", - host->host_no, host->irq, ret); + host->host_no, ec->irq, ret); goto out_release; } - if (host->dma_channel != NO_DMA) { - if (request_dma(host->dma_channel, "cumanascsi2")) { + if (info->info.scsi.dma != NO_DMA) { + if (request_dma(info->info.scsi.dma, "cumanascsi2")) { printk("scsi%d: DMA%d not free, using PIO\n", - host->host_no, host->dma_channel); - host->dma_channel = NO_DMA; + host->host_no, info->info.scsi.dma); + info->info.scsi.dma = NO_DMA; } else { - set_dma_speed(host->dma_channel, 180); + set_dma_speed(info->info.scsi.dma, 180); info->info.ifcfg.capabilities |= FASCAP_DMA; } } @@ -488,9 +483,9 @@ if (ret == 0) goto out; - if (host->dma_channel != NO_DMA) - free_dma(host->dma_channel); - free_irq(host->irq, host); + if (info->info.scsi.dma != NO_DMA) + free_dma(info->info.scsi.dma); + free_irq(ec->irq, host); out_release: fas216_release(host); @@ -516,11 +511,11 @@ ecard_set_drvdata(ec, NULL); fas216_remove(host); - if (host->dma_channel != NO_DMA) - free_dma(host->dma_channel); - free_irq(host->irq, info); + if (info->info.scsi.dma != NO_DMA) + free_dma(info->info.scsi.dma); + free_irq(ec->irq, info); - iounmap((void *)host->base); + iounmap(info->base); fas216_release(host); scsi_host_put(host); diff -Nru a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c --- a/drivers/scsi/arm/eesox.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/scsi/arm/eesox.c 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /* * linux/drivers/acorn/scsi/eesox.c * - * Copyright (C) 1997-2003 Russell King + * Copyright (C) 1997-2005 Russell King * * 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 @@ -73,8 +73,8 @@ struct eesoxscsi_info { FAS216_Info info; struct expansion_card *ec; - - void *ctl_port; + void __iomem *base; + void __iomem *ctl_port; unsigned int control; struct scatterlist sg[NR_SG]; /* Scatter DMA list */ }; @@ -163,7 +163,7 @@ { struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; struct device *dev = scsi_get_device(host); - int dmach = host->dma_channel; + int dmach = info->info.scsi.dma; if (dmach != NO_DMA && (min_type == fasdma_real_all || SCp->this_residual >= 512)) { @@ -194,11 +194,11 @@ return fasdma_pseudo; } -static void eesoxscsi_buffer_in(void *buf, int length, void *base) +static void eesoxscsi_buffer_in(void *buf, int length, void __iomem *base) { - const void *reg_fas = base + EESOX_FAS216_OFFSET; - const void *reg_dmastat = base + EESOX_DMASTAT; - const void *reg_dmadata = base + EESOX_DMADATA; + const void __iomem *reg_fas = base + EESOX_FAS216_OFFSET; + const void __iomem *reg_dmastat = base + EESOX_DMASTAT; + const void __iomem *reg_dmadata = base + EESOX_DMADATA; const register unsigned long mask = 0xffff; do { @@ -272,11 +272,11 @@ } while (length); } -static void eesoxscsi_buffer_out(void *buf, int length, void *base) +static void eesoxscsi_buffer_out(void *buf, int length, void __iomem *base) { - const void *reg_fas = base + EESOX_FAS216_OFFSET; - const void *reg_dmastat = base + EESOX_DMASTAT; - const void *reg_dmadata = base + EESOX_DMADATA; + const void __iomem *reg_fas = base + EESOX_FAS216_OFFSET; + const void __iomem *reg_dmastat = base + EESOX_DMASTAT; + const void __iomem *reg_dmadata = base + EESOX_DMADATA; do { unsigned int status; @@ -356,11 +356,11 @@ eesoxscsi_dma_pseudo(struct Scsi_Host *host, Scsi_Pointer *SCp, fasdmadir_t dir, int transfer_size) { - void *base = (void *)host->base; + struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; if (dir == DMA_IN) { - eesoxscsi_buffer_in(SCp->ptr, SCp->this_residual, base); + eesoxscsi_buffer_in(SCp->ptr, SCp->this_residual, info->base); } else { - eesoxscsi_buffer_out(SCp->ptr, SCp->this_residual, base); + eesoxscsi_buffer_out(SCp->ptr, SCp->this_residual, info->base); } } @@ -372,8 +372,9 @@ static void eesoxscsi_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp) { - if (host->dma_channel != NO_DMA) - disable_dma(host->dma_channel); + struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata; + if (info->info.scsi.dma != NO_DMA) + disable_dma(info->info.scsi.dma); } /* Prototype: const char *eesoxscsi_info(struct Scsi_Host * host) @@ -522,7 +523,7 @@ struct Scsi_Host *host; struct eesoxscsi_info *info; unsigned long resbase, reslen; - unsigned char *base; + void __iomem *base; int ret; ret = ecard_request_resources(ec); @@ -544,26 +545,19 @@ goto out_unmap; } - host->base = (unsigned long)base; - host->irq = ec->irq; - host->dma_channel = ec->dma; - ecard_set_drvdata(ec, host); info = (struct eesoxscsi_info *)host->hostdata; info->ec = ec; + info->base = base; info->ctl_port = base + EESOX_CONTROL; info->control = term[ec->slot_no] ? EESOX_TERM_ENABLE : 0; writeb(info->control, info->ctl_port); - ec->irqaddr = base + EESOX_DMASTAT; - ec->irqmask = EESOX_STAT_INTR; - ec->irq_data = info; - ec->ops = &eesoxscsi_ops; - info->info.scsi.io_base = base + EESOX_FAS216_OFFSET; info->info.scsi.io_shift = EESOX_FAS216_SHIFT; - info->info.scsi.irq = host->irq; + info->info.scsi.irq = ec->irq; + info->info.scsi.dma = ec->dma; info->info.ifcfg.clockrate = 40; /* MHz */ info->info.ifcfg.select_timeout = 255; info->info.ifcfg.asyncperiod = 200; /* ns */ @@ -576,26 +570,31 @@ info->info.dma.pseudo = eesoxscsi_dma_pseudo; info->info.dma.stop = eesoxscsi_dma_stop; + ec->irqaddr = base + EESOX_DMASTAT; + ec->irqmask = EESOX_STAT_INTR; + ec->irq_data = info; + ec->ops = &eesoxscsi_ops; + device_create_file(&ec->dev, &dev_attr_bus_term); ret = fas216_init(host); if (ret) goto out_free; - ret = request_irq(host->irq, eesoxscsi_intr, 0, "eesoxscsi", info); + ret = request_irq(ec->irq, eesoxscsi_intr, 0, "eesoxscsi", info); if (ret) { printk("scsi%d: IRQ%d not free: %d\n", - host->host_no, host->irq, ret); + host->host_no, ec->irq, ret); goto out_remove; } - if (host->dma_channel != NO_DMA) { - if (request_dma(host->dma_channel, "eesox")) { + if (info->info.scsi.dma != NO_DMA) { + if (request_dma(info->info.scsi.dma, "eesox")) { printk("scsi%d: DMA%d not free, DMA disabled\n", - host->host_no, host->dma_channel); - host->dma_channel = NO_DMA; + host->host_no, info->info.scsi.dma); + info->info.scsi.dma = NO_DMA; } else { - set_dma_speed(host->dma_channel, 180); + set_dma_speed(info->info.scsi.dma, 180); info->info.ifcfg.capabilities |= FASCAP_DMA; info->info.ifcfg.cntl3 |= CNTL3_BS8; } @@ -605,9 +604,9 @@ if (ret == 0) goto out; - if (host->dma_channel != NO_DMA) - free_dma(host->dma_channel); - free_irq(host->irq, host); + if (info->info.scsi.dma != NO_DMA) + free_dma(info->info.scsi.dma); + free_irq(ec->irq, host); out_remove: fas216_remove(host); @@ -634,13 +633,13 @@ ecard_set_drvdata(ec, NULL); fas216_remove(host); - if (host->dma_channel != NO_DMA) - free_dma(host->dma_channel); - free_irq(host->irq, info); + if (info->info.scsi.dma != NO_DMA) + free_dma(info->info.scsi.dma); + free_irq(ec->irq, info); device_remove_file(&ec->dev, &dev_attr_bus_term); - iounmap((void *)host->base); + iounmap(info->base); fas216_release(host); scsi_host_put(host); @@ -679,4 +678,3 @@ MODULE_PARM(term, "1-8i"); MODULE_PARM_DESC(term, "SCSI bus termination"); MODULE_LICENSE("GPL"); - diff -Nru a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c --- a/drivers/scsi/arm/fas216.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/arm/fas216.c 2005-03-07 14:54:16 -08:00 @@ -142,19 +142,13 @@ static inline unsigned char fas216_readb(FAS216_Info *info, unsigned int reg) { unsigned int off = reg << info->scsi.io_shift; - if (info->scsi.io_base) - return readb(info->scsi.io_base + off); - else - return inb(info->scsi.io_port + off); + return readb(info->scsi.io_base + off); } static inline void fas216_writeb(FAS216_Info *info, unsigned int reg, unsigned int val) { unsigned int off = reg << info->scsi.io_shift; - if (info->scsi.io_base) - writeb(val, info->scsi.io_base + off); - else - outb(val, info->scsi.io_port + off); + writeb(val, info->scsi.io_base + off); } static void fas216_dumpstate(FAS216_Info *info) @@ -197,8 +191,8 @@ printk(" { magic_start=%lX host=%p SCpnt=%p origSCpnt=%p\n", info->magic_start, info->host, info->SCpnt, info->origSCpnt); - printk(" scsi={ io_port=%X io_shift=%X irq=%X cfg={ %X %X %X %X }\n", - info->scsi.io_port, info->scsi.io_shift, info->scsi.irq, + printk(" scsi={ io_shift=%X irq=%X cfg={ %X %X %X %X }\n", + info->scsi.io_shift, info->scsi.irq, info->scsi.cfg[0], info->scsi.cfg[1], info->scsi.cfg[2], info->scsi.cfg[3]); printk(" type=%p phase=%X\n", @@ -2967,11 +2961,11 @@ return sprintf(buffer, "\n" "Chip : %s\n" - " Address: 0x%08lx\n" + " Address: 0x%p\n" " IRQ : %d\n" " DMA : %d\n", - info->scsi.type, info->host->io_port, - info->host->irq, info->host->dma_channel); + info->scsi.type, info->scsi.io_base, + info->scsi.irq, info->scsi.dma); } int fas216_print_stats(FAS216_Info *info, char *buffer) diff -Nru a/drivers/scsi/arm/fas216.h b/drivers/scsi/arm/fas216.h --- a/drivers/scsi/arm/fas216.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/scsi/arm/fas216.h 2005-03-07 14:54:18 -08:00 @@ -236,12 +236,12 @@ /* driver information */ struct { phase_t phase; /* current phase */ - void *io_base; /* iomem base of FAS216 */ - unsigned int io_port; /* base address of FAS216 */ + void __iomem *io_base; /* iomem base of FAS216 */ unsigned int io_shift; /* shift to adjust reg offsets by */ unsigned char cfg[4]; /* configuration registers */ const char *type; /* chip type */ unsigned int irq; /* interrupt */ + int dma; /* dma channel */ Scsi_Pointer SCp; /* current commands data pointer */ diff -Nru a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c --- a/drivers/scsi/arm/powertec.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/scsi/arm/powertec.c 2005-03-07 14:54:17 -08:00 @@ -1,7 +1,7 @@ /* * linux/drivers/acorn/scsi/powertec.c * - * Copyright (C) 1997-2003 Russell King + * Copyright (C) 1997-2005 Russell King * * 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 @@ -61,7 +61,7 @@ struct powertec_info { FAS216_Info info; struct expansion_card *ec; - void *term_port; + void __iomem *base; unsigned int term_ctl; struct scatterlist sg[NR_SG]; }; @@ -74,7 +74,8 @@ static void powertecscsi_irqenable(struct expansion_card *ec, int irqnr) { - writeb(POWERTEC_INTR_ENABLE, ec->irq_data); + struct powertec_info *info = ec->irq_data; + writeb(POWERTEC_INTR_ENABLE, info->base + POWERTEC_INTR_CONTROL); } /* Prototype: void powertecscsi_irqdisable(ec, irqnr) @@ -85,7 +86,8 @@ static void powertecscsi_irqdisable(struct expansion_card *ec, int irqnr) { - writeb(POWERTEC_INTR_DISABLE, ec->irq_data); + struct powertec_info *info = ec->irq_data; + writeb(POWERTEC_INTR_DISABLE, info->base + POWERTEC_INTR_CONTROL); } static const expansioncard_ops_t powertecscsi_ops = { @@ -104,7 +106,7 @@ struct powertec_info *info = (struct powertec_info *)host->hostdata; info->term_ctl = on_off ? POWERTEC_TERM_ENABLE : 0; - writeb(info->term_ctl, info->term_port); + writeb(info->term_ctl, info->base + POWERTEC_TERM_CONTROL); } /* Prototype: void powertecscsi_intr(irq, *dev_id, *regs) @@ -135,7 +137,7 @@ { struct powertec_info *info = (struct powertec_info *)host->hostdata; struct device *dev = scsi_get_device(host); - int dmach = host->dma_channel; + int dmach = info->info.scsi.dma; if (info->info.ifcfg.capabilities & FASCAP_DMA && min_type == fasdma_real_all) { @@ -174,8 +176,9 @@ static void powertecscsi_dma_stop(struct Scsi_Host *host, Scsi_Pointer *SCp) { - if (host->dma_channel != NO_DMA) - disable_dma(host->dma_channel); + struct powertec_info *info = (struct powertec_info *)host->hostdata; + if (info->info.scsi.dma != NO_DMA) + disable_dma(info->info.scsi.dma); } /* Prototype: const char *powertecscsi_info(struct Scsi_Host * host) @@ -315,7 +318,7 @@ struct Scsi_Host *host; struct powertec_info *info; unsigned long resbase, reslen; - unsigned char *base; + void __iomem *base; int ret; ret = ecard_request_resources(ec); @@ -337,26 +340,16 @@ goto out_unmap; } - host->base = (unsigned long)base; - host->irq = ec->irq; - host->dma_channel = ec->dma; - - ec->irqaddr = base + POWERTEC_INTR_STATUS; - ec->irqmask = POWERTEC_INTR_BIT; - ec->irq_data = base + POWERTEC_INTR_CONTROL; - ec->ops = &powertecscsi_ops; - ecard_set_drvdata(ec, host); info = (struct powertec_info *)host->hostdata; - info->term_port = base + POWERTEC_TERM_CONTROL; + info->base = base; powertecscsi_terminator_ctl(host, term[ec->slot_no]); - device_create_file(&ec->dev, &dev_attr_bus_term); - info->info.scsi.io_base = base + POWERTEC_FAS216_OFFSET; info->info.scsi.io_shift = POWERTEC_FAS216_SHIFT; - info->info.scsi.irq = host->irq; + info->info.scsi.irq = ec->irq; + info->info.scsi.dma = ec->dma; info->info.ifcfg.clockrate = 40; /* MHz */ info->info.ifcfg.select_timeout = 255; info->info.ifcfg.asyncperiod = 200; /* ns */ @@ -369,25 +362,32 @@ info->info.dma.pseudo = NULL; info->info.dma.stop = powertecscsi_dma_stop; + ec->irqaddr = base + POWERTEC_INTR_STATUS; + ec->irqmask = POWERTEC_INTR_BIT; + ec->irq_data = info; + ec->ops = &powertecscsi_ops; + + device_create_file(&ec->dev, &dev_attr_bus_term); + ret = fas216_init(host); if (ret) goto out_free; - ret = request_irq(host->irq, powertecscsi_intr, + ret = request_irq(ec->irq, powertecscsi_intr, SA_INTERRUPT, "powertec", info); if (ret) { printk("scsi%d: IRQ%d not free: %d\n", - host->host_no, host->irq, ret); + host->host_no, ec->irq, ret); goto out_release; } - if (host->dma_channel != NO_DMA) { - if (request_dma(host->dma_channel, "powertec")) { + if (info->info.scsi.dma != NO_DMA) { + if (request_dma(info->info.scsi.dma, "powertec")) { printk("scsi%d: DMA%d not free, using PIO\n", - host->host_no, host->dma_channel); - host->dma_channel = NO_DMA; + host->host_no, info->info.scsi.dma); + info->info.scsi.dma = NO_DMA; } else { - set_dma_speed(host->dma_channel, 180); + set_dma_speed(info->info.scsi.dma, 180); info->info.ifcfg.capabilities |= FASCAP_DMA; } } @@ -396,9 +396,9 @@ if (ret == 0) goto out; - if (host->dma_channel != NO_DMA) - free_dma(host->dma_channel); - free_irq(host->irq, host); + if (info->info.scsi.dma != NO_DMA) + free_dma(info->info.scsi.dma); + free_irq(ec->irq, host); out_release: fas216_release(host); @@ -420,18 +420,18 @@ static void __devexit powertecscsi_remove(struct expansion_card *ec) { struct Scsi_Host *host = ecard_get_drvdata(ec); - struct powertecscsi_info *info = (struct powertecscsi_info *)host->hostdata; + struct powertec_info *info = (struct powertec_info *)host->hostdata; ecard_set_drvdata(ec, NULL); fas216_remove(host); device_remove_file(&ec->dev, &dev_attr_bus_term); - if (host->dma_channel != NO_DMA) - free_dma(host->dma_channel); - free_irq(host->irq, info); + if (info->info.scsi.dma != NO_DMA) + free_dma(info->info.scsi.dma); + free_irq(ec->irq, info); - iounmap((void *)host->base); + iounmap(info->base); fas216_release(host); scsi_host_put(host); diff -Nru a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c --- a/drivers/scsi/atp870u.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/atp870u.c 2005-03-07 14:54:17 -08:00 @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 1997 Wu Ching Chen * 2.1.x update (C) 1998 Krzysztof G. Baranowski * 2.5.x update (C) 2002 Red Hat @@ -13,8 +13,9 @@ * fix disconnect bug 2000/12/21 * support atp880 chip lvd u160 2001/05/15 * fix prd table bug 2001/09/12 (7.1) + * + * atp885 support add by ACARD Hao Ping Lian 2005/01/05 */ - #include #include #include @@ -38,39 +39,54 @@ #include "atp870u.h" static struct scsi_host_template atp870u_template; -static void send_s870(struct Scsi_Host *host); +void send_s870(struct atp_unit *dev,unsigned char c); +void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c); +void tscam_885(void); - -static irqreturn_t atp870u_intr_handle(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t atp870u_intr_handle(int irq, void *dev_id, struct pt_regs *regs) { unsigned long flags; unsigned short int tmpcip, id; - unsigned char i, j, target_id, lun; + unsigned char i, j, c, target_id, lun,cmdp; unsigned char *prd; - struct scsi_cmnd *workrequ; - unsigned int workportu, tmport; - unsigned long adrcntu, k; + struct scsi_cmnd *workreq; + unsigned int workport, tmport, tmport1; + unsigned long adrcnt, k; +#ifdef ED_DBGP + unsigned long l; +#endif int errstus; struct Scsi_Host *host = dev_id; struct atp_unit *dev = (struct atp_unit *)&host->hostdata; - dev->in_int = 1; - workportu = dev->ioport; - tmport = workportu; - - if (dev->working != 0) { - tmport += 0x1f; + for (c = 0; c < 2; c++) { + tmport = dev->ioport[c] + 0x1f; j = inb(tmport); - if ((j & 0x80) == 0) { - dev->in_int = 0; - return IRQ_NONE; - } - - tmpcip = dev->pciport; - if ((inb(tmpcip) & 0x08) != 0) { + if ((j & 0x80) != 0) + { + goto ch_sel; + } + dev->in_int[c] = 0; + } + return IRQ_NONE; +ch_sel: +#ifdef ED_DBGP + printk("atp870u_intr_handle enter\n"); +#endif + dev->in_int[c] = 1; + cmdp = inb(dev->ioport[c] + 0x10); + workport = dev->ioport[c]; + if (dev->working[c] != 0) { + if (dev->dev_id == ATP885_DEVID) { + tmport1 = workport + 0x16; + if ((inb(tmport1) & 0x80) == 0) + outb((inb(tmport1) | 0x80), tmport1); + } + tmpcip = dev->pciport[c]; + if ((inb(tmpcip) & 0x08) != 0) + { tmpcip += 0x2; - for (k = 0; k < 1000; k++) { + for (k=0; k < 1000; k++) { if ((inb(tmpcip) & 0x08) == 0) { goto stop_dma; } @@ -80,18 +96,24 @@ } } stop_dma: - tmpcip = dev->pciport; + tmpcip = dev->pciport[c]; outb(0x00, tmpcip); tmport -= 0x08; - + i = inb(tmport); + + if (dev->dev_id == ATP885_DEVID) { + tmpcip += 2; + outb(0x06, tmpcip); + tmpcip -= 2; + } tmport -= 0x02; target_id = inb(tmport); tmport += 0x02; /* - * Remap wide devices onto id numbers + * Remap wide devices onto id numbers */ if ((target_id & 0x40) != 0) { @@ -101,332 +123,460 @@ } if ((j & 0x40) != 0) { - if (dev->last_cmd == 0xff) { - dev->last_cmd = target_id; - } - dev->last_cmd |= 0x40; - } - + if (dev->last_cmd[c] == 0xff) { + dev->last_cmd[c] = target_id; + } + dev->last_cmd[c] |= 0x40; + } + if (dev->dev_id == ATP885_DEVID) + dev->r1f[c][target_id] |= j; +#ifdef ED_DBGP + printk("atp870u_intr_handle status = %x\n",i); +#endif if (i == 0x85) { - if ((dev->last_cmd & 0xf0) != 0x40) { - dev->last_cmd = 0xff; + if ((dev->last_cmd[c] & 0xf0) != 0x40) { + dev->last_cmd[c] = 0xff; + } + if (dev->dev_id == ATP885_DEVID) { + tmport -= 0x05; + adrcnt = 0; + ((unsigned char *) &adrcnt)[2] = inb(tmport++); + ((unsigned char *) &adrcnt)[1] = inb(tmport++); + ((unsigned char *) &adrcnt)[0] = inb(tmport); + if (dev->id[c][target_id].last_len != adrcnt) + { + k = dev->id[c][target_id].last_len; + k -= adrcnt; + dev->id[c][target_id].tran_len = k; + dev->id[c][target_id].last_len = adrcnt; + } +#ifdef ED_DBGP + printk("tmport = %x dev->id[c][target_id].last_len = %d dev->id[c][target_id].tran_len = %d\n",tmport,dev->id[c][target_id].last_len,dev->id[c][target_id].tran_len); +#endif } + /* * Flip wide - */ - if (dev->wide_idu != 0) { - tmport = workportu + 0x1b; + */ + if (dev->wide_id[c] != 0) { + tmport = workport + 0x1b; outb(0x01, tmport); while ((inb(tmport) & 0x01) != 0x01) { outb(0x01, tmport); } - } + } /* - * Issue more commands + * Issue more commands */ - spin_lock_irqsave(dev->host->host_lock, flags); - if (((dev->quhdu != dev->quendu) || (dev->last_cmd != 0xff)) && (dev->in_snd == 0)) { - send_s870(host); + spin_lock_irqsave(dev->host->host_lock, flags); + if (((dev->quhd[c] != dev->quend[c]) || (dev->last_cmd[c] != 0xff)) && + (dev->in_snd[c] == 0)) { +#ifdef ED_DBGP + printk("Call sent_s870\n"); +#endif + send_s870(dev,c); } spin_unlock_irqrestore(dev->host->host_lock, flags); /* - * Done + * Done */ - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; +#ifdef ED_DBGP + printk("Status 0x85 return\n"); +#endif + goto handled; } if (i == 0x40) { - dev->last_cmd |= 0x40; - dev->in_int = 0; - goto out; + dev->last_cmd[c] |= 0x40; + dev->in_int[c] = 0; + goto handled; } if (i == 0x21) { - if ((dev->last_cmd & 0xf0) != 0x40) { - dev->last_cmd = 0xff; + if ((dev->last_cmd[c] & 0xf0) != 0x40) { + dev->last_cmd[c] = 0xff; } tmport -= 0x05; - adrcntu = 0; - ((unsigned char *) &adrcntu)[2] = inb(tmport++); - ((unsigned char *) &adrcntu)[1] = inb(tmport++); - ((unsigned char *) &adrcntu)[0] = inb(tmport); - k = dev->id[target_id].last_lenu; - k -= adrcntu; - dev->id[target_id].tran_lenu = k; - dev->id[target_id].last_lenu = adrcntu; + adrcnt = 0; + ((unsigned char *) &adrcnt)[2] = inb(tmport++); + ((unsigned char *) &adrcnt)[1] = inb(tmport++); + ((unsigned char *) &adrcnt)[0] = inb(tmport); + k = dev->id[c][target_id].last_len; + k -= adrcnt; + dev->id[c][target_id].tran_len = k; + dev->id[c][target_id].last_len = adrcnt; tmport -= 0x04; outb(0x41, tmport); tmport += 0x08; outb(0x08, tmport); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; + } + + if (dev->dev_id == ATP885_DEVID) { + if ((i == 0x4c) || (i == 0x4d) || (i == 0x8c) || (i == 0x8d)) { + if ((i == 0x4c) || (i == 0x8c)) + i=0x48; + else + i=0x49; + } + } if ((i == 0x80) || (i == 0x8f)) { +#ifdef ED_DBGP + printk(KERN_DEBUG "Device reselect\n"); +#endif lun = 0; tmport -= 0x07; - j = inb(tmport); - if (j == 0x44 || i == 0x80) { + if (cmdp == 0x44 || i==0x80) { tmport += 0x0d; lun = inb(tmport) & 0x07; } else { - if ((dev->last_cmd & 0xf0) != 0x40) { - dev->last_cmd = 0xff; + if ((dev->last_cmd[c] & 0xf0) != 0x40) { + dev->last_cmd[c] = 0xff; } - if (j == 0x41) { + if (cmdp == 0x41) { +#ifdef ED_DBGP + printk("cmdp = 0x41\n"); +#endif tmport += 0x02; - adrcntu = 0; - ((unsigned char *) &adrcntu)[2] = inb(tmport++); - ((unsigned char *) &adrcntu)[1] = inb(tmport++); - ((unsigned char *) &adrcntu)[0] = inb(tmport); - k = dev->id[target_id].last_lenu; - k -= adrcntu; - dev->id[target_id].tran_lenu = k; - dev->id[target_id].last_lenu = adrcntu; + adrcnt = 0; + ((unsigned char *) &adrcnt)[2] = inb(tmport++); + ((unsigned char *) &adrcnt)[1] = inb(tmport++); + ((unsigned char *) &adrcnt)[0] = inb(tmport); + k = dev->id[c][target_id].last_len; + k -= adrcnt; + dev->id[c][target_id].tran_len = k; + dev->id[c][target_id].last_len = adrcnt; tmport += 0x04; outb(0x08, tmport); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; } else { +#ifdef ED_DBGP + printk("cmdp != 0x41\n"); +#endif outb(0x46, tmport); - dev->id[target_id].dirctu = 0x00; + dev->id[c][target_id].dirct = 0x00; tmport += 0x02; outb(0x00, tmport++); outb(0x00, tmport++); outb(0x00, tmport++); tmport += 0x03; outb(0x08, tmport); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; } } - if (dev->last_cmd != 0xff) { - dev->last_cmd |= 0x40; + if (dev->last_cmd[c] != 0xff) { + dev->last_cmd[c] |= 0x40; } - tmport = workportu + 0x10; - outb(0x45, tmport); - tmport += 0x06; + if (dev->dev_id == ATP885_DEVID) { + j = inb(dev->baseport + 0x29) & 0xfe; + outb(j, dev->baseport + 0x29); + tmport = workport + 0x16; + } else { + tmport = workport + 0x10; + outb(0x45, tmport); + tmport += 0x06; + } + target_id = inb(tmport); /* - * Remap wide identifiers + * Remap wide identifiers */ if ((target_id & 0x10) != 0) { target_id = (target_id & 0x07) | 0x08; } else { target_id &= 0x07; } - workrequ = dev->id[target_id].curr_req; - tmport = workportu + 0x0f; + if (dev->dev_id == ATP885_DEVID) { + tmport = workport + 0x10; + outb(0x45, tmport); + } + workreq = dev->id[c][target_id].curr_req; +#ifdef ED_DBGP + printk(KERN_DEBUG "Channel = %d ID = %d LUN = %d CDB",c,workreq->device->id,workreq->device->lun); + for(l=0;lcmd_len;l++) + { + printk(KERN_DEBUG " %x",workreq->cmnd[l]); + } +#endif + + tmport = workport + 0x0f; outb(lun, tmport); tmport += 0x02; - outb(dev->id[target_id].devspu, tmport++); - adrcntu = dev->id[target_id].tran_lenu; - k = dev->id[target_id].last_lenu; + outb(dev->id[c][target_id].devsp, tmport++); + adrcnt = dev->id[c][target_id].tran_len; + k = dev->id[c][target_id].last_len; + outb(((unsigned char *) &k)[2], tmport++); outb(((unsigned char *) &k)[1], tmport++); outb(((unsigned char *) &k)[0], tmport++); +#ifdef ED_DBGP + printk("k %x, k[0] 0x%x k[1] 0x%x k[2] 0x%x\n", k, inb(tmport-1), inb(tmport-2), inb(tmport-3)); +#endif /* Remap wide */ j = target_id; if (target_id > 7) { j = (j & 0x07) | 0x40; } /* Add direction */ - j |= dev->id[target_id].dirctu; + j |= dev->id[c][target_id].dirct; outb(j, tmport++); - outb(0x80, tmport); - - /* enable 32 bit fifo transfer */ - if (dev->deviceid != 0x8081) { - tmport = workportu + 0x3a; - if ((dev->ata_cdbu[0] == 0x08) || (dev->ata_cdbu[0] == 0x28) || (dev->ata_cdbu[0] == 0x0a) || (dev->ata_cdbu[0] == 0x2a)) { - outb((unsigned char) ((inb(tmport) & 0xf3) | 0x08), tmport); - } else { - outb((unsigned char) (inb(tmport) & 0xf3), tmport); + outb(0x80,tmport); + + /* enable 32 bit fifo transfer */ + if (dev->dev_id == ATP885_DEVID) { + tmpcip = dev->pciport[c] + 1; + i=inb(tmpcip) & 0xf3; + //j=workreq->cmnd[0]; + if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { + i |= 0x0c; } - } else { - tmport = workportu - 0x05; - if ((dev->ata_cdbu[0] == 0x08) || (dev->ata_cdbu[0] == 0x28) || (dev->ata_cdbu[0] == 0x0a) || (dev->ata_cdbu[0] == 0x2a)) { + outb(i,tmpcip); + } else if ((dev->dev_id == ATP880_DEVID1) || + (dev->dev_id == ATP880_DEVID2) ) { + tmport = workport - 0x05; + if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { outb((unsigned char) ((inb(tmport) & 0x3f) | 0xc0), tmport); } else { outb((unsigned char) (inb(tmport) & 0x3f), tmport); } - } - - tmport = workportu + 0x1b; + } else { + tmport = workport + 0x3a; + if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { + outb((unsigned char) ((inb(tmport) & 0xf3) | 0x08), tmport); + } else { + outb((unsigned char) (inb(tmport) & 0xf3), tmport); + } + } + tmport = workport + 0x1b; j = 0; id = 1; id = id << target_id; /* - * Is this a wide device + * Is this a wide device */ - if ((id & dev->wide_idu) != 0) { + if ((id & dev->wide_id[c]) != 0) { j |= 0x01; } outb(j, tmport); while ((inb(tmport) & 0x01) != j) { - outb(j, tmport); + outb(j,tmport); } - - if (dev->id[target_id].last_lenu == 0) { - tmport = workportu + 0x18; + if (dev->id[c][target_id].last_len == 0) { + tmport = workport + 0x18; outb(0x08, tmport); - dev->in_int = 0; - goto out; - } - prd = dev->id[target_id].prd_posu; - while (adrcntu != 0) { - id = ((unsigned short int *) (prd))[2]; + dev->in_int[c] = 0; +#ifdef ED_DBGP + printk("dev->id[c][target_id].last_len = 0\n"); +#endif + goto handled; + } +#ifdef ED_DBGP + printk("target_id = %d adrcnt = %d\n",target_id,adrcnt); +#endif + prd = dev->id[c][target_id].prd_pos; + while (adrcnt != 0) { + id = ((unsigned short int *)prd)[2]; if (id == 0) { k = 0x10000; } else { k = id; } - if (k > adrcntu) { - ((unsigned short int *) (prd))[2] = (unsigned short int) - (k - adrcntu); - ((unsigned long *) (prd))[0] += adrcntu; - adrcntu = 0; - dev->id[target_id].prd_posu = prd; + if (k > adrcnt) { + ((unsigned short int *)prd)[2] = (unsigned short int) + (k - adrcnt); + ((unsigned long *)prd)[0] += adrcnt; + adrcnt = 0; + dev->id[c][target_id].prd_pos = prd; } else { - adrcntu -= k; - dev->id[target_id].prdaddru += 0x08; + adrcnt -= k; + dev->id[c][target_id].prdaddr += 0x08; prd += 0x08; - if (adrcntu == 0) { - dev->id[target_id].prd_posu = prd; + if (adrcnt == 0) { + dev->id[c][target_id].prd_pos = prd; } - } + } } - tmpcip = dev->pciport + 0x04; - outl(dev->id[target_id].prdaddru, tmpcip); - tmpcip -= 0x02; - outb(0x06, tmpcip); - outb(0x00, tmpcip); - tmpcip -= 0x02; - tmport = workportu + 0x18; + tmpcip = dev->pciport[c] + 0x04; + outl(dev->id[c][target_id].prdaddr, tmpcip); +#ifdef ED_DBGP + printk("dev->id[%d][%d].prdaddr 0x%8x\n", c, target_id, dev->id[c][target_id].prdaddr); +#endif + if (dev->dev_id == ATP885_DEVID) { + tmpcip -= 0x04; + } else { + tmpcip -= 0x02; + outb(0x06, tmpcip); + outb(0x00, tmpcip); + tmpcip -= 0x02; + } + tmport = workport + 0x18; /* - * Check transfer direction + * Check transfer direction */ - if (dev->id[target_id].dirctu != 0) { + if (dev->id[c][target_id].dirct != 0) { outb(0x08, tmport); outb(0x01, tmpcip); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; +#ifdef ED_DBGP + printk("status 0x80 return dirct != 0\n"); +#endif + goto handled; } outb(0x08, tmport); outb(0x09, tmpcip); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; +#ifdef ED_DBGP + printk("status 0x80 return dirct = 0\n"); +#endif + goto handled; } /* - * Current scsi request on this target + * Current scsi request on this target */ - workrequ = dev->id[target_id].curr_req; + workreq = dev->id[c][target_id].curr_req; if (i == 0x42) { - if ((dev->last_cmd & 0xf0) != 0x40) { - dev->last_cmd = 0xff; + if ((dev->last_cmd[c] & 0xf0) != 0x40) + { + dev->last_cmd[c] = 0xff; } errstus = 0x02; - workrequ->result = errstus; + workreq->result = errstus; goto go_42; } if (i == 0x16) { - if ((dev->last_cmd & 0xf0) != 0x40) { - dev->last_cmd = 0xff; + if ((dev->last_cmd[c] & 0xf0) != 0x40) { + dev->last_cmd[c] = 0xff; } errstus = 0; tmport -= 0x08; errstus = inb(tmport); - workrequ->result = errstus; + if (((dev->r1f[c][target_id] & 0x10) != 0)&&(dev->dev_id==ATP885_DEVID)) { + printk(KERN_WARNING "AEC67162 CRC ERROR !\n"); + errstus = 0x02; + } + workreq->result = errstus; go_42: + if (dev->dev_id == ATP885_DEVID) { + j = inb(dev->baseport + 0x29) | 0x01; + outb(j, dev->baseport + 0x29); + } /* - * Complete the command + * Complete the command */ - - if (workrequ->use_sg) { + if (workreq->use_sg) { pci_unmap_sg(dev->pdev, - (struct scatterlist *)workrequ->buffer, - workrequ->use_sg, - workrequ->sc_data_direction); - } else if (workrequ->request_bufflen && - workrequ->sc_data_direction != DMA_NONE) { + (struct scatterlist *)workreq->buffer, + workreq->use_sg, + workreq->sc_data_direction); + } else if (workreq->request_bufflen && + workreq->sc_data_direction != DMA_NONE) { pci_unmap_single(dev->pdev, - workrequ->SCp.dma_handle, - workrequ->request_bufflen, - workrequ->sc_data_direction); - } + workreq->SCp.dma_handle, + workreq->request_bufflen, + workreq->sc_data_direction); + } spin_lock_irqsave(dev->host->host_lock, flags); - (*workrequ->scsi_done) (workrequ); - + (*workreq->scsi_done) (workreq); +#ifdef ED_DBGP + printk("workreq->scsi_done\n"); +#endif /* - * Clear it off the queue + * Clear it off the queue */ - dev->id[target_id].curr_req = NULL; - dev->working--; + dev->id[c][target_id].curr_req = 0; + dev->working[c]--; spin_unlock_irqrestore(dev->host->host_lock, flags); /* * Take it back wide */ - if (dev->wide_idu != 0) { - tmport = workportu + 0x1b; + if (dev->wide_id[c] != 0) { + tmport = workport + 0x1b; outb(0x01, tmport); while ((inb(tmport) & 0x01) != 0x01) { outb(0x01, tmport); - } - } + } + } /* - * If there is stuff to send and nothing going then send it + * If there is stuff to send and nothing going then send it */ spin_lock_irqsave(dev->host->host_lock, flags); - if (((dev->last_cmd != 0xff) || (dev->quhdu != dev->quendu)) && (dev->in_snd == 0)) { - send_s870(host); + if (((dev->last_cmd[c] != 0xff) || (dev->quhd[c] != dev->quend[c])) && + (dev->in_snd[c] == 0)) { +#ifdef ED_DBGP + printk("Call sent_s870(scsi_done)\n"); +#endif + send_s870(dev,c); } spin_unlock_irqrestore(dev->host->host_lock, flags); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; } - if ((dev->last_cmd & 0xf0) != 0x40) { - dev->last_cmd = 0xff; + if ((dev->last_cmd[c] & 0xf0) != 0x40) { + dev->last_cmd[c] = 0xff; } if (i == 0x4f) { i = 0x89; } i &= 0x0f; if (i == 0x09) { - tmpcip = tmpcip + 4; - outl(dev->id[target_id].prdaddru, tmpcip); + tmpcip += 4; + outl(dev->id[c][target_id].prdaddr, tmpcip); tmpcip = tmpcip - 2; outb(0x06, tmpcip); outb(0x00, tmpcip); tmpcip = tmpcip - 2; - tmport = workportu + 0x10; + tmport = workport + 0x10; outb(0x41, tmport); - dev->id[target_id].dirctu = 0x00; - tmport += 0x08; + if (dev->dev_id == ATP885_DEVID) { + tmport += 2; + k = dev->id[c][target_id].last_len; + outb((unsigned char) (((unsigned char *) (&k))[2]), tmport++); + outb((unsigned char) (((unsigned char *) (&k))[1]), tmport++); + outb((unsigned char) (((unsigned char *) (&k))[0]), tmport); + dev->id[c][target_id].dirct = 0x00; + tmport += 0x04; + } else { + dev->id[c][target_id].dirct = 0x00; + tmport += 0x08; + } outb(0x08, tmport); outb(0x09, tmpcip); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; } if (i == 0x08) { - tmpcip = tmpcip + 4; - outl(dev->id[target_id].prdaddru, tmpcip); + tmpcip += 4; + outl(dev->id[c][target_id].prdaddr, tmpcip); tmpcip = tmpcip - 2; outb(0x06, tmpcip); outb(0x00, tmpcip); tmpcip = tmpcip - 2; - tmport = workportu + 0x10; + tmport = workport + 0x10; outb(0x41, tmport); - tmport += 0x05; + if (dev->dev_id == ATP885_DEVID) { + tmport += 2; + k = dev->id[c][target_id].last_len; + outb((unsigned char) (((unsigned char *) (&k))[2]), tmport++); + outb((unsigned char) (((unsigned char *) (&k))[1]), tmport++); + outb((unsigned char) (((unsigned char *) (&k))[0]), tmport++); + } else { + tmport += 5; + } outb((unsigned char) (inb(tmport) | 0x20), tmport); - dev->id[target_id].dirctu = 0x20; + dev->id[c][target_id].dirct = 0x20; tmport += 0x03; outb(0x08, tmport); outb(0x01, tmpcip); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; } tmport -= 0x07; if (i == 0x0a) { @@ -434,25 +584,29 @@ } else { outb(0x46, tmport); } - dev->id[target_id].dirctu = 0x00; + dev->id[c][target_id].dirct = 0x00; tmport += 0x02; outb(0x00, tmport++); outb(0x00, tmport++); outb(0x00, tmport++); tmport += 0x03; outb(0x08, tmport); - dev->in_int = 0; - goto out; + dev->in_int[c] = 0; + goto handled; } else { -// tmport = workportu + 0x17; -// inb(tmport); -// dev->working = 0; - dev->in_int = 0; +// tmport = workport + 0x17; +// inb(tmport); +// dev->working[c] = 0; + dev->in_int[c] = 0; + goto handled; } -out: + +handled: +#ifdef ED_DBGP + printk("atp870u_intr_handle exit\n"); +#endif return IRQ_HANDLED; } - /** * atp870u_queuecommand - Queue SCSI command * @req_p: request block @@ -460,24 +614,30 @@ * * Queue a command to the ATP queue. Called with the host lock held. */ - -static int atp870u_queuecommand(struct scsi_cmnd *req_p, - void (*done) (struct scsi_cmnd *)) +int atp870u_queuecommand(struct scsi_cmnd * req_p, void (*done) (struct scsi_cmnd *)) { - unsigned short int m; - unsigned int tmport; - struct Scsi_Host *host; + unsigned char c; + unsigned int tmport,m; struct atp_unit *dev; + struct Scsi_Host *host; - if (req_p->device->channel != 0) { + c = req_p->device->channel; + req_p->sense_buffer[0]=0; + req_p->resid = 0; + if (req_p->device->channel > 1) { req_p->result = 0x00040000; done(req_p); +#ifdef ED_DBGP + printk("atp870u_queuecommand : req_p->device->channel > 1\n"); +#endif return 0; - }; + } host = req_p->device->host; dev = (struct atp_unit *)&host->hostdata; - + + + m = 1; m = m << req_p->device->id; @@ -485,44 +645,60 @@ * Fake a timeout for missing targets */ - if ((m & dev->active_idu) == 0) { + if ((m & dev->active_id[c]) == 0) { req_p->result = 0x00040000; done(req_p); return 0; } + if (done) { req_p->scsi_done = done; } else { - printk(KERN_WARNING "atp870u_queuecommand: done can't be NULL\n"); +#ifdef ED_DBGP + printk( "atp870u_queuecommand: done can't be NULL\n"); +#endif req_p->result = 0; done(req_p); return 0; } + /* - * Count new command + * Count new command */ - - dev->quendu++; - if (dev->quendu >= qcnt) { - dev->quendu = 0; + dev->quend[c]++; + if (dev->quend[c] >= qcnt) { + dev->quend[c] = 0; } + /* - * Check queue state + * Check queue state */ - if (dev->quhdu == dev->quendu) { - if (dev->quendu == 0) { - dev->quendu = qcnt; - } - dev->quendu--; + if (dev->quhd[c] == dev->quend[c]) { + if (dev->quend[c] == 0) { + dev->quend[c] = qcnt; + } +#ifdef ED_DBGP + printk("atp870u_queuecommand : dev->quhd[c] == dev->quend[c]\n"); +#endif + dev->quend[c]--; req_p->result = 0x00020000; - done(req_p); + done(req_p); return 0; } - dev->querequ[dev->quendu] = req_p; - tmport = dev->ioport + 0x1c; - if ((inb(tmport) == 0) && (dev->in_int == 0) && (dev->in_snd == 0)) { - send_s870(host); - } + dev->quereq[c][dev->quend[c]] = req_p; + tmport = dev->ioport[c] + 0x1c; +#ifdef ED_DBGP + printk("dev->ioport[c] = %x inb(tmport) = %x dev->in_int[%d] = %d dev->in_snd[%d] = %d\n",dev->ioport[c],inb(tmport),c,dev->in_int[c],c,dev->in_snd[c]); +#endif + if ((inb(tmport) == 0) && (dev->in_int[c] == 0) && (dev->in_snd[c] == 0)) { +#ifdef ED_DBGP + printk("Call sent_s870(atp870u_queuecommand)\n"); +#endif + send_s870(dev,c); + } +#ifdef ED_DBGP + printk("atp870u_queuecommand : exit\n"); +#endif return 0; } @@ -535,194 +711,270 @@ * * Caller holds the host lock. */ - -static void send_s870(struct Scsi_Host *host) +void send_s870(struct atp_unit *dev,unsigned char c) { unsigned int tmport; - struct scsi_cmnd *workrequ; - unsigned int i; - unsigned char j, target_id; + struct scsi_cmnd *workreq; + unsigned int i;//,k; + unsigned char j, target_id; unsigned char *prd; unsigned short int tmpcip, w; - unsigned long l; - dma_addr_t bttl; - unsigned int workportu; + unsigned long l, bttl = 0; + unsigned int workport; struct scatterlist *sgpnt; - struct atp_unit *dev = (struct atp_unit *)&host->hostdata; - int sg_count; + unsigned long sg_count; - if (dev->in_snd != 0) { + if (dev->in_snd[c] != 0) { +#ifdef ED_DBGP + printk("cmnd in_snd\n"); +#endif return; } - dev->in_snd = 1; - if ((dev->last_cmd != 0xff) && ((dev->last_cmd & 0x40) != 0)) { - dev->last_cmd &= 0x0f; - workrequ = dev->id[dev->last_cmd].curr_req; - if (workrequ != NULL) { /* check NULL pointer */ - goto cmd_subp; - } - dev->last_cmd = 0xff; - if (dev->quhdu == dev->quendu) { - dev->in_snd = 0; - return; - } - } - if ((dev->last_cmd != 0xff) && (dev->working != 0)) { - dev->in_snd = 0; - return; - } - dev->working++; - j = dev->quhdu; - dev->quhdu++; - if (dev->quhdu >= qcnt) { - dev->quhdu = 0; - } - workrequ = dev->querequ[dev->quhdu]; - if (dev->id[workrequ->device->id].curr_req == 0) { - dev->id[workrequ->device->id].curr_req = workrequ; - dev->last_cmd = workrequ->device->id; +#ifdef ED_DBGP + printk("Sent_s870 enter\n"); +#endif + dev->in_snd[c] = 1; + if ((dev->last_cmd[c] != 0xff) && ((dev->last_cmd[c] & 0x40) != 0)) { + dev->last_cmd[c] &= 0x0f; + workreq = dev->id[c][dev->last_cmd[c]].curr_req; + if (workreq != NULL) { /* check NULL pointer */ + goto cmd_subp; + } + dev->last_cmd[c] = 0xff; + if (dev->quhd[c] == dev->quend[c]) { + dev->in_snd[c] = 0; + return ; + } + } + if ((dev->last_cmd[c] != 0xff) && (dev->working[c] != 0)) { + dev->in_snd[c] = 0; + return ; + } + dev->working[c]++; + j = dev->quhd[c]; + dev->quhd[c]++; + if (dev->quhd[c] >= qcnt) { + dev->quhd[c] = 0; + } + workreq = dev->quereq[c][dev->quhd[c]]; + if (dev->id[c][workreq->device->id].curr_req == 0) { + dev->id[c][workreq->device->id].curr_req = workreq; + dev->last_cmd[c] = workreq->device->id; goto cmd_subp; - } - dev->quhdu = j; - dev->working--; - dev->in_snd = 0; + } + dev->quhd[c] = j; + dev->working[c]--; + dev->in_snd[c] = 0; return; cmd_subp: - workportu = dev->ioport; - tmport = workportu + 0x1f; + workport = dev->ioport[c]; + tmport = workport + 0x1f; if ((inb(tmport) & 0xb0) != 0) { goto abortsnd; } - tmport = workportu + 0x1c; + tmport = workport + 0x1c; if (inb(tmport) == 0) { goto oktosend; } abortsnd: - dev->last_cmd |= 0x40; - dev->in_snd = 0; +#ifdef ED_DBGP + printk("Abort to Send\n"); +#endif + dev->last_cmd[c] |= 0x40; + dev->in_snd[c] = 0; return; oktosend: - memcpy(&dev->ata_cdbu[0], &workrequ->cmnd[0], workrequ->cmd_len); - if (dev->ata_cdbu[0] == READ_CAPACITY) { - if (workrequ->request_bufflen > 8) { - workrequ->request_bufflen = 0x08; +#ifdef ED_DBGP + printk("OK to Send\n"); + printk("CDB"); + for(i=0;icmd_len;i++) { + printk(" %x",workreq->cmnd[i]); + } + printk("\nChannel = %d ID = %d LUN = %d\n",c,workreq->device->id,workreq->device->lun); +#endif + if (dev->dev_id == ATP885_DEVID) { + j = inb(dev->baseport + 0x29) & 0xfe; + outb(j, dev->baseport + 0x29); + dev->r1f[c][workreq->device->id] = 0; + } + + if (workreq->cmnd[0] == READ_CAPACITY) { + if (workreq->request_bufflen > 8) { + workreq->request_bufflen = 0x08; } } - if (dev->ata_cdbu[0] == 0x00) { - workrequ->request_bufflen = 0; + if (workreq->cmnd[0] == 0x00) { + workreq->request_bufflen = 0; } - tmport = workportu + 0x1b; + tmport = workport + 0x1b; j = 0; - target_id = workrequ->device->id; + target_id = workreq->device->id; /* - * Wide ? + * Wide ? */ w = 1; w = w << target_id; - if ((w & dev->wide_idu) != 0) { + if ((w & dev->wide_id[c]) != 0) { j |= 0x01; } outb(j, tmport); while ((inb(tmport) & 0x01) != j) { - outb(j, tmport); + outb(j,tmport); +#ifdef ED_DBGP + printk("send_s870 while loop 1\n"); +#endif } - /* - * Write the command + * Write the command */ - tmport = workportu; - outb(workrequ->cmd_len, tmport++); + tmport = workport; + outb(workreq->cmd_len, tmport++); outb(0x2c, tmport++); - outb(0xcf, tmport++); - for (i = 0; i < workrequ->cmd_len; i++) { - outb(dev->ata_cdbu[i], tmport++); + if (dev->dev_id == ATP885_DEVID) { + outb(0x7f, tmport++); + } else { + outb(0xcf, tmport++); + } + for (i = 0; i < workreq->cmd_len; i++) { + outb(workreq->cmnd[i], tmport++); } - tmport = workportu + 0x0f; - outb(workrequ->device->lun, tmport); + tmport = workport + 0x0f; + outb(workreq->device->lun, tmport); tmport += 0x02; /* - * Write the target + * Write the target */ - outb(dev->id[target_id].devspu, tmport++); - + outb(dev->id[c][target_id].devsp, tmport++); +#ifdef ED_DBGP + printk("dev->id[%d][%d].devsp = %2x\n",c,target_id,dev->id[c][target_id].devsp); +#endif /* - * Figure out the transfer size + * Figure out the transfer size */ - if (workrequ->use_sg) { + if (workreq->use_sg) { +#ifdef ED_DBGP + printk("Using SGL\n"); +#endif l = 0; - sgpnt = (struct scatterlist *) workrequ->request_buffer; - sg_count = pci_map_sg(dev->pdev, sgpnt, workrequ->use_sg, - workrequ->sc_data_direction); - for (i = 0; i < workrequ->use_sg; i++) { - if (sgpnt[i].length == 0 || workrequ->use_sg > ATP870U_SCATTER) { + + sgpnt = (struct scatterlist *) workreq->request_buffer; + sg_count = pci_map_sg(dev->pdev, sgpnt, workreq->use_sg, + workreq->sc_data_direction); + + for (i = 0; i < workreq->use_sg; i++) { + if (sgpnt[i].length == 0 || workreq->use_sg > ATP870U_SCATTER) { panic("Foooooooood fight!"); } l += sgpnt[i].length; } - } else if(workrequ->request_bufflen && workrequ->sc_data_direction != PCI_DMA_NONE) { - workrequ->SCp.dma_handle = pci_map_single(dev->pdev, - workrequ->request_buffer, - workrequ->request_bufflen, - workrequ->sc_data_direction); - l = workrequ->request_bufflen; - } - else l = 0; +#ifdef ED_DBGP + printk( "send_s870: workreq->use_sg %d, sg_count %d l %8ld\n", workreq->use_sg, sg_count, l); +#endif + } else if(workreq->request_bufflen && workreq->sc_data_direction != PCI_DMA_NONE) { +#ifdef ED_DBGP + printk("Not using SGL\n"); +#endif + workreq->SCp.dma_handle = pci_map_single(dev->pdev, workreq->request_buffer, + workreq->request_bufflen, + workreq->sc_data_direction); + l = workreq->request_bufflen; +#ifdef ED_DBGP + printk( "send_s870: workreq->use_sg %d, l %8ld\n", workreq->use_sg, l); +#endif + } else l = 0; /* - * Write transfer size + * Write transfer size */ outb((unsigned char) (((unsigned char *) (&l))[2]), tmport++); outb((unsigned char) (((unsigned char *) (&l))[1]), tmport++); outb((unsigned char) (((unsigned char *) (&l))[0]), tmport++); - j = target_id; - dev->id[j].last_lenu = l; - dev->id[j].tran_lenu = 0; + j = target_id; + dev->id[c][j].last_len = l; + dev->id[c][j].tran_len = 0; +#ifdef ED_DBGP + printk("dev->id[%2d][%2d].last_len = %d\n",c,j,dev->id[c][j].last_len); +#endif /* - * Flip the wide bits + * Flip the wide bits */ if ((j & 0x08) != 0) { j = (j & 0x07) | 0x40; } /* - * Check transfer direction + * Check transfer direction */ - if (workrequ->sc_data_direction == DMA_TO_DEVICE) { + if (workreq->sc_data_direction == DMA_TO_DEVICE) { outb((unsigned char) (j | 0x20), tmport++); } else { outb(j, tmport++); } outb((unsigned char) (inb(tmport) | 0x80), tmport); outb(0x80, tmport); - tmport = workportu + 0x1c; - dev->id[target_id].dirctu = 0; + tmport = workport + 0x1c; + dev->id[c][target_id].dirct = 0; if (l == 0) { if (inb(tmport) == 0) { - tmport = workportu + 0x18; + tmport = workport + 0x18; +#ifdef ED_DBGP + printk("change SCSI_CMD_REG 0x08\n"); +#endif outb(0x08, tmport); } else { - dev->last_cmd |= 0x40; + dev->last_cmd[c] |= 0x40; } - dev->in_snd = 0; + dev->in_snd[c] = 0; return; } - tmpcip = dev->pciport; - prd = dev->id[target_id].prd_tableu; - dev->id[target_id].prd_posu = prd; + tmpcip = dev->pciport[c]; + prd = dev->id[c][target_id].prd_table; + dev->id[c][target_id].prd_pos = prd; /* - * Now write the request list. Either as scatter/gather or as - * a linear chain. + * Now write the request list. Either as scatter/gather or as + * a linear chain. */ - if (workrequ->use_sg) { - sgpnt = (struct scatterlist *) workrequ->request_buffer; + if (workreq->use_sg) { + sgpnt = (struct scatterlist *) workreq->request_buffer; i = 0; - for (j = 0; j < workrequ->use_sg; j++) { + for (j = 0; j < workreq->use_sg; j++) { bttl = sg_dma_address(&sgpnt[j]); - l = sg_dma_len(&sgpnt[j]); + l=sg_dma_len(&sgpnt[j]); +#ifdef ED_DBGP + printk("1. bttl %x, l %x\n",bttl, l); +#endif while (l > 0x10000) { + (((u16 *) (prd))[i + 3]) = 0x0000; + (((u16 *) (prd))[i + 2]) = 0x0000; + (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); + l -= 0x10000; + bttl += 0x10000; + i += 0x04; + } + (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); + (((u16 *) (prd))[i + 2]) = cpu_to_le16(l); + (((u16 *) (prd))[i + 3]) = 0; + i += 0x04; + } + (((u16 *) (prd))[i - 1]) = cpu_to_le16(0x8000); +#ifdef ED_DBGP + printk("prd %4x %4x %4x %4x\n",(((unsigned short int *)prd)[0]),(((unsigned short int *)prd)[1]),(((unsigned short int *)prd)[2]),(((unsigned short int *)prd)[3])); + printk("2. bttl %x, l %x\n",bttl, l); +#endif + } else { + /* + * For a linear request write a chain of blocks + */ + bttl = workreq->SCp.dma_handle; + l = workreq->request_bufflen; + i = 0; +#ifdef ED_DBGP + printk("3. bttl %x, l %x\n",bttl, l); +#endif + while (l > 0x10000) { (((u16 *) (prd))[i + 3]) = 0x0000; (((u16 *) (prd))[i + 2]) = 0x0000; (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); @@ -730,76 +982,84 @@ bttl += 0x10000; i += 0x04; } - (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); + (((u16 *) (prd))[i + 3]) = cpu_to_le16(0x8000); (((u16 *) (prd))[i + 2]) = cpu_to_le16(l); - (((u16 *) (prd))[i + 3]) = 0; - i += 0x04; - } - (((u16 *) (prd))[i - 1]) = cpu_to_le16(0x8000); - } else { - /* - * For a linear request write a chain of blocks - */ - bttl = workrequ->SCp.dma_handle; - l = workrequ->request_bufflen; - i = 0; - while (l > 0x10000) { - (((u16 *) (prd))[i + 3]) = 0x0000; - (((u16 *) (prd))[i + 2]) = 0x0000; - (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); - l -= 0x10000; - bttl += 0x10000; - i += 0x04; - } - (((u16 *) (prd))[i + 3]) = cpu_to_le16(0x8000); - (((u16 *) (prd))[i + 2]) = cpu_to_le16(l); - (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); - } - tmpcip = tmpcip + 4; - dev->id[target_id].prdaddru = dev->id[target_id].prd_phys; - outl(dev->id[target_id].prd_phys, tmpcip); + (((u32 *) (prd))[i >> 1]) = cpu_to_le32(bttl); +#ifdef ED_DBGP + printk("prd %4x %4x %4x %4x\n",(((unsigned short int *)prd)[0]),(((unsigned short int *)prd)[1]),(((unsigned short int *)prd)[2]),(((unsigned short int *)prd)[3])); + printk("4. bttl %x, l %x\n",bttl, l); +#endif + + } + tmpcip += 4; +#ifdef ED_DBGP + printk("send_s870: prdaddr_1 0x%8x\n", dev->id[c][target_id].prdaddr); +#endif + dev->id[c][target_id].prdaddr = virt_to_bus(dev->id[c][target_id].prd_table); +#ifdef ED_DBGP + printk("send_s870: prdaddr_2 0x%8x tmpcip %x target_id %d\n", dev->id[c][target_id].prdaddr,tmpcip,target_id); +#endif + outl(dev->id[c][target_id].prdaddr, tmpcip); tmpcip = tmpcip - 2; outb(0x06, tmpcip); outb(0x00, tmpcip); - tmpcip = tmpcip - 2; - - if (dev->deviceid != 0x8081) { - tmport = workportu + 0x3a; - if ((dev->ata_cdbu[0] == 0x08) || (dev->ata_cdbu[0] == 0x28) || (dev->ata_cdbu[0] == 0x0a) || (dev->ata_cdbu[0] == 0x2a)) { - outb((inb(tmport) & 0xf3) | 0x08, tmport); - } else { - outb(inb(tmport) & 0xf3, tmport); - } - } else { - tmport = workportu - 0x05; - if ((dev->ata_cdbu[0] == 0x08) || (dev->ata_cdbu[0] == 0x28) || (dev->ata_cdbu[0] == 0x0a) || (dev->ata_cdbu[0] == 0x2a)) { + if (dev->dev_id == ATP885_DEVID) { + tmpcip--; + j=inb(tmpcip) & 0xf3; + if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || + (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { + j |= 0x0c; + } + outb(j,tmpcip); + tmpcip--; + } else if ((dev->dev_id == ATP880_DEVID1) || + (dev->dev_id == ATP880_DEVID2)) { + tmpcip =tmpcip -2; + tmport = workport - 0x05; + if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { outb((unsigned char) ((inb(tmport) & 0x3f) | 0xc0), tmport); } else { outb((unsigned char) (inb(tmport) & 0x3f), tmport); - } - } - tmport = workportu + 0x1c; + } + } else { + tmpcip =tmpcip -2; + tmport = workport + 0x3a; + if ((workreq->cmnd[0] == 0x08) || (workreq->cmnd[0] == 0x28) || (workreq->cmnd[0] == 0x0a) || (workreq->cmnd[0] == 0x2a)) { + outb((inb(tmport) & 0xf3) | 0x08, tmport); + } else { + outb(inb(tmport) & 0xf3, tmport); + } + } + tmport = workport + 0x1c; - if (workrequ->sc_data_direction == DMA_TO_DEVICE) { - dev->id[target_id].dirctu = 0x20; + if(workreq->sc_data_direction == DMA_TO_DEVICE) { + dev->id[c][target_id].dirct = 0x20; if (inb(tmport) == 0) { - tmport = workportu + 0x18; + tmport = workport + 0x18; outb(0x08, tmport); outb(0x01, tmpcip); +#ifdef ED_DBGP + printk( "start DMA(to target)\n"); +#endif } else { - dev->last_cmd |= 0x40; + dev->last_cmd[c] |= 0x40; } - dev->in_snd = 0; + dev->in_snd[c] = 0; return; } - if (inb(tmport) == 0) { - tmport = workportu + 0x18; + if (inb(tmport) == 0) { + tmport = workport + 0x18; outb(0x08, tmport); outb(0x09, tmpcip); +#ifdef ED_DBGP + printk( "start DMA(to host)\n"); +#endif } else { - dev->last_cmd |= 0x40; + dev->last_cmd[c] |= 0x40; } - dev->in_snd = 0; + dev->in_snd[c] = 0; + return; + } static unsigned char fun_scam(struct atp_unit *dev, unsigned short int *val) @@ -808,7 +1068,7 @@ unsigned short int i, k; unsigned char j; - tmport = dev->ioport + 0x1c; + tmport = dev->ioport[0] + 0x1c; outw(*val, tmport); FUN_D7: for (i = 0; i < 10; i++) { /* stable >= bus settle delay(400 ns) */ @@ -863,24 +1123,24 @@ } */ - tmport = dev->ioport + 1; + tmport = dev->ioport[0] + 1; outb(0x08, tmport++); outb(0x7f, tmport); - tmport = dev->ioport + 0x11; + tmport = dev->ioport[0] + 0x11; outb(0x20, tmport); if ((dev->scam_on & 0x40) == 0) { return; } m = 1; - m <<= dev->host_idu; + m <<= dev->host_id[0]; j = 16; - if (dev->chip_veru < 4) { + if (dev->chip_ver < 4) { m |= 0xff00; j = 8; } assignid_map = m; - tmport = dev->ioport + 0x02; + tmport = dev->ioport[0] + 0x02; outb(0x02, tmport++); /* 2*2=4ms,3EH 2/32*3E=3.9ms */ outb(0, tmport++); outb(0, tmport++); @@ -895,7 +1155,7 @@ if ((m & assignid_map) != 0) { continue; } - tmport = dev->ioport + 0x0f; + tmport = dev->ioport[0] + 0x0f; outb(0, tmport++); tmport += 0x02; outb(0, tmport++); @@ -907,14 +1167,14 @@ k = i; } outb(k, tmport++); - tmport = dev->ioport + 0x1b; - if (dev->chip_veru == 4) { + tmport = dev->ioport[0] + 0x1b; + if (dev->chip_ver == 4) { outb(0x01, tmport); } else { outb(0x00, tmport); } wait_rdyok: - tmport = dev->ioport + 0x18; + tmport = dev->ioport[0] + 0x18; outb(0x09, tmport); tmport += 0x07; @@ -925,22 +1185,22 @@ if ((k == 0x85) || (k == 0x42)) { continue; } - tmport = dev->ioport + 0x10; + tmport = dev->ioport[0] + 0x10; outb(0x41, tmport); goto wait_rdyok; } assignid_map |= m; } - tmport = dev->ioport + 0x02; + tmport = dev->ioport[0] + 0x02; outb(0x7f, tmport); - tmport = dev->ioport + 0x1b; + tmport = dev->ioport[0] + 0x1b; outb(0x02, tmport); outb(0, 0x80); val = 0x0080; /* bsy */ - tmport = dev->ioport + 0x1c; + tmport = dev->ioport[0] + 0x1c; outw(val, tmport); val |= 0x0040; /* sel */ outw(val, tmport); @@ -984,7 +1244,7 @@ if ((inb(tmport) & 0x80) == 0x00) { /* bsy ? */ outw(0, tmport--); outb(0, tmport); - tmport = dev->ioport + 0x15; + tmport = dev->ioport[0] + 0x15; outb(0, tmport); tmport += 0x03; outb(0x09, tmport); @@ -1085,7 +1345,7 @@ } -static void is870(struct Scsi_Host *host, unsigned int wkport) +void is870(struct atp_unit *dev, unsigned int wkport) { unsigned int tmport; unsigned char i, j, k, rmb, n; @@ -1097,26 +1357,25 @@ static unsigned char synu[6] = { 0x80, 1, 3, 1, 0x0c, 0x0e }; static unsigned char synw[6] = { 0x80, 1, 3, 1, 0x0c, 0x07 }; static unsigned char wide[6] = { 0x80, 1, 2, 3, 1, 0 }; - struct atp_unit *dev = (struct atp_unit *)&host->hostdata; - + tmport = wkport + 0x3a; outb((unsigned char) (inb(tmport) | 0x10), tmport); for (i = 0; i < 16; i++) { - if ((dev->chip_veru != 4) && (i > 7)) { + if ((dev->chip_ver != 4) && (i > 7)) { break; } m = 1; m = m << i; - if ((m & dev->active_idu) != 0) { + if ((m & dev->active_id[0]) != 0) { continue; } - if (i == dev->host_idu) { - printk(KERN_INFO " ID: %2d Host Adapter\n", dev->host_idu); + if (i == dev->host_id[0]) { + printk(KERN_INFO " ID: %2d Host Adapter\n", dev->host_id[0]); continue; } tmport = wkport + 0x1b; - if (dev->chip_veru == 4) { + if (dev->chip_ver == 4) { outb(0x01, tmport); } else { outb(0x00, tmport); @@ -1133,7 +1392,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -1152,7 +1411,7 @@ continue; } while (inb(tmport) != 0x8e); - dev->active_idu |= m; + dev->active_id[0] |= m; tmport = wkport + 0x10; outb(0x30, tmport); @@ -1182,7 +1441,7 @@ tmport += 0x07; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(inqd[6], tmport++); outb(inqd[7], tmport++); @@ -1196,7 +1455,7 @@ } while (inb(tmport) != 0x8e); tmport = wkport + 0x1b; - if (dev->chip_veru == 4) { + if (dev->chip_ver == 4) { outb(0x00, tmport); } tmport = wkport + 0x18; @@ -1236,16 +1495,16 @@ inq_ok: mbuf[36] = 0; printk(KERN_INFO " ID: %2d %s\n", i, &mbuf[8]); - dev->id[i].devtypeu = mbuf[0]; + dev->id[0][i].devtype = mbuf[0]; rmb = mbuf[1]; n = mbuf[7]; - if (dev->chip_veru != 4) { + if (dev->chip_ver != 4) { goto not_wide; } if ((mbuf[7] & 0x60) == 0) { goto not_wide; } - if ((dev->global_map & 0x20) == 0) { + if ((dev->global_map[0] & 0x20) == 0) { goto not_wide; } tmport = wkport + 0x1b; @@ -1260,7 +1519,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -1386,16 +1645,16 @@ } m = 1; m = m << i; - dev->wide_idu |= m; + dev->wide_id[0] |= m; not_wide: - if ((dev->id[i].devtypeu == 0x00) || (dev->id[i].devtypeu == 0x07) || ((dev->id[i].devtypeu == 0x05) && ((n & 0x10) != 0))) { + if ((dev->id[0][i].devtype == 0x00) || (dev->id[0][i].devtype == 0x07) || ((dev->id[0][i].devtype == 0x05) && ((n & 0x10) != 0))) { goto set_sync; } continue; set_sync: tmport = wkport + 0x1b; j = 0; - if ((m & dev->wide_idu) != 0) { + if ((m & dev->wide_id[0]) != 0) { j |= 0x01; } outb(j, tmport); @@ -1409,7 +1668,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -1434,10 +1693,10 @@ while ((inb(tmport) & 0x80) == 0) { if ((inb(tmport) & 0x01) != 0) { tmport -= 0x06; - if ((m & dev->wide_idu) != 0) { + if ((m & dev->wide_id[0]) != 0) { outb(synw[j++], tmport); } else { - if ((m & dev->ultra_map) != 0) { + if ((m & dev->ultra_map[0]) != 0) { outb(synu[j++], tmport); } else { outb(synn[j++], tmport); @@ -1551,7 +1810,7 @@ if (mbuf[4] > 0x0c) { mbuf[4] = 0x0c; } - dev->id[i].devspu = mbuf[4]; + dev->id[0][i].devsp = mbuf[4]; if ((mbuf[3] < 0x0d) && (rmb == 0)) { j = 0xa0; goto set_syn_ok; @@ -1570,13 +1829,13 @@ } j = 0x60; set_syn_ok: - dev->id[i].devspu = (dev->id[i].devspu & 0x0f) | j; + dev->id[0][i].devsp = (dev->id[0][i].devsp & 0x0f) | j; } tmport = wkport + 0x3a; outb((unsigned char) (inb(tmport) & 0xef), tmport); } -static void is880(struct Scsi_Host *host, unsigned int wkport) +static void is880(struct atp_unit *dev, unsigned int wkport) { unsigned int tmport; unsigned char i, j, k, rmb, n, lvdmode; @@ -1590,18 +1849,17 @@ unsigned char synuw[6] = { 0x80, 1, 3, 1, 0x0a, 0x0e }; static unsigned char wide[6] = { 0x80, 1, 2, 3, 1, 0 }; static unsigned char u3[9] = { 0x80, 1, 6, 4, 0x09, 00, 0x0e, 0x01, 0x02 }; - struct atp_unit *dev = (struct atp_unit *)&host->hostdata; lvdmode = inb(wkport + 0x3f) & 0x40; for (i = 0; i < 16; i++) { m = 1; m = m << i; - if ((m & dev->active_idu) != 0) { + if ((m & dev->active_id[0]) != 0) { continue; } - if (i == dev->host_idu) { - printk(KERN_INFO " ID: %2d Host Adapter\n", dev->host_idu); + if (i == dev->host_id[0]) { + printk(KERN_INFO " ID: %2d Host Adapter\n", dev->host_id[0]); continue; } tmport = wkport + 0x5b; @@ -1618,7 +1876,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -1637,7 +1895,7 @@ continue; } while (inb(tmport) != 0x8e); - dev->active_idu |= m; + dev->active_id[0] |= m; tmport = wkport + 0x50; outb(0x30, tmport); @@ -1667,7 +1925,7 @@ tmport += 0x07; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(inqd[6], tmport++); outb(inqd[7], tmport++); @@ -1719,19 +1977,19 @@ inq_ok: mbuf[36] = 0; printk(KERN_INFO " ID: %2d %s\n", i, &mbuf[8]); - dev->id[i].devtypeu = mbuf[0]; + dev->id[0][i].devtype = mbuf[0]; rmb = mbuf[1]; n = mbuf[7]; if ((mbuf[7] & 0x60) == 0) { goto not_wide; } - if ((i < 8) && ((dev->global_map & 0x20) == 0)) { + if ((i < 8) && ((dev->global_map[0] & 0x20) == 0)) { goto not_wide; } if (lvdmode == 0) { goto chg_wide; } - if (dev->sp[i] != 0x04) // force u2 + if (dev->sp[0][i] != 0x04) // force u2 { goto chg_wide; } @@ -1748,7 +2006,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -1872,8 +2130,8 @@ if (mbuf[3] == 0x09) { m = 1; m = m << i; - dev->wide_idu |= m; - dev->id[i].devspu = 0xce; + dev->wide_id[0] |= m; + dev->id[0][i].devsp = 0xce; continue; } chg_wide: @@ -1889,7 +2147,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -2015,29 +2273,29 @@ } m = 1; m = m << i; - dev->wide_idu |= m; + dev->wide_id[0] |= m; not_wide: - if ((dev->id[i].devtypeu == 0x00) || (dev->id[i].devtypeu == 0x07) || ((dev->id[i].devtypeu == 0x05) && ((n & 0x10) != 0))) { + if ((dev->id[0][i].devtype == 0x00) || (dev->id[0][i].devtype == 0x07) || ((dev->id[0][i].devtype == 0x05) && ((n & 0x10) != 0))) { m = 1; m = m << i; - if ((dev->async & m) != 0) { + if ((dev->async[0] & m) != 0) { goto set_sync; } } continue; set_sync: - if (dev->sp[i] == 0x02) { + if (dev->sp[0][i] == 0x02) { synu[4] = 0x0c; synuw[4] = 0x0c; } else { - if (dev->sp[i] >= 0x03) { + if (dev->sp[0][i] >= 0x03) { synu[4] = 0x0a; synuw[4] = 0x0a; } } tmport = wkport + 0x5b; j = 0; - if ((m & dev->wide_idu) != 0) { + if ((m & dev->wide_id[0]) != 0) { j |= 0x01; } outb(j, tmport); @@ -2051,7 +2309,7 @@ tmport += 0x06; outb(0, tmport); tmport += 0x02; - outb(dev->id[i].devspu, tmport++); + outb(dev->id[0][i].devsp, tmport++); outb(0, tmport++); outb(satn[6], tmport++); outb(satn[7], tmport++); @@ -2076,14 +2334,14 @@ while ((inb(tmport) & 0x80) == 0) { if ((inb(tmport) & 0x01) != 0) { tmport -= 0x06; - if ((m & dev->wide_idu) != 0) { - if ((m & dev->ultra_map) != 0) { + if ((m & dev->wide_id[0]) != 0) { + if ((m & dev->ultra_map[0]) != 0) { outb(synuw[j++], tmport); } else { outb(synw[j++], tmport); } } else { - if ((m & dev->ultra_map) != 0) { + if ((m & dev->ultra_map[0]) != 0) { outb(synu[j++], tmport); } else { outb(synn[j++], tmport); @@ -2197,7 +2455,7 @@ if (mbuf[4] > 0x0e) { mbuf[4] = 0x0e; } - dev->id[i].devspu = mbuf[4]; + dev->id[0][i].devsp = mbuf[4]; if (mbuf[3] < 0x0c) { j = 0xb0; goto set_syn_ok; @@ -2220,249 +2478,179 @@ } j = 0x60; set_syn_ok: - dev->id[i].devspu = (dev->id[i].devspu & 0x0f) | j; + dev->id[0][i].devsp = (dev->id[0][i].devsp & 0x0f) | j; } } static void atp870u_free_tables(struct Scsi_Host *host) { struct atp_unit *atp_dev = (struct atp_unit *)&host->hostdata; - int k; - - for (k = 0; k < 16; k++) { - if (!atp_dev->id[k].prd_tableu) - continue; - pci_free_consistent(atp_dev->pdev, 1024, atp_dev->id[k].prd_tableu, - atp_dev->id[k].prd_phys); - atp_dev->id[k].prd_tableu = NULL; + int j, k; + for (j=0; j < 2; j++) { + for (k = 0; k < 16; k++) { + if (!atp_dev->id[j][k].prd_table) + continue; + pci_free_consistent(atp_dev->pdev, 1024, atp_dev->id[j][k].prd_table, atp_dev->id[j][k].prdaddr); + atp_dev->id[j][k].prd_table = NULL; + } } } static int atp870u_init_tables(struct Scsi_Host *host) { - struct atp_unit *dev = (struct atp_unit *)&host->hostdata; - int k, i; - - for (i = k = 0; k < 16; k++) { - dev->id[k].prd_tableu = pci_alloc_consistent(dev->pdev, 1024, &dev->id[k].prd_phys); - if (!dev->id[k].prd_tableu) { - atp870u_free_tables(host); - return -ENOMEM; - } - dev->id[k].devspu = 0x20; - dev->id[k].devtypeu = 0; - dev->id[k].curr_req = NULL; - } - dev->active_idu = 0; - dev->wide_idu = 0; - dev->host_idu = 0x07; - dev->quhdu = 0; - dev->quendu = 0; - dev->chip_veru = 0; - dev->last_cmd = 0xff; - dev->in_snd = 0; - dev->in_int = 0; - for (k = 0; k < qcnt; k++) { - dev->querequ[k] = NULL; - } - for (k = 0; k < 16; k++) { - dev->id[k].curr_req = NULL; - dev->sp[k] = 0x04; + struct atp_unit *atp_dev = (struct atp_unit *)&host->hostdata; + int c,k; + for(c=0;c < 2;c++) { + for(k=0;k<16;k++) { + atp_dev->id[c][k].prd_table = pci_alloc_consistent(atp_dev->pdev, 1024, &(atp_dev->id[c][k].prdaddr)); + if (!atp_dev->id[c][k].prd_table) { + printk("atp870u_init_tables fail\n"); + atp870u_free_tables(host); + return -ENOMEM; + } + atp_dev->id[c][k].devsp=0x20; + atp_dev->id[c][k].devtype = 0x7f; + atp_dev->id[c][k].curr_req = NULL; + } + + atp_dev->active_id[c] = 0; + atp_dev->wide_id[c] = 0; + atp_dev->host_id[c] = 0x07; + atp_dev->quhd[c] = 0; + atp_dev->quend[c] = 0; + atp_dev->last_cmd[c] = 0xff; + atp_dev->in_snd[c] = 0; + atp_dev->in_int[c] = 0; + + for (k = 0; k < qcnt; k++) { + atp_dev->quereq[c][k] = NULL; + } + for (k = 0; k < 16; k++) { + atp_dev->id[c][k].curr_req = NULL; + atp_dev->sp[c][k] = 0x04; + } } return 0; } /* return non-zero on detection */ -static int atp870u_probe(struct pci_dev *dev, const struct pci_device_id *ent) +static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { - unsigned char k, m; + unsigned char k, m, c; unsigned long flags; - unsigned int base_io, error, tmport; + unsigned int base_io, tmport, error,n; unsigned char host_id; - unsigned short n; - struct Scsi_Host *shpnt; + struct Scsi_Host *shpnt = NULL; struct atp_unit atp_dev, *p; - static int count; - - if (pci_enable_device(dev)) + unsigned char setupdata[2][16]; + int count = 0; + + if (pci_enable_device(pdev)) return -EIO; - if (pci_set_dma_mask(dev, 0xFFFFFFFFUL)) { - printk(KERN_ERR "atp870u: 32bit DMA mask required but not available.\n"); - return -EIO; - } - + if (!pci_set_dma_mask(pdev, 0xFFFFFFUL)) { + printk(KERN_INFO "atp870u: use 32bit DMA mask.\n"); + } else { + printk(KERN_ERR "atp870u: DMA mask required but not available.\n"); + return -EIO; + } + memset(&atp_dev, 0, sizeof atp_dev); - /* * It's probably easier to weed out some revisions like * this than via the PCI device table */ if (ent->device == PCI_DEVICE_ID_ARTOP_AEC7610) { - error = pci_read_config_byte(dev, PCI_CLASS_REVISION, &atp_dev.chip_veru); - if (atp_dev.chip_veru < 2) + error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atp_dev.chip_ver); + if (atp_dev.chip_ver < 2) return -EIO; } switch (ent->device) { - case 0x8081: case PCI_DEVICE_ID_ARTOP_AEC7612UW: case PCI_DEVICE_ID_ARTOP_AEC7612SUW: - atp_dev.chip_veru = 0x04; + case ATP880_DEVID1: + case ATP880_DEVID2: + case ATP885_DEVID: + atp_dev.chip_ver = 0x04; default: break; } + base_io = pci_resource_start(pdev, 0); + base_io &= 0xfffffff8; + + if ((ent->device == ATP880_DEVID1)||(ent->device == ATP880_DEVID2)) { + error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atp_dev.chip_ver); + pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x80);//JCC082803 - base_io = pci_resource_start(dev, 0); - - if (ent->device != 0x8081) { - error = pci_read_config_byte(dev, 0x49, &host_id); - base_io &= 0xfffffff8; - - printk(KERN_INFO " ACARD AEC-671X PCI Ultra/W SCSI-3 Host Adapter: %d " - "IO:%x, IRQ:%d.\n", count, base_io, dev->irq); - - atp_dev.unit = count; - atp_dev.ioport = base_io; - atp_dev.pciport = base_io + 0x20; - atp_dev.deviceid = ent->device; - host_id &= 0x07; - atp_dev.host_idu = host_id; - tmport = base_io + 0x22; - atp_dev.scam_on = inb(tmport); - tmport += 0x0b; - atp_dev.global_map = inb(tmport++); - atp_dev.ultra_map = inw(tmport); - - if (atp_dev.ultra_map == 0) { - atp_dev.scam_on = 0x00; - atp_dev.global_map = 0x20; - atp_dev.ultra_map = 0xffff; - } - - shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); - if (!shpnt) - return -ENOMEM; - - p = (struct atp_unit *)&shpnt->hostdata; - - atp_dev.host = shpnt; - atp_dev.pdev = dev; - pci_set_drvdata(dev, p); - memcpy(p, &atp_dev, sizeof atp_dev); - if (atp870u_init_tables(shpnt) < 0) - goto unregister; - - if (request_irq(dev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", shpnt)) { - printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", dev->irq); - goto free_tables; - } - - spin_lock_irqsave(shpnt->host_lock, flags); - if (atp_dev.chip_veru > 0x07) { /* check if atp876 chip then enable terminator */ - tmport = base_io + 0x3e; - outb(0x00, tmport); - } - - tmport = base_io + 0x3a; - k = (inb(tmport) & 0xf3) | 0x10; - outb(k, tmport); - outb((k & 0xdf), tmport); - mdelay(32); - outb(k, tmport); - mdelay(32); - tmport = base_io; - outb((host_id | 0x08), tmport); - tmport += 0x18; - outb(0, tmport); - tmport += 0x07; - while ((inb(tmport) & 0x80) == 0) - mdelay(1); - - tmport -= 0x08; - inb(tmport); - tmport = base_io + 1; - outb(8, tmport++); - outb(0x7f, tmport); - tmport = base_io + 0x11; - outb(0x20, tmport); - - tscam(shpnt); - is870(shpnt, base_io); - tmport = base_io + 0x3a; - outb((inb(tmport) & 0xef), tmport); - tmport++; - outb((inb(tmport) | 0x20), tmport); - } else { - base_io &= 0xfffffff8; host_id = inb(base_io + 0x39); host_id >>= 0x04; printk(KERN_INFO " ACARD AEC-67160 PCI Ultra3 LVD Host Adapter: %d" - " IO:%x, IRQ:%d.\n", count, base_io, dev->irq); - atp_dev.ioport = base_io + 0x40; - atp_dev.pciport = base_io + 0x28; - atp_dev.deviceid = ent->device; - atp_dev.host_idu = host_id; + " IO:%x, IRQ:%d.\n", count, base_io, pdev->irq); + atp_dev.ioport[0] = base_io + 0x40; + atp_dev.pciport[0] = base_io + 0x28; + atp_dev.dev_id = ent->device; + atp_dev.host_id[0] = host_id; tmport = base_io + 0x22; atp_dev.scam_on = inb(tmport); tmport += 0x13; - atp_dev.global_map = inb(tmport); + atp_dev.global_map[0] = inb(tmport); tmport += 0x07; - atp_dev.ultra_map = inw(tmport); + atp_dev.ultra_map[0] = inw(tmport); n = 0x3f09; -next_fblk: +next_fblk_880: if (n >= 0x4000) - goto flash_ok; + goto flash_ok_880; m = 0; outw(n, base_io + 0x34); n += 0x0002; if (inb(base_io + 0x30) == 0xff) - goto flash_ok; + goto flash_ok_880; - atp_dev.sp[m++] = inb(base_io + 0x30); - atp_dev.sp[m++] = inb(base_io + 0x31); - atp_dev.sp[m++] = inb(base_io + 0x32); - atp_dev.sp[m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); outw(n, base_io + 0x34); n += 0x0002; - atp_dev.sp[m++] = inb(base_io + 0x30); - atp_dev.sp[m++] = inb(base_io + 0x31); - atp_dev.sp[m++] = inb(base_io + 0x32); - atp_dev.sp[m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); outw(n, base_io + 0x34); n += 0x0002; - atp_dev.sp[m++] = inb(base_io + 0x30); - atp_dev.sp[m++] = inb(base_io + 0x31); - atp_dev.sp[m++] = inb(base_io + 0x32); - atp_dev.sp[m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); outw(n, base_io + 0x34); n += 0x0002; - atp_dev.sp[m++] = inb(base_io + 0x30); - atp_dev.sp[m++] = inb(base_io + 0x31); - atp_dev.sp[m++] = inb(base_io + 0x32); - atp_dev.sp[m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); n += 0x0018; - goto next_fblk; -flash_ok: + goto next_fblk_880; +flash_ok_880: outw(0, base_io + 0x34); - atp_dev.ultra_map = 0; - atp_dev.async = 0; + atp_dev.ultra_map[0] = 0; + atp_dev.async[0] = 0; for (k = 0; k < 16; k++) { n = 1; n = n << k; - if (atp_dev.sp[k] > 1) { - atp_dev.ultra_map |= n; + if (atp_dev.sp[0][k] > 1) { + atp_dev.ultra_map[0] |= n; } else { - if (atp_dev.sp[k] == 0) - atp_dev.async |= n; + if (atp_dev.sp[0][k] == 0) + atp_dev.async[0] |= n; } } - atp_dev.async = ~(atp_dev.async); - outb(atp_dev.global_map, base_io + 0x35); + atp_dev.async[0] = ~(atp_dev.async[0]); + outb(atp_dev.global_map[0], base_io + 0x35); shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); if (!shpnt) @@ -2471,16 +2659,16 @@ p = (struct atp_unit *)&shpnt->hostdata; atp_dev.host = shpnt; - atp_dev.pdev = dev; - pci_set_drvdata(dev, p); + atp_dev.pdev = pdev; + pci_set_drvdata(pdev, p); memcpy(p, &atp_dev, sizeof atp_dev); if (atp870u_init_tables(shpnt) < 0) { printk(KERN_ERR "Unable to allocate tables for Acard controller\n"); goto unregister; } - if (request_irq(dev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", shpnt)) { - printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", dev->irq); + if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp880i", shpnt)) { + printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); goto free_tables; } @@ -2513,96 +2701,354 @@ outb(0x20, tmport); tscam(shpnt); - is880(shpnt, base_io); + is880(p, base_io); tmport = base_io + 0x38; outb(0xb0, tmport); - } - - if (p->chip_veru == 4) shpnt->max_id = 16; - - shpnt->this_id = host_id; - shpnt->unique_id = base_io; - shpnt->io_port = base_io; - if (ent->device == 0x8081) { + shpnt->this_id = host_id; + shpnt->unique_id = base_io; + shpnt->io_port = base_io; shpnt->n_io_port = 0x60; /* Number of bytes of I/O space used */ + shpnt->irq = pdev->irq; + } else if (ent->device == ATP885_DEVID) { + printk(KERN_INFO " ACARD AEC-67162 PCI Ultra3 LVD Host Adapter: IO:%x, IRQ:%d.\n" + , base_io, pdev->irq); + + atp_dev.pdev = pdev; + atp_dev.dev_id = ent->device; + atp_dev.baseport = base_io; + atp_dev.ioport[0] = base_io + 0x80; + atp_dev.ioport[1] = base_io + 0xc0; + atp_dev.pciport[0] = base_io + 0x40; + atp_dev.pciport[1] = base_io + 0x50; + + shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); + if (!shpnt) + return -ENOMEM; + + p = (struct atp_unit *)&shpnt->hostdata; + + atp_dev.host = shpnt; + atp_dev.pdev = pdev; + pci_set_drvdata(pdev, p); + memcpy(p, &atp_dev, sizeof(struct atp_unit)); + if (atp870u_init_tables(shpnt) < 0) + goto unregister; + +#ifdef ED_DBGP + printk("request_irq() shpnt %p hostdata %p\n", shpnt, p); +#endif + if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", shpnt)) { + printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n"); + goto free_tables; + } + + spin_lock_irqsave(shpnt->host_lock, flags); + + c=inb(base_io + 0x29); + outb((c | 0x04),base_io + 0x29); + + n=0x1f80; +next_fblk_885: + if (n >= 0x2000) { + goto flash_ok_885; + } + outw(n,base_io + 0x3c); + if (inl(base_io + 0x38) == 0xffffffff) { + goto flash_ok_885; + } + for (m=0; m < 2; m++) { + p->global_map[m]= 0; + for (k=0; k < 4; k++) { + outw(n++,base_io + 0x3c); + ((unsigned long *)&setupdata[m][0])[k]=inl(base_io + 0x38); + } + for (k=0; k < 4; k++) { + outw(n++,base_io + 0x3c); + ((unsigned long *)&p->sp[m][0])[k]=inl(base_io + 0x38); + } + n += 8; + } + goto next_fblk_885; +flash_ok_885: +#ifdef ED_DBGP + printk( "Flash Read OK\n"); +#endif + c=inb(base_io + 0x29); + outb((c & 0xfb),base_io + 0x29); + for (c=0;c < 2;c++) { + p->ultra_map[c]=0; + p->async[c] = 0; + for (k=0; k < 16; k++) { + n=1; + n = n << k; + if (p->sp[c][k] > 1) { + p->ultra_map[c] |= n; + } else { + if (p->sp[c][k] == 0) { + p->async[c] |= n; + } + } + } + p->async[c] = ~(p->async[c]); + + if (p->global_map[c] == 0) { + k=setupdata[c][1]; + if ((k & 0x40) != 0) + p->global_map[c] |= 0x20; + k &= 0x07; + p->global_map[c] |= k; + if ((setupdata[c][2] & 0x04) != 0) + p->global_map[c] |= 0x08; + p->host_id[c] = setupdata[c][0] & 0x07; + } + } + + k = inb(base_io + 0x28) & 0x8f; + k |= 0x10; + outb(k, base_io + 0x28); + outb(0x80, base_io + 0x41); + outb(0x80, base_io + 0x51); + mdelay(100); + outb(0, base_io + 0x41); + outb(0, base_io + 0x51); + mdelay(1000); + inb(base_io + 0x9b); + inb(base_io + 0x97); + inb(base_io + 0xdb); + inb(base_io + 0xd7); + tmport = base_io + 0x80; + k=p->host_id[0]; + if (k > 7) + k = (k & 0x07) | 0x40; + k |= 0x08; + outb(k, tmport); + tmport += 0x18; + outb(0, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0); + tmport -= 0x08; + inb(tmport); + tmport = base_io + 0x81; + outb(8, tmport++); + outb(0x7f, tmport); + tmport = base_io + 0x91; + outb(0x20, tmport); + + tmport = base_io + 0xc0; + k=p->host_id[1]; + if (k > 7) + k = (k & 0x07) | 0x40; + k |= 0x08; + outb(k, tmport); + tmport += 0x18; + outb(0, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0); + tmport -= 0x08; + inb(tmport); + tmport = base_io + 0xc1; + outb(8, tmport++); + outb(0x7f, tmport); + tmport = base_io + 0xd1; + outb(0x20, tmport); + + tscam_885(); + printk(KERN_INFO " Scanning Channel A SCSI Device ...\n"); + is885(p, base_io + 0x80, 0); + printk(KERN_INFO " Scanning Channel B SCSI Device ...\n"); + is885(p, base_io + 0xc0, 1); + + k = inb(base_io + 0x28) & 0xcf; + k |= 0xc0; + outb(k, base_io + 0x28); + k = inb(base_io + 0x1f) | 0x80; + outb(k, base_io + 0x1f); + k = inb(base_io + 0x29) | 0x01; + outb(k, base_io + 0x29); +#ifdef ED_DBGP + //printk("atp885: atp_host[0] 0x%p\n", atp_host[0]); +#endif + shpnt->max_id = 16; + shpnt->max_lun = (p->global_map[0] & 0x07) + 1; + shpnt->max_channel = 1; + shpnt->this_id = p->host_id[0]; + shpnt->unique_id = base_io; + shpnt->io_port = base_io; + shpnt->n_io_port = 0xff; /* Number of bytes of I/O space used */ + shpnt->irq = pdev->irq; + } else { + error = pci_read_config_byte(pdev, 0x49, &host_id); + + printk(KERN_INFO " ACARD AEC-671X PCI Ultra/W SCSI-2/3 Host Adapter: %d " + "IO:%x, IRQ:%d.\n", count, base_io, pdev->irq); + + atp_dev.ioport[0] = base_io; + atp_dev.pciport[0] = base_io + 0x20; + atp_dev.dev_id = ent->device; + host_id &= 0x07; + atp_dev.host_id[0] = host_id; + tmport = base_io + 0x22; + atp_dev.scam_on = inb(tmport); + tmport += 0x0b; + atp_dev.global_map[0] = inb(tmport++); + atp_dev.ultra_map[0] = inw(tmport); + + if (atp_dev.ultra_map[0] == 0) { + atp_dev.scam_on = 0x00; + atp_dev.global_map[0] = 0x20; + atp_dev.ultra_map[0] = 0xffff; + } + + shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); + if (!shpnt) + return -ENOMEM; + + p = (struct atp_unit *)&shpnt->hostdata; + + atp_dev.host = shpnt; + atp_dev.pdev = pdev; + pci_set_drvdata(pdev, p); + memcpy(p, &atp_dev, sizeof atp_dev); + if (atp870u_init_tables(shpnt) < 0) + goto unregister; + + if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870i", shpnt)) { + printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); + goto free_tables; + } + + spin_lock_irqsave(shpnt->host_lock, flags); + if (atp_dev.chip_ver > 0x07) { /* check if atp876 chip then enable terminator */ + tmport = base_io + 0x3e; + outb(0x00, tmport); + } + + tmport = base_io + 0x3a; + k = (inb(tmport) & 0xf3) | 0x10; + outb(k, tmport); + outb((k & 0xdf), tmport); + mdelay(32); + outb(k, tmport); + mdelay(32); + tmport = base_io; + outb((host_id | 0x08), tmport); + tmport += 0x18; + outb(0, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0) + mdelay(1); + + tmport -= 0x08; + inb(tmport); + tmport = base_io + 1; + outb(8, tmport++); + outb(0x7f, tmport); + tmport = base_io + 0x11; + outb(0x20, tmport); + + tscam(shpnt); + is870(p, base_io); + tmport = base_io + 0x3a; + outb((inb(tmport) & 0xef), tmport); + tmport++; + outb((inb(tmport) | 0x20), tmport); + if (atp_dev.chip_ver == 4) + shpnt->max_id = 16; + else + shpnt->max_id = 7; + shpnt->this_id = host_id; + shpnt->unique_id = base_io; + shpnt->io_port = base_io; shpnt->n_io_port = 0x40; /* Number of bytes of I/O space used */ - } - shpnt->irq = dev->irq; - spin_unlock_irqrestore(shpnt->host_lock, flags); - if (ent->device == 0x8081) { - if (!request_region(base_io, 0x60, "atp870u")) - goto request_io_fail; - } else { - if (!request_region(base_io, 0x40, "atp870u")) - goto request_io_fail; - } + shpnt->irq = pdev->irq; + } + spin_unlock_irqrestore(shpnt->host_lock, flags); + if(ent->device==ATP885_DEVID) { + if(!request_region(base_io, 0xff, "atp870u")) /* Register the IO ports that we use */ + goto request_io_fail; + } else if((ent->device==ATP880_DEVID1)||(ent->device==ATP880_DEVID2)) { + if(!request_region(base_io, 0x60, "atp870u")) /* Register the IO ports that we use */ + goto request_io_fail; + } else { + if(!request_region(base_io, 0x40, "atp870u")) /* Register the IO ports that we use */ + goto request_io_fail; + } + count++; + if (scsi_add_host(shpnt, &pdev->dev)) + goto scsi_add_fail; + scsi_scan_host(shpnt); +#ifdef ED_DBGP + printk("atp870u_prob : exit\n"); +#endif + return 0; - count++; - if (scsi_add_host(shpnt, &dev->dev)) - goto scsi_add_fail; - scsi_scan_host(shpnt); - return 0; - scsi_add_fail: - if (ent->device == 0x8081) + printk("atp870u_prob:scsi_add_fail\n"); + if(ent->device==ATP885_DEVID) { + release_region(base_io, 0xff); + } else if((ent->device==ATP880_DEVID1)||(ent->device==ATP880_DEVID2)) { release_region(base_io, 0x60); - else + } else { release_region(base_io, 0x40); + } request_io_fail: - free_irq(dev->irq, shpnt); + printk("atp870u_prob:request_io_fail\n"); + free_irq(pdev->irq, shpnt); free_tables: + printk("atp870u_prob:free_table\n"); atp870u_free_tables(shpnt); unregister: + printk("atp870u_prob:unregister\n"); scsi_host_put(shpnt); - return -1; + return -1; } /* The abort command does not leave the device in a clean state where it is available to be used again. Until this gets worked out, we will leave it commented out. */ -static int atp870u_abort(struct scsi_cmnd * SCpnt) +int atp870u_abort(struct scsi_cmnd * SCpnt) { - unsigned char j, k; + unsigned char j, k, c; struct scsi_cmnd *workrequ; unsigned int tmport; - struct atp_unit *dev = (struct atp_unit *)&SCpnt->device->host->hostdata; + struct atp_unit *dev; + struct Scsi_Host *host; + host = SCpnt->device->host; - printk(KERN_DEBUG "working=%x last_cmd=%x ", dev->working, dev->last_cmd); - printk(" quhdu=%x quendu=%x ", dev->quhdu, dev->quendu); - tmport = dev->ioport; - for (j = 0; j < 0x17; j++) { + dev = (struct atp_unit *)&host->hostdata; + c=SCpnt->device->channel; + printk(" atp870u: abort Channel = %x \n", c); + printk("working=%x last_cmd=%x ", dev->working[c], dev->last_cmd[c]); + printk(" quhdu=%x quendu=%x ", dev->quhd[c], dev->quend[c]); + tmport = dev->ioport[c]; + for (j = 0; j < 0x18; j++) { printk(" r%2x=%2x", j, inb(tmport++)); } - tmport += 0x05; + tmport += 0x04; printk(" r1c=%2x", inb(tmport)); tmport += 0x03; - printk(" r1f=%2x in_snd=%2x ", inb(tmport), dev->in_snd); - tmport = dev->pciport; - printk(" r20=%2x", inb(tmport)); + printk(" r1f=%2x in_snd=%2x ", inb(tmport), dev->in_snd[c]); + tmport= dev->pciport[c]; + printk(" d00=%2x", inb(tmport)); tmport += 0x02; - printk(" r22=%2x", inb(tmport)); - tmport = dev->ioport + 0x3a; - printk(" r3a=%2x \n", inb(tmport)); - tmport = dev->ioport + 0x3b; - printk(" r3b=%2x \n", inb(tmport)); - for (j = 0; j < 16; j++) { - if (dev->id[j].curr_req != NULL) { - workrequ = dev->id[j].curr_req; - printk("\n que cdb= "); - for (k = 0; k < workrequ->cmd_len; k++) { - printk(" %2x ", workrequ->cmnd[k]); - } - printk(" last_lenu= %lx ", dev->id[j].last_lenu); + printk(" d02=%2x", inb(tmport)); + for(j=0;j<16;j++) { + if (dev->id[c][j].curr_req != NULL) { + workrequ = dev->id[c][j].curr_req; + printk("\n que cdb= "); + for (k=0; k < workrequ->cmd_len; k++) { + printk(" %2x ",workrequ->cmnd[k]); } + printk(" last_lenu= %x ",(unsigned int)dev->id[c][j].last_len); + } } - /* Sort of - the thing handles itself */ return SUCCESS; } -static const char *atp870u_info(struct Scsi_Host *notused) +const char *atp870u_info(struct Scsi_Host *notused) { static char buffer[128]; @@ -2611,17 +3057,21 @@ return buffer; } +int atp870u_set_info(char *buffer, int length, struct Scsi_Host *HBAptr) +{ + return -ENOSYS; /* Currently this is a no-op */ +} + #define BLS buffer + len + size -static int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, - char **start, off_t offset, int length, int inout) +int atp870u_proc_info(struct Scsi_Host *HBAptr, char *buffer, char **start, off_t offset, int length, int inout) { static u8 buff[512]; int size = 0; int len = 0; off_t begin = 0; off_t pos = 0; - - if (inout) + + if (inout) return -ENOSYS; if (offset == 0) { memset(buff, 0, sizeof(buff)); @@ -2637,7 +3087,7 @@ size += sprintf(BLS, " IRQ: %d\n", HBAptr->irq); len += size; pos = begin + len; - + *start = buffer + (offset - begin); /* Start of wanted data */ len -= (offset - begin); /* Start slop */ if (len > length) { @@ -2646,15 +3096,15 @@ return (len); } -static int atp870u_biosparam(struct scsi_device *sdev, - struct block_device *dev, sector_t capacity, int *ip) + +static int atp870u_biosparam(struct scsi_device *disk, struct block_device *dev, + sector_t capacity, int *ip) { int heads, sectors, cylinders; heads = 64; sectors = 32; cylinders = (unsigned long)capacity / (heads * sectors); - if (cylinders > 1024) { heads = 255; sectors = 63; @@ -2667,39 +3117,46 @@ return 0; } -static void atp870u_remove(struct pci_dev *pdev) -{ - struct atp_unit *atp_dev = pci_get_drvdata(pdev); - struct Scsi_Host *pshost = atp_dev->host; - +static void atp870u_remove (struct pci_dev *pdev) +{ + struct atp_unit *devext = pci_get_drvdata(pdev); + struct Scsi_Host *pshost = devext->host; + + scsi_remove_host(pshost); + printk(KERN_INFO "free_irq : %d\n",pshost->irq); free_irq(pshost->irq, pshost); release_region(pshost->io_port, pshost->n_io_port); + printk(KERN_INFO "atp870u_free_tables : %p\n",pshost); atp870u_free_tables(pshost); + printk(KERN_INFO "scsi_host_put : %p\n",pshost); scsi_host_put(pshost); - pci_set_drvdata(pdev, NULL); + printk(KERN_INFO "pci_set_drvdata : %p\n",pdev); + pci_set_drvdata(pdev, NULL); } - MODULE_LICENSE("GPL"); static struct scsi_host_template atp870u_template = { - .module = THIS_MODULE, - .name = "atp870u", - .proc_name = "atp870u", - .proc_info = atp870u_proc_info, - .info = atp870u_info, - .queuecommand = atp870u_queuecommand, - .eh_abort_handler = atp870u_abort, - .bios_param = atp870u_biosparam, - .can_queue = qcnt, - .this_id = 7, - .sg_tablesize = ATP870U_SCATTER, - .cmd_per_lun = ATP870U_CMDLUN, - .use_clustering = ENABLE_CLUSTERING, + .module = THIS_MODULE, + .name = "atp870u" /* name */, + .proc_name = "atp870u", + .proc_info = atp870u_proc_info, + .info = atp870u_info /* info */, + .queuecommand = atp870u_queuecommand /* queuecommand */, + .eh_abort_handler = atp870u_abort /* abort */, + .bios_param = atp870u_biosparam /* biosparm */, + .can_queue = qcnt /* can_queue */, + .this_id = 7 /* SCSI ID */, + .sg_tablesize = ATP870U_SCATTER /*SG_ALL*/ /*SG_NONE*/, + .cmd_per_lun = ATP870U_CMDLUN /* commands per lun */, + .use_clustering = ENABLE_CLUSTERING, + .max_sectors = ATP870U_MAX_SECTORS, }; static struct pci_device_id atp870u_id_table[] = { - { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, 0x8081) }, + { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, ATP885_DEVID) }, + { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, ATP880_DEVID1) }, + { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, ATP880_DEVID2) }, { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_AEC7610) }, { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_AEC7612UW) }, { PCI_DEVICE(PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_AEC7612U) }, @@ -2712,7 +3169,7 @@ MODULE_DEVICE_TABLE(pci, atp870u_id_table); -static struct pci_driver atp870u_driver = { +static struct pci_driver atp870u_driver = { .id_table = atp870u_id_table, .name = "atp870u", .probe = atp870u_probe, @@ -2721,12 +3178,686 @@ static int __init atp870u_init(void) { - return pci_module_init(&atp870u_driver); +#ifdef ED_DBGP + printk("atp870u_init: Entry\n"); +#endif + return pci_register_driver(&atp870u_driver); } static void __exit atp870u_exit(void) { +#ifdef ED_DBGP + printk("atp870u_exit: Entry\n"); +#endif pci_unregister_driver(&atp870u_driver); +} + +void tscam_885(void) +{ + unsigned char i; + + for (i = 0; i < 0x2; i++) { + mdelay(300); + } + return; +} + + + +void is885(struct atp_unit *dev, unsigned int wkport,unsigned char c) +{ + unsigned int tmport; + unsigned char i, j, k, rmb, n, lvdmode; + unsigned short int m; + static unsigned char mbuf[512]; + static unsigned char satn[9] = {0, 0, 0, 0, 0, 0, 0, 6, 6}; + static unsigned char inqd[9] = {0x12, 0, 0, 0, 0x24, 0, 0, 0x24, 6}; + static unsigned char synn[6] = {0x80, 1, 3, 1, 0x19, 0x0e}; + unsigned char synu[6] = {0x80, 1, 3, 1, 0x0a, 0x0e}; + static unsigned char synw[6] = {0x80, 1, 3, 1, 0x19, 0x0e}; + unsigned char synuw[6] = {0x80, 1, 3, 1, 0x0a, 0x0e}; + static unsigned char wide[6] = {0x80, 1, 2, 3, 1, 0}; + static unsigned char u3[9] = { 0x80,1,6,4,0x09,00,0x0e,0x01,0x02 }; + + lvdmode=inb(wkport + 0x1b) >> 7; + + for (i = 0; i < 16; i++) { + m = 1; + m = m << i; + if ((m & dev->active_id[c]) != 0) { + continue; + } + if (i == dev->host_id[c]) { + printk(KERN_INFO " ID: %2d Host Adapter\n", dev->host_id[c]); + continue; + } + tmport = wkport + 0x1b; + outb(0x01, tmport); + tmport = wkport + 0x01; + outb(0x08, tmport++); + outb(0x7f, tmport++); + outb(satn[0], tmport++); + outb(satn[1], tmport++); + outb(satn[2], tmport++); + outb(satn[3], tmport++); + outb(satn[4], tmport++); + outb(satn[5], tmport++); + tmport += 0x06; + outb(0, tmport); + tmport += 0x02; + outb(dev->id[c][i].devsp, tmport++); + + outb(0, tmport++); + outb(satn[6], tmport++); + outb(satn[7], tmport++); + j = i; + if ((j & 0x08) != 0) { + j = (j & 0x07) | 0x40; + } + outb(j, tmport); + tmport += 0x03; + outb(satn[8], tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + continue; + } + while (inb(tmport) != 0x8e); + dev->active_id[c] |= m; + + tmport = wkport + 0x10; + outb(0x30, tmport); + tmport = wkport + 0x14; + outb(0x00, tmport); + +phase_cmd: + tmport = wkport + 0x18; + outb(0x08, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + j = inb(tmport); + if (j != 0x16) { + tmport = wkport + 0x10; + outb(0x41, tmport); + goto phase_cmd; + } +sel_ok: + tmport = wkport + 0x03; + outb(inqd[0], tmport++); + outb(inqd[1], tmport++); + outb(inqd[2], tmport++); + outb(inqd[3], tmport++); + outb(inqd[4], tmport++); + outb(inqd[5], tmport); + tmport += 0x07; + outb(0, tmport); + tmport += 0x02; + outb(dev->id[c][i].devsp, tmport++); + outb(0, tmport++); + outb(inqd[6], tmport++); + outb(inqd[7], tmport++); + tmport += 0x03; + outb(inqd[8], tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + continue; + } + while (inb(tmport) != 0x8e); + tmport = wkport + 0x1b; + outb(0x00, tmport); + tmport = wkport + 0x18; + outb(0x08, tmport); + tmport += 0x07; + j = 0; +rd_inq_data: + k = inb(tmport); + if ((k & 0x01) != 0) { + tmport -= 0x06; + mbuf[j++] = inb(tmport); + tmport += 0x06; + goto rd_inq_data; + } + if ((k & 0x80) == 0) { + goto rd_inq_data; + } + tmport -= 0x08; + j = inb(tmport); + if (j == 0x16) { + goto inq_ok; + } + tmport = wkport + 0x10; + outb(0x46, tmport); + tmport += 0x02; + outb(0, tmport++); + outb(0, tmport++); + outb(0, tmport++); + tmport += 0x03; + outb(0x08, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + if (inb(tmport) != 0x16) { + goto sel_ok; + } +inq_ok: + mbuf[36] = 0; + printk( KERN_INFO" ID: %2d %s\n", i, &mbuf[8]); + dev->id[c][i].devtype = mbuf[0]; + rmb = mbuf[1]; + n = mbuf[7]; + if ((mbuf[7] & 0x60) == 0) { + goto not_wide; + } + if ((i < 8) && ((dev->global_map[c] & 0x20) == 0)) { + goto not_wide; + } + if (lvdmode == 0) { + goto chg_wide; + } + if (dev->sp[c][i] != 0x04) { // force u2 + goto chg_wide; + } + + tmport = wkport + 0x1b; + outb(0x01, tmport); + tmport = wkport + 0x03; + outb(satn[0], tmport++); + outb(satn[1], tmport++); + outb(satn[2], tmport++); + outb(satn[3], tmport++); + outb(satn[4], tmport++); + outb(satn[5], tmport++); + tmport += 0x06; + outb(0, tmport); + tmport += 0x02; + outb(dev->id[c][i].devsp, tmport++); + outb(0, tmport++); + outb(satn[6], tmport++); + outb(satn[7], tmport++); + tmport += 0x03; + outb(satn[8], tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + continue; + } + while (inb(tmport) != 0x8e); +try_u3: + j = 0; + tmport = wkport + 0x14; + outb(0x09, tmport); + tmport += 0x04; + outb(0x20, tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0) { + if ((inb(tmport) & 0x01) != 0) { + tmport -= 0x06; + outb(u3[j++], tmport); + tmport += 0x06; + } + } + tmport -= 0x08; + while ((inb(tmport) & 0x80) == 0x00); + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto u3p_in; + } + if (j == 0x0a) { + goto u3p_cmd; + } + if (j == 0x0e) { + goto try_u3; + } + continue; +u3p_out: + tmport = wkport + 0x18; + outb(0x20, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0) { + if ((inb(tmport) & 0x01) != 0) { + tmport -= 0x06; + outb(0, tmport); + tmport += 0x06; + } + } + tmport -= 0x08; + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto u3p_in; + } + if (j == 0x0a) { + goto u3p_cmd; + } + if (j == 0x0e) { + goto u3p_out; + } + continue; +u3p_in: + tmport = wkport + 0x14; + outb(0x09, tmport); + tmport += 0x04; + outb(0x20, tmport); + tmport += 0x07; + k = 0; +u3p_in1: + j = inb(tmport); + if ((j & 0x01) != 0) { + tmport -= 0x06; + mbuf[k++] = inb(tmport); + tmport += 0x06; + goto u3p_in1; + } + if ((j & 0x80) == 0x00) { + goto u3p_in1; + } + tmport -= 0x08; + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto u3p_in; + } + if (j == 0x0a) { + goto u3p_cmd; + } + if (j == 0x0e) { + goto u3p_out; + } + continue; +u3p_cmd: + tmport = wkport + 0x10; + outb(0x30, tmport); + tmport = wkport + 0x14; + outb(0x00, tmport); + tmport += 0x04; + outb(0x08, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + j = inb(tmport); + if (j != 0x16) { + if (j == 0x4e) { + goto u3p_out; + } + continue; + } + if (mbuf[0] != 0x01) { + goto chg_wide; + } + if (mbuf[1] != 0x06) { + goto chg_wide; + } + if (mbuf[2] != 0x04) { + goto chg_wide; + } + if (mbuf[3] == 0x09) { + m = 1; + m = m << i; + dev->wide_id[c] |= m; + dev->id[c][i].devsp = 0xce; +#ifdef ED_DBGP + printk("dev->id[%2d][%2d].devsp = %2x\n",c,i,dev->id[c][i].devsp); +#endif + continue; + } +chg_wide: + tmport = wkport + 0x1b; + outb(0x01, tmport); + tmport = wkport + 0x03; + outb(satn[0], tmport++); + outb(satn[1], tmport++); + outb(satn[2], tmport++); + outb(satn[3], tmport++); + outb(satn[4], tmport++); + outb(satn[5], tmport++); + tmport += 0x06; + outb(0, tmport); + tmport += 0x02; + outb(dev->id[c][i].devsp, tmport++); + outb(0, tmport++); + outb(satn[6], tmport++); + outb(satn[7], tmport++); + tmport += 0x03; + outb(satn[8], tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + continue; + } + while (inb(tmport) != 0x8e); +try_wide: + j = 0; + tmport = wkport + 0x14; + outb(0x05, tmport); + tmport += 0x04; + outb(0x20, tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0) { + if ((inb(tmport) & 0x01) != 0) { + tmport -= 0x06; + outb(wide[j++], tmport); + tmport += 0x06; + } + } + tmport -= 0x08; + while ((inb(tmport) & 0x80) == 0x00); + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto widep_in; + } + if (j == 0x0a) { + goto widep_cmd; + } + if (j == 0x0e) { + goto try_wide; + } + continue; +widep_out: + tmport = wkport + 0x18; + outb(0x20, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0) { + if ((inb(tmport) & 0x01) != 0) { + tmport -= 0x06; + outb(0, tmport); + tmport += 0x06; + } + } + tmport -= 0x08; + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto widep_in; + } + if (j == 0x0a) { + goto widep_cmd; + } + if (j == 0x0e) { + goto widep_out; + } + continue; +widep_in: + tmport = wkport + 0x14; + outb(0xff, tmport); + tmport += 0x04; + outb(0x20, tmport); + tmport += 0x07; + k = 0; +widep_in1: + j = inb(tmport); + if ((j & 0x01) != 0) { + tmport -= 0x06; + mbuf[k++] = inb(tmport); + tmport += 0x06; + goto widep_in1; + } + if ((j & 0x80) == 0x00) { + goto widep_in1; + } + tmport -= 0x08; + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto widep_in; + } + if (j == 0x0a) { + goto widep_cmd; + } + if (j == 0x0e) { + goto widep_out; + } + continue; +widep_cmd: + tmport = wkport + 0x10; + outb(0x30, tmport); + tmport = wkport + 0x14; + outb(0x00, tmport); + tmport += 0x04; + outb(0x08, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + j = inb(tmport); + if (j != 0x16) { + if (j == 0x4e) { + goto widep_out; + } + continue; + } + if (mbuf[0] != 0x01) { + goto not_wide; + } + if (mbuf[1] != 0x02) { + goto not_wide; + } + if (mbuf[2] != 0x03) { + goto not_wide; + } + if (mbuf[3] != 0x01) { + goto not_wide; + } + m = 1; + m = m << i; + dev->wide_id[c] |= m; +not_wide: + if ((dev->id[c][i].devtype == 0x00) || (dev->id[c][i].devtype == 0x07) || + ((dev->id[c][i].devtype == 0x05) && ((n & 0x10) != 0))) { + m = 1; + m = m << i; + if ((dev->async[c] & m) != 0) { + goto set_sync; + } + } + continue; +set_sync: + if (dev->sp[c][i] == 0x02) { + synu[4]=0x0c; + synuw[4]=0x0c; + } else { + if (dev->sp[c][i] >= 0x03) { + synu[4]=0x0a; + synuw[4]=0x0a; + } + } + tmport = wkport + 0x1b; + j = 0; + if ((m & dev->wide_id[c]) != 0) { + j |= 0x01; + } + outb(j, tmport); + tmport = wkport + 0x03; + outb(satn[0], tmport++); + outb(satn[1], tmport++); + outb(satn[2], tmport++); + outb(satn[3], tmport++); + outb(satn[4], tmport++); + outb(satn[5], tmport++); + tmport += 0x06; + outb(0, tmport); + tmport += 0x02; + outb(dev->id[c][i].devsp, tmport++); + outb(0, tmport++); + outb(satn[6], tmport++); + outb(satn[7], tmport++); + tmport += 0x03; + outb(satn[8], tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + if ((inb(tmport) != 0x11) && (inb(tmport) != 0x8e)) { + continue; + } + while (inb(tmport) != 0x8e); +try_sync: + j = 0; + tmport = wkport + 0x14; + outb(0x06, tmport); + tmport += 0x04; + outb(0x20, tmport); + tmport += 0x07; + + while ((inb(tmport) & 0x80) == 0) { + if ((inb(tmport) & 0x01) != 0) { + tmport -= 0x06; + if ((m & dev->wide_id[c]) != 0) { + if ((m & dev->ultra_map[c]) != 0) { + outb(synuw[j++], tmport); + } else { + outb(synw[j++], tmport); + } + } else { + if ((m & dev->ultra_map[c]) != 0) { + outb(synu[j++], tmport); + } else { + outb(synn[j++], tmport); + } + } + tmport += 0x06; + } + } + tmport -= 0x08; + while ((inb(tmport) & 0x80) == 0x00); + j = inb(tmport) & 0x0f; + if (j == 0x0f) { + goto phase_ins; + } + if (j == 0x0a) { + goto phase_cmds; + } + if (j == 0x0e) { + goto try_sync; + } + continue; +phase_outs: + tmport = wkport + 0x18; + outb(0x20, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00) { + if ((inb(tmport) & 0x01) != 0x00) { + tmport -= 0x06; + outb(0x00, tmport); + tmport += 0x06; + } + } + tmport -= 0x08; + j = inb(tmport); + if (j == 0x85) { + goto tar_dcons; + } + j &= 0x0f; + if (j == 0x0f) { + goto phase_ins; + } + if (j == 0x0a) { + goto phase_cmds; + } + if (j == 0x0e) { + goto phase_outs; + } + continue; +phase_ins: + tmport = wkport + 0x14; + outb(0x06, tmport); + tmport += 0x04; + outb(0x20, tmport); + tmport += 0x07; + k = 0; +phase_ins1: + j = inb(tmport); + if ((j & 0x01) != 0x00) { + tmport -= 0x06; + mbuf[k++] = inb(tmport); + tmport += 0x06; + goto phase_ins1; + } + if ((j & 0x80) == 0x00) { + goto phase_ins1; + } + tmport -= 0x08; + while ((inb(tmport) & 0x80) == 0x00); + j = inb(tmport); + if (j == 0x85) { + goto tar_dcons; + } + j &= 0x0f; + if (j == 0x0f) { + goto phase_ins; + } + if (j == 0x0a) { + goto phase_cmds; + } + if (j == 0x0e) { + goto phase_outs; + } + continue; +phase_cmds: + tmport = wkport + 0x10; + outb(0x30, tmport); +tar_dcons: + tmport = wkport + 0x14; + outb(0x00, tmport); + tmport += 0x04; + outb(0x08, tmport); + tmport += 0x07; + while ((inb(tmport) & 0x80) == 0x00); + tmport -= 0x08; + j = inb(tmport); + if (j != 0x16) { + continue; + } + if (mbuf[0] != 0x01) { + continue; + } + if (mbuf[1] != 0x03) { + continue; + } + if (mbuf[4] == 0x00) { + continue; + } + if (mbuf[3] > 0x64) { + continue; + } + if (mbuf[4] > 0x0e) { + mbuf[4] = 0x0e; + } + dev->id[c][i].devsp = mbuf[4]; + if (mbuf[3] < 0x0c){ + j = 0xb0; + goto set_syn_ok; + } + if ((mbuf[3] < 0x0d) && (rmb == 0)) { + j = 0xa0; + goto set_syn_ok; + } + if (mbuf[3] < 0x1a) { + j = 0x20; + goto set_syn_ok; + } + if (mbuf[3] < 0x33) { + j = 0x40; + goto set_syn_ok; + } + if (mbuf[3] < 0x4c) { + j = 0x50; + goto set_syn_ok; + } + j = 0x60; + set_syn_ok: + dev->id[c][i].devsp = (dev->id[c][i].devsp & 0x0f) | j; +#ifdef ED_DBGP + printk("dev->id[%2d][%2d].devsp = %2x\n",c,i,dev->id[c][i].devsp); +#endif + } + tmport = wkport + 0x16; + outb(0x80, tmport); } module_init(atp870u_init); diff -Nru a/drivers/scsi/atp870u.h b/drivers/scsi/atp870u.h --- a/drivers/scsi/atp870u.h 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/atp870u.h 2005-03-07 14:54:16 -08:00 @@ -2,50 +2,64 @@ #define _ATP870U_H #include +#include /* I/O Port */ -#define MAX_CDB 12 -#define MAX_SENSE 14 -#define qcnt 32 -#define ATP870U_SCATTER 128 -#define ATP870U_CMDLUN 1 - -struct atp_unit { - unsigned long ioport; - unsigned long pciport; - unsigned char last_cmd; - unsigned char in_snd; - unsigned char in_int; - unsigned char quhdu; - unsigned char quendu; +#define MAX_CDB 12 +#define MAX_SENSE 14 +#define qcnt 32 +#define ATP870U_SCATTER 128 +#define ATP870U_CMDLUN 1 + +#define MAX_ADAPTER 8 +#define MAX_SCSI_ID 16 +#define ATP870U_MAX_SECTORS 128 + +#define ATP885_DEVID 0x808A +#define ATP880_DEVID1 0x8080 +#define ATP880_DEVID2 0x8081 + +//#define ED_DBGP + +struct atp_unit +{ + unsigned long baseport; + unsigned long ioport[2]; + unsigned long pciport[2]; + unsigned long irq; + unsigned char last_cmd[2]; + unsigned char in_snd[2]; + unsigned char in_int[2]; + unsigned char quhd[2]; + unsigned char quend[2]; + unsigned char global_map[2]; + unsigned char chip_ver; unsigned char scam_on; - unsigned char global_map; - unsigned char chip_veru; - unsigned char host_idu; - volatile int working; - unsigned short wide_idu; - unsigned short active_idu; - unsigned short ultra_map; - unsigned short async; - unsigned short deviceid; - unsigned char ata_cdbu[16]; - unsigned char sp[16]; - struct scsi_cmnd *querequ[qcnt]; - struct atp_id { - unsigned char dirctu; - unsigned char devspu; - unsigned char devtypeu; - unsigned long prdaddru; - unsigned long tran_lenu; - unsigned long last_lenu; - unsigned char *prd_posu; - unsigned char *prd_tableu; - dma_addr_t prd_phys; + unsigned char host_id[2]; + unsigned int working[2]; + unsigned short wide_id[2]; + unsigned short active_id[2]; + unsigned short ultra_map[2]; + unsigned short async[2]; + unsigned short dev_id; + unsigned char sp[2][16]; + unsigned char r1f[2][16]; + struct scsi_cmnd *quereq[2][qcnt]; + struct atp_id + { + unsigned char dirct; + unsigned char devsp; + unsigned char devtype; + unsigned long tran_len; + unsigned long last_len; + unsigned char *prd_pos; + unsigned char *prd_table; + dma_addr_t prdaddr; struct scsi_cmnd *curr_req; - } id[16]; - struct Scsi_Host *host; - struct pci_dev *pdev; + } id[2][16]; + struct Scsi_Host *host; + struct pci_dev *pdev; unsigned int unit; }; diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c --- a/drivers/scsi/libata-core.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/libata-core.c 2005-03-07 14:54:16 -08:00 @@ -3884,26 +3884,22 @@ ap = host_set->ports[i]; ata_scsi_release(ap->host); - scsi_host_put(ap->host); - } - - pci_release_regions(pdev); - - for (i = 0; i < host_set->n_ports; i++) { - struct ata_ioports *ioaddr; - - ap = host_set->ports[i]; - ioaddr = &ap->ioaddr; if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) { + struct ata_ioports *ioaddr = &ap->ioaddr; + if (ioaddr->cmd_addr == 0x1f0) release_region(0x1f0, 8); else if (ioaddr->cmd_addr == 0x170) release_region(0x170, 8); } + + scsi_host_put(ap->host); } kfree(host_set); + + pci_release_regions(pdev); pci_disable_device(pdev); dev_set_drvdata(dev, NULL); } diff -Nru a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c --- a/drivers/scsi/qla2xxx/qla_os.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/scsi/qla2xxx/qla_os.c 2005-03-07 14:54:18 -08:00 @@ -1847,13 +1847,13 @@ if (pio_len < MIN_IOBASE_LEN) { qla_printk(KERN_WARNING, ha, "Invalid PCI I/O region size (%s)...\n", - ha->pdev->slot_name); + pci_name(ha->pdev)); pio = 0; } } else { qla_printk(KERN_WARNING, ha, "region #0 not a PIO resource (%s)...\n", - ha->pdev->slot_name); + pci_name(ha->pdev)); pio = 0; } @@ -1865,20 +1865,20 @@ if (!(mmio_flags & IORESOURCE_MEM)) { qla_printk(KERN_ERR, ha, "region #0 not an MMIO resource (%s), aborting\n", - ha->pdev->slot_name); + pci_name(ha->pdev)); goto iospace_error_exit; } if (mmio_len < MIN_IOBASE_LEN) { qla_printk(KERN_ERR, ha, "Invalid PCI mem region size (%s), aborting\n", - ha->pdev->slot_name); + pci_name(ha->pdev)); goto iospace_error_exit; } if (pci_request_regions(ha->pdev, ha->brd_info->drv_name)) { qla_printk(KERN_WARNING, ha, - "Failed to reserve PIO/MMIO regions (%s)\n", - ha->pdev->slot_name); + "Failed to reserve PIO/MMIO regions (%s)\n", + pci_name(ha->pdev)); goto iospace_error_exit; } @@ -1888,7 +1888,7 @@ ha->iobase = ioremap(mmio, MIN_IOBASE_LEN); if (!ha->iobase) { qla_printk(KERN_ERR, ha, - "cannot remap MMIO (%s), aborting\n", ha->pdev->slot_name); + "cannot remap MMIO (%s), aborting\n", pci_name(ha->pdev)); goto iospace_error_exit; } diff -Nru a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c --- a/drivers/scsi/sata_nv.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/sata_nv.c 2005-03-07 14:54:16 -08:00 @@ -99,7 +99,8 @@ #define NV_MCP_SATA_CFG_20_SATA_SPACE_EN 0x04 static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); -irqreturn_t nv_interrupt (int irq, void *dev_instance, struct pt_regs *regs); +static irqreturn_t nv_interrupt (int irq, void *dev_instance, + struct pt_regs *regs); static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg); static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); static void nv_host_stop (struct ata_host_set *host_set); @@ -257,7 +258,8 @@ MODULE_DEVICE_TABLE(pci, nv_pci_tbl); MODULE_VERSION(DRV_VERSION); -irqreturn_t nv_interrupt (int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t nv_interrupt (int irq, void *dev_instance, + struct pt_regs *regs) { struct ata_host_set *host_set = dev_instance; struct nv_host *host = host_set->private_data; diff -Nru a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c --- a/drivers/scsi/sata_qstor.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/scsi/sata_qstor.c 2005-03-07 14:54:17 -08:00 @@ -38,7 +38,7 @@ #include #define DRV_NAME "sata_qstor" -#define DRV_VERSION "0.03" +#define DRV_VERSION "0.04" enum { QS_PORTS = 4, @@ -120,6 +120,7 @@ static void qs_bmdma_stop(struct ata_port *ap); static u8 qs_bmdma_status(struct ata_port *ap); static void qs_irq_clear(struct ata_port *ap); +static void qs_eng_timeout(struct ata_port *ap); static Scsi_Host_Template qs_ata_sht = { .module = THIS_MODULE, @@ -152,7 +153,7 @@ .phy_reset = qs_phy_reset, .qc_prep = qs_qc_prep, .qc_issue = qs_qc_issue, - .eng_timeout = ata_eng_timeout, + .eng_timeout = qs_eng_timeout, .irq_handler = qs_intr, .irq_clear = qs_irq_clear, .scr_read = qs_scr_read, @@ -212,7 +213,7 @@ /* nothing */ } -static void qs_enter_reg_mode(struct ata_port *ap) +static inline void qs_enter_reg_mode(struct ata_port *ap) { u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); @@ -220,17 +221,34 @@ readb(chan + QS_CCT_CTR0); /* flush */ } -static void qs_phy_reset(struct ata_port *ap) +static inline void qs_reset_channel_logic(struct ata_port *ap) { u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); - struct qs_port_priv *pp = ap->private_data; - pp->state = qs_state_idle; writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1); + readb(chan + QS_CCT_CTR0); /* flush */ qs_enter_reg_mode(ap); +} + +static void qs_phy_reset(struct ata_port *ap) +{ + struct qs_port_priv *pp = ap->private_data; + + pp->state = qs_state_idle; + qs_reset_channel_logic(ap); sata_phy_reset(ap); } +static void qs_eng_timeout(struct ata_port *ap) +{ + struct qs_port_priv *pp = ap->private_data; + + if (pp->state != qs_state_idle) /* healthy paranoia */ + pp->state = qs_state_mmio; + qs_reset_channel_logic(ap); + ata_eng_timeout(ap); +} + static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg) { if (sc_reg > SCR_CONTROL) @@ -261,11 +279,11 @@ u32 len; addr = sg_dma_address(sg); - *(u64 *)prd = cpu_to_le64(addr); + *(__le64 *)prd = cpu_to_le64(addr); prd += sizeof(u64); len = sg_dma_len(sg); - *(u32 *)prd = cpu_to_le32(len); + *(__le32 *)prd = cpu_to_le32(len); prd += sizeof(u64); VPRINTK("PRD[%u] = (0x%llX, 0x%X)\n", nelem, @@ -298,10 +316,10 @@ /* host control block (HCB) */ buf[ 0] = QS_HCB_HDR; buf[ 1] = hflags; - *(u32 *)(&buf[ 4]) = cpu_to_le32(qc->nsect * ATA_SECT_SIZE); - *(u32 *)(&buf[ 8]) = cpu_to_le32(qc->n_elem); + *(__le32 *)(&buf[ 4]) = cpu_to_le32(qc->nsect * ATA_SECT_SIZE); + *(__le32 *)(&buf[ 8]) = cpu_to_le32(qc->n_elem); addr = ((u64)pp->pkt_dma) + QS_CPB_BYTES; - *(u64 *)(&buf[16]) = cpu_to_le64(addr); + *(__le64 *)(&buf[16]) = cpu_to_le64(addr); /* device control block (DCB) */ buf[24] = QS_DCB_HDR; @@ -566,10 +584,10 @@ int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT); if (have_64bit_bus && - !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { - rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL); + !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { + rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); if (rc) { - rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL); + rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { printk(KERN_ERR DRV_NAME "(%s): 64-bit DMA enable failed\n", @@ -578,14 +596,14 @@ } } } else { - rc = pci_set_dma_mask(pdev, 0xffffffffULL); + rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { printk(KERN_ERR DRV_NAME "(%s): 32-bit DMA enable failed\n", pci_name(pdev)); return rc; } - rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL); + rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { printk(KERN_ERR DRV_NAME "(%s): 32-bit consistent DMA enable failed\n", diff -Nru a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c --- a/drivers/scsi/sata_sil.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/scsi/sata_sil.c 2005-03-07 14:54:16 -08:00 @@ -78,7 +78,7 @@ /* TODO firmware versions should be added - eric */ -struct sil_drivelist { +static const struct sil_drivelist { const char * product; unsigned int quirk; } sil_blacklist [] = { diff -Nru a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c --- a/drivers/scsi/sata_svw.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/scsi/sata_svw.c 2005-03-07 14:54:17 -08:00 @@ -156,7 +156,7 @@ * spin_lock_irqsave(host_set lock) */ -void k2_bmdma_setup_mmio (struct ata_queued_cmd *qc) +static void k2_bmdma_setup_mmio (struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); @@ -186,7 +186,7 @@ * spin_lock_irqsave(host_set lock) */ -void k2_bmdma_start_mmio (struct ata_queued_cmd *qc) +static void k2_bmdma_start_mmio (struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; void *mmio = (void *) ap->ioaddr.bmdma_addr; diff -Nru a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c --- a/drivers/scsi/sata_vsc.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/scsi/sata_vsc.c 2005-03-07 14:54:17 -08:00 @@ -155,7 +155,8 @@ * * Read the interrupt register and process for the devices that have them pending. */ -irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, + struct pt_regs *regs) { struct ata_host_set *host_set = dev_instance; unsigned int i; @@ -285,10 +286,10 @@ /* * Use 32 bit DMA mask, because 64 bit address support is poor. */ - rc = pci_set_dma_mask(pdev, 0xFFFFFFFFULL); + rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (rc) goto err_out_regions; - rc = pci_set_consistent_dma_mask(pdev, 0xFFFFFFFFULL); + rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); if (rc) goto err_out_regions; diff -Nru a/drivers/serial/21285.c b/drivers/serial/21285.c --- a/drivers/serial/21285.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/serial/21285.c 2005-03-07 14:54:17 -08:00 @@ -142,7 +142,6 @@ } tty_flip_buffer_push(tty); - out: return IRQ_HANDLED; } @@ -383,11 +382,9 @@ }; static struct uart_port serial21285_port = { - .membase = 0, .mapbase = 0x42000160, .iotype = SERIAL_IO_MEM, .irq = NO_IRQ, - .uartclk = 0, .fifosize = 16, .ops = &serial21285_ops, .flags = ASYNC_BOOT_AUTOCONF, diff -Nru a/drivers/serial/8250.c b/drivers/serial/8250.c --- a/drivers/serial/8250.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/serial/8250.c 2005-03-07 14:54:16 -08:00 @@ -642,6 +642,7 @@ static void autoconfig_16550a(struct uart_8250_port *up) { unsigned char status1, status2; + unsigned int iersave; up->port.type = PORT_16550A; up->capabilities |= UART_CAP_FIFO; @@ -736,6 +737,40 @@ up->capabilities |= UART_CAP_AFE | UART_CAP_SLEEP; return; } + + /* + * Try writing and reading the UART_IER_UUE bit (b6). + * If it works, this is probably one of the Xscale platform's + * internal UARTs. + * We're going to explicitly set the UUE bit to 0 before + * trying to write and read a 1 just to make sure it's not + * already a 1 and maybe locked there before we even start start. + */ + iersave = serial_in(up, UART_IER); + serial_outp(up, UART_IER, iersave & ~UART_IER_UUE); + if (!(serial_in(up, UART_IER) & UART_IER_UUE)) { + /* + * OK it's in a known zero state, try writing and reading + * without disturbing the current state of the other bits. + */ + serial_outp(up, UART_IER, iersave | UART_IER_UUE); + if (serial_in(up, UART_IER) & UART_IER_UUE) { + /* + * It's an Xscale. + * We'll leave the UART_IER_UUE bit set to 1 (enabled). + */ + DEBUG_AUTOCONF("Xscale "); + up->port.type = PORT_XSCALE; + return; + } + } else { + /* + * If we got here we couldn't force the IER_UUE bit to 0. + * Log it and continue. + */ + DEBUG_AUTOCONF("Couldn't force IER_UUE to 0 "); + } + serial_outp(up, UART_IER, iersave); } /* diff -Nru a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c --- a/drivers/serial/cpm_uart/cpm_uart_core.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/serial/cpm_uart/cpm_uart_core.c 2005-03-07 14:54:18 -08:00 @@ -864,6 +864,7 @@ .irq = SMC1_IRQ, .ops = &cpm_uart_pops, .iotype = SERIAL_IO_MEM, + .lock = SPIN_LOCK_UNLOCKED, }, .flags = FLAG_SMC, .tx_nrfifos = TX_NUM_FIFO, @@ -877,6 +878,7 @@ .irq = SMC2_IRQ, .ops = &cpm_uart_pops, .iotype = SERIAL_IO_MEM, + .lock = SPIN_LOCK_UNLOCKED, }, .flags = FLAG_SMC, .tx_nrfifos = TX_NUM_FIFO, @@ -893,6 +895,7 @@ .irq = SCC1_IRQ, .ops = &cpm_uart_pops, .iotype = SERIAL_IO_MEM, + .lock = SPIN_LOCK_UNLOCKED, }, .tx_nrfifos = TX_NUM_FIFO, .tx_fifosize = TX_BUF_SIZE, @@ -905,6 +908,7 @@ .irq = SCC2_IRQ, .ops = &cpm_uart_pops, .iotype = SERIAL_IO_MEM, + .lock = SPIN_LOCK_UNLOCKED, }, .tx_nrfifos = TX_NUM_FIFO, .tx_fifosize = TX_BUF_SIZE, @@ -917,6 +921,7 @@ .irq = SCC3_IRQ, .ops = &cpm_uart_pops, .iotype = SERIAL_IO_MEM, + .lock = SPIN_LOCK_UNLOCKED, }, .tx_nrfifos = TX_NUM_FIFO, .tx_fifosize = TX_BUF_SIZE, @@ -929,6 +934,7 @@ .irq = SCC4_IRQ, .ops = &cpm_uart_pops, .iotype = SERIAL_IO_MEM, + .lock = SPIN_LOCK_UNLOCKED, }, .tx_nrfifos = TX_NUM_FIFO, .tx_fifosize = TX_BUF_SIZE, diff -Nru a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c --- a/drivers/serial/s3c2410.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/serial/s3c2410.c 2005-03-07 14:54:17 -08:00 @@ -5,7 +5,8 @@ * * Based on drivers/char/serial.c and drivers/char/21285.c * - * Ben Dooks, (c) 2003 Simtec Electronics + * Ben Dooks, (c) 2003-2005 Simtec Electronics + * http://www.simtec.co.uk/products/SWLINUX/ * * Changelog: * @@ -24,6 +25,15 @@ * - spin-lock initialisation (Dimitry Andric) * - added clock control * - updated init code to use platform_device info + * + * 06-Mar-2005 BJD Add s3c2440 fclk clock source +*/ + +/* Note on 2440 fclk clock source handling + * + * Whilst it is possible to use the fclk as clock source, the method + * of properly switching too/from this is currently un-implemented, so + * whichever way is configured at startup is the one that will be used. */ /* Hote on 2410 error handling @@ -87,6 +97,9 @@ int (*get_clksrc)(struct uart_port *, struct s3c24xx_uart_clksrc *clk); int (*set_clksrc)(struct uart_port *, struct s3c24xx_uart_clksrc *clk); + + /* uart controls */ + int (*reset_port)(struct uart_port *, struct s3c2410_uartcfg *); }; struct s3c24xx_uart_port { @@ -606,11 +619,6 @@ * baud clocks (and the resultant actual baud rates) and then tries to * pick the closest one and select that. * - * NOTES: - * 1) there is no current code to properly select/deselect FCLK on - * the s3c2440, so only specify FCLK or non-FCLK in the clock - * sources for the UART - * */ @@ -658,6 +666,7 @@ return 0; rate = clk_get_rate(calc->src); + rate /= clksrc->divisor; calc->clksrc = clksrc; calc->quot = (rate + (8 * baud)) / (16 * baud); @@ -685,6 +694,27 @@ if (cfg->clocks_size == 0) clkp = &tmp_clksrc; + /* check to see if we're sourcing fclk, and if so we're + * going to have to update the clock source + */ + + if (strcmp(clkp->name, "fclk") == 0) { + struct s3c24xx_uart_clksrc src; + + s3c24xx_serial_getsource(port, &src); + + /* check that the port already using fclk, and if + * not, then re-select fclk + */ + + if (strcmp(src.name, clkp->name) == 0) { + s3c24xx_serial_setsource(port, clkp); + s3c24xx_serial_getsource(port, &src); + } + + clkp->divisor = src.divisor; + } + s3c24xx_serial_calcbaud(res, port, clkp, baud); best = res; resptr = best + 1; @@ -955,8 +985,6 @@ [0] = { .port = { .lock = SPIN_LOCK_UNLOCKED, - .membase = 0, - .mapbase = 0, .iotype = UPIO_MEM, .irq = IRQ_S3CUART_RX0, .uartclk = 0, @@ -969,8 +997,6 @@ [1] = { .port = { .lock = SPIN_LOCK_UNLOCKED, - .membase = 0, - .mapbase = 0, .iotype = UPIO_MEM, .irq = IRQ_S3CUART_RX1, .uartclk = 0, @@ -985,8 +1011,6 @@ [2] = { .port = { .lock = SPIN_LOCK_UNLOCKED, - .membase = 0, - .mapbase = 0, .iotype = UPIO_MEM, .irq = IRQ_S3CUART_RX2, .uartclk = 0, @@ -999,24 +1023,18 @@ #endif }; +/* s3c24xx_serial_resetport + * + * wrapper to call the specific reset for this port (reset the fifos + * and the settings) +*/ -static int s3c24xx_serial_resetport(struct uart_port *port, - struct s3c2410_uartcfg *cfg) +static inline int s3c24xx_serial_resetport(struct uart_port * port, + struct s3c2410_uartcfg *cfg) { - /* ensure registers are setup */ - - dbg("s3c24xx_serial_resetport: port=%p (%08lx), cfg=%p\n", - port, port->mapbase, cfg); - - wr_regl(port, S3C2410_UCON, cfg->ucon); - wr_regl(port, S3C2410_ULCON, cfg->ulcon); - - /* reset both fifos */ - - wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); - wr_regl(port, S3C2410_UFCON, cfg->ufcon); + struct s3c24xx_uart_info *info = s3c24xx_port_to_info(port); - return 0; + return (info->reset_port)(port, cfg); } /* s3c24xx_serial_init_port @@ -1207,6 +1225,23 @@ return 0; } +static int s3c2410_serial_resetport(struct uart_port *port, + struct s3c2410_uartcfg *cfg) +{ + dbg("s3c2410_serial_resetport: port=%p (%08lx), cfg=%p\n", + port, port->mapbase, cfg); + + wr_regl(port, S3C2410_UCON, cfg->ucon); + wr_regl(port, S3C2410_ULCON, cfg->ulcon); + + /* reset both fifos */ + + wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); + wr_regl(port, S3C2410_UFCON, cfg->ufcon); + + return 0; +} + static struct s3c24xx_uart_info s3c2410_uart_inf = { .name = "Samsung S3C2410 UART", .type = PORT_S3C2410, @@ -1219,6 +1254,7 @@ .tx_fifoshift = S3C2410_UFSTAT_TXSHIFT, .get_clksrc = s3c2410_serial_getsource, .set_clksrc = s3c2410_serial_setsource, + .reset_port = s3c2410_serial_resetport, }; /* device management */ @@ -1294,6 +1330,7 @@ struct s3c24xx_uart_clksrc *clk) { unsigned long ucon = rd_regl(port, S3C2410_UCON); + unsigned long ucon0, ucon1, ucon2; switch (ucon & S3C2440_UCON_CLKMASK) { case S3C2440_UCON_UCLK: @@ -1308,7 +1345,33 @@ break; case S3C2440_UCON_FCLK: - clk->divisor = 7; /* todo - work out divisor */ + /* the fun of calculating the uart divisors on + * the s3c2440 */ + + ucon0 = __raw_readl(S3C2410_VA_UART0 + S3C2410_UCON); + ucon1 = __raw_readl(S3C2410_VA_UART1 + S3C2410_UCON); + ucon2 = __raw_readl(S3C2410_VA_UART2 + S3C2410_UCON); + + printk("ucons: %08lx, %08lx, %08lx\n", ucon0, ucon1, ucon2); + + ucon0 &= S3C2440_UCON0_DIVMASK; + ucon1 &= S3C2440_UCON1_DIVMASK; + ucon2 &= S3C2440_UCON2_DIVMASK; + + if (ucon0 != 0) { + clk->divisor = ucon0 >> S3C2440_UCON_DIVSHIFT; + clk->divisor += 6; + } else if (ucon1 != 0) { + clk->divisor = ucon1 >> S3C2440_UCON_DIVSHIFT; + clk->divisor += 21; + } else if (ucon2 != 0) { + clk->divisor = ucon2 >> S3C2440_UCON_DIVSHIFT; + clk->divisor += 36; + } else { + /* manual calims 44, seems to be 9 */ + clk->divisor = 9; + } + clk->name = "fclk"; break; } @@ -1316,6 +1379,28 @@ return 0; } +static int s3c2440_serial_resetport(struct uart_port *port, + struct s3c2410_uartcfg *cfg) +{ + unsigned long ucon = rd_regl(port, S3C2410_UCON); + + dbg("s3c2440_serial_resetport: port=%p (%08lx), cfg=%p\n", + port, port->mapbase, cfg); + + /* ensure we don't change the clock settings... */ + + ucon &= (S3C2440_UCON0_DIVMASK | (3<<10)); + + wr_regl(port, S3C2410_UCON, ucon | cfg->ucon); + wr_regl(port, S3C2410_ULCON, cfg->ulcon); + + /* reset both fifos */ + + wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); + wr_regl(port, S3C2410_UFCON, cfg->ufcon); + + return 0; +} static struct s3c24xx_uart_info s3c2440_uart_inf = { .name = "Samsung S3C2440 UART", @@ -1328,7 +1413,8 @@ .tx_fifomask = S3C2440_UFSTAT_TXMASK, .tx_fifoshift = S3C2440_UFSTAT_TXSHIFT, .get_clksrc = s3c2440_serial_getsource, - .set_clksrc = s3c2440_serial_setsource + .set_clksrc = s3c2440_serial_setsource, + .reset_port = s3c2440_serial_resetport, }; /* device management */ @@ -1509,7 +1595,7 @@ clk = clk_get(port->dev, clksrc.name); if (!IS_ERR(clk) && clk != NULL) - rate = clk_get_rate(clk); + rate = clk_get_rate(clk) / clksrc.divisor; else rate = 1; @@ -1602,7 +1688,6 @@ .write = s3c24xx_serial_console_write, .setup = s3c24xx_serial_console_setup }; - static int s3c24xx_serial_initconsole(void) { diff -Nru a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig --- a/drivers/usb/media/Kconfig 2005-03-07 14:54:16 -08:00 +++ b/drivers/usb/media/Kconfig 2005-03-07 14:54:16 -08:00 @@ -175,3 +175,39 @@ To compile this driver as a module, choose M here: the module will be called w9968cf. + +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. + + 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. + + diff -Nru a/drivers/usb/media/Makefile b/drivers/usb/media/Makefile --- a/drivers/usb/media/Makefile 2005-03-07 14:54:16 -08:00 +++ b/drivers/usb/media/Makefile 2005-03-07 14:54:16 -08:00 @@ -14,3 +14,4 @@ obj-$(CONFIG_USB_STV680) += stv680.o obj-$(CONFIG_USB_VICAM) += vicam.o usbvideo.o obj-$(CONFIG_USB_W9968CF) += w9968cf.o +obj-$(CONFIG_USB_PWC) += pwc/ diff -Nru a/drivers/usb/media/pwc/ChangeLog b/drivers/usb/media/pwc/ChangeLog --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/ChangeLog 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,143 @@ +9.0.2 + +* Adding #ifdef to compile PWC before and after 2.6.5 + +9.0.1 + +9.0 + + +8.12 + +* Implement motorized pan/tilt feature for Logitech QuickCam Orbit/Spere. + +8.11.1 + +* Fix for PCVC720/40, would not be able to set videomode +* Fix for Samsung MPC models, appearantly they are based on a newer chipset + +8.11 + +* 20 dev_hints (per request) +* Hot unplugging should be better, no more dangling pointers or memory leaks +* Added reserved Logitech webcam IDs +* Device now remembers size & fps between close()/open() +* Removed palette stuff altogether + +8.10.1 + +* Added IDs for PCVC720K/40 and Creative Labs Webcam Pro + +8.10 + +* Fixed ID for QuickCam Notebook pro +* Added GREALSIZE ioctl() call +* Fixed bug in case PWCX was not loaded and invalid size was set + +8.9 + +* Merging with kernel 2.5.49 +* Adding IDs for QuickCam Zoom & QuickCam Notebook + +8.8 + +* Fixing 'leds' parameter +* Adding IDs for Logitech QuickCam Pro 4000 +* Making URB init/cleanup a little nicer + +8.7 + +* Incorporating changes in ioctl() parameter passing +* Also changes to URB mechanism + +8.6 + +* Added ID's for Visionite VCS UM100 and UC300 +* Removed YUV420-interlaced palette altogether (was confusing) +* Removed MIRROR stuff as it didn't work anyway +* Fixed a problem with the 'leds' parameter (wouldn't blink) +* Added ioctl()s for advanced features: 'extended' whitebalance ioctl()s, + CONTOUR, BACKLIGHT, FLICKER, DYNNOISE. +* VIDIOCGCAP.name now contains real camera model name instead of + 'Philips xxx webcam' +* Added PROBE ioctl (see previous point & API doc) + +8.5 + +* Adding IDs for Creative Labs Webcam 5 +* Adding IDs for SOTEC CMS-001 webcam +* Solving possible hang in VIDIOCSYNC when unplugging the cam +* Forgot to return structure in VIDIOCPWCGAWB, oops +* Time interval for the LEDs are now in milliseconds + +8.4 + +* Fixing power_save option for Vesta range +* Handling new error codes in ISOC callback +* Adding dev_hint module parameter, to specify /dev/videoX device nodes + +8.3 + +* Adding Samsung C10 and C30 cameras +* Removing palette module parameter +* Fixed typo in ID of QuickCam 3000 Pro +* Adding LED settings (blinking while in use) for ToUCam cameras. +* Turns LED off when camera is not in use. + +8.2 + +* Making module more silent when trace = 0 +* Adding QuickCam 3000 Pro IDs +* Chrominance control for the Vesta cameras +* Hopefully fixed problems on machines with BIGMEM and > 1GB of RAM +* Included Oliver Neukem's lock_kernel() patch +* Allocates less memory for image buffers +* Adds ioctl()s for the whitebalancing + +8.1 + +* Adding support for 750 +* Adding V4L GAUDIO/SAUDIO/UNIT ioctl() calls + +8.0 +* 'damage control' after inclusion in 2.4.5. +* Changed wait-queue mechanism in read/mmap/poll according to the book. +* Included YUV420P palette. +* Changed interface to decompressor module. +* Cleaned up pwc structure a bit. + +7.0 + +* Fixed bug in vcvt_420i_yuyv; extra variables on stack were misaligned. +* There is now a clear error message when an image size is selected that + is only supported using the decompressor, and the decompressor isn't + loaded. +* When the decompressor wasn't loaded, selecting large image size + would create skewed or double images. + +6.3 + +* Introduced spinlocks for the buffer pointer manipulation; a number of + reports seem to suggest the down()/up() semaphores were the cause of + lockups, since they are not suitable for interrupt/user locking. +* Separated decompressor and core code into 2 modules. + +6.2 + +* Non-integral image sizes are now padded with gray or black. +* Added SHUTTERSPEED ioctl(). +* Fixed buglet in VIDIOCPWCSAGC; the function would always return an error, + even though the call succeeded. +* Added hotplug support for 2.4.*. +* Memory: the 645/646 uses less memory now. + +6.1 + +* VIDIOCSPICT returns -EINVAL with invalid palettes. +* Added saturation control. +* Split decompressors from rest. +* Fixed bug that would reset the framerate to the default framerate if + the rate field was set to 0 (which is not what I intended, nl. do not + change the framerate!). +* VIDIOCPWCSCQUAL (setting compression quality) now takes effect immediately. +* Workaround for a bug in the 730 sensor. diff -Nru a/drivers/usb/media/pwc/Makefile b/drivers/usb/media/pwc/Makefile --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/Makefile 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,20 @@ +ifneq ($(KERNELRELEASE),) + +pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o pwc-dec1.o pwc-dec23.o pwc-kiara.o pwc-timon.o + +obj-$(CONFIG_USB_PWC) += pwc.o + +else + +KDIR := /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) + +default: + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules + +endif + +clean: + rm -f *.[oas] .*.flags *.ko .*.cmd .*.d .*.tmp *.mod.c + rm -rf .tmp_versions + diff -Nru a/drivers/usb/media/pwc/philips.txt b/drivers/usb/media/pwc/philips.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/philips.txt 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,236 @@ +This file contains some additional information for the Philips and OEM webcams. +E-mail: webcam@smcc.demon.nl Last updated: 2004-01-19 +Site: http://www.smcc.demon.nl/webcam/ + +As of this moment, the following cameras are supported: + * Philips PCA645 + * Philips PCA646 + * Philips PCVC675 + * Philips PCVC680 + * Philips PCVC690 + * Philips PCVC720/40 + * Philips PCVC730 + * Philips PCVC740 + * Philips PCVC750 + * Askey VC010 + * Creative Labs Webcam 5 + * Creative Labs Webcam Pro Ex + * Logitech QuickCam 3000 Pro + * Logitech QuickCam 4000 Pro + * Logitech QuickCam Notebook Pro + * Logitech QuickCam Zoom + * Logitech QuickCam Orbit + * Logitech QuickCam Sphere + * Samsung MPC-C10 + * Samsung MPC-C30 + * Sotec Afina Eye + * AME CU-001 + * Visionite VCS-UM100 + * Visionite VCS-UC300 + +The main webpage for the Philips driver is at the address above. It contains +a lot of extra information, a FAQ, and the binary plugin 'PWCX'. This plugin +contains decompression routines that allow you to use higher image sizes and +framerates; in addition the webcam uses less bandwidth on the USB bus (handy +if you want to run more than 1 camera simultaneously). These routines fall +under a NDA, and may therefor not be distributed as source; however, its use +is completely optional. + +You can build this code either into your kernel, or as a module. I recommend +the latter, since it makes troubleshooting a lot easier. The built-in +microphone is supported through the USB Audio class. + +When you load the module you can set some default settings for the +camera; some programs depend on a particular image-size or -format and +don't know how to set it properly in the driver. The options are: + +size + Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or + 'vga', for an image size of resp. 128x96, 160x120, 176x144, + 320x240, 352x288 and 640x480 (of course, only for those cameras that + support these resolutions). + +fps + Specifies the desired framerate. Is an integer in the range of 4-30. + +fbufs + This paramter specifies the number of internal buffers to use for storing + frames from the cam. This will help if the process that reads images from + the cam is a bit slow or momentarely busy. However, on slow machines it + only introduces lag, so choose carefully. The default is 3, which is + reasonable. You can set it between 2 and 5. + +mbufs + This is an integer between 1 and 10. It will tell the module the number of + buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends. + The default is 2, which is adequate for most applications (double + buffering). + + Should you experience a lot of 'Dumping frame...' messages during + grabbing with a tool that uses mmap(), you might want to increase if. + However, it doesn't really buffer images, it just gives you a bit more + slack when your program is behind. But you need a multi-threaded or + forked program to really take advantage of these buffers. + + The absolute maximum is 10, but don't set it too high! Every buffer takes + up 460 KB of RAM, so unless you have a lot of memory setting this to + something more than 4 is an absolute waste. This memory is only + allocated during open(), so nothing is wasted when the camera is not in + use. + +power_save + When power_save is enabled (set to 1), the module will try to shut down + the cam on close() and re-activate on open(). This will save power and + turn off the LED. Not all cameras support this though (the 645 and 646 + don't have power saving at all), and some models don't work either (they + will shut down, but never wake up). Consider this experimental. By + default this option is disabled. + +compression (only useful with the plugin) + With this option you can control the compression factor that the camera + uses to squeeze the image through the USB bus. You can set the + parameter between 0 and 3: + 0 = prefer uncompressed images; if the requested mode is not available + in an uncompressed format, the driver will silently switch to low + compression. + 1 = low compression. + 2 = medium compression. + 3 = high compression. + + High compression takes less bandwidth of course, but it could also + introduce some unwanted artefacts. The default is 2, medium compression. + See the FAQ on the website for an overview of which modes require + compression. + + The compression parameter does not apply to the 645 and 646 cameras + and OEM models derived from those (only a few). Most cams honour this + parameter. + +leds + This settings takes 2 integers, that define the on/off time for the LED + (in milliseconds). One of the interesting things that you can do with + this is let the LED blink while the camera is in use. This: + + leds=500,500 + + will blink the LED once every second. But with: + + leds=0,0 + + the LED never goes on, making it suitable for silent surveillance. + + By default the camera's LED is on solid while in use, and turned off + when the camera is not used anymore. + + This parameter works only with the ToUCam range of cameras (720, 730, 740, + 750) and OEMs. For other cameras this command is silently ignored, and + the LED cannot be controlled. + + Finally: this parameters does not take effect UNTIL the first time you + open the camera device. Until then, the LED remains on. + +dev_hint + A long standing problem with USB devices is their dynamic nature: you + never know what device a camera gets assigned; it depends on module load + order, the hub configuration, the order in which devices are plugged in, + and the phase of the moon (i.e. it can be random). With this option you + can give the driver a hint as to what video device node (/dev/videoX) it + should use with a specific camera. This is also handy if you have two + cameras of the same model. + + A camera is specified by its type (the number from the camera model, + like PCA645, PCVC750VC, etc) and optionally the serial number (visible + in /proc/bus/usb/devices). A hint consists of a string with the following + format: + + [type[.serialnumber]:]node + + The square brackets mean that both the type and the serialnumber are + optional, but a serialnumber cannot be specified without a type (which + would be rather pointless). The serialnumber is separated from the type + by a '.'; the node number by a ':'. + + This somewhat cryptic syntax is best explained by a few examples: + + dev_hint=3,5 The first detected cam gets assigned + /dev/video3, the second /dev/video5. Any + other cameras will get the first free + available slot (see below). + + dev_hint=645:1,680:2 The PCA645 camera will get /dev/video1, + and a PCVC680 /dev/video2. + + dev_hint=645.0123:3,645.4567:0 The PCA645 camera with serialnumber + 0123 goes to /dev/video3, the same + camera model with the 4567 serial + gets /dev/video0. + + dev_hint=750:1,4,5,6 The PCVC750 camera will get /dev/video1, the + next 3 Philips cams will use /dev/video4 + through /dev/video6. + + Some points worth knowing: + - Serialnumbers are case sensitive and must be written full, including + leading zeroes (it's treated as a string). + - If a device node is already occupied, registration will fail and + the webcam is not available. + - You can have up to 64 video devices; be sure to make enough device + nodes in /dev if you want to spread the numbers (this does not apply + to devfs). After /dev/video9 comes /dev/video10 (not /dev/videoA). + - If a camera does not match any dev_hint, it will simply get assigned + the first available device node, just as it used to be. + +trace + In order to better detect problems, it is now possible to turn on a + 'trace' of some of the calls the module makes; it logs all items in your + kernel log at debug level. + + The trace variable is a bitmask; each bit represents a certain feature. + If you want to trace something, look up the bit value(s) in the table + below, add the values together and supply that to the trace variable. + + Value Value Description Default + (dec) (hex) + 1 0x1 Module initialization; this will log messages On + while loading and unloading the module + + 2 0x2 probe() and disconnect() traces On + + 4 0x4 Trace open() and close() calls Off + + 8 0x8 read(), mmap() and associated ioctl() calls Off + + 16 0x10 Memory allocation of buffers, etc. Off + + 32 0x20 Showing underflow, overflow and Dumping frame On + messages + + 64 0x40 Show viewport and image sizes Off + + 128 0x80 PWCX debugging Off + + For example, to trace the open() & read() fuctions, sum 8 + 4 = 12, + so you would supply trace=12 during insmod or modprobe. If + you want to turn the initialization and probing tracing off, set trace=0. + The default value for trace is 35 (0x23). + + + +Example: + + # modprobe pwc size=cif fps=15 power_save=1 + +The fbufs, mbufs and trace parameters are global and apply to all connected +cameras. Each camera has its own set of buffers. + +size and fps only specify defaults when you open() the device; this is to +accommodate some tools that don't set the size. You can change these +settings after open() with the Video4Linux ioctl() calls. The default of +defaults is QCIF size at 10 fps. + +The compression parameter is semiglobal; it sets the initial compression +preference for all camera's, but this parameter can be set per camera with +the VIDIOCPWCSCQUAL ioctl() call. + +All parameters are optional. + diff -Nru a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-ctrl.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,1630 @@ +/* Driver for Philips webcam + Functions that send various control messages to the webcam, including + video modes. + (C) 1999-2003 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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" +#include "pwc-kiara.h" +#include "pwc-timon.h" +#include "pwc-dec1.h" +#include "pwc-dec23.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" +}; + + +/****************************************************************************/ + + +#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) + 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->vpalette != VIDEO_PALETTE_RAW) + { + switch(pdev->type) { + case 645: + case 646: + pwc_dec1_init(pdev->type, pdev->release, buf, pdev->decompress_data); + break; + + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: + pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data); + break; + } + } + + 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]; + const 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; + 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->vpalette != VIDEO_PALETTE_RAW) + pwc_dec23_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) +{ + const struct Kiara_table_entry *pChoose = 0; + 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) + { + 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. + */ + 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. */ + + Debug("Using alternate setting %d.\n", pChoose->alternate); + + /* 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->vpalette != VIDEO_PALETTE_RAW) + pwc_dec23_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; + } + /* + case VIDIOCPWCGVIDTABLE: + { + ARG_DEF(struct pwc_table_init_buffer, table); + ARGR(table).len = pdev->cmd_len; + memcpy(&ARGR(table).buffer, pdev->decompress_data, pdev->decompressor->table_size); + ARG_OUT(table) + break; + } + */ + + default: + ret = -ENOIOCTLCMD; + break; + } + + if (ret > 0) + return 0; + return ret; +} + + + diff -Nru a/drivers/usb/media/pwc/pwc-dec1.c b/drivers/usb/media/pwc/pwc-dec1.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-dec1.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,42 @@ +/* Linux driver for Philips webcam + Decompression for chipset version 1 + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 "pwc-dec1.h" + + +void pwc_dec1_init(int type, int release, void *buffer, void *table) +{ + +} + +void pwc_dec1_exit(void) +{ + + + +} + diff -Nru a/drivers/usb/media/pwc/pwc-dec1.h b/drivers/usb/media/pwc/pwc-dec1.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-dec1.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,36 @@ +/* Linux driver for Philips webcam + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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_DEC1_H +#define PWC_DEC1_H + +void pwc_dec1_init(int type, int release, void *buffer, void *private_data); +void pwc_dec1_exit(void); + +#endif + + + diff -Nru a/drivers/usb/media/pwc/pwc-dec23.c b/drivers/usb/media/pwc/pwc-dec23.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-dec23.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,623 @@ +/* Linux driver for Philips webcam + Decompression for chipset version 2 et 3 + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 "pwc-timon.h" +#include "pwc-kiara.h" +#include "pwc-dec23.h" +#include "pwc-ioctl.h" + +#include + +/**** + * + * + * + */ + + +static void fill_table_a000(unsigned int *p) +{ + static unsigned int initial_values[12] = { + 0xFFAD9B00, 0xFFDDEE00, 0x00221200, 0x00526500, + 0xFFC21E00, 0x003DE200, 0xFF924B80, 0xFFD2A300, + 0x002D5D00, 0x006DB480, 0xFFED3E00, 0x0012C200 + }; + static unsigned int values_derivated[12] = { + 0x0000A4CA, 0x00004424, 0xFFFFBBDC, 0xFFFF5B36, + 0x00007BC4, 0xFFFF843C, 0x0000DB69, 0x00005ABA, + 0xFFFFA546, 0xFFFF2497, 0x00002584, 0xFFFFDA7C + }; + unsigned int temp_values[12]; + int i,j; + + memcpy(temp_values,initial_values,sizeof(initial_values)); + for (i=0;i<256;i++) + { + for (j=0;j<12;j++) + { + *p++ = temp_values[j]; + temp_values[j] += values_derivated[j]; + } + } +} + +static void fill_table_d000(unsigned char *p) +{ + int bit,byte; + + for (bit=0; bit<8; bit++) + { + unsigned char bitpower = 1<=1 && k<3) + bit=(table[0]>>15)&7; + else if (k>=3 && k<6) + bit=(table[0]>>12)&7; + else if (k>=6 && k<10) + bit=(table[0]>>9)&7; + else if (k>=10 && k<13) + bit=(table[0]>>6)&7; + else if (k>=13 && k<15) + bit=(table[0]>>3)&7; + else + bit=(table[0])&7; + if (k == 0) + *(unsigned char *)p8++ = 8; + else + *(unsigned char *)p8++ = j - bit; + *(unsigned char *)p8++ = bit; + + pw = 1<xx + pdev->yy) + * + */ +void fill_table_dc00_d800(unsigned int precision, unsigned int *pdc00, unsigned int *pd800) +{ + int i; + unsigned int offset1, offset2; + + for(i=0,offset1=0x4000, offset2=0; i<256 ; i++,offset1+=0x7BC4, offset2+=0x7BC4) + { + unsigned int msb = offset1 >> 15; + + if ( msb > 255) + { + if (msb) + msb=0; + else + msb=255; + } + + *pdc00++ = msb << precision; + *pd800++ = offset2; + } + +} + +/* + * struct { + * unsigned char op; // operation to execute + * unsigned char bits; // bits use to perform operation + * unsigned char offset1; // offset to add to access in the table_0004 % 16 + * unsigned char offset2; // offset to add to access in the table_0004 + * } + * + */ +static unsigned int table_ops[] = { +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x01,0x30, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x20, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x00, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x02,0x10, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x60, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x40, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x40, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x01,0x70, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x20, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x00, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x10, 0x00,0x06,0x02,0x50, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x01,0x60, 0x01,0x00,0x00,0x00, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x00, 0x00,0x04,0x01,0x50, 0x00,0x05,0x02,0x40, +0x02,0x00,0x00,0x00, 0x00,0x03,0x01,0x40, 0x00,0x05,0x03,0x40, 0x01,0x00,0x00,0x00 +}; + +/* + * TODO: multiply by 4 all values + * + */ +static unsigned int MulIdx[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, + 6, 7, 8, 9, 7,10,11, 8, 8,11,10, 7, 9, 8, 7, 6, + 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4, + 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, + 0, 3, 3, 0, 1, 2, 2, 1, 2, 1, 1, 2, 3, 0, 0, 3, + 0, 1, 2, 3, 3, 2, 1, 0, 3, 2, 1, 0, 0, 1, 2, 3, + 1, 1, 1, 1, 3, 3, 3, 3, 0, 0, 0, 0, 2, 2, 2, 2, + 7,10,11, 8, 9, 8, 7, 6, 6, 7, 8, 9, 8,11,10, 7, + 4, 5, 5, 4, 5, 4, 4, 5, 5, 4, 4, 5, 4, 5, 5, 4, + 7, 9, 6, 8,10, 8, 7,11,11, 7, 8,10, 8, 6, 9, 7, + 1, 3, 0, 2, 2, 0, 3, 1, 2, 0, 3, 1, 1, 3, 0, 2, + 1, 2, 2, 1, 3, 0, 0, 3, 0, 3, 3, 0, 2, 1, 1, 2, +10, 8, 7,11, 8, 6, 9, 7, 7, 9, 6, 8,11, 7, 8,10 +}; + + + +void pwc_dec23_init(int type, int release, unsigned char *mode, void *data) +{ + int flags; + struct pwc_dec23_private *pdev = data; + release = release; + + switch (type) + { + case 720: + case 730: + case 740: + case 750: + flags = mode[2]&0x18; /* our: flags = 8, mode[2]==e8 */ + if (flags==8) + pdev->zz = 7; + else if (flags==0x10) + pdev->zz = 8; + else + pdev->zz = 6; + flags = mode[2]>>5; /* our: 7 */ + + fill_table_color(flags, (unsigned int *)KiaraRomTable, pdev->table_0004, pdev->table_8004); + break; + + + case 675: + case 680: + case 690: + flags = mode[2]&6; + if (flags==2) + pdev->zz = 7; + else if (flags==4) + pdev->zz = 8; + else + pdev->zz = 6; + flags = mode[2]>>3; + + fill_table_color(flags, (unsigned int *)TimonRomTable, pdev->table_0004, pdev->table_8004); + break; + + default: + /* Not supported */ + return; + } + + /* * * * ** */ + pdev->xx = 8 - pdev->zz; + pdev->yy = 15 - pdev->xx; + pdev->zzmask = 0xFF>>pdev->xx; + //pdev->zzmask = (1U<zz)-1; + + + fill_table_dc00_d800(pdev->xx + pdev->yy, pdev->table_dc00, pdev->table_d800); + fill_table_a000(pdev->table_a004); + fill_table_d000(pdev->table_d004); +} + + +/* + * To manage the stream, we keep in a 32 bits variables, + * the next bits in the stream. fill_reservoir() add to + * the reservoir at least wanted nbits. + * + * + */ +#define fill_nbits(reservoir,nbits_in_reservoir,stream,nbits_wanted) do { \ + while (nbits_in_reservoir>= nbits_wanted; \ + nbits_in_reservoir -= nbits_wanted; \ +} while(0); + + + +static void DecompressBand23(const struct pwc_dec23_private *pdev, + const unsigned char *rawyuv, + unsigned char *planar_y, + unsigned char *planar_u, + unsigned char *planar_v, + unsigned int image_x, /* aka number of pixels wanted ??? */ + unsigned int pixels_per_line, /* aka number of pixels per line */ + int flags) +{ + + + unsigned int reservoir, nbits_in_reservoir; + int first_4_bits; + unsigned int bytes_per_channel; + int line_size; /* size of the line (4Y+U+V) */ + int passes; + const unsigned char *ptable0004, *ptable8004; + + int even_line; + unsigned int temp_colors[16]; + int nblocks; + + const unsigned char *stream; + unsigned char *dest_y, *dest_u=NULL, *dest_v=NULL; + unsigned int offset_to_plane_u, offset_to_plane_v; + + int i; + + + reservoir = 0; + nbits_in_reservoir = 0; + stream = rawyuv+1; /* The first byte of the stream is skipped */ + even_line = 1; + + get_nbits(reservoir,nbits_in_reservoir,stream,4,first_4_bits); + + line_size = pixels_per_line*3; + + for (passes=0;passes<2;passes++) + { + if (passes==0) + { + bytes_per_channel = pixels_per_line; + dest_y = planar_y; + nblocks = image_x/4; + } + else + { + /* Format planar: All Y, then all U, then all V */ + bytes_per_channel = pixels_per_line/2; + dest_u = planar_u; + dest_v = planar_v; + dest_y = dest_u; + nblocks = image_x/8; + } + + offset_to_plane_u = bytes_per_channel*2; + offset_to_plane_v = bytes_per_channel*3; + /* + printf("bytes_per_channel = %d\n",bytes_per_channel); + printf("offset_to_plane_u = %d\n",offset_to_plane_u); + printf("offset_to_plane_v = %d\n",offset_to_plane_v); + */ + + while (nblocks-->0) + { + unsigned int gray_index; + + fill_nbits(reservoir,nbits_in_reservoir,stream,16); + gray_index = reservoir & pdev->zzmask; + reservoir >>= pdev->zz; + nbits_in_reservoir -= pdev->zz; + + fill_nbits(reservoir,nbits_in_reservoir,stream,2); + + if ( (reservoir & 3) == 0) + { + reservoir>>=2; + nbits_in_reservoir-=2; + for (i=0;i<16;i++) + temp_colors[i] = pdev->table_dc00[gray_index]; + + } + else + { + unsigned int channel_v, offset1; + + /* swap bit 0 and 2 of offset_OR */ + channel_v = ((reservoir & 1) << 2) | (reservoir & 2) | ((reservoir & 4)>>2); + reservoir>>=3; + nbits_in_reservoir-=3; + + for (i=0;i<16;i++) + temp_colors[i] = pdev->table_d800[gray_index]; + + ptable0004 = pdev->table_0004 + (passes*16384) + (first_4_bits*1024) + (channel_v*128); + ptable8004 = pdev->table_8004 + (passes*4096) + (first_4_bits*256) + (channel_v*32); + + offset1 = 0; + while(1) + { + unsigned int index_in_table_ops, op, rows=0; + fill_nbits(reservoir,nbits_in_reservoir,stream,16); + + /* mode is 0,1 or 2 */ + index_in_table_ops = (reservoir&0x3F); + op = table_ops[ index_in_table_ops*4 ]; + if (op == 2) + { + reservoir >>= 2; + nbits_in_reservoir -= 2; + break; /* exit the while(1) */ + } + if (op == 0) + { + unsigned int shift; + + offset1 = (offset1 + table_ops[index_in_table_ops*4+2]) & 0x0F; + shift = table_ops[ index_in_table_ops*4+1 ]; + reservoir >>= shift; + nbits_in_reservoir -= shift; + rows = ptable0004[ offset1 + table_ops[index_in_table_ops*4+3] ]; + } + if (op == 1) + { + /* 10bits [ xxxx xxxx yyyy 000 ] + * yyy => offset in the table8004 + * xxx => offset in the tabled004 + */ + unsigned int mask, shift; + unsigned int col1, row1, total_bits; + + offset1 = (offset1 + ((reservoir>>3)&0x0F)+1) & 0x0F; + + col1 = (reservoir>>7) & 0xFF; + row1 = ptable8004 [ offset1*2 ]; + + /* Bit mask table */ + mask = pdev->table_d004[ (row1<<8) + col1 ]; + shift = ptable8004 [ offset1*2 + 1]; + rows = ((mask << shift) + 0x80) & 0xFF; + + total_bits = row1 + 8; + reservoir >>= total_bits; + nbits_in_reservoir -= total_bits; + } + { + const unsigned int *table_a004 = pdev->table_a004 + rows*12; + unsigned int *poffset = MulIdx + offset1*16; /* 64/4 (int) */ + for (i=0;i<16;i++) + { + temp_colors[i] += table_a004[ *poffset ]; + poffset++; + } + } + } + } +#define USE_SIGNED_INT_FOR_COLOR +#ifdef USE_SIGNED_INT_FOR_COLOR +# define CLAMP(x) ((x)>255?255:((x)<0?0:x)) +#else +# define CLAMP(x) ((x)>255?255:x) +#endif + + if (passes == 0) + { +#ifdef USE_SIGNED_INT_FOR_COLOR + const int *c = temp_colors; +#else + const unsigned int *c = temp_colors; +#endif + unsigned char *d; + + d = dest_y; + for (i=0;i<4;i++,c++) + *d++ = CLAMP((*c) >> pdev->yy); + + d = dest_y + bytes_per_channel; + for (i=0;i<4;i++,c++) + *d++ = CLAMP((*c) >> pdev->yy); + + d = dest_y + offset_to_plane_u; + for (i=0;i<4;i++,c++) + *d++ = CLAMP((*c) >> pdev->yy); + + d = dest_y + offset_to_plane_v; + for (i=0;i<4;i++,c++) + *d++ = CLAMP((*c) >> pdev->yy); + + dest_y += 4; + } + else if (passes == 1) + { +#ifdef USE_SIGNED_INT_FOR_COLOR + int *c1 = temp_colors; + int *c2 = temp_colors+4; +#else + unsigned int *c1 = temp_colors; + unsigned int *c2 = temp_colors+4; +#endif + unsigned char *d; + + d = dest_y; + for (i=0;i<4;i++,c1++,c2++) + { + *d++ = CLAMP((*c1) >> pdev->yy); + *d++ = CLAMP((*c2) >> pdev->yy); + } + c1 = temp_colors+12; + //c2 = temp_colors+8; + d = dest_y + bytes_per_channel; + for (i=0;i<4;i++,c1++,c2++) + { + *d++ = CLAMP((*c1) >> pdev->yy); + *d++ = CLAMP((*c2) >> pdev->yy); + } + + if (even_line) /* Each line, swap u/v */ + { + even_line=0; + dest_y = dest_v; + dest_u += 8; + } + else + { + even_line=1; + dest_y = dest_u; + dest_v += 8; + } + } + + } /* end of while (nblocks-->0) */ + + } /* end of for (passes=0;passes<2;passes++) */ + +} + + +/** + * + * image: size of the image wanted + * view : size of the image returned by the camera + * offset: (x,y) to displayer image in the view + * + * src: raw data + * dst: image output + * flags: PWCX_FLAG_PLANAR + * pdev: private buffer + * bandlength: + * + */ +void pwc_dec23_decompress(const struct pwc_coord *image, + const struct pwc_coord *view, + const struct pwc_coord *offset, + const void *src, + void *dst, + int flags, + const void *data, + int bandlength) +{ + const struct pwc_dec23_private *pdev = data; + unsigned char *pout, *pout_planar_y=NULL, *pout_planar_u=NULL, *pout_planar_v=NULL; + int i,n,stride,pixel_size; + + + if (flags & PWCX_FLAG_BAYER) + { + pout = dst + (view->x * offset->y) + offset->x; + pixel_size = view->x * 4; + } + else + { + n = view->x * view->y; + + /* offset in Y plane */ + stride = view->x * offset->y; + pout_planar_y = dst + stride + offset->x; + + /* offsets in U/V planes */ + stride = (view->x * offset->y)/4 + offset->x/2; + pout_planar_u = dst + n + + stride; + pout_planar_v = dst + n + n/4 + stride; + + pixel_size = view->x * 4; + } + + + for (i=0;iy;i+=4) + { + if (flags & PWCX_FLAG_BAYER) + { + //TODO: + //DecompressBandBayer(pdev,src,pout,image.x,view->x,flags); + src += bandlength; + pout += pixel_size; + } + else + { + DecompressBand23(pdev,src,pout_planar_y,pout_planar_u,pout_planar_v,image->x,view->x,flags); + src += bandlength; + pout_planar_y += pixel_size; + pout_planar_u += view->x; + pout_planar_v += view->x; + } + } +} + +void pwc_dec23_exit(void) +{ + /* Do nothing */ + +} + diff -Nru a/drivers/usb/media/pwc/pwc-dec23.h b/drivers/usb/media/pwc/pwc-dec23.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-dec23.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,58 @@ +/* Linux driver for Philips webcam + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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_DEC23_H +#define PWC_DEC23_H + +struct pwc_dec23_private +{ + unsigned char xx,yy,zz,zzmask; + + unsigned char table_0004[2*0x4000]; + unsigned char table_8004[2*0x1000]; + unsigned int table_a004[256*12]; + + unsigned char table_d004[8*256]; + unsigned int table_d800[256]; + unsigned int table_dc00[256]; +}; + + +void pwc_dec23_init(int type, int release, unsigned char *buffer, void *private_data); +void pwc_dec23_exit(void); +void pwc_dec23_decompress(const struct pwc_coord *image, + const struct pwc_coord *view, + const struct pwc_coord *offset, + const void *src, + void *dst, + int flags, + const void *data, + int bandlength); + + + +#endif + + + diff -Nru a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-if.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,2211 @@ +/* Linux driver for Philips webcam + USB and Video4Linux interface part. + (C) 1999-2004 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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-kiara.h" +#include "pwc-timon.h" +#include "pwc-dec23.h" +#include "pwc-dec1.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 *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; + switch (pdev->type) + { + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: + Trace(TRACE_MEMORY,"private_data(%d)\n",sizeof(struct pwc_dec23_private)); + kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */ + break; + case 645: + case 646: + /* TODO & FIXME */ + kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); + break; + } + if (kbuf == NULL) { + Err("Failed to allocate decompress table.\n"); + return -ENOMEM; + } + 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). needed (%d)\n",default_mbufs * pdev->len_per_image); + 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 = 0, *iso_buf = 0; + + 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; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) + idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate]; +#else + intf = usb_ifnum_to_if(udev, 0); + if (intf) + idesc = usb_altnum_to_altsetting(intf, pdev->valternate); +#endif + + 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_kill_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"); + + 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; + 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); + + switch (pdev->type) + { + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: + pwc_dec23_exit(); /* Timon & Kiara */ + break; + case 645: + case 646: + pwc_dec1_exit(); + break; + } + + 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 *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, %d) 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; + + vma->vm_flags |= VM_IO; + + pos = (unsigned long)pdev->image_data; + while (size > 0) { + page = vmalloc_to_pfn((void *)pos); + if (remap_pfn_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: + /* 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 = NULL; +static int fps = 0; +static int fbufs = 0; +static int mbufs = 0; +static int trace = -1; +static int compression = -1; +static int leds[2] = { -1, -1 }; +static char *dev_hint[MAX_DEV_HINTS] = { }; + +MODULE_PARM(size, "s"); +MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); +MODULE_PARM(fps, "i"); +MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); +MODULE_PARM(fbufs, "i"); +MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve"); +MODULE_PARM(mbufs, "i"); +MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers"); +MODULE_PARM(trace, "i"); +MODULE_PARM_DESC(trace, "For debugging purposes"); +MODULE_PARM(power_save, "i"); +MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off"); +MODULE_PARM(compression, "i"); +MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)"); +MODULE_PARM(leds, "2i"); +MODULE_PARM_DESC(leds, "LED on,off time in milliseconds"); +MODULE_PARM(dev_hint, "0-20s"); +MODULE_PARM_DESC(dev_hint, "Device node hints"); + +MODULE_DESCRIPTION("Philips & OEM USB webcam driver"); +MODULE_AUTHOR("Luc Saillard "); +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 (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"); + if (leds[0] >= 0) + led_on = leds[0]; + if (leds[1] >= 0) + led_off = leds[1]; + + /* 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/pwc-ioctl.h b/drivers/usb/media/pwc/pwc-ioctl.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-ioctl.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,292 @@ +#ifndef PWC_IOCTL_H +#define PWC_IOCTL_H + +/* (C) 2001-2004 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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) +struct pwc_table_init_buffer { + int len; + char *buffer; + +}; +#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer) + +#endif diff -Nru a/drivers/usb/media/pwc/pwc-kiara.c b/drivers/usb/media/pwc/pwc-kiara.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-kiara.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,891 @@ +/* Linux driver for Philips webcam + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 tables contains entries for the 730/740/750 (Kiara) 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. +*/ + + +#include "pwc-kiara.h" +#include "pwc-uncompress.h" + +const struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4] = +{ + /* 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, }, + }, + }, +}; + + +/* + * Rom table for kiara chips + * + * 32 roms tables (one for each resolution ?) + * 2 tables per roms (one for each passes) (Y, and U&V) + * 128 bytes per passes + */ + +const unsigned int KiaraRomTable [8][2][16][8] = +{ + { /* version 0 */ + { /* version 0, passes 0 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000001,0x00000001}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000009,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x0000124a,0x00009252,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00009252,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009292,0x00009292,0x00009493,0x000124db}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x0000a493,0x000124db,0x000124db,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x000124db,0x000126dc,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000124db,0x000136e4,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 0, passes 1 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000001,0x00000009, + 0x00000009,0x00000009,0x00000009,0x00000001}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00001252}, + {0x00000000,0x00000000,0x00000049,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009252,0x00009292,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009292,0x00009292,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00009292, + 0x00009492,0x00009493,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009252,0x00009493, + 0x000126dc,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x000136e4,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 1 */ + { /* version 1, passes 0 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000001}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009252,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00009252, + 0x00009492,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 1, passes 1 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000009, + 0x00000049,0x00000009,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000000}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000249,0x00000049,0x0000024a,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000009}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009252,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009292,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009292,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009292,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x0000924a,0x0000924a, + 0x00009492,0x00009493,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 2 */ + { /* version 2, passes 0 */ + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009493,0x00009493,0x0000a49b}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000124db,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x00009252,0x000124db, + 0x000126dc,0x0001b724,0x0001b725,0x0001b925}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 2, passes 1 */ + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x0000124a,0x0000124a,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x0000a49b,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00009252,0x0000a49b, + 0x0001249b,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 3 */ + { /* version 3, passes 0 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000136e4,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x0001b725,0x0001b925}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x000136e4,0x0001b925,0x00025bb6,0x00024b77}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 3, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x000126dc,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000136e4,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 4 */ + { /* version 4, passes 0 */ + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000249,0x00000249,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x00009252,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0001249b,0x000126dc,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00009252,0x00009493, + 0x000124db,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009252,0x0000a49b, + 0x000124db,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 4, passes 1 */ + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000049,0x00000049,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00000249,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009252,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x00009252,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009493,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009252,0x000124db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 5 */ + { /* version 5, passes 0 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x000136e4}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001c96e,0x0001b925}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001c924,0x0002496d,0x00025bb6,0x00024b77}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 5, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009252,0x00009252,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000126dc,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 6 */ + { /* version 6, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x00024b76,0x0002496e}, + {0x00000000,0x00000000,0x00012492,0x000126db, + 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 6, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x00009252,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009292,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000124db,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000126dc,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 7 */ + { /* version 7, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x0000a49b, + 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b725,0x000124db}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001c96e,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b924,0x0001c92d,0x00024b76,0x0002496e}, + {0x00000000,0x00000000,0x00012492,0x000136db, + 0x00024924,0x00024b6d,0x0002ddb6,0x00025bbf}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 7, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x00009492,0x00009292,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000124db,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000136db, + 0x0001b724,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000136db, + 0x0001b724,0x000126dc,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00009292,0x000136db, + 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00012492,0x0001b6db, + 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + } +}; + diff -Nru a/drivers/usb/media/pwc/pwc-kiara.h b/drivers/usb/media/pwc/pwc-kiara.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-kiara.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,45 @@ +/* Linux driver for Philips webcam + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 +*/ + +/* Entries for the Kiara (730/740/750) camera */ + +#ifndef PWC_KIARA_H +#define PWC_KIARA_H + +#include "pwc-ioctl.h" + +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 */ +}; + +const extern struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4]; +const extern unsigned int KiaraRomTable[8][2][16][8]; + +#endif + + diff -Nru a/drivers/usb/media/pwc/pwc-misc.c b/drivers/usb/media/pwc/pwc-misc.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-misc.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,140 @@ +/* Linux driver for Philips webcam + Various miscellaneous functions and tables. + (C) 1999-2003 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 */ + pdev->view_max.x = 640; + pdev->view_max.y = 480; + 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; + pdev->view_max.x = 640; + pdev->view_max.y = 480; + 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; + } + Debug("type = %d\n",pdev->type); + 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/pwc-nala.h b/drivers/usb/media/pwc/pwc-nala.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-nala.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,66 @@ + /* 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/pwc-timon.c b/drivers/usb/media/pwc/pwc-timon.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-timon.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,1446 @@ +/* Linux driver for Philips webcam + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 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. +*/ + +#include "pwc-timon.h" + +const struct Timon_table_entry Timon_table[PSZ_MAX][6][4] = +{ + /* 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, }, + }, + }, +}; + +/* + * 16 versions: + * 2 tables (one for Y, and one for U&V) + * 16 levels of details per tables + * 8 blocs + */ + +const unsigned int TimonRomTable [16][2][16][8] = +{ + { /* version 0 */ + { /* version 0, passes 0 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000001}, + {0x00000000,0x00000000,0x00000001,0x00000001, + 0x00000001,0x00000001,0x00000001,0x00000001}, + {0x00000000,0x00000000,0x00000001,0x00000001, + 0x00000001,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000009,0x00000001, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000009,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000249,0x00000249,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000249,0x0000124a,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009252,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 0, passes 1 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000001,0x00000001, + 0x00000001,0x00000001,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000009,0x00000001, + 0x00000001,0x00000009,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000009, + 0x00000009,0x00000049,0x00000001,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000009, + 0x00000009,0x00000049,0x00000001,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000009,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000009,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000009,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000249,0x00000249,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 1 */ + { /* version 1, passes 0 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000001}, + {0x00000000,0x00000000,0x00000001,0x00000001, + 0x00000001,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000009,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00001252}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 1, passes 1 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000001,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000009,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000001,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000009,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000049,0x00000249,0x00000009,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000249,0x00000249,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00000049,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009252,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 2 */ + { /* version 2, passes 0 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000001}, + {0x00000000,0x00000000,0x00000009,0x00000009, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009252,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00009252, + 0x00009492,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 2, passes 1 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000009, + 0x00000049,0x00000009,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000000}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000249,0x00000049,0x0000024a,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x0000024a,0x00000009}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009252,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009292,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009292,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009292,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x0000924a,0x0000924a, + 0x00009492,0x00009493,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 3 */ + { /* version 3, passes 0 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000001}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000049,0x00000249, + 0x00000249,0x00000249,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009292,0x00009292,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009292,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00009252, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009292,0x0000a49b,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x0000a49b,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x0001b725,0x000136e4}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 3, passes 1 */ + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000}, + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000001,0x00000000}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x00000049,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00000001}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x00001252,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009252,0x00009292,0x00000009}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009252,0x00009292,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009252,0x00009292,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009493,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009493,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009493,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x00009493,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009292, + 0x0000a493,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 4 */ + { /* version 4, passes 0 */ + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x00009252,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009493,0x00009493,0x0000a49b}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000124db,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x00009252,0x000124db, + 0x000126dc,0x0001b724,0x0001b725,0x0001b925}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 4, passes 1 */ + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x0000124a,0x0000124a,0x00001252,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x0000a49b,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00009252,0x0000a49b, + 0x0001249b,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 5 */ + { /* version 5, passes 0 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x0000124a,0x00001252,0x00009292}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x0000124a,0x00009292,0x00009292,0x00009493}, + {0x00000000,0x00000000,0x00000249,0x0000924a, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x000124db,0x000124db,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0001249b,0x000126dc,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000126dc,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 5, passes 1 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x00009493,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x00009493,0x000124db,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x00009493,0x000124db,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x000124db,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x000124db,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009252,0x000124db, + 0x000126dc,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 6 */ + { /* version 6, passes 0 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x0000124a,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000136e4,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x0001b725,0x0001b925}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x000136e4,0x0001b925,0x00025bb6,0x00024b77}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 6, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x00009493,0x0000a49b,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x000126dc,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000136e4,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 7 */ + { /* version 7, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x0000a49b,0x000124db,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b725,0x0001b925}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001c96e,0x0002496e}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x000136e4,0x0001b925,0x0001c96e,0x0002496e}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x0002496d,0x00025bb6,0x00025bbf}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 7, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x00009493,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x000136e4,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x000136e4,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x000136e4,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x000136e4,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00012492,0x000126db, + 0x0001b724,0x0001b925,0x0001b725,0x000136e4}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 8 */ + { /* version 8, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009292,0x00009493,0x0000a49b,0x000124db}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x000124db,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000136e4}, + {0x00000000,0x00000000,0x00001249,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000136e4,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b725,0x0001b925}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, + {0x00000000,0x00000000,0x00009252,0x000124db, + 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000126dc,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x00024b76,0x00024b77}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x000136e4,0x0001b925,0x00024b76,0x00025bbf}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x000136e4,0x0001c92d,0x00024b76,0x00025bbf}, + {0x00000000,0x00000000,0x00012492,0x000136db, + 0x0001b724,0x00024b6d,0x0002ddb6,0x0002efff}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 8, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000126dc,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000136e4,0x0001b724,0x0001b725,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x000136e4,0x0001b925,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x000136e4,0x0001b925,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x0002496d,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 9 */ + { /* version 9, passes 0 */ + {0x00000000,0x00000000,0x00000049,0x00000049, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000249,0x00000249,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x0000124a,0x00009252,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0001249b,0x000126dc,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00009252,0x00009493, + 0x000124db,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009252,0x0000a49b, + 0x000124db,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 9, passes 1 */ + {0x00000000,0x00000000,0x00000249,0x00000049, + 0x00000009,0x00000009,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000049,0x00000049,0x00000009,0x00000009}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00000249,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009252,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x00009252,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009493,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009252,0x000124db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 10 */ + { /* version 10, passes 0 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00000249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x00009493,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x000124db,0x000124db,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0001249b,0x000126dc,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000126dc,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009252,0x0000a49b, + 0x000124db,0x000136e4,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000126dc,0x0001b925,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x000136e4,0x0002496d,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 10, passes 1 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000049,0x00000049,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00000249,0x00000049,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x00009252,0x0000024a,0x00000049}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009493,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00009252, + 0x00009492,0x00009493,0x00001252,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x00009493,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x00009492,0x00009493,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009493,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009252,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 11 */ + { /* version 11, passes 0 */ + {0x00000000,0x00000000,0x00000249,0x00000249, + 0x00000249,0x00000249,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x000124db,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x000136e4}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001c96e,0x0001b925}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001c924,0x0002496d,0x00025bb6,0x00024b77}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 11, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00000249, + 0x00000249,0x00000249,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009252,0x00009252,0x0000024a,0x0000024a}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x0000a49b,0x00009292,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000124db,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000126dc,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 12 */ + { /* version 12, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x00024b76,0x0002496e}, + {0x00000000,0x00000000,0x00012492,0x000126db, + 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 12, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x00001249,0x00009292, + 0x00009492,0x00009252,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009292,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000124db,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000124db,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000126dc,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00009492,0x000126db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 13 */ + { /* version 13, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x00009252,0x00009292,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x0000a49b, + 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x000136e4,0x0001b725,0x000124db}, + {0x00000000,0x00000000,0x00009292,0x0000a49b, + 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001c96e,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b924,0x0001c92d,0x00024b76,0x0002496e}, + {0x00000000,0x00000000,0x00012492,0x000136db, + 0x00024924,0x00024b6d,0x0002ddb6,0x00025bbf}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 13, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x00009492,0x00009292,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x0000a49b,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000124db,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000136db, + 0x0001b724,0x000124db,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000136db, + 0x0001b724,0x000126dc,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00009292,0x000136db, + 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00012492,0x0001b6db, + 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 14 */ + { /* version 14, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x0000924a, + 0x00009292,0x00009493,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00001249,0x0000a49b, + 0x0000a493,0x000124db,0x000126dc,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x000136e4,0x0001b725,0x000124db}, + {0x00000000,0x00000000,0x00009292,0x000124db, + 0x000126dc,0x0001b724,0x0001b92d,0x000126dc}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b724,0x0001b92d,0x000126dc}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001c92d,0x0001c96e,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x00024b76,0x0001b925}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x0001c92d,0x00024b76,0x0002496e}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b924,0x0002496d,0x00024b76,0x00024b77}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b924,0x00024b6d,0x0002ddb6,0x00025bbf}, + {0x00000000,0x00000000,0x00012492,0x0001b6db, + 0x00024924,0x0002db6d,0x00036db6,0x0002efff}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 14, passes 1 */ + {0x00000000,0x00000000,0x00001249,0x00001249, + 0x0000124a,0x0000124a,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x00009493, + 0x0000a493,0x00009292,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x0000a49b,0x00001252,0x00001252}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000136e4,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000136e4,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x000136e4,0x00009493,0x00009292}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001b724,0x000136e4,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001b724,0x000136e4,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001b724,0x000136e4,0x0000a49b,0x00009493}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001b724,0x000136e4,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000124db,0x0000a49b}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b724,0x000136e4,0x000126dc,0x000124db}, + {0x00000000,0x00000000,0x00012492,0x0001b6db, + 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + }, + { /* version 15 */ + { /* version 15, passes 0 */ + {0x00000000,0x00000000,0x00001249,0x00009493, + 0x0000a493,0x0000a49b,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0001249b,0x000126dc,0x000136e4,0x000124db}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x000126dc,0x0001b724,0x0001b725,0x000126dc}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x0001b724,0x0001b92d,0x000126dc}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x000136e4,0x0001b925,0x0001c96e,0x000136e4}, + {0x00000000,0x00000000,0x00009492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000124db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925}, + {0x00000000,0x00000000,0x0000a492,0x000126db, + 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001b924,0x0002496d,0x00024b76,0x0002496e}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0002496d,0x00025bb6,0x00024b77}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x00024b6d,0x00025bb6,0x00024b77}, + {0x00000000,0x00000000,0x00012492,0x000136db, + 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf}, + {0x00000000,0x00000000,0x00012492,0x0001b6db, + 0x00024924,0x0002db6d,0x00036db6,0x0002efff}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + }, + { /* version 15, passes 1 */ + {0x00000000,0x00000000,0x0000924a,0x0000924a, + 0x00009292,0x00009292,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x0000a49b, + 0x0000a493,0x000124db,0x00009292,0x00009292}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000124db,0x0001b724,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000126dc,0x0001b724,0x00009493,0x00009493}, + {0x00000000,0x00000000,0x0000924a,0x000124db, + 0x000136e4,0x0001b724,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00009292,0x000136db, + 0x0001b724,0x0001b724,0x0000a49b,0x0000a49b}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001c924,0x0001b724,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x00009492,0x000136db, + 0x0001c924,0x0001b724,0x000124db,0x000124db}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b724,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b925,0x000126dc,0x000126dc}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b925,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b925,0x000136e4,0x000136e4}, + {0x00000000,0x00000000,0x0000a492,0x000136db, + 0x0001c924,0x0001b925,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x00012492,0x000136db, + 0x0001c924,0x0001b925,0x0001b725,0x0001b724}, + {0x00000000,0x00000000,0x00012492,0x0001b6db, + 0x00024924,0x0002496d,0x0001b92d,0x0001b925}, + {0x00000000,0x00000000,0x00000000,0x00000000, + 0x00000000,0x00000000,0x00000000,0x00000000} + } + } +}; diff -Nru a/drivers/usb/media/pwc/pwc-timon.h b/drivers/usb/media/pwc/pwc-timon.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-timon.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,61 @@ +/* Linux driver for Philips webcam + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 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. +*/ + +#ifndef PWC_TIMON_H +#define PWC_TIMON_H + +#include "pwc-ioctl.h" + +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 */ +}; + +const extern struct Timon_table_entry Timon_table[PSZ_MAX][6][4]; +const extern unsigned int TimonRomTable [16][2][16][8]; + + +#endif + + diff -Nru a/drivers/usb/media/pwc/pwc-uncompress.c b/drivers/usb/media/pwc/pwc-uncompress.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-uncompress.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,147 @@ +/* Linux driver for Philips webcam + Decompression frontend. + (C) 1999-2003 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 "pwc.h" +#include "pwc-uncompress.h" +#include "pwc-dec1.h" +#include "pwc-dec23.h" + +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) + { + printk(KERN_ERR "pwc: Mode Bayer is not supported for now\n"); + flags |= PWCX_FLAG_BAYER; + return -ENXIO; /* No such device or address: missing decompressor */ + } + + switch (pdev->type) + { + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: + pwc_dec23_decompress(&pdev->image, &pdev->view, &pdev->offset, + yuv, image, + flags, + pdev->decompress_data, pdev->vbandlength); + break; + case 645: + case 646: + /* TODO & FIXME */ + return -ENXIO; /* No such device or address: missing decompressor */ + break; + } + } + return 0; +} + + diff -Nru a/drivers/usb/media/pwc/pwc-uncompress.h b/drivers/usb/media/pwc/pwc-uncompress.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc-uncompress.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,41 @@ +/* (C) 1999-2003 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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 "pwc-ioctl.h" + +/* from pwc-dec.h */ +#define PWCX_FLAG_PLANAR 0x0001 +/* */ + +#endif diff -Nru a/drivers/usb/media/pwc/pwc.h b/drivers/usb/media/pwc/pwc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/usb/media/pwc/pwc.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,278 @@ +/* (C) 1999-2003 Nemosoft Unv. + (C) 2004 Luc Saillard (luc@saillard.org) + + NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx + driver and thus may have bugs that are not present in the original version. + Please send bug reports and support requests to . + The decompression routines have been implemented by reverse-engineering the + Nemosoft binary pwcx module. Caveat emptor. + + 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.2-unofficial" +#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/video/i810/i810_main.c b/drivers/video/i810/i810_main.c --- a/drivers/video/i810/i810_main.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/video/i810/i810_main.c 2005-03-07 14:54:16 -08:00 @@ -1591,40 +1591,41 @@ { struct i810fb_par *par = (struct i810fb_par *) info->par; int size; + struct agp_bridge_data *bridge; i810_fix_offsets(par); size = par->fb.size + par->iring.size; - if (agp_backend_acquire()) { + if (!(bridge = agp_backend_acquire(par->dev))) { printk("i810fb_alloc_fbmem: cannot acquire agpgart\n"); return -ENODEV; } if (!(par->i810_gtt.i810_fb_memory = - agp_allocate_memory(size >> 12, AGP_NORMAL_MEMORY))) { + agp_allocate_memory(bridge, size >> 12, AGP_NORMAL_MEMORY))) { printk("i810fb_alloc_fbmem: can't allocate framebuffer " "memory\n"); - agp_backend_release(); + agp_backend_release(bridge); return -ENOMEM; } if (agp_bind_memory(par->i810_gtt.i810_fb_memory, par->fb.offset)) { printk("i810fb_alloc_fbmem: can't bind framebuffer memory\n"); - agp_backend_release(); + agp_backend_release(bridge); return -EBUSY; } if (!(par->i810_gtt.i810_cursor_memory = - agp_allocate_memory(par->cursor_heap.size >> 12, + agp_allocate_memory(bridge, par->cursor_heap.size >> 12, AGP_PHYSICAL_MEMORY))) { printk("i810fb_alloc_cursormem: can't allocate" "cursor memory\n"); - agp_backend_release(); + agp_backend_release(bridge); return -ENOMEM; } if (agp_bind_memory(par->i810_gtt.i810_cursor_memory, par->cursor_heap.offset)) { printk("i810fb_alloc_cursormem: cannot bind cursor memory\n"); - agp_backend_release(); + agp_backend_release(bridge); return -EBUSY; } @@ -1632,7 +1633,7 @@ i810_fix_pointers(par); - agp_backend_release(); + agp_backend_release(bridge); return 0; } diff -Nru a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c --- a/drivers/video/intelfb/intelfbdrv.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/video/intelfb/intelfbdrv.c 2005-03-07 14:54:17 -08:00 @@ -470,6 +470,7 @@ struct agp_kern_info gtt_info; int agp_memtype; const char *s; + struct agp_bridge_data *bridge; DBG_MSG("intelfb_pci_register\n"); @@ -605,16 +606,16 @@ } /* Use agpgart to manage the GATT */ - if (agp_backend_acquire()) { + if (!(bridge = agp_backend_acquire(pdev))) { ERR_MSG("cannot acquire agp\n"); cleanup(dinfo); return -ENODEV; } /* get the current gatt info */ - if (agp_copy_info(>t_info)) { + if (agp_copy_info(bridge, >t_info)) { ERR_MSG("cannot get agp info\n"); - agp_backend_release(); + agp_backend_release(bridge); cleanup(dinfo); return -ENODEV; } @@ -637,17 +638,17 @@ /* Allocate memories (which aren't stolen) */ if (dinfo->accel) { if (!(dinfo->gtt_ring_mem = - agp_allocate_memory(dinfo->ring.size >> 12, + agp_allocate_memory(bridge, dinfo->ring.size >> 12, AGP_NORMAL_MEMORY))) { ERR_MSG("cannot allocate ring buffer memory\n"); - agp_backend_release(); + agp_backend_release(bridge); cleanup(dinfo); return -ENOMEM; } if (agp_bind_memory(dinfo->gtt_ring_mem, dinfo->ring.offset)) { ERR_MSG("cannot bind ring buffer memory\n"); - agp_backend_release(); + agp_backend_release(bridge); cleanup(dinfo); return -EBUSY; } @@ -661,17 +662,17 @@ agp_memtype = dinfo->mobile ? AGP_PHYSICAL_MEMORY : AGP_NORMAL_MEMORY; if (!(dinfo->gtt_cursor_mem = - agp_allocate_memory(dinfo->cursor.size >> 12, + agp_allocate_memory(bridge, dinfo->cursor.size >> 12, agp_memtype))) { ERR_MSG("cannot allocate cursor memory\n"); - agp_backend_release(); + agp_backend_release(bridge); cleanup(dinfo); return -ENOMEM; } if (agp_bind_memory(dinfo->gtt_cursor_mem, dinfo->cursor.offset)) { ERR_MSG("cannot bind cursor memory\n"); - agp_backend_release(); + agp_backend_release(bridge); cleanup(dinfo); return -EBUSY; } @@ -686,7 +687,7 @@ } if (dinfo->fbmem_gart) { if (!(dinfo->gtt_fb_mem = - agp_allocate_memory(dinfo->fb.size >> 12, + agp_allocate_memory(bridge, dinfo->fb.size >> 12, AGP_NORMAL_MEMORY))) { WRN_MSG("cannot allocate framebuffer memory - use " "the stolen one\n"); @@ -709,7 +710,7 @@ dinfo->fb_start = dinfo->fb.offset << 12; /* release agpgart */ - agp_backend_release(); + agp_backend_release(bridge); if (mtrr) set_mtrr(dinfo); diff -Nru a/drivers/video/offb.c b/drivers/video/offb.c --- a/drivers/video/offb.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/video/offb.c 2005-03-07 14:54:18 -08:00 @@ -29,6 +29,10 @@ #include #include +#ifdef CONFIG_PPC64 +#include +#endif + #ifdef CONFIG_PPC32 #include #endif @@ -322,7 +326,8 @@ int *pp, i; unsigned int len; int width = 640, height = 480, depth = 8, pitch; - unsigned *up, address; + unsigned *up; + unsigned long address; if ((pp = (int *) get_property(dp, "depth", &len)) != NULL && len == sizeof(int)) @@ -356,6 +361,10 @@ } address = (u_long) dp->addrs[i].address; + +#ifdef CONFIG_PPC64 + address += dp->phb->pci_mem_offset; +#endif /* kludge for valkyrie */ if (strcmp(dp->name, "valkyrie") == 0) diff -Nru a/drivers/w1/dscore.c b/drivers/w1/dscore.c --- a/drivers/w1/dscore.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/w1/dscore.c 2005-03-07 14:54:18 -08:00 @@ -45,9 +45,6 @@ int ds_reset(struct ds_device *, struct ds_status *); int ds_detect(struct ds_device *, struct ds_status *); int ds_stop_pulse(struct ds_device *, int); -int ds_send_data(struct ds_device *, unsigned char *, int); -int ds_recv_data(struct ds_device *, unsigned char *, int); -int ds_recv_status(struct ds_device *, struct ds_status *); struct ds_device * ds_get_device(void); void ds_put_device(struct ds_device *); @@ -148,7 +145,7 @@ return count; } -int ds_recv_status(struct ds_device *dev, struct ds_status *st) +static int ds_recv_status(struct ds_device *dev, struct ds_status *st) { unsigned char buf[64]; int count, err = 0, i; @@ -206,7 +203,7 @@ return err; } -int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size) +static int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size) { int count, err; struct ds_status st; @@ -234,7 +231,7 @@ return count; } -int ds_send_data(struct ds_device *dev, unsigned char *buf, int len) +static int ds_send_data(struct ds_device *dev, unsigned char *buf, int len) { int count, err; @@ -774,15 +771,19 @@ EXPORT_SYMBOL(ds_write_byte); EXPORT_SYMBOL(ds_write_bit); EXPORT_SYMBOL(ds_write_block); +EXPORT_SYMBOL(ds_reset); +EXPORT_SYMBOL(ds_get_device); +EXPORT_SYMBOL(ds_put_device); + +/* + * This functions can be used for EEPROM programming, + * when driver will be included into mainline this will + * require uncommenting. + */ +#if 0 EXPORT_SYMBOL(ds_start_pulse); EXPORT_SYMBOL(ds_set_speed); -EXPORT_SYMBOL(ds_reset); EXPORT_SYMBOL(ds_detect); EXPORT_SYMBOL(ds_stop_pulse); -EXPORT_SYMBOL(ds_send_data); -EXPORT_SYMBOL(ds_recv_data); -EXPORT_SYMBOL(ds_recv_status); EXPORT_SYMBOL(ds_search); -EXPORT_SYMBOL(ds_get_device); -EXPORT_SYMBOL(ds_put_device); - +#endif diff -Nru a/drivers/w1/dscore.h b/drivers/w1/dscore.h --- a/drivers/w1/dscore.h 2005-03-07 14:54:17 -08:00 +++ b/drivers/w1/dscore.h 2005-03-07 14:54:17 -08:00 @@ -161,9 +161,6 @@ int ds_reset(struct ds_device *, struct ds_status *); int ds_detect(struct ds_device *, struct ds_status *); int ds_stop_pulse(struct ds_device *, int); -int ds_send_data(struct ds_device *, unsigned char *, int); -int ds_recv_data(struct ds_device *, unsigned char *, int); -int ds_recv_status(struct ds_device *, struct ds_status *); struct ds_device * ds_get_device(void); void ds_put_device(struct ds_device *); int ds_write_block(struct ds_device *, u8 *, int); diff -Nru a/drivers/w1/matrox_w1.c b/drivers/w1/matrox_w1.c --- a/drivers/w1/matrox_w1.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/w1/matrox_w1.c 2005-03-07 14:54:17 -08:00 @@ -235,7 +235,7 @@ static int __init matrox_w1_init(void) { - return pci_module_init(&matrox_w1_pci_driver); + return pci_register_driver(&matrox_w1_pci_driver); } static void __exit matrox_w1_fini(void) diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c --- a/drivers/w1/w1.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/w1/w1.c 2005-03-07 14:54:16 -08:00 @@ -19,8 +19,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include - #include #include #include @@ -33,6 +31,8 @@ #include #include +#include + #include "w1.h" #include "w1_io.h" #include "w1_log.h" @@ -58,7 +58,6 @@ static pid_t control_thread; static int control_needs_exit; static DECLARE_COMPLETION(w1_control_complete); -static DECLARE_WAIT_QUEUE_HEAD(w1_control_wait); static int w1_master_match(struct device *dev, struct device_driver *drv) { @@ -100,7 +99,7 @@ return sprintf(buf, "No family registered.\n"); } -struct bus_type w1_bus_type = { +static struct bus_type w1_bus_type = { .name = "w1", .match = w1_master_match, }; @@ -138,7 +137,7 @@ .show = &w1_default_read_name, }; -ssize_t w1_master_attribute_show_name(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_name(struct device *dev, char *buf) { struct w1_master *md = container_of (dev, struct w1_master, dev); ssize_t count; @@ -153,7 +152,7 @@ return count; } -ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf) { struct w1_master *md = container_of(dev, struct w1_master, dev); ssize_t count; @@ -167,14 +166,14 @@ return count; } -ssize_t w1_master_attribute_show_timeout(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_timeout(struct device *dev, char *buf) { ssize_t count; count = sprintf(buf, "%d\n", w1_timeout); return count; } -ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf) { struct w1_master *md = container_of(dev, struct w1_master, dev); ssize_t count; @@ -188,7 +187,7 @@ return count; } -ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf) { struct w1_master *md = container_of(dev, struct w1_master, dev); ssize_t count; @@ -202,7 +201,7 @@ return count; } -ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf) { struct w1_master *md = container_of(dev, struct w1_master, dev); ssize_t count; @@ -216,7 +215,7 @@ return count; } -ssize_t w1_master_attribute_show_slaves(struct device *dev, char *buf) +static ssize_t w1_master_attribute_show_slaves(struct device *dev, char *buf) { struct w1_master *md = container_of(dev, struct w1_master, dev); @@ -649,7 +648,7 @@ struct w1_slave *sl; struct w1_master *dev; struct list_head *ent, *ment, *n, *mn; - int err, have_to_wait = 0, timeout; + int err, have_to_wait = 0; daemonize("w1_control"); allow_signal(SIGTERM); @@ -657,11 +656,8 @@ while (!control_needs_exit || have_to_wait) { have_to_wait = 0; - timeout = w1_timeout*HZ; - do { - timeout = interruptible_sleep_on_timeout(&w1_control_wait, timeout); - try_to_freeze(PF_FREEZE); - } while (!signal_pending(current) && (timeout > 0)); + try_to_freeze(PF_FREEZE); + msleep_interruptible(w1_timeout * 1000); if (signal_pending(current)) flush_signals(current); @@ -721,7 +717,6 @@ int w1_process(void *data) { struct w1_master *dev = (struct w1_master *) data; - unsigned long timeout; struct list_head *ent, *n; struct w1_slave *sl; @@ -729,11 +724,8 @@ allow_signal(SIGTERM); while (!dev->need_exit) { - timeout = w1_timeout*HZ; - do { - timeout = interruptible_sleep_on_timeout(&dev->kwait, timeout); - try_to_freeze(PF_FREEZE); - } while (!signal_pending(current) && (timeout > 0)); + try_to_freeze(PF_FREEZE); + msleep_interruptible(w1_timeout * 1000); if (signal_pending(current)) flush_signals(current); @@ -839,6 +831,3 @@ module_init(w1_init); module_exit(w1_fini); - -EXPORT_SYMBOL(w1_create_master_attributes); -EXPORT_SYMBOL(w1_destroy_master_attributes); diff -Nru a/drivers/w1/w1.h b/drivers/w1/w1.h --- a/drivers/w1/w1.h 2005-03-07 14:54:18 -08:00 +++ b/drivers/w1/w1.h 2005-03-07 14:54:18 -08:00 @@ -115,7 +115,6 @@ int need_exit; pid_t kpid; - wait_queue_head_t kwait; struct semaphore mutex; struct device_driver *driver; diff -Nru a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c --- a/drivers/w1/w1_family.c 2005-03-07 14:54:17 -08:00 +++ b/drivers/w1/w1_family.c 2005-03-07 14:54:17 -08:00 @@ -138,13 +138,13 @@ void __w1_family_get(struct w1_family *f) { + smp_mb__before_atomic_inc(); atomic_inc(&f->refcnt); + smp_mb__after_atomic_inc(); } EXPORT_SYMBOL(w1_family_get); EXPORT_SYMBOL(w1_family_put); -EXPORT_SYMBOL(__w1_family_get); -EXPORT_SYMBOL(__w1_family_put); EXPORT_SYMBOL(w1_family_registered); EXPORT_SYMBOL(w1_unregister_family); EXPORT_SYMBOL(w1_register_family); diff -Nru a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c --- a/drivers/w1/w1_int.c 2005-03-07 14:54:18 -08:00 +++ b/drivers/w1/w1_int.c 2005-03-07 14:54:18 -08:00 @@ -74,7 +74,6 @@ INIT_LIST_HEAD(&dev->slist); init_MUTEX(&dev->mutex); - init_waitqueue_head(&dev->kwait); init_completion(&dev->dev_released); init_completion(&dev->dev_exited); @@ -217,8 +216,5 @@ __w1_remove_master_device(dev); } -EXPORT_SYMBOL(w1_alloc_dev); -EXPORT_SYMBOL(w1_free_dev); EXPORT_SYMBOL(w1_add_master_device); EXPORT_SYMBOL(w1_remove_master_device); -EXPORT_SYMBOL(__w1_remove_master_device); diff -Nru a/drivers/w1/w1_therm.c b/drivers/w1/w1_therm.c --- a/drivers/w1/w1_therm.c 2005-03-07 14:54:16 -08:00 +++ b/drivers/w1/w1_therm.c 2005-03-07 14:54:16 -08:00 @@ -26,6 +26,7 @@ #include #include #include +#include #include "w1.h" #include "w1_io.h" @@ -103,6 +104,7 @@ int i, max_trying = 10; atomic_inc(&sl->refcnt); + smp_mb__after_atomic_inc(); if (down_interruptible(&sl->master->mutex)) { count = 0; goto out_dec; @@ -128,7 +130,7 @@ if (!w1_reset_bus (dev)) { int count = 0; u8 match[9] = {W1_MATCH_ROM, }; - unsigned long tm; + unsigned int tm = 750; memcpy(&match[1], (u64 *) & sl->reg_num, 8); @@ -136,11 +138,8 @@ w1_write_8(dev, W1_CONVERT_TEMP); - tm = jiffies + msecs_to_jiffies(750); - while(time_before(jiffies, tm)) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(tm-jiffies); - + while (tm) { + tm = msleep_interruptible(tm); if (signal_pending(current)) flush_signals(current); } @@ -181,6 +180,7 @@ out: up(&dev->mutex); out_dec: + smp_mb__before_atomic_inc(); atomic_dec(&sl->refcnt); return count; diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c 2005-03-07 14:54:17 -08:00 +++ b/fs/binfmt_elf.c 2005-03-07 14:54:17 -08:00 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -165,21 +166,14 @@ if (k_platform) { size_t len = strlen(k_platform) + 1; -#ifdef CONFIG_X86_HT /* * In some cases (e.g. Hyper-Threading), we want to avoid L1 * evictions by the processes running on the same package. One * thing we can do is to shuffle the initial stack for them. - * - * The conditionals here are unneeded, but kept in to make the - * code behaviour the same as pre change unless we have - * hyperthreaded processors. This should be cleaned up - * before 2.6 */ - if (smp_num_siblings > 1) - STACK_ALLOC(p, ((current->pid % 64) << 7)); -#endif + p = arch_align_stack(p); + u_platform = (elf_addr_t __user *)STACK_ALLOC(p, len); if (__copy_to_user(u_platform, k_platform, len)) return -EFAULT; @@ -501,6 +495,19 @@ #define INTERPRETER_ELF 2 +static unsigned long randomize_stack_top(unsigned long stack_top) +{ + unsigned int random_variable = 0; + + if (current->flags & PF_RANDOMIZE) + random_variable = get_random_int() % (8*1024*1024); +#ifdef CONFIG_STACK_GROWSUP + return PAGE_ALIGN(stack_top + random_variable); +#else + return PAGE_ALIGN(stack_top - random_variable); +#endif +} + static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) { struct file *interpreter = NULL; /* to shut gcc up */ @@ -760,18 +767,29 @@ if (elf_read_implies_exec(loc->elf_ex, executable_stack)) current->personality |= READ_IMPLIES_EXEC; + if ( !(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) + current->flags |= PF_RANDOMIZE; 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 = current->mm->mmap_base; - retval = setup_arg_pages(bprm, STACK_TOP, executable_stack); + retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP), + executable_stack); if (retval < 0) { send_sig(SIGKILL, current, 0); goto out_free_dentry; } +#ifdef ARCH_HAS_SETUP_ADDITIONAL_PAGES + retval = arch_setup_additional_pages(bprm, executable_stack); + if (retval < 0) { + send_sig(SIGKILL, current, 0); + goto out_free_dentry; + } +#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */ + current->mm->start_stack = bprm->p; /* Now we do a little grungy work by mmaping the ELF image into @@ -1585,7 +1603,7 @@ DUMP_SEEK (file->f_pos + PAGE_SIZE); } else { void *kaddr; - flush_cache_page(vma, addr); + flush_cache_page(vma, addr, page_to_pfn(page)); kaddr = kmap(page); if ((size += PAGE_SIZE) > limit || !dump_write(file, kaddr, diff -Nru a/fs/buffer.c b/fs/buffer.c --- a/fs/buffer.c 2005-03-07 14:54:17 -08:00 +++ b/fs/buffer.c 2005-03-07 14:54:17 -08:00 @@ -875,7 +875,7 @@ spin_unlock(&mapping->private_lock); if (!TestSetPageDirty(page)) { - spin_lock_irq(&mapping->tree_lock); + write_lock_irq(&mapping->tree_lock); if (page->mapping) { /* Race with truncate? */ if (!mapping->backing_dev_info->memory_backed) inc_page_state(nr_dirty); @@ -883,7 +883,7 @@ page_index(page), PAGECACHE_TAG_DIRTY); } - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); } diff -Nru a/fs/direct-io.c b/fs/direct-io.c --- a/fs/direct-io.c 2005-03-07 14:54:17 -08:00 +++ b/fs/direct-io.c 2005-03-07 14:54:17 -08:00 @@ -1206,7 +1206,8 @@ */ dio->lock_type = dio_lock_type; if (dio_lock_type != DIO_NO_LOCKING) { - if (rw == READ) { + /* watch out for a 0 len io from a tricksy fs */ + if (rw == READ && end > offset) { struct address_space *mapping; mapping = iocb->ki_filp->f_mapping; @@ -1214,7 +1215,9 @@ down(&inode->i_sem); reader_with_isem = 1; } - retval = filemap_write_and_wait(mapping); + + retval = filemap_write_and_wait_range(mapping, offset, + end - 1); if (retval) { kfree(dio); goto out; diff -Nru a/fs/exec.c b/fs/exec.c --- a/fs/exec.c 2005-03-07 14:54:16 -08:00 +++ b/fs/exec.c 2005-03-07 14:54:16 -08:00 @@ -328,7 +328,7 @@ } mm->rss++; lru_cache_add_active(page); - set_pte(pte, pte_mkdirty(pte_mkwrite(mk_pte( + set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte( page, vma->vm_page_prot)))); page_add_anon_rmap(page, vma, address); pte_unmap(pte); @@ -400,7 +400,8 @@ while (i < MAX_ARG_PAGES) bprm->page[i++] = NULL; #else - stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE; + stack_base = arch_align_stack(stack_top - MAX_ARG_PAGES*PAGE_SIZE); + stack_base = PAGE_ALIGN(stack_base); bprm->p += stack_base; mm->arg_start = bprm->p; arg_size = stack_top - (PAGE_MASK & (unsigned long) mm->arg_start); @@ -877,6 +878,7 @@ tcomm[i] = '\0'; set_task_comm(current, tcomm); + current->flags &= ~PF_RANDOMIZE; flush_thread(); if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || @@ -1191,8 +1193,8 @@ /* execve success */ security_bprm_free(bprm); - acct_update_integrals(); - update_mem_hiwater(); + acct_update_integrals(current); + update_mem_hiwater(current); kfree(bprm); return retval; } diff -Nru a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c --- a/fs/exportfs/expfs.c 2005-03-07 14:54:18 -08:00 +++ b/fs/exportfs/expfs.c 2005-03-07 14:54:18 -08:00 @@ -55,7 +55,7 @@ struct list_head *le, *head; struct dentry *toput = NULL; int noprogress; - + char nbuf[NAME_MAX+1]; /* * Attempt to find the inode. @@ -176,7 +176,6 @@ */ struct dentry *ppd; struct dentry *npd; - char nbuf[NAME_MAX+1]; down(&pd->d_inode->i_sem); ppd = CALL(nops,get_parent)(pd); @@ -241,7 +240,6 @@ /* if we weren't after a directory, have one more step to go */ if (result != target_dir) { struct dentry *nresult; - char nbuf[NAME_MAX+1]; err = CALL(nops,get_name)(target_dir, nbuf, result); if (!err) { down(&target_dir->d_inode->i_sem); diff -Nru a/fs/inode.c b/fs/inode.c --- a/fs/inode.c 2005-03-07 14:54:18 -08:00 +++ b/fs/inode.c 2005-03-07 14:54:18 -08:00 @@ -196,7 +196,7 @@ sema_init(&inode->i_sem, 1); init_rwsem(&inode->i_alloc_sem); INIT_RADIX_TREE(&inode->i_data.page_tree, GFP_ATOMIC); - spin_lock_init(&inode->i_data.tree_lock); + rwlock_init(&inode->i_data.tree_lock); spin_lock_init(&inode->i_data.i_mmap_lock); INIT_LIST_HEAD(&inode->i_data.private_list); spin_lock_init(&inode->i_data.private_lock); diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c --- a/fs/jfs/jfs_logmgr.c 2005-03-07 14:54:17 -08:00 +++ b/fs/jfs/jfs_logmgr.c 2005-03-07 14:54:17 -08:00 @@ -67,6 +67,7 @@ #include /* for sync_blockdev() */ #include #include +#include #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_metapage.h" @@ -1612,8 +1613,7 @@ */ if ((!list_empty(&log->cqueue)) || !list_empty(&log->synclist)) { for (i = 0; i < 800; i++) { /* Too much? */ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ / 4); + msleep(250); if (list_empty(&log->cqueue) && list_empty(&log->synclist)) break; diff -Nru a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c --- a/fs/jfs/jfs_metapage.c 2005-03-07 14:54:16 -08:00 +++ b/fs/jfs/jfs_metapage.c 2005-03-07 14:54:16 -08:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include "jfs_incore.h" #include "jfs_superblock.h" #include "jfs_filsys.h" @@ -242,14 +243,14 @@ mp = search_hash(hash_ptr, mapping, lblock); if (mp) { page_found: - mp->count++; - lock_metapage(mp); - spin_unlock(&meta_lock); if (test_bit(META_stale, &mp->flag)) { - release_metapage(mp); - yield(); /* Let other waiters release it, too */ + spin_unlock(&meta_lock); + msleep(1); goto again; } + mp->count++; + lock_metapage(mp); + spin_unlock(&meta_lock); if (test_bit(META_discard, &mp->flag)) { if (!new) { jfs_error(inode->i_sb, @@ -461,7 +462,6 @@ } if (mp->page) { - /* Releasing spinlock, we have to check mp->count later */ set_bit(META_stale, &mp->flag); spin_unlock(&meta_lock); kunmap(mp->page); @@ -498,12 +498,6 @@ list_del(&mp->synclist); LOGSYNC_UNLOCK(log); } - if (mp->count) { - /* Someone else is trying to get this metpage */ - unlock_metapage(mp); - spin_unlock(&meta_lock); - return; - } remove_from_hash(mp, meta_hash(mp->mapping, mp->index)); spin_unlock(&meta_lock); @@ -532,12 +526,8 @@ mp = search_hash(hash_ptr, mapping, lblock); if (mp) { if (test_bit(META_stale, &mp->flag)) { - /* Racing with release_metapage */ - mp->count++; - lock_metapage(mp); spin_unlock(&meta_lock); - /* racing release_metapage should be done now */ - release_metapage(mp); + msleep(1); goto again; } diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c --- a/fs/jfs/jfs_txnmgr.c 2005-03-07 14:54:17 -08:00 +++ b/fs/jfs/jfs_txnmgr.c 2005-03-07 14:54:17 -08:00 @@ -93,15 +93,15 @@ } TxStat; #endif -static int nTxBlock = 512; /* number of transaction blocks */ +static int nTxBlock = -1; /* number of transaction blocks */ module_param(nTxBlock, int, 0); MODULE_PARM_DESC(nTxBlock, - "Number of transaction blocks (default:512, max:65536)"); + "Number of transaction blocks (max:65536)"); -static int nTxLock = 4096; /* number of transaction locks */ +static int nTxLock = -1; /* number of transaction locks */ module_param(nTxLock, int, 0); MODULE_PARM_DESC(nTxLock, - "Number of transaction locks (default:4096, max:65536)"); + "Number of transaction locks (max:65536)"); struct tblock *TxBlock; /* transaction block table */ static int TxLockLWM; /* Low water mark for number of txLocks used */ @@ -124,6 +124,7 @@ DECLARE_WAIT_QUEUE_HEAD(jfs_sync_thread_wait); DECLARE_WAIT_QUEUE_HEAD(jfs_commit_thread_wait); +static int jfs_commit_thread_waking; /* * Retry logic exist outside these macros to protect from spurrious wakeups. @@ -249,6 +250,25 @@ int txInit(void) { int k, size; + struct sysinfo si; + + /* Set defaults for nTxLock and nTxBlock if unset */ + + if (nTxLock == -1) { + if (nTxBlock == -1) { + /* Base default on memory size */ + si_meminfo(&si); + if (si.totalram > (256 * 1024)) /* 1 GB */ + nTxLock = 64 * 1024; + else + nTxLock = si.totalram >> 2; + } else if (nTxBlock > (8 * 1024)) + nTxLock = 64 * 1024; + else + nTxLock = nTxBlock << 3; + } + if (nTxBlock == -1) + nTxBlock = nTxLock >> 3; /* Verify tunable parameters */ if (nTxBlock < 16) @@ -259,6 +279,9 @@ nTxLock = 256; /* No one should set it this low */ if (nTxLock > 65536) nTxLock = 65536; + + printk(KERN_INFO "JFS: nTxBlock = %d, nTxLock = %d\n", + nTxBlock, nTxLock); /* * initialize transaction block (tblock) table * @@ -266,8 +289,8 @@ * tid = 0 is reserved. */ TxLockLWM = (nTxLock * 4) / 10; - TxLockHWM = (nTxLock * 8) / 10; - TxLockVHWM = (nTxLock * 9) / 10; + TxLockHWM = (nTxLock * 7) / 10; + TxLockVHWM = (nTxLock * 8) / 10; size = sizeof(struct tblock) * nTxBlock; TxBlock = (struct tblock *) vmalloc(size); @@ -2732,6 +2755,7 @@ do { LAZY_LOCK(flags); + jfs_commit_thread_waking = 0; /* OK to wake another thread */ while (!list_empty(&TxAnchor.unlock_queue)) { WorkDone = 0; list_for_each_entry(tblk, &TxAnchor.unlock_queue, @@ -2804,10 +2828,13 @@ list_add_tail(&tblk->cqueue, &TxAnchor.unlock_queue); /* * Don't wake up a commit thread if there is already one servicing - * this superblock. + * this superblock, or if the last one we woke up hasn't started yet. */ - if (!(JFS_SBI(tblk->sb)->commit_state & IN_LAZYCOMMIT)) + if (!(JFS_SBI(tblk->sb)->commit_state & IN_LAZYCOMMIT) && + !jfs_commit_thread_waking) { + jfs_commit_thread_waking = 1; wake_up(&jfs_commit_thread_wait); + } LAZY_UNLOCK(flags); } diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c --- a/fs/jfs/super.c 2005-03-07 14:54:17 -08:00 +++ b/fs/jfs/super.c 2005-03-07 14:54:17 -08:00 @@ -235,7 +235,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, int *flag) { - void *nls_map = NULL; + void *nls_map = (void *)-1; /* -1: no change; NULL: none */ char *p; struct jfs_sb_info *sbi = JFS_SBI(sb); @@ -263,12 +263,17 @@ /* Don't do anything ;-) */ break; case Opt_iocharset: - if (nls_map) /* specified iocharset twice! */ + if (nls_map && nls_map != (void *) -1) unload_nls(nls_map); - nls_map = load_nls(args[0].from); - if (!nls_map) { - printk(KERN_ERR "JFS: charset not found\n"); - goto cleanup; + if (!strcmp(args[0].from, "none")) + nls_map = NULL; + else { + nls_map = load_nls(args[0].from); + if (!nls_map) { + printk(KERN_ERR + "JFS: charset not found\n"); + goto cleanup; + } } break; case Opt_resize: @@ -318,7 +323,7 @@ } } - if (nls_map) { + if (nls_map != (void *) -1) { /* Discard old (if remount) */ if (sbi->nls_tab) unload_nls(sbi->nls_tab); @@ -327,7 +332,7 @@ return 1; cleanup: - if (nls_map) + if (nls_map && nls_map != (void *) -1) unload_nls(nls_map); return 0; } @@ -622,7 +627,7 @@ if (commit_threads < 1) commit_threads = num_online_cpus(); - else if (commit_threads > MAX_COMMIT_THREADS) + if (commit_threads > MAX_COMMIT_THREADS) commit_threads = MAX_COMMIT_THREADS; for (i = 0; i < commit_threads; i++) { diff -Nru a/fs/lockd/svc.c b/fs/lockd/svc.c --- a/fs/lockd/svc.c 2005-03-07 14:54:17 -08:00 +++ b/fs/lockd/svc.c 2005-03-07 14:54:17 -08:00 @@ -403,6 +403,38 @@ return 0; \ } +static inline int is_callback(u32 proc) +{ + return proc == NLMPROC_GRANTED + || proc == NLMPROC_GRANTED_MSG + || proc == NLMPROC_TEST_RES + || proc == NLMPROC_LOCK_RES + || proc == NLMPROC_CANCEL_RES + || proc == NLMPROC_UNLOCK_RES + || proc == NLMPROC_NSM_NOTIFY; +} + + +static int lockd_authenticate(struct svc_rqst *rqstp) +{ + rqstp->rq_client = NULL; + switch (rqstp->rq_authop->flavour) { + case RPC_AUTH_NULL: + case RPC_AUTH_UNIX: + if (rqstp->rq_proc == 0) + return SVC_OK; + if (is_callback(rqstp->rq_proc)) { + /* Leave it to individual procedures to + * call nlmsvc_lookup_host(rqstp) + */ + return SVC_OK; + } + return svc_set_client(rqstp); + } + return SVC_DENIED; +} + + param_set_min_max(port, int, simple_strtol, 0, 65535) param_set_min_max(grace_period, unsigned long, simple_strtoul, nlm_grace_period_min, nlm_grace_period_max) @@ -483,4 +515,5 @@ .pg_name = "lockd", /* service name */ .pg_class = "nfsd", /* share authentication with nfsd */ .pg_stats = &nlmsvc_stats, /* stats table */ + .pg_authenticate = &lockd_authenticate /* export authentication */ }; diff -Nru a/fs/nfs/callback.c b/fs/nfs/callback.c --- a/fs/nfs/callback.c 2005-03-07 14:54:17 -08:00 +++ b/fs/nfs/callback.c 2005-03-07 14:54:17 -08:00 @@ -139,133 +139,10 @@ return ret; } -/* - * AUTH_NULL authentication - */ -static int nfs_callback_null_accept(struct svc_rqst *rqstp, u32 *authp) -{ - struct kvec *argv = &rqstp->rq_arg.head[0]; - struct kvec *resv = &rqstp->rq_res.head[0]; - - if (argv->iov_len < 3*4) - return SVC_GARBAGE; - - if (svc_getu32(argv) != 0) { - dprintk("svc: bad null cred\n"); - *authp = rpc_autherr_badcred; - return SVC_DENIED; - } - if (svc_getu32(argv) != RPC_AUTH_NULL || svc_getu32(argv) != 0) { - dprintk("svc: bad null verf\n"); - *authp = rpc_autherr_badverf; - return SVC_DENIED; - } - - /* Signal that mapping to nobody uid/gid is required */ - rqstp->rq_cred.cr_uid = (uid_t) -1; - rqstp->rq_cred.cr_gid = (gid_t) -1; - rqstp->rq_cred.cr_group_info = groups_alloc(0); - if (rqstp->rq_cred.cr_group_info == NULL) - return SVC_DROP; /* kmalloc failure - client must retry */ - - /* Put NULL verifier */ - svc_putu32(resv, RPC_AUTH_NULL); - svc_putu32(resv, 0); - dprintk("%s: success, returning %d!\n", __FUNCTION__, SVC_OK); - return SVC_OK; -} - -static int nfs_callback_null_release(struct svc_rqst *rqstp) -{ - if (rqstp->rq_cred.cr_group_info) - put_group_info(rqstp->rq_cred.cr_group_info); - rqstp->rq_cred.cr_group_info = NULL; - return 0; /* don't drop */ -} - -static struct auth_ops nfs_callback_auth_null = { - .name = "null", - .flavour = RPC_AUTH_NULL, - .accept = nfs_callback_null_accept, - .release = nfs_callback_null_release, -}; - -/* - * AUTH_SYS authentication - */ -static int nfs_callback_unix_accept(struct svc_rqst *rqstp, u32 *authp) -{ - struct kvec *argv = &rqstp->rq_arg.head[0]; - struct kvec *resv = &rqstp->rq_res.head[0]; - struct svc_cred *cred = &rqstp->rq_cred; - u32 slen, i; - int len = argv->iov_len; - - dprintk("%s: start\n", __FUNCTION__); - cred->cr_group_info = NULL; - rqstp->rq_client = NULL; - if ((len -= 3*4) < 0) - return SVC_GARBAGE; - - /* Get length, time stamp and machine name */ - svc_getu32(argv); - svc_getu32(argv); - slen = XDR_QUADLEN(ntohl(svc_getu32(argv))); - if (slen > 64 || (len -= (slen + 3)*4) < 0) - goto badcred; - argv->iov_base = (void*)((u32*)argv->iov_base + slen); - argv->iov_len -= slen*4; - - cred->cr_uid = ntohl(svc_getu32(argv)); - cred->cr_gid = ntohl(svc_getu32(argv)); - slen = ntohl(svc_getu32(argv)); - if (slen > 16 || (len -= (slen + 2)*4) < 0) - goto badcred; - cred->cr_group_info = groups_alloc(slen); - if (cred->cr_group_info == NULL) - return SVC_DROP; - for (i = 0; i < slen; i++) - GROUP_AT(cred->cr_group_info, i) = ntohl(svc_getu32(argv)); - - if (svc_getu32(argv) != RPC_AUTH_NULL || svc_getu32(argv) != 0) { - *authp = rpc_autherr_badverf; - return SVC_DENIED; - } - /* Put NULL verifier */ - svc_putu32(resv, RPC_AUTH_NULL); - svc_putu32(resv, 0); - dprintk("%s: success, returning %d!\n", __FUNCTION__, SVC_OK); - return SVC_OK; -badcred: - *authp = rpc_autherr_badcred; - return SVC_DENIED; -} - -static int nfs_callback_unix_release(struct svc_rqst *rqstp) -{ - if (rqstp->rq_cred.cr_group_info) - put_group_info(rqstp->rq_cred.cr_group_info); - rqstp->rq_cred.cr_group_info = NULL; - return 0; -} - -static struct auth_ops nfs_callback_auth_unix = { - .name = "unix", - .flavour = RPC_AUTH_UNIX, - .accept = nfs_callback_unix_accept, - .release = nfs_callback_unix_release, -}; - -/* - * Hook the authentication protocol - */ -static int nfs_callback_auth(struct svc_rqst *rqstp, u32 *authp) +static int nfs_callback_authenticate(struct svc_rqst *rqstp) { struct in_addr *addr = &rqstp->rq_addr.sin_addr; struct nfs4_client *clp; - struct kvec *argv = &rqstp->rq_arg.head[0]; - int flavour; - int retval; /* Don't talk to strangers */ clp = nfs4_find_client(addr); @@ -273,34 +150,19 @@ return SVC_DROP; dprintk("%s: %u.%u.%u.%u NFSv4 callback!\n", __FUNCTION__, NIPQUAD(addr)); nfs4_put_client(clp); - flavour = ntohl(svc_getu32(argv)); - switch(flavour) { + switch (rqstp->rq_authop->flavour) { case RPC_AUTH_NULL: - if (rqstp->rq_proc != CB_NULL) { - *authp = rpc_autherr_tooweak; - retval = SVC_DENIED; - break; - } - rqstp->rq_authop = &nfs_callback_auth_null; - retval = nfs_callback_null_accept(rqstp, authp); + if (rqstp->rq_proc != CB_NULL) + return SVC_DENIED; break; case RPC_AUTH_UNIX: - /* Eat the authentication flavour */ - rqstp->rq_authop = &nfs_callback_auth_unix; - retval = nfs_callback_unix_accept(rqstp, authp); break; + case RPC_AUTH_GSS: + /* FIXME: RPCSEC_GSS handling? */ default: - /* FIXME: need to add RPCSEC_GSS upcalls */ -#if 0 - svc_ungetu32(argv); - retval = svc_authenticate(rqstp, authp); -#else - *authp = rpc_autherr_rejectedcred; - retval = SVC_DENIED; -#endif + return SVC_DENIED; } - dprintk("%s: flavour %d returning error %d\n", __FUNCTION__, flavour, retval); - return retval; + return SVC_OK; } /* @@ -321,5 +183,5 @@ .pg_name = "NFSv4 callback", /* service name */ .pg_class = "nfs", /* authentication class */ .pg_stats = &nfs4_callback_stats, - .pg_authenticate = nfs_callback_auth, + .pg_authenticate = nfs_callback_authenticate, }; diff -Nru a/fs/nfsd/export.c b/fs/nfsd/export.c --- a/fs/nfsd/export.c 2005-03-07 14:54:17 -08:00 +++ b/fs/nfsd/export.c 2005-03-07 14:54:17 -08:00 @@ -79,9 +79,9 @@ } } -void expkey_request(struct cache_detail *cd, - struct cache_head *h, - char **bpp, int *blen) +static void expkey_request(struct cache_detail *cd, + struct cache_head *h, + char **bpp, int *blen) { /* client fsidtype \xfsid */ struct svc_expkey *ek = container_of(h, struct svc_expkey, h); @@ -95,7 +95,7 @@ } static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *, int); -int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) +static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) { /* client fsidtype fsid [path] */ char *buf; @@ -284,9 +284,9 @@ } } -void svc_export_request(struct cache_detail *cd, - struct cache_head *h, - char **bpp, int *blen) +static void svc_export_request(struct cache_detail *cd, + struct cache_head *h, + char **bpp, int *blen) { /* client path */ struct svc_export *exp = container_of(h, struct svc_export, h); @@ -340,7 +340,7 @@ } -int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) +static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) { /* client path expiry [flags anonuid anongid fsid] */ char *buf; @@ -510,8 +510,8 @@ return ek; } -int exp_set_key(svc_client *clp, int fsid_type, u32 *fsidv, - struct svc_export *exp) +static int exp_set_key(svc_client *clp, int fsid_type, u32 *fsidv, + struct svc_export *exp) { struct svc_expkey key, *ek; @@ -999,7 +999,7 @@ exp_readunlock(); } -struct flags { +static struct flags { int flag; char *name[2]; } expflags[] = { diff -Nru a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c --- a/fs/nfsd/lockd.c 2005-03-07 14:54:18 -08:00 +++ b/fs/nfsd/lockd.c 2005-03-07 14:54:18 -08:00 @@ -60,7 +60,7 @@ fput(filp); } -struct nlmsvc_binding nfsd_nlm_ops = { +static struct nlmsvc_binding nfsd_nlm_ops = { .fopen = nlm_fopen, /* open file for locking */ .fclose = nlm_fclose, /* close file */ }; diff -Nru a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c --- a/fs/nfsd/nfs3xdr.c 2005-03-07 14:54:16 -08:00 +++ b/fs/nfsd/nfs3xdr.c 2005-03-07 14:54:16 -08:00 @@ -801,6 +801,11 @@ if (isdotent(name, namlen)) { if (namlen == 2) { dchild = dget_parent(dparent); + if (dchild == dparent) { + /* filesystem root - cannot return filehandle for ".." */ + dput(dchild); + return 1; + } } else dchild = dget(dparent); } else diff -Nru a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c --- a/fs/nfsd/nfscache.c 2005-03-07 14:54:18 -08:00 +++ b/fs/nfsd/nfscache.c 2005-03-07 14:54:18 -08:00 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -30,15 +31,8 @@ #define HASHSIZE 64 #define REQHASH(xid) ((((xid) >> 24) ^ (xid)) & (HASHSIZE-1)) -struct nfscache_head { - struct svc_cacherep * next; - struct svc_cacherep * prev; -}; - -static struct nfscache_head * hash_list; -static struct svc_cacherep * lru_head; -static struct svc_cacherep * lru_tail; -static struct svc_cacherep * nfscache; +static struct hlist_head * hash_list; +static struct list_head lru_head; static int cache_disabled = 1; static int nfsd_cache_append(struct svc_rqst *rqstp, struct kvec *vec); @@ -54,46 +48,32 @@ nfsd_cache_init(void) { struct svc_cacherep *rp; - struct nfscache_head *rh; - size_t i; - unsigned long order; + int i; - - i = CACHESIZE * sizeof (struct svc_cacherep); - for (order = 0; (PAGE_SIZE << order) < i; order++) - ; - nfscache = (struct svc_cacherep *) - __get_free_pages(GFP_KERNEL, order); - if (!nfscache) { - printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for reply cache\n", i); - return; + INIT_LIST_HEAD(&lru_head); + i = CACHESIZE; + while(i) { + rp = kmalloc(sizeof(*rp), GFP_KERNEL); + if (!rp) break; + list_add(&rp->c_lru, &lru_head); + rp->c_state = RC_UNUSED; + rp->c_type = RC_NOCACHE; + INIT_HLIST_NODE(&rp->c_hash); + i--; } - memset(nfscache, 0, i); - i = HASHSIZE * sizeof (struct nfscache_head); - hash_list = kmalloc (i, GFP_KERNEL); + if (i) + printk (KERN_ERR "nfsd: cannot allocate all %d cache entries, only got %d\n", + CACHESIZE, CACHESIZE-i); + + hash_list = kmalloc (HASHSIZE * sizeof(struct hlist_head), GFP_KERNEL); if (!hash_list) { - free_pages ((unsigned long)nfscache, order); - nfscache = NULL; - printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for hash list\n", i); + nfsd_cache_shutdown(); + printk (KERN_ERR "nfsd: cannot allocate %Zd bytes for hash list\n", + HASHSIZE * sizeof(struct hlist_head)); return; } - - for (i = 0, rh = hash_list; i < HASHSIZE; i++, rh++) - rh->next = rh->prev = (struct svc_cacherep *) rh; - - for (i = 0, rp = nfscache; i < CACHESIZE; i++, rp++) { - rp->c_state = RC_UNUSED; - rp->c_type = RC_NOCACHE; - rp->c_hash_next = - rp->c_hash_prev = rp; - rp->c_lru_next = rp + 1; - rp->c_lru_prev = rp - 1; - } - lru_head = nfscache; - lru_tail = nfscache + CACHESIZE - 1; - lru_head->c_lru_prev = NULL; - lru_tail->c_lru_next = NULL; + memset(hash_list, 0, HASHSIZE * sizeof(struct hlist_head)); cache_disabled = 0; } @@ -102,48 +82,30 @@ nfsd_cache_shutdown(void) { struct svc_cacherep *rp; - size_t i; - unsigned long order; - for (rp = lru_head; rp; rp = rp->c_lru_next) { + while (!list_empty(&lru_head)) { + rp = list_entry(lru_head.next, struct svc_cacherep, c_lru); if (rp->c_state == RC_DONE && rp->c_type == RC_REPLBUFF) kfree(rp->c_replvec.iov_base); + list_del(&rp->c_lru); + kfree(rp); } cache_disabled = 1; - i = CACHESIZE * sizeof (struct svc_cacherep); - for (order = 0; (PAGE_SIZE << order) < i; order++) - ; - free_pages ((unsigned long)nfscache, order); - nfscache = NULL; - kfree (hash_list); + if (hash_list) + kfree (hash_list); hash_list = NULL; } /* - * Move cache entry to front of LRU list + * Move cache entry to end of LRU list */ static void -lru_put_front(struct svc_cacherep *rp) +lru_put_end(struct svc_cacherep *rp) { - struct svc_cacherep *prev = rp->c_lru_prev, - *next = rp->c_lru_next; - - if (prev) - prev->c_lru_next = next; - else - lru_head = next; - if (next) - next->c_lru_prev = prev; - else - lru_tail = prev; - - rp->c_lru_next = lru_head; - rp->c_lru_prev = NULL; - if (lru_head) - lru_head->c_lru_prev = rp; - lru_head = rp; + list_del(&rp->c_lru); + list_add_tail(&rp->c_lru, &lru_head); } /* @@ -152,17 +114,8 @@ static void hash_refile(struct svc_cacherep *rp) { - struct svc_cacherep *prev = rp->c_hash_prev, - *next = rp->c_hash_next; - struct nfscache_head *head = hash_list + REQHASH(rp->c_xid); - - prev->c_hash_next = next; - next->c_hash_prev = prev; - - rp->c_hash_next = head->next; - rp->c_hash_prev = (struct svc_cacherep *) head; - head->next->c_hash_prev = rp; - head->next = rp; + hlist_del_init(&rp->c_hash); + hlist_add_head(&rp->c_hash, hash_list + REQHASH(rp->c_xid)); } /* @@ -173,7 +126,9 @@ int nfsd_cache_lookup(struct svc_rqst *rqstp, int type) { - struct svc_cacherep *rh, *rp; + struct hlist_node *hn; + struct hlist_head *rh; + struct svc_cacherep *rp; u32 xid = rqstp->rq_xid, proto = rqstp->rq_prot, vers = rqstp->rq_vers, @@ -190,8 +145,8 @@ spin_lock(&cache_lock); rtn = RC_DOIT; - rp = rh = (struct svc_cacherep *) &hash_list[REQHASH(xid)]; - while ((rp = rp->c_hash_next) != rh) { + rh = &hash_list[REQHASH(xid)]; + hlist_for_each_entry(rp, hn, rh, c_hash) { if (rp->c_state != RC_UNUSED && xid == rp->c_xid && proc == rp->c_proc && proto == rp->c_prot && vers == rp->c_vers && @@ -206,7 +161,7 @@ /* This loop shouldn't take more than a few iterations normally */ { int safe = 0; - for (rp = lru_tail; rp; rp = rp->c_lru_prev) { + list_for_each_entry(rp, &lru_head, c_lru) { if (rp->c_state != RC_INPROG) break; if (safe++ > CACHESIZE) { @@ -254,7 +209,7 @@ /* We found a matching entry which is either in progress or done. */ age = jiffies - rp->c_timestamp; rp->c_timestamp = jiffies; - lru_put_front(rp); + lru_put_end(rp); rtn = RC_DROPIT; /* Request being processed or excessive rexmits */ @@ -343,7 +298,7 @@ break; } spin_lock(&cache_lock); - lru_put_front(rp); + lru_put_end(rp); rp->c_secure = rqstp->rq_secure; rp->c_type = cachetype; rp->c_state = RC_DONE; diff -Nru a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c --- a/fs/nfsd/nfsfh.c 2005-03-07 14:54:16 -08:00 +++ b/fs/nfsd/nfsfh.c 2005-03-07 14:54:16 -08:00 @@ -41,7 +41,7 @@ * if not, require that we can walk up to exp->ex_dentry * doing some checks on the 'x' bits */ -int nfsd_acceptable(void *expv, struct dentry *dentry) +static int nfsd_acceptable(void *expv, struct dentry *dentry) { struct svc_export *exp = expv; int rv; @@ -280,8 +280,8 @@ * an inode. In this case a call to fh_update should be made * before the fh goes out on the wire ... */ -inline int _fh_update(struct dentry *dentry, struct svc_export *exp, - __u32 *datap, int *maxsize) +static inline int _fh_update(struct dentry *dentry, struct svc_export *exp, + __u32 *datap, int *maxsize) { struct export_operations *nop = exp->ex_mnt->mnt_sb->s_export_op; @@ -297,8 +297,9 @@ /* * for composing old style file handles */ -inline void _fh_update_old(struct dentry *dentry, struct svc_export *exp, - struct knfsd_fh *fh) +static inline void _fh_update_old(struct dentry *dentry, + struct svc_export *exp, + struct knfsd_fh *fh) { fh->ofh_ino = ino_t_to_u32(dentry->d_inode->i_ino); fh->ofh_generation = dentry->d_inode->i_generation; diff -Nru a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c --- a/fs/nfsd/nfssvc.c 2005-03-07 14:54:17 -08:00 +++ b/fs/nfsd/nfssvc.c 2005-03-07 14:54:17 -08:00 @@ -60,7 +60,7 @@ struct list_head list; struct task_struct *task; }; -struct list_head nfsd_list = LIST_HEAD_INIT(nfsd_list); +static struct list_head nfsd_list = LIST_HEAD_INIT(nfsd_list); /* * Maximum number of nfsd processes @@ -378,4 +378,6 @@ .pg_name = "nfsd", /* program name */ .pg_class = "nfsd", /* authentication class */ .pg_stats = &nfsd_svcstats, /* version table */ + .pg_authenticate = &svc_set_client, /* export authentication */ + }; diff -Nru a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c --- a/fs/nfsd/vfs.c 2005-03-07 14:54:16 -08:00 +++ b/fs/nfsd/vfs.c 2005-03-07 14:54:16 -08:00 @@ -707,8 +707,8 @@ * As this calls fsync (not fdatasync) there is no need for a write_inode * after it. */ -inline void nfsd_dosync(struct file *filp, struct dentry *dp, - struct file_operations *fop) +static inline void nfsd_dosync(struct file *filp, struct dentry *dp, + struct file_operations *fop) { struct inode *inode = dp->d_inode; int (*fsync) (struct file *, struct dentry *, int); @@ -720,7 +720,7 @@ } -void +static void nfsd_sync(struct file *filp) { struct inode *inode = filp->f_dentry->d_inode; @@ -730,7 +730,7 @@ up(&inode->i_sem); } -void +static void nfsd_sync_dir(struct dentry *dp) { nfsd_dosync(NULL, dp, dp->d_inode->i_fop); diff -Nru a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h --- a/include/asm-alpha/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-alpha/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -8,7 +8,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h --- a/include/asm-alpha/pci.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-alpha/pci.h 2005-03-07 14:54:18 -08:00 @@ -228,17 +228,10 @@ #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index -static inline int -pci_name_bus(char *name, struct pci_bus *bus) +static inline int pci_proc_domain(struct pci_bus *bus) { struct pci_controller *hose = bus->sysdata; - - if (likely(hose->need_domain_info == 0)) { - sprintf(name, "%02x", bus->number); - } else { - sprintf(name, "%04x:%02x", hose->index, bus->number); - } - return 0; + return hose->need_domain_info; } static inline void diff -Nru a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h --- a/include/asm-alpha/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-alpha/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -22,6 +22,7 @@ * hook is made available. */ #define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval)) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) /* PMD_SHIFT determines the size of the area a second-level page table can map */ #define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3)) @@ -235,7 +236,10 @@ extern inline int pte_none(pte_t pte) { return !pte_val(pte); } extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_VALID; } -extern inline void pte_clear(pte_t *ptep) { pte_val(*ptep) = 0; } +extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) +{ + pte_val(*ptep) = 0; +} extern inline int pmd_none(pmd_t pmd) { return !pmd_val(pmd); } extern inline int pmd_bad(pmd_t pmd) { return (pmd_val(pmd) & ~_PFN_MASK) != _PAGE_TABLE; } diff -Nru a/include/asm-alpha/system.h b/include/asm-alpha/system.h --- a/include/asm-alpha/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-alpha/system.h 2005-03-07 14:54:17 -08:00 @@ -621,4 +621,6 @@ #endif /* __ASSEMBLY__ */ +#define arch_align_stack(x) (x) + #endif diff -Nru a/include/asm-arm/arch-ixp2000/entry-macro.S b/include/asm-arm/arch-ixp2000/entry-macro.S --- a/include/asm-arm/arch-ixp2000/entry-macro.S 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-ixp2000/entry-macro.S 2005-03-07 14:54:18 -08:00 @@ -15,8 +15,7 @@ mov \irqnr, #0x0 @clear out irqnr as default mov \base, #0xfe000000 - orr \base, \base, #0x00ff0000 - orr \base, \base, #0x0000a000 + orr \base, \base, #0x00e00000 orr \base, \base, #0x08 ldr \irqstat, [\base] @ get interrupts @@ -35,8 +34,8 @@ bne 1001f mov \base, #0xfe000000 - orr \base, \base, #0x00fd0000 - orr \base, \base, #0x0000e100 + orr \base, \base, #0x00c00000 + orr \base, \base, #0x00000100 orr \base, \base, #0x00000058 ldr \irqstat, [\base] diff -Nru a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h --- a/include/asm-arm/arch-ixp2000/io.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-ixp2000/io.h 2005-03-07 14:54:16 -08:00 @@ -27,8 +27,8 @@ * IXP2000 does not do proper byte-lane conversion for PCI addresses, * so we need to override standard functions. */ -#define alignb(addr) (((unsigned long)addr & ~3) + (3 - ((unsigned long)addr & 3))) -#define alignw(addr) (((unsigned long)addr & ~2) + (2 - ((unsigned long)addr & 2))) +#define alignb(addr) (void __iomem *)(((unsigned long)addr & ~3) + (3 - ((unsigned long)addr & 3))) +#define alignw(addr) (void __iomem *)(((unsigned long)addr & ~2) + (2 - ((unsigned long)addr & 2))) #define outb(v,p) __raw_writeb(v,alignb(___io(p))) #define outw(v,p) __raw_writew((v),alignw(___io(p))) diff -Nru a/include/asm-arm/arch-ixp2000/ixdp2x00.h b/include/asm-arm/arch-ixp2000/ixdp2x00.h --- a/include/asm-arm/arch-ixp2000/ixdp2x00.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixdp2x00.h 2005-03-07 14:54:16 -08:00 @@ -21,7 +21,7 @@ * On board CPLD memory map */ #define IXDP2X00_PHYS_CPLD_BASE 0xc7000000 -#define IXDP2X00_VIRT_CPLD_BASE 0xfefdd000 +#define IXDP2X00_VIRT_CPLD_BASE 0xfafff000 #define IXDP2X00_CPLD_SIZE 0x00001000 diff -Nru a/include/asm-arm/arch-ixp2000/ixdp2x01.h b/include/asm-arm/arch-ixp2000/ixdp2x01.h --- a/include/asm-arm/arch-ixp2000/ixdp2x01.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixdp2x01.h 2005-03-07 14:54:16 -08:00 @@ -18,10 +18,10 @@ #define __IXDP2X01_H__ #define IXDP2X01_PHYS_CPLD_BASE 0xc6024000 -#define IXDP2X01_VIRT_CPLD_BASE 0xfefdd000 -#define IXDP2X01_CPLD_REGION_SIZE 0x1000 +#define IXDP2X01_VIRT_CPLD_BASE 0xfafff000 +#define IXDP2X01_CPLD_REGION_SIZE 0x00001000 -#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile u32*)(IXDP2X01_VIRT_CPLD_BASE | reg) +#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg) #define IXDP2X01_CPLD_PHYS_REG(reg) (volatile u32*)(IXDP2X01_PHYS_CPLD_BASE | reg) #define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40) diff -Nru a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h 2005-03-07 14:54:16 -08:00 @@ -19,41 +19,49 @@ #define _IXP2000_REGS_H_ /* - * Static I/O regions. The manual defines each region as being several - * MB in size, but all the registers are within the first 4K, so there's - * no purpose in mapping the whole region in. + * Static I/O regions. + * + * Most of the registers are clumped in 4K regions spread throughout + * the 0xc000000 -> 0xc0100000 address range, but we just map in + * the whole range using a single 1 MB section instead of small + * 4K pages. This has two advantages for us: + * + * 1) We use only one TLB entry for large number of on-chip I/O devices. + * + * 2) We can easily set the Section attributes to XCB=101 on the IXP2400 + * as required per erratum #66. + * + * CAP stands for CSR Access Proxy */ -#define IXP2000_SLOWPORT_CSR_PHYS_BASE 0xc0080000 -#define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfefff000 -#define IXP2000_SLOWPORT_CSR_SIZE 0x1000 - -#define IXP2000_GLOBAL_REG_PHYS_BASE 0xc0004000 -#define IXP2000_GLOBAL_REG_VIRT_BASE 0xfeffe000 -#define IXP2000_GLOBAL_REG_SIZE 0x1000 +#define IXP2000_CAP_PHYS_BASE 0xc0000000 +#define IXP2000_CAP_VIRT_BASE 0xfef00000 +#define IXP2000_CAP_SIZE 0x00100000 + +/* + * Addresses for specific on-chip peripherals + */ +#define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 +#define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 #define IXP2000_UART_PHYS_BASE 0xc0030000 #define IXP2000_UART_VIRT_BASE 0xfef30000 -#define IXP2000_UART_SIZE 0x1000 - -#define IXP2000_TIMER_PHYS_BASE 0xc0020000 -#define IXP2000_TIMER_VIRT_BASE 0xfeffc000 -#define IXP2000_TIMER_SIZE 0x1000 - -#define IXP2000_GPIO_PHYS_BASE 0xc0010000 -#define IXP2000_GPIO_VIRT_BASE 0xfeffb000 -#define IXP2000_GPIO_SIZE 0x1000 +#define IXP2000_TIMER_VIRT_BASE 0xfef20000 +#define IXP2000_GPIO_VIRT_BASE 0Xfef10000 +/* + * Devices outside of the 0xc0000000 -> 0xc0100000 range + */ #define IXP2000_INTCTL_PHYS_BASE 0xd6000000 -#define IXP2000_INTCTL_VIRT_BASE 0xfeffa000 -#define IXP2000_INTCTL_SIZE 0x01000 +#define IXP2000_INTCTL_VIRT_BASE 0xfee00000 +#define IXP2000_INTCTL_SIZE 0x00100000 #define IXP2000_PCI_CREG_PHYS_BASE 0xde000000 -#define IXP2000_PCI_CREG_VIRT_BASE 0xfeff0000 -#define IXP2000_PCI_CREG_SIZE 0x1000 +#define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000 +#define IXP2000_PCI_CREG_SIZE 0x00100000 #define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000 -#define IXP2000_PCI_CSR_VIRT_BASE 0xfefde000 -#define IXP2000_PCI_CSR_SIZE 0x1000 +#define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000 +#define IXP2000_PCI_CSR_SIZE 0x00100000 #define IXP2000_PCI_IO_PHYS_BASE 0xd8000000 #define IXP2000_PCI_IO_VIRT_BASE 0xfd000000 @@ -66,7 +74,6 @@ #define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000 #define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000 #define IXP2000_PCI_CFG1_SIZE 0x01000000 - /* * Timers diff -Nru a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h --- a/include/asm-arm/arch-ixp2000/system.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-ixp2000/system.h 2005-03-07 14:54:18 -08:00 @@ -19,7 +19,7 @@ static inline void arch_reset(char mode) { - cli(); + local_irq_disable(); /* * Reset flash banking register so that we are pointing at diff -Nru a/include/asm-arm/arch-ixp2000/vmalloc.h b/include/asm-arm/arch-ixp2000/vmalloc.h --- a/include/asm-arm/arch-ixp2000/vmalloc.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-ixp2000/vmalloc.h 2005-03-07 14:54:16 -08:00 @@ -20,4 +20,4 @@ #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 0xfb000000 +#define VMALLOC_END 0xfaffefff diff -Nru a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h --- a/include/asm-arm/arch-ixp4xx/platform.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-ixp4xx/platform.h 2005-03-07 14:54:16 -08:00 @@ -15,6 +15,12 @@ #include +#ifndef __ARMEB__ +#define REG_OFFSET 0 +#else +#define REG_OFFSET 3 +#endif + /* * Expansion bus memory regions */ diff -Nru a/include/asm-arm/arch-pxa/idp.h b/include/asm-arm/arch-pxa/idp.h --- a/include/asm-arm/arch-pxa/idp.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-pxa/idp.h 2005-03-07 14:54:18 -08:00 @@ -10,20 +10,20 @@ * 2001-09-13: Cliff Brake * Initial code * + * 2005-02-15: Cliff Brake + * + * Changes for 2.6 kernel. */ #include /* * Note: this file must be safe to include in assembly files + * + * Support for the Vibren PXA255 IDP requires rev04 or later + * IDP hardware. */ -/* comment out following if you have a rev01 board */ -#define PXA_IDP_REV02 1 - -#ifdef PXA_IDP_REV02 -//Use this as well for 0017-x004 and greater pcb's: -#define PXA_IDP_REV04 1 #define IDP_FLASH_PHYS (PXA_CS0_PHYS) #define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) @@ -38,26 +38,18 @@ * virtual memory map */ -#define IDP_IDE_BASE (0xf0000000) -#define IDP_IDE_SIZE (1*1024*1024) -#define IDE_REG_STRIDE 4 - -#define IDP_ETH_BASE (IDP_IDE_BASE + IDP_IDE_SIZE) -#define IDP_ETH_SIZE (1*1024*1024) -#define ETH_BASE IDP_ETH_BASE //smc9194 driver compatibility issue - -#define IDP_COREVOLT_BASE (IDP_ETH_BASE + IDP_ETH_SIZE) +#define IDP_COREVOLT_VIRT (0xf0000000) #define IDP_COREVOLT_SIZE (1*1024*1024) -#define IDP_CPLD_BASE (IDP_COREVOLT_BASE + IDP_COREVOLT_SIZE) +#define IDP_CPLD_VIRT (IDP_COREVOLT_VIRT + IDP_COREVOLT_SIZE) #define IDP_CPLD_SIZE (1*1024*1024) -#if (IDP_CPLD_BASE + IDP_CPLD_SIZE) > 0xfc000000 +#if (IDP_CPLD_VIRT + IDP_CPLD_SIZE) > 0xfc000000 #error Your custom IO space is getting a bit large !! #endif -#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_BASE) -#define CPLD_V2P(x) ((x) - IDP_CPLD_BASE + IDP_CPLD_PHYS) +#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_VIRT) +#define CPLD_V2P(x) ((x) - IDP_CPLD_VIRT + IDP_CPLD_PHYS) #ifndef __ASSEMBLY__ # define __CPLD_REG(x) (*((volatile unsigned long *)CPLD_P2V(x))) @@ -65,7 +57,7 @@ # define __CPLD_REG(x) CPLD_P2V(x) #endif -/* board level registers in the CPLD: (offsets from CPLD_BASE) */ +/* board level registers in the CPLD: (offsets from CPLD_VIRT) */ #define _IDP_CPLD_REV (IDP_CPLD_PHYS + 0x00) #define _IDP_CPLD_PERIPH_PWR (IDP_CPLD_PHYS + 0x04) @@ -142,32 +134,10 @@ #define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x))) -/* - * Macros for LCD Driver - */ - -#ifdef CONFIG_FB_PXA - -#define FB_BACKLIGHT_ON() (IDP_CPLD_LCD |= (1<<1)) -#define FB_BACKLIGHT_OFF() (IDP_CPLD_LCD &= ~(1<<1)) - -#define FB_PWR_ON() (IDP_CPLD_LCD |= (1<< 0)) -#define FB_PWR_OFF() (IDP_CPLD_LCD &= ~(1<<0)) - -#define FB_VLCD_ON() (IDP_CPLD_LCD |= (1<<2)) -#define FB_VLCD_OFF() (IDP_CPLD_LCD &= ~(1<<2)) - -#endif - /* A listing of interrupts used by external hardware devices */ -#ifdef PXA_IDP_REV04 #define TOUCH_PANEL_IRQ IRQ_GPIO(5) #define IDE_IRQ IRQ_GPIO(21) -#else -#define TOUCH_PANEL_IRQ IRQ_GPIO(21) -#define IDE_IRQ IRQ_GPIO(5) -#endif #define TOUCH_PANEL_IRQ_EDGE IRQT_FALLING @@ -196,7 +166,7 @@ #define IDP_LEDS_MASK (IDP_HB_LED | IDP_BUSY_LED) -#define IDP_WRITE_LEDS(value) (IDP_CPLD_LED_CONTROL = (IDP_CPLD_LED_CONTROL & (~(IDP_LEDS_MASK)) | value)) +#define IDP_WRITE_LEDS(value) (IDP_CPLD_LED_CONTROL = (IDP_CPLD_LED_CONTROL & ((~(IDP_LEDS_MASK)) | value))) /* * macros for MTD driver @@ -229,238 +199,4 @@ inputs = (IDP_CPLD_KB_ROW & 0x7f);\ } -#else - -/* - * following is for rev01 boards only - */ - -#define IDP_FLASH_PHYS (PXA_CS0_PHYS) -#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) -#define IDP_MEDIAQ_PHYS (PXA_CS3_PHYS) -#define IDP_CTRL_PORT_PHYS (PXA_CS5_PHYS + 0x02C00000) -#define IDP_IDE_PHYS (PXA_CS5_PHYS + 0x03000000) -#define IDP_ETH_PHYS (PXA_CS5_PHYS + 0x03400000) -#define IDP_COREVOLT_PHYS (PXA_CS5_PHYS + 0x03800000) -#define IDP_CPLD_PHYS (PXA_CS5_PHYS + 0x03C00000) - - -/* - * virtual memory map - */ - -#define IDP_CTRL_PORT_BASE (0xf0000000) -#define IDP_CTRL_PORT_SIZE (1*1024*1024) - -#define IDP_IDE_BASE (IDP_CTRL_PORT_BASE + IDP_CTRL_PORT_SIZE) -#define IDP_IDE_SIZE (1*1024*1024) - -#define IDP_ETH_BASE (IDP_IDE_BASE + IDP_IDE_SIZE) -#define IDP_ETH_SIZE (1*1024*1024) - -#define IDP_COREVOLT_BASE (IDP_ETH_BASE + IDP_ETH_SIZE) -#define IDP_COREVOLT_SIZE (1*1024*1024) - -#define IDP_CPLD_BASE (IDP_COREVOLT_BASE + IDP_COREVOLT_SIZE) -#define IDP_CPLD_SIZE (1*1024*1024) - -#if (IDP_CPLD_BASE + IDP_CPLD_SIZE) > 0xfc000000 -#error Your custom IO space is getting a bit large !! -#endif - -#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_BASE) -#define CPLD_V2P(x) ((x) - IDP_CPLD_BASE + IDP_CPLD_PHYS) - -#ifndef __ASSEMBLY__ -# define __CPLD_REG(x) (*((volatile unsigned long *)CPLD_P2V(x))) -#else -# define __CPLD_REG(x) CPLD_P2V(x) -#endif - -/* board level registers in the CPLD: (offsets from CPLD_BASE) */ - -#define _IDP_CPLD_LED_CONTROL (IDP_CPLD_PHYS + 0x00) -#define _IDP_CPLD_PERIPH_PWR (IDP_CPLD_PHYS + 0x04) -#define _IDP_CPLD_CIR (IDP_CPLD_PHYS + 0x08) -#define _IDP_CPLD_KB_COL_HIGH (IDP_CPLD_PHYS + 0x0C) -#define _IDP_CPLD_KB_COL_LOW (IDP_CPLD_PHYS + 0x10) -#define _IDP_CPLD_PCCARD_EN (IDP_CPLD_PHYS + 0x14) -#define _IDP_CPLD_GPIOH_DIR (IDP_CPLD_PHYS + 0x18) -#define _IDP_CPLD_GPIOH_VALUE (IDP_CPLD_PHYS + 0x1C) -#define _IDP_CPLD_GPIOL_DIR (IDP_CPLD_PHYS + 0x20) -#define _IDP_CPLD_GPIOL_VALUE (IDP_CPLD_PHYS + 0x24) -#define _IDP_CPLD_MISC (IDP_CPLD_PHYS + 0x28) -#define _IDP_CPLD_PCCARD0_STATUS (IDP_CPLD_PHYS + 0x2C) -#define _IDP_CPLD_PCCARD1_STATUS (IDP_CPLD_PHYS + 0x30) - -/* FPGA register virtual addresses */ -#define IDP_CPLD_LED_CONTROL __CPLD_REG(_IDP_CPLD_LED_CONTROL) /* write only */ -#define IDP_CPLD_PERIPH_PWR __CPLD_REG(_IDP_CPLD_PERIPH_PWR) /* write only */ -#define IDP_CPLD_CIR __CPLD_REG(_IDP_CPLD_CIR) /* write only */ -#define IDP_CPLD_KB_COL_HIGH __CPLD_REG(_IDP_CPLD_KB_COL_HIGH) /* write only */ -#define IDP_CPLD_KB_COL_LOW __CPLD_REG(_IDP_CPLD_KB_COL_LOW) /* write only */ -#define IDP_CPLD_PCCARD_EN __CPLD_REG(_IDP_CPLD_PCCARD_EN) /* write only */ -#define IDP_CPLD_GPIOH_DIR __CPLD_REG(_IDP_CPLD_GPIOH_DIR) /* write only */ -#define IDP_CPLD_GPIOH_VALUE __CPLD_REG(_IDP_CPLD_GPIOH_VALUE) /* write only */ -#define IDP_CPLD_GPIOL_DIR __CPLD_REG(_IDP_CPLD_GPIOL_DIR) /* write only */ -#define IDP_CPLD_GPIOL_VALUE __CPLD_REG(_IDP_CPLD_GPIOL_VALUE) /* write only */ -#define IDP_CPLD_MISC __CPLD_REG(_IDP_CPLD_MISC) /* read only */ -#define IDP_CPLD_PCCARD0_STATUS __CPLD_REG(_IDP_CPLD_PCCARD0_STATUS) /* read only */ -#define IDP_CPLD_PCCARD1_STATUS __CPLD_REG(_IDP_CPLD_PCCARD1_STATUS) /* read only */ - - -#ifndef __ASSEMBLY__ - -/* shadow registers for write only registers */ -extern unsigned int idp_cpld_led_control_shadow; -extern unsigned int idp_cpld_periph_pwr_shadow; -extern unsigned int idp_cpld_cir_shadow; -extern unsigned int idp_cpld_kb_col_high_shadow; -extern unsigned int idp_cpld_kb_col_low_shadow; -extern unsigned int idp_cpld_pccard_en_shadow; -extern unsigned int idp_cpld_gpioh_dir_shadow; -extern unsigned int idp_cpld_gpioh_value_shadow; -extern unsigned int idp_cpld_gpiol_dir_shadow; -extern unsigned int idp_cpld_gpiol_value_shadow; - -extern unsigned int idp_control_port_shadow; - -/* - * macros to write to write only register - * - * none of these macros are protected from - * multiple drivers using them in interrupt context. - */ - -#define WRITE_IDP_CPLD_LED_CONTROL(value, mask) \ -{\ - idp_cpld_led_control_shadow = (((value & mask) | (idp_cpld_led_control_shadow & ~mask)));\ - IDP_CPLD_LED_CONTROL = idp_cpld_led_control_shadow;\ -} -#define WRITE_IDP_CPLD_PERIPH_PWR(value, mask) \ -{\ - idp_cpld_periph_pwr_shadow = ((value & mask) | (idp_cpld_periph_pwr_shadow & ~mask));\ - IDP_CPLD_PERIPH_PWR = idp_cpld_periph_pwr_shadow;\ -} -#define WRITE_IDP_CPLD_CIR(value, mask) \ -{\ - idp_cpld_cir_shadow = ((value & mask) | (idp_cpld_cir_shadow & ~mask));\ - IDP_CPLD_CIR = idp_cpld_cir_shadow;\ -} -#define WRITE_IDP_CPLD_KB_COL_HIGH(value, mask) \ -{\ - idp_cpld_kb_col_high_shadow = ((value & mask) | (idp_cpld_kb_col_high_shadow & ~mask));\ - IDP_CPLD_KB_COL_HIGH = idp_cpld_kb_col_high_shadow;\ -} -#define WRITE_IDP_CPLD_KB_COL_LOW(value, mask) \ -{\ - idp_cpld_kb_col_low_shadow = ((value & mask) | (idp_cpld_kb_col_low_shadow & ~mask));\ - IDP_CPLD_KB_COL_LOW = idp_cpld_kb_col_low_shadow;\ -} -#define WRITE_IDP_CPLD_PCCARD_EN(value, mask) \ -{\ - idp_cpld_ = ((value & mask) | (idp_cpld_led_control_shadow & ~mask));\ - IDP_CPLD_LED_CONTROL = idp_cpld_led_control_shadow;\ -} -#define WRITE_IDP_CPLD_GPIOH_DIR(value, mask) \ -{\ - idp_cpld_gpioh_dir_shadow = ((value & mask) | (idp_cpld_gpioh_dir_shadow & ~mask));\ - IDP_CPLD_GPIOH_DIR = idp_cpld_gpioh_dir_shadow;\ -} -#define WRITE_IDP_CPLD_GPIOH_VALUE(value, mask) \ -{\ - idp_cpld_gpioh_value_shadow = ((value & mask) | (idp_cpld_gpioh_value_shadow & ~mask));\ - IDP_CPLD_GPIOH_VALUE = idp_cpld_gpioh_value_shadow;\ -} -#define WRITE_IDP_CPLD_GPIOL_DIR(value, mask) \ -{\ - idp_cpld_gpiol_dir_shadow = ((value & mask) | (idp_cpld_gpiol_dir_shadow & ~mask));\ - IDP_CPLD_GPIOL_DIR = idp_cpld_gpiol_dir_shadow;\ -} -#define WRITE_IDP_CPLD_GPIOL_VALUE(value, mask) \ -{\ - idp_cpld_gpiol_value_shadow = ((value & mask) | (idp_cpld_gpiol_value_shadow & ~mask));\ - IDP_CPLD_GPIOL_VALUE = idp_cpld_gpiol_value_shadow;\ -} - -#define WRITE_IDP_CONTROL_PORT(value, mask) \ -{\ - idp_control_port_shadow = ((value & mask) | (idp_control_port_shadow & ~mask));\ - (*((volatile unsigned long *)IDP_CTRL_PORT_BASE)) = idp_control_port_shadow;\ -} - -#endif - -/* A listing of interrupts used by external hardware devices */ - -#define TOUCH_PANEL_IRQ IRQ_GPIO(21) -#define TOUCH_PANEL_IRQ_EGDE IRQT_FALLING - -#define ETHERNET_IRQ IRQ_GPIO(4) -#define ETHERNET_IRQ_EDGE IRQT_RISING - -/* - * Bit masks for various registers - */ - - -/* control port */ -#define IDP_CONTROL_PORT_PCSLOT0_0 (1 << 0) -#define IDP_CONTROL_PORT_PCSLOT0_1 (1 << 1) -#define IDP_CONTROL_PORT_PCSLOT0_2 (1 << 2) -#define IDP_CONTROL_PORT_PCSLOT0_3 (1 << 3) -#define IDP_CONTROL_PORT_PCSLOT1_1 (1 << 4) -#define IDP_CONTROL_PORT_PCSLOT1_2 (1 << 5) -#define IDP_CONTROL_PORT_PCSLOT1_3 (1 << 6) -#define IDP_CONTROL_PORT_PCSLOT1_4 (1 << 7) -#define IDP_CONTROL_PORT_SERIAL1_EN (1 << 9) -#define IDP_CONTROL_PORT_SERIAL2_EN (1 << 10) -#define IDP_CONTROL_PORT_SERIAL3_EN (1 << 11) -#define IDP_CONTROL_PORT_IRDA_FIR (1 << 12) -#define IDP_CONTROL_PORT_IRDA_M0 (1 << 13) -#define IDP_CONTROL_PORT_IRDA_M1 (1 << 14) -#define IDP_CONTROL_PORT_I2S_PWR (1 << 15) -#define IDP_CONTROL_PORT_FLASH_WP (1 << 19) -#define IDP_CONTROL_PORT_MILL_EN (1 << 20) -#define IDP_CONTROL_PORT_LCD_PWR (1 << 21) -#define IDP_CONTROL_PORT_LCD_BKLEN (1 << 22) -#define IDP_CONTROL_PORT_LCD_ENAVLCD (1 << 23) - -/* - * Macros for LCD Driver - */ - -#ifdef CONFIG_FB_PXA - -#define FB_BACKLIGHT_ON() WRITE_IDP_CONTROL_PORT(IDP_CONTROL_PORT_LCD_BKLEN, IDP_CONTROL_PORT_LCD_BKLEN) -#define FB_BACKLIGHT_OFF() WRITE_IDP_CONTROL_PORT(0, IDP_CONTROL_PORT_LCD_BKLEN) - -#define FB_PWR_ON() WRITE_IDP_CONTROL_PORT(IDP_CONTROL_PORT_LCD_PWR, IDP_CONTROL_PORT_LCD_PWR) -#define FB_PWR_OFF() WRITE_IDP_CONTROL_PORT(0, IDP_CONTROL_PORT_LCD_PWR) - -#define FB_VLCD_ON() WRITE_IDP_CONTROL_PORT(IDP_CONTROL_PORT_LCD_ENAVLCD, IDP_CONTROL_PORT_LCD_ENAVLCD) -#define FB_VLCD_OFF() WRITE_IDP_CONTROL_PORT(0, IDP_CONTROL_PORT_LCD_ENAVLCD) - -#endif - -/* - * Macros for LED Driver - */ - -/* leds 0 = ON */ -#define IDP_HB_LED 0x1 -#define IDP_BUSY_LED 0x2 - -#define IDP_LEDS_MASK (IDP_HB_LED | IDP_BUSY_LED) - -#define IDP_WRITE_LEDS(value) WRITE_IDP_CPLD_LED_CONTROL(value, IDP_LEDS_MASK) - -/* - * macros for MTD driver - */ - -#define FLASH_WRITE_PROTECT_DISABLE() WRITE_IDP_CONTROL_PORT(0, IDP_CONTROL_PORT_FLASH_WP) -#define FLASH_WRITE_PROTECT_ENABLE() WRITE_IDP_CONTROL_PORT(IDP_CONTROL_PORT_FLASH_WP, IDP_CONTROL_PORT_FLASH_WP) - -#endif diff -Nru a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h --- a/include/asm-arm/arch-pxa/irqs.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/arch-pxa/irqs.h 2005-03-07 14:54:16 -08:00 @@ -140,14 +140,41 @@ #define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53) #define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54) +#define IRQ_LOCOMO_START (IRQ_BOARD_END) +#define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0) +#define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1) +#define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2) +#define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3) +#define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4) +#define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5) +#define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6) +#define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7) +#define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8) +#define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9) +#define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10) +#define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11) +#define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12) +#define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13) +#define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14) +#define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15) +#define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16) +#define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17) +#define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18) +#define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19) +#define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20) +#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) + /* * Figure out the MAX IRQ number. * * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1. + * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1 * Otherwise, we have the standard IRQs only. */ #ifdef CONFIG_SA1111 #define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1) +#elif defined(CONFIG_SHARP_LOCOMO) +#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) #elif defined(CONFIG_ARCH_LUBBOCK) || \ defined(CONFIG_MACH_MAINSTONE) #define NR_IRQS (IRQ_BOARD_END) @@ -185,3 +212,8 @@ #define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14) #define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15) +/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */ +#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0) +#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1) +#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2) +#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3) diff -Nru a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-pxa/poodle.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,111 @@ +/* + * linux/include/asm-arm/arch-pxa/poodle.h + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + * + * Based on: + * linux/include/asm-arm/arch-sa1100/collie.h + * + * ChangeLog: + * 04-06-2001 Lineo Japan, Inc. + * 04-16-2001 SHARP Corporation + * Update to 2.6 John Lenz + */ +#ifndef __ASM_ARCH_POODLE_H +#define __ASM_ARCH_POODLE_H 1 + +/* + * GPIOs + */ +/* PXA GPIOs */ +#define POODLE_GPIO_ON_KEY (0) +#define POODLE_GPIO_AC_IN (1) +#define POODLE_GPIO_CO 16 +#define POODLE_GPIO_TP_INT (5) +#define POODLE_GPIO_WAKEUP (11) /* change battery */ +#define POODLE_GPIO_GA_INT (10) +#define POODLE_GPIO_IR_ON (22) +#define POODLE_GPIO_HP_IN (4) +#define POODLE_GPIO_CF_IRQ (17) +#define POODLE_GPIO_CF_CD (14) +#define POODLE_GPIO_CF_STSCHG (14) +#define POODLE_GPIO_SD_PWR (33) +#define POODLE_GPIO_nSD_CLK (6) +#define POODLE_GPIO_nSD_WP (7) +#define POODLE_GPIO_nSD_INT (8) +#define POODLE_GPIO_nSD_DETECT (9) +#define POODLE_GPIO_MAIN_BAT_LOW (13) +#define POODLE_GPIO_BAT_COVER (13) +#define POODLE_GPIO_ADC_TEMP_ON (21) +#define POODLE_GPIO_BYPASS_ON (36) +#define POODLE_GPIO_CHRG_ON (38) +#define POODLE_GPIO_CHRG_FULL (16) + +/* PXA GPIOs */ +#define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO0 +#define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO1 +#define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO4 +#define POODLE_IRQ_GPIO_CO IRQ_GPIO16 +#define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO5 +#define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO11 +#define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO10 +#define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO17 +#define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO14 +#define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO8 +#define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO9 +#define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO13 + +/* SCOOP GPIOs */ +#define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11 +#define POODLE_SCOOP_CP401 SCOOP_GPCR_PA13 +#define POODLE_SCOOP_VPEN SCOOP_GPCR_PA18 +#define POODLE_SCOOP_L_PCLK SCOOP_GPCR_PA20 +#define POODLE_SCOOP_L_LCLK SCOOP_GPCR_PA21 +#define POODLE_SCOOP_HS_OUT SCOOP_GPCR_PA22 + +#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) +#define POODLE_SCOOP_IO_OUT ( 0 ) + +/* + * Flash Memory mappings + * + * We have the following mapping: + * phys virt + * boot ROM 00000000 ef800000 + */ +#define FLASH_MEM_BASE 0xa0000a00 +#define FLASH_DATA(adr) (*(volatile unsigned int*)(FLASH_MEM_BASE+(adr))) +#define FLASH_DATA_F(adr) (*(volatile float32 *)(FLASH_MEM_BASE+(adr))) +#define FLASH_MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a ) + +/* COMADJ */ +#define FLASH_COMADJ_MAJIC FLASH_MAGIC_CHG('C','M','A','D') +#define FLASH_COMADJ_MAGIC_ADR 0x00 +#define FLASH_COMADJ_DATA_ADR 0x04 + +/* UUID */ +#define FLASH_UUID_MAJIC FLASH_MAGIC_CHG('U','U','I','D') +#define FLASH_UUID_MAGIC_ADR 0x08 +#define FLASH_UUID_DATA_ADR 0x0C + +/* TOUCH PANEL */ +#define FLASH_TOUCH_MAJIC FLASH_MAGIC_CHG('T','U','C','H') +#define FLASH_TOUCH_MAGIC_ADR 0x1C +#define FLASH_TOUCH_XP_DATA_ADR 0x20 +#define FLASH_TOUCH_YP_DATA_ADR 0x24 +#define FLASH_TOUCH_XD_DATA_ADR 0x28 +#define FLASH_TOUCH_YD_DATA_ADR 0x2C + +/* AD */ +#define FLASH_AD_MAJIC FLASH_MAGIC_CHG('B','V','A','D') +#define FLASH_AD_MAGIC_ADR 0x30 +#define FLASH_AD_DATA_ADR 0x34 + +/* PHAD */ +#define FLASH_PHAD_MAJIC FLASH_MAGIC_CHG('P','H','A','D') +#define FLASH_PHAD_MAGIC_ADR 0x38 +#define FLASH_PHAD_DATA_ADR 0x3C + + +#endif /* __ASM_ARCH_POODLE_H */ diff -Nru a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h --- a/include/asm-arm/arch-s3c2410/hardware.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-arm/arch-s3c2410/hardware.h 2005-03-07 14:54:17 -08:00 @@ -97,11 +97,7 @@ #include #include -/* machine specific includes, such as the BAST */ - -#if defined(CONFIG_ARCH_BAST) -#include -#endif +/* machine specific hardware definitions should go after this */ /* currently here until moved into config (todo) */ #define CONFIG_NO_MULTIWORD_IO diff -Nru a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h --- a/include/asm-arm/arch-s3c2410/irqs.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-s3c2410/irqs.h 2005-03-07 14:54:18 -08:00 @@ -1,6 +1,6 @@ /* linux/include/asm-arm/arch-s3c2410/irqs.h * - * Copyright (c) 2003 Simtec Electronics + * Copyright (c) 2003-2005 Simtec Electronics * Ben Dooks * * This program is free software; you can redistribute it and/or modify @@ -11,6 +11,8 @@ * 12-May-2003 BJD Created file * 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out * 12-Mar-2004 BJD Fixed bug in header protection + * 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv + * 28-Feb-2005 BJD Updated s3c2440 IRQs */ @@ -35,7 +37,8 @@ #define IRQ_EINT3 S3C2410_IRQ(3) #define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */ #define IRQ_EINT8t23 S3C2410_IRQ(5) -#define IRQ_RESERVED6 S3C2410_IRQ(6) +#define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */ +#define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440 */ #define IRQ_BATT_FLT S3C2410_IRQ(7) #define IRQ_TICK S3C2410_IRQ(8) /* 24 */ #define IRQ_WDT S3C2410_IRQ(9) @@ -54,6 +57,7 @@ #define IRQ_SPI0 S3C2410_IRQ(22) #define IRQ_UART1 S3C2410_IRQ(23) #define IRQ_RESERVED24 S3C2410_IRQ(24) /* 40 */ +#define IRQ_NFCON S3C2410_IRQ(24) /* for s3c2440 */ #define IRQ_USBD S3C2410_IRQ(25) #define IRQ_USBH S3C2410_IRQ(26) #define IRQ_IIC S3C2410_IRQ(27) @@ -109,7 +113,14 @@ #define IRQ_TC S3C2410_IRQ(63) #define IRQ_ADC S3C2410_IRQ(64) -#define NR_IRQS (IRQ_ADC+1) +/* extra irqs for s3c2440 */ + +#define IRQ_S3C2440_CAM_C S3C2410_IRQ(65) +#define IRQ_S3C2440_CAM_P S3C2410_IRQ(66) +#define IRQ_S3C2440_WDT S3C2410_IRQ(67) +#define IRQ_S3C2440_AC97 S3C2410_IRQ(68) + +#define NR_IRQS (IRQ_S3C2440_AC97+1) #endif /* __ASM_ARCH_IRQ_H */ diff -Nru a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h --- a/include/asm-arm/arch-s3c2410/map.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-s3c2410/map.h 2005-03-07 14:54:18 -08:00 @@ -12,6 +12,7 @@ * Changelog: * 12-May-2003 BJD Created file * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out + * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv */ #ifndef __ASM_ARCH_MAP_H @@ -123,6 +124,10 @@ #define S3C2410_VA_SDI S3C2410_ADDR(0x01200000) #define S3C2410_PA_SDI (0x5A000000) #define S3C2410_SZ_SDI SZ_1M + +/* CAMIF */ +#define S3C2440_PA_CAMIF (0x4F000000) +#define S3C2440_SZ_CAMIF SZ_1M /* ISA style IO, for each machine to sort out mappings for, if it * implements it. We reserve two 16M regions for ISA. diff -Nru a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-arm/arch-s3c2410/regs-adc.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,63 @@ +/* linux/include/asm/arch-s3c2410/regs-adc.h + * + * Copyright (c) 2004 Shannon Holland + * + * This program is free software; yosu 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 ADC registers + * + * Changelog: + * 27-09-2004 SAH Created file +*/ + +#ifndef __ASM_ARCH_REGS_ADC_H +#define __ASM_ARCH_REGS_ADC_H "regs-adc.h" + +#define S3C2410_ADCREG(x) (x) + +#define S3C2410_ADCCON S3C2410_ADCREG(0x00) +#define S3C2410_ADCTSC S3C2410_ADCREG(0x04) +#define S3C2410_ADCDLY S3C2410_ADCREG(0x08) +#define S3C2410_ADCDAT0 S3C2410_ADCREG(0x0C) +#define S3C2410_ADCDAT1 S3C2410_ADCREG(0x10) + + +/* ADCCON Register Bits */ +#define S3C2410_ADCCON_ECFLG (1<<15) +#define S3C2410_ADCCON_PRSCEN (1<<14) +#define S3C2410_ADCCON_PRSCVL(x) (((x)&0xFF)<<6) +#define S3C2410_ADCCON_PRSCVLMASK (0xFF<<6) +#define S3C2410_ADCCON_SELMUX(x) (((x)&0x7)<<3) +#define S3C2410_ADCCON_MUXMASK (0x7<<3) +#define S3C2410_ADCCON_STDBM (1<<2) +#define S3C2410_ADCCON_READ_START (1<<1) +#define S3C2410_ADCCON_ENABLE_START (1<<0) +#define S3C2410_ADCCON_STARTMASK (0x3<<0) + + +/* ADCTSC Register Bits */ +#define S3C2410_ADCTSC_YM_SEN (1<<7) +#define S3C2410_ADCTSC_YP_SEN (1<<6) +#define S3C2410_ADCTSC_XM_SEN (1<<5) +#define S3C2410_ADCTSC_XP_SEN (1<<4) +#define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3) +#define S3C2410_ADCTSC_AUTO_PST (1<<2) +#define S3C2410_ADCTSC_XY_PST (0x3<<0) + +/* ADCDAT0 Bits */ +#define S3C2410_ADCDAT0_UPDOWN (1<<15) +#define S3C2410_ADCDAT0_AUTO_PST (1<<14) +#define S3C2410_ADCDAT0_XY_PST (0x3<<12) +#define S3C2410_ADCDAT0_XPDATA_MASK (0x03FF) + +/* ADCDAT1 Bits */ +#define S3C2410_ADCDAT1_UPDOWN (1<<15) +#define S3C2410_ADCDAT1_AUTO_PST (1<<14) +#define S3C2410_ADCDAT1_XY_PST (0x3<<12) +#define S3C2410_ADCDAT1_YPDATA_MASK (0x03FF) + +#endif /* __ASM_ARCH_REGS_ADC_H */ + + diff -Nru a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h --- a/include/asm-arm/arch-s3c2410/regs-serial.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-serial.h 2005-03-07 14:54:17 -08:00 @@ -73,6 +73,11 @@ #define S3C2440_UCON_UCLK (1<<10) #define S3C2440_UCON_PCLK2 (2<<10) #define S3C2440_UCON_FCLK (3<<10) +#define S3C2440_UCON2_FCLK_EN (1<<15) +#define S3C2440_UCON0_DIVMASK (15 << 12) +#define S3C2440_UCON1_DIVMASK (15 << 12) +#define S3C2440_UCON2_DIVMASK (7 << 12) +#define S3C2440_UCON_DIVSHIFT (12) #define S3C2410_UCON_UCLK (1<<10) #define S3C2410_UCON_SBREAK (1<<4) 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 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-s3c2410/regs-timer.h 2005-03-07 14:54:18 -08:00 @@ -13,6 +13,7 @@ * 05-06-2003 BJD Created file * 26-06-2003 BJD Added more timer definitions to mux / control * 12-03-2004 BJD Updated include protection + * 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat) */ @@ -38,6 +39,7 @@ #define S3C2410_TCFG1_MUX4_DIV16 (3<<16) #define S3C2410_TCFG1_MUX4_TCLK1 (4<<16) #define S3C2410_TCFG1_MUX4_MASK (15<<16) +#define S3C2410_TCFG1_MUX4_SHIFT (16) #define S3C2410_TCFG1_MUX3_DIV2 (0<<12) #define S3C2410_TCFG1_MUX3_DIV4 (1<<12) diff -Nru a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h --- a/include/asm-arm/arch-s3c2410/uncompress.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/arch-s3c2410/uncompress.h 2005-03-07 14:54:18 -08:00 @@ -15,6 +15,7 @@ * 12-Mar-2004 BJD Updated header protection * 12-Oct-2004 BJD Take account of debug uart configuration * 15-Nov-2004 BJD Fixed uart configuration + * 22-Feb-2005 BJD Added watchdog to uncompress */ #ifndef __ASM_ARCH_UNCOMPRESS_H @@ -25,12 +26,16 @@ /* defines for UART registers */ #include "asm/arch/regs-serial.h" #include "asm/arch/regs-gpio.h" +#include "asm/arch/regs-watchdog.h" #include /* working in physical space... */ #undef S3C2410_GPIOREG +#undef S3C2410_WDOGREG + #define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) +#define S3C2410_WDOGREG(x) ((S3C2410_PA_WATCHDOG + (x))) /* how many bytes we allow into the FIFO at a time in FIFO mode */ #define FIFO_MAX (14) @@ -56,21 +61,6 @@ } -/* currently we do not need the watchdog... */ -#define arch_decomp_wdog() - - -static void error(char *err); - -static void -arch_decomp_setup(void) -{ - /* we may need to setup the uart(s) here if we are not running - * on an BAST... the BAST will have left the uarts configured - * after calling linux. - */ -} - /* we can deal with the case the UARTs are being run * in FIFO mode, so that we don't hold up our execution * waiting for tx to happen... @@ -121,5 +111,48 @@ putc(*ptr); } } + +/* CONFIG_S3C2410_BOOT_WATCHDOG + * + * Simple boot-time watchdog setup, to reboot the system if there is + * any problem with the boot process +*/ + +#ifdef CONFIG_S3C2410_BOOT_WATCHDOG + +#define WDOG_COUNT (0xff00) + +#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) + +static inline void arch_decomp_wdog(void) +{ + __raw_writel(WDOG_COUNT, S3C2410_WTCNT); +} + +static void arch_decomp_wdog_start(void) +{ + __raw_writel(WDOG_COUNT, S3C2410_WTDAT); + __raw_writel(WDOG_COUNT, S3C2410_WTCNT); + __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); +} + +#else +#define arch_decomp_wdog_start() +#define arch_decomp_wdog() +#endif + +static void error(char *err); + +static void +arch_decomp_setup(void) +{ + /* we may need to setup the uart(s) here if we are not running + * on an BAST... the BAST will have left the uarts configured + * after calling linux. + */ + + arch_decomp_wdog_start(); +} + #endif /* __ASM_ARCH_UNCOMPRESS_H */ diff -Nru a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h --- a/include/asm-arm/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -237,16 +237,16 @@ * space" model to handle this. */ #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ - flush_dcache_page(page); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ + flush_dcache_page(page); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) /* @@ -269,7 +269,7 @@ } static inline void -flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr) +flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) { if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { unsigned long addr = user_addr & PAGE_MASK; @@ -312,9 +312,9 @@ extern void flush_dcache_page(struct page *); #define flush_dcache_mmap_lock(mapping) \ - spin_lock_irq(&(mapping)->tree_lock) + write_lock_irq(&(mapping)->tree_lock) #define flush_dcache_mmap_unlock(mapping) \ - spin_unlock_irq(&(mapping)->tree_lock) + write_unlock_irq(&(mapping)->tree_lock) #define flush_icache_user_range(vma,page,addr,len) \ flush_dcache_page(page) diff -Nru a/include/asm-arm/ecard.h b/include/asm-arm/ecard.h --- a/include/asm-arm/ecard.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/ecard.h 2005-03-07 14:54:18 -08:00 @@ -155,8 +155,8 @@ struct resource resource[ECARD_NUM_RESOURCES]; /* Public data */ - volatile unsigned char *irqaddr; /* address of IRQ register */ - volatile unsigned char *fiqaddr; /* address of FIQ register */ + void __iomem *irqaddr; /* address of IRQ register */ + void __iomem *fiqaddr; /* address of FIQ register */ unsigned char irqmask; /* IRQ mask */ unsigned char fiqmask; /* FIQ mask */ unsigned char claimed; /* Card claimed? */ @@ -207,9 +207,16 @@ extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec, int id, int num); /* - * Obtain the address of a card + * Obtain the address of a card. This returns the "old style" address + * and should no longer be used. */ -extern __deprecated unsigned int ecard_address (struct expansion_card *ec, card_type_t card_type, card_speed_t speed); +static inline unsigned int __deprecated +ecard_address(struct expansion_card *ec, card_type_t type, card_speed_t speed) +{ + extern unsigned int __ecard_address(struct expansion_card *, + card_type_t, card_speed_t); + return __ecard_address(ec, type, speed); +} /* * Request and release ecard resources diff -Nru a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h --- a/include/asm-arm/hardware/locomo.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-arm/hardware/locomo.h 2005-03-07 14:54:17 -08:00 @@ -35,146 +35,139 @@ #define LOCOMO_MCSX3 0x1c /* Touch panel controller */ -#define LOCOMO_ASD 0x20 /* AD start delay */ -#define LOCOMO_HSD 0x28 /* HSYS delay */ -#define LOCOMO_HSC 0x2c /* HSYS period */ -#define LOCOMO_TADC 0x30 /* tablet ADC clock */ - -/* TFT signal */ -#define LOCOMO_TC 0x38 /* TFT control signal */ -#define LOCOMO_CPSD 0x3c /* CPS delay */ - -/* Key controller */ -#define LOCOMO_KIB 0x40 /* KIB level */ -#define LOCOMO_KSC 0x44 /* KSTRB control */ -#define LOCOMO_KCMD 0x48 /* KSTRB command */ -#define LOCOMO_KIC 0x4c /* Key interrupt */ +#define LOCOMO_ASD 0x20 /* AD start delay */ +#define LOCOMO_HSD 0x28 /* HSYS delay */ +#define LOCOMO_HSC 0x2c /* HSYS period */ +#define LOCOMO_TADC 0x30 /* tablet ADC clock */ -/* Audio clock */ -#define LOCOMO_ACC 0x54 - -/* SPI interface */ -#define LOCOMO_SPIMD 0x60 /* SPI mode setting */ -#define LOCOMO_SPICT 0x64 /* SPI mode control */ -#define LOCOMO_SPIST 0x68 /* SPI status */ -#define LOCOMO_SPIIS 0x70 /* SPI interrupt status */ -#define LOCOMO_SPIWE 0x74 /* SPI interrupt status write enable */ -#define LOCOMO_SPIIE 0x78 /* SPI interrupt enable */ -#define LOCOMO_SPIIR 0x7c /* SPI interrupt request */ -#define LOCOMO_SPITD 0x80 /* SPI transfer data write */ -#define LOCOMO_SPIRD 0x84 /* SPI receive data read */ -#define LOCOMO_SPITS 0x88 /* SPI transfer data shift */ -#define LOCOMO_SPIRS 0x8C /* SPI receive data shift */ - -#define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ -#define LOCOMO_SPI_OVRN (1 << 2) /* Over Run bit */ -#define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ -#define LOCOMO_SPI_RFR (1) /* read buffer bit */ - -/* GPIO */ -#define LOCOMO_GPD 0x90 /* GPIO direction */ -#define LOCOMO_GPE 0x94 /* GPIO input enable */ -#define LOCOMO_GPL 0x98 /* GPIO level */ -#define LOCOMO_GPO 0x9c /* GPIO out data setteing */ -#define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ -#define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ -#define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ -#define LOCOMO_GWE 0xac /* GPIO status write enable */ -#define LOCOMO_GIE 0xb0 /* GPIO interrupt enable */ -#define LOCOMO_GIR 0xb4 /* GPIO interrupt request */ - -#define LOCOMO_GPIO0 (1<<0) -#define LOCOMO_GPIO1 (1<<1) -#define LOCOMO_GPIO2 (1<<2) -#define LOCOMO_GPIO3 (1<<3) -#define LOCOMO_GPIO4 (1<<4) -#define LOCOMO_GPIO5 (1<<5) -#define LOCOMO_GPIO6 (1<<6) -#define LOCOMO_GPIO7 (1<<7) -#define LOCOMO_GPIO8 (1<<8) -#define LOCOMO_GPIO9 (1<<9) -#define LOCOMO_GPIO10 (1<<10) -#define LOCOMO_GPIO11 (1<<11) -#define LOCOMO_GPIO12 (1<<12) -#define LOCOMO_GPIO13 (1<<13) -#define LOCOMO_GPIO14 (1<<14) -#define LOCOMO_GPIO15 (1<<15) - -/* Front light adjustment controller */ -#define LOCOMO_ALS 0xc8 /* Adjust light cycle */ -#define LOCOMO_ALD 0xcc /* Adjust light duty */ - -/* PCM audio interface */ -#define LOCOMO_PAIF 0xd0 /* Long time timer */ -#define LOCOMO_LTC 0xd8 /* LTC interrupt setting */ -#define LOCOMO_LTINT 0xdc /* LTC interrupt */ +#define LOCOMO_LTC 0xd8 /* LTC interrupt setting */ +#define LOCOMO_LTINT 0xdc /* LTC interrupt */ /* DAC control signal for LCD (COMADJ ) */ -#define LOCOMO_DAC 0xe0 - +#define LOCOMO_DAC 0xe0 /* DAC control */ #define LOCOMO_DAC_SCLOEB 0x08 /* SCL pin output data */ #define LOCOMO_DAC_TEST 0x04 /* Test bit */ #define LOCOMO_DAC_SDA 0x02 /* SDA pin level (read-only) */ #define LOCOMO_DAC_SDAOEB 0x01 /* SDA pin output data */ -/* LED controller */ -#define LOCOMO_LPT0 0xe8 /* LEDPWM0 timer */ -#define LOCOMO_LPT1 0xec /* LEDPWM1 timer */ +/* SPI interface */ +#define LOCOMO_SPIMD 0x60 /* SPI mode setting */ +#define LOCOMO_SPICT 0x64 /* SPI mode control */ +#define LOCOMO_SPIST 0x68 /* SPI status */ +#define LOCOMO_SPIIS 0x70 /* SPI interrupt status */ +#define LOCOMO_SPIWE 0x74 /* SPI interrupt status write enable */ +#define LOCOMO_SPIIE 0x78 /* SPI interrupt enable */ +#define LOCOMO_SPIIR 0x7c /* SPI interrupt request */ +#define LOCOMO_SPITD 0x80 /* SPI transfer data write */ +#define LOCOMO_SPIRD 0x84 /* SPI receive data read */ +#define LOCOMO_SPITS 0x88 /* SPI transfer data shift */ +#define LOCOMO_SPIRS 0x8C /* SPI receive data shift */ +#define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */ +#define LOCOMO_SPI_OVRN (1 << 2) /* Over Run bit */ +#define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */ +#define LOCOMO_SPI_RFR (1) /* read buffer bit */ -#define LOCOMO_LPT_TOFH 0x80 /* */ -#define LOCOMO_LPT_TOFL 0x08 /* */ -#define LOCOMO_LPT_TOH(TOH) ((TOH & 0x7) << 4) /* */ -#define LOCOMO_LPT_TOL(TOL) ((TOL & 0x7)) /* */ +/* GPIO */ +#define LOCOMO_GPD 0x90 /* GPIO direction */ +#define LOCOMO_GPE 0x94 /* GPIO input enable */ +#define LOCOMO_GPL 0x98 /* GPIO level */ +#define LOCOMO_GPO 0x9c /* GPIO out data setteing */ +#define LOCOMO_GRIE 0xa0 /* GPIO rise detection */ +#define LOCOMO_GFIE 0xa4 /* GPIO fall detection */ +#define LOCOMO_GIS 0xa8 /* GPIO edge detection status */ +#define LOCOMO_GWE 0xac /* GPIO status write enable */ +#define LOCOMO_GIE 0xb0 /* GPIO interrupt enable */ +#define LOCOMO_GIR 0xb4 /* GPIO interrupt request */ +#define LOCOMO_GPIO(Nb) (0x01 << (Nb)) +#define LOCOMO_GPIO_RTS LOCOMO_GPIO(0) +#define LOCOMO_GPIO_CTS LOCOMO_GPIO(1) +#define LOCOMO_GPIO_DSR LOCOMO_GPIO(2) +#define LOCOMO_GPIO_DTR LOCOMO_GPIO(3) +#define LOCOMO_GPIO_LCD_VSHA_ON LOCOMO_GPIO(4) +#define LOCOMO_GPIO_LCD_VSHD_ON LOCOMO_GPIO(5) +#define LOCOMO_GPIO_LCD_VEE_ON LOCOMO_GPIO(6) +#define LOCOMO_GPIO_LCD_MOD LOCOMO_GPIO(7) +#define LOCOMO_GPIO_DAC_ON LOCOMO_GPIO(8) +#define LOCOMO_GPIO_FL_VR LOCOMO_GPIO(9) +#define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) +#define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) +#define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) + +/* Start the definitions of the devices. Each device has an initial + * base address and a series of offsets from that base address. */ + +/* Keyboard controller */ +#define LOCOMO_KEYBOARD 0x40 +#define LOCOMO_KIB 0x00 /* KIB level */ +#define LOCOMO_KSC 0x04 /* KSTRB control */ +#define LOCOMO_KCMD 0x08 /* KSTRB command */ +#define LOCOMO_KIC 0x0c /* Key interrupt */ +/* Front light adjustment controller */ +#define LOCOMO_FRONTLIGHT 0xc8 +#define LOCOMO_ALS 0x00 /* Adjust light cycle */ +#define LOCOMO_ALD 0x04 /* Adjust light duty */ + +/* Backlight controller: TFT signal */ +#define LOCOMO_BACKLIGHT 0x38 +#define LOCOMO_TC 0x00 /* TFT control signal */ +#define LOCOMO_CPSD 0x04 /* CPS delay */ + +/* Audio controller */ +#define LOCOMO_AUDIO 0x54 +#define LOCOMO_ACC 0x00 /* Audio clock */ +#define LOCOMO_PAIF 0x7C /* PCM audio interface */ /* Audio clock */ -#define LOCOMO_ACC_XON 0x80 /* */ -#define LOCOMO_ACC_XEN 0x40 /* */ -#define LOCOMO_ACC_XSEL0 0x00 /* */ -#define LOCOMO_ACC_XSEL1 0x20 /* */ -#define LOCOMO_ACC_MCLKEN 0x10 /* */ -#define LOCOMO_ACC_64FSEN 0x08 /* */ +#define LOCOMO_ACC_XON 0x80 +#define LOCOMO_ACC_XEN 0x40 +#define LOCOMO_ACC_XSEL0 0x00 +#define LOCOMO_ACC_XSEL1 0x20 +#define LOCOMO_ACC_MCLKEN 0x10 +#define LOCOMO_ACC_64FSEN 0x08 #define LOCOMO_ACC_CLKSEL000 0x00 /* mclk 2 */ #define LOCOMO_ACC_CLKSEL001 0x01 /* mclk 3 */ #define LOCOMO_ACC_CLKSEL010 0x02 /* mclk 4 */ #define LOCOMO_ACC_CLKSEL011 0x03 /* mclk 6 */ #define LOCOMO_ACC_CLKSEL100 0x04 /* mclk 8 */ #define LOCOMO_ACC_CLKSEL101 0x05 /* mclk 12 */ - /* PCM audio interface */ -#define LOCOMO_PAIF_SCINV 0x20 /* */ -#define LOCOMO_PAIF_SCEN 0x10 /* */ -#define LOCOMO_PAIF_LRCRST 0x08 /* */ -#define LOCOMO_PAIF_LRCEVE 0x04 /* */ -#define LOCOMO_PAIF_LRCINV 0x02 /* */ -#define LOCOMO_PAIF_LRCEN 0x01 /* */ +#define LOCOMO_PAIF_SCINV 0x20 +#define LOCOMO_PAIF_SCEN 0x10 +#define LOCOMO_PAIF_LRCRST 0x08 +#define LOCOMO_PAIF_LRCEVE 0x04 +#define LOCOMO_PAIF_LRCINV 0x02 +#define LOCOMO_PAIF_LRCEN 0x01 -/* GPIO */ -#define LOCOMO_GPIO(Nb) (0x01 << (Nb)) /* LoCoMo GPIO [0...15] */ -#define LOCOMO_GPIO_RTS LOCOMO_GPIO(0) /* LoCoMo GPIO [0] */ -#define LOCOMO_GPIO_CTS LOCOMO_GPIO(1) /* LoCoMo GPIO [1] */ -#define LOCOMO_GPIO_DSR LOCOMO_GPIO(2) /* LoCoMo GPIO [2] */ -#define LOCOMO_GPIO_DTR LOCOMO_GPIO(3) /* LoCoMo GPIO [3] */ -#define LOCOMO_GPIO_LCD_VSHA_ON LOCOMO_GPIO(4) /* LoCoMo GPIO [4] */ -#define LOCOMO_GPIO_LCD_VSHD_ON LOCOMO_GPIO(5) /* LoCoMo GPIO [5] */ -#define LOCOMO_GPIO_LCD_VEE_ON LOCOMO_GPIO(6) /* LoCoMo GPIO [6] */ -#define LOCOMO_GPIO_LCD_MOD LOCOMO_GPIO(7) /* LoCoMo GPIO [7] */ -#define LOCOMO_GPIO_DAC_ON LOCOMO_GPIO(8) /* LoCoMo GPIO [8] */ -#define LOCOMO_GPIO_FL_VR LOCOMO_GPIO(9) /* LoCoMo GPIO [9] */ -#define LOCOMO_GPIO_DAC_SDATA LOCOMO_GPIO(10) /* LoCoMo GPIO [10] */ -#define LOCOMO_GPIO_DAC_SCK LOCOMO_GPIO(11) /* LoCoMo GPIO [11] */ -#define LOCOMO_GPIO_DAC_SLOAD LOCOMO_GPIO(12) /* LoCoMo GPIO [12] */ +/* LED controller */ +#define LOCOMO_LED 0xe8 +#define LOCOMO_LPT0 0x00 +#define LOCOMO_LPT1 0x04 +/* LED control */ +#define LOCOMO_LPT_TOFH 0x80 +#define LOCOMO_LPT_TOFL 0x08 +#define LOCOMO_LPT_TOH(TOH) ((TOH & 0x7) << 4) +#define LOCOMO_LPT_TOL(TOL) ((TOL & 0x7)) extern struct bus_type locomo_bus_type; +#define LOCOMO_DEVID_KEYBOARD 0 +#define LOCOMO_DEVID_FRONTLIGHT 1 +#define LOCOMO_DEVID_BACKLIGHT 2 +#define LOCOMO_DEVID_AUDIO 3 +#define LOCOMO_DEVID_LED 4 +#define LOCOMO_DEVID_UART 5 + struct locomo_dev { struct device dev; unsigned int devid; - struct resource res; - void *mapbase; unsigned int irq[1]; + + void *mapbase; + unsigned long length; + u64 dma_mask; }; @@ -200,5 +193,14 @@ int locomo_driver_register(struct locomo_driver *); void locomo_driver_unregister(struct locomo_driver *); + +/* GPIO control functions */ +void locomo_gpio_set_dir(struct locomo_dev *ldev, unsigned int bits, unsigned int dir); +unsigned int locomo_gpio_read_level(struct locomo_dev *ldev, unsigned int bits); +unsigned int locomo_gpio_read_output(struct locomo_dev *ldev, unsigned int bits); +void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int set); + +/* M62332 control function */ +void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); #endif diff -Nru a/include/asm-arm/io.h b/include/asm-arm/io.h --- a/include/asm-arm/io.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/io.h 2005-03-07 14:54:16 -08:00 @@ -47,13 +47,13 @@ extern void __raw_readsw(void __iomem *addr, void *data, int wordlen); extern void __raw_readsl(void __iomem *addr, void *data, int longlen); -#define __raw_writeb(v,a) (*(volatile unsigned char __force *)(a) = (v)) -#define __raw_writew(v,a) (*(volatile unsigned short __force *)(a) = (v)) -#define __raw_writel(v,a) (*(volatile unsigned int __force *)(a) = (v)) +#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v)) +#define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v)) +#define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a) = (v)) -#define __raw_readb(a) (*(volatile unsigned char __force *)(a)) -#define __raw_readw(a) (*(volatile unsigned short __force *)(a)) -#define __raw_readl(a) (*(volatile unsigned int __force *)(a)) +#define __raw_readb(a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a)) +#define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a)) +#define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a)) /* * Bad read/write accesses... diff -Nru a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h --- a/include/asm-arm/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -106,6 +106,13 @@ #define USER_PTRS_PER_PGD ((TASK_SIZE/PGDIR_SIZE) - FIRST_USER_PGD_NR) /* + * ARMv6 supersection address mask and size definitions. + */ +#define SUPERSECTION_SHIFT 24 +#define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT) +#define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1)) + +/* * Hardware page table definitions. * * + Level 1 descriptor (PMD) @@ -129,6 +136,7 @@ #define PMD_SECT_APX (1 << 15) /* v6 */ #define PMD_SECT_S (1 << 16) /* v6 */ #define PMD_SECT_nG (1 << 17) /* v6 */ +#define PMD_SECT_SUPER (1 << 18) /* v6 */ #define PMD_SECT_UNCACHED (0) #define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE) @@ -254,7 +262,7 @@ #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) #define pte_none(pte) (!pte_val(pte)) -#define pte_clear(ptep) set_pte((ptep), __pte(0)) +#define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0)) #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) #define pte_offset_kernel(dir,addr) (pmd_page_kernel(*(dir)) + __pte_index(addr)) #define pte_offset_map(dir,addr) (pmd_page_kernel(*(dir)) + __pte_index(addr)) @@ -263,6 +271,7 @@ #define pte_unmap_nested(pte) do { } while (0) #define set_pte(ptep, pte) cpu_set_pte(ptep,pte) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) /* * The following only work if pte_present() is true. @@ -307,12 +316,6 @@ #define pmd_none(pmd) (!pmd_val(pmd)) #define pmd_present(pmd) (pmd_val(pmd)) #define pmd_bad(pmd) (pmd_val(pmd) & 2) - -#define set_pmd(pmdp,pmd) \ - do { \ - *(pmdp) = pmd; \ - flush_pmd_entry(pmdp); \ - } while (0) #define copy_pmd(pmdpd,pmdps) \ do { \ diff -Nru a/include/asm-arm/rtc.h b/include/asm-arm/rtc.h --- a/include/asm-arm/rtc.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-arm/rtc.h 2005-03-07 14:54:17 -08:00 @@ -27,6 +27,7 @@ void rtc_time_to_tm(unsigned long, struct rtc_time *); int rtc_tm_to_time(struct rtc_time *, unsigned long *); +int rtc_valid_tm(struct rtc_time *); void rtc_next_alarm_time(struct rtc_time *, struct rtc_time *, struct rtc_time *); void rtc_update(unsigned long, unsigned long); int register_rtc(struct rtc_ops *); diff -Nru a/include/asm-arm/system.h b/include/asm-arm/system.h --- a/include/asm-arm/system.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm/system.h 2005-03-07 14:54:16 -08:00 @@ -383,6 +383,8 @@ #endif /* __ASSEMBLY__ */ +#define arch_align_stack(x) (x) + #endif /* __KERNEL__ */ #endif diff -Nru a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h --- a/include/asm-arm/unistd.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm/unistd.h 2005-03-07 14:54:18 -08:00 @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/unistd.h * - * Copyright (C) 2001-2003 Russell King + * Copyright (C) 2001-2005 Russell King * * 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 @@ -307,6 +307,44 @@ #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) #define __NR_waitid (__NR_SYSCALL_BASE+280) +#if 0 /* reserve these for un-muxing socketcall */ +#define __NR_socket (__NR_SYSCALL_BASE+281) +#define __NR_bind (__NR_SYSCALL_BASE+282) +#define __NR_connect (__NR_SYSCALL_BASE+283) +#define __NR_listen (__NR_SYSCALL_BASE+284) +#define __NR_accept (__NR_SYSCALL_BASE+285) +#define __NR_getsockname (__NR_SYSCALL_BASE+286) +#define __NR_getpeername (__NR_SYSCALL_BASE+287) +#define __NR_socketpair (__NR_SYSCALL_BASE+288) +#define __NR_send (__NR_SYSCALL_BASE+289) +#define __NR_sendto (__NR_SYSCALL_BASE+290) +#define __NR_recv (__NR_SYSCALL_BASE+291) +#define __NR_recvfrom (__NR_SYSCALL_BASE+292) +#define __NR_shutdown (__NR_SYSCALL_BASE+293) +#define __NR_setsockopt (__NR_SYSCALL_BASE+294) +#define __NR_getsockopt (__NR_SYSCALL_BASE+295) +#define __NR_sendmsg (__NR_SYSCALL_BASE+296) +#define __NR_recvmsg (__NR_SYSCALL_BASE+297) +#endif + +#if 0 /* reserve these for un-muxing ipc */ +#define __NR_semop (__NR_SYSCALL_BASE+298) +#define __NR_semget (__NR_SYSCALL_BASE+299) +#define __NR_semctl (__NR_SYSCALL_BASE+300) +#define __NR_msgsnd (__NR_SYSCALL_BASE+301) +#define __NR_msgrcv (__NR_SYSCALL_BASE+302) +#define __NR_msgget (__NR_SYSCALL_BASE+303) +#define __NR_msgctl (__NR_SYSCALL_BASE+304) +#define __NR_shmat (__NR_SYSCALL_BASE+305) +#define __NR_shmdt (__NR_SYSCALL_BASE+306) +#define __NR_shmget (__NR_SYSCALL_BASE+307) +#define __NR_shmctl (__NR_SYSCALL_BASE+308) +#endif + +#define __NR_add_key (__NR_SYSCALL_BASE+309) +#define __NR_request_key (__NR_SYSCALL_BASE+310) +#define __NR_keyctl (__NR_SYSCALL_BASE+311) + /* * The following SWIs are ARM private. */ @@ -335,7 +373,7 @@ #define __syscall_return(type, res) \ do { \ - if ((unsigned long)(res) >= (unsigned long)(-125)) { \ + if ((unsigned long)(res) >= (unsigned long)(-129)) { \ errno = -(res); \ res = -1; \ } \ diff -Nru a/include/asm-arm26/cacheflush.h b/include/asm-arm26/cacheflush.h --- a/include/asm-arm26/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-arm26/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -23,7 +23,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma,start,end) do { } while (0) -#define flush_cache_page(vma,vmaddr) do { } while (0) +#define flush_cache_page(vma,vmaddr,pfn) do { } while (0) #define flush_cache_vmap(start, end) do { } while (0) #define flush_cache_vunmap(start, end) do { } while (0) diff -Nru a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h --- a/include/asm-arm26/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-arm26/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -154,7 +154,8 @@ #define pte_none(pte) (!pte_val(pte)) #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) #define set_pte(pte_ptr, pte) ((*(pte_ptr)) = (pte)) -#define pte_clear(ptep) set_pte((ptep), __pte(0)) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) +#define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0)) /* macros to ease the getting of pointers to stuff... */ #define pgd_offset(mm, addr) ((pgd_t *)(mm)->pgd + __pgd_index(addr)) diff -Nru a/include/asm-arm26/system.h b/include/asm-arm26/system.h --- a/include/asm-arm26/system.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-arm26/system.h 2005-03-07 14:54:18 -08:00 @@ -245,6 +245,8 @@ #endif /* __ASSEMBLY__ */ +#define arch_align_stack(x) (x) + #endif /* __KERNEL__ */ #endif diff -Nru a/include/asm-cris/cacheflush.h b/include/asm-cris/cacheflush.h --- a/include/asm-cris/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-cris/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -10,7 +10,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h --- a/include/asm-cris/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-cris/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -34,6 +34,8 @@ * hook is made available. */ #define set_pte(pteptr, pteval) ((*(pteptr)) = (pteval)) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + /* * (pmds are folded into pgds so this doesn't get actually called, * but the define is needed for a generic inline function.) @@ -101,7 +103,7 @@ #define pte_none(x) (!pte_val(x)) #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) -#define pte_clear(xp) do { pte_val(*(xp)) = 0; } while (0) +#define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) #define pmd_none(x) (!pmd_val(x)) /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad diff -Nru a/include/asm-cris/system.h b/include/asm-cris/system.h --- a/include/asm-cris/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-cris/system.h 2005-03-07 14:54:17 -08:00 @@ -69,4 +69,6 @@ return x; } +#define arch_align_stack(x) (x) + #endif diff -Nru a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h --- a/include/asm-frv/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-frv/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -21,7 +21,7 @@ #define flush_cache_all() do {} while(0) #define flush_cache_mm(mm) do {} while(0) #define flush_cache_range(mm, start, end) do {} while(0) -#define flush_cache_page(vma, vmaddr) do {} while(0) +#define flush_cache_page(vma, vmaddr, pfn) do {} while(0) #define flush_cache_vmap(start, end) do {} while(0) #define flush_cache_vunmap(start, end) do {} while(0) #define flush_dcache_mmap_lock(mapping) do {} while(0) diff -Nru a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h --- a/include/asm-frv/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-frv/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -173,6 +173,7 @@ *(pteptr) = (pteval); \ asm volatile("dcf %M0" :: "U"(*pteptr)); \ } while(0) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #define set_pte_atomic(pteptr, pteval) set_pte((pteptr), (pteval)) @@ -353,7 +354,7 @@ #undef TEST_VERIFY_AREA #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) -#define pte_clear(xp) do { set_pte(xp, __pte(0)); } while (0) +#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #define pmd_none(x) (!pmd_val(x)) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) @@ -390,39 +391,33 @@ static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte |= _PAGE_ACCESSED; return pte; } static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte &= ~_PAGE_WP; return pte; } -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { int i = test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); asm volatile("dcf %M0" :: "U"(*ptep)); return i; } -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { int i = test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); asm volatile("dcf %M0" :: "U"(*ptep)); return i; } -static inline pte_t ptep_get_and_clear(pte_t *ptep) +static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { unsigned long x = xchg(&ptep->pte, 0); asm volatile("dcf %M0" :: "U"(*ptep)); return __pte(x); } -static inline void ptep_set_wrprotect(pte_t *ptep) +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { set_bit(_PAGE_BIT_WP, ptep); asm volatile("dcf %M0" :: "U"(*ptep)); } -static inline void ptep_mkdirty(pte_t *ptep) -{ - set_bit(_PAGE_BIT_DIRTY, ptep); - asm volatile("dcf %M0" :: "U"(*ptep)); -} - /* * Conversion functions: convert a page and protection to a page entry, * and a page entry and page directory to the page they refer to. @@ -512,7 +507,6 @@ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #include diff -Nru a/include/asm-frv/system.h b/include/asm-frv/system.h --- a/include/asm-frv/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-frv/system.h 2005-03-07 14:54:17 -08:00 @@ -123,4 +123,6 @@ extern void die_if_kernel(const char *, ...) __attribute__((format(printf, 1, 2))); extern void free_initmem(void); +#define arch_align_stack(x) (x) + #endif /* _ASM_SYSTEM_H */ diff -Nru a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h --- a/include/asm-generic/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-generic/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -16,7 +16,7 @@ #ifndef __HAVE_ARCH_SET_PTE_ATOMIC #define ptep_establish(__vma, __address, __ptep, __entry) \ do { \ - set_pte(__ptep, __entry); \ + set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ flush_tlb_page(__vma, __address); \ } while (0) #else /* __HAVE_ARCH_SET_PTE_ATOMIC */ @@ -37,26 +37,30 @@ */ #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ do { \ - set_pte(__ptep, __entry); \ + set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ flush_tlb_page(__vma, __address); \ } while (0) #endif #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG -static inline int ptep_test_and_clear_young(pte_t *ptep) -{ - pte_t pte = *ptep; - if (!pte_young(pte)) - return 0; - set_pte(ptep, pte_mkold(pte)); - return 1; -} +#define ptep_test_and_clear_young(__vma, __address, __ptep) \ +({ \ + pte_t __pte = *(__ptep); \ + int r = 1; \ + if (!pte_young(__pte)) \ + r = 0; \ + else \ + set_pte_at((__vma)->vm_mm, (__address), \ + (__ptep), pte_mkold(__pte)); \ + r; \ +}) #endif #ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH #define ptep_clear_flush_young(__vma, __address, __ptep) \ ({ \ - int __young = ptep_test_and_clear_young(__ptep); \ + int __young; \ + __young = ptep_test_and_clear_young(__vma, __address, __ptep); \ if (__young) \ flush_tlb_page(__vma, __address); \ __young; \ @@ -64,20 +68,24 @@ #endif #ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY -static inline int ptep_test_and_clear_dirty(pte_t *ptep) -{ - pte_t pte = *ptep; - if (!pte_dirty(pte)) - return 0; - set_pte(ptep, pte_mkclean(pte)); - return 1; -} +#define ptep_test_and_clear_dirty(__vma, __address, __ptep) \ +({ \ + pte_t __pte = *ptep; \ + int r = 1; \ + if (!pte_dirty(__pte)) \ + r = 0; \ + else \ + set_pte_at((__vma)->vm_mm, (__address), (__ptep), \ + pte_mkclean(__pte)); \ + r; \ +}) #endif #ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH #define ptep_clear_flush_dirty(__vma, __address, __ptep) \ ({ \ - int __dirty = ptep_test_and_clear_dirty(__ptep); \ + int __dirty; \ + __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); \ if (__dirty) \ flush_tlb_page(__vma, __address); \ __dirty; \ @@ -85,36 +93,29 @@ #endif #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR -static inline pte_t ptep_get_and_clear(pte_t *ptep) -{ - pte_t pte = *ptep; - pte_clear(ptep); - return pte; -} +#define ptep_get_and_clear(__mm, __address, __ptep) \ +({ \ + pte_t __pte = *(__ptep); \ + pte_clear((__mm), (__address), (__ptep)); \ + __pte; \ +}) #endif #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH #define ptep_clear_flush(__vma, __address, __ptep) \ ({ \ - pte_t __pte = ptep_get_and_clear(__ptep); \ + pte_t __pte; \ + __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); \ flush_tlb_page(__vma, __address); \ __pte; \ }) #endif #ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT -static inline void ptep_set_wrprotect(pte_t *ptep) -{ - pte_t old_pte = *ptep; - set_pte(ptep, pte_wrprotect(old_pte)); -} -#endif - -#ifndef __HAVE_ARCH_PTEP_MKDIRTY -static inline void ptep_mkdirty(pte_t *ptep) +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep) { pte_t old_pte = *ptep; - set_pte(ptep, pte_mkdirty(old_pte)); + set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); } #endif diff -Nru a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h --- a/include/asm-h8300/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-h8300/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -13,7 +13,7 @@ #define flush_cache_all() #define flush_cache_mm(mm) #define flush_cache_range(vma,a,b) -#define flush_cache_page(vma,p) +#define flush_cache_page(vma,p,pfn) #define flush_dcache_page(page) #define flush_dcache_mmap_lock(mapping) #define flush_dcache_mmap_unlock(mapping) diff -Nru a/include/asm-h8300/system.h b/include/asm-h8300/system.h --- a/include/asm-h8300/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-h8300/system.h 2005-03-07 14:54:17 -08:00 @@ -144,4 +144,6 @@ asm("jmp @@0"); \ }) +#define arch_align_stack(x) (x) + #endif /* _H8300_SYSTEM_H */ diff -Nru a/include/asm-i386/cacheflush.h b/include/asm-i386/cacheflush.h --- a/include/asm-i386/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-i386/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -8,7 +8,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h --- a/include/asm-i386/pgtable-2level.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-i386/pgtable-2level.h 2005-03-07 14:54:17 -08:00 @@ -14,10 +14,11 @@ * hook is made available. */ #define set_pte(pteptr, pteval) (*(pteptr) = pteval) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) -#define ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte_low, 0)) +#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) #define pte_same(a, b) ((a).pte_low == (b).pte_low) #define pte_page(x) pfn_to_page(pte_pfn(x)) #define pte_none(x) (!(x).pte_low) diff -Nru a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h --- a/include/asm-i386/pgtable-3level.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-i386/pgtable-3level.h 2005-03-07 14:54:18 -08:00 @@ -56,6 +56,8 @@ smp_wmb(); ptep->pte_low = pte.pte_low; } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + #define __HAVE_ARCH_SET_PTE_ATOMIC #define set_pte_atomic(pteptr,pteval) \ set_64bit((unsigned long long *)(pteptr),pte_val(pteval)) @@ -88,7 +90,7 @@ #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ pmd_index(address)) -static inline pte_t ptep_get_and_clear(pte_t *ptep) +static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t res; diff -Nru a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h --- a/include/asm-i386/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-i386/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -201,7 +201,7 @@ extern unsigned long pg0[]; #define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) -#define pte_clear(xp) do { set_pte(xp, __pte(0)); } while (0) +#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #define pmd_none(x) (!pmd_val(x)) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) @@ -243,22 +243,24 @@ # include #endif -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { if (!pte_dirty(*ptep)) return 0; return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte_low); } -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { if (!pte_young(*ptep)) return 0; return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); } -static inline void ptep_set_wrprotect(pte_t *ptep) { clear_bit(_PAGE_BIT_RW, &ptep->pte_low); } -static inline void ptep_mkdirty(pte_t *ptep) { set_bit(_PAGE_BIT_DIRTY, &ptep->pte_low); } +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) +{ + clear_bit(_PAGE_BIT_RW, &ptep->pte_low); +} /* * Macro to mark a page protection value as "uncacheable". On processors which do not support @@ -407,7 +409,6 @@ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #include diff -Nru a/include/asm-i386/system.h b/include/asm-i386/system.h --- a/include/asm-i386/system.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-i386/system.h 2005-03-07 14:54:16 -08:00 @@ -468,4 +468,6 @@ extern int es7000_plat; void cpu_idle_wait(void); +extern unsigned long arch_align_stack(unsigned long sp); + #endif diff -Nru a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h --- a/include/asm-i386/uaccess.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-i386/uaccess.h 2005-03-07 14:54:16 -08:00 @@ -185,6 +185,21 @@ extern void __put_user_bad(void); +/* + * Strange magic calling convention: pointer in %ecx, + * value in %eax(:%edx), return value in %eax, no clobbers. + */ +extern void __put_user_1(void); +extern void __put_user_2(void); +extern void __put_user_4(void); +extern void __put_user_8(void); + +#define __put_user_1(x, ptr) __asm__ __volatile__("call __put_user_1":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr)) +#define __put_user_2(x, ptr) __asm__ __volatile__("call __put_user_2":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr)) +#define __put_user_4(x, ptr) __asm__ __volatile__("call __put_user_4":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr)) +#define __put_user_8(x, ptr) __asm__ __volatile__("call __put_user_8":"=a" (__ret_pu):"A" ((typeof(*(ptr)))(x)), "c" (ptr)) +#define __put_user_X(x, ptr) __asm__ __volatile__("call __put_user_X":"=a" (__ret_pu):"c" (ptr)) + /** * put_user: - Write a simple value into user space. * @x: Value to copy to user space. @@ -201,9 +216,18 @@ * * Returns zero on success, or -EFAULT on error. */ -#define put_user(x,ptr) \ - __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) - +#define put_user(x,ptr) \ +({ int __ret_pu; \ + __chk_user_ptr(ptr); \ + switch(sizeof(*(ptr))) { \ + case 1: __put_user_1(x, ptr); break; \ + case 2: __put_user_2(x, ptr); break; \ + case 4: __put_user_4(x, ptr); break; \ + case 8: __put_user_8(x, ptr); break; \ + default:__put_user_X(x, ptr); break; \ + } \ + __ret_pu; \ +}) /** * __get_user: - Get a simple variable from user space, with less checking. @@ -258,16 +282,6 @@ __pu_err; \ }) - -#define __put_user_check(x,ptr,size) \ -({ \ - long __pu_err = -EFAULT; \ - __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ - might_sleep(); \ - if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ - __put_user_size((x),__pu_addr,(size),__pu_err,-EFAULT); \ - __pu_err; \ -}) #define __put_user_u64(x, addr, err) \ __asm__ __volatile__( \ diff -Nru a/include/asm-ia64/cacheflush.h b/include/asm-ia64/cacheflush.h --- a/include/asm-ia64/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ia64/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -19,7 +19,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_icache_page(vma,page) do { } while (0) #define flush_cache_vmap(start, end) do { } while (0) #define flush_cache_vunmap(start, end) do { } while (0) diff -Nru a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h --- a/include/asm-ia64/pci.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ia64/pci.h 2005-03-07 14:54:18 -08:00 @@ -121,14 +121,9 @@ extern struct pci_ops pci_root_ops; -static inline int pci_name_bus(char *name, struct pci_bus *bus) +static inline int pci_proc_domain(struct pci_bus *bus) { - if (pci_domain_nr(bus) == 0) { - sprintf(name, "%02x", bus->number); - } else { - sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number); - } - return 0; + return (pci_domain_nr(bus) != 0); } static inline void pcibios_add_platform_entries(struct pci_dev *dev) diff -Nru a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h --- a/include/asm-ia64/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ia64/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -202,6 +202,7 @@ * the PTE in a page table. Nothing special needs to be on IA-64. */ #define set_pte(ptep, pteval) (*(ptep) = (pteval)) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #define RGN_SIZE (1UL << 61) #define RGN_KERNEL 7 @@ -243,7 +244,7 @@ #define pte_none(pte) (!pte_val(pte)) #define pte_present(pte) (pte_val(pte) & (_PAGE_P | _PAGE_PROTNONE)) -#define pte_clear(pte) (pte_val(*(pte)) = 0UL) +#define pte_clear(mm,addr,pte) (pte_val(*(pte)) = 0UL) /* pte_page() returns the "struct page *" corresponding to the PTE: */ #define pte_page(pte) virt_to_page(((pte_val(pte) & _PFN_MASK) + PAGE_OFFSET)) @@ -345,7 +346,7 @@ /* atomic versions of the some PTE manipulations: */ static inline int -ptep_test_and_clear_young (pte_t *ptep) +ptep_test_and_clear_young (struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP if (!pte_young(*ptep)) @@ -355,13 +356,13 @@ pte_t pte = *ptep; if (!pte_young(pte)) return 0; - set_pte(ptep, pte_mkold(pte)); + set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte)); return 1; #endif } static inline int -ptep_test_and_clear_dirty (pte_t *ptep) +ptep_test_and_clear_dirty (struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP if (!pte_dirty(*ptep)) @@ -371,25 +372,25 @@ pte_t pte = *ptep; if (!pte_dirty(pte)) return 0; - set_pte(ptep, pte_mkclean(pte)); + set_pte_at(vma->vm_mm, addr, ptep, pte_mkclean(pte)); return 1; #endif } static inline pte_t -ptep_get_and_clear (pte_t *ptep) +ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP return __pte(xchg((long *) ptep, 0)); #else pte_t pte = *ptep; - pte_clear(ptep); + pte_clear(mm, addr, ptep); return pte; #endif } static inline void -ptep_set_wrprotect (pte_t *ptep) +ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP unsigned long new, old; @@ -400,18 +401,7 @@ } while (cmpxchg((unsigned long *) ptep, old, new) != old); #else pte_t old_pte = *ptep; - set_pte(ptep, pte_wrprotect(old_pte)); -#endif -} - -static inline void -ptep_mkdirty (pte_t *ptep) -{ -#ifdef CONFIG_SMP - set_bit(_PAGE_D_BIT, ptep); -#else - pte_t old_pte = *ptep; - set_pte(ptep, pte_mkdirty(old_pte)); + set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); #endif } @@ -558,7 +548,6 @@ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #define __HAVE_ARCH_PGD_OFFSET_GATE #include diff -Nru a/include/asm-ia64/system.h b/include/asm-ia64/system.h --- a/include/asm-ia64/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ia64/system.h 2005-03-07 14:54:17 -08:00 @@ -285,6 +285,9 @@ #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) void cpu_idle_wait(void); + +#define arch_align_stack(x) (x) + #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h --- a/include/asm-m32r/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-m32r/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -11,7 +11,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) @@ -31,7 +31,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) @@ -43,7 +43,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h --- a/include/asm-m32r/pgtable-2level.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-m32r/pgtable-2level.h 2005-03-07 14:54:16 -08:00 @@ -44,6 +44,7 @@ * hook is made available. */ #define set_pte(pteptr, pteval) (*(pteptr) = pteval) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #define set_pte_atomic(pteptr, pteval) set_pte(pteptr, pteval) /* * (pmds are folded into pgds so this doesnt get actually called, @@ -60,7 +61,7 @@ return (pmd_t *) dir; } -#define ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte, 0)) +#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) #define pte_same(a, b) (pte_val(a) == pte_val(b)) #define pte_page(x) pfn_to_page(pte_pfn(x)) #define pte_none(x) (!pte_val(x)) diff -Nru a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h --- a/include/asm-m32r/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-m32r/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -176,7 +176,7 @@ /* page table for 0-4MB for everybody */ #define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE)) -#define pte_clear(xp) do { set_pte(xp, __pte(0)); } while (0) +#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #define pmd_none(x) (!pmd_val(x)) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) @@ -282,26 +282,21 @@ return pte; } -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); } -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); } -static inline void ptep_set_wrprotect(pte_t *ptep) +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { clear_bit(_PAGE_BIT_WRITE, ptep); } -static inline void ptep_mkdirty(pte_t *ptep) -{ - set_bit(_PAGE_BIT_DIRTY, ptep); -} - /* * Macro and implementation to make a page protection as uncachable. */ @@ -390,7 +385,6 @@ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #include diff -Nru a/include/asm-m32r/system.h b/include/asm-m32r/system.h --- a/include/asm-m32r/system.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-m32r/system.h 2005-03-07 14:54:16 -08:00 @@ -294,4 +294,6 @@ #define set_mb(var, value) do { xchg(&var, value); } while (0) #define set_wmb(var, value) do { var = value; wmb(); } while (0) +#define arch_align_stack(x) (x) + #endif /* _ASM_M32R_SYSTEM_H */ diff -Nru a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h --- a/include/asm-m68k/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-m68k/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -99,8 +99,7 @@ __flush_cache_030(); } -static inline void flush_cache_page(struct vm_area_struct *vma, - unsigned long vmaddr) +static inline void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) { if (vma->vm_mm == current->mm) __flush_cache_030(); @@ -134,15 +133,15 @@ #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) extern void flush_icache_range(unsigned long address, unsigned long endaddr); diff -Nru a/include/asm-m68k/motorola_pgtable.h b/include/asm-m68k/motorola_pgtable.h --- a/include/asm-m68k/motorola_pgtable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-m68k/motorola_pgtable.h 2005-03-07 14:54:17 -08:00 @@ -129,7 +129,7 @@ #define pte_none(pte) (!pte_val(pte)) #define pte_present(pte) (pte_val(pte) & (_PAGE_PRESENT | _PAGE_PROTNONE)) -#define pte_clear(ptep) ({ pte_val(*(ptep)) = 0; }) +#define pte_clear(mm,addr,ptep) ({ pte_val(*(ptep)) = 0; }) #define pte_page(pte) (mem_map + ((unsigned long)(__va(pte_val(pte)) - PAGE_OFFSET) >> PAGE_SHIFT)) #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) diff -Nru a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h --- a/include/asm-m68k/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-m68k/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -26,6 +26,7 @@ do{ \ *(pteptr) = (pteval); \ } while(0) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) /* PMD_SHIFT determines the size of the area a second-level page table can map */ diff -Nru a/include/asm-m68k/sun3_pgtable.h b/include/asm-m68k/sun3_pgtable.h --- a/include/asm-m68k/sun3_pgtable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-m68k/sun3_pgtable.h 2005-03-07 14:54:17 -08:00 @@ -123,7 +123,10 @@ static inline int pte_none (pte_t pte) { return !pte_val (pte); } static inline int pte_present (pte_t pte) { return pte_val (pte) & SUN3_PAGE_VALID; } -static inline void pte_clear (pte_t *ptep) { pte_val (*ptep) = 0; } +static inline void pte_clear (struct mm_struct *mm, unsigned long addr, pte_t *ptep) +{ + pte_val (*ptep) = 0; +} #define pte_pfn(pte) (pte_val(pte) & SUN3_PAGE_PGNUM_MASK) #define pfn_pte(pfn, pgprot) \ diff -Nru a/include/asm-m68k/system.h b/include/asm-m68k/system.h --- a/include/asm-m68k/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-m68k/system.h 2005-03-07 14:54:17 -08:00 @@ -194,6 +194,8 @@ (unsigned long)(n),sizeof(*(ptr)))) #endif +#define arch_align_stack(x) (x) + #endif /* __KERNEL__ */ #endif /* _M68K_SYSTEM_H */ diff -Nru a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h --- a/include/asm-m68knommu/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-m68knommu/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -9,7 +9,7 @@ #define flush_cache_all() __flush_cache_all() #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_range(start,len) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) diff -Nru a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h --- a/include/asm-m68knommu/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-m68knommu/system.h 2005-03-07 14:54:17 -08:00 @@ -281,5 +281,6 @@ }) #endif #endif +#define arch_align_stack(x) (x) #endif /* _M68KNOMMU_SYSTEM_H */ diff -Nru a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h --- a/include/asm-mips/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-mips/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -17,7 +17,7 @@ * * - flush_cache_all() flushes entire cache * - flush_cache_mm(mm) flushes the specified mm context's cache lines - * - flush_cache_page(mm, vmaddr) flushes a single page + * - flush_cache_page(mm, vmaddr, pfn) flushes a single page * - flush_cache_range(vma, start, end) flushes a range of pages * - flush_icache_range(start, end) flush a range of instructions * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache @@ -34,8 +34,7 @@ extern void (*flush_cache_mm)(struct mm_struct *mm); extern void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, unsigned long end); -extern void (*flush_cache_page)(struct vm_area_struct *vma, - unsigned long page); +extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); extern void __flush_dcache_page(struct page *page); static inline void flush_dcache_page(struct page *page) diff -Nru a/include/asm-mips/pci.h b/include/asm-mips/pci.h --- a/include/asm-mips/pci.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-mips/pci.h 2005-03-07 14:54:17 -08:00 @@ -137,17 +137,10 @@ #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index -static inline int -pci_name_bus(char *name, struct pci_bus *bus) +static inline int pci_proc_domain(struct pci_bus *bus) { struct pci_controller *hose = bus->sysdata; - - if (likely(hose->need_domain_info == 0)) { - sprintf(name, "%02x", bus->number); - } else { - sprintf(name, "%04x:%02x", hose->index, bus->number); - } - return 0; + return hose->need_domain_info; } #endif /* CONFIG_PCI_DOMAINS */ diff -Nru a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h --- a/include/asm-mips/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-mips/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -100,14 +100,15 @@ buddy->pte_low |= _PAGE_GLOBAL; } } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) -static inline void pte_clear(pte_t *ptep) +static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { /* Preserve global status for the pair */ if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) - set_pte(ptep, __pte(_PAGE_GLOBAL)); + set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); else - set_pte(ptep, __pte(0)); + set_pte_at(mm, addr, ptep, __pte(0)); } #else /* @@ -130,16 +131,17 @@ } #endif } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) -static inline void pte_clear(pte_t *ptep) +static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { #if !defined(CONFIG_CPU_R3000) && !defined(CONFIG_CPU_TX39XX) /* Preserve global status for the pair */ if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) - set_pte(ptep, __pte(_PAGE_GLOBAL)); + set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); else #endif - set_pte(ptep, __pte(0)); + set_pte_at(mm, addr, ptep, __pte(0)); } #endif diff -Nru a/include/asm-mips/system.h b/include/asm-mips/system.h --- a/include/asm-mips/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-mips/system.h 2005-03-07 14:54:17 -08:00 @@ -433,4 +433,6 @@ #define finish_arch_switch(rq, prev) spin_unlock_irq(&(prev)->switch_lock) #define task_running(rq, p) ((rq)->curr == (p) || spin_is_locked(&(p)->switch_lock)) +#define arch_align_stack(x) (x) + #endif /* _ASM_SYSTEM_H */ diff -Nru a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h --- a/include/asm-mips/vr41xx/vr41xx.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-mips/vr41xx/vr41xx.h 2005-03-07 14:54:16 -08:00 @@ -45,6 +45,7 @@ /* * Bus Control Uint */ +extern unsigned long vr41xx_calculate_clock_frequency(void); extern unsigned long vr41xx_get_vtclock_frequency(void); extern unsigned long vr41xx_get_tclock_frequency(void); diff -Nru a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h --- a/include/asm-parisc/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-parisc/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -57,9 +57,9 @@ extern void flush_dcache_page(struct page *page); #define flush_dcache_mmap_lock(mapping) \ - spin_lock_irq(&(mapping)->tree_lock) + write_lock_irq(&(mapping)->tree_lock) #define flush_dcache_mmap_unlock(mapping) \ - spin_unlock_irq(&(mapping)->tree_lock) + write_unlock_irq(&(mapping)->tree_lock) #define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page_address(page)); flush_kernel_icache_page(page_address(page)); } while (0) @@ -67,14 +67,14 @@ #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { \ - flush_cache_page(vma, vaddr); \ + flush_cache_page(vma, vaddr, page_to_pfn(page)); \ memcpy(dst, src, len); \ flush_kernel_dcache_range_asm((unsigned long)dst, (unsigned long)dst + len); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ do { \ - flush_cache_page(vma, vaddr); \ + flush_cache_page(vma, vaddr, page_to_pfn(page)); \ memcpy(dst, src, len); \ } while (0) @@ -170,7 +170,7 @@ } static inline void -flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr) +flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) { BUG_ON(!vma->vm_mm->context); diff -Nru a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h --- a/include/asm-parisc/hardware.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-parisc/hardware.h 2005-03-07 14:54:17 -08:00 @@ -122,6 +122,7 @@ extern void get_pci_node_path(struct pci_dev *dev, struct hardware_path *path); extern void init_parisc_bus(void); extern struct device *hwpath_to_device(struct hardware_path *modpath); +extern void device_to_hwpath(struct device *dev, struct hardware_path *path); /* inventory.c: */ diff -Nru a/include/asm-parisc/parport_gsc.h b/include/asm-parisc/parport_gsc.h --- a/include/asm-parisc/parport_gsc.h 2005-03-07 14:54:18 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,193 +0,0 @@ -#ifndef __LINUX_PARPORT_GSC_H -#define __LINUX_PARPORT_GSC_H - -#include -#include - -#undef DEBUG_PARPORT /* undefine for production */ -#define DELAY_TIME 0 - -#if DELAY_TIME == 0 -#define parport_readb gsc_readb -#define parport_writeb gsc_writeb -#else -static __inline__ unsigned char parport_readb( unsigned long port ) -{ - udelay(DELAY_TIME); - return gsc_readb(port); -} - -static __inline__ void parport_writeb( unsigned char value, unsigned long port ) -{ - gsc_writeb(value,port); - udelay(DELAY_TIME); -} -#endif - -/* --- register definitions ------------------------------- */ - -#define EPPDATA(p) ((p)->base + 0x4) -#define EPPADDR(p) ((p)->base + 0x3) -#define CONTROL(p) ((p)->base + 0x2) -#define STATUS(p) ((p)->base + 0x1) -#define DATA(p) ((p)->base + 0x0) - -struct parport_gsc_private { - /* Contents of CTR. */ - unsigned char ctr; - - /* Bitmask of writable CTR bits. */ - unsigned char ctr_writable; - - /* Number of bytes per portword. */ - int pword; - - /* Not used yet. */ - int readIntrThreshold; - int writeIntrThreshold; - - /* buffer suitable for DMA, if DMA enabled */ - char *dma_buf; - dma_addr_t dma_handle; - struct pci_dev *dev; -}; - -extern __inline__ void parport_gsc_write_data(struct parport *p, unsigned char d) -{ -#ifdef DEBUG_PARPORT - printk (KERN_DEBUG "parport_gsc_write_data(%p,0x%02x)\n", p, d); -#endif - parport_writeb(d, DATA(p)); -} - -extern __inline__ unsigned char parport_gsc_read_data(struct parport *p) -{ - unsigned char val = parport_readb (DATA (p)); -#ifdef DEBUG_PARPORT - printk (KERN_DEBUG "parport_gsc_read_data(%p) = 0x%02x\n", - p, val); -#endif - return val; -} - -/* __parport_gsc_frob_control differs from parport_gsc_frob_control in that - * it doesn't do any extra masking. */ -static __inline__ unsigned char __parport_gsc_frob_control (struct parport *p, - unsigned char mask, - unsigned char val) -{ - struct parport_gsc_private *priv = p->physport->private_data; - unsigned char ctr = priv->ctr; -#ifdef DEBUG_PARPORT - printk (KERN_DEBUG - "__parport_gsc_frob_control(%02x,%02x): %02x -> %02x\n", - mask, val, ctr, ((ctr & ~mask) ^ val) & priv->ctr_writable); -#endif - ctr = (ctr & ~mask) ^ val; - ctr &= priv->ctr_writable; /* only write writable bits. */ - parport_writeb (ctr, CONTROL (p)); - priv->ctr = ctr; /* Update soft copy */ - return ctr; -} - -extern __inline__ void parport_gsc_data_reverse (struct parport *p) -{ - __parport_gsc_frob_control (p, 0x20, 0x20); -} - -extern __inline__ void parport_gsc_data_forward (struct parport *p) -{ - __parport_gsc_frob_control (p, 0x20, 0x00); -} - -extern __inline__ void parport_gsc_write_control (struct parport *p, - unsigned char d) -{ - const unsigned char wm = (PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD | - PARPORT_CONTROL_INIT | - PARPORT_CONTROL_SELECT); - - /* Take this out when drivers have adapted to newer interface. */ - if (d & 0x20) { - printk (KERN_DEBUG "%s (%s): use data_reverse for this!\n", - p->name, p->cad->name); - parport_gsc_data_reverse (p); - } - - __parport_gsc_frob_control (p, wm, d & wm); -} - -extern __inline__ unsigned char parport_gsc_read_control(struct parport *p) -{ - const unsigned char rm = (PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD | - PARPORT_CONTROL_INIT | - PARPORT_CONTROL_SELECT); - const struct parport_gsc_private *priv = p->physport->private_data; - return priv->ctr & rm; /* Use soft copy */ -} - -extern __inline__ unsigned char parport_gsc_frob_control (struct parport *p, - unsigned char mask, - unsigned char val) -{ - const unsigned char wm = (PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD | - PARPORT_CONTROL_INIT | - PARPORT_CONTROL_SELECT); - - /* Take this out when drivers have adapted to newer interface. */ - if (mask & 0x20) { - printk (KERN_DEBUG "%s (%s): use data_%s for this!\n", - p->name, p->cad->name, - (val & 0x20) ? "reverse" : "forward"); - if (val & 0x20) - parport_gsc_data_reverse (p); - else - parport_gsc_data_forward (p); - } - - /* Restrict mask and val to control lines. */ - mask &= wm; - val &= wm; - - return __parport_gsc_frob_control (p, mask, val); -} - -extern __inline__ unsigned char parport_gsc_read_status(struct parport *p) -{ - return parport_readb (STATUS(p)); -} - - -extern __inline__ void parport_gsc_disable_irq(struct parport *p) -{ - __parport_gsc_frob_control (p, 0x10, 0x00); -} - -extern __inline__ void parport_gsc_enable_irq(struct parport *p) -{ - __parport_gsc_frob_control (p, 0x10, 0x10); -} - -extern void parport_gsc_release_resources(struct parport *p); - -extern int parport_gsc_claim_resources(struct parport *p); - -extern void parport_gsc_init_state(struct pardevice *, struct parport_state *s); - -extern void parport_gsc_save_state(struct parport *p, struct parport_state *s); - -extern void parport_gsc_restore_state(struct parport *p, struct parport_state *s); - -extern void parport_gsc_inc_use_count(void); - -extern void parport_gsc_dec_use_count(void); - -extern struct parport *parport_gsc_probe_port (unsigned long base, - unsigned long base_hi, - int irq, int dma, - struct pci_dev *dev); - -#endif diff -Nru a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h --- a/include/asm-parisc/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-parisc/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -39,6 +39,7 @@ do{ \ *(pteptr) = (pteval); \ } while(0) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #endif /* !__ASSEMBLY__ */ @@ -263,7 +264,7 @@ #define pte_none(x) ((pte_val(x) == 0) || (pte_val(x) & _PAGE_FLUSH)) #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) -#define pte_clear(xp) do { pte_val(*(xp)) = 0; } while (0) +#define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) #define pmd_flag(x) (pmd_val(x) & PxD_FLAG_MASK) #define pmd_address(x) ((unsigned long)(pmd_val(x) &~ PxD_FLAG_MASK) << PxD_VALUE_SHIFT) @@ -431,7 +432,7 @@ #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP if (!pte_young(*ptep)) @@ -441,12 +442,12 @@ pte_t pte = *ptep; if (!pte_young(pte)) return 0; - set_pte(ptep, pte_mkold(pte)); + set_pte_at(vma->vm_mm, addr, ptep, pte_mkold(pte)); return 1; #endif } -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP if (!pte_dirty(*ptep)) @@ -456,14 +457,14 @@ pte_t pte = *ptep; if (!pte_dirty(pte)) return 0; - set_pte(ptep, pte_mkclean(pte)); + set_pte_at(vma->vm_mm, addr, ptep, pte_mkclean(pte)); return 1; #endif } extern spinlock_t pa_dbit_lock; -static inline pte_t ptep_get_and_clear(pte_t *ptep) +static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t old_pte; pte_t pte; @@ -472,13 +473,13 @@ pte = old_pte = *ptep; pte_val(pte) &= ~_PAGE_PRESENT; pte_val(pte) |= _PAGE_FLUSH; - set_pte(ptep,pte); + set_pte_at(mm,addr,ptep,pte); spin_unlock(&pa_dbit_lock); return old_pte; } -static inline void ptep_set_wrprotect(pte_t *ptep) +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { #ifdef CONFIG_SMP unsigned long new, old; @@ -489,17 +490,7 @@ } while (cmpxchg((unsigned long *) ptep, old, new) != old); #else pte_t old_pte = *ptep; - set_pte(ptep, pte_wrprotect(old_pte)); -#endif -} - -static inline void ptep_mkdirty(pte_t *ptep) -{ -#ifdef CONFIG_SMP - set_bit(xlate_pabit(_PAGE_DIRTY_BIT), &pte_val(*ptep)); -#else - pte_t old_pte = *ptep; - set_pte(ptep, pte_mkdirty(old_pte)); + set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); #endif } @@ -518,7 +509,6 @@ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #include diff -Nru a/include/asm-parisc/system.h b/include/asm-parisc/system.h --- a/include/asm-parisc/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-parisc/system.h 2005-03-07 14:54:17 -08:00 @@ -205,4 +205,6 @@ #endif +#define arch_align_stack(x) (x) + #endif diff -Nru a/include/asm-ppc/cacheflush.h b/include/asm-ppc/cacheflush.h --- a/include/asm-ppc/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -22,7 +22,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, a, b) do { } while (0) -#define flush_cache_page(vma, p) do { } while (0) +#define flush_cache_page(vma, p, pfn) do { } while (0) #define flush_icache_page(vma, page) do { } while (0) #define flush_cache_vmap(start, end) do { } while (0) #define flush_cache_vunmap(start, end) do { } while (0) diff -Nru a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h --- a/include/asm-ppc/cpm2.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc/cpm2.h 2005-03-07 14:54:17 -08:00 @@ -531,7 +531,7 @@ #define SCU_PSMR_RPM ((ushort)0x000c) #define SCU_PSMR_REVP ((ushort)0x0008) #define SCU_PSMR_TPM ((ushort)0x0003) -#define SCU_PSMR_TEVP ((ushort)0x0003) +#define SCU_PSMR_TEVP ((ushort)0x0002) /* CPM Transparent mode SCC. */ diff -Nru a/include/asm-ppc/cputable.h b/include/asm-ppc/cputable.h --- a/include/asm-ppc/cputable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc/cputable.h 2005-03-07 14:54:17 -08:00 @@ -61,6 +61,11 @@ extern struct cpu_spec cpu_specs[]; extern struct cpu_spec *cur_cpu_spec[]; +static inline unsigned int cpu_has_feature(unsigned int feature) +{ + return cur_cpu_spec[0]->cpu_features & feature; +} + #endif /* __ASSEMBLY__ */ /* CPU kernel features */ diff -Nru a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h --- a/include/asm-ppc/highmem.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/highmem.h 2005-03-07 14:54:18 -08:00 @@ -90,7 +90,7 @@ #ifdef HIGHMEM_DEBUG BUG_ON(!pte_none(*(kmap_pte+idx))); #endif - set_pte(kmap_pte+idx, mk_pte(page, kmap_prot)); + set_pte_at(&init_mm, vaddr, kmap_pte+idx, mk_pte(page, kmap_prot)); flush_tlb_page(NULL, vaddr); return (void*) vaddr; @@ -114,7 +114,7 @@ * force other mappings to Oops if they'll try to access * this pte without first remap it */ - pte_clear(kmap_pte+idx); + pte_clear(&init_mm, vaddr, kmap_pte+idx); flush_tlb_page(NULL, vaddr); #endif dec_preempt_count(); diff -Nru a/include/asm-ppc/io.h b/include/asm-ppc/io.h --- a/include/asm-ppc/io.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/io.h 2005-03-07 14:54:18 -08:00 @@ -30,6 +30,8 @@ #include #elif defined(CONFIG_8260) #include +#elif defined(CONFIG_83xx) +#include #elif defined(CONFIG_85xx) #include #elif defined(CONFIG_APUS) diff -Nru a/include/asm-ppc/ipic.h b/include/asm-ppc/ipic.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-ppc/ipic.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,85 @@ +/* + * include/asm-ppc/ipic.h + * + * IPIC external definitions and structure. + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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. + */ +#ifdef __KERNEL__ +#ifndef __ASM_IPIC_H__ +#define __ASM_IPIC_H__ + +#include + +/* Flags when we init the IPIC */ +#define IPIC_SPREADMODE_GRP_A 0x00000001 +#define IPIC_SPREADMODE_GRP_D 0x00000002 +#define IPIC_SPREADMODE_MIX_A 0x00000004 +#define IPIC_SPREADMODE_MIX_B 0x00000008 +#define IPIC_DISABLE_MCP_OUT 0x00000010 +#define IPIC_IRQ0_MCP 0x00000020 + +/* IPIC registers offsets */ +#define IPIC_SICFR 0x00 /* System Global Interrupt Configuration Register */ +#define IPIC_SIVCR 0x04 /* System Global Interrupt Vector Register */ +#define IPIC_SIPNR_H 0x08 /* System Internal Interrupt Pending Register (HIGH) */ +#define IPIC_SIPNR_L 0x0C /* System Internal Interrupt Pending Register (LOW) */ +#define IPIC_SIPRR_A 0x10 /* System Internal Interrupt group A Priority Register */ +#define IPIC_SIPRR_B 0x14 /* System Internal Interrupt group B Priority Register */ +#define IPIC_SIPRR_C 0x18 /* System Internal Interrupt group C Priority Register */ +#define IPIC_SIPRR_D 0x1C /* System Internal Interrupt group D Priority Register */ +#define IPIC_SIMSR_H 0x20 /* System Internal Interrupt Mask Register (HIGH) */ +#define IPIC_SIMSR_L 0x24 /* System Internal Interrupt Mask Register (LOW) */ +#define IPIC_SICNR 0x28 /* System Internal Interrupt Control Register */ +#define IPIC_SEPNR 0x2C /* System External Interrupt Pending Register */ +#define IPIC_SMPRR_A 0x30 /* System Mixed Interrupt group A Priority Register */ +#define IPIC_SMPRR_B 0x34 /* System Mixed Interrupt group B Priority Register */ +#define IPIC_SEMSR 0x38 /* System External Interrupt Mask Register */ +#define IPIC_SECNR 0x3C /* System External Interrupt Control Register */ +#define IPIC_SERSR 0x40 /* System Error Status Register */ +#define IPIC_SERMR 0x44 /* System Error Mask Register */ +#define IPIC_SERCR 0x48 /* System Error Control Register */ +#define IPIC_SIFCR_H 0x50 /* System Internal Interrupt Force Register (HIGH) */ +#define IPIC_SIFCR_L 0x54 /* System Internal Interrupt Force Register (LOW) */ +#define IPIC_SEFCR 0x58 /* System External Interrupt Force Register */ +#define IPIC_SERFR 0x5C /* System Error Force Register */ +#define IPIC_SCVCR 0x60 /* System Critical Interrupt Vector Register */ +#define IPIC_SMVCR 0x64 /* System Management Interrupt Vector Register */ + +enum ipic_prio_grp { + IPIC_INT_GRP_A = IPIC_SIPRR_A, + IPIC_INT_GRP_D = IPIC_SIPRR_D, + IPIC_MIX_GRP_A = IPIC_SMPRR_A, + IPIC_MIX_GRP_B = IPIC_SMPRR_B, +}; + +enum ipic_mcp_irq { + IPIC_MCP_IRQ0 = 0, + IPIC_MCP_WDT = 1, + IPIC_MCP_SBA = 2, + IPIC_MCP_PCI1 = 5, + IPIC_MCP_PCI2 = 6, + IPIC_MCP_MU = 7, +}; + +extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, + unsigned int irq_offset, + unsigned char *senses, unsigned int senses_count); +extern int ipic_set_priority(unsigned int irq, unsigned int priority); +extern void ipic_set_highest_priority(unsigned int irq); +extern void ipic_set_default_priority(void); +extern void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq); +extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq); +extern u32 ipic_get_mcp_status(void); +extern void ipic_clear_mcp_status(u32 mask); +extern int ipic_get_irq(struct pt_regs *regs); + +#endif /* __ASM_IPIC_H__ */ +#endif /* __KERNEL__ */ diff -Nru a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h --- a/include/asm-ppc/irq.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc/irq.h 2005-03-07 14:54:16 -08:00 @@ -161,6 +161,16 @@ return irq; } +#elif defined(CONFIG_83xx) +#include + +static __inline__ int irq_canonicalize(int irq) +{ + return irq; +} + +#define NR_IRQS (NR_IPIC_INTS) + #elif defined(CONFIG_CPM2) && defined(CONFIG_85xx) /* Now include the board configuration specific associations. */ diff -Nru a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-ppc/mpc83xx.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,114 @@ +/* + * include/asm-ppc/mpc83xx.h + * + * MPC83xx definitions + * + * Maintainer: Kumar Gala + * + * Copyright 2005 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. + */ + +#ifdef __KERNEL__ +#ifndef __ASM_MPC83xx_H__ +#define __ASM_MPC83xx_H__ + +#include +#include + +#ifdef CONFIG_83xx + +#ifdef CONFIG_MPC834x_SYS +#include +#endif + +#define _IO_BASE isa_io_base +#define _ISA_MEM_BASE isa_mem_base +#ifdef CONFIG_PCI +#define PCI_DRAM_OFFSET pci_dram_offset +#else +#define PCI_DRAM_OFFSET 0 +#endif + +/* + * The "residual" board information structure the boot loader passes + * into the kernel. + */ +extern unsigned char __res[]; + +/* Internal IRQs on MPC83xx OpenPIC */ +/* Not all of these exist on all MPC83xx implementations */ + +#ifndef MPC83xx_IPIC_IRQ_OFFSET +#define MPC83xx_IPIC_IRQ_OFFSET 0 +#endif + +#define NR_IPIC_INTS 128 + +#define MPC83xx_IRQ_UART1 ( 9 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_UART2 (10 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_SEC2 (11 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_IIC1 (14 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_IIC2 (15 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_SPI (16 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT1 (17 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT2 (18 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT3 (19 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT4 (20 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT5 (21 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT6 (22 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT7 (23 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_TSEC1_TX (32 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_TSEC1_RX (33 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_TSEC1_ERROR (34 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_TSEC2_TX (35 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_TSEC2_RX (36 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_TSEC2_ERROR (37 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_USB2_DR (38 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_USB2_MPH (39 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_EXT0 (48 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_RTC_SEC (64 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_PIT (65 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_PCI1 (66 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_PCI2 (67 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_RTC_ALR (68 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_MU (69 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_SBA (70 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_DMA (71 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM4 (72 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM8 (73 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GPIO1 (74 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GPIO2 (75 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_DDR (76 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_LBC (77 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM2 (78 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM6 (79 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_PMC (80 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM3 (84 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM7 (85 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM1 (90 + MPC83xx_IPIC_IRQ_OFFSET) +#define MPC83xx_IRQ_GTM5 (91 + MPC83xx_IPIC_IRQ_OFFSET) + +#define MPC83xx_CCSRBAR_SIZE (1024*1024) + +/* Let modules/drivers get at immrbar (physical) */ +extern phys_addr_t immrbar; + +enum ppc_sys_devices { + MPC83xx_TSEC1, + MPC83xx_TSEC2, + MPC83xx_IIC1, + MPC83xx_IIC2, + MPC83xx_DUART, + MPC83xx_SEC2, + MPC83xx_USB2_DR, + MPC83xx_USB2_MPH, +}; + +#endif /* CONFIG_83xx */ +#endif /* __ASM_MPC83xx_H__ */ +#endif /* __KERNEL__ */ diff -Nru a/include/asm-ppc/mv64x60_defs.h b/include/asm-ppc/mv64x60_defs.h --- a/include/asm-ppc/mv64x60_defs.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/mv64x60_defs.h 2005-03-07 14:54:18 -08:00 @@ -36,6 +36,8 @@ #define GT64260_WINDOW_SIZE_MIN 0x00100000 #define MV64360_WINDOW_SIZE_MIN 0x00010000 +#define MV64x60_TCLK_FREQ_MAX 133333333U + /* IRQ's for embedded controllers */ #define MV64x60_IRQ_DEV 1 #define MV64x60_IRQ_CPU_ERR 3 @@ -43,6 +45,11 @@ #define MV64x60_IRQ_TIMER_2_3 9 #define MV64x60_IRQ_TIMER_4_5 10 #define MV64x60_IRQ_TIMER_6_7 11 +#define MV64x60_IRQ_P1_GPP_0_7 24 +#define MV64x60_IRQ_P1_GPP_8_15 25 +#define MV64x60_IRQ_P1_GPP_16_23 26 +#define MV64x60_IRQ_P1_GPP_24_31 27 +#define MV64x60_IRQ_DOORBELL 28 #define MV64x60_IRQ_ETH_0 32 #define MV64x60_IRQ_ETH_1 33 #define MV64x60_IRQ_ETH_2 34 @@ -52,12 +59,49 @@ #define MV64x60_IRQ_MPSC_0 40 #define MV64x60_IRQ_MPSC_1 42 #define MV64x60_IRQ_COMM 43 +#define MV64x60_IRQ_P0_GPP_0_7 56 +#define MV64x60_IRQ_P0_GPP_8_15 57 +#define MV64x60_IRQ_P0_GPP_16_23 58 +#define MV64x60_IRQ_P0_GPP_24_31 59 #define MV64360_IRQ_PCI0 12 #define MV64360_IRQ_SRAM_PAR_ERR 13 #define MV64360_IRQ_PCI1 16 #define MV64360_IRQ_SDMA_1 38 +#define MV64x60_IRQ_GPP0 64 +#define MV64x60_IRQ_GPP1 65 +#define MV64x60_IRQ_GPP2 66 +#define MV64x60_IRQ_GPP3 67 +#define MV64x60_IRQ_GPP4 68 +#define MV64x60_IRQ_GPP5 69 +#define MV64x60_IRQ_GPP6 70 +#define MV64x60_IRQ_GPP7 71 +#define MV64x60_IRQ_GPP8 72 +#define MV64x60_IRQ_GPP9 73 +#define MV64x60_IRQ_GPP10 74 +#define MV64x60_IRQ_GPP11 75 +#define MV64x60_IRQ_GPP12 76 +#define MV64x60_IRQ_GPP13 77 +#define MV64x60_IRQ_GPP14 78 +#define MV64x60_IRQ_GPP15 79 +#define MV64x60_IRQ_GPP16 80 +#define MV64x60_IRQ_GPP17 81 +#define MV64x60_IRQ_GPP18 82 +#define MV64x60_IRQ_GPP19 83 +#define MV64x60_IRQ_GPP20 84 +#define MV64x60_IRQ_GPP21 85 +#define MV64x60_IRQ_GPP22 86 +#define MV64x60_IRQ_GPP23 87 +#define MV64x60_IRQ_GPP24 88 +#define MV64x60_IRQ_GPP25 89 +#define MV64x60_IRQ_GPP26 90 +#define MV64x60_IRQ_GPP27 91 +#define MV64x60_IRQ_GPP28 92 +#define MV64x60_IRQ_GPP29 93 +#define MV64x60_IRQ_GPP30 94 +#define MV64x60_IRQ_GPP31 95 + /* Offsets for register blocks */ #define GT64260_ENET_PHY_ADDR 0x2000 #define GT64260_ENET_ESMIR 0x2010 @@ -303,7 +347,7 @@ #define MV64360_SRAM_ERR_DATA_HI 0x03a0 #define MV64360_SRAM_ERR_PARITY 0x03a8 -#define MV64360_SRAM_SIZE 0x00040000 /* 256 KB of SRAM */ +#define MV64360_SRAM_SIZE 0x00200000 /* 2 MB of SRAM */ /* ***************************************************************************** diff -Nru a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h --- a/include/asm-ppc/pci.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc/pci.h 2005-03-07 14:54:17 -08:00 @@ -79,9 +79,8 @@ #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index /* Set the name of the bus as it appears in /proc/bus/pci */ -static inline int pci_name_bus(char *name, struct pci_bus *bus) +static inline int pci_proc_domain(struct pci_bus *bus) { - sprintf(name, "%02x", bus->number); return 0; } diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h --- a/include/asm-ppc/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -448,7 +448,7 @@ #define pte_none(pte) ((pte_val(pte) & ~_PTE_NONE_MASK) == 0) #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) -#define pte_clear(ptep) do { set_pte((ptep), __pte(0)); } while (0) +#define pte_clear(mm,addr,ptep) do { set_pte_at((mm), (addr), (ptep), __pte(0)); } while (0) #define pmd_none(pmd) (!pmd_val(pmd)) #define pmd_bad(pmd) (pmd_val(pmd) & _PMD_BAD) @@ -512,6 +512,17 @@ } /* + * When flushing the tlb entry for a page, we also need to flush the hash + * table entry. flush_hash_pages is assembler (for speed) in hashtable.S. + */ +extern int flush_hash_pages(unsigned context, unsigned long va, + unsigned long pmdval, int count); + +/* Add an HPTE to the hash table */ +extern void add_hash_page(unsigned context, unsigned long va, + unsigned long pmdval); + +/* * Atomic PTE updates. * * pte_update clears and sets bit atomically, and returns @@ -542,7 +553,8 @@ * On machines which use an MMU hash table we avoid changing the * _PAGE_HASHPTE bit. */ -static inline void set_pte(pte_t *ptep, pte_t pte) +static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) { #if _PAGE_HASHPTE != 0 pte_update(ptep, ~_PAGE_HASHPTE, pte_val(pte) & ~_PAGE_HASHPTE); @@ -551,43 +563,47 @@ #endif } -extern void flush_hash_one_pte(pte_t *ptep); - /* * 2.6 calles this without flushing the TLB entry, this is wrong * for our hash-based implementation, we fix that up here */ -static inline int ptep_test_and_clear_young(pte_t *ptep) +#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG +static inline int __ptep_test_and_clear_young(unsigned int context, unsigned long addr, pte_t *ptep) { unsigned long old; old = pte_update(ptep, _PAGE_ACCESSED, 0); #if _PAGE_HASHPTE != 0 - if (old & _PAGE_HASHPTE) - flush_hash_one_pte(ptep); + if (old & _PAGE_HASHPTE) { + unsigned long ptephys = __pa(ptep) & PAGE_MASK; + flush_hash_pages(context, addr, ptephys, 1); + } #endif return (old & _PAGE_ACCESSED) != 0; } +#define ptep_test_and_clear_young(__vma, __addr, __ptep) \ + __ptep_test_and_clear_young((__vma)->vm_mm->context, __addr, __ptep) -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, + unsigned long addr, pte_t *ptep) { return (pte_update(ptep, (_PAGE_DIRTY | _PAGE_HWWRITE), 0) & _PAGE_DIRTY) != 0; } -static inline pte_t ptep_get_and_clear(pte_t *ptep) +#define __HAVE_ARCH_PTEP_GET_AND_CLEAR +static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) { return __pte(pte_update(ptep, ~_PAGE_HASHPTE, 0)); } -static inline void ptep_set_wrprotect(pte_t *ptep) +#define __HAVE_ARCH_PTEP_SET_WRPROTECT +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) { pte_update(ptep, (_PAGE_RW | _PAGE_HWWRITE), 0); } -static inline void ptep_mkdirty(pte_t *ptep) -{ - pte_update(ptep, 0, _PAGE_DIRTY); -} - #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry, int dirty) { @@ -607,6 +623,7 @@ */ #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NO_CACHE | _PAGE_GUARDED)) +#define __HAVE_ARCH_PTE_SAME #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0) /* @@ -659,17 +676,6 @@ extern void paging_init(void); /* - * When flushing the tlb entry for a page, we also need to flush the hash - * table entry. flush_hash_pages is assembler (for speed) in hashtable.S. - */ -extern int flush_hash_pages(unsigned context, unsigned long va, - unsigned long pmdval, int count); - -/* Add an HPTE to the hash table */ -extern void add_hash_page(unsigned context, unsigned long va, - unsigned long pmdval); - -/* * Encode and decode a swap entry. * Note that the bits we use in a PTE for representing a swap entry * must not include the _PAGE_PRESENT bit, the _PAGE_FILE bit, or the @@ -741,15 +747,9 @@ extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep); -#endif /* !__ASSEMBLY__ */ - -#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG -#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY -#define __HAVE_ARCH_PTEP_GET_AND_CLEAR -#define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY -#define __HAVE_ARCH_PTE_SAME #include + +#endif /* !__ASSEMBLY__ */ #endif /* _PPC_PGTABLE_H */ #endif /* __KERNEL__ */ diff -Nru a/include/asm-ppc/ppc4xx_pic.h b/include/asm-ppc/ppc4xx_pic.h --- a/include/asm-ppc/ppc4xx_pic.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/ppc4xx_pic.h 2005-03-07 14:54:18 -08:00 @@ -43,11 +43,11 @@ * */ struct ppc4xx_uic_settings { - u32 polarity; - u32 triggering; - u32 ext_irq_mask; + u32 polarity; + u32 triggering; + u32 ext_irq_mask; }; extern void ppc4xx_pic_init(void); -#endif /* __PPC4XX_PIC_H__ */ +#endif /* __PPC4XX_PIC_H__ */ diff -Nru a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h --- a/include/asm-ppc/ppc_sys.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc/ppc_sys.h 2005-03-07 14:54:16 -08:00 @@ -21,7 +21,9 @@ #include #include -#if defined(CONFIG_85xx) +#if defined(CONFIG_83xx) +#include +#elif defined(CONFIG_85xx) #include #else #error "need definition of ppc_sys_devices" diff -Nru a/include/asm-ppc/ppcboot.h b/include/asm-ppc/ppcboot.h --- a/include/asm-ppc/ppcboot.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/ppcboot.h 2005-03-07 14:54:18 -08:00 @@ -38,7 +38,8 @@ unsigned long bi_flashoffset; /* reserved area for startup monitor */ unsigned long bi_sramstart; /* start of SRAM memory */ unsigned long bi_sramsize; /* size of SRAM memory */ -#if defined(CONFIG_8xx) || defined(CONFIG_CPM2) || defined(CONFIG_85xx) +#if defined(CONFIG_8xx) || defined(CONFIG_CPM2) || defined(CONFIG_85xx) ||\ + defined(CONFIG_83xx) unsigned long bi_immr_base; /* base of IMMR register */ #endif #if defined(CONFIG_PPC_MPC52xx) @@ -72,7 +73,8 @@ #if defined(CONFIG_HYMOD) hymod_conf_t bi_hymod_conf; /* hymod configuration information */ #endif -#if defined(CONFIG_EVB64260) || defined(CONFIG_44x) || defined(CONFIG_85xx) +#if defined(CONFIG_EVB64260) || defined(CONFIG_44x) || defined(CONFIG_85xx) ||\ + defined(CONFIG_83xx) /* second onboard ethernet port */ unsigned char bi_enet1addr[6]; #endif diff -Nru a/include/asm-ppc/reg.h b/include/asm-ppc/reg.h --- a/include/asm-ppc/reg.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/reg.h 2005-03-07 14:54:18 -08:00 @@ -488,12 +488,6 @@ #define PVR_8245 0x80811014 #define PVR_8260 PVR_8240 -/* System Version Numbers */ -#define SVR_8540 0x80300000 -#define SVR_8541E 0x807A0000 -#define SVR_8555E 0x80790000 -#define SVR_8560 0x80700000 - #if 0 /* Segment Registers */ #define SR0 0 diff -Nru a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h --- a/include/asm-ppc/serial.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/serial.h 2005-03-07 14:54:18 -08:00 @@ -32,6 +32,8 @@ #include #elif defined(CONFIG_4xx) #include +#elif defined(CONFIG_83xx) +#include #elif defined(CONFIG_85xx) #include #else diff -Nru a/include/asm-ppc/system.h b/include/asm-ppc/system.h --- a/include/asm-ppc/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc/system.h 2005-03-07 14:54:17 -08:00 @@ -152,9 +152,9 @@ #define __HAVE_ARCH_CMPXCHG 1 static __inline__ unsigned long -__cmpxchg_u32(volatile int *p, int old, int new) +__cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) { - int prev; + unsigned int prev; __asm__ __volatile__ ("\n\ 1: lwarx %0,0,%2 \n\ @@ -200,6 +200,8 @@ (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ (unsigned long)_n_, sizeof(*(ptr))); \ }) + +#define arch_align_stack(x) (x) #endif /* __KERNEL__ */ #endif /* __PPC_SYSTEM_H */ diff -Nru a/include/asm-ppc/todc.h b/include/asm-ppc/todc.h --- a/include/asm-ppc/todc.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc/todc.h 2005-03-07 14:54:18 -08:00 @@ -98,6 +98,7 @@ #define TODC_TYPE_PC97307 10 /* PC97307 internal RTC */ #define TODC_TYPE_DS1557 11 /* Dallas DS1557 RTC */ #define TODC_TYPE_DS17285 12 /* Dallas DS17285 RTC */ +#define TODC_TYPE_DS1553 13 /* Dallas DS1553 RTC */ #define TODC_TYPE_MC146818 100 /* Leave room for m48txx's */ /* @@ -207,6 +208,28 @@ #define TODC_TYPE_DS1501_FLAGS (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff) #define TODC_TYPE_DS1501_NVRAM_ADDR_REG 0x10 #define TODC_TYPE_DS1501_NVRAM_DATA_REG 0x13 + +#define TODC_TYPE_DS1553_NVRAM_SIZE 0x1ff0 +#define TODC_TYPE_DS1553_SW_FLAGS 0 +#define TODC_TYPE_DS1553_YEAR 0x1fff +#define TODC_TYPE_DS1553_MONTH 0x1ffe +#define TODC_TYPE_DS1553_DOM 0x1ffd /* Day of Month */ +#define TODC_TYPE_DS1553_DOW 0x1ffc /* Day of Week */ +#define TODC_TYPE_DS1553_HOURS 0x1ffb +#define TODC_TYPE_DS1553_MINUTES 0x1ffa +#define TODC_TYPE_DS1553_SECONDS 0x1ff9 +#define TODC_TYPE_DS1553_CNTL_B 0x1ff9 +#define TODC_TYPE_DS1553_CNTL_A 0x1ff8 /* control_a R/W regs */ +#define TODC_TYPE_DS1553_WATCHDOG 0x1ff7 +#define TODC_TYPE_DS1553_INTERRUPTS 0x1ff6 +#define TODC_TYPE_DS1553_ALARM_DATE 0x1ff5 +#define TODC_TYPE_DS1553_ALARM_HOUR 0x1ff4 +#define TODC_TYPE_DS1553_ALARM_MINUTES 0x1ff3 +#define TODC_TYPE_DS1553_ALARM_SECONDS 0x1ff2 +#define TODC_TYPE_DS1553_CENTURY 0x1ff8 +#define TODC_TYPE_DS1553_FLAGS 0x1ff0 +#define TODC_TYPE_DS1553_NVRAM_ADDR_REG 0 +#define TODC_TYPE_DS1553_NVRAM_DATA_REG 0 #define TODC_TYPE_DS1557_NVRAM_SIZE 0x7fff0 #define TODC_TYPE_DS1557_SW_FLAGS 0 diff -Nru a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h --- a/include/asm-ppc/unistd.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc/unistd.h 2005-03-07 14:54:16 -08:00 @@ -276,8 +276,9 @@ #define __NR_add_key 269 #define __NR_request_key 270 #define __NR_keyctl 271 +#define __NR_waitid 272 -#define __NR_syscalls 272 +#define __NR_syscalls 273 #define __NR(n) #n diff -Nru a/include/asm-ppc64/a.out.h b/include/asm-ppc64/a.out.h --- a/include/asm-ppc64/a.out.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/a.out.h 2005-03-07 14:54:16 -08:00 @@ -30,14 +30,11 @@ #ifdef __KERNEL__ -#define STACK_TOP_USER64 (TASK_SIZE_USER64) +#define STACK_TOP_USER64 TASK_SIZE_USER64 +#define STACK_TOP_USER32 TASK_SIZE_USER32 -/* Give 32-bit user space a full 4G address space to live in. */ -#define STACK_TOP_USER32 (TASK_SIZE_USER32) - -#define STACK_TOP ((test_thread_flag(TIF_32BIT) || \ - (ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? \ - STACK_TOP_USER32 : STACK_TOP_USER64) +#define STACK_TOP (test_thread_flag(TIF_32BIT) ? \ + STACK_TOP_USER32 : STACK_TOP_USER64) #endif /* __KERNEL__ */ diff -Nru a/include/asm-ppc64/cacheflush.h b/include/asm-ppc64/cacheflush.h --- a/include/asm-ppc64/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -12,7 +12,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_icache_page(vma, page) do { } while (0) #define flush_cache_vmap(start, end) do { } while (0) #define flush_cache_vunmap(start, end) do { } while (0) @@ -40,7 +40,7 @@ static inline void flush_icache_range(unsigned long start, unsigned long stop) { - if (!(cur_cpu_spec->cpu_features & CPU_FTR_COHERENT_ICACHE)) + if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) __flush_icache_range(start, stop); } diff -Nru a/include/asm-ppc64/cputable.h b/include/asm-ppc64/cputable.h --- a/include/asm-ppc64/cputable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc64/cputable.h 2005-03-07 14:54:17 -08:00 @@ -66,6 +66,11 @@ extern struct cpu_spec cpu_specs[]; extern struct cpu_spec *cur_cpu_spec; +static inline unsigned long cpu_has_feature(unsigned long feature) +{ + return cur_cpu_spec->cpu_features & feature; +} + /* firmware feature bitmask values */ #define FIRMWARE_MAX_FEATURES 63 diff -Nru a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h --- a/include/asm-ppc64/elf.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc64/elf.h 2005-03-07 14:54:17 -08:00 @@ -238,10 +238,20 @@ /* A special ignored type value for PPC, for glibc compatibility. */ #define AT_IGNOREPPC 22 +/* The vDSO location. We have to use the same value as x86 for glibc's + * sake :-) + */ +#define AT_SYSINFO_EHDR 33 + extern int dcache_bsize; extern int icache_bsize; extern int ucache_bsize; +/* We do have an arch_setup_additional_pages for vDSO matters */ +#define ARCH_HAS_SETUP_ADDITIONAL_PAGES +struct linux_binprm; +extern int arch_setup_additional_pages(struct linux_binprm *bprm, int executable_stack); + /* * The requirements here are: * - keep the final alignment of sp (sp & 0xf) @@ -260,6 +270,8 @@ NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ + /* vDSO base */ \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, current->thread.vdso_base); \ } while (0) /* PowerPC64 relocations defined by the ABIs */ diff -Nru a/include/asm-ppc64/lmb.h b/include/asm-ppc64/lmb.h --- a/include/asm-ppc64/lmb.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc64/lmb.h 2005-03-07 14:54:18 -08:00 @@ -16,8 +16,6 @@ #include #include -extern unsigned long reloc_offset(void); - #define MAX_LMB_REGIONS 128 #define LMB_ALLOC_ANYWHERE 0 diff -Nru a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h --- a/include/asm-ppc64/machdep.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/machdep.h 2005-03-07 14:54:16 -08:00 @@ -30,6 +30,7 @@ void (*setup_cpu)(int nr); void (*take_timebase)(void); void (*give_timebase)(void); + int (*cpu_enable)(unsigned int nr); int (*cpu_disable)(void); void (*cpu_die)(unsigned int nr); }; diff -Nru a/include/asm-ppc64/mmu_context.h b/include/asm-ppc64/mmu_context.h --- a/include/asm-ppc64/mmu_context.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/mmu_context.h 2005-03-07 14:54:16 -08:00 @@ -59,11 +59,11 @@ return; #ifdef CONFIG_ALTIVEC - if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC) + if (cpu_has_feature(CPU_FTR_ALTIVEC)) asm volatile ("dssall"); #endif /* CONFIG_ALTIVEC */ - if (cur_cpu_spec->cpu_features & CPU_FTR_SLB) + if (cpu_has_feature(CPU_FTR_SLB)) switch_slb(tsk, next); else switch_stab(tsk, next); diff -Nru a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h --- a/include/asm-ppc64/page.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/page.h 2005-03-07 14:54:16 -08:00 @@ -67,7 +67,7 @@ #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA #define in_hugepage_area(context, addr) \ - ((cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE) && \ + (cpu_has_feature(CPU_FTR_16M_PAGE) && \ ( (((addr) >= TASK_HPAGE_BASE) && ((addr) < TASK_HPAGE_END)) || \ ( ((addr) < 0x100000000L) && \ ((1 << GET_ESID(addr)) & (context).htlb_segs) ) ) ) @@ -184,6 +184,9 @@ extern int page_is_ram(unsigned long pfn); extern u64 ppc64_pft_size; /* Log 2 of page table size */ + +/* We do define AT_SYSINFO_EHDR but don't use the gate mecanism */ +#define __HAVE_ARCH_GATE_AREA 1 #endif /* __ASSEMBLY__ */ diff -Nru a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h --- a/include/asm-ppc64/pci.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/pci.h 2005-03-07 14:54:16 -08:00 @@ -190,8 +190,8 @@ extern int pci_domain_nr(struct pci_bus *bus); -/* Set the name of the bus as it appears in /proc/bus/pci */ -extern int pci_name_bus(char *name, struct pci_bus *bus); +/* Decide whether to display the domain number in /proc */ +extern int pci_proc_domain(struct pci_bus *bus); struct vm_area_struct; /* Map a range of PCI memory or I/O space for a device into user space */ diff -Nru a/include/asm-ppc64/pgalloc.h b/include/asm-ppc64/pgalloc.h --- a/include/asm-ppc64/pgalloc.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/pgalloc.h 2005-03-07 14:54:16 -08:00 @@ -48,42 +48,26 @@ #define pmd_populate(mm, pmd, pte_page) \ pmd_populate_kernel(mm, pmd, page_address(pte_page)) -static inline pte_t * -pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) +static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - pte_t *pte; - pte = kmem_cache_alloc(zero_cache, GFP_KERNEL|__GFP_REPEAT); - if (pte) { - struct page *ptepage = virt_to_page(pte); - ptepage->mapping = (void *) mm; - ptepage->index = address & PMD_MASK; - } - return pte; + return kmem_cache_alloc(zero_cache, GFP_KERNEL|__GFP_REPEAT); } -static inline struct page * -pte_alloc_one(struct mm_struct *mm, unsigned long address) +static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { - pte_t *pte; - pte = kmem_cache_alloc(zero_cache, GFP_KERNEL|__GFP_REPEAT); - if (pte) { - struct page *ptepage = virt_to_page(pte); - ptepage->mapping = (void *) mm; - ptepage->index = address & PMD_MASK; - return ptepage; - } + pte_t *pte = kmem_cache_alloc(zero_cache, GFP_KERNEL|__GFP_REPEAT); + if (pte) + return virt_to_page(pte); return NULL; } static inline void pte_free_kernel(pte_t *pte) { - virt_to_page(pte)->mapping = NULL; kmem_cache_free(zero_cache, pte); } static inline void pte_free(struct page *ptepage) { - ptepage->mapping = NULL; kmem_cache_free(zero_cache, page_address(ptepage)); } diff -Nru a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h --- a/include/asm-ppc64/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc64/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -315,9 +315,10 @@ * batch, doesn't actually triggers the hash flush immediately, * you need to call flush_tlb_pending() to do that. */ -extern void hpte_update(pte_t *ptep, unsigned long pte, int wrprot); +extern void hpte_update(struct mm_struct *mm, unsigned long addr, unsigned long pte, + int wrprot); -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int __ptep_test_and_clear_young(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { unsigned long old; @@ -325,18 +326,25 @@ return 0; old = pte_update(ptep, _PAGE_ACCESSED); if (old & _PAGE_HASHPTE) { - hpte_update(ptep, old, 0); + hpte_update(mm, addr, old, 0); flush_tlb_pending(); } return (old & _PAGE_ACCESSED) != 0; } +#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG +#define ptep_test_and_clear_young(__vma, __addr, __ptep) \ +({ \ + int __r; \ + __r = __ptep_test_and_clear_young((__vma)->vm_mm, __addr, __ptep); \ + __r; \ +}) /* * On RW/DIRTY bit transitions we can avoid flushing the hpte. For the * moment we always flush but we need to fix hpte_update and test if the * optimisation is worth it. */ -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int __ptep_test_and_clear_dirty(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { unsigned long old; @@ -344,11 +352,19 @@ return 0; old = pte_update(ptep, _PAGE_DIRTY); if (old & _PAGE_HASHPTE) - hpte_update(ptep, old, 0); + hpte_update(mm, addr, old, 0); return (old & _PAGE_DIRTY) != 0; } +#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY +#define ptep_test_and_clear_dirty(__vma, __addr, __ptep) \ +({ \ + int __r; \ + __r = __ptep_test_and_clear_dirty((__vma)->vm_mm, __addr, __ptep); \ + __r; \ +}) -static inline void ptep_set_wrprotect(pte_t *ptep) +#define __HAVE_ARCH_PTEP_SET_WRPROTECT +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { unsigned long old; @@ -356,7 +372,7 @@ return; old = pte_update(ptep, _PAGE_RW); if (old & _PAGE_HASHPTE) - hpte_update(ptep, old, 0); + hpte_update(mm, addr, old, 0); } /* @@ -370,42 +386,46 @@ #define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH #define ptep_clear_flush_young(__vma, __address, __ptep) \ ({ \ - int __young = ptep_test_and_clear_young(__ptep); \ + int __young = __ptep_test_and_clear_young((__vma)->vm_mm, __address, \ + __ptep); \ __young; \ }) #define __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH #define ptep_clear_flush_dirty(__vma, __address, __ptep) \ ({ \ - int __dirty = ptep_test_and_clear_dirty(__ptep); \ + int __dirty = __ptep_test_and_clear_dirty((__vma)->vm_mm, __address, \ + __ptep); \ flush_tlb_page(__vma, __address); \ __dirty; \ }) -static inline pte_t ptep_get_and_clear(pte_t *ptep) +#define __HAVE_ARCH_PTEP_GET_AND_CLEAR +static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { unsigned long old = pte_update(ptep, ~0UL); if (old & _PAGE_HASHPTE) - hpte_update(ptep, old, 0); + hpte_update(mm, addr, old, 0); return __pte(old); } -static inline void pte_clear(pte_t * ptep) +static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t * ptep) { unsigned long old = pte_update(ptep, ~0UL); if (old & _PAGE_HASHPTE) - hpte_update(ptep, old, 0); + hpte_update(mm, addr, old, 0); } /* * set_pte stores a linux PTE into the linux page table. */ -static inline void set_pte(pte_t *ptep, pte_t pte) +static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) { if (pte_present(*ptep)) { - pte_clear(ptep); + pte_clear(mm, addr, ptep); flush_tlb_pending(); } *ptep = __pte(pte_val(pte)) & ~_PAGE_HPTEFLAGS; @@ -443,6 +463,7 @@ */ #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_NO_CACHE | _PAGE_GUARDED)) +#define __HAVE_ARCH_PTE_SAME #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0) extern unsigned long ioremap_bot, ioremap_base; @@ -550,14 +571,8 @@ return pt; } -#endif /* __ASSEMBLY__ */ - -#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG -#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY -#define __HAVE_ARCH_PTEP_GET_AND_CLEAR -#define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY -#define __HAVE_ARCH_PTE_SAME #include + +#endif /* __ASSEMBLY__ */ #endif /* _PPC64_PGTABLE_H */ diff -Nru a/include/asm-ppc64/pmc.h b/include/asm-ppc64/pmc.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-ppc64/pmc.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,29 @@ +/* + * pmc.h + * Copyright (C) 2004 David Gibson, 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 + */ +#ifndef _PPC64_PMC_H +#define _PPC64_PMC_H + +#include + +typedef void (*perf_irq_t)(struct pt_regs *); + +int reserve_pmc_hardware(perf_irq_t new_perf_irq); +void release_pmc_hardware(void); + +#endif /* _PPC64_PMC_H */ diff -Nru a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h --- a/include/asm-ppc64/processor.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc64/processor.h 2005-03-07 14:54:18 -08:00 @@ -544,8 +544,8 @@ /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ -#define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(STACK_TOP_USER32 / 4)) -#define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(STACK_TOP_USER64 / 4)) +#define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(TASK_SIZE_USER32 / 4)) +#define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(TASK_SIZE_USER64 / 4)) #define TASK_UNMAPPED_BASE ((test_thread_flag(TIF_32BIT)||(ppcdebugset(PPCDBG_BINFMT_32ADDR))) ? \ TASK_UNMAPPED_BASE_USER32 : TASK_UNMAPPED_BASE_USER64 ) @@ -562,7 +562,9 @@ double fpr[32]; /* Complete floating point set */ unsigned long fpscr; /* Floating point status (plus pad) */ unsigned long fpexc_mode; /* Floating-point exception mode */ - unsigned long pad[3]; /* was saved_msr, saved_softe */ + unsigned long start_tb; /* Start purr when proc switched in */ + unsigned long accum_tb; /* Total accumilated purr for process */ + unsigned long vdso_base; /* base of the vDSO library */ #ifdef CONFIG_ALTIVEC /* Complete AltiVec register set */ vector128 vr[32] __attribute((aligned(16))); diff -Nru a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h --- a/include/asm-ppc64/smp.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-ppc64/smp.h 2005-03-07 14:54:16 -08:00 @@ -29,7 +29,7 @@ extern int boot_cpuid; extern int boot_cpuid_phys; -extern void cpu_die(void) __attribute__((noreturn)); +extern void cpu_die(void); #ifdef CONFIG_SMP @@ -37,6 +37,13 @@ struct pt_regs; extern void smp_message_recv(int, struct pt_regs *); +#ifdef CONFIG_HOTPLUG_CPU +extern void fixup_irqs(cpumask_t map); +int generic_cpu_disable(void); +int generic_cpu_enable(unsigned int cpu); +void generic_cpu_die(unsigned int cpu); +void generic_mach_cpu_die(void); +#endif #define __smp_processor_id() (get_paca()->paca_index) #define hard_smp_processor_id() (get_paca()->hw_cpu_id) diff -Nru a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h --- a/include/asm-ppc64/system.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-ppc64/system.h 2005-03-07 14:54:18 -08:00 @@ -300,5 +300,7 @@ */ #define NET_IP_ALIGN 0 +#define arch_align_stack(x) (x) + #endif /* __KERNEL__ */ #endif diff -Nru a/include/asm-ppc64/systemcfg.h b/include/asm-ppc64/systemcfg.h --- a/include/asm-ppc64/systemcfg.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-ppc64/systemcfg.h 2005-03-07 14:54:17 -08:00 @@ -20,10 +20,14 @@ * Minor version changes are a hint. */ #define SYSTEMCFG_MAJOR 1 -#define SYSTEMCFG_MINOR 0 +#define SYSTEMCFG_MINOR 1 #ifndef __ASSEMBLY__ +#include + +#define SYSCALL_MAP_SIZE ((__NR_syscalls + 31) / 32) + struct systemcfg { __u8 eye_catcher[16]; /* Eyecatcher: SYSTEMCFG:PPC64 0x00 */ struct { /* Systemcfg version numbers */ @@ -47,7 +51,8 @@ __u32 dcache_line_size; /* L1 d-cache line size 0x64 */ __u32 icache_size; /* L1 i-cache size 0x68 */ __u32 icache_line_size; /* L1 i-cache line size 0x6C */ - __u8 reserved0[3984]; /* Reserve rest of page 0x70 */ + __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of available syscalls 0x70 */ + __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of available syscalls */ }; #ifdef __KERNEL__ @@ -55,9 +60,5 @@ #endif #endif /* __ASSEMBLY__ */ - -#define SYSTEMCFG_PAGE 0x5 -#define SYSTEMCFG_PHYS_ADDR (SYSTEMCFG_PAGE<vdso_base */ +extern unsigned long vdso64_rt_sigtramp; +extern unsigned long vdso32_sigtramp; +extern unsigned long vdso32_rt_sigtramp; + +extern void vdso_init(void); + +#else /* __ASSEMBLY__ */ + +#ifdef __VDSO64__ +#ifdef VDS64_HAS_DESCRIPTORS +#define V_FUNCTION_BEGIN(name) \ + .globl name; \ + .section ".opd","a"; \ + .align 3; \ + name: \ + .quad .name,.TOC.@tocbase,0; \ + .previous; \ + .globl .name; \ + .type .name,@function; \ + .name: \ + +#define V_FUNCTION_END(name) \ + .size .name,.-.name; + +#define V_LOCAL_FUNC(name) (.name) + +#else /* VDS64_HAS_DESCRIPTORS */ + +#define V_FUNCTION_BEGIN(name) \ + .globl name; \ + name: \ + +#define V_FUNCTION_END(name) \ + .size name,.-name; + +#define V_LOCAL_FUNC(name) (name) + +#endif /* VDS64_HAS_DESCRIPTORS */ +#endif /* __VDSO64__ */ + +#ifdef __VDSO32__ + +#define V_FUNCTION_BEGIN(name) \ + .globl name; \ + .type name,@function; \ + name: \ + +#define V_FUNCTION_END(name) \ + .size name,.-name; + +#define V_LOCAL_FUNC(name) (name) + +#endif /* __VDSO32__ */ + +#endif /* __ASSEMBLY__ */ + +#endif /* __KERNEL__ */ + +#endif /* __PPC64_VDSO_H__ */ diff -Nru a/include/asm-s390/cacheflush.h b/include/asm-s390/cacheflush.h --- a/include/asm-s390/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-s390/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -8,7 +8,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h --- a/include/asm-s390/pgalloc.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-s390/pgalloc.h 2005-03-07 14:54:17 -08:00 @@ -130,8 +130,10 @@ pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); if (pte != NULL) { - for (i=0; i < PTRS_PER_PTE; i++) - pte_clear(pte+i); + for (i=0; i < PTRS_PER_PTE; i++) { + pte_clear(mm, vmaddr, pte+i); + vmaddr += PAGE_SIZE; + } } return pte; } diff -Nru a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h --- a/include/asm-s390/pgtable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-s390/pgtable.h 2005-03-07 14:54:17 -08:00 @@ -322,6 +322,7 @@ { *pteptr = pteval; } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) /* * pgd/pmd/pte query functions @@ -457,7 +458,7 @@ #endif /* __s390x__ */ -extern inline void pte_clear(pte_t *ptep) +extern inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_val(*ptep) = _PAGE_INVALID_EMPTY; } @@ -521,7 +522,7 @@ return pte; } -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { return 0; } @@ -531,10 +532,10 @@ unsigned long address, pte_t *ptep) { /* No need to flush TLB; bits are in storage key */ - return ptep_test_and_clear_young(ptep); + return ptep_test_and_clear_young(vma, address, ptep); } -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { return 0; } @@ -544,13 +545,13 @@ unsigned long address, pte_t *ptep) { /* No need to flush TLB; bits are in storage key */ - return ptep_test_and_clear_dirty(ptep); + return ptep_test_and_clear_dirty(vma, address, ptep); } -static inline pte_t ptep_get_and_clear(pte_t *ptep) +static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t pte = *ptep; - pte_clear(ptep); + pte_clear(mm, addr, ptep); return pte; } @@ -573,19 +574,14 @@ : "=m" (*ptep) : "m" (*ptep), "a" (ptep), "a" (address) ); #endif /* __s390x__ */ - pte_clear(ptep); + pte_val(*ptep) = _PAGE_INVALID_EMPTY; return pte; } -static inline void ptep_set_wrprotect(pte_t *ptep) +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { pte_t old_pte = *ptep; - set_pte(ptep, pte_wrprotect(old_pte)); -} - -static inline void ptep_mkdirty(pte_t *ptep) -{ - pte_mkdirty(*ptep); + set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); } static inline void @@ -802,7 +798,6 @@ #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_CLEAR_FLUSH #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #define __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG diff -Nru a/include/asm-s390/system.h b/include/asm-s390/system.h --- a/include/asm-s390/system.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-s390/system.h 2005-03-07 14:54:18 -08:00 @@ -461,6 +461,8 @@ extern void (*_machine_halt)(void); extern void (*_machine_power_off)(void); +#define arch_align_stack(x) (x) + #endif /* __KERNEL__ */ #endif diff -Nru a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h --- a/include/asm-sh/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-sh/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -15,14 +15,14 @@ #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { \ - flush_cache_page(vma, vaddr); \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ flush_icache_user_range(vma, page, vaddr, len); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ do { \ - flush_cache_page(vma, vaddr); \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ } while (0) diff -Nru a/include/asm-sh/cpu-sh2/cacheflush.h b/include/asm-sh/cpu-sh2/cacheflush.h --- a/include/asm-sh/cpu-sh2/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-sh/cpu-sh2/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -15,7 +15,7 @@ * * - flush_cache_all() flushes entire cache * - flush_cache_mm(mm) flushes the specified mm context's cache lines - * - flush_cache_page(mm, vmaddr) flushes a single page + * - flush_cache_page(mm, vmaddr, pfn) flushes a single page * - flush_cache_range(vma, start, end) flushes a range of pages * * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache @@ -28,7 +28,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-sh/cpu-sh3/cacheflush.h b/include/asm-sh/cpu-sh3/cacheflush.h --- a/include/asm-sh/cpu-sh3/cacheflush.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-sh/cpu-sh3/cacheflush.h 2005-03-07 14:54:17 -08:00 @@ -15,7 +15,7 @@ * * - flush_cache_all() flushes entire cache * - flush_cache_mm(mm) flushes the specified mm context's cache lines - * - flush_cache_page(mm, vmaddr) flushes a single page + * - flush_cache_page(mm, vmaddr, pfn) flushes a single page * - flush_cache_range(vma, start, end) flushes a range of pages * * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache @@ -43,7 +43,7 @@ extern void flush_cache_mm(struct mm_struct *mm); extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); -extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); +extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); extern void flush_dcache_page(struct page *pg); extern void flush_icache_range(unsigned long start, unsigned long end); extern void flush_icache_page(struct vm_area_struct *vma, struct page *page); @@ -68,7 +68,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-sh/cpu-sh4/cacheflush.h b/include/asm-sh/cpu-sh4/cacheflush.h --- a/include/asm-sh/cpu-sh4/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-sh/cpu-sh4/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -28,7 +28,7 @@ extern void flush_cache_mm(struct mm_struct *mm); extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); -extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); +extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); extern void flush_dcache_page(struct page *pg); #define flush_dcache_mmap_lock(mapping) do { } while (0) diff -Nru a/include/asm-sh/pgtable-2level.h b/include/asm-sh/pgtable-2level.h --- a/include/asm-sh/pgtable-2level.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-sh/pgtable-2level.h 2005-03-07 14:54:18 -08:00 @@ -41,6 +41,8 @@ * hook is made available. */ #define set_pte(pteptr, pteval) (*(pteptr) = pteval) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) + /* * (pmds are folded into pgds so this doesn't get actually called, * but the define is needed for a generic inline function.) diff -Nru a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h --- a/include/asm-sh/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-sh/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -164,7 +164,7 @@ #define pte_none(x) (!pte_val(x)) #define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE)) -#define pte_clear(xp) do { set_pte(xp, __pte(0)); } while (0) +#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #define pmd_none(x) (!pmd_val(x)) #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) @@ -290,7 +290,7 @@ #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) #define __HAVE_ARCH_PTEP_GET_AND_CLEAR -extern pte_t ptep_get_and_clear(pte_t *ptep); +extern pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); #endif #include diff -Nru a/include/asm-sh/system.h b/include/asm-sh/system.h --- a/include/asm-sh/system.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-sh/system.h 2005-03-07 14:54:18 -08:00 @@ -259,4 +259,6 @@ void disable_hlt(void); void enable_hlt(void); +#define arch_align_stack(x) (x) + #endif diff -Nru a/include/asm-sh64/cacheflush.h b/include/asm-sh64/cacheflush.h --- a/include/asm-sh64/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-sh64/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -14,7 +14,7 @@ extern void flush_cache_sigtramp(unsigned long start, unsigned long end); extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); -extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); +extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); extern void flush_dcache_page(struct page *pg); extern void flush_icache_range(unsigned long start, unsigned long end); extern void flush_icache_user_range(struct vm_area_struct *vma, @@ -31,14 +31,14 @@ #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { \ - flush_cache_page(vma, vaddr); \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ flush_icache_user_range(vma, page, vaddr, len); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ do { \ - flush_cache_page(vma, vaddr); \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ } while (0) diff -Nru a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h --- a/include/asm-sh64/pgtable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-sh64/pgtable.h 2005-03-07 14:54:17 -08:00 @@ -136,6 +136,7 @@ */ *(xp) = (x & NPHYS_SIGN) ? (x | NPHYS_MASK) : x; } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep) { @@ -383,7 +384,7 @@ */ #define _PTE_EMPTY 0x0 #define pte_present(x) (pte_val(x) & _PAGE_PRESENT) -#define pte_clear(xp) (set_pte(xp, __pte(_PTE_EMPTY))) +#define pte_clear(mm,addr,xp) (set_pte_at(mm, addr, xp, __pte(_PTE_EMPTY))) #define pte_none(x) (pte_val(x) == _PTE_EMPTY) /* diff -Nru a/include/asm-sh64/system.h b/include/asm-sh64/system.h --- a/include/asm-sh64/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-sh64/system.h 2005-03-07 14:54:17 -08:00 @@ -191,4 +191,6 @@ #define PL() printk("@ <%s,%s:%d>\n",__FILE__,__FUNCTION__,__LINE__) +#define arch_align_stack(x) (x) + #endif /* __ASM_SH64_SYSTEM_H */ diff -Nru a/include/asm-sparc/cacheflush.h b/include/asm-sparc/cacheflush.h --- a/include/asm-sparc/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-sparc/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -50,21 +50,21 @@ #define flush_cache_all() BTFIXUP_CALL(flush_cache_all)() #define flush_cache_mm(mm) BTFIXUP_CALL(flush_cache_mm)(mm) #define flush_cache_range(vma,start,end) BTFIXUP_CALL(flush_cache_range)(vma,start,end) -#define flush_cache_page(vma,addr) BTFIXUP_CALL(flush_cache_page)(vma,addr) +#define flush_cache_page(vma,addr,pfn) BTFIXUP_CALL(flush_cache_page)(vma,addr) #define flush_icache_range(start, end) do { } while (0) #define flush_icache_page(vma, pg) do { } while (0) #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) BTFIXUPDEF_CALL(void, __flush_page_to_ram, unsigned long) diff -Nru a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h --- a/include/asm-sparc/pgtable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-sparc/pgtable.h 2005-03-07 14:54:17 -08:00 @@ -157,7 +157,7 @@ } #define pte_present(pte) BTFIXUP_CALL(pte_present)(pte) -#define pte_clear(pte) BTFIXUP_CALL(pte_clear)(pte) +#define pte_clear(mm,addr,pte) BTFIXUP_CALL(pte_clear)(pte) BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t) BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) @@ -339,6 +339,7 @@ BTFIXUPDEF_CALL(void, set_pte, pte_t *, pte_t) #define set_pte(ptep,pteval) BTFIXUP_CALL(set_pte)(ptep,pteval) +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) struct seq_file; BTFIXUPDEF_CALL(void, mmu_info, struct seq_file *) diff -Nru a/include/asm-sparc/system.h b/include/asm-sparc/system.h --- a/include/asm-sparc/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-sparc/system.h 2005-03-07 14:54:17 -08:00 @@ -257,4 +257,6 @@ #endif /* __ASSEMBLY__ */ +#define arch_align_stack(x) (x) + #endif /* !(__SPARC_SYSTEM_H) */ diff -Nru a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h --- a/include/asm-sparc64/cacheflush.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-sparc64/cacheflush.h 2005-03-07 14:54:18 -08:00 @@ -11,7 +11,7 @@ do { if ((__mm) == current->mm) flushw_user(); } while(0) #define flush_cache_range(vma, start, end) \ flush_cache_mm((vma)->vm_mm) -#define flush_cache_page(vma, page) \ +#define flush_cache_page(vma, page, pfn) \ flush_cache_mm((vma)->vm_mm) /* @@ -38,15 +38,15 @@ #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - do { \ - flush_cache_page(vma, vaddr); \ - memcpy(dst, src, len); \ + do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ + memcpy(dst, src, len); \ } while (0) extern void flush_dcache_page(struct page *page); diff -Nru a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h --- a/include/asm-sparc64/pci.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-sparc64/pci.h 2005-03-07 14:54:16 -08:00 @@ -223,7 +223,10 @@ /* Return the index of the PCI controller for device PDEV. */ extern int pci_domain_nr(struct pci_bus *bus); -extern int pci_name_bus(char *name, struct pci_bus *bus); +static inline int pci_proc_domain(struct pci_bus *bus) +{ + return 1; +} /* Platform support for /proc/bus/pci/X/Y mmap()s. */ diff -Nru a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h --- a/include/asm-sparc64/pgalloc.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-sparc64/pgalloc.h 2005-03-07 14:54:18 -08:00 @@ -191,25 +191,17 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) { - pte_t *pte = __pte_alloc_one_kernel(mm, address); - if (pte) { - struct page *page = virt_to_page(pte); - page->mapping = (void *) mm; - page->index = address & PMD_MASK; - } - return pte; + return __pte_alloc_one_kernel(mm, address); } static inline struct page * pte_alloc_one(struct mm_struct *mm, unsigned long addr) { pte_t *pte = __pte_alloc_one_kernel(mm, addr); - if (pte) { - struct page *page = virt_to_page(pte); - page->mapping = (void *) mm; - page->index = addr & PMD_MASK; - return page; - } + + if (pte) + return virt_to_page(pte); + return NULL; } @@ -246,13 +238,11 @@ static inline void pte_free_kernel(pte_t *pte) { - virt_to_page(pte)->mapping = NULL; free_pte_fast(pte); } static inline void pte_free(struct page *ptepage) { - ptepage->mapping = NULL; free_pte_fast(page_address(ptepage)); } diff -Nru a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h --- a/include/asm-sparc64/pgtable.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-sparc64/pgtable.h 2005-03-07 14:54:16 -08:00 @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -333,18 +334,23 @@ #define pte_unmap_nested(pte) do { } while (0) /* Actual page table PTE updates. */ -extern void tlb_batch_add(pte_t *ptep, pte_t orig); +extern void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig); -static inline void set_pte(pte_t *ptep, pte_t pte) +static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { pte_t orig = *ptep; *ptep = pte; - if (pte_present(orig)) - tlb_batch_add(ptep, orig); + + /* It is more efficient to let flush_tlb_kernel_range() + * handle init_mm tlb flushes. + */ + if (likely(mm != &init_mm) && (pte_val(orig) & _PAGE_VALID)) + tlb_batch_add(mm, addr, ptep, orig); } -#define pte_clear(ptep) set_pte((ptep), __pte(0UL)) +#define pte_clear(mm,addr,ptep) \ + set_pte_at((mm), (addr), (ptep), __pte(0UL)) extern pgd_t swapper_pg_dir[1]; diff -Nru a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h --- a/include/asm-sparc64/system.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-sparc64/system.h 2005-03-07 14:54:16 -08:00 @@ -341,4 +341,6 @@ #endif /* !(__ASSEMBLY__) */ +#define arch_align_stack(x) (x) + #endif /* !(__SPARC64_SYSTEM_H) */ diff -Nru a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h --- a/include/asm-um/pgtable-2level.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-um/pgtable-2level.h 2005-03-07 14:54:17 -08:00 @@ -59,6 +59,7 @@ *pteptr = pte_mknewpage(pteval); if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) diff -Nru a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h --- a/include/asm-um/pgtable-3level.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-um/pgtable-3level.h 2005-03-07 14:54:16 -08:00 @@ -84,6 +84,7 @@ *pteptr = pte_mknewpage(*pteptr); if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) #define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval)) diff -Nru a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h --- a/include/asm-um/pgtable.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-um/pgtable.h 2005-03-07 14:54:18 -08:00 @@ -142,7 +142,7 @@ #define PAGE_PTR(address) \ ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) -#define pte_clear(xp) pte_set_val(*(xp), (phys_t) 0, __pgprot(_PAGE_NEWPAGE)) +#define pte_clear(mm,addr,xp) pte_set_val(*(xp), (phys_t) 0, __pgprot(_PAGE_NEWPAGE)) #define pmd_none(x) (!(pmd_val(x) & ~_PAGE_NEWPAGE)) #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) diff -Nru a/include/asm-v850/cacheflush.h b/include/asm-v850/cacheflush.h --- a/include/asm-v850/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-v850/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -25,7 +25,7 @@ #define flush_cache_all() ((void)0) #define flush_cache_mm(mm) ((void)0) #define flush_cache_range(vma, start, end) ((void)0) -#define flush_cache_page(vma, vmaddr) ((void)0) +#define flush_cache_page(vma, vmaddr, pfn) ((void)0) #define flush_dcache_page(page) ((void)0) #define flush_dcache_mmap_lock(mapping) ((void)0) #define flush_dcache_mmap_unlock(mapping) ((void)0) diff -Nru a/include/asm-v850/system.h b/include/asm-v850/system.h --- a/include/asm-v850/system.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-v850/system.h 2005-03-07 14:54:17 -08:00 @@ -108,4 +108,6 @@ return tmp; } +#define arch_align_stack(x) (x) + #endif /* __V850_SYSTEM_H__ */ diff -Nru a/include/asm-x86_64/cacheflush.h b/include/asm-x86_64/cacheflush.h --- a/include/asm-x86_64/cacheflush.h 2005-03-07 14:54:16 -08:00 +++ b/include/asm-x86_64/cacheflush.h 2005-03-07 14:54:16 -08:00 @@ -8,7 +8,7 @@ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_cache_page(vma, vmaddr, pfn) do { } while (0) #define flush_dcache_page(page) do { } while (0) #define flush_dcache_mmap_lock(mapping) do { } while (0) #define flush_dcache_mmap_unlock(mapping) do { } while (0) diff -Nru a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h --- a/include/asm-x86_64/pgtable.h 2005-03-07 14:54:17 -08:00 +++ b/include/asm-x86_64/pgtable.h 2005-03-07 14:54:17 -08:00 @@ -73,6 +73,7 @@ { pte_val(*dst) = pte_val(val); } +#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) static inline void set_pmd(pmd_t *dst, pmd_t val) { @@ -102,7 +103,7 @@ #define pud_page(pud) \ ((unsigned long) __va(pud_val(pud) & PHYSICAL_PAGE_MASK)) -#define ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte, 0)) +#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) #define pte_same(a, b) ((a).pte == (b).pte) #define PMD_SIZE (1UL << PMD_SHIFT) @@ -224,7 +225,7 @@ #define pte_none(x) (!pte_val(x)) #define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE)) -#define pte_clear(xp) do { set_pte(xp, __pte(0)); } while (0) +#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) /* FIXME: is this right? */ @@ -263,22 +264,24 @@ extern inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } extern inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } -static inline int ptep_test_and_clear_dirty(pte_t *ptep) +static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { if (!pte_dirty(*ptep)) return 0; return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); } -static inline int ptep_test_and_clear_young(pte_t *ptep) +static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { if (!pte_young(*ptep)) return 0; return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); } -static inline void ptep_set_wrprotect(pte_t *ptep) { clear_bit(_PAGE_BIT_RW, ptep); } -static inline void ptep_mkdirty(pte_t *ptep) { set_bit(_PAGE_BIT_DIRTY, ptep); } +static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) +{ + clear_bit(_PAGE_BIT_RW, ptep); +} /* * Macro to mark a page protection value as "uncacheable". @@ -419,7 +422,6 @@ #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR #define __HAVE_ARCH_PTEP_SET_WRPROTECT -#define __HAVE_ARCH_PTEP_MKDIRTY #define __HAVE_ARCH_PTE_SAME #include diff -Nru a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h --- a/include/asm-x86_64/system.h 2005-03-07 14:54:18 -08:00 +++ b/include/asm-x86_64/system.h 2005-03-07 14:54:18 -08:00 @@ -338,4 +338,6 @@ #define HAVE_EAT_KEY void eat_key(void); +extern unsigned long arch_align_stack(unsigned long sp); + #endif diff -Nru a/include/linux/acct.h b/include/linux/acct.h --- a/include/linux/acct.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/acct.h 2005-03-07 14:54:18 -08:00 @@ -120,12 +120,12 @@ struct super_block; extern void acct_auto_close(struct super_block *sb); extern void acct_process(long exitcode); -extern void acct_update_integrals(void); +extern void acct_update_integrals(struct task_struct *tsk); extern void acct_clear_integrals(struct task_struct *tsk); #else #define acct_auto_close(x) do { } while (0) #define acct_process(x) do { } while (0) -#define acct_update_integrals() do { } while (0) +#define acct_update_integrals(x) do { } while (0) #define acct_clear_integrals(task) do { } while (0) #endif diff -Nru a/include/linux/agp_backend.h b/include/linux/agp_backend.h --- a/include/linux/agp_backend.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/agp_backend.h 2005-03-07 14:54:17 -08:00 @@ -1,6 +1,7 @@ /* * AGPGART backend specific includes. Not for userspace consumption. * + * Copyright (C) 2004 Silicon Graphics, Inc. * Copyright (C) 2002-2003 Dave Jones * Copyright (C) 1999 Jeff Hartmann * Copyright (C) 1999 Precision Insight, Inc. @@ -63,21 +64,24 @@ struct vm_operations_struct *vm_ops; }; -/* +/* * The agp_memory structure has information about the block of agp memory * allocated. A caller may manipulate the next and prev pointers to link * each allocated item into a list. These pointers are ignored by the backend. * Everything else should never be written to, but the caller may read any of - * the items to detrimine the status of this block of agp memory. + * the items to determine the status of this block of agp memory. */ +struct agp_bridge_data; + struct agp_memory { - int key; struct agp_memory *next; struct agp_memory *prev; + struct agp_bridge_data *bridge; + unsigned long *memory; size_t page_count; + int key; int num_scratch_pages; - unsigned long *memory; off_t pg_start; u32 type; u32 physical; @@ -87,14 +91,19 @@ #define AGP_NORMAL_MEMORY 0 +extern struct agp_bridge_data *agp_bridge; +extern struct list_head agp_bridges; + +extern struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *); + extern void agp_free_memory(struct agp_memory *); -extern struct agp_memory *agp_allocate_memory(size_t, u32); -extern int agp_copy_info(struct agp_kern_info *); +extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, u32); +extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); extern int agp_bind_memory(struct agp_memory *, off_t); extern int agp_unbind_memory(struct agp_memory *); -extern void agp_enable(u32); -extern int agp_backend_acquire(void); -extern void agp_backend_release(void); +extern void agp_enable(struct agp_bridge_data *, u32); +extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); +extern void agp_backend_release(struct agp_bridge_data *); #endif /* __KERNEL__ */ #endif /* _AGP_BACKEND_H */ diff -Nru a/include/linux/atalk.h b/include/linux/atalk.h --- a/include/linux/atalk.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/atalk.h 2005-03-07 14:54:18 -08:00 @@ -1,5 +1,8 @@ #ifndef __LINUX_ATALK_H__ #define __LINUX_ATALK_H__ + +#include + /* * AppleTalk networking structures * @@ -63,6 +66,8 @@ }; struct atalk_sock { + /* struct sock has to be the first member of atalk_sock */ + struct sock sk; unsigned short dest_net; unsigned short src_net; unsigned char dest_node; @@ -71,6 +76,11 @@ unsigned char src_port; }; +static inline struct atalk_sock *at_sk(struct sock *sk) +{ + return (struct atalk_sock *)sk; +} + #ifdef __KERNEL__ #include @@ -196,8 +206,6 @@ struct atalk_addr *sa); extern void aarp_cleanup_module(void); - -#define at_sk(__sk) ((struct atalk_sock *)(__sk)->sk_protinfo) extern struct hlist_head atalk_sockets; extern rwlock_t atalk_sockets_lock; diff -Nru a/include/linux/atmdev.h b/include/linux/atmdev.h --- a/include/linux/atmdev.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/atmdev.h 2005-03-07 14:54:18 -08:00 @@ -30,9 +30,6 @@ #define ATM_DS3_PCR (8000*12) /* DS3: 12 cells in a 125 usec time slot */ -#define atm_sk(__sk) ((struct atm_vcc *)(__sk)->sk_protinfo) -#define ATM_SD(s) (atm_sk((s)->sk)) - #define __AAL_STAT_ITEMS \ __HANDLE_ITEM(tx); /* TX okay */ \ @@ -281,6 +278,8 @@ #define ATM_ATMOPT_CLP 1 /* set CLP bit */ struct atm_vcc { + /* struct sock has to be the first member of atm_vcc */ + struct sock sk; unsigned long flags; /* VCC flags (ATM_VF_*) */ short vpi; /* VPI and VCI (types must be equal */ /* with sockaddr) */ @@ -297,7 +296,6 @@ void *dev_data; /* per-device data */ void *proto_data; /* per-protocol data */ struct k_atm_aal_stats *stats; /* pointer to AAL stats group */ - struct sock *sk; /* socket backpointer */ /* SVC part --- may move later ------------------------------------- */ short itf; /* interface number */ struct sockaddr_atmsvc local; @@ -310,6 +308,20 @@ /* by CLIP and sch_atm. */ }; +static inline struct atm_vcc *atm_sk(struct sock *sk) +{ + return (struct atm_vcc *)sk; +} + +static inline struct atm_vcc *ATM_SD(struct socket *sock) +{ + return atm_sk(sock->sk); +} + +static inline struct sock *sk_atm(struct atm_vcc *vcc) +{ + return (struct sock *)vcc; +} struct atm_dev_addr { struct sockaddr_atmsvc addr; /* ATM address */ @@ -410,20 +422,20 @@ static inline void atm_force_charge(struct atm_vcc *vcc,int truesize) { - atomic_add(truesize, &vcc->sk->sk_rmem_alloc); + atomic_add(truesize, &sk_atm(vcc)->sk_rmem_alloc); } static inline void atm_return(struct atm_vcc *vcc,int truesize) { - atomic_sub(truesize, &vcc->sk->sk_rmem_alloc); + atomic_sub(truesize, &sk_atm(vcc)->sk_rmem_alloc); } static inline int atm_may_send(struct atm_vcc *vcc,unsigned int size) { - return (size + atomic_read(&vcc->sk->sk_wmem_alloc)) < - vcc->sk->sk_sndbuf; + return (size + atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) < + sk_atm(vcc)->sk_sndbuf; } diff -Nru a/include/linux/compat.h b/include/linux/compat.h --- a/include/linux/compat.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/compat.h 2005-03-07 14:54:17 -08:00 @@ -83,6 +83,12 @@ extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *); +struct compat_siginfo; + +extern asmlinkage long compat_sys_waitid(int, compat_pid_t, + struct compat_siginfo __user *, int, + struct compat_rusage __user *); + struct compat_dirent { u32 d_ino; compat_off_t d_off; @@ -145,7 +151,6 @@ unsigned long bitmap_size); long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask, unsigned long bitmap_size); -struct compat_siginfo; int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from); int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from); #endif /* CONFIG_COMPAT */ diff -Nru a/include/linux/fs.h b/include/linux/fs.h --- a/include/linux/fs.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/fs.h 2005-03-07 14:54:16 -08:00 @@ -335,7 +335,7 @@ struct address_space { 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 */ + rwlock_t tree_lock; /* and rwlock protecting it */ unsigned int i_mmap_writable;/* count VM_SHARED mappings */ struct prio_tree_root i_mmap; /* tree of private and shared mappings */ struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ @@ -1353,11 +1353,15 @@ invalidate_inode_pages(inode->i_mapping); } extern int invalidate_inode_pages2(struct address_space *mapping); +extern int invalidate_inode_pages2_range(struct address_space *mapping, + pgoff_t start, pgoff_t end); extern int write_inode_now(struct inode *, int); extern int filemap_fdatawrite(struct address_space *); extern int filemap_flush(struct address_space *); extern int filemap_fdatawait(struct address_space *); extern int filemap_write_and_wait(struct address_space *mapping); +extern int filemap_write_and_wait_range(struct address_space *mapping, + loff_t lstart, loff_t lend); extern void sync_supers(void); extern void sync_filesystems(int wait); extern void emergency_sync(void); diff -Nru a/include/linux/i2c-id.h b/include/linux/i2c-id.h --- a/include/linux/i2c-id.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/i2c-id.h 2005-03-07 14:54:18 -08:00 @@ -20,8 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -/* $Id: i2c-id.h,v 1.68 2003/02/25 02:55:18 mds Exp $ */ - #ifndef LINUX_I2C_ID_H #define LINUX_I2C_ID_H @@ -196,11 +194,15 @@ #define I2C_ALGO_OCP 0x120000 /* IBM or otherwise On-chip I2C algorithm */ #define I2C_ALGO_BITHS 0x130000 /* enhanced bit style adapters */ #define I2C_ALGO_IOP3XX 0x140000 /* XSCALE IOP3XX On-chip I2C alg */ -#define I2C_ALGO_PCA 0x150000 /* PCA 9564 style adapters */ - #define I2C_ALGO_SIBYTE 0x150000 /* Broadcom SiByte SOCs */ -#define I2C_ALGO_SGI 0x160000 /* SGI algorithm */ -#define I2C_ALGO_AU1550 0x170000 /* Au1550 PSC algorithm */ +#define I2C_ALGO_SGI 0x160000 /* SGI algorithm */ + +#define I2C_ALGO_USB 0x170000 /* USB algorithm */ +#define I2C_ALGO_VIRT 0x180000 /* Virtual bus adapter */ + +#define I2C_ALGO_MV64XXX 0x190000 /* Marvell mv64xxx i2c ctlr */ +#define I2C_ALGO_PCA 0x1a0000 /* PCA 9564 style adapters */ +#define I2C_ALGO_AU1550 0x1b0000 /* Au1550 PSC algorithm */ #define I2C_ALGO_EXP 0x800000 /* experimental */ @@ -240,6 +242,7 @@ #define I2C_HW_B_IXP4XX 0x17 /* GPIO on IXP4XX systems */ #define I2C_HW_B_S3VIA 0x18 /* S3Via ProSavage adapter */ #define I2C_HW_B_ZR36067 0x19 /* Zoran-36057/36067 based boards */ +#define I2C_HW_B_PCILYNX 0x1a /* TI PCILynx I2C adapter */ #define I2C_HW_B_CX2388x 0x1b /* connexant 2388x based tv cards */ /* --- PCF 8584 based algorithms */ @@ -309,5 +312,8 @@ /* --- MCP107 adapter */ #define I2C_HW_MPC107 0x00 + +/* --- Marvell mv64xxx i2c adapter */ +#define I2C_HW_MV64XXX 0x00 #endif /* LINUX_I2C_ID_H */ diff -Nru a/include/linux/i2c.h b/include/linux/i2c.h --- a/include/linux/i2c.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/i2c.h 2005-03-07 14:54:16 -08:00 @@ -55,7 +55,7 @@ /* Transfer num messages. */ -extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num); +extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); /* * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. @@ -134,8 +134,6 @@ }; #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) -extern struct bus_type i2c_bus_type; - #define I2C_NAME_SIZE 50 /* @@ -144,7 +142,6 @@ * function is mainly used for lookup & other admin. functions. */ struct i2c_client { - int id; unsigned int flags; /* div., see below */ unsigned int addr; /* chip address - NOTE: 7bit */ /* addresses are stored in the */ @@ -190,11 +187,11 @@ char name[32]; /* textual description */ unsigned int id; - /* If an adapter algorithm can't to I2C-level access, set master_xfer + /* If an adapter algorithm can't do I2C-level access, set master_xfer to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ - int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], + int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, unsigned short flags, char read_write, @@ -302,8 +299,8 @@ }; /* Internal numbers to terminate lists */ -#define I2C_CLIENT_END 0xfffe -#define I2C_CLIENT_ISA_END 0xfffefffe +#define I2C_CLIENT_END 0xfffeU +#define I2C_CLIENT_ISA_END 0xfffefffeU /* The numbers to use to set I2C bus address */ #define ANY_I2C_BUS 0xffff @@ -423,22 +420,22 @@ #define I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC 0x40000000 /* SMBus 2.0 */ #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC 0x80000000 /* SMBus 2.0 */ -#define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \ - I2C_FUNC_SMBUS_WRITE_BYTE -#define I2C_FUNC_SMBUS_BYTE_DATA I2C_FUNC_SMBUS_READ_BYTE_DATA | \ - I2C_FUNC_SMBUS_WRITE_BYTE_DATA -#define I2C_FUNC_SMBUS_WORD_DATA I2C_FUNC_SMBUS_READ_WORD_DATA | \ - I2C_FUNC_SMBUS_WRITE_WORD_DATA -#define I2C_FUNC_SMBUS_BLOCK_DATA I2C_FUNC_SMBUS_READ_BLOCK_DATA | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA -#define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \ - I2C_FUNC_SMBUS_WRITE_I2C_BLOCK -#define I2C_FUNC_SMBUS_I2C_BLOCK_2 I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ - I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 -#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC -#define I2C_FUNC_SMBUS_WORD_DATA_PEC I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \ - I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC +#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \ + I2C_FUNC_SMBUS_WRITE_BYTE) +#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \ + I2C_FUNC_SMBUS_WRITE_BYTE_DATA) +#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \ + I2C_FUNC_SMBUS_WRITE_WORD_DATA) +#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) +#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \ + I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) +#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ + I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) +#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC (I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC) +#define I2C_FUNC_SMBUS_WORD_DATA_PEC (I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \ + I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC) #define I2C_FUNC_SMBUS_READ_BYTE_PEC I2C_FUNC_SMBUS_READ_BYTE_DATA #define I2C_FUNC_SMBUS_WRITE_BYTE_PEC I2C_FUNC_SMBUS_WRITE_BYTE_DATA @@ -447,14 +444,14 @@ #define I2C_FUNC_SMBUS_BYTE_PEC I2C_FUNC_SMBUS_BYTE_DATA #define I2C_FUNC_SMBUS_BYTE_DATA_PEC I2C_FUNC_SMBUS_WORD_DATA -#define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \ - I2C_FUNC_SMBUS_BYTE | \ - I2C_FUNC_SMBUS_BYTE_DATA | \ - I2C_FUNC_SMBUS_WORD_DATA | \ - I2C_FUNC_SMBUS_PROC_CALL | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \ - I2C_FUNC_SMBUS_I2C_BLOCK +#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \ + I2C_FUNC_SMBUS_BYTE | \ + I2C_FUNC_SMBUS_BYTE_DATA | \ + I2C_FUNC_SMBUS_WORD_DATA | \ + I2C_FUNC_SMBUS_PROC_CALL | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \ + I2C_FUNC_SMBUS_I2C_BLOCK) /* * Data for SMBus Messages diff -Nru a/include/linux/if_ec.h b/include/linux/if_ec.h --- a/include/linux/if_ec.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/if_ec.h 2005-03-07 14:54:16 -08:00 @@ -47,8 +47,9 @@ unsigned char port; }; -struct econet_opt -{ +struct econet_sock { + /* struct sock has to be the first member of econet_sock */ + struct sock sk; unsigned char cb; unsigned char port; unsigned char station; @@ -56,7 +57,10 @@ unsigned short num; }; -#define ec_sk(__sk) ((struct econet_opt *)(__sk)->sk_protinfo) +static inline struct econet_sock *ec_sk(const struct sock *sk) +{ + return (struct econet_sock *)sk; +} struct ec_device { diff -Nru a/include/linux/if_pppox.h b/include/linux/if_pppox.h --- a/include/linux/if_pppox.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/if_pppox.h 2005-03-07 14:54:16 -08:00 @@ -119,10 +119,13 @@ relayed to (PPPoE relaying) */ }; -struct pppox_opt { +#include + +struct pppox_sock { + /* struct sock must be the first member of pppox_sock */ + struct sock sk; struct ppp_channel chan; - struct sock *sk; - struct pppox_opt *next; /* for hash table */ + struct pppox_sock *next; /* for hash table */ union { struct pppoe_opt pppoe; } proto; @@ -132,7 +135,15 @@ #define pppoe_pa proto.pppoe.pa #define pppoe_relay proto.pppoe.relay -#define pppox_sk(__sk) ((struct pppox_opt *)(__sk)->sk_protinfo) +static inline struct pppox_sock *pppox_sk(struct sock *sk) +{ + return (struct pppox_sock *)sk; +} + +static inline struct sock *sk_pppox(struct pppox_sock *po) +{ + return (struct sock *)po; +} struct module; diff -Nru a/include/linux/kernel.h b/include/linux/kernel.h --- a/include/linux/kernel.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/kernel.h 2005-03-07 14:54:16 -08:00 @@ -278,6 +278,12 @@ extern void BUILD_BUG(void); #define BUILD_BUG_ON(condition) do { if (condition) BUILD_BUG(); } while(0) +#ifdef CONFIG_SYSCTL +extern int randomize_va_space; +#else +#define randomize_va_space 1 +#endif + /* Trap pasters of __FUNCTION__ at compile-time */ #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 #define __FUNCTION__ (__func__) diff -Nru a/include/linux/mii.h b/include/linux/mii.h --- a/include/linux/mii.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/mii.h 2005-03-07 14:54:16 -08:00 @@ -20,6 +20,8 @@ #define MII_ADVERTISE 0x04 /* Advertisement control reg */ #define MII_LPA 0x05 /* Link partner ability reg */ #define MII_EXPANSION 0x06 /* Expansion register */ +#define MII_CTRL1000 0x09 /* 1000BASE-T control */ +#define MII_STAT1000 0x0a /* 1000BASE-T status */ #define MII_DCOUNTER 0x12 /* Disconnect counter */ #define MII_FCSCOUNTER 0x13 /* False carrier counter */ #define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ @@ -67,7 +69,9 @@ #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ #define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ -#define ADVERTISE_RESV 0x1c00 /* Unused... */ +#define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */ +#define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */ +#define ADVERTISE_RESV 0x1000 /* Unused... */ #define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ #define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ #define ADVERTISE_NPAGE 0x8000 /* Next page bit */ @@ -84,7 +88,9 @@ #define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ #define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ -#define LPA_RESV 0x1c00 /* Unused... */ +#define LPA_PAUSE_CAP 0x0400 /* Can pause */ +#define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */ +#define LPA_RESV 0x1000 /* Unused... */ #define LPA_RFAULT 0x2000 /* Link partner faulted */ #define LPA_LPACK 0x4000 /* Link partner acked us */ #define LPA_NPAGE 0x8000 /* Next page bit */ @@ -105,6 +111,15 @@ #define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ #define NWAYTEST_RESV2 0xfe00 /* Unused... */ +/* 1000BASE-T Control register */ +#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */ +#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */ + +/* 1000BASE-T Status register */ +#define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */ +#define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */ +#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ +#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ struct mii_if_info { int phy_id; @@ -114,6 +129,7 @@ unsigned int full_duplex : 1; /* is full duplex? */ unsigned int force_media : 1; /* is autoneg. disabled? */ + unsigned int supports_gmii : 1; /* are GMII registers supported? */ struct net_device *dev; int (*mdio_read) (struct net_device *dev, int phy_id, int location); diff -Nru a/include/linux/mm.h b/include/linux/mm.h --- a/include/linux/mm.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/mm.h 2005-03-07 14:54:16 -08:00 @@ -838,7 +838,7 @@ } /* update per process rss and vm hiwater data */ -extern void update_mem_hiwater(void); +extern void update_mem_hiwater(struct task_struct *tsk); #ifndef CONFIG_DEBUG_PAGEALLOC static inline void diff -Nru a/include/linux/mv643xx.h b/include/linux/mv643xx.h --- a/include/linux/mv643xx.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/mv643xx.h 2005-03-07 14:54:17 -08:00 @@ -977,12 +977,9 @@ /* I2C Registers */ /****************************************/ -#define MV64340_I2C_SLAVE_ADDR 0xc000 -#define MV64340_I2C_EXTENDED_SLAVE_ADDR 0xc010 -#define MV64340_I2C_DATA 0xc004 -#define MV64340_I2C_CONTROL 0xc008 -#define MV64340_I2C_STATUS_BAUDE_RATE 0xc00C -#define MV64340_I2C_SOFT_RESET 0xc01c +#define MV64XXX_I2C_CTLR_NAME "mv64xxx i2c" +#define MV64XXX_I2C_OFFSET 0xc000 +#define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 /****************************************/ /* GPP Interface Registers */ @@ -1083,6 +1080,14 @@ u8 brg_can_tune; u8 brg_clk_src; u32 brg_clk_freq; +}; + +/* i2c Platform Device, Driver Data */ +struct mv64xxx_i2c_pdata { + u32 freq_m; + u32 freq_n; + u32 timeout; /* In milliseconds */ + u32 retries; }; #endif /* __ASM_MV64340_H */ diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/netdevice.h 2005-03-07 14:54:18 -08:00 @@ -678,6 +678,8 @@ extern int dev_change_flags(struct net_device *, unsigned); extern int dev_change_name(struct net_device *, char *); extern int dev_set_mtu(struct net_device *, int); +extern int dev_set_mac_address(struct net_device *, + struct sockaddr *); extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); extern void dev_init(void); diff -Nru a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h --- a/include/linux/nfsd/cache.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/nfsd/cache.h 2005-03-07 14:54:16 -08:00 @@ -19,10 +19,9 @@ * be hash_next and hash_prev. */ struct svc_cacherep { - struct svc_cacherep * c_hash_next; - struct svc_cacherep * c_hash_prev; - struct svc_cacherep * c_lru_next; - struct svc_cacherep * c_lru_prev; + struct hlist_node c_hash; + struct list_head c_lru; + unsigned char c_state, /* unused, inprog, done */ c_type, /* status, buffer */ c_secure : 1; /* req came from port < 1024 */ diff -Nru a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/pci.h 2005-03-07 14:54:17 -08:00 @@ -549,8 +549,6 @@ unsigned int irq; struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ - char * slot_name; /* pointer to dev.bus_id */ - /* These fields are used by common fixups */ unsigned int transparent:1; /* Transparent PCI bridge */ unsigned int multifunction:1;/* Part of multi-function device */ @@ -642,8 +640,10 @@ }; struct pci_raw_ops { - int (*read)(int dom, int bus, int devfn, int reg, int len, u32 *val); - int (*write)(int dom, int bus, int devfn, int reg, int len, u32 val); + int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, + int reg, int len, u32 *val); + int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn, + int reg, int len, u32 val); }; extern struct pci_raw_ops *raw_pci_ops; @@ -966,9 +966,8 @@ */ #ifndef CONFIG_PCI_DOMAINS static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } -static inline int pci_name_bus(char *name, struct pci_bus *bus) +static inline int pci_proc_domain(struct pci_bus *bus) { - sprintf(name, "%02x", bus->number); return 0; } #endif diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h --- a/include/linux/pci_ids.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/pci_ids.h 2005-03-07 14:54:18 -08:00 @@ -352,10 +352,21 @@ #define PCI_DEVICE_ID_ATI_RS300_133 0x5831 #define PCI_DEVICE_ID_ATI_RS300_166 0x5832 #define PCI_DEVICE_ID_ATI_RS300_200 0x5833 +#define PCI_DEVICE_ID_ATI_RS350_100 0x7830 +#define PCI_DEVICE_ID_ATI_RS350_133 0x7831 +#define PCI_DEVICE_ID_ATI_RS350_166 0x7832 +#define PCI_DEVICE_ID_ATI_RS350_200 0x7833 +#define PCI_DEVICE_ID_ATI_RS400_100 0x5a30 +#define PCI_DEVICE_ID_ATI_RS400_133 0x5a31 +#define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 +#define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 +#define PCI_DEVICE_ID_ATI_RS480 0x5950 /* ATI IXP Chipset */ #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 #define PCI_DEVICE_ID_ATI_IXP300_IDE 0x4369 +#define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e #define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376 +#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 #define PCI_VENDOR_ID_VLSI 0x1004 #define PCI_DEVICE_ID_VLSI_82C592 0x0005 @@ -862,6 +873,9 @@ #define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e #define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043 #define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c +#define PCI_DEVICE_ID_APPLE_SH_ATA 0x0050 +#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 +#define PCI_DEVICE_ID_APPLE_SH_FW 0x0052 #define PCI_DEVICE_ID_APPLE_TIGON3 0x1645 #define PCI_VENDOR_ID_YAMAHA 0x1073 @@ -1098,6 +1112,7 @@ #define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 #define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e +#define PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS 0x0052 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 @@ -1497,6 +1512,9 @@ #define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040 #define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050 #define PCI_DEVICE_ID_ARTOP_8060 0x8060 +#define PCI_DEVICE_ID_ARTOP_AEC67160 0x8080 +#define PCI_DEVICE_ID_ARTOP_AEC67160_2 0x8081 +#define PCI_DEVICE_ID_ARTOP_AEC67162 0x808a #define PCI_VENDOR_ID_ZEITNET 0x1193 #define PCI_DEVICE_ID_ZEITNET_1221 0x0001 @@ -1609,6 +1627,10 @@ #define PCI_DEVICE_ID_PC300_TE_M_2 0x0320 #define PCI_DEVICE_ID_PC300_TE_M_1 0x0321 +/* Allied Telesyn */ +#define PCI_VENDOR_ID_AT 0x1259 +#define PCI_SUBDEVICE_ID_AT_2701FX 0x2703 + #define PCI_VENDOR_ID_ESSENTIAL 0x120f #define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001 @@ -1652,6 +1674,11 @@ #define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120 #define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130 +/* Allied Telesyn */ +#define PCI_VENDOR_ID_AT 0x1259 +#define PCI_SUBDEVICE_ID_AT_2700FX 0x2701 +#define PCI_SUBDEVICE_ID_AT_2701FX 0x2703 + #define PCI_VENDOR_ID_ESS 0x125d #define PCI_DEVICE_ID_ESS_ESS1968 0x1968 #define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 @@ -1904,6 +1931,8 @@ #define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 #define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513 #define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521 + +#define PCI_VENDOR_ID_SAMSUNG 0x144d #define PCI_VENDOR_ID_AIRONET 0x14b9 #define PCI_DEVICE_ID_AIRONET_4800_1 0x0001 diff -Nru a/include/linux/personality.h b/include/linux/personality.h --- a/include/linux/personality.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/personality.h 2005-03-07 14:54:17 -08:00 @@ -18,6 +18,7 @@ * These occupy the top three bytes. */ enum { + ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */ FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors * (signal handling) */ @@ -35,7 +36,7 @@ * Security-relevant compatibility flags that must be * cleared upon setuid or setgid exec: */ -#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC) +#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE) /* * Personality types. diff -Nru a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h --- a/include/linux/pkt_cls.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/pkt_cls.h 2005-03-07 14:54:16 -08:00 @@ -319,4 +319,101 @@ #define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1) +/* Basic filter */ + +enum +{ + TCA_BASIC_UNSPEC, + TCA_BASIC_CLASSID, + TCA_BASIC_EMATCHES, + TCA_BASIC_ACT, + TCA_BASIC_POLICE, + __TCA_BASIC_MAX +}; + +#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1) + +/* Extended Matches */ + +struct tcf_ematch_tree_hdr +{ + __u16 nmatches; + __u16 progid; +}; + +enum +{ + TCA_EMATCH_TREE_UNSPEC, + TCA_EMATCH_TREE_HDR, + TCA_EMATCH_TREE_LIST, + __TCA_EMATCH_TREE_MAX +}; +#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1) + +struct tcf_ematch_hdr +{ + __u16 matchid; + __u16 kind; + __u16 flags; + __u16 pad; /* currently unused */ +}; + +/* 0 1 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +-----------------------+-+-+---+ + * | Unused |S|I| R | + * +-----------------------+-+-+---+ + * + * R(2) ::= relation to next ematch + * where: 0 0 END (last ematch) + * 0 1 AND + * 1 0 OR + * 1 1 Unused (invalid) + * I(1) ::= invert result + * S(1) ::= simple payload + */ +#define TCF_EM_REL_END 0 +#define TCF_EM_REL_AND (1<<0) +#define TCF_EM_REL_OR (1<<1) +#define TCF_EM_INVERT (1<<2) +#define TCF_EM_SIMPLE (1<<3) + +#define TCF_EM_REL_MASK 3 +#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK) + +enum +{ + TCF_LAYER_LINK, + TCF_LAYER_NETWORK, + TCF_LAYER_TRANSPORT, + __TCF_LAYER_MAX +}; +#define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1) + +/* Ematch type assignments + * 1..32767 Reserved for ematches inside kernel tree + * 32768..65535 Free to use, not reliable + */ +enum +{ + TCF_EM_CONTAINER, + TCF_EM_CMP, + TCF_EM_NBYTE, + TCF_EM_U32, + TCF_EM_META, + __TCF_EM_MAX +}; + +enum +{ + TCF_EM_PROG_TC +}; + +enum +{ + TCF_EM_OPND_EQ, + TCF_EM_OPND_GT, + TCF_EM_OPND_LT +}; + #endif diff -Nru a/include/linux/random.h b/include/linux/random.h --- a/include/linux/random.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/random.h 2005-03-07 14:54:18 -08:00 @@ -53,6 +53,8 @@ extern __u32 secure_ip_id(__u32 daddr); extern u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport); +extern u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, + __u16 dport); extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport); extern __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, @@ -69,6 +71,9 @@ #ifndef MODULE extern struct file_operations random_fops, urandom_fops; #endif + +unsigned int get_random_int(void); +unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); #endif /* __KERNEL___ */ diff -Nru a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h --- a/include/linux/rtnetlink.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/rtnetlink.h 2005-03-07 14:54:17 -08:00 @@ -779,6 +779,11 @@ goto rtattr_failure; \ __rta_fill(skb, attrtype, attrlen, data); }) +#define RTA_PUT_NOHDR(skb, attrlen, data) \ +({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ + goto rtattr_failure; \ + memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); }) + static inline struct rtattr * __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) { diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/sched.h 2005-03-07 14:54:16 -08:00 @@ -735,6 +735,7 @@ #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ #define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ +#define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ /* * Only the _current_ task can read/write to tsk->flags, but other diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/skbuff.h 2005-03-07 14:54:18 -08:00 @@ -146,6 +146,20 @@ skb_frag_t frags[MAX_SKB_FRAGS]; }; +/* We divide dataref into two halves. The higher 16 bits hold references + * to the payload part of skb->data. The lower 16 bits hold references to + * the entire skb->data. It is up to the users of the skb to agree on + * where the payload starts. + * + * All users must obey the rule that the skb->data reference count must be + * greater than or equal to the payload reference count. + * + * Holding a reference to the payload part means that the user does not + * care about modifications to the header part of skb->data. + */ +#define SKB_DATAREF_SHIFT 16 +#define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1) + /** * struct sk_buff - socket buffer * @next: Next buffer in list @@ -167,6 +181,7 @@ * @csum: Checksum * @__unused: Dead field, may be reused * @cloned: Head may be cloned (check refcnt to be sure) + * @nohdr: Payload reference only, must not modify header * @pkt_type: Packet class * @ip_summed: Driver fed us an IP checksum * @priority: Packet queueing priority @@ -238,7 +253,8 @@ mac_len, csum; unsigned char local_df, - cloned, + cloned:1, + nohdr:1, pkt_type, ip_summed; __u32 priority; @@ -370,7 +386,42 @@ */ static inline int skb_cloned(const struct sk_buff *skb) { - return skb->cloned && atomic_read(&skb_shinfo(skb)->dataref) != 1; + return skb->cloned && + (atomic_read(&skb_shinfo(skb)->dataref) & SKB_DATAREF_MASK) != 1; +} + +/** + * skb_header_cloned - is the header a clone + * @skb: buffer to check + * + * Returns true if modifying the header part of the buffer requires + * the data to be copied. + */ +static inline int skb_header_cloned(const struct sk_buff *skb) +{ + int dataref; + + if (!skb->cloned) + return 0; + + dataref = atomic_read(&skb_shinfo(skb)->dataref); + dataref = (dataref & SKB_DATAREF_MASK) - (dataref >> SKB_DATAREF_SHIFT); + return dataref != 1; +} + +/** + * skb_header_release - release reference to header + * @skb: buffer to operate on + * + * Drop a reference to the header part of the buffer. This is done + * by acquiring a payload reference. You must not read from the header + * part of skb->data after this. + */ +static inline void skb_header_release(struct sk_buff *skb) +{ + BUG_ON(skb->nohdr); + skb->nohdr = 1; + atomic_add(1 << SKB_DATAREF_SHIFT, &skb_shinfo(skb)->dataref); } /** diff -Nru a/include/linux/stallion.h b/include/linux/stallion.h --- a/include/linux/stallion.h 2005-03-07 14:54:18 -08:00 +++ b/include/linux/stallion.h 2005-03-07 14:54:18 -08:00 @@ -126,7 +126,7 @@ int nrbnks; int irq; int irqtype; - void (*isr)(struct stlbrd *brdp); + int (*isr)(struct stlbrd *brdp); unsigned int ioaddr1; unsigned int ioaddr2; unsigned int iosize1; diff -Nru a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h --- a/include/linux/sunrpc/cache.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/sunrpc/cache.h 2005-03-07 14:54:17 -08:00 @@ -37,8 +37,7 @@ * Entries have a ref count and a 'hashed' flag which counts the existance * in the hash table. * We only expire entries when refcount is zero. - * Existance in the cache is not measured in refcount but rather in - * CACHE_HASHED flag. + * Existance in the cache is counted the refcount. */ /* Every cache item has a common header that is used @@ -57,7 +56,6 @@ #define CACHE_VALID 0 /* Entry contains valid data */ #define CACHE_NEGATIVE 1 /* Negative entry - there is no match for the key */ #define CACHE_PENDING 2 /* An upcall has been sent but no reply received yet*/ -#define CACHE_HASHED 3 /* Entry is in a hash table */ #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ @@ -185,7 +183,6 @@ \ if (new) \ {INIT;} \ - cache_get(&tmp->MEMBER); \ if (set) { \ if (!INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags))\ { /* need to swap in new */ \ @@ -194,8 +191,6 @@ new->MEMBER.next = tmp->MEMBER.next; \ *hp = &new->MEMBER; \ tmp->MEMBER.next = NULL; \ - set_bit(CACHE_HASHED, &new->MEMBER.flags); \ - clear_bit(CACHE_HASHED, &tmp->MEMBER.flags); \ t2 = tmp; tmp = new; new = t2; \ } \ if (test_bit(CACHE_NEGATIVE, &item->MEMBER.flags)) \ @@ -205,6 +200,7 @@ clear_bit(CACHE_NEGATIVE, &tmp->MEMBER.flags); \ } \ } \ + cache_get(&tmp->MEMBER); \ if (set||new) write_unlock(&(DETAIL)->hash_lock); \ else read_unlock(&(DETAIL)->hash_lock); \ if (set) \ @@ -220,7 +216,7 @@ new->MEMBER.next = *head; \ *head = &new->MEMBER; \ (DETAIL)->entries ++; \ - set_bit(CACHE_HASHED, &new->MEMBER.flags); \ + cache_get(&new->MEMBER); \ if (set) { \ tmp = new; \ if (test_bit(CACHE_NEGATIVE, &item->MEMBER.flags)) \ @@ -268,15 +264,10 @@ static inline int cache_put(struct cache_head *h, struct cache_detail *cd) { - atomic_dec(&h->refcnt); - if (!atomic_read(&h->refcnt) && + if (atomic_read(&h->refcnt) <= 2 && h->expiry_time < cd->nextcheck) cd->nextcheck = h->expiry_time; - if (!test_bit(CACHE_HASHED, &h->flags) && - !atomic_read(&h->refcnt)) - return 1; - - return 0; + return atomic_dec_and_test(&h->refcnt); } extern void cache_init(struct cache_head *h); diff -Nru a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h --- a/include/linux/sunrpc/svc.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/sunrpc/svc.h 2005-03-07 14:54:17 -08:00 @@ -251,8 +251,7 @@ char * pg_name; /* service name */ char * pg_class; /* class name: services sharing authentication */ struct svc_stat * pg_stats; /* rpc statistics */ - /* Override authentication. NULL means use default */ - int (*pg_authenticate)(struct svc_rqst *, u32 *); + int (*pg_authenticate)(struct svc_rqst *); }; /* diff -Nru a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h --- a/include/linux/sunrpc/svcauth.h 2005-03-07 14:54:16 -08:00 +++ b/include/linux/sunrpc/svcauth.h 2005-03-07 14:54:16 -08:00 @@ -92,6 +92,7 @@ int (*accept)(struct svc_rqst *rq, u32 *authp); int (*release)(struct svc_rqst *rq); void (*domain_release)(struct auth_domain *); + int (*set_client)(struct svc_rqst *rq); }; #define SVC_GARBAGE 1 @@ -107,6 +108,7 @@ extern int svc_authenticate(struct svc_rqst *rqstp, u32 *authp); extern int svc_authorise(struct svc_rqst *rqstp); +extern int svc_set_client(struct svc_rqst *rqstp); extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops); extern void svc_auth_unregister(rpc_authflavor_t flavor); diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h --- a/include/linux/sysctl.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/sysctl.h 2005-03-07 14:54:17 -08:00 @@ -135,6 +135,7 @@ KERN_HZ_TIMER=65, /* int: hz timer on or off */ KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */ KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */ + KERN_RANDOMIZE=68, /* int: randomize virtual address space */ }; diff -Nru a/include/linux/tc_ematch/tc_em_cmp.h b/include/linux/tc_ematch/tc_em_cmp.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/tc_ematch/tc_em_cmp.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,26 @@ +#ifndef __LINUX_TC_EM_CMP_H +#define __LINUX_TC_EM_CMP_H + +#include + +struct tcf_em_cmp +{ + __u32 val; + __u32 mask; + __u16 off; + __u8 align:4; + __u8 flags:4; + __u8 layer:4; + __u8 opnd:4; +}; + +enum +{ + TCF_EM_ALIGN_U8 = 1, + TCF_EM_ALIGN_U16 = 2, + TCF_EM_ALIGN_U32 = 4 +}; + +#define TCF_EM_CMP_TRANS 1 + +#endif diff -Nru a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/tc_ematch/tc_em_meta.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,69 @@ +#ifndef __LINUX_TC_EM_META_H +#define __LINUX_TC_EM_META_H + +#include + +enum +{ + TCA_EM_META_UNSPEC, + TCA_EM_META_HDR, + TCA_EM_META_LVALUE, + TCA_EM_META_RVALUE, + __TCA_EM_META_MAX +}; +#define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1) + +struct tcf_meta_val +{ + __u16 kind; + __u8 shift; + __u8 op; +}; + +#define TCF_META_TYPE_MASK (0xf << 12) +#define TCF_META_TYPE(kind) (((kind) & TCF_META_TYPE_MASK) >> 12) +#define TCF_META_ID_MASK 0x7ff +#define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK) + +enum +{ + TCF_META_TYPE_VAR, + TCF_META_TYPE_INT, + __TCF_META_TYPE_MAX +}; +#define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1) + +enum +{ + TCF_META_ID_VALUE, + TCF_META_ID_RANDOM, + TCF_META_ID_LOADAVG_0, + TCF_META_ID_LOADAVG_1, + TCF_META_ID_LOADAVG_2, + TCF_META_ID_DEV, + TCF_META_ID_INDEV, + TCF_META_ID_REALDEV, + TCF_META_ID_PRIORITY, + TCF_META_ID_PROTOCOL, + TCF_META_ID_SECURITY, + TCF_META_ID_PKTTYPE, + TCF_META_ID_PKTLEN, + TCF_META_ID_DATALEN, + TCF_META_ID_MACLEN, + TCF_META_ID_NFMARK, + TCF_META_ID_TCINDEX, + TCF_META_ID_TCVERDICT, + TCF_META_ID_TCCLASSID, + TCF_META_ID_RTCLASSID, + TCF_META_ID_RTIIF, + __TCF_META_ID_MAX +}; +#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) + +struct tcf_meta_hdr +{ + struct tcf_meta_val left; + struct tcf_meta_val right; +}; + +#endif diff -Nru a/include/linux/tc_ematch/tc_em_nbyte.h b/include/linux/tc_ematch/tc_em_nbyte.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/tc_ematch/tc_em_nbyte.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,13 @@ +#ifndef __LINUX_TC_EM_NBYTE_H +#define __LINUX_TC_EM_NBYTE_H + +#include + +struct tcf_em_nbyte +{ + __u16 off; + __u16 len:12; + __u8 layer:4; +}; + +#endif diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h --- a/include/linux/tcp.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/tcp.h 2005-03-07 14:54:17 -08:00 @@ -284,10 +284,13 @@ __u32 mss_cache; /* Cached effective mss, not including SACKS */ __u16 mss_cache_std; /* Like mss_cache, but without TSO */ __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ - __u16 ext2_header_len;/* Options depending on route */ __u8 ca_state; /* State of fast-retransmit machine */ __u8 retransmits; /* Number of unrecovered RTO timeouts. */ + __u16 advmss; /* Advertised MSS */ + __u32 window_clamp; /* Maximal window to advertise */ + __u32 rcv_ssthresh; /* Current window clamp */ + __u32 frto_highmark; /* snd_nxt when RTO occurred */ __u8 reordering; /* Packet reordering metric. */ __u8 frto_counter; /* Number of new acks after RTO */ @@ -345,14 +348,9 @@ struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ - __u32 window_clamp; /* Maximal window to advertise */ - __u32 rcv_ssthresh; /* Current window clamp */ - __u16 advmss; /* Advertised MSS */ - __u8 syn_retries; /* num of allowed syn retries */ __u8 ecn_flags; /* ECN status bits. */ __u16 prior_ssthresh; /* ssthresh saved at recovery start */ - __u16 __pad1; __u32 lost_out; /* Lost packets */ __u32 sacked_out; /* SACK'd packets */ __u32 fackets_out; /* FACK'd packets */ diff -Nru a/include/linux/workqueue.h b/include/linux/workqueue.h --- a/include/linux/workqueue.h 2005-03-07 14:54:17 -08:00 +++ b/include/linux/workqueue.h 2005-03-07 14:54:17 -08:00 @@ -70,6 +70,7 @@ extern int keventd_up(void); extern void init_workqueues(void); +void cancel_rearming_delayed_work(struct work_struct *work); /* * Kill off a pending schedule_delayed_work(). Note that the work callback diff -Nru a/include/media/saa7146.h b/include/media/saa7146.h --- a/include/media/saa7146.h 2005-03-07 14:54:16 -08:00 +++ b/include/media/saa7146.h 2005-03-07 14:54:16 -08:00 @@ -157,7 +157,7 @@ /* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); -int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg msgs[], int num, int retries); +int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, int num, int retries); /* from saa7146_core.c */ extern struct list_head saa7146_devices; diff -Nru a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h --- a/include/net/bluetooth/hci_core.h 2005-03-07 14:54:17 -08:00 +++ b/include/net/bluetooth/hci_core.h 2005-03-07 14:54:17 -08:00 @@ -217,7 +217,8 @@ /* ----- HCI Connections ----- */ enum { HCI_CONN_AUTH_PEND, - HCI_CONN_ENCRYPT_PEND + HCI_CONN_ENCRYPT_PEND, + HCI_CONN_RSWITCH_PEND }; static inline void hci_conn_hash_init(struct hci_dev *hdev) @@ -290,6 +291,7 @@ int hci_conn_auth(struct hci_conn *conn); int hci_conn_encrypt(struct hci_conn *conn); int hci_conn_change_link_key(struct hci_conn *conn); +int hci_conn_switch_role(struct hci_conn *conn, uint8_t role); static inline void hci_conn_set_timer(struct hci_conn *conn, unsigned long timeout) { @@ -515,6 +517,8 @@ void (*auth_cfm) (struct hci_conn *conn, __u8 status); void (*encrypt_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt); + void (*key_change_cfm) (struct hci_conn *conn, __u8 status); + void (*role_switch_cfm) (struct hci_conn *conn, __u8 status, __u8 role); }; static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status) @@ -543,6 +547,32 @@ struct hci_cb *cb = list_entry(p, struct hci_cb, list); if (cb->encrypt_cfm) cb->encrypt_cfm(conn, status, encrypt); + } + read_unlock_bh(&hci_cb_list_lock); +} + +static inline void hci_key_change_cfm(struct hci_conn *conn, __u8 status) +{ + struct list_head *p; + + read_lock_bh(&hci_cb_list_lock); + list_for_each(p, &hci_cb_list) { + struct hci_cb *cb = list_entry(p, struct hci_cb, list); + if (cb->key_change_cfm) + cb->key_change_cfm(conn, status); + } + read_unlock_bh(&hci_cb_list_lock); +} + +static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status, __u8 role) +{ + struct list_head *p; + + read_lock_bh(&hci_cb_list_lock); + list_for_each(p, &hci_cb_list) { + struct hci_cb *cb = list_entry(p, struct hci_cb, list); + if (cb->role_switch_cfm) + cb->role_switch_cfm(conn, status, role); } read_unlock_bh(&hci_cb_list_lock); } diff -Nru a/include/net/dn.h b/include/net/dn.h --- a/include/net/dn.h 2005-03-07 14:54:17 -08:00 +++ b/include/net/dn.h 2005-03-07 14:54:17 -08:00 @@ -2,6 +2,7 @@ #define _NET_DN_H #include +#include #include typedef unsigned short dn_address; @@ -133,7 +134,10 @@ }; -#define DN_SK(__sk) ((struct dn_scp *)(__sk)->sk_protinfo) +static inline struct dn_scp *DN_SK(struct sock *sk) +{ + return (struct dn_scp *)(sk + 1); +} /* * src,dst : Source and Destination DECnet addresses diff -Nru a/include/net/dst.h b/include/net/dst.h --- a/include/net/dst.h 2005-03-07 14:54:18 -08:00 +++ b/include/net/dst.h 2005-03-07 14:54:18 -08:00 @@ -124,6 +124,16 @@ return mtu; } +static inline u32 dst_mtu(const struct dst_entry *dst) +{ + u32 mtu = dst_metric(dst, RTAX_MTU); + /* + * Alexey put it here, so ask him about it :) + */ + barrier(); + return mtu; +} + static inline int dst_metric_locked(struct dst_entry *dst, int metric) { @@ -247,6 +257,15 @@ if (unlikely(err != NET_XMIT_BYPASS)) return err; } +} + +static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) +{ + dst_hold(dst); + if (dst->obsolete) + dst = dst->ops->check(dst, cookie); + dst_release(dst); + return dst; } extern void dst_init(void); diff -Nru a/include/net/irda/af_irda.h b/include/net/irda/af_irda.h --- a/include/net/irda/af_irda.h 2005-03-07 14:54:18 -08:00 +++ b/include/net/irda/af_irda.h 2005-03-07 14:54:18 -08:00 @@ -33,9 +33,12 @@ #include /* struct lsap_cb */ #include /* struct tsap_cb */ #include /* struct discovery_t */ +#include /* IrDA Socket */ struct irda_sock { + /* struct sock has to be the first member of irda_sock */ + struct sock sk; __u32 saddr; /* my local address */ __u32 daddr; /* peer address */ @@ -69,7 +72,6 @@ int errno; /* status of the IAS query */ - struct sock *sk; wait_queue_head_t query_wait; /* Wait for the answer to a query */ struct timer_list watchdog; /* Timeout for discovery */ @@ -77,6 +79,9 @@ LOCAL_FLOW rx_flow; }; -#define irda_sk(__sk) ((struct irda_sock *)(__sk)->sk_protinfo) +static inline struct irda_sock *irda_sk(struct sock *sk) +{ + return (struct irda_sock *)sk; +} #endif /* AF_IRDA_H */ diff -Nru a/include/net/llc_conn.h b/include/net/llc_conn.h --- a/include/net/llc_conn.h 2005-03-07 14:54:18 -08:00 +++ b/include/net/llc_conn.h 2005-03-07 14:54:18 -08:00 @@ -13,6 +13,7 @@ */ #include #include +#include #include #define LLC_EVENT 1 @@ -28,8 +29,9 @@ u16 expire; /* timer expire time */ }; -struct llc_opt { - struct sock *sk; /* sock that has this llc_opt */ +struct llc_sock { + /* struct sock must be the first member of llc_sock */ + struct sock sk; struct sockaddr_llc addr; /* address sock is bound to */ u8 state; /* state of connection */ struct llc_sap *sap; /* pointer to parent SAP */ @@ -75,7 +77,10 @@ Used for resending FRMR */ }; -#define llc_sk(__sk) ((struct llc_opt *)(__sk)->sk_protinfo) +static inline struct llc_sock *llc_sk(const struct sock *sk) +{ + return (struct llc_sock *)sk; +} static __inline__ void llc_set_backlog_type(struct sk_buff *skb, char type) { diff -Nru a/include/net/pkt_cls.h b/include/net/pkt_cls.h --- a/include/net/pkt_cls.h 2005-03-07 14:54:17 -08:00 +++ b/include/net/pkt_cls.h 2005-03-07 14:54:17 -08:00 @@ -148,6 +148,198 @@ extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, struct tcf_ext_map *map); +/** + * struct tcf_pkt_info - packet information + */ +struct tcf_pkt_info +{ + unsigned char * ptr; + int nexthdr; +}; + +#ifdef CONFIG_NET_EMATCH + +struct tcf_ematch_ops; + +/** + * struct tcf_ematch - extended match (ematch) + * + * @matchid: identifier to allow userspace to reidentify a match + * @flags: flags specifying attributes and the relation to other matches + * @ops: the operations lookup table of the corresponding ematch module + * @datalen: length of the ematch specific configuration data + * @data: ematch specific data + */ +struct tcf_ematch +{ + struct tcf_ematch_ops * ops; + unsigned long data; + unsigned int datalen; + u16 matchid; + u16 flags; +}; + +static inline int tcf_em_is_container(struct tcf_ematch *em) +{ + return !em->ops; +} + +static inline int tcf_em_is_simple(struct tcf_ematch *em) +{ + return em->flags & TCF_EM_SIMPLE; +} + +static inline int tcf_em_is_inverted(struct tcf_ematch *em) +{ + return em->flags & TCF_EM_INVERT; +} + +static inline int tcf_em_last_match(struct tcf_ematch *em) +{ + return (em->flags & TCF_EM_REL_MASK) == TCF_EM_REL_END; +} + +static inline int tcf_em_early_end(struct tcf_ematch *em, int result) +{ + if (tcf_em_last_match(em)) + return 1; + + if (result == 0 && em->flags & TCF_EM_REL_AND) + return 1; + + if (result != 0 && em->flags & TCF_EM_REL_OR) + return 1; + + return 0; +} + +/** + * struct tcf_ematch_tree - ematch tree handle + * + * @hdr: ematch tree header supplied by userspace + * @matches: array of ematches + */ +struct tcf_ematch_tree +{ + struct tcf_ematch_tree_hdr hdr; + struct tcf_ematch * matches; + +}; + +/** + * struct tcf_ematch_ops - ematch module operations + * + * @kind: identifier (kind) of this ematch module + * @datalen: length of expected configuration data (optional) + * @change: called during validation (optional) + * @match: called during ematch tree evaluation, must return 1/0 + * @destroy: called during destroyage (optional) + * @dump: called during dumping process (optional) + * @owner: owner, must be set to THIS_MODULE + * @link: link to previous/next ematch module (internal use) + */ +struct tcf_ematch_ops +{ + int kind; + int datalen; + int (*change)(struct tcf_proto *, void *, + int, struct tcf_ematch *); + int (*match)(struct sk_buff *, struct tcf_ematch *, + struct tcf_pkt_info *); + void (*destroy)(struct tcf_proto *, + struct tcf_ematch *); + int (*dump)(struct sk_buff *, struct tcf_ematch *); + struct module *owner; + struct list_head link; +}; + +extern int tcf_em_register(struct tcf_ematch_ops *); +extern int tcf_em_unregister(struct tcf_ematch_ops *); +extern int tcf_em_tree_validate(struct tcf_proto *, struct rtattr *, + struct tcf_ematch_tree *); +extern void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *); +extern int tcf_em_tree_dump(struct sk_buff *, struct tcf_ematch_tree *, int); +extern int __tcf_em_tree_match(struct sk_buff *, struct tcf_ematch_tree *, + struct tcf_pkt_info *); + +/** + * tcf_em_tree_change - replace ematch tree of a running classifier + * + * @tp: classifier kind handle + * @dst: destination ematch tree variable + * @src: source ematch tree (temporary tree from tcf_em_tree_validate) + * + * This functions replaces the ematch tree in @dst with the ematch + * tree in @src. The classifier in charge of the ematch tree may be + * running. + */ +static inline void tcf_em_tree_change(struct tcf_proto *tp, + struct tcf_ematch_tree *dst, + struct tcf_ematch_tree *src) +{ + tcf_tree_lock(tp); + memcpy(dst, src, sizeof(*dst)); + tcf_tree_unlock(tp); +} + +/** + * tcf_em_tree_match - evaulate an ematch tree + * + * @skb: socket buffer of the packet in question + * @tree: ematch tree to be used for evaluation + * @info: packet information examined by classifier + * + * This function matches @skb against the ematch tree in @tree by going + * through all ematches respecting their logic relations returning + * as soon as the result is obvious. + * + * Returns 1 if the ematch tree as-one matches, no ematches are configured + * or ematch is not enabled in the kernel, otherwise 0 is returned. + */ +static inline int tcf_em_tree_match(struct sk_buff *skb, + struct tcf_ematch_tree *tree, + struct tcf_pkt_info *info) +{ + if (tree->hdr.nmatches) + return __tcf_em_tree_match(skb, tree, info); + else + return 1; +} + +#else /* CONFIG_NET_EMATCH */ + +struct tcf_ematch_tree +{ +}; + +#define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0) +#define tcf_em_tree_destroy(tp, t) do { (void)(t); } while(0) +#define tcf_em_tree_dump(skb, t, tlv) (0) +#define tcf_em_tree_change(tp, dst, src) do { } while(0) +#define tcf_em_tree_match(skb, t, info) ((void)(info), 1) + +#endif /* CONFIG_NET_EMATCH */ + +static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer) +{ + switch (layer) { + case TCF_LAYER_LINK: + return skb->data; + case TCF_LAYER_NETWORK: + return skb->nh.raw; + case TCF_LAYER_TRANSPORT: + return skb->h.raw; + } + + return NULL; +} + +static inline int tcf_valid_offset(struct sk_buff *skb, unsigned char *ptr, + int len) +{ + return unlikely((ptr + len) < skb->tail && ptr > skb->head); +} + #ifdef CONFIG_NET_CLS_IND static inline int tcf_change_indev(struct tcf_proto *tp, char *indev, struct rtattr *indev_tlv) diff -Nru a/include/net/x25.h b/include/net/x25.h --- a/include/net/x25.h 2005-03-07 14:54:17 -08:00 +++ b/include/net/x25.h 2005-03-07 14:54:17 -08:00 @@ -10,6 +10,7 @@ #ifndef _X25_H #define _X25_H #include +#include #define X25_ADDR_LEN 16 @@ -129,7 +130,8 @@ atomic_t refcnt; }; -struct x25_opt { +struct x25_sock { + struct sock sk; struct x25_address source_addr, dest_addr; struct x25_neigh *neighbour; unsigned int lci; @@ -141,7 +143,6 @@ struct sk_buff_head fragment_queue; struct sk_buff_head interrupt_in_queue; struct sk_buff_head interrupt_out_queue; - struct sock *sk; /* Backlink to socket */ struct timer_list timer; struct x25_causediag causediag; struct x25_facilities facilities; @@ -149,7 +150,10 @@ unsigned long vc_facil_mask; /* inc_call facilities mask */ }; -#define x25_sk(__sk) ((struct x25_opt *)(__sk)->sk_protinfo) +static inline struct x25_sock *x25_sk(const struct sock *sk) +{ + return (struct x25_sock *)sk; +} /* af_x25.c */ extern int sysctl_x25_restart_request_timeout; diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2005-03-07 14:54:18 -08:00 +++ b/include/net/xfrm.h 2005-03-07 14:54:18 -08:00 @@ -212,7 +212,7 @@ void (*destructor)(struct xfrm_state *); int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); - int (*output)(struct sk_buff *pskb); + int (*output)(struct xfrm_state *, struct sk_buff *pskb); /* Estimate maximal size of result of transformation of a dgram */ u32 (*get_max_size)(struct xfrm_state *, int size); }; @@ -511,6 +511,9 @@ struct rtable rt; struct rt6_info rt6; } u; + struct dst_entry *route; + u32 route_mtu_cached; + u32 child_mtu_cached; }; /* Decapsulation state, used by the input to store data during @@ -807,6 +810,7 @@ extern int xfrm_replay_check(struct xfrm_state *x, u32 seq); extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); +extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); extern int xfrm4_rcv(struct sk_buff *skb); extern int xfrm4_output(struct sk_buff *skb); extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); @@ -857,6 +861,8 @@ extern void xfrm_policy_flush(void); extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); extern int xfrm_flush_bundles(void); +extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); +extern void xfrm_init_pmtu(struct dst_entry *dst); extern wait_queue_head_t km_waitq; extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport); diff -Nru a/kernel/acct.c b/kernel/acct.c --- a/kernel/acct.c 2005-03-07 14:54:17 -08:00 +++ b/kernel/acct.c 2005-03-07 14:54:17 -08:00 @@ -534,10 +534,8 @@ * acct_update_integrals * - update mm integral fields in task_struct */ -void acct_update_integrals(void) +void acct_update_integrals(struct task_struct *tsk) { - struct task_struct *tsk = current; - if (likely(tsk->mm)) { long delta = tsk->stime - tsk->acct_stimexpd; diff -Nru a/kernel/compat.c b/kernel/compat.c --- a/kernel/compat.c 2005-03-07 14:54:17 -08:00 +++ b/kernel/compat.c 2005-03-07 14:54:17 -08:00 @@ -23,6 +23,7 @@ #include #include +#include int get_compat_timespec(struct timespec *ts, const struct compat_timespec __user *cts) { @@ -411,6 +412,36 @@ } return ret; } +} + +asmlinkage long compat_sys_waitid(int which, compat_pid_t pid, + struct compat_siginfo __user *uinfo, int options, + struct compat_rusage __user *uru) +{ + siginfo_t info; + struct rusage ru; + long ret; + mm_segment_t old_fs = get_fs(); + + memset(&info, 0, sizeof(info)); + + set_fs(KERNEL_DS); + ret = sys_waitid(which, pid, (siginfo_t __user *)&info, options, + uru ? (struct rusage __user *)&ru : NULL); + set_fs(old_fs); + + if ((ret < 0) || (info.si_signo == 0)) + return ret; + + if (uru) { + ret = put_compat_rusage(&ru, uru); + if (ret) + return ret; + } + + BUG_ON(info.si_code & __SI_MASK); + info.si_code |= __SI_CHLD; + return copy_siginfo_to_user32(uinfo, &info); } static int compat_get_user_cpu_mask(compat_ulong_t __user *user_mask_ptr, diff -Nru a/kernel/exit.c b/kernel/exit.c --- a/kernel/exit.c 2005-03-07 14:54:18 -08:00 +++ b/kernel/exit.c 2005-03-07 14:54:18 -08:00 @@ -806,8 +806,8 @@ current->comm, current->pid, preempt_count()); - acct_update_integrals(); - update_mem_hiwater(); + acct_update_integrals(tsk); + update_mem_hiwater(tsk); group_dead = atomic_dec_and_test(&tsk->signal->live); if (group_dead) acct_process(code); diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c 2005-03-07 14:54:18 -08:00 +++ b/kernel/sched.c 2005-03-07 14:54:18 -08:00 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -2379,6 +2380,10 @@ cpustat->iowait = cputime64_add(cpustat->iowait, tmp); else cpustat->idle = cputime64_add(cpustat->idle, tmp); + /* Account for system time used */ + acct_update_integrals(p); + /* Update rss highwater mark */ + update_mem_hiwater(p); } /* diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c --- a/kernel/sysctl.c 2005-03-07 14:54:16 -08:00 +++ b/kernel/sysctl.c 2005-03-07 14:54:16 -08:00 @@ -121,6 +121,8 @@ extern int acct_parm[]; #endif +int randomize_va_space = 1; + static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, ctl_table *, void **); static int proc_doutsstring(ctl_table *table, int write, struct file *filp, @@ -632,6 +634,15 @@ .proc_handler = &proc_dointvec, }, #endif + { + .ctl_name = KERN_RANDOMIZE, + .procname = "randomize_va_space", + .data = &randomize_va_space, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { .ctl_name = 0 } }; diff -Nru a/kernel/timer.c b/kernel/timer.c --- a/kernel/timer.c 2005-03-07 14:54:18 -08:00 +++ b/kernel/timer.c 2005-03-07 14:54:18 -08:00 @@ -844,6 +844,8 @@ */ unsigned long avenrun[3]; +EXPORT_SYMBOL(avenrun); + /* * calc_load - given tick count, update the avenrun load estimates. * This is called while holding a write_lock on xtime_lock. diff -Nru a/kernel/workqueue.c b/kernel/workqueue.c --- a/kernel/workqueue.c 2005-03-07 14:54:18 -08:00 +++ b/kernel/workqueue.c 2005-03-07 14:54:18 -08:00 @@ -423,6 +423,30 @@ flush_workqueue(keventd_wq); } +/** + * cancel_rearming_delayed_workqueue - reliably kill off a delayed + * work whose handler rearms the delayed work. + * @wq: the controlling workqueue structure + * @work: the delayed work struct + */ +static void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, + struct work_struct *work) +{ + while (!cancel_delayed_work(work)) + flush_workqueue(wq); +} + +/** + * cancel_rearming_delayed_work - reliably kill off a delayed keventd + * work whose handler rearms the delayed work. + * @work: the delayed work struct + */ +void cancel_rearming_delayed_work(struct work_struct *work) +{ + cancel_rearming_delayed_workqueue(keventd_wq, work); +} +EXPORT_SYMBOL(cancel_rearming_delayed_work); + int keventd_up(void) { return keventd_wq != NULL; diff -Nru a/mm/filemap.c b/mm/filemap.c --- a/mm/filemap.c 2005-03-07 14:54:18 -08:00 +++ b/mm/filemap.c 2005-03-07 14:54:18 -08:00 @@ -126,9 +126,9 @@ if (unlikely(!PageLocked(page))) PAGE_BUG(page); - spin_lock_irq(&mapping->tree_lock); + write_lock_irq(&mapping->tree_lock); __remove_from_page_cache(page); - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); } static int sync_page(void *word) @@ -336,6 +336,22 @@ return retval; } +int filemap_write_and_wait_range(struct address_space *mapping, + loff_t lstart, loff_t lend) +{ + int retval = 0; + + if (mapping->nrpages) { + retval = __filemap_fdatawrite_range(mapping, lstart, lend, + WB_SYNC_ALL); + if (retval == 0) + retval = wait_on_page_writeback_range(mapping, + lstart >> PAGE_CACHE_SHIFT, + lend >> PAGE_CACHE_SHIFT); + } + return retval; +} + /* * This function is used to add newly allocated pagecache pages: * the page is new, so we can just run SetPageLocked() against it. @@ -349,7 +365,7 @@ int error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM); if (error == 0) { - spin_lock_irq(&mapping->tree_lock); + write_lock_irq(&mapping->tree_lock); error = radix_tree_insert(&mapping->page_tree, offset, page); if (!error) { page_cache_get(page); @@ -359,7 +375,7 @@ mapping->nrpages++; pagecache_acct(1); } - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); radix_tree_preload_end(); } return error; @@ -472,11 +488,11 @@ { struct page *page; - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); page = radix_tree_lookup(&mapping->page_tree, offset); if (page) page_cache_get(page); - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); return page; } @@ -489,11 +505,11 @@ { struct page *page; - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); page = radix_tree_lookup(&mapping->page_tree, offset); if (page && TestSetPageLocked(page)) page = NULL; - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); return page; } @@ -515,15 +531,15 @@ { struct page *page; - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); repeat: page = radix_tree_lookup(&mapping->page_tree, offset); if (page) { page_cache_get(page); if (TestSetPageLocked(page)) { - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); lock_page(page); - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); /* Has the page been truncated while we slept? */ if (page->mapping != mapping || page->index != offset) { @@ -533,7 +549,7 @@ } } } - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); return page; } @@ -607,12 +623,12 @@ unsigned int i; unsigned int ret; - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); ret = radix_tree_gang_lookup(&mapping->page_tree, (void **)pages, start, nr_pages); for (i = 0; i < ret; i++) page_cache_get(pages[i]); - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); return ret; } @@ -626,14 +642,14 @@ unsigned int i; unsigned int ret; - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); ret = radix_tree_gang_lookup_tag(&mapping->page_tree, (void **)pages, *index, nr_pages, tag); for (i = 0; i < ret; i++) page_cache_get(pages[i]); if (ret) *index = pages[ret - 1]->index + 1; - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); return ret; } @@ -2269,21 +2285,28 @@ struct file *file = iocb->ki_filp; struct address_space *mapping = file->f_mapping; ssize_t retval; + size_t write_len = 0; /* * If it's a write, unmap all mmappings of the file up-front. This * will cause any pte dirty bits to be propagated into the pageframes * for the subsequent filemap_write_and_wait(). */ - if (rw == WRITE && mapping_mapped(mapping)) - unmap_mapping_range(mapping, 0, -1, 0); + if (rw == WRITE) { + write_len = iov_length(iov, nr_segs); + if (mapping_mapped(mapping)) + unmap_mapping_range(mapping, offset, write_len, 0); + } retval = filemap_write_and_wait(mapping); if (retval == 0) { retval = mapping->a_ops->direct_IO(rw, iocb, iov, offset, nr_segs); if (rw == WRITE && mapping->nrpages) { - int err = invalidate_inode_pages2(mapping); + pgoff_t end = (offset + write_len - 1) + >> PAGE_CACHE_SHIFT; + int err = invalidate_inode_pages2_range(mapping, + offset >> PAGE_CACHE_SHIFT, end); if (err) retval = err; } diff -Nru a/mm/fremap.c b/mm/fremap.c --- a/mm/fremap.c 2005-03-07 14:54:16 -08:00 +++ b/mm/fremap.c 2005-03-07 14:54:16 -08:00 @@ -30,7 +30,7 @@ if (pte_present(pte)) { unsigned long pfn = pte_pfn(pte); - flush_cache_page(vma, addr); + flush_cache_page(vma, addr, pfn); pte = ptep_clear_flush(vma, addr, ptep); if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); @@ -45,7 +45,7 @@ } else { if (!pte_file(pte)) free_swap_and_cache(pte_to_swp_entry(pte)); - pte_clear(ptep); + pte_clear(mm, addr, ptep); } } @@ -94,7 +94,7 @@ mm->rss++; flush_icache_page(vma, page); - set_pte(pte, mk_pte(page, prot)); + set_pte_at(mm, addr, pte, mk_pte(page, prot)); page_add_file_rmap(page); pte_val = *pte; pte_unmap(pte); @@ -139,7 +139,7 @@ zap_pte(mm, vma, addr, pte); - set_pte(pte, pgoff_to_pte(pgoff)); + set_pte_at(mm, addr, pte, pgoff_to_pte(pgoff)); pte_val = *pte; pte_unmap(pte); update_mmu_cache(vma, addr, pte_val); diff -Nru a/mm/highmem.c b/mm/highmem.c --- a/mm/highmem.c 2005-03-07 14:54:17 -08:00 +++ b/mm/highmem.c 2005-03-07 14:54:17 -08:00 @@ -90,7 +90,8 @@ * So no dangers, even with speculative execution. */ page = pte_page(pkmap_page_table[i]); - pte_clear(&pkmap_page_table[i]); + pte_clear(&init_mm, (unsigned long)page_address(page), + &pkmap_page_table[i]); set_page_address(page, NULL); } @@ -138,7 +139,8 @@ } } vaddr = PKMAP_ADDR(last_pkmap_nr); - set_pte(&(pkmap_page_table[last_pkmap_nr]), mk_pte(page, kmap_prot)); + set_pte_at(&init_mm, vaddr, + &(pkmap_page_table[last_pkmap_nr]), mk_pte(page, kmap_prot)); pkmap_count[last_pkmap_nr] = 1; set_page_address(page, (void *)vaddr); diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c 2005-03-07 14:54:17 -08:00 +++ b/mm/memory.c 2005-03-07 14:54:17 -08:00 @@ -46,7 +46,6 @@ #include #include #include -#include #include #include @@ -278,7 +277,7 @@ /* pte contains position in swap, so copy. */ if (!pte_present(pte)) { copy_swap_pte(dst_mm, src_mm, pte); - set_pte(dst_pte, pte); + set_pte_at(dst_mm, addr, dst_pte, pte); return; } pfn = pte_pfn(pte); @@ -292,7 +291,7 @@ page = pfn_to_page(pfn); if (!page || PageReserved(page)) { - set_pte(dst_pte, pte); + set_pte_at(dst_mm, addr, dst_pte, pte); return; } @@ -301,7 +300,7 @@ * in the parent and the child */ if ((vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE) { - ptep_set_wrprotect(src_pte); + ptep_set_wrprotect(src_mm, addr, src_pte); pte = *src_pte; } @@ -316,7 +315,7 @@ dst_mm->rss++; if (PageAnon(page)) dst_mm->anon_rss++; - set_pte(dst_pte, pte); + set_pte_at(dst_mm, addr, dst_pte, pte); page_dup_rmap(page); } @@ -502,14 +501,15 @@ page->index > details->last_index)) continue; } - pte = ptep_get_and_clear(ptep); + pte = ptep_get_and_clear(tlb->mm, address+offset, ptep); tlb_remove_tlb_entry(tlb, ptep, address+offset); if (unlikely(!page)) continue; if (unlikely(details) && details->nonlinear_vma && linear_page_index(details->nonlinear_vma, address+offset) != page->index) - set_pte(ptep, pgoff_to_pte(page->index)); + set_pte_at(tlb->mm, address+offset, + ptep, pgoff_to_pte(page->index)); if (pte_dirty(pte)) set_page_dirty(page); if (PageAnon(page)) @@ -529,7 +529,7 @@ continue; if (!pte_file(pte)) free_swap_and_cache(pte_to_swp_entry(pte)); - pte_clear(ptep); + pte_clear(tlb->mm, address+offset, ptep); } pte_unmap(ptep-1); } @@ -735,7 +735,6 @@ tlb = tlb_gather_mmu(mm, 0); unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details); tlb_finish_mmu(tlb, address, end); - acct_update_integrals(); spin_unlock(&mm->page_table_lock); } @@ -987,19 +986,21 @@ EXPORT_SYMBOL(get_user_pages); -static void zeromap_pte_range(pte_t * pte, unsigned long address, - unsigned long size, pgprot_t prot) +static void zeromap_pte_range(struct mm_struct *mm, pte_t * pte, + unsigned long address, + unsigned long size, pgprot_t prot) { - unsigned long end; + unsigned long base, end; + base = address & PMD_MASK; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) end = PMD_SIZE; do { - pte_t zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE(address), prot)); + pte_t zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE(base+address), prot)); BUG_ON(!pte_none(*pte)); - set_pte(pte, zero_pte); + set_pte_at(mm, base+address, pte, zero_pte); address += PAGE_SIZE; pte++; } while (address && (address < end)); @@ -1019,7 +1020,7 @@ pte_t * pte = pte_alloc_map(mm, pmd, base + address); if (!pte) return -ENOMEM; - zeromap_pte_range(pte, base + address, end - address, prot); + zeromap_pte_range(mm, pte, base + address, end - address, prot); pte_unmap(pte); address = (address + PMD_SIZE) & PMD_MASK; pmd++; @@ -1100,11 +1101,13 @@ * in null mappings (currently treated as "copy-on-access") */ static inline void -remap_pte_range(pte_t * pte, unsigned long address, unsigned long size, +remap_pte_range(struct mm_struct *mm, pte_t * pte, + unsigned long address, unsigned long size, unsigned long pfn, pgprot_t prot) { - unsigned long end; + unsigned long base, end; + base = address & PMD_MASK; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) @@ -1112,7 +1115,7 @@ do { BUG_ON(!pte_none(*pte)); if (!pfn_valid(pfn) || PageReserved(pfn_to_page(pfn))) - set_pte(pte, pfn_pte(pfn, prot)); + set_pte_at(mm, base+address, pte, pfn_pte(pfn, prot)); address += PAGE_SIZE; pfn++; pte++; @@ -1135,7 +1138,7 @@ pte_t * pte = pte_alloc_map(mm, pmd, base + address); if (!pte) return -ENOMEM; - remap_pte_range(pte, base + address, end - address, + remap_pte_range(mm, pte, base + address, end - address, (address >> PAGE_SHIFT) + pfn, prot); pte_unmap(pte); address = (address + PMD_SIZE) & PMD_MASK; @@ -1247,7 +1250,6 @@ { pte_t entry; - flush_cache_page(vma, address); entry = maybe_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot)), vma); ptep_establish(vma, address, page_table, entry); @@ -1299,7 +1301,7 @@ int reuse = can_share_swap_page(old_page); unlock_page(old_page); if (reuse) { - flush_cache_page(vma, address); + flush_cache_page(vma, address, pfn); entry = maybe_mkwrite(pte_mkyoung(pte_mkdirty(pte)), vma); ptep_set_access_flags(vma, address, page_table, entry, 1); @@ -1338,12 +1340,11 @@ if (likely(pte_same(*page_table, pte))) { if (PageAnon(old_page)) mm->anon_rss--; - if (PageReserved(old_page)) { + if (PageReserved(old_page)) ++mm->rss; - acct_update_integrals(); - update_mem_hiwater(); - } else + else page_remove_rmap(old_page); + flush_cache_page(vma, address, pfn); break_cow(vma, new_page, address, page_table); lru_cache_add_active(new_page); page_add_anon_rmap(new_page, vma, address); @@ -1747,9 +1748,6 @@ remove_exclusive_swap_page(page); mm->rss++; - acct_update_integrals(); - update_mem_hiwater(); - pte = mk_pte(page, vma->vm_page_prot); if (write_access && can_share_swap_page(page)) { pte = maybe_mkwrite(pte_mkdirty(pte), vma); @@ -1758,7 +1756,7 @@ unlock_page(page); flush_icache_page(vma, page); - set_pte(page_table, pte); + set_pte_at(mm, address, page_table, pte); page_add_anon_rmap(page, vma, address); if (write_access) { @@ -1814,8 +1812,6 @@ goto out; } mm->rss++; - acct_update_integrals(); - update_mem_hiwater(); entry = maybe_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)), vma); @@ -1824,7 +1820,7 @@ page_add_anon_rmap(page, vma, addr); } - set_pte(page_table, entry); + set_pte_at(mm, addr, page_table, entry); pte_unmap(page_table); /* No need to invalidate - it was non-present before */ @@ -1932,14 +1928,12 @@ if (pte_none(*page_table)) { if (!PageReserved(new_page)) ++mm->rss; - acct_update_integrals(); - update_mem_hiwater(); flush_icache_page(vma, new_page); entry = mk_pte(new_page, vma->vm_page_prot); if (write_access) entry = maybe_mkwrite(pte_mkdirty(entry), vma); - set_pte(page_table, entry); + set_pte_at(mm, address, page_table, entry); if (anon) { lru_cache_add_active(new_page); page_add_anon_rmap(new_page, vma, address); @@ -1983,7 +1977,7 @@ */ if (!vma->vm_ops || !vma->vm_ops->populate || (write_access && !(vma->vm_flags & VM_SHARED))) { - pte_clear(pte); + pte_clear(mm, address, pte); return do_no_page(mm, vma, address, write_access, pte, pmd); } @@ -2253,10 +2247,8 @@ * update_mem_hiwater * - update per process rss and vm high water data */ -void update_mem_hiwater(void) +void update_mem_hiwater(struct task_struct *tsk) { - struct task_struct *tsk = current; - if (tsk->mm) { if (tsk->mm->hiwater_rss < tsk->mm->rss) tsk->mm->hiwater_rss = tsk->mm->rss; diff -Nru a/mm/mmap.c b/mm/mmap.c --- a/mm/mmap.c 2005-03-07 14:54:17 -08:00 +++ b/mm/mmap.c 2005-03-07 14:54:17 -08:00 @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -1121,8 +1120,6 @@ pgoff, flags & MAP_NONBLOCK); down_write(&mm->mmap_sem); } - acct_update_integrals(); - update_mem_hiwater(); return addr; unmap_and_free_vma: @@ -1463,8 +1460,6 @@ if (vma->vm_flags & VM_LOCKED) mm->locked_vm += grow; __vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow); - acct_update_integrals(); - update_mem_hiwater(); return 0; } @@ -1968,8 +1963,6 @@ mm->locked_vm += len >> PAGE_SHIFT; make_pages_present(addr, addr + len); } - acct_update_integrals(); - update_mem_hiwater(); return addr; } diff -Nru a/mm/mprotect.c b/mm/mprotect.c --- a/mm/mprotect.c 2005-03-07 14:54:18 -08:00 +++ b/mm/mprotect.c 2005-03-07 14:54:18 -08:00 @@ -26,11 +26,11 @@ #include static inline void -change_pte_range(pmd_t *pmd, unsigned long address, +change_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long address, unsigned long size, pgprot_t newprot) { pte_t * pte; - unsigned long end; + unsigned long base, end; if (pmd_none(*pmd)) return; @@ -40,6 +40,7 @@ return; } pte = pte_offset_map(pmd, address); + base = address & PMD_MASK; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) @@ -52,8 +53,8 @@ * bits by wiping the pte and then setting the new pte * into place. */ - entry = ptep_get_and_clear(pte); - set_pte(pte, pte_modify(entry, newprot)); + entry = ptep_get_and_clear(mm, base + address, pte); + set_pte_at(mm, base + address, pte, pte_modify(entry, newprot)); } address += PAGE_SIZE; pte++; @@ -62,11 +63,11 @@ } static inline void -change_pmd_range(pud_t *pud, unsigned long address, - unsigned long size, pgprot_t newprot) +change_pmd_range(struct mm_struct *mm, pud_t *pud, unsigned long address, + unsigned long size, pgprot_t newprot) { pmd_t * pmd; - unsigned long end; + unsigned long base, end; if (pud_none(*pud)) return; @@ -76,23 +77,24 @@ return; } pmd = pmd_offset(pud, address); + base = address & PUD_MASK; address &= ~PUD_MASK; end = address + size; if (end > PUD_SIZE) end = PUD_SIZE; do { - change_pte_range(pmd, address, end - address, newprot); + change_pte_range(mm, pmd, base + address, end - address, newprot); address = (address + PMD_SIZE) & PMD_MASK; pmd++; } while (address && (address < end)); } static inline void -change_pud_range(pgd_t *pgd, unsigned long address, - unsigned long size, pgprot_t newprot) +change_pud_range(struct mm_struct *mm, pgd_t *pgd, unsigned long address, + unsigned long size, pgprot_t newprot) { pud_t * pud; - unsigned long end; + unsigned long base, end; if (pgd_none(*pgd)) return; @@ -102,12 +104,13 @@ return; } pud = pud_offset(pgd, address); + base = address & PGDIR_MASK; address &= ~PGDIR_MASK; end = address + size; if (end > PGDIR_SIZE) end = PGDIR_SIZE; do { - change_pmd_range(pud, address, end - address, newprot); + change_pmd_range(mm, pud, base + address, end - address, newprot); address = (address + PUD_SIZE) & PUD_MASK; pud++; } while (address && (address < end)); @@ -130,7 +133,7 @@ next = (start + PGDIR_SIZE) & PGDIR_MASK; if (next <= start || next > end) next = end; - change_pud_range(pgd, start, next - start, newprot); + change_pud_range(mm, pgd, start, next - start, newprot); start = next; pgd++; } diff -Nru a/mm/mremap.c b/mm/mremap.c --- a/mm/mremap.c 2005-03-07 14:54:17 -08:00 +++ b/mm/mremap.c 2005-03-07 14:54:17 -08:00 @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -150,7 +149,7 @@ if (dst) { pte_t pte; pte = ptep_clear_flush(vma, old_addr, src); - set_pte(dst, pte); + set_pte_at(mm, new_addr, dst, pte); } else error = -ENOMEM; pte_unmap_nested(src); @@ -255,9 +254,6 @@ new_addr + new_len); } - acct_update_integrals(); - update_mem_hiwater(); - return new_addr; } @@ -394,8 +390,6 @@ make_pages_present(addr + old_len, addr + new_len); } - acct_update_integrals(); - update_mem_hiwater(); ret = addr; goto out; } diff -Nru a/mm/nommu.c b/mm/nommu.c --- a/mm/nommu.c 2005-03-07 14:54:18 -08:00 +++ b/mm/nommu.c 2005-03-07 14:54:18 -08:00 @@ -959,10 +959,8 @@ { } -void update_mem_hiwater(void) +void update_mem_hiwater(struct task_struct *tsk) { - struct task_struct *tsk = current; - if (likely(tsk->mm)) { if (tsk->mm->hiwater_rss < tsk->mm->rss) tsk->mm->hiwater_rss = tsk->mm->rss; diff -Nru a/mm/page-writeback.c b/mm/page-writeback.c --- a/mm/page-writeback.c 2005-03-07 14:54:17 -08:00 +++ b/mm/page-writeback.c 2005-03-07 14:54:17 -08:00 @@ -601,7 +601,7 @@ struct address_space *mapping2; if (mapping) { - spin_lock_irq(&mapping->tree_lock); + write_lock_irq(&mapping->tree_lock); mapping2 = page_mapping(page); if (mapping2) { /* Race with truncate? */ BUG_ON(mapping2 != mapping); @@ -610,7 +610,7 @@ radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); } - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); if (mapping->host) { /* !PageAnon && !swapper_space */ __mark_inode_dirty(mapping->host, @@ -685,17 +685,17 @@ unsigned long flags; if (mapping) { - spin_lock_irqsave(&mapping->tree_lock, flags); + write_lock_irqsave(&mapping->tree_lock, flags); if (TestClearPageDirty(page)) { radix_tree_tag_clear(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); - spin_unlock_irqrestore(&mapping->tree_lock, flags); + write_unlock_irqrestore(&mapping->tree_lock, flags); if (!mapping->backing_dev_info->memory_backed) dec_page_state(nr_dirty); return 1; } - spin_unlock_irqrestore(&mapping->tree_lock, flags); + write_unlock_irqrestore(&mapping->tree_lock, flags); return 0; } return TestClearPageDirty(page); @@ -742,15 +742,15 @@ if (mapping) { unsigned long flags; - spin_lock_irqsave(&mapping->tree_lock, flags); + write_lock_irqsave(&mapping->tree_lock, flags); if (TestClearPageDirty(page)) { radix_tree_tag_clear(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); - spin_unlock_irqrestore(&mapping->tree_lock, flags); + write_unlock_irqrestore(&mapping->tree_lock, flags); return 1; } - spin_unlock_irqrestore(&mapping->tree_lock, flags); + write_unlock_irqrestore(&mapping->tree_lock, flags); return 0; } return TestClearPageDirty(page); @@ -764,13 +764,13 @@ if (mapping) { unsigned long flags; - spin_lock_irqsave(&mapping->tree_lock, flags); + write_lock_irqsave(&mapping->tree_lock, flags); ret = TestClearPageWriteback(page); if (ret) radix_tree_tag_clear(&mapping->page_tree, page_index(page), PAGECACHE_TAG_WRITEBACK); - spin_unlock_irqrestore(&mapping->tree_lock, flags); + write_unlock_irqrestore(&mapping->tree_lock, flags); } else { ret = TestClearPageWriteback(page); } @@ -785,7 +785,7 @@ if (mapping) { unsigned long flags; - spin_lock_irqsave(&mapping->tree_lock, flags); + write_lock_irqsave(&mapping->tree_lock, flags); ret = TestSetPageWriteback(page); if (!ret) radix_tree_tag_set(&mapping->page_tree, @@ -795,7 +795,7 @@ radix_tree_tag_clear(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); - spin_unlock_irqrestore(&mapping->tree_lock, flags); + write_unlock_irqrestore(&mapping->tree_lock, flags); } else { ret = TestSetPageWriteback(page); } @@ -813,9 +813,9 @@ unsigned long flags; int ret; - spin_lock_irqsave(&mapping->tree_lock, flags); + read_lock_irqsave(&mapping->tree_lock, flags); ret = radix_tree_tagged(&mapping->page_tree, tag); - spin_unlock_irqrestore(&mapping->tree_lock, flags); + read_unlock_irqrestore(&mapping->tree_lock, flags); return ret; } EXPORT_SYMBOL(mapping_tagged); diff -Nru a/mm/readahead.c b/mm/readahead.c --- a/mm/readahead.c 2005-03-07 14:54:18 -08:00 +++ b/mm/readahead.c 2005-03-07 14:54:18 -08:00 @@ -274,7 +274,7 @@ /* * Preallocate as many pages as we will need. */ - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); for (page_idx = 0; page_idx < nr_to_read; page_idx++) { unsigned long page_offset = offset + page_idx; @@ -285,16 +285,16 @@ if (page) continue; - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); page = page_cache_alloc_cold(mapping); - spin_lock_irq(&mapping->tree_lock); + read_lock_irq(&mapping->tree_lock); if (!page) break; page->index = page_offset; list_add(&page->lru, &page_pool); ret++; } - spin_unlock_irq(&mapping->tree_lock); + read_unlock_irq(&mapping->tree_lock); /* * Now start the IO. We ignore I/O errors - if the page is not diff -Nru a/mm/rmap.c b/mm/rmap.c --- a/mm/rmap.c 2005-03-07 14:54:18 -08:00 +++ b/mm/rmap.c 2005-03-07 14:54:18 -08:00 @@ -51,7 +51,6 @@ #include #include #include -#include #include #include @@ -574,7 +573,7 @@ } /* Nuke the page table entry. */ - flush_cache_page(vma, address); + flush_cache_page(vma, address, page_to_pfn(page)); pteval = ptep_clear_flush(vma, address, pte); /* Move the dirty bit to the physical page now the pte is gone. */ @@ -594,13 +593,12 @@ list_add(&mm->mmlist, &init_mm.mmlist); spin_unlock(&mmlist_lock); } - set_pte(pte, swp_entry_to_pte(entry)); + set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); BUG_ON(pte_file(*pte)); mm->anon_rss--; } mm->rss--; - acct_update_integrals(); page_remove_rmap(page); page_cache_release(page); @@ -692,12 +690,12 @@ continue; /* Nuke the page table entry. */ - flush_cache_page(vma, address); + flush_cache_page(vma, address, pfn); pteval = ptep_clear_flush(vma, address, pte); /* If nonlinear, store the file page offset in the pte. */ if (page->index != linear_page_index(vma, address)) - set_pte(pte, pgoff_to_pte(page->index)); + set_pte_at(mm, address, pte, pgoff_to_pte(page->index)); /* Move the dirty bit to the physical page now the pte is gone. */ if (pte_dirty(pteval)) @@ -705,7 +703,6 @@ page_remove_rmap(page); page_cache_release(page); - acct_update_integrals(); mm->rss--; (*mapcount)--; } diff -Nru a/mm/swap_state.c b/mm/swap_state.c --- a/mm/swap_state.c 2005-03-07 14:54:17 -08:00 +++ b/mm/swap_state.c 2005-03-07 14:54:17 -08:00 @@ -35,7 +35,7 @@ struct address_space swapper_space = { .page_tree = RADIX_TREE_INIT(GFP_ATOMIC|__GFP_NOWARN), - .tree_lock = SPIN_LOCK_UNLOCKED, + .tree_lock = RW_LOCK_UNLOCKED, .a_ops = &swap_aops, .i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear), .backing_dev_info = &swap_backing_dev_info, @@ -76,7 +76,7 @@ BUG_ON(PagePrivate(page)); error = radix_tree_preload(gfp_mask); if (!error) { - spin_lock_irq(&swapper_space.tree_lock); + write_lock_irq(&swapper_space.tree_lock); error = radix_tree_insert(&swapper_space.page_tree, entry.val, page); if (!error) { @@ -87,7 +87,7 @@ total_swapcache_pages++; pagecache_acct(1); } - spin_unlock_irq(&swapper_space.tree_lock); + write_unlock_irq(&swapper_space.tree_lock); radix_tree_preload_end(); } return error; @@ -214,9 +214,9 @@ entry.val = page->private; - spin_lock_irq(&swapper_space.tree_lock); + write_lock_irq(&swapper_space.tree_lock); __delete_from_swap_cache(page); - spin_unlock_irq(&swapper_space.tree_lock); + write_unlock_irq(&swapper_space.tree_lock); swap_free(entry); page_cache_release(page); @@ -315,13 +315,13 @@ { struct page *page; - spin_lock_irq(&swapper_space.tree_lock); + read_lock_irq(&swapper_space.tree_lock); page = radix_tree_lookup(&swapper_space.page_tree, entry.val); if (page) { page_cache_get(page); INC_CACHE_INFO(find_success); } - spin_unlock_irq(&swapper_space.tree_lock); + read_unlock_irq(&swapper_space.tree_lock); INC_CACHE_INFO(find_total); return page; } @@ -344,12 +344,12 @@ * called after lookup_swap_cache() failed, re-calling * that would confuse statistics. */ - spin_lock_irq(&swapper_space.tree_lock); + read_lock_irq(&swapper_space.tree_lock); found_page = radix_tree_lookup(&swapper_space.page_tree, entry.val); if (found_page) page_cache_get(found_page); - spin_unlock_irq(&swapper_space.tree_lock); + read_unlock_irq(&swapper_space.tree_lock); if (found_page) break; diff -Nru a/mm/swapfile.c b/mm/swapfile.c --- a/mm/swapfile.c 2005-03-07 14:54:16 -08:00 +++ b/mm/swapfile.c 2005-03-07 14:54:16 -08:00 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -292,10 +291,10 @@ /* Is the only swap cache user the cache itself? */ if (p->swap_map[swp_offset(entry)] == 1) { /* Recheck the page count with the swapcache lock held.. */ - spin_lock_irq(&swapper_space.tree_lock); + write_lock_irq(&swapper_space.tree_lock); if (page_count(page) == 2) retval = 1; - spin_unlock_irq(&swapper_space.tree_lock); + write_unlock_irq(&swapper_space.tree_lock); } swap_info_put(p); } @@ -363,13 +362,13 @@ retval = 0; if (p->swap_map[swp_offset(entry)] == 1) { /* Recheck the page count with the swapcache lock held.. */ - spin_lock_irq(&swapper_space.tree_lock); + write_lock_irq(&swapper_space.tree_lock); if ((page_count(page) == 2) && !PageWriteback(page)) { __delete_from_swap_cache(page); SetPageDirty(page); retval = 1; } - spin_unlock_irq(&swapper_space.tree_lock); + write_unlock_irq(&swapper_space.tree_lock); } swap_info_put(p); @@ -393,12 +392,12 @@ p = swap_info_get(entry); if (p) { if (swap_entry_free(p, swp_offset(entry)) == 1) { - spin_lock_irq(&swapper_space.tree_lock); + read_lock_irq(&swapper_space.tree_lock); page = radix_tree_lookup(&swapper_space.page_tree, entry.val); if (page && TestSetPageLocked(page)) page = NULL; - spin_unlock_irq(&swapper_space.tree_lock); + read_unlock_irq(&swapper_space.tree_lock); } swap_info_put(p); } @@ -434,11 +433,10 @@ { vma->vm_mm->rss++; get_page(page); - set_pte(dir, pte_mkold(mk_pte(page, vma->vm_page_prot))); + set_pte_at(vma->vm_mm, address, dir, + pte_mkold(mk_pte(page, vma->vm_page_prot))); page_add_anon_rmap(page, vma, address); swap_free(entry); - acct_update_integrals(); - update_mem_hiwater(); } /* vma->vm_mm->page_table_lock is held */ diff -Nru a/mm/truncate.c b/mm/truncate.c --- a/mm/truncate.c 2005-03-07 14:54:18 -08:00 +++ b/mm/truncate.c 2005-03-07 14:54:18 -08:00 @@ -76,15 +76,15 @@ if (PagePrivate(page) && !try_to_release_page(page, 0)) return 0; - spin_lock_irq(&mapping->tree_lock); + write_lock_irq(&mapping->tree_lock); if (PageDirty(page)) { - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); return 0; } BUG_ON(PagePrivate(page)); __remove_from_page_cache(page); - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); ClearPageUptodate(page); page_cache_release(page); /* pagecache ref */ return 1; @@ -241,54 +241,62 @@ EXPORT_SYMBOL(invalidate_inode_pages); /** - * invalidate_inode_pages2 - remove all pages from an address_space + * invalidate_inode_pages2_range - remove range of pages from an address_space * @mapping - the address_space + * @start: the page offset 'from' which to invalidate + * @end: the page offset 'to' which to invalidate (inclusive) * * Any pages which are found to be mapped into pagetables are unmapped prior to * invalidation. * * Returns -EIO if any pages could not be invalidated. */ -int invalidate_inode_pages2(struct address_space *mapping) +int invalidate_inode_pages2_range(struct address_space *mapping, + pgoff_t start, pgoff_t end) { struct pagevec pvec; - pgoff_t next = 0; + pgoff_t next; int i; int ret = 0; - int did_full_unmap = 0; + int did_range_unmap = 0; + int wrapped = 0; pagevec_init(&pvec, 0); - while (!ret && pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { + next = start; + while (next <= end && !ret && !wrapped && + pagevec_lookup(&pvec, mapping, next, + min(end - next, (pgoff_t)PAGEVEC_SIZE - 1) + 1)) { for (i = 0; !ret && i < pagevec_count(&pvec); i++) { struct page *page = pvec.pages[i]; int was_dirty; lock_page(page); - if (page->mapping != mapping) { /* truncate race? */ + if (page->mapping != mapping || page->index > end) { unlock_page(page); continue; } wait_on_page_writeback(page); next = page->index + 1; + if (next == 0) + wrapped = 1; while (page_mapped(page)) { - if (!did_full_unmap) { + if (!did_range_unmap) { /* * Zap the rest of the file in one hit. - * FIXME: invalidate_inode_pages2() - * should take start/end offsets. */ unmap_mapping_range(mapping, - page->index << PAGE_CACHE_SHIFT, - -1, 0); - did_full_unmap = 1; + page->index << PAGE_CACHE_SHIFT, + (end - page->index + 1) + << PAGE_CACHE_SHIFT, + 0); + did_range_unmap = 1; } else { /* * Just zap this page */ unmap_mapping_range(mapping, page->index << PAGE_CACHE_SHIFT, - (page->index << PAGE_CACHE_SHIFT)+1, - 0); + PAGE_CACHE_SIZE, 0); } } was_dirty = test_clear_page_dirty(page); @@ -303,5 +311,20 @@ cond_resched(); } return ret; +} +EXPORT_SYMBOL_GPL(invalidate_inode_pages2_range); + +/** + * invalidate_inode_pages2 - remove all pages from an address_space + * @mapping - the address_space + * + * Any pages which are found to be mapped into pagetables are unmapped prior to + * invalidation. + * + * Returns -EIO if any pages could not be invalidated. + */ +int invalidate_inode_pages2(struct address_space *mapping) +{ + return invalidate_inode_pages2_range(mapping, 0, -1); } EXPORT_SYMBOL_GPL(invalidate_inode_pages2); diff -Nru a/mm/vmalloc.c b/mm/vmalloc.c --- a/mm/vmalloc.c 2005-03-07 14:54:17 -08:00 +++ b/mm/vmalloc.c 2005-03-07 14:54:17 -08:00 @@ -26,7 +26,7 @@ static void unmap_area_pte(pmd_t *pmd, unsigned long address, unsigned long size) { - unsigned long end; + unsigned long base, end; pte_t *pte; if (pmd_none(*pmd)) @@ -38,6 +38,7 @@ } pte = pte_offset_kernel(pmd, address); + base = address & PMD_MASK; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) @@ -45,7 +46,7 @@ do { pte_t page; - page = ptep_get_and_clear(pte); + page = ptep_get_and_clear(&init_mm, base + address, pte); address += PAGE_SIZE; pte++; if (pte_none(page)) @@ -59,7 +60,7 @@ static void unmap_area_pmd(pud_t *pud, unsigned long address, unsigned long size) { - unsigned long end; + unsigned long base, end; pmd_t *pmd; if (pud_none(*pud)) @@ -71,13 +72,14 @@ } pmd = pmd_offset(pud, address); + base = address & PUD_MASK; address &= ~PUD_MASK; end = address + size; if (end > PUD_SIZE) end = PUD_SIZE; do { - unmap_area_pte(pmd, address, end - address); + unmap_area_pte(pmd, base + address, end - address); address = (address + PMD_SIZE) & PMD_MASK; pmd++; } while (address < end); @@ -87,7 +89,7 @@ unsigned long size) { pud_t *pud; - unsigned long end; + unsigned long base, end; if (pgd_none(*pgd)) return; @@ -98,13 +100,14 @@ } pud = pud_offset(pgd, address); + base = address & PGDIR_MASK; address &= ~PGDIR_MASK; end = address + size; if (end > PGDIR_SIZE) end = PGDIR_SIZE; do { - unmap_area_pmd(pud, address, end - address); + unmap_area_pmd(pud, base + address, end - address); address = (address + PUD_SIZE) & PUD_MASK; pud++; } while (address && (address < end)); @@ -114,8 +117,9 @@ unsigned long size, pgprot_t prot, struct page ***pages) { - unsigned long end; + unsigned long base, end; + base = address & PMD_MASK; address &= ~PMD_MASK; end = address + size; if (end > PMD_SIZE) @@ -127,7 +131,7 @@ if (!page) return -ENOMEM; - set_pte(pte, mk_pte(page, prot)); + set_pte_at(&init_mm, base + address, pte, mk_pte(page, prot)); address += PAGE_SIZE; pte++; (*pages)++; @@ -151,7 +155,7 @@ pte_t * pte = pte_alloc_kernel(&init_mm, pmd, base + address); if (!pte) return -ENOMEM; - if (map_area_pte(pte, address, end - address, prot, pages)) + if (map_area_pte(pte, base + address, end - address, prot, pages)) return -ENOMEM; address = (address + PMD_SIZE) & PMD_MASK; pmd++; diff -Nru a/mm/vmscan.c b/mm/vmscan.c --- a/mm/vmscan.c 2005-03-07 14:54:16 -08:00 +++ b/mm/vmscan.c 2005-03-07 14:54:16 -08:00 @@ -475,7 +475,7 @@ if (!mapping) goto keep_locked; /* truncate got there first */ - spin_lock_irq(&mapping->tree_lock); + write_lock_irq(&mapping->tree_lock); /* * The non-racy check for busy page. It is critical to check @@ -483,7 +483,7 @@ * not in use by anybody. (pagecache + us == 2) */ if (page_count(page) != 2 || PageDirty(page)) { - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); goto keep_locked; } @@ -491,7 +491,7 @@ if (PageSwapCache(page)) { swp_entry_t swap = { .val = page->private }; __delete_from_swap_cache(page); - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); swap_free(swap); __put_page(page); /* The pagecache ref */ goto free_it; @@ -499,7 +499,7 @@ #endif /* CONFIG_SWAP */ __remove_from_page_cache(page); - spin_unlock_irq(&mapping->tree_lock); + write_unlock_irq(&mapping->tree_lock); __put_page(page); free_it: diff -Nru a/net/appletalk/ddp.c b/net/appletalk/ddp.c --- a/net/appletalk/ddp.c 2005-03-07 14:54:18 -08:00 +++ b/net/appletalk/ddp.c 2005-03-07 14:54:18 -08:00 @@ -1022,7 +1022,6 @@ static int atalk_create(struct socket *sock, int protocol) { struct sock *sk; - struct atalk_sock *at; int rc = -ESOCKTNOSUPPORT; /* @@ -1032,13 +1031,10 @@ if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM) goto out; rc = -ENOMEM; - sk = sk_alloc(PF_APPLETALK, GFP_KERNEL, 1, NULL); + sk = sk_alloc(PF_APPLETALK, GFP_KERNEL, + sizeof(struct atalk_sock), NULL); if (!sk) goto out; - at = sk->sk_protinfo = kmalloc(sizeof(*at), GFP_KERNEL); - if (!at) - goto outsk; - memset(at, 0, sizeof(*at)); rc = 0; sock->ops = &atalk_dgram_ops; sock_init_data(sock, sk); @@ -1048,9 +1044,6 @@ sk->sk_zapped = 1; out: return rc; -outsk: - sk_free(sk); - goto out; } /* Free a socket. No work needed */ diff -Nru a/net/atm/atm_misc.c b/net/atm/atm_misc.c --- a/net/atm/atm_misc.c 2005-03-07 14:54:16 -08:00 +++ b/net/atm/atm_misc.c 2005-03-07 14:54:16 -08:00 @@ -16,7 +16,7 @@ int atm_charge(struct atm_vcc *vcc,int truesize) { atm_force_charge(vcc,truesize); - if (atomic_read(&vcc->sk->sk_rmem_alloc) <= vcc->sk->sk_rcvbuf) + if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf) return 1; atm_return(vcc,truesize); atomic_inc(&vcc->stats->rx_drop); @@ -27,15 +27,16 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, int gfp_flags) { + struct sock *sk = sk_atm(vcc); int guess = atm_guess_pdu2truesize(pdu_size); atm_force_charge(vcc,guess); - if (atomic_read(&vcc->sk->sk_rmem_alloc) <= vcc->sk->sk_rcvbuf) { + if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) { struct sk_buff *skb = alloc_skb(pdu_size,gfp_flags); if (skb) { atomic_add(skb->truesize-guess, - &vcc->sk->sk_rmem_alloc); + &sk->sk_rmem_alloc); return skb; } } diff -Nru a/net/atm/br2684.c b/net/atm/br2684.c --- a/net/atm/br2684.c 2005-03-07 14:54:18 -08:00 +++ b/net/atm/br2684.c 2005-03-07 14:54:18 -08:00 @@ -190,7 +190,7 @@ dev_kfree_skb(skb); return 0; } - atomic_add(skb->truesize, &atmvcc->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk_atm(atmvcc)->sk_wmem_alloc); ATM_SKB(skb)->atm_options = atmvcc->atm_options; brdev->stats.tx_packets++; brdev->stats.tx_bytes += skb->len; @@ -557,7 +557,7 @@ barrier(); atmvcc->push = br2684_push; skb_queue_head_init(©); - skb_migrate(&atmvcc->sk->sk_receive_queue, ©); + skb_migrate(&sk_atm(atmvcc)->sk_receive_queue, ©); while ((skb = skb_dequeue(©)) != NULL) { BRPRIV(skb->dev)->stats.rx_bytes -= skb->len; BRPRIV(skb->dev)->stats.rx_packets--; diff -Nru a/net/atm/clip.c b/net/atm/clip.c --- a/net/atm/clip.c 2005-03-07 14:54:18 -08:00 +++ b/net/atm/clip.c 2005-03-07 14:54:18 -08:00 @@ -58,6 +58,7 @@ static int to_atmarpd(enum atmarp_ctrl_type type,int itf,unsigned long ip) { + struct sock *sk; struct atmarp_ctrl *ctrl; struct sk_buff *skb; @@ -70,8 +71,10 @@ ctrl->itf_num = itf; ctrl->ip = ip; atm_force_charge(atmarpd,skb->truesize); - skb_queue_tail(&atmarpd->sk->sk_receive_queue, skb); - atmarpd->sk->sk_data_ready(atmarpd->sk, skb->len); + + sk = sk_atm(atmarpd); + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); return 0; } @@ -434,7 +437,7 @@ memcpy(here,llc_oui,sizeof(llc_oui)); ((u16 *) here)[3] = skb->protocol; } - atomic_add(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); ATM_SKB(skb)->atm_options = vcc->atm_options; entry->vccs->last_use = jiffies; DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n",skb,vcc,vcc->dev); @@ -493,7 +496,7 @@ vcc->push = clip_push; vcc->pop = clip_pop; skb_queue_head_init(©); - skb_migrate(&vcc->sk->sk_receive_queue, ©); + skb_migrate(&sk_atm(vcc)->sk_receive_queue, ©); /* re-process everything received between connection setup and MKIP */ while ((skb = skb_dequeue(©)) != NULL) if (!clip_devs) { @@ -686,10 +689,10 @@ barrier(); unregister_inetaddr_notifier(&clip_inet_notifier); unregister_netdevice_notifier(&clip_dev_notifier); - if (skb_peek(&vcc->sk->sk_receive_queue)) + if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) printk(KERN_ERR "atmarpd_close: closing with requests " "pending\n"); - skb_queue_purge(&vcc->sk->sk_receive_queue); + skb_queue_purge(&sk_atm(vcc)->sk_receive_queue); DPRINTK("(done)\n"); module_put(THIS_MODULE); } @@ -723,7 +726,7 @@ set_bit(ATM_VF_READY,&vcc->flags); /* allow replies and avoid getting closed if signaling dies */ vcc->dev = &atmarpd_dev; - vcc_insert_socket(vcc->sk); + vcc_insert_socket(sk_atm(vcc)); vcc->push = NULL; vcc->pop = NULL; /* crash */ vcc->push_oam = NULL; /* crash */ @@ -822,7 +825,7 @@ int svc, llc, off; svc = ((clip_vcc == SEQ_NO_VCC_TOKEN) || - (clip_vcc->vcc->sk->sk_family == AF_ATMSVC)); + (sk_atm(clip_vcc->vcc)->sk_family == AF_ATMSVC)); llc = ((clip_vcc == SEQ_NO_VCC_TOKEN) || clip_vcc->encap); diff -Nru a/net/atm/common.c b/net/atm/common.c --- a/net/atm/common.c 2005-03-07 14:54:18 -08:00 +++ b/net/atm/common.c 2005-03-07 14:54:18 -08:00 @@ -68,17 +68,18 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size) { struct sk_buff *skb; + struct sock *sk = sk_atm(vcc); - if (atomic_read(&vcc->sk->sk_wmem_alloc) && !atm_may_send(vcc, size)) { + if (atomic_read(&sk->sk_wmem_alloc) && !atm_may_send(vcc, size)) { DPRINTK("Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n", - atomic_read(&vcc->sk->sk_wmem_alloc), size, - vcc->sk->sk_sndbuf); + atomic_read(&sk->sk_wmem_alloc), size, + sk->sk_sndbuf); return NULL; } while (!(skb = alloc_skb(size,GFP_KERNEL))) schedule(); - DPRINTK("AlTx %d += %d\n", atomic_read(&vcc->sk->sk_wmem_alloc), + DPRINTK("AlTx %d += %d\n", atomic_read(&sk->sk_wmem_alloc), skb->truesize); - atomic_add(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk->sk_wmem_alloc); return skb; } @@ -89,15 +90,11 @@ static void vcc_sock_destruct(struct sock *sk) { - struct atm_vcc *vcc = atm_sk(sk); - - if (atomic_read(&vcc->sk->sk_rmem_alloc)) + if (atomic_read(&sk->sk_rmem_alloc)) printk(KERN_DEBUG "vcc_sock_destruct: rmem leakage (%d bytes) detected.\n", atomic_read(&sk->sk_rmem_alloc)); - if (atomic_read(&vcc->sk->sk_wmem_alloc)) + if (atomic_read(&sk->sk_wmem_alloc)) printk(KERN_DEBUG "vcc_sock_destruct: wmem leakage (%d bytes) detected.\n", atomic_read(&sk->sk_wmem_alloc)); - - kfree(sk->sk_protinfo); } static void vcc_def_wakeup(struct sock *sk) @@ -139,7 +136,7 @@ sock->sk = NULL; if (sock->type == SOCK_STREAM) return -EINVAL; - sk = sk_alloc(family, GFP_KERNEL, 1, NULL); + sk = sk_alloc(family, GFP_KERNEL, sizeof(struct atm_vcc), NULL); if (!sk) return -ENOMEM; sock_init_data(sock, sk); @@ -147,20 +144,13 @@ sk->sk_state_change = vcc_def_wakeup; sk->sk_write_space = vcc_write_space; - vcc = sk->sk_protinfo = kmalloc(sizeof(*vcc), GFP_KERNEL); - if (!vcc) { - sk_free(sk); - return -ENOMEM; - } - - memset(vcc, 0, sizeof(*vcc)); - vcc->sk = sk; + vcc = atm_sk(sk); vcc->dev = NULL; memset(&vcc->local,0,sizeof(struct sockaddr_atmsvc)); memset(&vcc->remote,0,sizeof(struct sockaddr_atmsvc)); vcc->qos.txtp.max_sdu = 1 << 16; /* for meta VCs */ - atomic_set(&vcc->sk->sk_wmem_alloc, 0); - atomic_set(&vcc->sk->sk_rmem_alloc, 0); + atomic_set(&sk->sk_wmem_alloc, 0); + atomic_set(&sk->sk_rmem_alloc, 0); vcc->push = NULL; vcc->pop = NULL; vcc->push_oam = NULL; @@ -187,7 +177,7 @@ vcc_remove_socket(sk); /* no more receive */ - while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue)) != NULL) { + while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { atm_return(vcc,skb->truesize); kfree_skb(skb); } @@ -215,11 +205,13 @@ void vcc_release_async(struct atm_vcc *vcc, int reply) { + struct sock *sk = sk_atm(vcc); + set_bit(ATM_VF_CLOSE, &vcc->flags); - vcc->sk->sk_shutdown |= RCV_SHUTDOWN; - vcc->sk->sk_err = -reply; + sk->sk_shutdown |= RCV_SHUTDOWN; + sk->sk_err = -reply; clear_bit(ATM_VF_WAITING, &vcc->flags); - vcc->sk->sk_state_change(vcc->sk); + sk->sk_state_change(sk); } @@ -328,6 +320,7 @@ static int __vcc_connect(struct atm_vcc *vcc, struct atm_dev *dev, short vpi, int vci) { + struct sock *sk = sk_atm(vcc); int error; if ((vpi != ATM_VPI_UNSPEC && vpi != ATM_VPI_ANY && @@ -347,7 +340,7 @@ } vcc->vpi = vpi; vcc->vci = vci; - __vcc_insert_socket(vcc->sk); + __vcc_insert_socket(sk); write_unlock_irq(&vcc_sklist_lock); switch (vcc->qos.aal) { case ATM_AAL0: @@ -386,7 +379,7 @@ return 0; fail: - vcc_remove_socket(vcc->sk); + vcc_remove_socket(sk); fail_module_put: module_put(dev->ops->owner); /* ensure we get dev module ref count correct */ @@ -495,7 +488,7 @@ if (error) return error; sock_recv_timestamp(msg, sk, skb); - DPRINTK("RcvM %d -= %d\n", atomic_read(&vcc->sk->rmem_alloc), skb->truesize); + DPRINTK("RcvM %d -= %d\n", atomic_read(&sk->rmem_alloc), skb->truesize); atm_return(vcc, skb->truesize); skb_free_datagram(sk, skb); return copied; @@ -615,7 +608,7 @@ return mask; if (vcc->qos.txtp.traffic_class != ATM_NONE && - vcc_writable(vcc->sk)) + vcc_writable(sk)) mask |= POLLOUT | POLLWRNORM | POLLWRBAND; return mask; @@ -638,7 +631,7 @@ if (!error) error = adjust_tp(&qos->rxtp,qos->aal); if (error) return error; if (!vcc->dev->ops->change_qos) return -EOPNOTSUPP; - if (vcc->sk->sk_family == AF_ATMPVC) + if (sk_atm(vcc)->sk_family == AF_ATMPVC) return vcc->dev->ops->change_qos(vcc,qos,ATM_MF_SET); return svc_change_qos(vcc,qos); } diff -Nru a/net/atm/ioctl.c b/net/atm/ioctl.c --- a/net/atm/ioctl.c 2005-03-07 14:54:17 -08:00 +++ b/net/atm/ioctl.c 2005-03-07 14:54:17 -08:00 @@ -46,6 +46,7 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { + struct sock *sk = sock->sk; struct atm_vcc *vcc; int error; struct list_head * pos; @@ -59,8 +60,8 @@ error = -EINVAL; goto done; } - error = put_user(vcc->sk->sk_sndbuf - - atomic_read(&vcc->sk->sk_wmem_alloc), + error = put_user(sk->sk_sndbuf - + atomic_read(&sk->sk_wmem_alloc), (int __user *) argp) ? -EFAULT : 0; goto done; case SIOCINQ: @@ -71,13 +72,13 @@ error = -EINVAL; goto done; } - skb = skb_peek(&vcc->sk->sk_receive_queue); + skb = skb_peek(&sk->sk_receive_queue); error = put_user(skb ? skb->len : 0, (int __user *)argp) ? -EFAULT : 0; goto done; } case SIOCGSTAMP: /* borrowed from IP */ - error = sock_get_timestamp(vcc->sk, argp); + error = sock_get_timestamp(sk, argp); goto done; case ATM_SETSC: printk(KERN_WARNING "ATM_SETSC is obsolete\n"); diff -Nru a/net/atm/lec.c b/net/atm/lec.c --- a/net/atm/lec.c 2005-03-07 14:54:17 -08:00 +++ b/net/atm/lec.c 2005-03-07 14:54:17 -08:00 @@ -122,6 +122,7 @@ eth = (struct ethhdr *)skb->data; buff = skb->data + skb->dev->hard_header_len; if (*buff++ == 0x42 && *buff++ == 0x42 && *buff++ == 0x03) { + struct sock *sk; struct sk_buff *skb2; struct atmlec_msg *mesg; @@ -135,8 +136,9 @@ priv = (struct lec_priv *)dev->priv; atm_force_charge(priv->lecd, skb2->truesize); - skb_queue_tail(&priv->lecd->sk->sk_receive_queue, skb2); - priv->lecd->sk->sk_data_ready(priv->lecd->sk, skb2->len); + sk = sk_atm(priv->lecd); + skb_queue_tail(&sk->sk_receive_queue, skb2); + sk->sk_data_ready(sk, skb2->len); } return; @@ -214,7 +216,7 @@ ATM_SKB(skb)->vcc = vcc; ATM_SKB(skb)->atm_options = vcc->atm_options; - atomic_add(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); if (vcc->send(vcc, skb) < 0) { priv->stats.tx_dropped++; return; @@ -430,7 +432,7 @@ int i; char *tmp; /* FIXME */ - atomic_sub(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); mesg = (struct atmlec_msg *)skb->data; tmp = skb->data; tmp += sizeof(struct atmlec_msg); @@ -528,6 +530,7 @@ f->dst->state == BR_STATE_FORWARDING) { /* hit from bridge table, send LE_ARP_RESPONSE */ struct sk_buff *skb2; + struct sock *sk; DPRINTK("%s: entry found, responding to zeppelin\n", dev->name); skb2 = alloc_skb(sizeof(struct atmlec_msg), GFP_ATOMIC); @@ -538,8 +541,9 @@ skb2->len = sizeof(struct atmlec_msg); memcpy(skb2->data, mesg, sizeof(struct atmlec_msg)); atm_force_charge(priv->lecd, skb2->truesize); - skb_queue_tail(&priv->lecd->sk->sk_receive_queue, skb2); - priv->lecd->sk->sk_data_ready(priv->lecd->sk, skb2->len); + sk = sk_atm(priv->lecd); + skb_queue_tail(&sk->sk_receive_queue, skb2); + sk->sk_data_ready(sk, skb2->len); } if (f != NULL) br_fdb_put_hook(f); #endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */ @@ -567,10 +571,10 @@ netif_stop_queue(dev); lec_arp_destroy(priv); - if (skb_peek(&vcc->sk->sk_receive_queue)) + if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) printk("%s lec_atm_close: closing with messages pending\n", dev->name); - while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue)) != NULL) { + while ((skb = skb_dequeue(&sk_atm(vcc)->sk_receive_queue)) != NULL) { atm_return(vcc, skb->truesize); dev_kfree_skb(skb); } @@ -600,6 +604,7 @@ unsigned char *mac_addr, unsigned char *atm_addr, struct sk_buff *data) { + struct sock *sk; struct sk_buff *skb; struct atmlec_msg *mesg; @@ -623,14 +628,15 @@ memcpy(&mesg->content.normal.atm_addr, atm_addr, ATM_ESA_LEN); atm_force_charge(priv->lecd, skb->truesize); - skb_queue_tail(&priv->lecd->sk->sk_receive_queue, skb); - priv->lecd->sk->sk_data_ready(priv->lecd->sk, skb->len); + sk = sk_atm(priv->lecd); + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); if (data != NULL) { DPRINTK("lec: about to send %d bytes of data\n", data->len); atm_force_charge(priv->lecd, data->truesize); - skb_queue_tail(&priv->lecd->sk->sk_receive_queue, data); - priv->lecd->sk->sk_data_ready(priv->lecd->sk, skb->len); + skb_queue_tail(&sk->sk_receive_queue, data); + sk->sk_data_ready(sk, skb->len); } return 0; @@ -711,9 +717,11 @@ printk("%s...\n",buf); #endif /* DUMP_PACKETS > 0 */ if (memcmp(skb->data, lec_ctrl_magic, 4) ==0) { /* Control frame, to daemon*/ + struct sock *sk = sk_atm(vcc); + DPRINTK("%s: To daemon\n",dev->name); - skb_queue_tail(&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready(vcc->sk, skb->len); + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); } else { /* Data frame, queue to protocol handlers */ unsigned char *dst; @@ -866,7 +874,7 @@ priv->itfnum = i; /* LANE2 addition */ priv->lecd = vcc; vcc->dev = &lecatm_dev; - vcc_insert_socket(vcc->sk); + vcc_insert_socket(sk_atm(vcc)); vcc->proto_data = dev_lec[i]; set_bit(ATM_VF_META,&vcc->flags); diff -Nru a/net/atm/mpc.c b/net/atm/mpc.c --- a/net/atm/mpc.c 2005-03-07 14:54:18 -08:00 +++ b/net/atm/mpc.c 2005-03-07 14:54:18 -08:00 @@ -522,7 +522,7 @@ memcpy(skb->data, &llc_snap_mpoa_data, sizeof(struct llc_snap_hdr)); } - atomic_add(skb->truesize, &entry->shortcut->sk->sk_wmem_alloc); + atomic_add(skb->truesize, &sk_atm(entry->shortcut)->sk_wmem_alloc); ATM_SKB(skb)->atm_options = entry->shortcut->atm_options; entry->shortcut->send(entry->shortcut, skb); entry->packets_fwded++; @@ -665,10 +665,12 @@ skb->dev = dev; if (memcmp(skb->data, &llc_snap_mpoa_ctrl, sizeof(struct llc_snap_hdr)) == 0) { + struct sock *sk = sk_atm(vcc); + dprintk("mpoa: (%s) mpc_push: control packet arrived\n", dev->name); /* Pass control packets to daemon */ - skb_queue_tail(&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready(vcc->sk, skb->len); + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); return; } @@ -794,7 +796,7 @@ mpc->mpoad_vcc = vcc; vcc->dev = &mpc_dev; - vcc_insert_socket(vcc->sk); + vcc_insert_socket(sk_atm(vcc)); set_bit(ATM_VF_META,&vcc->flags); set_bit(ATM_VF_READY,&vcc->flags); @@ -853,7 +855,7 @@ mpc->in_ops->destroy_cache(mpc); mpc->eg_ops->destroy_cache(mpc); - while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue))) { + while ((skb = skb_dequeue(&sk_atm(vcc)->sk_receive_queue))) { atm_return(vcc, skb->truesize); kfree_skb(skb); } @@ -873,7 +875,7 @@ struct mpoa_client *mpc = find_mpc_by_vcc(vcc); struct k_message *mesg = (struct k_message*)skb->data; - atomic_sub(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); if (mpc == NULL) { printk("mpoa: msg_from_mpoad: no mpc found\n"); @@ -938,6 +940,7 @@ int msg_to_mpoad(struct k_message *mesg, struct mpoa_client *mpc) { struct sk_buff *skb; + struct sock *sk; if (mpc == NULL || !mpc->mpoad_vcc) { printk("mpoa: msg_to_mpoad: mesg %d to a non-existent mpoad\n", mesg->type); @@ -950,8 +953,10 @@ skb_put(skb, sizeof(struct k_message)); memcpy(skb->data, mesg, sizeof(struct k_message)); atm_force_charge(mpc->mpoad_vcc, skb->truesize); - skb_queue_tail(&mpc->mpoad_vcc->sk->sk_receive_queue, skb); - mpc->mpoad_vcc->sk->sk_data_ready(mpc->mpoad_vcc->sk, skb->len); + + sk = sk_atm(mpc->mpoad_vcc); + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); return 0; } @@ -1206,6 +1211,7 @@ static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry) { + struct sock *sk; struct k_message *purge_msg; struct sk_buff *skb; @@ -1229,8 +1235,10 @@ purge_msg->content.eg_info = entry->ctrl_info; atm_force_charge(vcc, skb->truesize); - skb_queue_tail(&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready(vcc->sk, skb->len); + + sk = sk_atm(vcc); + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); dprintk("mpoa: purge_egress_shortcut: exiting:\n"); return; diff -Nru a/net/atm/pppoatm.c b/net/atm/pppoatm.c --- a/net/atm/pppoatm.c 2005-03-07 14:54:17 -08:00 +++ b/net/atm/pppoatm.c 2005-03-07 14:54:17 -08:00 @@ -233,7 +233,8 @@ kfree_skb(skb); return 1; } - atomic_add(skb->truesize, &ATM_SKB(skb)->vcc->sk->sk_wmem_alloc); + + atomic_add(skb->truesize, &sk_atm(ATM_SKB(skb)->vcc)->sk_wmem_alloc); ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options; DPRINTK("(unit %d): atm_skb(%p)->vcc(%p)->dev(%p)\n", pvcc->chan.unit, skb, ATM_SKB(skb)->vcc, diff -Nru a/net/atm/proc.c b/net/atm/proc.c --- a/net/atm/proc.c 2005-03-07 14:54:16 -08:00 +++ b/net/atm/proc.c 2005-03-07 14:54:16 -08:00 @@ -71,9 +71,7 @@ static inline int compare_family(struct sock *sk, int family) { - struct atm_vcc *vcc = atm_sk(sk); - - return !family || (vcc->sk->sk_family == family); + return !family || (sk->sk_family == family); } static int __vcc_walk(struct sock **sock, int family, int *bucket, loff_t l) @@ -203,13 +201,15 @@ static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc) { + struct sock *sk = sk_atm(vcc); + seq_printf(seq, "%p ", vcc); if (!vcc->dev) seq_printf(seq, "Unassigned "); else seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi, vcc->vci); - switch (vcc->sk->sk_family) { + switch (sk->sk_family) { case AF_ATMPVC: seq_printf(seq, "PVC"); break; @@ -217,12 +217,12 @@ seq_printf(seq, "SVC"); break; default: - seq_printf(seq, "%3d", vcc->sk->sk_family); + seq_printf(seq, "%3d", sk->sk_family); } - seq_printf(seq, " %04lx %5d %7d/%7d %7d/%7d [%d]\n", vcc->flags, vcc->sk->sk_err, - atomic_read(&vcc->sk->sk_wmem_alloc),vcc->sk->sk_sndbuf, - atomic_read(&vcc->sk->sk_rmem_alloc),vcc->sk->sk_rcvbuf, - atomic_read(&vcc->sk->sk_refcnt)); + seq_printf(seq, " %04lx %5d %7d/%7d %7d/%7d [%d]\n", vcc->flags, sk->sk_err, + atomic_read(&sk->sk_wmem_alloc), sk->sk_sndbuf, + atomic_read(&sk->sk_rmem_alloc), sk->sk_rcvbuf, + atomic_read(&sk->sk_refcnt)); } static void svc_info(struct seq_file *seq, struct atm_vcc *vcc) diff -Nru a/net/atm/raw.c b/net/atm/raw.c --- a/net/atm/raw.c 2005-03-07 14:54:18 -08:00 +++ b/net/atm/raw.c 2005-03-07 14:54:18 -08:00 @@ -28,19 +28,23 @@ void atm_push_raw(struct atm_vcc *vcc,struct sk_buff *skb) { if (skb) { - skb_queue_tail(&vcc->sk->sk_receive_queue, skb); - vcc->sk->sk_data_ready(vcc->sk, skb->len); + struct sock *sk = sk_atm(vcc); + + skb_queue_tail(&sk->sk_receive_queue, skb); + sk->sk_data_ready(sk, skb->len); } } static void atm_pop_raw(struct atm_vcc *vcc,struct sk_buff *skb) { - DPRINTK("APopR (%d) %d -= %d\n", vcc->vci, vcc->sk->sk_wmem_alloc, + struct sock *sk = sk_atm(vcc); + + DPRINTK("APopR (%d) %d -= %d\n", vcc->vci, sk->sk_wmem_alloc, skb->truesize); - atomic_sub(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_sub(skb->truesize, &sk->sk_wmem_alloc); dev_kfree_skb_any(skb); - vcc->sk->sk_write_space(vcc->sk); + sk->sk_write_space(sk); } diff -Nru a/net/atm/signaling.c b/net/atm/signaling.c --- a/net/atm/signaling.c 2005-03-07 14:54:17 -08:00 +++ b/net/atm/signaling.c 2005-03-07 14:54:17 -08:00 @@ -62,8 +62,8 @@ } #endif atm_force_charge(sigd,skb->truesize); - skb_queue_tail(&sigd->sk->sk_receive_queue,skb); - sigd->sk->sk_data_ready(sigd->sk, skb->len); + skb_queue_tail(&sk_atm(sigd)->sk_receive_queue,skb); + sk_atm(sigd)->sk_data_ready(sk_atm(sigd), skb->len); } @@ -97,15 +97,18 @@ { struct atmsvc_msg *msg; struct atm_vcc *session_vcc; + struct sock *sk; msg = (struct atmsvc_msg *) skb->data; - atomic_sub(skb->truesize, &vcc->sk->sk_wmem_alloc); + atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); DPRINTK("sigd_send %d (0x%lx)\n",(int) msg->type, (unsigned long) msg->vcc); vcc = *(struct atm_vcc **) &msg->vcc; + sk = sk_atm(vcc); + switch (msg->type) { case as_okay: - vcc->sk->sk_err = -msg->reply; + sk->sk_err = -msg->reply; clear_bit(ATM_VF_WAITING, &vcc->flags); if (!*vcc->local.sas_addr.prv && !*vcc->local.sas_addr.pub) { @@ -126,25 +129,25 @@ case as_error: clear_bit(ATM_VF_REGIS,&vcc->flags); clear_bit(ATM_VF_READY,&vcc->flags); - vcc->sk->sk_err = -msg->reply; + sk->sk_err = -msg->reply; clear_bit(ATM_VF_WAITING, &vcc->flags); break; case as_indicate: vcc = *(struct atm_vcc **) &msg->listen_vcc; DPRINTK("as_indicate!!!\n"); - lock_sock(vcc->sk); - if (vcc->sk->sk_ack_backlog == - vcc->sk->sk_max_ack_backlog) { + lock_sock(sk); + if (sk->sk_ack_backlog == + sk->sk_max_ack_backlog) { sigd_enq(NULL,as_reject,vcc,NULL,NULL); dev_kfree_skb(skb); goto as_indicate_complete; } - vcc->sk->sk_ack_backlog++; - skb_queue_tail(&vcc->sk->sk_receive_queue, skb); - DPRINTK("waking vcc->sk->sk_sleep 0x%p\n", vcc->sk->sk_sleep); - vcc->sk->sk_state_change(vcc->sk); + sk->sk_ack_backlog++; + skb_queue_tail(&sk->sk_receive_queue, skb); + DPRINTK("waking sk->sk_sleep 0x%p\n", sk->sk_sleep); + sk->sk_state_change(sk); as_indicate_complete: - release_sock(vcc->sk); + release_sock(sk); return 0; case as_close: set_bit(ATM_VF_RELEASED,&vcc->flags); @@ -155,7 +158,7 @@ break; case as_addparty: case as_dropparty: - vcc->sk->sk_err_soft = msg->reply; /* < 0 failure, otherwise ep_ref */ + sk->sk_err_soft = msg->reply; /* < 0 failure, otherwise ep_ref */ clear_bit(ATM_VF_WAITING, &vcc->flags); break; default: @@ -163,7 +166,7 @@ (int) msg->type); return -EINVAL; } - vcc->sk->sk_state_change(vcc->sk); + sk->sk_state_change(sk); out: dev_kfree_skb(skb); return 0; @@ -213,7 +216,7 @@ static void purge_vcc(struct atm_vcc *vcc) { - if (vcc->sk->sk_family == PF_ATMSVC && + if (sk_atm(vcc)->sk_family == PF_ATMSVC && !test_bit(ATM_VF_META,&vcc->flags)) { set_bit(ATM_VF_RELEASED,&vcc->flags); vcc_release_async(vcc, -EUNATCH); @@ -229,9 +232,9 @@ DPRINTK("sigd_close\n"); sigd = NULL; - if (skb_peek(&vcc->sk->sk_receive_queue)) + if (skb_peek(&sk_atm(vcc)->sk_receive_queue)) printk(KERN_ERR "sigd_close: closing with requests pending\n"); - skb_queue_purge(&vcc->sk->sk_receive_queue); + skb_queue_purge(&sk_atm(vcc)->sk_receive_queue); read_lock(&vcc_sklist_lock); for(i = 0; i < VCC_HTABLE_SIZE; ++i) { @@ -268,7 +271,7 @@ DPRINTK("sigd_attach\n"); sigd = vcc; vcc->dev = &sigd_dev; - vcc_insert_socket(vcc->sk); + vcc_insert_socket(sk_atm(vcc)); set_bit(ATM_VF_META,&vcc->flags); set_bit(ATM_VF_READY,&vcc->flags); #ifdef WAIT_FOR_DEMON diff -Nru a/net/atm/svc.c b/net/atm/svc.c --- a/net/atm/svc.c 2005-03-07 14:54:17 -08:00 +++ b/net/atm/svc.c 2005-03-07 14:54:17 -08:00 @@ -53,20 +53,21 @@ { DEFINE_WAIT(wait); struct sk_buff *skb; + struct sock *sk = sk_atm(vcc); DPRINTK("svc_disconnect %p\n",vcc); if (test_bit(ATM_VF_REGIS,&vcc->flags)) { - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); sigd_enq(vcc,as_close,NULL,NULL,NULL); while (!test_bit(ATM_VF_RELEASED,&vcc->flags) && sigd) { schedule(); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); } - finish_wait(vcc->sk->sk_sleep, &wait); + finish_wait(sk->sk_sleep, &wait); } /* beware - socket is still in use by atmsigd until the last as_indicate has been answered */ - while ((skb = skb_dequeue(&vcc->sk->sk_receive_queue)) != NULL) { + while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { atm_return(vcc, skb->truesize); DPRINTK("LISTEN REL\n"); sigd_enq2(NULL,as_reject,vcc,NULL,NULL,&vcc->qos,0); @@ -318,8 +319,7 @@ goto out; } set_bit(ATM_VF_LISTEN,&vcc->flags); - vcc->sk->sk_max_ack_backlog = backlog > 0 ? backlog : - ATM_BACKLOG_DEFAULT; + sk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT; error = -sk->sk_err; out: release_sock(sk); @@ -348,8 +348,8 @@ while (1) { DEFINE_WAIT(wait); - prepare_to_wait(old_vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); - while (!(skb = skb_dequeue(&old_vcc->sk->sk_receive_queue)) && + prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + while (!(skb = skb_dequeue(&sk->sk_receive_queue)) && sigd) { if (test_bit(ATM_VF_RELEASED,&old_vcc->flags)) break; if (test_bit(ATM_VF_CLOSE,&old_vcc->flags)) { @@ -367,9 +367,9 @@ error = -ERESTARTSYS; break; } - prepare_to_wait(old_vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); } - finish_wait(old_vcc->sk->sk_sleep, &wait); + finish_wait(sk->sk_sleep, &wait); if (error) goto out; if (!skb) { @@ -385,7 +385,7 @@ error = vcc_connect(newsock, msg->pvc.sap_addr.itf, msg->pvc.sap_addr.vpi, msg->pvc.sap_addr.vci); dev_kfree_skb(skb); - old_vcc->sk->sk_ack_backlog--; + sk->sk_ack_backlog--; if (error) { sigd_enq2(NULL,as_reject,old_vcc,NULL,NULL, &old_vcc->qos,error); @@ -394,23 +394,23 @@ } /* wait should be short, so we ignore the non-blocking flag */ set_bit(ATM_VF_WAITING, &new_vcc->flags); - prepare_to_wait(new_vcc->sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); + prepare_to_wait(sk_atm(new_vcc)->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); sigd_enq(new_vcc,as_accept,old_vcc,NULL,NULL); while (test_bit(ATM_VF_WAITING, &new_vcc->flags) && sigd) { release_sock(sk); schedule(); lock_sock(sk); - prepare_to_wait(new_vcc->sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); + prepare_to_wait(sk_atm(new_vcc)->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); } - finish_wait(new_vcc->sk->sk_sleep, &wait); + finish_wait(sk_atm(new_vcc)->sk_sleep, &wait); if (!sigd) { error = -EUNATCH; goto out; } - if (!new_vcc->sk->sk_err) + if (!sk_atm(new_vcc)->sk_err) break; - if (new_vcc->sk->sk_err != ERESTARTSYS) { - error = -new_vcc->sk->sk_err; + if (sk_atm(new_vcc)->sk_err != ERESTARTSYS) { + error = -sk_atm(new_vcc)->sk_err; goto out; } } @@ -436,19 +436,20 @@ int svc_change_qos(struct atm_vcc *vcc,struct atm_qos *qos) { + struct sock *sk = sk_atm(vcc); DEFINE_WAIT(wait); set_bit(ATM_VF_WAITING, &vcc->flags); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); sigd_enq2(vcc,as_modify,NULL,NULL,&vcc->local,qos,0); while (test_bit(ATM_VF_WAITING, &vcc->flags) && !test_bit(ATM_VF_RELEASED, &vcc->flags) && sigd) { schedule(); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); } - finish_wait(vcc->sk->sk_sleep, &wait); + finish_wait(sk->sk_sleep, &wait); if (!sigd) return -EUNATCH; - return -vcc->sk->sk_err; + return -sk->sk_err; } @@ -533,28 +534,29 @@ int sockaddr_len, int flags) { DEFINE_WAIT(wait); + struct sock *sk = sock->sk; struct atm_vcc *vcc = ATM_SD(sock); int error; - lock_sock(vcc->sk); + lock_sock(sk); set_bit(ATM_VF_WAITING, &vcc->flags); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); sigd_enq(vcc, as_addparty, NULL, NULL, (struct sockaddr_atmsvc *) sockaddr); if (flags & O_NONBLOCK) { - finish_wait(vcc->sk->sk_sleep, &wait); + finish_wait(sk->sk_sleep, &wait); error = -EINPROGRESS; goto out; } DPRINTK("svc_addparty added wait queue\n"); while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { schedule(); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); } - finish_wait(vcc->sk->sk_sleep, &wait); - error = xchg(&vcc->sk->sk_err_soft, 0); + finish_wait(sk->sk_sleep, &wait); + error = xchg(&sk->sk_err_soft, 0); out: - release_sock(vcc->sk); + release_sock(sk); return error; } @@ -562,25 +564,26 @@ static int svc_dropparty(struct socket *sock, int ep_ref) { DEFINE_WAIT(wait); + struct sock *sk = sock->sk; struct atm_vcc *vcc = ATM_SD(sock); int error; - lock_sock(vcc->sk); + lock_sock(sk); set_bit(ATM_VF_WAITING, &vcc->flags); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); sigd_enq2(vcc, as_dropparty, NULL, NULL, NULL, NULL, ep_ref); while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { schedule(); - prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); } - finish_wait(vcc->sk->sk_sleep, &wait); + finish_wait(sk->sk_sleep, &wait); if (!sigd) { error = -EUNATCH; goto out; } - error = xchg(&vcc->sk->sk_err_soft, 0); + error = xchg(&sk->sk_err_soft, 0); out: - release_sock(vcc->sk); + release_sock(sk); return error; } diff -Nru a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c --- a/net/bluetooth/hci_conn.c 2005-03-07 14:54:18 -08:00 +++ b/net/bluetooth/hci_conn.c 2005-03-07 14:54:18 -08:00 @@ -348,6 +348,24 @@ } EXPORT_SYMBOL(hci_conn_change_link_key); +/* Switch role */ +int hci_conn_switch_role(struct hci_conn *conn, uint8_t role) +{ + BT_DBG("conn %p", conn); + + if (!role && conn->link_mode & HCI_LM_MASTER) + return 1; + + if (!test_and_set_bit(HCI_CONN_RSWITCH_PEND, &conn->pend)) { + struct hci_cp_switch_role cp; + bacpy(&cp.bdaddr, &conn->dst); + cp.role = role; + hci_send_cmd(conn->hdev, OGF_LINK_POLICY, OCF_SWITCH_ROLE, sizeof(cp), &cp); + } + return 0; +} +EXPORT_SYMBOL(hci_conn_switch_role); + /* Drop all connection on the device */ void hci_conn_hash_flush(struct hci_dev *hdev) { diff -Nru a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c --- a/net/bluetooth/hci_event.c 2005-03-07 14:54:16 -08:00 +++ b/net/bluetooth/hci_event.c 2005-03-07 14:54:16 -08:00 @@ -718,17 +718,20 @@ BT_DBG("%s status %d", hdev->name, ev->status); - if (ev->status) - return; - hci_dev_lock(hdev); conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); if (conn) { - if (ev->role) - conn->link_mode &= ~HCI_LM_MASTER; - else - conn->link_mode |= HCI_LM_MASTER; + if (!ev->status) { + if (ev->role) + conn->link_mode &= ~HCI_LM_MASTER; + else + conn->link_mode |= HCI_LM_MASTER; + } + + clear_bit(HCI_CONN_RSWITCH_PEND, &conn->pend); + + hci_role_switch_cfm(conn, ev->status, ev->role); } hci_dev_unlock(hdev); @@ -749,6 +752,7 @@ if (conn) { if (!ev->status) conn->link_mode |= HCI_LM_AUTH; + clear_bit(HCI_CONN_AUTH_PEND, &conn->pend); hci_auth_cfm(conn, ev->status); @@ -790,6 +794,7 @@ else conn->link_mode &= ~HCI_LM_ENCRYPT; } + clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend); hci_encrypt_cfm(conn, ev->status, ev->encrypt); @@ -801,6 +806,25 @@ /* Change Connection Link Key Complete */ static inline void hci_change_conn_link_key_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { + struct hci_ev_change_conn_link_key_complete *ev = (struct hci_ev_change_conn_link_key_complete *) skb->data; + struct hci_conn *conn = NULL; + __u16 handle = __le16_to_cpu(ev->handle); + + BT_DBG("%s status %d", hdev->name, ev->status); + + hci_dev_lock(hdev); + + conn = hci_conn_hash_lookup_handle(hdev, handle); + if (conn) { + if (!ev->status) + conn->link_mode |= HCI_LM_SECURE; + + clear_bit(HCI_CONN_AUTH_PEND, &conn->pend); + + hci_key_change_cfm(conn, ev->status); + } + + hci_dev_unlock(hdev); } /* Pin Code Request*/ diff -Nru a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c --- a/net/bluetooth/hci_sysfs.c 2005-03-07 14:54:17 -08:00 +++ b/net/bluetooth/hci_sysfs.c 2005-03-07 14:54:17 -08:00 @@ -55,7 +55,7 @@ batostr(&bdaddr), data->pscan_rep_mode, data->pscan_period_mode, data->pscan_mode, data->dev_class[2], data->dev_class[1], data->dev_class[0], - data->clock_offset, data->rssi, e->timestamp); + __le16_to_cpu(data->clock_offset), data->rssi, e->timestamp); } hci_dev_unlock_bh(hdev); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2005-03-07 14:54:17 -08:00 +++ b/net/core/dev.c 2005-03-07 14:54:17 -08:00 @@ -2300,6 +2300,21 @@ return err; } +int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa) +{ + int err; + + if (!dev->set_mac_address) + return -EOPNOTSUPP; + if (sa->sa_family != dev->type) + return -EINVAL; + if (!netif_device_present(dev)) + return -ENODEV; + err = dev->set_mac_address(dev, sa); + if (!err) + notifier_call_chain(&netdev_chain, NETDEV_CHANGEADDR, dev); + return err; +} /* * Perform the SIOCxIFxxx calls. @@ -2346,17 +2361,7 @@ return 0; case SIOCSIFHWADDR: - if (!dev->set_mac_address) - return -EOPNOTSUPP; - if (ifr->ifr_hwaddr.sa_family != dev->type) - return -EINVAL; - if (!netif_device_present(dev)) - return -ENODEV; - err = dev->set_mac_address(dev, &ifr->ifr_hwaddr); - if (!err) - notifier_call_chain(&netdev_chain, - NETDEV_CHANGEADDR, dev); - return err; + return dev_set_mac_address(dev, &ifr->ifr_hwaddr); case SIOCSIFHWBROADCAST: if (ifr->ifr_hwaddr.sa_family != dev->type) @@ -3322,6 +3327,7 @@ EXPORT_SYMBOL(dev_set_promiscuity); EXPORT_SYMBOL(dev_change_flags); EXPORT_SYMBOL(dev_set_mtu); +EXPORT_SYMBOL(dev_set_mac_address); EXPORT_SYMBOL(free_netdev); EXPORT_SYMBOL(netdev_boot_setup_check); EXPORT_SYMBOL(netdev_set_master); diff -Nru a/net/core/netfilter.c b/net/core/netfilter.c --- a/net/core/netfilter.c 2005-03-07 14:54:17 -08:00 +++ b/net/core/netfilter.c 2005-03-07 14:54:17 -08:00 @@ -678,7 +678,6 @@ int skb_ip_make_writable(struct sk_buff **pskb, unsigned int writable_len) { struct sk_buff *nskb; - unsigned int iplen; if (writable_len > (*pskb)->len) return 0; @@ -687,35 +686,7 @@ if (skb_shared(*pskb) || skb_cloned(*pskb)) goto copy_skb; - /* Alexey says IP hdr is always modifiable and linear, so ok. */ - if (writable_len <= (*pskb)->nh.iph->ihl*4) - return 1; - - iplen = writable_len - (*pskb)->nh.iph->ihl*4; - - /* DaveM says protocol headers are also modifiable. */ - switch ((*pskb)->nh.iph->protocol) { - case IPPROTO_TCP: { - struct tcphdr _hdr, *hp; - hp = skb_header_pointer(*pskb, (*pskb)->nh.iph->ihl*4, - sizeof(_hdr), &_hdr); - if (hp == NULL) - goto copy_skb; - if (writable_len <= (*pskb)->nh.iph->ihl*4 + hp->doff*4) - goto pull_skb; - goto copy_skb; - } - case IPPROTO_UDP: - if (writable_len<=(*pskb)->nh.iph->ihl*4+sizeof(struct udphdr)) - goto pull_skb; - goto copy_skb; - case IPPROTO_ICMP: - if (writable_len - <= (*pskb)->nh.iph->ihl*4 + sizeof(struct icmphdr)) - goto pull_skb; - goto copy_skb; - /* Insert other cases here as desired */ - } + return pskb_may_pull(*pskb, writable_len); copy_skb: nskb = skb_copy(*pskb, GFP_ATOMIC); @@ -730,9 +701,6 @@ kfree_skb(*pskb); *pskb = nskb; return 1; - -pull_skb: - return pskb_may_pull(*pskb, writable_len); } EXPORT_SYMBOL(skb_ip_make_writable); #endif /*CONFIG_INET*/ diff -Nru a/net/core/skbuff.c b/net/core/skbuff.c --- a/net/core/skbuff.c 2005-03-07 14:54:17 -08:00 +++ b/net/core/skbuff.c 2005-03-07 14:54:17 -08:00 @@ -241,7 +241,8 @@ void skb_release_data(struct sk_buff *skb) { if (!skb->cloned || - atomic_dec_and_test(&(skb_shinfo(skb)->dataref))) { + !atomic_sub_return(skb->nohdr ? (1 << SKB_DATAREF_SHIFT) + 1 : 1, + &skb_shinfo(skb)->dataref)) { if (skb_shinfo(skb)->nr_frags) { int i; for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) @@ -353,6 +354,7 @@ C(csum); C(local_df); n->cloned = 1; + n->nohdr = 0; C(pkt_type); C(ip_summed); C(priority); @@ -604,6 +606,7 @@ skb->h.raw += off; skb->nh.raw += off; skb->cloned = 0; + skb->nohdr = 0; atomic_set(&skb_shinfo(skb)->dataref, 1); return 0; diff -Nru a/net/core/sock.c b/net/core/sock.c --- a/net/core/sock.c 2005-03-07 14:54:17 -08:00 +++ b/net/core/sock.c 2005-03-07 14:54:17 -08:00 @@ -621,9 +621,17 @@ { struct sock *sk = NULL; - if (!slab) + /* + * Transitional, this test will be removed when sk_cachep is killed + */ + if (slab == NULL && zero_it == 1) slab = sk_cachep; - sk = kmem_cache_alloc(slab, priority); + + if (slab != NULL) + sk = kmem_cache_alloc(slab, priority); + else + sk = kmalloc(zero_it, priority); + if (sk) { if (zero_it) { memset(sk, 0, @@ -662,7 +670,10 @@ __FUNCTION__, atomic_read(&sk->sk_omem_alloc)); security_sk_free(sk); - kmem_cache_free(sk->sk_slab, sk); + if (sk->sk_slab != NULL) + kmem_cache_free(sk->sk_slab, sk); + else + kfree(sk); module_put(owner); } diff -Nru a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c --- a/net/decnet/af_decnet.c 2005-03-07 14:54:17 -08:00 +++ b/net/decnet/af_decnet.c 2005-03-07 14:54:17 -08:00 @@ -456,8 +456,6 @@ if (!sk) goto out; - sk->sk_protinfo = scp = (struct dn_scp *)(sk + 1); - if (sock) sock->ops = &dn_proto_ops; sock_init_data(sock, sk); @@ -471,6 +469,7 @@ sk->sk_allocation = gfp; /* Initialization of DECnet Session Control Port */ + scp = DN_SK(sk); scp->state = DN_O; /* Open */ scp->numdat = 1; /* Next data seg to tx */ scp->numoth = 1; /* Next oth data to tx */ diff -Nru a/net/econet/af_econet.c b/net/econet/af_econet.c --- a/net/econet/af_econet.c 2005-03-07 14:54:17 -08:00 +++ b/net/econet/af_econet.c 2005-03-07 14:54:17 -08:00 @@ -184,7 +184,7 @@ { struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr; struct sock *sk=sock->sk; - struct econet_opt *eo = ec_sk(sk); + struct econet_sock *eo = ec_sk(sk); /* * Check legality @@ -284,7 +284,7 @@ */ if (saddr == NULL) { - struct econet_opt *eo = ec_sk(sk); + struct econet_sock *eo = ec_sk(sk); addr.station = eo->station; addr.net = eo->net; @@ -485,7 +485,7 @@ int *uaddr_len, int peer) { struct sock *sk = sock->sk; - struct econet_opt *eo = ec_sk(sk); + struct econet_sock *eo = ec_sk(sk); struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr; if (peer) @@ -562,7 +562,7 @@ static int econet_create(struct socket *sock, int protocol) { struct sock *sk; - struct econet_opt *eo; + struct econet_sock *eo; int err; /* Econet only provides datagram services. */ @@ -572,7 +572,8 @@ sock->state = SS_UNCONNECTED; err = -ENOBUFS; - sk = sk_alloc(PF_ECONET, GFP_KERNEL, 1, NULL); + sk = sk_alloc(PF_ECONET, GFP_KERNEL, + sizeof(struct econet_sock), NULL); if (sk == NULL) goto out; @@ -581,19 +582,13 @@ sock_init_data(sock,sk); sk_set_owner(sk, THIS_MODULE); - eo = sk->sk_protinfo = kmalloc(sizeof(*eo), GFP_KERNEL); - if (!eo) - goto out_free; - memset(eo, 0, sizeof(*eo)); + eo = ec_sk(sk); sk->sk_zapped = 0; sk->sk_family = PF_ECONET; eo->num = protocol; econet_insert_socket(&econet_sklist, sk); return(0); - -out_free: - sk_free(sk); out: return err; } @@ -735,7 +730,7 @@ struct hlist_node *node; sk_for_each(sk, node, &econet_sklist) { - struct econet_opt *opt = ec_sk(sk); + struct econet_sock *opt = ec_sk(sk); if ((opt->port == port || opt->port == 0) && (opt->station == station || opt->station == 0) && (opt->net == net || opt->net == 0)) diff -Nru a/net/ipv4/ah4.c b/net/ipv4/ah4.c --- a/net/ipv4/ah4.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv4/ah4.c 2005-03-07 14:54:18 -08:00 @@ -53,11 +53,9 @@ return 0; } -static int ah_output(struct sk_buff *skb) +static int ah_output(struct xfrm_state *x, struct sk_buff *skb) { int err; - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; struct iphdr *iph, *top_iph; struct ip_auth_hdr *ah; struct ah_data *ahp; diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c --- a/net/ipv4/devinet.c 2005-03-07 14:54:16 -08:00 +++ b/net/ipv4/devinet.c 2005-03-07 14:54:16 -08:00 @@ -187,6 +187,10 @@ ASSERT_RTNL(); + dev = in_dev->dev; + if (dev == &loopback_dev) + return; + in_dev->dead = 1; ip_mc_destroy_dev(in_dev); @@ -200,7 +204,6 @@ devinet_sysctl_unregister(&in_dev->cnf); #endif - dev = in_dev->dev; dev->ip_ptr = NULL; #ifdef CONFIG_SYSCTL @@ -943,8 +946,16 @@ ASSERT_RTNL(); - if (!in_dev) + if (!in_dev) { + if (event == NETDEV_REGISTER && dev == &loopback_dev) { + in_dev = inetdev_init(dev); + if (!in_dev) + panic("devinet: Failed to create loopback\n"); + in_dev->cnf.no_xfrm = 1; + in_dev->cnf.no_policy = 1; + } goto out; + } switch (event) { case NETDEV_REGISTER: @@ -967,8 +978,6 @@ memcpy(ifa->ifa_label, dev->name, IFNAMSIZ); inet_insert_ifa(ifa); } - in_dev->cnf.no_xfrm = 1; - in_dev->cnf.no_policy = 1; } ip_mc_up(in_dev); break; diff -Nru a/net/ipv4/esp4.c b/net/ipv4/esp4.c --- a/net/ipv4/esp4.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv4/esp4.c 2005-03-07 14:54:17 -08:00 @@ -17,11 +17,9 @@ __u8 proto; }; -static int esp_output(struct sk_buff *skb) +static int esp_output(struct xfrm_state *x, struct sk_buff *skb) { int err; - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; struct iphdr *top_iph; struct ip_esp_hdr *esph; struct crypto_tfm *tfm; diff -Nru a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c --- a/net/ipv4/ipcomp.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv4/ipcomp.c 2005-03-07 14:54:18 -08:00 @@ -154,11 +154,9 @@ return err; } -static int ipcomp_output(struct sk_buff *skb) +static int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb) { int err; - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; struct iphdr *iph; struct ip_comp_hdr *ipch; struct ipcomp_data *ipcd = x->data; diff -Nru a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c --- a/net/ipv4/ipvs/ip_vs_ctl.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv4/ipvs/ip_vs_ctl.c 2005-03-07 14:54:18 -08:00 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -90,7 +90,7 @@ #endif /* - * update_defense_level is called from timer bh and from sysctl. + * update_defense_level is called from keventd and from sysctl. */ static void update_defense_level(void) { @@ -212,19 +212,19 @@ /* * Timer for checking the defense */ -static struct timer_list defense_timer; #define DEFENSE_TIMER_PERIOD 1*HZ +static void defense_work_handler(void *data); +static DECLARE_WORK(defense_work, defense_work_handler, NULL); -static void defense_timer_handler(unsigned long data) +static void defense_work_handler(void *data) { update_defense_level(); if (atomic_read(&ip_vs_dropentry)) ip_vs_random_dropentry(); - mod_timer(&defense_timer, jiffies + DEFENSE_TIMER_PERIOD); + schedule_delayed_work(&defense_work, DEFENSE_TIMER_PERIOD); } - int ip_vs_use_count_inc(void) { @@ -2370,10 +2370,7 @@ ip_vs_new_estimator(&ip_vs_stats); /* Hook the defense timer */ - init_timer(&defense_timer); - defense_timer.function = defense_timer_handler; - defense_timer.expires = jiffies + DEFENSE_TIMER_PERIOD; - add_timer(&defense_timer); + schedule_delayed_work(&defense_work, DEFENSE_TIMER_PERIOD); LeaveFunction(2); return 0; @@ -2384,7 +2381,7 @@ { EnterFunction(2); ip_vs_trash_cleanup(); - del_timer_sync(&defense_timer); + cancel_rearming_delayed_work(&defense_work); ip_vs_kill_estimator(&ip_vs_stats); unregister_sysctl_table(sysctl_header); proc_net_remove("ip_vs_stats"); diff -Nru a/net/ipv4/netfilter/ipt_hashlimit.c b/net/ipv4/netfilter/ipt_hashlimit.c --- a/net/ipv4/netfilter/ipt_hashlimit.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv4/netfilter/ipt_hashlimit.c 2005-03-07 14:54:17 -08:00 @@ -33,11 +33,7 @@ #include #include #include - -#define ASSERT_READ_LOCK(x) -#define ASSERT_WRITE_LOCK(x) -#include -#include +#include #include #include @@ -67,7 +63,7 @@ struct dsthash_ent { /* static / read-only parts in the beginning */ - struct list_head list; + struct hlist_node node; struct dsthash_dst dst; /* modified structure members in the end */ @@ -80,7 +76,7 @@ }; struct ipt_hashlimit_htable { - struct list_head list; /* global list of all htables */ + struct hlist_node node; /* global list of all htables */ atomic_t use; struct hashlimit_cfg cfg; /* config */ @@ -94,12 +90,12 @@ /* seq_file stuff */ struct proc_dir_entry *pde; - struct list_head hash[0]; /* hashtable itself */ + struct hlist_head hash[0]; /* hashtable itself */ }; -static DECLARE_RWLOCK(hashlimit_lock); /* protects htables list */ +static DECLARE_LOCK(hashlimit_lock); /* protects htables list */ static DECLARE_MUTEX(hlimit_mutex); /* additional checkentry protection */ -static LIST_HEAD(hashlimit_htables); +static HLIST_HEAD(hashlimit_htables); static kmem_cache_t *hashlimit_cachep; static inline int dst_cmp(const struct dsthash_ent *ent, struct dsthash_dst *b) @@ -120,9 +116,17 @@ static inline struct dsthash_ent * __dsthash_find(const struct ipt_hashlimit_htable *ht, struct dsthash_dst *dst) { - struct dsthash_ent *ent; + struct dsthash_ent *ent = NULL; + struct hlist_node *pos; u_int32_t hash = hash_dst(ht, dst); - ent = LIST_FIND(&ht->hash[hash], dst_cmp, struct dsthash_ent *, dst); + + if (!hlist_empty(&ht->hash[hash])) + hlist_for_each_entry(ent, pos, &ht->hash[hash], node) { + if (dst_cmp(ent, dst)) { + break; + } + } + return ent; } @@ -162,7 +166,7 @@ ent->dst.src_ip = dst->src_ip; ent->dst.src_port = dst->src_port; - list_add(&ent->list, &ht->hash[hash_dst(ht, dst)]); + hlist_add_head(&ent->node, &ht->hash[hash_dst(ht, dst)]); return ent; } @@ -170,7 +174,7 @@ static inline void __dsthash_free(struct ipt_hashlimit_htable *ht, struct dsthash_ent *ent) { - list_del(&ent->list); + hlist_del(&ent->node); kmem_cache_free(hashlimit_cachep, ent); atomic_dec(&ht->count); } @@ -210,7 +214,7 @@ hinfo->cfg.max = hinfo->cfg.size; for (i = 0; i < hinfo->cfg.size; i++) - INIT_LIST_HEAD(&hinfo->hash[i]); + INIT_HLIST_HEAD(&hinfo->hash[i]); atomic_set(&hinfo->count, 0); atomic_set(&hinfo->use, 1); @@ -230,9 +234,9 @@ hinfo->timer.function = htable_gc; add_timer(&hinfo->timer); - WRITE_LOCK(&hashlimit_lock); - list_add(&hinfo->list, &hashlimit_htables); - WRITE_UNLOCK(&hashlimit_lock); + LOCK_BH(&hashlimit_lock); + hlist_add_head(&hinfo->node, &hashlimit_htables); + UNLOCK_BH(&hashlimit_lock); return 0; } @@ -258,8 +262,9 @@ /* lock hash table and iterate over it */ spin_lock_bh(&ht->lock); for (i = 0; i < ht->cfg.size; i++) { - struct dsthash_ent *dh, *n; - list_for_each_entry_safe(dh, n, &ht->hash[i], list) { + struct dsthash_ent *dh; + struct hlist_node *pos, *n; + hlist_for_each_entry_safe(dh, pos, n, &ht->hash[i], node) { if ((*select)(ht, dh)) __dsthash_free(ht, dh); } @@ -295,16 +300,17 @@ static struct ipt_hashlimit_htable *htable_find_get(char *name) { struct ipt_hashlimit_htable *hinfo; + struct hlist_node *pos; - READ_LOCK(&hashlimit_lock); - list_for_each_entry(hinfo, &hashlimit_htables, list) { + LOCK_BH(&hashlimit_lock); + hlist_for_each_entry(hinfo, pos, &hashlimit_htables, node) { if (!strcmp(name, hinfo->pde->name)) { atomic_inc(&hinfo->use); - READ_UNLOCK(&hashlimit_lock); + UNLOCK_BH(&hashlimit_lock); return hinfo; } } - READ_UNLOCK(&hashlimit_lock); + UNLOCK_BH(&hashlimit_lock); return NULL; } @@ -312,9 +318,9 @@ static void htable_put(struct ipt_hashlimit_htable *hinfo) { if (atomic_dec_and_test(&hinfo->use)) { - WRITE_LOCK(&hashlimit_lock); - list_del(&hinfo->list); - WRITE_UNLOCK(&hashlimit_lock); + LOCK_BH(&hashlimit_lock); + hlist_del(&hinfo->node); + UNLOCK_BH(&hashlimit_lock); htable_destroy(hinfo); } } @@ -631,12 +637,17 @@ struct proc_dir_entry *pde = s->private; struct ipt_hashlimit_htable *htable = pde->data; unsigned int *bucket = (unsigned int *)v; + struct dsthash_ent *ent; + struct hlist_node *pos; - if (LIST_FIND_W(&htable->hash[*bucket], dl_seq_real_show, - struct dsthash_ent *, s)) { - /* buffer was filled and unable to print that tuple */ - return 1; - } + if (!hlist_empty(&htable->hash[*bucket])) + hlist_for_each_entry(ent, pos, &htable->hash[*bucket], node) { + if (dl_seq_real_show(ent, s)) { + /* buffer was filled and unable to print that tuple */ + return 1; + } + } + return 0; } diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv4/route.c 2005-03-07 14:54:18 -08:00 @@ -104,6 +104,9 @@ #include #endif +#define RT_FL_TOS(oldflp) \ + ((u32)(oldflp->fl4_tos & (IPTOS_RT_MASK | RTO_ONLINK))) + #define IP_MAX_MTU 0xFFF0 #define RT_GC_TIMEOUT (300*HZ) @@ -144,6 +147,7 @@ static void ipv4_link_failure(struct sk_buff *skb); static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu); static int rt_garbage_collect(void); +static inline int compare_keys(struct flowi *fl1, struct flowi *fl2); static struct dst_ops ipv4_dst_ops = { @@ -1535,6 +1539,169 @@ return -EINVAL; } + +static void ip_handle_martian_source(struct net_device *dev, + struct in_device *in_dev, + struct sk_buff *skb, + u32 daddr, + u32 saddr) +{ + RT_CACHE_STAT_INC(in_martian_src); +#ifdef CONFIG_IP_ROUTE_VERBOSE + if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit()) { + /* + * RFC1812 recommendation, if source is martian, + * the only hint is MAC header. + */ + printk(KERN_WARNING "martian source %u.%u.%u.%u from " + "%u.%u.%u.%u, on dev %s\n", + NIPQUAD(daddr), NIPQUAD(saddr), dev->name); + if (dev->hard_header_len) { + int i; + unsigned char *p = skb->mac.raw; + printk(KERN_WARNING "ll header: "); + for (i = 0; i < dev->hard_header_len; i++, p++) { + printk("%02x", *p); + if (i < (dev->hard_header_len - 1)) + printk(":"); + } + printk("\n"); + } + } +#endif +} + +static inline int __mkroute_input(struct sk_buff *skb, + struct fib_result* res, + struct in_device *in_dev, + u32 daddr, u32 saddr, u32 tos, + struct rtable **result) +{ + + struct rtable *rth; + int err; + struct in_device *out_dev; + unsigned flags = 0; + u32 spec_dst, itag; + + /* get a working reference to the output device */ + out_dev = in_dev_get(FIB_RES_DEV(*res)); + if (out_dev == NULL) { + if (net_ratelimit()) + printk(KERN_CRIT "Bug in ip_route_input" \ + "_slow(). Please, report\n"); + return -EINVAL; + } + + + err = fib_validate_source(saddr, daddr, tos, FIB_RES_OIF(*res), + in_dev->dev, &spec_dst, &itag); + if (err < 0) { + ip_handle_martian_source(in_dev->dev, in_dev, skb, daddr, + saddr); + + err = -EINVAL; + goto cleanup; + } + + if (err) + flags |= RTCF_DIRECTSRC; + + if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) && + (IN_DEV_SHARED_MEDIA(out_dev) || + inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) + flags |= RTCF_DOREDIRECT; + + if (skb->protocol != htons(ETH_P_IP)) { + /* Not IP (i.e. ARP). Do not create route, if it is + * invalid for proxy arp. DNAT routes are always valid. + */ + if (out_dev == in_dev && !(flags & RTCF_DNAT)) { + err = -EINVAL; + goto cleanup; + } + } + + + rth = dst_alloc(&ipv4_dst_ops); + if (!rth) { + err = -ENOBUFS; + goto cleanup; + } + + rth->u.dst.flags= DST_HOST; + if (in_dev->cnf.no_policy) + rth->u.dst.flags |= DST_NOPOLICY; + if (in_dev->cnf.no_xfrm) + rth->u.dst.flags |= DST_NOXFRM; + rth->fl.fl4_dst = daddr; + rth->rt_dst = daddr; + rth->fl.fl4_tos = tos; +#ifdef CONFIG_IP_ROUTE_FWMARK + rth->fl.fl4_fwmark= skb->nfmark; +#endif + rth->fl.fl4_src = saddr; + rth->rt_src = saddr; + rth->rt_gateway = daddr; + rth->rt_iif = + rth->fl.iif = in_dev->dev->ifindex; + rth->u.dst.dev = (out_dev)->dev; + dev_hold(rth->u.dst.dev); + rth->idev = in_dev_get(rth->u.dst.dev); + rth->fl.oif = 0; + rth->rt_spec_dst= spec_dst; + + rth->u.dst.input = ip_forward; + rth->u.dst.output = ip_output; + + rt_set_nexthop(rth, res, itag); + + rth->rt_flags = flags; + + *result = rth; + err = 0; + cleanup: + /* release the working reference to the output device */ + in_dev_put(out_dev); + return err; +} + +static inline int ip_mkroute_input_def(struct sk_buff *skb, + struct fib_result* res, + const struct flowi *fl, + struct in_device *in_dev, + u32 daddr, u32 saddr, u32 tos) +{ + struct rtable* rth; + int err; + unsigned hash; + +#ifdef CONFIG_IP_ROUTE_MULTIPATH + if (res->fi->fib_nhs > 1 && fl->oif == 0) + fib_select_multipath(fl, res); +#endif + + /* create a routing cache entry */ + err = __mkroute_input(skb, res, in_dev, daddr, saddr, tos, &rth); + if (err) + return err; + atomic_set(&rth->u.dst.__refcnt, 1); + + /* put it into the cache */ + hash = rt_hash_code(daddr, saddr ^ (fl->iif << 5), tos); + return rt_intern_hash(hash, rth, (struct rtable**)&skb->dst); +} + +static inline int ip_mkroute_input(struct sk_buff *skb, + struct fib_result* res, + const struct flowi *fl, + struct in_device *in_dev, + u32 daddr, u32 saddr, u32 tos) +{ + return ip_mkroute_input_def(skb, res, fl, in_dev, daddr, saddr, tos); +} + + /* * NOTE. We drop all the packets that has local source * addresses, because every properly looped back packet @@ -1546,11 +1713,10 @@ */ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr, - u8 tos, struct net_device *dev) + u8 tos, struct net_device *dev) { struct fib_result res; struct in_device *in_dev = in_dev_get(dev); - struct in_device *out_dev = NULL; struct flowi fl = { .nl_u = { .ip4_u = { .daddr = daddr, .saddr = saddr, @@ -1574,8 +1740,6 @@ if (!in_dev) goto out; - hash = rt_hash_code(daddr, saddr ^ (fl.iif << 5), tos); - /* Check for the most weird martians, which can be not detected by fib_lookup. */ @@ -1628,79 +1792,14 @@ if (res.type != RTN_UNICAST) goto martian_destination; -#ifdef CONFIG_IP_ROUTE_MULTIPATH - if (res.fi->fib_nhs > 1 && fl.oif == 0) - fib_select_multipath(&fl, &res); -#endif - out_dev = in_dev_get(FIB_RES_DEV(res)); - if (out_dev == NULL) { - if (net_ratelimit()) - printk(KERN_CRIT "Bug in ip_route_input_slow(). " - "Please, report\n"); - goto e_inval; - } - - err = fib_validate_source(saddr, daddr, tos, FIB_RES_OIF(res), dev, - &spec_dst, &itag); - if (err < 0) - goto martian_source; - - if (err) - flags |= RTCF_DIRECTSRC; - - if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) && - (IN_DEV_SHARED_MEDIA(out_dev) || - inet_addr_onlink(out_dev, saddr, FIB_RES_GW(res)))) - flags |= RTCF_DOREDIRECT; - - if (skb->protocol != htons(ETH_P_IP)) { - /* Not IP (i.e. ARP). Do not create route, if it is - * invalid for proxy arp. DNAT routes are always valid. - */ - if (out_dev == in_dev && !(flags & RTCF_DNAT)) - goto e_inval; - } - - rth = dst_alloc(&ipv4_dst_ops); - if (!rth) + err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos); + if (err == -ENOBUFS) goto e_nobufs; - - atomic_set(&rth->u.dst.__refcnt, 1); - rth->u.dst.flags= DST_HOST; - if (in_dev->cnf.no_policy) - rth->u.dst.flags |= DST_NOPOLICY; - if (in_dev->cnf.no_xfrm) - rth->u.dst.flags |= DST_NOXFRM; - rth->fl.fl4_dst = daddr; - rth->rt_dst = daddr; - rth->fl.fl4_tos = tos; -#ifdef CONFIG_IP_ROUTE_FWMARK - rth->fl.fl4_fwmark= skb->nfmark; -#endif - rth->fl.fl4_src = saddr; - rth->rt_src = saddr; - rth->rt_gateway = daddr; - rth->rt_iif = - rth->fl.iif = dev->ifindex; - rth->u.dst.dev = out_dev->dev; - dev_hold(rth->u.dst.dev); - rth->idev = in_dev_get(rth->u.dst.dev); - rth->fl.oif = 0; - rth->rt_spec_dst= spec_dst; - - rth->u.dst.input = ip_forward; - rth->u.dst.output = ip_output; - - rt_set_nexthop(rth, &res, itag); - - rth->rt_flags = flags; - -intern: - err = rt_intern_hash(hash, rth, (struct rtable**)&skb->dst); + if (err == -EINVAL) + goto e_inval; + done: in_dev_put(in_dev); - if (out_dev) - in_dev_put(out_dev); if (free_res) fib_res_put(&res); out: return err; @@ -1760,7 +1859,9 @@ rth->rt_flags &= ~RTCF_LOCAL; } rth->rt_type = res.type; - goto intern; + hash = rt_hash_code(daddr, saddr ^ (fl.iif << 5), tos); + err = rt_intern_hash(hash, rth, (struct rtable**)&skb->dst); + goto done; no_route: RT_CACHE_STAT_INC(in_no_route); @@ -1788,30 +1889,7 @@ goto done; martian_source: - - RT_CACHE_STAT_INC(in_martian_src); -#ifdef CONFIG_IP_ROUTE_VERBOSE - if (IN_DEV_LOG_MARTIANS(in_dev) && net_ratelimit()) { - /* - * RFC1812 recommendation, if source is martian, - * the only hint is MAC header. - */ - printk(KERN_WARNING "martian source %u.%u.%u.%u from " - "%u.%u.%u.%u, on dev %s\n", - NIPQUAD(daddr), NIPQUAD(saddr), dev->name); - if (dev->hard_header_len) { - int i; - unsigned char *p = skb->mac.raw; - printk(KERN_WARNING "ll header: "); - for (i = 0; i < dev->hard_header_len; i++, p++) { - printk("%02x", *p); - if (i < (dev->hard_header_len - 1)) - printk(":"); - } - printk("\n"); - } - } -#endif + ip_handle_martian_source(dev, in_dev, skb, daddr, saddr); goto e_inval; } @@ -1882,13 +1960,166 @@ return ip_route_input_slow(skb, daddr, saddr, tos, dev); } +static inline int __mkroute_output(struct rtable **result, + struct fib_result* res, + const struct flowi *fl, + const struct flowi *oldflp, + struct net_device *dev_out, + unsigned flags) +{ + struct rtable *rth; + struct in_device *in_dev; + u32 tos = RT_FL_TOS(oldflp); + int err = 0; + + if (LOOPBACK(fl->fl4_src) && !(dev_out->flags&IFF_LOOPBACK)) + return -EINVAL; + + if (fl->fl4_dst == 0xFFFFFFFF) + res->type = RTN_BROADCAST; + else if (MULTICAST(fl->fl4_dst)) + res->type = RTN_MULTICAST; + else if (BADCLASS(fl->fl4_dst) || ZERONET(fl->fl4_dst)) + return -EINVAL; + + if (dev_out->flags & IFF_LOOPBACK) + flags |= RTCF_LOCAL; + + /* get work reference to inet device */ + in_dev = in_dev_get(dev_out); + if (!in_dev) + return -EINVAL; + + if (res->type == RTN_BROADCAST) { + flags |= RTCF_BROADCAST | RTCF_LOCAL; + if (res->fi) { + fib_info_put(res->fi); + res->fi = NULL; + } + } else if (res->type == RTN_MULTICAST) { + flags |= RTCF_MULTICAST|RTCF_LOCAL; + if (!ip_check_mc(in_dev, oldflp->fl4_dst, oldflp->fl4_src, + oldflp->proto)) + flags &= ~RTCF_LOCAL; + /* If multicast route do not exist use + default one, but do not gateway in this case. + Yes, it is hack. + */ + if (res->fi && res->prefixlen < 4) { + fib_info_put(res->fi); + res->fi = NULL; + } + } + + + rth = dst_alloc(&ipv4_dst_ops); + if (!rth) { + err = -ENOBUFS; + goto cleanup; + } + + rth->u.dst.flags= DST_HOST; + if (in_dev->cnf.no_xfrm) + rth->u.dst.flags |= DST_NOXFRM; + if (in_dev->cnf.no_policy) + rth->u.dst.flags |= DST_NOPOLICY; + + rth->fl.fl4_dst = oldflp->fl4_dst; + rth->fl.fl4_tos = tos; + rth->fl.fl4_src = oldflp->fl4_src; + rth->fl.oif = oldflp->oif; +#ifdef CONFIG_IP_ROUTE_FWMARK + rth->fl.fl4_fwmark= oldflp->fl4_fwmark; +#endif + rth->rt_dst = fl->fl4_dst; + rth->rt_src = fl->fl4_src; + rth->rt_iif = oldflp->oif ? : dev_out->ifindex; + /* get references to the devices that are to be hold by the routing + cache entry */ + rth->u.dst.dev = dev_out; + dev_hold(dev_out); + rth->idev = in_dev_get(dev_out); + rth->rt_gateway = fl->fl4_dst; + rth->rt_spec_dst= fl->fl4_src; + + rth->u.dst.output=ip_output; + + RT_CACHE_STAT_INC(out_slow_tot); + + if (flags & RTCF_LOCAL) { + rth->u.dst.input = ip_local_deliver; + rth->rt_spec_dst = fl->fl4_dst; + } + if (flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { + rth->rt_spec_dst = fl->fl4_src; + if (flags & RTCF_LOCAL && + !(dev_out->flags & IFF_LOOPBACK)) { + rth->u.dst.output = ip_mc_output; + RT_CACHE_STAT_INC(out_slow_mc); + } +#ifdef CONFIG_IP_MROUTE + if (res->type == RTN_MULTICAST) { + if (IN_DEV_MFORWARD(in_dev) && + !LOCAL_MCAST(oldflp->fl4_dst)) { + rth->u.dst.input = ip_mr_input; + rth->u.dst.output = ip_mc_output; + } + } +#endif + } + + rt_set_nexthop(rth, res, 0); + + rth->rt_flags = flags; + + *result = rth; + cleanup: + /* release work reference to inet device */ + in_dev_put(in_dev); + + return err; +} + +static inline int ip_mkroute_output_def(struct rtable **rp, + struct fib_result* res, + const struct flowi *fl, + const struct flowi *oldflp, + struct net_device *dev_out, + unsigned flags) +{ + struct rtable *rth; + int err = __mkroute_output(&rth, res, fl, oldflp, dev_out, flags); + unsigned hash; + if (err == 0) { + u32 tos = RT_FL_TOS(oldflp); + + atomic_set(&rth->u.dst.__refcnt, 1); + + hash = rt_hash_code(oldflp->fl4_dst, + oldflp->fl4_src ^ (oldflp->oif << 5), tos); + err = rt_intern_hash(hash, rth, rp); + } + + return err; +} + +static inline int ip_mkroute_output(struct rtable** rp, + struct fib_result* res, + const struct flowi *fl, + const struct flowi *oldflp, + struct net_device *dev_out, + unsigned flags) +{ + return ip_mkroute_output_def(rp, res, fl, oldflp, dev_out, flags); +} + /* * Major route resolver routine. */ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) { - u32 tos = oldflp->fl4_tos & (IPTOS_RT_MASK | RTO_ONLINK); + u32 tos = RT_FL_TOS(oldflp); struct flowi fl = { .nl_u = { .ip4_u = { .daddr = oldflp->fl4_dst, .saddr = oldflp->fl4_src, @@ -1904,10 +2135,7 @@ .oif = oldflp->oif }; struct fib_result res; unsigned flags = 0; - struct rtable *rth; struct net_device *dev_out = NULL; - struct in_device *in_dev = NULL; - unsigned hash; int free_res = 0; int err; @@ -2067,116 +2295,13 @@ fl.oif = dev_out->ifindex; make_route: - if (LOOPBACK(fl.fl4_src) && !(dev_out->flags&IFF_LOOPBACK)) - goto e_inval; + err = ip_mkroute_output(rp, &res, &fl, oldflp, dev_out, flags); - if (fl.fl4_dst == 0xFFFFFFFF) - res.type = RTN_BROADCAST; - else if (MULTICAST(fl.fl4_dst)) - res.type = RTN_MULTICAST; - else if (BADCLASS(fl.fl4_dst) || ZERONET(fl.fl4_dst)) - goto e_inval; - - if (dev_out->flags & IFF_LOOPBACK) - flags |= RTCF_LOCAL; - - in_dev = in_dev_get(dev_out); - if (!in_dev) - goto e_inval; - - if (res.type == RTN_BROADCAST) { - flags |= RTCF_BROADCAST | RTCF_LOCAL; - if (res.fi) { - fib_info_put(res.fi); - res.fi = NULL; - } - } else if (res.type == RTN_MULTICAST) { - flags |= RTCF_MULTICAST|RTCF_LOCAL; - if (!ip_check_mc(in_dev, oldflp->fl4_dst, oldflp->fl4_src, oldflp->proto)) - flags &= ~RTCF_LOCAL; - /* If multicast route do not exist use - default one, but do not gateway in this case. - Yes, it is hack. - */ - if (res.fi && res.prefixlen < 4) { - fib_info_put(res.fi); - res.fi = NULL; - } - } - - rth = dst_alloc(&ipv4_dst_ops); - if (!rth) - goto e_nobufs; - - atomic_set(&rth->u.dst.__refcnt, 1); - rth->u.dst.flags= DST_HOST; - if (in_dev->cnf.no_xfrm) - rth->u.dst.flags |= DST_NOXFRM; - if (in_dev->cnf.no_policy) - rth->u.dst.flags |= DST_NOPOLICY; - rth->fl.fl4_dst = oldflp->fl4_dst; - rth->fl.fl4_tos = tos; - rth->fl.fl4_src = oldflp->fl4_src; - rth->fl.oif = oldflp->oif; -#ifdef CONFIG_IP_ROUTE_FWMARK - rth->fl.fl4_fwmark= oldflp->fl4_fwmark; -#endif - rth->rt_dst = fl.fl4_dst; - rth->rt_src = fl.fl4_src; - rth->rt_iif = oldflp->oif ? : dev_out->ifindex; - rth->u.dst.dev = dev_out; - dev_hold(dev_out); - rth->idev = in_dev_get(dev_out); - rth->rt_gateway = fl.fl4_dst; - rth->rt_spec_dst= fl.fl4_src; - - rth->u.dst.output=ip_output; - - RT_CACHE_STAT_INC(out_slow_tot); - - if (flags & RTCF_LOCAL) { - rth->u.dst.input = ip_local_deliver; - rth->rt_spec_dst = fl.fl4_dst; - } - if (flags & (RTCF_BROADCAST | RTCF_MULTICAST)) { - rth->rt_spec_dst = fl.fl4_src; - if (flags & RTCF_LOCAL && !(dev_out->flags & IFF_LOOPBACK)) { - rth->u.dst.output = ip_mc_output; - RT_CACHE_STAT_INC(out_slow_mc); - } -#ifdef CONFIG_IP_MROUTE - if (res.type == RTN_MULTICAST) { - if (IN_DEV_MFORWARD(in_dev) && - !LOCAL_MCAST(oldflp->fl4_dst)) { - rth->u.dst.input = ip_mr_input; - rth->u.dst.output = ip_mc_output; - } - } -#endif - } - - rt_set_nexthop(rth, &res, 0); - - - rth->rt_flags = flags; - - hash = rt_hash_code(oldflp->fl4_dst, oldflp->fl4_src ^ (oldflp->oif << 5), tos); - err = rt_intern_hash(hash, rth, rp); -done: if (free_res) fib_res_put(&res); if (dev_out) dev_put(dev_out); - if (in_dev) - in_dev_put(in_dev); out: return err; - -e_inval: - err = -EINVAL; - goto done; -e_nobufs: - err = -ENOBUFS; - goto done; } int __ip_route_output_key(struct rtable **rp, const struct flowi *flp) diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c 2005-03-07 14:54:16 -08:00 +++ b/net/ipv4/tcp.c 2005-03-07 14:54:16 -08:00 @@ -598,6 +598,7 @@ TCP_SKB_CB(skb)->end_seq = tp->write_seq; TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK; TCP_SKB_CB(skb)->sacked = 0; + skb_header_release(skb); __skb_queue_tail(&sk->sk_write_queue, skb); sk_charge_skb(sk, skb); if (!sk->sk_send_head) diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c 2005-03-07 14:54:16 -08:00 +++ b/net/ipv4/tcp_ipv4.c 2005-03-07 14:54:16 -08:00 @@ -831,7 +831,6 @@ /* OK, now commit destination to socket. */ __sk_dst_set(sk, &rt->u.dst); tcp_v4_setup_caps(sk, &rt->u.dst); - tp->ext2_header_len = rt->u.dst.header_len; if (!tp->write_seq) tp->write_seq = secure_tcp_sequence_number(inet->saddr, @@ -941,10 +940,10 @@ /* Something is about to be wrong... Remember soft error * for the case, if this connection will not able to recover. */ - if (mtu < dst_pmtu(dst) && ip_dont_fragment(sk, dst)) + if (mtu < dst_mtu(dst) && ip_dont_fragment(sk, dst)) sk->sk_err_soft = EMSGSIZE; - mtu = dst_pmtu(dst); + mtu = dst_mtu(dst); if (inet->pmtudisc != IP_PMTUDISC_DONT && tp->pmtu_cookie > mtu) { @@ -1578,10 +1577,9 @@ newtp->ext_header_len = 0; if (newinet->opt) newtp->ext_header_len = newinet->opt->optlen; - newtp->ext2_header_len = dst->header_len; newinet->id = newtp->write_seq ^ jiffies; - tcp_sync_mss(newsk, dst_pmtu(dst)); + tcp_sync_mss(newsk, dst_mtu(dst)); newtp->advmss = dst_metric(dst, RTAX_ADVMSS); tcp_initialize_rcv_mss(newsk); @@ -1877,7 +1875,6 @@ __sk_dst_set(sk, &rt->u.dst); tcp_v4_setup_caps(sk, &rt->u.dst); - tcp_sk(sk)->ext2_header_len = rt->u.dst.header_len; new_saddr = rt->rt_src; @@ -1937,7 +1934,6 @@ if (!err) { __sk_dst_set(sk, &rt->u.dst); tcp_v4_setup_caps(sk, &rt->u.dst); - tcp_sk(sk)->ext2_header_len = rt->u.dst.header_len; return 0; } @@ -2663,4 +2659,5 @@ EXPORT_SYMBOL(sysctl_local_port_range); EXPORT_SYMBOL(sysctl_max_syn_backlog); EXPORT_SYMBOL(sysctl_tcp_low_latency); +EXPORT_SYMBOL(sysctl_tcp_tw_reuse); diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv4/tcp_output.c 2005-03-07 14:54:18 -08:00 @@ -400,6 +400,7 @@ /* Advance write_seq and place onto the write_queue. */ tp->write_seq = TCP_SKB_CB(skb)->end_seq; + skb_header_release(skb); __skb_queue_tail(&sk->sk_write_queue, skb); sk_charge_skb(sk, skb); @@ -631,12 +632,8 @@ unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu) { struct tcp_sock *tp = tcp_sk(sk); - struct dst_entry *dst = __sk_dst_get(sk); int mss_now; - if (dst && dst->ops->get_mss) - pmtu = dst->ops->get_mss(dst, pmtu); - /* Calculate base mss without TCP options: It is MMS_S - sizeof(tcphdr) of rfc1122 */ @@ -647,7 +644,7 @@ mss_now = tp->rx_opt.mss_clamp; /* Now subtract optional transport overhead */ - mss_now -= tp->ext_header_len + tp->ext2_header_len; + mss_now -= tp->ext_header_len; /* Then reserve room for full set of TCP options and 8 bytes of data */ if (mss_now < 48) @@ -683,9 +680,8 @@ mss_now = tp->mss_cache_std; if (dst) { - u32 mtu = dst_pmtu(dst); - if (mtu != tp->pmtu_cookie || - tp->ext2_header_len != dst->header_len) + u32 mtu = dst_mtu(dst); + if (mtu != tp->pmtu_cookie) mss_now = tcp_sync_mss(sk, mtu); } @@ -697,8 +693,7 @@ unsigned int large_mss, factor, limit; large_mss = 65535 - tp->af_specific->net_header_len - - tp->ext_header_len - tp->ext2_header_len - - tp->tcp_header_len; + tp->ext_header_len - tp->tcp_header_len; if (tp->max_window && large_mss > (tp->max_window>>1)) large_mss = max((tp->max_window>>1), @@ -1340,6 +1335,7 @@ if (nskb == NULL) return -ENOMEM; __skb_unlink(skb, &sk->sk_write_queue); + skb_header_release(nskb); __skb_queue_head(&sk->sk_write_queue, nskb); sk_stream_free_skb(sk, skb); sk_charge_skb(sk, nskb); @@ -1442,7 +1438,7 @@ if (tp->rx_opt.user_mss) tp->rx_opt.mss_clamp = tp->rx_opt.user_mss; tp->max_window = 0; - tcp_sync_mss(sk, dst_pmtu(dst)); + tcp_sync_mss(sk, dst_mtu(dst)); if (!tp->window_clamp) tp->window_clamp = dst_metric(dst, RTAX_WINDOW); @@ -1506,6 +1502,7 @@ /* Send it off. */ TCP_SKB_CB(buff)->when = tcp_time_stamp; tp->retrans_stamp = TCP_SKB_CB(buff)->when; + skb_header_release(buff); __skb_queue_tail(&sk->sk_write_queue, buff); sk_charge_skb(sk, buff); tp->packets_out += tcp_skb_pcount(buff); diff -Nru a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c --- a/net/ipv4/tcp_timer.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv4/tcp_timer.c 2005-03-07 14:54:18 -08:00 @@ -38,6 +38,7 @@ #ifdef TCP_DEBUG const char tcp_timer_bug_msg[] = KERN_DEBUG "tcpbug: unknown timer value\n"; +EXPORT_SYMBOL(tcp_timer_bug_msg); #endif /* diff -Nru a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c --- a/net/ipv4/xfrm4_output.c 2005-03-07 14:54:16 -08:00 +++ b/net/ipv4/xfrm4_output.c 2005-03-07 14:54:16 -08:00 @@ -82,7 +82,7 @@ goto out; dst = skb->dst; - mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; + mtu = dst_mtu(dst); if (skb->len > mtu) { icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu)); ret = -EMSGSIZE; @@ -116,7 +116,7 @@ xfrm4_encap(skb); - err = x->type->output(skb); + err = x->type->output(x, skb); if (err) goto error; diff -Nru a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c --- a/net/ipv4/xfrm4_policy.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv4/xfrm4_policy.c 2005-03-07 14:54:17 -08:00 @@ -22,26 +22,6 @@ return __ip_route_output_key((struct rtable**)dst, fl); } -/* Check that the bundle accepts the flow and its components are - * still valid. - */ - -static int __xfrm4_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl) -{ - do { - if (xdst->u.dst.ops != &xfrm4_dst_ops) - return 1; - - if (!xfrm_selector_match(&xdst->u.dst.xfrm->sel, fl, AF_INET)) - return 0; - if (xdst->u.dst.xfrm->km.state != XFRM_STATE_VALID || - xdst->u.dst.path->obsolete > 0) - return 0; - xdst = (struct xfrm_dst*)xdst->u.dst.child; - } while (xdst); - return 0; -} - static struct dst_entry * __xfrm4_find_bundle(struct flowi *fl, struct xfrm_policy *policy) { @@ -53,7 +33,7 @@ if (xdst->u.rt.fl.oif == fl->oif && /*XXX*/ xdst->u.rt.fl.fl4_dst == fl->fl4_dst && xdst->u.rt.fl.fl4_src == fl->fl4_src && - __xfrm4_bundle_ok(xdst, fl)) { + xfrm_bundle_ok(xdst, fl, AF_INET)) { dst_clone(dst); break; } @@ -75,18 +55,29 @@ struct rtable *rt = rt0; u32 remote = fl->fl4_dst; u32 local = fl->fl4_src; + struct flowi fl_tunnel = { + .nl_u = { + .ip4_u = { + .saddr = local, + .daddr = remote + } + } + }; int i; int err; int header_len = 0; int trailer_len = 0; dst = dst_prev = NULL; + dst_hold(&rt->u.dst); for (i = 0; i < nx; i++) { struct dst_entry *dst1 = dst_alloc(&xfrm4_dst_ops); + struct xfrm_dst *xdst; if (unlikely(dst1 == NULL)) { err = -ENOBUFS; + dst_release(&rt->u.dst); goto error; } @@ -97,6 +88,11 @@ dst1->flags |= DST_NOHASH; dst_clone(dst1); } + + xdst = (struct xfrm_dst *)dst1; + xdst->route = &rt->u.dst; + + dst1->next = dst_prev; dst_prev = dst1; if (xfrm[i]->props.mode) { remote = xfrm[i]->id.daddr.a4; @@ -104,23 +100,27 @@ } header_len += xfrm[i]->props.header_len; trailer_len += xfrm[i]->props.trailer_len; - } - if (remote != fl->fl4_dst) { - struct flowi fl_tunnel = { .nl_u = { .ip4_u = - { .daddr = remote, - .saddr = local } - } - }; - err = xfrm_dst_lookup((struct xfrm_dst**)&rt, &fl_tunnel, AF_INET); - if (err) - goto error; - } else { - dst_hold(&rt->u.dst); + if (remote != fl_tunnel.fl4_dst) { + fl_tunnel.fl4_src = local; + fl_tunnel.fl4_dst = remote; + err = xfrm_dst_lookup((struct xfrm_dst **)&rt, + &fl_tunnel, AF_INET); + if (err) + goto error; + } else + dst_hold(&rt->u.dst); } + dst_prev->child = &rt->u.dst; + dst->path = &rt->u.dst; + + *dst_p = dst; + dst = dst_prev; + + dst_prev = *dst_p; i = 0; - for (dst_prev = dst; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) { + for (; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) { struct xfrm_dst *x = (struct xfrm_dst*)dst_prev; x->u.rt.fl = *fl; @@ -133,8 +133,7 @@ dst_prev->lastuse = jiffies; dst_prev->header_len = header_len; dst_prev->trailer_len = trailer_len; - memcpy(&dst_prev->metrics, &rt->u.dst.metrics, sizeof(dst_prev->metrics)); - dst_prev->path = &rt->u.dst; + memcpy(&dst_prev->metrics, &x->route->metrics, sizeof(dst_prev->metrics)); /* Copy neighbout for reachability confirmation */ dst_prev->neighbour = neigh_clone(rt->u.dst.neighbour); @@ -154,7 +153,8 @@ header_len -= x->u.dst.xfrm->props.header_len; trailer_len -= x->u.dst.xfrm->props.trailer_len; } - *dst_p = dst; + + xfrm_init_pmtu(dst); return 0; error: @@ -235,10 +235,8 @@ static void xfrm4_update_pmtu(struct dst_entry *dst, u32 mtu) { - struct dst_entry *path = dst->path; - - if (mtu < 68 + dst->header_len) - return; + struct xfrm_dst *xdst = (struct xfrm_dst *)dst; + struct dst_entry *path = xdst->route; path->ops->update_pmtu(path, mtu); } diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c --- a/net/ipv4/xfrm4_tunnel.c 2005-03-07 14:54:16 -08:00 +++ b/net/ipv4/xfrm4_tunnel.c 2005-03-07 14:54:16 -08:00 @@ -9,7 +9,7 @@ #include #include -static int ipip_output(struct sk_buff *skb) +static int ipip_output(struct xfrm_state *x, struct sk_buff *skb) { struct iphdr *iph; diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c --- a/net/ipv6/addrconf.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv6/addrconf.c 2005-03-07 14:54:18 -08:00 @@ -1924,6 +1924,11 @@ struct inet6_dev *idev = __in6_dev_get(dev); switch(event) { + case NETDEV_REGISTER: + if (dev == &loopback_dev && !ipv6_find_idev(dev)) + panic("addrconf: Failed to create loopback\n"); + break; + case NETDEV_UP: switch(dev->type) { case ARPHRD_SIT: @@ -2008,6 +2013,9 @@ ASSERT_RTNL(); + if (dev == &loopback_dev) + how = 0; + rt6_ifdown(dev); neigh_ifdown(&nd_tbl, dev); @@ -3459,8 +3467,6 @@ */ rtnl_lock(); addrconf_notify(&ipv6_dev_notf, NETDEV_REGISTER, &loopback_dev); - if (loopback_dev.flags & IFF_UP) - addrconf_notify(&ipv6_dev_notf, NETDEV_UP, &loopback_dev); rtnl_unlock(); register_netdevice_notifier(&ipv6_dev_notf); diff -Nru a/net/ipv6/ah6.c b/net/ipv6/ah6.c --- a/net/ipv6/ah6.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv6/ah6.c 2005-03-07 14:54:18 -08:00 @@ -154,12 +154,10 @@ return 0; } -static int ah6_output(struct sk_buff *skb) +static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) { int err; int extlen; - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; struct ipv6hdr *top_iph; struct ip_auth_hdr *ah; struct ah_data *ahp; diff -Nru a/net/ipv6/esp6.c b/net/ipv6/esp6.c --- a/net/ipv6/esp6.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv6/esp6.c 2005-03-07 14:54:17 -08:00 @@ -37,12 +37,10 @@ #include #include -static int esp6_output(struct sk_buff *skb) +static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) { int err; int hdr_len; - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; struct ipv6hdr *top_iph; struct ipv6_esp_hdr *esph; struct crypto_tfm *tfm; diff -Nru a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c --- a/net/ipv6/ipcomp6.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv6/ipcomp6.c 2005-03-07 14:54:17 -08:00 @@ -139,11 +139,9 @@ return err; } -static int ipcomp6_output(struct sk_buff *skb) +static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb) { int err; - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; struct ipv6hdr *top_iph; int hdr_len; struct ipv6_comp_hdr *ipch; diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv6/tcp_ipv6.c 2005-03-07 14:54:17 -08:00 @@ -441,21 +441,22 @@ } } -static int tcp_v6_check_established(struct sock *sk) +static int __tcp_v6_check_established(struct sock *sk, __u16 lport, + struct tcp_tw_bucket **twp) { struct inet_sock *inet = inet_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk); struct in6_addr *daddr = &np->rcv_saddr; struct in6_addr *saddr = &np->daddr; int dif = sk->sk_bound_dev_if; - u32 ports = TCP_COMBINED_PORTS(inet->dport, inet->num); + u32 ports = TCP_COMBINED_PORTS(inet->dport, lport); int hash = tcp_v6_hashfn(daddr, inet->num, saddr, inet->dport); struct tcp_ehash_bucket *head = &tcp_ehash[hash]; struct sock *sk2; struct hlist_node *node; struct tcp_tw_bucket *tw; - write_lock_bh(&head->lock); + write_lock(&head->lock); /* Check TIME-WAIT sockets first. */ sk_for_each(sk2, node, &(head + tcp_ehash_size)->chain) { @@ -468,7 +469,10 @@ sk2->sk_bound_dev_if == sk->sk_bound_dev_if) { struct tcp_sock *tp = tcp_sk(sk); - if (tw->tw_ts_recent_stamp) { + if (tw->tw_ts_recent_stamp && + (!twp || (sysctl_tcp_tw_reuse && + xtime.tv_sec - + tw->tw_ts_recent_stamp > 1))) { /* See comment in tcp_ipv4.c */ tp->write_seq = tw->tw_snd_nxt + 65535 + 2; if (!tp->write_seq) @@ -494,40 +498,113 @@ __sk_add_node(sk, &head->chain); sk->sk_hashent = hash; sock_prot_inc_use(sk->sk_prot); - write_unlock_bh(&head->lock); + write_unlock(&head->lock); - if (tw) { + if (twp) { + *twp = tw; + NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED); + } else if (tw) { /* Silly. Should hash-dance instead... */ - local_bh_disable(); tcp_tw_deschedule(tw); NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED); - local_bh_enable(); tcp_tw_put(tw); } return 0; not_unique: - write_unlock_bh(&head->lock); + write_unlock(&head->lock); return -EADDRNOTAVAIL; } +static inline u32 tcpv6_port_offset(const struct sock *sk) +{ + const struct inet_sock *inet = inet_sk(sk); + const struct ipv6_pinfo *np = inet6_sk(sk); + + return secure_tcpv6_port_ephemeral(np->rcv_saddr.s6_addr32, + np->daddr.s6_addr32, + inet->dport); +} + static int tcp_v6_hash_connect(struct sock *sk) { - struct tcp_bind_hashbucket *head; - struct tcp_bind_bucket *tb; + unsigned short snum = inet_sk(sk)->num; + struct tcp_bind_hashbucket *head; + struct tcp_bind_bucket *tb; + int ret; - /* XXX */ - if (inet_sk(sk)->num == 0) { - int err = tcp_v6_get_port(sk, inet_sk(sk)->num); - if (err) - return err; - inet_sk(sk)->sport = htons(inet_sk(sk)->num); - } + if (!snum) { + int low = sysctl_local_port_range[0]; + int high = sysctl_local_port_range[1]; + int range = high - low; + int i; + int port; + static u32 hint; + u32 offset = hint + tcpv6_port_offset(sk); + struct hlist_node *node; + struct tcp_tw_bucket *tw = NULL; + + local_bh_disable(); + for (i = 1; i <= range; i++) { + port = low + (i + offset) % range; + head = &tcp_bhash[tcp_bhashfn(port)]; + spin_lock(&head->lock); + + /* Does not bother with rcv_saddr checks, + * because the established check is already + * unique enough. + */ + tb_for_each(tb, node, &head->chain) { + if (tb->port == port) { + BUG_TRAP(!hlist_empty(&tb->owners)); + if (tb->fastreuse >= 0) + goto next_port; + if (!__tcp_v6_check_established(sk, + port, + &tw)) + goto ok; + goto next_port; + } + } + + tb = tcp_bucket_create(head, port); + if (!tb) { + spin_unlock(&head->lock); + break; + } + tb->fastreuse = -1; + goto ok; + + next_port: + spin_unlock(&head->lock); + } + local_bh_enable(); + + return -EADDRNOTAVAIL; + +ok: + hint += i; + + /* Head lock still held and bh's disabled */ + tcp_bind_hash(sk, tb, port); + if (sk_unhashed(sk)) { + inet_sk(sk)->sport = htons(port); + __tcp_v6_hash(sk); + } + spin_unlock(&head->lock); + + if (tw) { + tcp_tw_deschedule(tw); + tcp_tw_put(tw); + } - head = &tcp_bhash[tcp_bhashfn(inet_sk(sk)->num)]; - tb = tb_head(head); + ret = 0; + goto out; + } + head = &tcp_bhash[tcp_bhashfn(snum)]; + tb = tcp_sk(sk)->bind_hash; spin_lock_bh(&head->lock); if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) { @@ -535,8 +612,12 @@ spin_unlock_bh(&head->lock); return 0; } else { - spin_unlock_bh(&head->lock); - return tcp_v6_check_established(sk); + spin_unlock(&head->lock); + /* No definite answer... Walk to established hash table */ + ret = __tcp_v6_check_established(sk, snum, NULL); +out: + local_bh_enable(); + return ret; } } @@ -701,7 +782,6 @@ tp->ext_header_len = 0; if (np->opt) tp->ext_header_len = np->opt->opt_flen + np->opt->opt_nflen; - tp->ext2_header_len = dst->header_len; tp->rx_opt.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr); @@ -813,8 +893,8 @@ } else dst_hold(dst); - if (tp->pmtu_cookie > dst_pmtu(dst)) { - tcp_sync_mss(sk, dst_pmtu(dst)); + if (tp->pmtu_cookie > dst_mtu(dst)) { + tcp_sync_mss(sk, dst_mtu(dst)); tcp_simple_retransmit(sk); } /* else let the usual retransmit timer handle it */ dst_release(dst); @@ -1443,9 +1523,8 @@ if (newnp->opt) newtp->ext_header_len = newnp->opt->opt_nflen + newnp->opt->opt_flen; - newtp->ext2_header_len = dst->header_len; - tcp_sync_mss(newsk, dst_pmtu(dst)); + tcp_sync_mss(newsk, dst_mtu(dst)); newtp->advmss = dst_metric(dst, RTAX_ADVMSS); tcp_initialize_rcv_mss(newsk); @@ -1792,7 +1871,6 @@ ip6_dst_store(sk, dst, NULL); sk->sk_route_caps = dst->dev->features & ~(NETIF_F_IP_CSUM | NETIF_F_TSO); - tcp_sk(sk)->ext2_header_len = dst->header_len; } return 0; @@ -1846,7 +1924,6 @@ ip6_dst_store(sk, dst, NULL); sk->sk_route_caps = dst->dev->features & ~(NETIF_F_IP_CSUM | NETIF_F_TSO); - tcp_sk(sk)->ext2_header_len = dst->header_len; } skb->dst = dst_clone(dst); diff -Nru a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c --- a/net/ipv6/xfrm6_output.c 2005-03-07 14:54:18 -08:00 +++ b/net/ipv6/xfrm6_output.c 2005-03-07 14:54:18 -08:00 @@ -79,7 +79,7 @@ int mtu, ret = 0; struct dst_entry *dst = skb->dst; - mtu = dst_pmtu(dst) - dst->header_len - dst->trailer_len; + mtu = dst_mtu(dst); if (mtu < IPV6_MIN_MTU) mtu = IPV6_MIN_MTU; @@ -116,7 +116,7 @@ xfrm6_encap(skb); - err = x->type->output(skb); + err = x->type->output(x, skb); if (err) goto error; diff -Nru a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c --- a/net/ipv6/xfrm6_policy.c 2005-03-07 14:54:16 -08:00 +++ b/net/ipv6/xfrm6_policy.c 2005-03-07 14:54:16 -08:00 @@ -31,26 +31,6 @@ return err; } -/* Check that the bundle accepts the flow and its components are - * still valid. - */ - -static int __xfrm6_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl) -{ - do { - if (xdst->u.dst.ops != &xfrm6_dst_ops) - return 1; - - if (!xfrm_selector_match(&xdst->u.dst.xfrm->sel, fl, AF_INET6)) - return 0; - if (xdst->u.dst.xfrm->km.state != XFRM_STATE_VALID || - xdst->u.dst.path->obsolete > 0) - return 0; - xdst = (struct xfrm_dst*)xdst->u.dst.child; - } while (xdst); - return 0; -} - static struct dst_entry * __xfrm6_find_bundle(struct flowi *fl, struct xfrm_policy *policy) { @@ -70,7 +50,7 @@ xdst->u.rt6.rt6i_src.plen); if (ipv6_addr_equal(&xdst->u.rt6.rt6i_dst.addr, &fl_dst_prefix) && ipv6_addr_equal(&xdst->u.rt6.rt6i_src.addr, &fl_src_prefix) && - __xfrm6_bundle_ok(xdst, fl)) { + xfrm_bundle_ok(xdst, fl, AF_INET6)) { dst_clone(dst); break; } @@ -92,18 +72,29 @@ struct rt6_info *rt = rt0; struct in6_addr *remote = &fl->fl6_dst; struct in6_addr *local = &fl->fl6_src; + struct flowi fl_tunnel = { + .nl_u = { + .ip6_u = { + .saddr = *local, + .daddr = *remote + } + } + }; int i; int err = 0; int header_len = 0; int trailer_len = 0; dst = dst_prev = NULL; + dst_hold(&rt->u.dst); for (i = 0; i < nx; i++) { struct dst_entry *dst1 = dst_alloc(&xfrm6_dst_ops); + struct xfrm_dst *xdst; if (unlikely(dst1 == NULL)) { err = -ENOBUFS; + dst_release(&rt->u.dst); goto error; } @@ -114,6 +105,11 @@ dst1->flags |= DST_NOHASH; dst_clone(dst1); } + + xdst = (struct xfrm_dst *)dst1; + xdst->route = &rt->u.dst; + + dst1->next = dst_prev; dst_prev = dst1; if (xfrm[i]->props.mode) { remote = (struct in6_addr*)&xfrm[i]->id.daddr; @@ -121,25 +117,27 @@ } header_len += xfrm[i]->props.header_len; trailer_len += xfrm[i]->props.trailer_len; - } - - if (!ipv6_addr_equal(remote, &fl->fl6_dst)) { - struct flowi fl_tunnel; - memset(&fl_tunnel, 0, sizeof(fl_tunnel)); - ipv6_addr_copy(&fl_tunnel.fl6_dst, remote); - ipv6_addr_copy(&fl_tunnel.fl6_src, local); - - err = xfrm_dst_lookup((struct xfrm_dst **) &rt, - &fl_tunnel, AF_INET6); - if (err) - goto error; - } else { - dst_hold(&rt->u.dst); + if (!ipv6_addr_equal(remote, &fl_tunnel.fl6_dst)) { + ipv6_addr_copy(&fl_tunnel.fl6_dst, remote); + ipv6_addr_copy(&fl_tunnel.fl6_src, local); + err = xfrm_dst_lookup((struct xfrm_dst **) &rt, + &fl_tunnel, AF_INET6); + if (err) + goto error; + } else + dst_hold(&rt->u.dst); } + dst_prev->child = &rt->u.dst; + dst->path = &rt->u.dst; + + *dst_p = dst; + dst = dst_prev; + + dst_prev = *dst_p; i = 0; - for (dst_prev = dst; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) { + for (; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) { struct xfrm_dst *x = (struct xfrm_dst*)dst_prev; dst_prev->xfrm = xfrm[i++]; @@ -151,8 +149,7 @@ dst_prev->lastuse = jiffies; dst_prev->header_len = header_len; dst_prev->trailer_len = trailer_len; - memcpy(&dst_prev->metrics, &rt->u.dst.metrics, sizeof(dst_prev->metrics)); - dst_prev->path = &rt->u.dst; + memcpy(&dst_prev->metrics, &x->route->metrics, sizeof(dst_prev->metrics)); /* Copy neighbour for reachability confirmation */ dst_prev->neighbour = neigh_clone(rt->u.dst.neighbour); @@ -170,7 +167,8 @@ header_len -= x->u.dst.xfrm->props.header_len; trailer_len -= x->u.dst.xfrm->props.trailer_len; } - *dst_p = dst; + + xfrm_init_pmtu(dst); return 0; error: @@ -245,12 +243,10 @@ static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu) { - struct dst_entry *path = dst->path; + struct xfrm_dst *xdst = (struct xfrm_dst *)dst; + struct dst_entry *path = xdst->route; - if (mtu >= IPV6_MIN_MTU && mtu < dst_pmtu(dst)) - path->ops->update_pmtu(path, mtu); - - return; + path->ops->update_pmtu(path, mtu); } static struct dst_ops xfrm6_dst_ops = { diff -Nru a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c --- a/net/ipv6/xfrm6_tunnel.c 2005-03-07 14:54:17 -08:00 +++ b/net/ipv6/xfrm6_tunnel.c 2005-03-07 14:54:17 -08:00 @@ -343,7 +343,7 @@ EXPORT_SYMBOL(xfrm6_tunnel_free_spi); -static int xfrm6_tunnel_output(struct sk_buff *skb) +static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) { struct ipv6hdr *top_iph; diff -Nru a/net/irda/af_irda.c b/net/irda/af_irda.c --- a/net/irda/af_irda.c 2005-03-07 14:54:16 -08:00 +++ b/net/irda/af_irda.c 2005-03-07 14:54:16 -08:00 @@ -87,10 +87,10 @@ IRDA_DEBUG(3, "%s()\n", __FUNCTION__); - self = (struct irda_sock *) instance; + self = instance; ASSERT(self != NULL, return -1;); - sk = self->sk; + sk = instance; ASSERT(sk != NULL, return -1;); err = sock_queue_rcv_skb(sk, skb); @@ -117,7 +117,7 @@ struct irda_sock *self; struct sock *sk; - self = (struct irda_sock *) instance; + self = instance; IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); @@ -125,7 +125,7 @@ if(skb) dev_kfree_skb(skb); - sk = self->sk; + sk = instance; if (sk == NULL) { IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n", __FUNCTION__, self); @@ -183,11 +183,11 @@ struct irda_sock *self; struct sock *sk; - self = (struct irda_sock *) instance; + self = instance; IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); - sk = self->sk; + sk = instance; if (sk == NULL) { dev_kfree_skb(skb); return; @@ -245,11 +245,11 @@ struct irda_sock *self; struct sock *sk; - self = (struct irda_sock *) instance; + self = instance; IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); - sk = self->sk; + sk = instance; if (sk == NULL) { dev_kfree_skb(skb); return; @@ -332,10 +332,10 @@ IRDA_DEBUG(2, "%s()\n", __FUNCTION__); - self = (struct irda_sock *) instance; + self = instance; ASSERT(self != NULL, return;); - sk = self->sk; + sk = instance; ASSERT(sk != NULL, return;); switch (flow) { @@ -1082,17 +1082,12 @@ } /* Allocate networking socket */ - if ((sk = sk_alloc(PF_IRDA, GFP_ATOMIC, 1, NULL)) == NULL) + sk = sk_alloc(PF_IRDA, GFP_ATOMIC, + sizeof(struct irda_sock), NULL); + if (sk == NULL) return -ENOMEM; - /* Allocate IrDA socket */ - self = sk->sk_protinfo = kmalloc(sizeof(struct irda_sock), GFP_ATOMIC); - if (self == NULL) { - sk_free(sk); - return -ENOMEM; - } - memset(self, 0, sizeof(struct irda_sock)); - + self = irda_sk(sk); IRDA_DEBUG(2, "%s() : self is %p\n", __FUNCTION__, self); init_waitqueue_head(&self->query_wait); @@ -1102,8 +1097,6 @@ sk_set_owner(sk, THIS_MODULE); sk->sk_family = PF_IRDA; sk->sk_protocol = protocol; - /* Link networking socket and IrDA socket structs together */ - self->sk = sk; switch (sock->type) { case SOCK_STREAM: @@ -1187,7 +1180,6 @@ self->lsap = NULL; } #endif /* CONFIG_IRDA_ULTRA */ - kfree(self); } /* @@ -1208,8 +1200,6 @@ /* Destroy IrDA socket */ irda_destroy_socket(irda_sk(sk)); - /* Prevent sock_def_destruct() to create havoc */ - sk->sk_protinfo = NULL; sock_orphan(sk); sock->sk = NULL; diff -Nru a/net/key/af_key.c b/net/key/af_key.c --- a/net/key/af_key.c 2005-03-07 14:54:18 -08:00 +++ b/net/key/af_key.c 2005-03-07 14:54:18 -08:00 @@ -42,11 +42,17 @@ static atomic_t pfkey_socks_nr = ATOMIC_INIT(0); -struct pfkey_opt { - int registered; - int promisc; +struct pfkey_sock { + /* struct sock must be the first member of struct pfkey_sock */ + struct sock sk; + int registered; + int promisc; }; -#define pfkey_sk(__sk) ((struct pfkey_opt *)(__sk)->sk_protinfo) + +static inline struct pfkey_sock *pfkey_sk(struct sock *sk) +{ + return (struct pfkey_sock *)sk; +} static void pfkey_sock_destruct(struct sock *sk) { @@ -60,8 +66,6 @@ BUG_TRAP(!atomic_read(&sk->sk_rmem_alloc)); BUG_TRAP(!atomic_read(&sk->sk_wmem_alloc)); - kfree(pfkey_sk(sk)); - atomic_dec(&pfkey_socks_nr); } @@ -128,7 +132,6 @@ static int pfkey_create(struct socket *sock, int protocol) { struct sock *sk; - struct pfkey_opt *pfk; int err; if (!capable(CAP_NET_ADMIN)) @@ -139,7 +142,7 @@ return -EPROTONOSUPPORT; err = -ENOMEM; - sk = sk_alloc(PF_KEY, GFP_KERNEL, 1, NULL); + sk = sk_alloc(PF_KEY, GFP_KERNEL, sizeof(struct pfkey_sock), NULL); if (sk == NULL) goto out; @@ -147,14 +150,6 @@ sock_init_data(sock, sk); sk_set_owner(sk, THIS_MODULE); - err = -ENOMEM; - pfk = sk->sk_protinfo = kmalloc(sizeof(*pfk), GFP_KERNEL); - if (!pfk) { - sk_free(sk); - goto out; - } - memset(pfk, 0, sizeof(*pfk)); - sk->sk_family = PF_KEY; sk->sk_destruct = pfkey_sock_destruct; @@ -233,7 +228,7 @@ pfkey_lock_table(); sk_for_each(sk, node, &pfkey_table) { - struct pfkey_opt *pfk = pfkey_sk(sk); + struct pfkey_sock *pfk = pfkey_sk(sk); int err2; /* Yes, it means that if you are meant to receive this @@ -1418,7 +1413,7 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs) { - struct pfkey_opt *pfk = pfkey_sk(sk); + struct pfkey_sock *pfk = pfkey_sk(sk); struct sk_buff *supp_skb; if (hdr->sadb_msg_satype > SADB_SATYPE_MAX) @@ -1514,7 +1509,7 @@ static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs) { - struct pfkey_opt *pfk = pfkey_sk(sk); + struct pfkey_sock *pfk = pfkey_sk(sk); int satype = hdr->sadb_msg_satype; if (hdr->sadb_msg_len == (sizeof(*hdr) / sizeof(uint64_t))) { diff -Nru a/net/llc/af_llc.c b/net/llc/af_llc.c --- a/net/llc/af_llc.c 2005-03-07 14:54:16 -08:00 +++ b/net/llc/af_llc.c 2005-03-07 14:54:16 -08:00 @@ -113,7 +113,7 @@ */ static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock) { - struct llc_opt* llc = llc_sk(sk); + struct llc_sock* llc = llc_sk(sk); int rc = 0; if (llc_data_accept_state(llc->state) || llc->p_flag) { @@ -169,7 +169,7 @@ static int llc_ui_release(struct socket *sock) { struct sock *sk = sock->sk; - struct llc_opt *llc; + struct llc_sock *llc; if (!sk) goto out; @@ -244,7 +244,7 @@ static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr) { struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap; int rc = -EINVAL; @@ -293,7 +293,7 @@ { struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr; struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap; int rc = -EINVAL; @@ -394,7 +394,7 @@ int addrlen, int flags) { struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr; struct net_device *dev; int rc = -EINVAL; @@ -571,7 +571,7 @@ static int llc_ui_wait_for_busy_core(struct sock *sk, int timeout) { DECLARE_WAITQUEUE(wait, current); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); int rc; add_wait_queue_exclusive(sk->sk_sleep, &wait); @@ -612,7 +612,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags) { struct sock *sk = sock->sk, *newsk; - struct llc_opt *llc, *newllc; + struct llc_sock *llc, *newllc; struct sk_buff *skb; int rc = -EOPNOTSUPP; @@ -728,7 +728,7 @@ struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct sockaddr_llc *addr = (struct sockaddr_llc *)msg->msg_name; int flags = msg->msg_flags; int noblock = flags & MSG_DONTWAIT; @@ -819,7 +819,7 @@ { struct sockaddr_llc sllc; struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); int rc = 0; lock_sock(sk); @@ -883,7 +883,7 @@ char __user *optval, int optlen) { struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); int rc = -EINVAL, opt; lock_sock(sk); @@ -958,7 +958,7 @@ char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); int val = 0, len = 0, rc = -EINVAL; lock_sock(sk); diff -Nru a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c --- a/net/llc/llc_c_ac.c 2005-03-07 14:54:18 -08:00 +++ b/net/llc/llc_c_ac.c 2005-03-07 14:54:18 -08:00 @@ -44,7 +44,7 @@ int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (llc->remote_busy_flag) { u8 nr; @@ -68,7 +68,7 @@ sap = llc_sap_find(dsap); if (sap) { struct llc_conn_state_ev *ev = llc_conn_ev(skb); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc_pdu_decode_sa(skb, llc->daddr.mac); llc_pdu_decode_da(skb, llc->laddr.mac); @@ -146,7 +146,7 @@ int rc = 1; struct llc_conn_state_ev *ev = llc_conn_ev(skb); struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); switch (ev->type) { case LLC_CONN_EV_TYPE_PDU: @@ -207,7 +207,7 @@ int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (llc->data_flag == 2) del_timer(&llc->rej_sent_timer.timer); @@ -220,7 +220,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -246,7 +246,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; u8 f_bit; @@ -273,7 +273,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; u8 f_bit = 1; @@ -299,7 +299,7 @@ int rc = -ENOBUFS; struct sk_buff *nskb; struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc->rx_pdu_hdr = *((u32 *)pdu); if (LLC_PDU_IS_CMD(pdu)) @@ -334,7 +334,7 @@ if (nskb) { u8 f_bit = 0; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; struct llc_pdu_sn *pdu = (struct llc_pdu_sn *)&llc->rx_pdu_hdr; @@ -364,7 +364,7 @@ llc_pdu_decode_pf_bit(skb, &f_bit); nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); @@ -388,7 +388,7 @@ int llc_conn_ac_send_i_cmd_p_set_1(struct sock *sk, struct sk_buff *skb) { int rc; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; llc_pdu_header_init(skb, LLC_PDU_TYPE_I, sap->laddr.lsap, @@ -405,7 +405,7 @@ static int llc_conn_ac_send_i_cmd_p_set_0(struct sock *sk, struct sk_buff *skb) { int rc; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; llc_pdu_header_init(skb, LLC_PDU_TYPE_I, sap->laddr.lsap, @@ -422,7 +422,7 @@ int llc_conn_ac_send_i_xxx_x_set_0(struct sock *sk, struct sk_buff *skb) { int rc; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; llc_pdu_header_init(skb, LLC_PDU_TYPE_I, sap->laddr.lsap, @@ -454,7 +454,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -490,7 +490,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -516,7 +516,7 @@ if (nskb) { u8 f_bit = 1; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -541,7 +541,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; u8 f_bit = 0; @@ -567,7 +567,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -592,7 +592,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; u8 f_bit = 1; @@ -619,7 +619,7 @@ if (nskb) { u8 f_bit = 0; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -640,7 +640,7 @@ int llc_conn_ac_set_remote_busy(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (!llc->remote_busy_flag) { llc->remote_busy_flag = 1; @@ -656,7 +656,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -681,7 +681,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -706,7 +706,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; u8 f_bit = 1; @@ -732,7 +732,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; u8 f_bit = 1; @@ -758,7 +758,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -783,7 +783,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -816,7 +816,7 @@ { int rc = -ENOBUFS; struct sk_buff *nskb = llc_alloc_frame(); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (nskb) { struct llc_sap *sap = llc->sap; @@ -849,7 +849,7 @@ llc_pdu_decode_pf_bit(skb, &f_bit); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -882,7 +882,7 @@ int llc_conn_ac_start_p_timer(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc_conn_set_p_flag(sk, 1); mod_timer(&llc->pf_cycle_timer.timer, @@ -903,7 +903,7 @@ int llc_conn_ac_send_ack_if_needed(struct sock *sk, struct sk_buff *skb) { u8 pf_bit; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc_pdu_decode_pf_bit(skb, &pf_bit); llc->ack_pf |= pf_bit & 1; @@ -950,7 +950,7 @@ struct sk_buff *skb) { int rc; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; llc_pdu_header_init(skb, LLC_PDU_TYPE_I, sap->laddr.lsap, @@ -976,7 +976,7 @@ */ int llc_conn_ac_send_i_as_ack(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (llc->ack_must_be_send) { llc_conn_ac_send_i_rsp_f_set_ackpf(sk, skb); @@ -1004,7 +1004,7 @@ struct sk_buff *nskb = llc_alloc_frame(); if (nskb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; nskb->dev = llc->dev; @@ -1035,7 +1035,7 @@ */ static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (!llc->inc_cntr) { llc->dec_step = 0; @@ -1058,7 +1058,7 @@ */ int llc_conn_ac_adjust_npta_by_rr(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (!llc->connect_step && !llc->remote_busy_flag) { if (!llc->dec_step) { @@ -1084,7 +1084,7 @@ */ int llc_conn_ac_adjust_npta_by_rnr(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (llc->remote_busy_flag) if (!llc->dec_step) { @@ -1109,7 +1109,7 @@ */ int llc_conn_ac_dec_tx_win_size(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); u8 unacked_pdu = skb_queue_len(&llc->pdu_unack_q); llc->k -= unacked_pdu; @@ -1128,7 +1128,7 @@ */ int llc_conn_ac_inc_tx_win_size(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc->k += 1; if (llc->k > 128) @@ -1138,7 +1138,7 @@ int llc_conn_ac_stop_all_timers(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); del_timer(&llc->pf_cycle_timer.timer); del_timer(&llc->ack_timer.timer); @@ -1151,7 +1151,7 @@ int llc_conn_ac_stop_other_timers(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); del_timer(&llc->rej_sent_timer.timer); del_timer(&llc->pf_cycle_timer.timer); @@ -1163,7 +1163,7 @@ int llc_conn_ac_start_ack_timer(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); mod_timer(&llc->ack_timer.timer, jiffies + llc->ack_timer.expire * HZ); return 0; @@ -1171,7 +1171,7 @@ int llc_conn_ac_start_rej_timer(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); mod_timer(&llc->rej_sent_timer.timer, jiffies + llc->rej_sent_timer.expire * HZ); @@ -1181,7 +1181,7 @@ int llc_conn_ac_start_ack_tmr_if_not_running(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (!timer_pending(&llc->ack_timer.timer)) mod_timer(&llc->ack_timer.timer, @@ -1197,7 +1197,7 @@ int llc_conn_ac_stop_p_timer(struct sock *sk, struct sk_buff *skb) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); del_timer(&llc->pf_cycle_timer.timer); llc_conn_set_p_flag(sk, 0); @@ -1215,7 +1215,7 @@ int acked; u16 unacked = 0; struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc->last_nr = PDU_SUPV_GET_Nr(pdu); acked = llc_conn_remove_acked_pdus(sk, llc->last_nr, &unacked); diff -Nru a/net/llc/llc_c_ev.c b/net/llc/llc_c_ev.c --- a/net/llc/llc_c_ev.c 2005-03-07 14:54:16 -08:00 +++ b/net/llc/llc_c_ev.c 2005-03-07 14:54:16 -08:00 @@ -78,7 +78,7 @@ u8 nr1, nr2; struct sk_buff *skb; struct llc_pdu_sn *pdu; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); int rc = 0; if (llc->dev->flags & IFF_LOOPBACK) diff -Nru a/net/llc/llc_conn.c b/net/llc/llc_conn.c --- a/net/llc/llc_conn.c 2005-03-07 14:54:16 -08:00 +++ b/net/llc/llc_conn.c 2005-03-07 14:54:16 -08:00 @@ -53,7 +53,7 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb) { int rc; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_conn_state_ev *ev = llc_conn_ev(skb); /* @@ -221,7 +221,7 @@ struct sk_buff *skb; struct llc_pdu_sn *pdu; u16 nbr_unack_pdus; - struct llc_opt *llc; + struct llc_sock *llc; u8 howmany_resend = 0; llc_conn_remove_acked_pdus(sk, nr, &nbr_unack_pdus); @@ -263,7 +263,7 @@ { struct sk_buff *skb; u16 nbr_unack_pdus; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); u8 howmany_resend = 0; llc_conn_remove_acked_pdus(sk, nr, &nbr_unack_pdus); @@ -305,7 +305,7 @@ struct sk_buff *skb; struct llc_pdu_sn *pdu; int nbr_acked = 0; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); int q_len = skb_queue_len(&llc->pdu_unack_q); if (!q_len) @@ -366,7 +366,7 @@ static int llc_conn_service(struct sock *sk, struct sk_buff *skb) { int rc = 1; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_conn_state_trans *trans; if (llc->state > NBR_CONN_STATES) @@ -399,7 +399,7 @@ struct llc_conn_state_trans **next_trans; llc_conn_ev_qfyr_t *next_qualifier; struct llc_conn_state_ev *ev = llc_conn_ev(skb); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_conn_state *curr_state = &llc_conn_state_table[llc->state - 1]; @@ -478,7 +478,7 @@ read_lock_bh(&sap->sk_list.lock); sk_for_each(rc, node, &sap->sk_list.list) { - struct llc_opt *llc = llc_sk(rc); + struct llc_sock *llc = llc_sk(rc); if (llc->laddr.lsap == laddr->lsap && llc->daddr.lsap == daddr->lsap && @@ -511,7 +511,7 @@ read_lock_bh(&sap->sk_list.lock); sk_for_each(rc, node, &sap->sk_list.list) { - struct llc_opt *llc = llc_sk(rc); + struct llc_sock *llc = llc_sk(rc); if (rc->sk_type == SOCK_STREAM && rc->sk_state == TCP_LISTEN && llc->laddr.lsap == laddr->lsap && @@ -650,7 +650,7 @@ static int llc_conn_rcv(struct sock* sk, struct sk_buff *skb) { struct llc_conn_state_ev *ev = llc_conn_ev(skb); - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (!llc->dev) llc->dev = skb->dev; @@ -675,7 +675,7 @@ * Didn't find an active connection; verify if there * is a listening socket for this llc addr */ - struct llc_opt *llc; + struct llc_sock *llc; struct sock *parent = llc_lookup_listener(sap, &daddr); if (!parent) { @@ -756,7 +756,7 @@ static int llc_backlog_rcv(struct sock *sk, struct sk_buff *skb) { int rc = 0; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (llc_backlog_type(skb) == LLC_PACKET) { if (llc->state > 1) /* not closed */ @@ -786,17 +786,10 @@ * * Initializes a socket with default llc values. */ -static int llc_sk_init(struct sock* sk) +static void llc_sk_init(struct sock* sk) { - struct llc_opt *llc = kmalloc(sizeof(*llc), GFP_ATOMIC); - int rc = -ENOMEM; + struct llc_sock *llc = llc_sk(sk); - if (!llc) - goto out; - memset(llc, 0, sizeof(*llc)); - rc = 0; - - llc->sk = sk; llc->state = LLC_CONN_STATE_ADM; llc->inc_cntr = llc->dec_cntr = 2; llc->dec_step = llc->connect_step = 1; @@ -827,9 +820,6 @@ * tx_win of remote LLC) */ skb_queue_head_init(&llc->pdu_unack_q); sk->sk_backlog_rcv = llc_backlog_rcv; - sk->sk_protinfo = llc; -out: - return rc; } /** @@ -842,12 +832,12 @@ */ struct sock *llc_sk_alloc(int family, int priority) { - struct sock *sk = sk_alloc(family, priority, 1, NULL); + struct sock *sk = sk_alloc(family, priority, + sizeof(struct llc_sock), NULL); if (!sk) goto out; - if (llc_sk_init(sk)) - goto outsk; + llc_sk_init(sk); sock_init_data(NULL, sk); sk_set_owner(sk, THIS_MODULE); #ifdef LLC_REFCNT_DEBUG @@ -857,10 +847,6 @@ #endif out: return sk; -outsk: - sk_free(sk); - sk = NULL; - goto out; } /** @@ -871,7 +857,7 @@ */ void llc_sk_free(struct sock *sk) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc->state = LLC_CONN_OUT_OF_SVC; /* Stop all (possibly) running timers */ @@ -908,7 +894,7 @@ */ void llc_sk_reset(struct sock *sk) { - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); llc_conn_ac_stop_all_timers(sk, NULL); skb_queue_purge(&sk->sk_write_queue); diff -Nru a/net/llc/llc_if.c b/net/llc/llc_if.c --- a/net/llc/llc_if.c 2005-03-07 14:54:17 -08:00 +++ b/net/llc/llc_if.c 2005-03-07 14:54:17 -08:00 @@ -45,7 +45,7 @@ { struct llc_conn_state_ev *ev; int rc = -ECONNABORTED; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); if (llc->state == LLC_CONN_STATE_ADM) goto out; @@ -86,7 +86,7 @@ int rc = -EISCONN; struct llc_addr laddr, daddr; struct sk_buff *skb; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct sock *existing; laddr.lsap = llc->sap->laddr.lsap; diff -Nru a/net/llc/llc_proc.c b/net/llc/llc_proc.c --- a/net/llc/llc_proc.c 2005-03-07 14:54:16 -08:00 +++ b/net/llc/llc_proc.c 2005-03-07 14:54:16 -08:00 @@ -65,7 +65,7 @@ static void *llc_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct sock* sk, *next; - struct llc_opt *llc; + struct llc_sock *llc; struct llc_sap *sap; ++*pos; @@ -102,7 +102,7 @@ { if (v && v != SEQ_START_TOKEN) { struct sock *sk = v; - struct llc_opt *llc = llc_sk(sk); + struct llc_sock *llc = llc_sk(sk); struct llc_sap *sap = llc->sap; read_unlock_bh(&sap->sk_list.lock); @@ -113,7 +113,7 @@ static int llc_seq_socket_show(struct seq_file *seq, void *v) { struct sock* sk; - struct llc_opt *llc; + struct llc_sock *llc; if (v == SEQ_START_TOKEN) { seq_puts(seq, "SKt Mc local_mac_sap remote_mac_sap " @@ -160,7 +160,7 @@ static int llc_seq_core_show(struct seq_file *seq, void *v) { struct sock* sk; - struct llc_opt *llc; + struct llc_sock *llc; if (v == SEQ_START_TOKEN) { seq_puts(seq, "Connection list:\n" diff -Nru a/net/llc/llc_sap.c b/net/llc/llc_sap.c --- a/net/llc/llc_sap.c 2005-03-07 14:54:17 -08:00 +++ b/net/llc/llc_sap.c 2005-03-07 14:54:17 -08:00 @@ -283,7 +283,7 @@ read_lock_bh(&sap->sk_list.lock); sk_for_each(rc, node, &sap->sk_list.list) { - struct llc_opt *llc = llc_sk(rc); + struct llc_sock *llc = llc_sk(rc); if (rc->sk_type == SOCK_DGRAM && llc->laddr.lsap == laddr->lsap && diff -Nru a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c --- a/net/netlink/af_netlink.c 2005-03-07 14:54:17 -08:00 +++ b/net/netlink/af_netlink.c 2005-03-07 14:54:17 -08:00 @@ -59,8 +59,9 @@ #define NL_EMULATE_DEV #endif -struct netlink_opt -{ +struct netlink_sock { + /* struct sock has to be the first member of netlink_sock */ + struct sock sk; u32 pid; unsigned int groups; u32 dst_pid; @@ -73,7 +74,10 @@ void (*data_ready)(struct sock *sk, int bytes); }; -#define nlk_sk(__sk) ((struct netlink_opt *)(__sk)->sk_protinfo) +static inline struct netlink_sock *nlk_sk(struct sock *sk) +{ + return (struct netlink_sock *)sk; +} struct nl_pid_hash { struct hlist_head *table; @@ -122,8 +126,6 @@ BUG_TRAP(!atomic_read(&sk->sk_rmem_alloc)); BUG_TRAP(!atomic_read(&sk->sk_wmem_alloc)); BUG_TRAP(!nlk_sk(sk)->cb); - - kfree(nlk_sk(sk)); } /* This lock without WQ_FLAG_EXCLUSIVE is good on UP and it is _very_ bad on SMP. @@ -327,7 +329,7 @@ static int netlink_create(struct socket *sock, int protocol) { struct sock *sk; - struct netlink_opt *nlk; + struct netlink_sock *nlk; sock->state = SS_UNCONNECTED; @@ -339,19 +341,15 @@ sock->ops = &netlink_ops; - sk = sk_alloc(PF_NETLINK, GFP_KERNEL, 1, NULL); + sk = sk_alloc(PF_NETLINK, GFP_KERNEL, + sizeof(struct netlink_sock), NULL); if (!sk) return -ENOMEM; sock_init_data(sock,sk); sk_set_owner(sk, THIS_MODULE); - nlk = sk->sk_protinfo = kmalloc(sizeof(*nlk), GFP_KERNEL); - if (!nlk) { - sk_free(sk); - return -ENOMEM; - } - memset(nlk, 0, sizeof(*nlk)); + nlk = nlk_sk(sk); spin_lock_init(&nlk->cb_lock); init_waitqueue_head(&nlk->wait); @@ -364,7 +362,7 @@ static int netlink_release(struct socket *sock) { struct sock *sk = sock->sk; - struct netlink_opt *nlk; + struct netlink_sock *nlk; if (!sk) return 0; @@ -445,7 +443,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr, int addr_len) { struct sock *sk = sock->sk; - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr; int err; @@ -486,7 +484,7 @@ { int err = 0; struct sock *sk = sock->sk; - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); struct sockaddr_nl *nladdr=(struct sockaddr_nl*)addr; if (addr->sa_family == AF_UNSPEC) { @@ -517,7 +515,7 @@ static int netlink_getname(struct socket *sock, struct sockaddr *addr, int *addr_len, int peer) { struct sock *sk = sock->sk; - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); struct sockaddr_nl *nladdr=(struct sockaddr_nl *)addr; nladdr->nl_family = AF_NETLINK; @@ -546,7 +544,7 @@ { int protocol = ssk->sk_protocol; struct sock *sock; - struct netlink_opt *nlk; + struct netlink_sock *nlk; sock = netlink_lookup(protocol, pid); if (!sock) @@ -592,7 +590,7 @@ */ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo) { - struct netlink_opt *nlk; + struct netlink_sock *nlk; nlk = nlk_sk(sk); @@ -635,7 +633,7 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol) { - struct netlink_opt *nlk; + struct netlink_sock *nlk; int len = skb->len; nlk = nlk_sk(sk); @@ -710,7 +708,7 @@ static __inline__ int netlink_broadcast_deliver(struct sock *sk, struct sk_buff *skb) { - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); #ifdef NL_EMULATE_DEV if (nlk->handler) { nlk->handler(sk->sk_protocol, skb); @@ -741,7 +739,7 @@ static inline int do_one_broadcast(struct sock *sk, struct netlink_broadcast_data *p) { - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); int val; if (p->exclude_sk == sk) @@ -833,7 +831,7 @@ static inline int do_one_set_err(struct sock *sk, struct netlink_set_err_data *p) { - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); if (sk == p->exclude_sk) goto out; @@ -868,7 +866,7 @@ static inline void netlink_rcv_wake(struct sock *sk) { - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); if (!skb_queue_len(&sk->sk_receive_queue)) clear_bit(0, &nlk->state); @@ -881,7 +879,7 @@ { struct sock_iocb *siocb = kiocb_to_siocb(kiocb); struct sock *sk = sock->sk; - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); struct sockaddr_nl *addr=msg->msg_name; u32 dst_pid; u32 dst_groups; @@ -965,7 +963,7 @@ struct sock_iocb *siocb = kiocb_to_siocb(kiocb); struct scm_cookie scm; struct sock *sk = sock->sk; - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); int noblock = flags&MSG_DONTWAIT; size_t copied; struct sk_buff *skb; @@ -1019,7 +1017,7 @@ static void netlink_data_ready(struct sock *sk, int len) { - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); if (nlk->data_ready) nlk->data_ready(sk, len); @@ -1083,7 +1081,7 @@ static int netlink_dump(struct sock *sk) { - struct netlink_opt *nlk = nlk_sk(sk); + struct netlink_sock *nlk = nlk_sk(sk); struct netlink_callback *cb; struct sk_buff *skb; struct nlmsghdr *nlh; @@ -1133,7 +1131,7 @@ { struct netlink_callback *cb; struct sock *sk; - struct netlink_opt *nlk; + struct netlink_sock *nlk; cb = kmalloc(sizeof(*cb), GFP_KERNEL); if (cb == NULL) @@ -1290,7 +1288,7 @@ "Rmem Wmem Dump Locks\n"); else { struct sock *s = v; - struct netlink_opt *nlk = nlk_sk(s); + struct netlink_sock *nlk = nlk_sk(s); seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %d\n", s, diff -Nru a/net/packet/af_packet.c b/net/packet/af_packet.c --- a/net/packet/af_packet.c 2005-03-07 14:54:17 -08:00 +++ b/net/packet/af_packet.c 2005-03-07 14:54:17 -08:00 @@ -170,8 +170,9 @@ static void packet_flush_mclist(struct sock *sk); -struct packet_opt -{ +struct packet_sock { + /* struct sock has to be the first member of packet_sock */ + struct sock sk; struct tpacket_stats stats; #ifdef CONFIG_PACKET_MMAP char * *pg_vec; @@ -199,7 +200,7 @@ #ifdef CONFIG_PACKET_MMAP -static inline char *packet_lookup_frame(struct packet_opt *po, unsigned int position) +static inline char *packet_lookup_frame(struct packet_sock *po, unsigned int position) { unsigned int pg_vec_pos, frame_offset; char *frame; @@ -213,7 +214,10 @@ } #endif -#define pkt_sk(__sk) ((struct packet_opt *)(__sk)->sk_protinfo) +static inline struct packet_sock *pkt_sk(struct sock *sk) +{ + return (struct packet_sock *)sk; +} static void packet_sock_destruct(struct sock *sk) { @@ -225,8 +229,6 @@ return; } - if (pkt_sk(sk)) - kfree(pkt_sk(sk)); atomic_dec(&packet_socks_nr); #ifdef PACKET_REFCNT_DEBUG printk(KERN_DEBUG "PACKET socket %p is free, %d are alive\n", sk, atomic_read(&packet_socks_nr)); @@ -440,7 +442,7 @@ { struct sock *sk; struct sockaddr_ll *sll; - struct packet_opt *po; + struct packet_sock *po; u8 * skb_head = skb->data; int skb_len = skb->len; unsigned snaplen; @@ -541,7 +543,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) { struct sock *sk; - struct packet_opt *po; + struct packet_sock *po; struct sockaddr_ll *sll; struct tpacket_hdr *h; u8 * skb_head = skb->data; @@ -699,7 +701,7 @@ */ if (saddr == NULL) { - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); ifindex = po->ifindex; proto = po->num; @@ -786,7 +788,7 @@ static int packet_release(struct socket *sock) { struct sock *sk = sock->sk; - struct packet_opt *po; + struct packet_sock *po; if (!sk) return 0; @@ -844,7 +846,7 @@ static int packet_do_bind(struct sock *sk, struct net_device *dev, int protocol) { - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); /* * Detach an existing hook if present. */ @@ -961,7 +963,7 @@ static int packet_create(struct socket *sock, int protocol) { struct sock *sk; - struct packet_opt *po; + struct packet_sock *po; int err; if (!capable(CAP_NET_RAW)) @@ -976,7 +978,8 @@ sock->state = SS_UNCONNECTED; err = -ENOBUFS; - sk = sk_alloc(PF_PACKET, GFP_KERNEL, 1, NULL); + sk = sk_alloc(PF_PACKET, GFP_KERNEL, + sizeof(struct packet_sock), NULL); if (sk == NULL) goto out; @@ -988,10 +991,7 @@ sock_init_data(sock,sk); sk_set_owner(sk, THIS_MODULE); - po = sk->sk_protinfo = kmalloc(sizeof(*po), GFP_KERNEL); - if (!po) - goto out_free; - memset(po, 0, sizeof(*po)); + po = pkt_sk(sk); sk->sk_family = PF_PACKET; po->num = protocol; @@ -1021,9 +1021,6 @@ sk_add_node(sk, &packet_sklist); write_unlock_bh(&packet_sklist_lock); return(0); - -out_free: - sk_free(sk); out: return err; } @@ -1141,7 +1138,7 @@ { struct net_device *dev; struct sock *sk = sock->sk; - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); struct sockaddr_ll *sll = (struct sockaddr_ll*)uaddr; if (peer) @@ -1195,7 +1192,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq *mreq) { - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); struct packet_mclist *ml, *i; struct net_device *dev; int err; @@ -1274,7 +1271,7 @@ static void packet_flush_mclist(struct sock *sk) { - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); struct packet_mclist *ml; if (!po->mclist) @@ -1355,7 +1352,7 @@ { int len; struct sock *sk = sock->sk; - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); if (level != SOL_PACKET) return -ENOPROTOOPT; @@ -1401,7 +1398,7 @@ read_lock(&packet_sklist_lock); sk_for_each(sk, node, &packet_sklist) { - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); switch (msg) { case NETDEV_UNREGISTER: @@ -1504,7 +1501,7 @@ poll_table *wait) { struct sock *sk = sock->sk; - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); unsigned int mask = datagram_poll(file, sock, wait); spin_lock_bh(&sk->sk_receive_queue.lock); @@ -1579,7 +1576,7 @@ static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing) { char **pg_vec = NULL; - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); int was_running, num, order = 0; int err = 0; @@ -1709,7 +1706,7 @@ static int packet_mmap(struct file *file, struct socket *sock, struct vm_area_struct *vma) { struct sock *sk = sock->sk; - struct packet_opt *po = pkt_sk(sk); + struct packet_sock *po = pkt_sk(sk); unsigned long size; unsigned long start; int err = -EINVAL; @@ -1839,7 +1836,7 @@ seq_puts(seq, "sk RefCnt Type Proto Iface R Rmem User Inode\n"); else { struct sock *s = v; - const struct packet_opt *po = pkt_sk(s); + const struct packet_sock *po = pkt_sk(s); seq_printf(seq, "%p %-6d %-4d %04x %-5d %1d %-6u %-6u %-6lu\n", diff -Nru a/net/sched/Kconfig b/net/sched/Kconfig --- a/net/sched/Kconfig 2005-03-07 14:54:18 -08:00 +++ b/net/sched/Kconfig 2005-03-07 14:54:18 -08:00 @@ -269,6 +269,16 @@ Documentation and software is at . +config NET_CLS_BASIC + tristate "Basic classifier" + depends on NET_CLS + ---help--- + Say Y here if you want to be able to classify packets using + only extended matches and actions. + + To compile this code as a module, choose M here: the + module will be called cls_basic. + config NET_CLS_TCINDEX tristate "TC index classifier" depends on NET_CLS @@ -374,6 +384,70 @@ To compile this code as a module, choose M here: the module will be called cls_rsvp6. + +config NET_EMATCH + bool "Extended Matches" + depends on NET_CLS + ---help--- + Say Y here if you want to use extended matches on top of classifiers + and select the extended matches below. + + Extended matches are small classification helpers not worth writing + a separate classifier. + + You must have a recent version of the iproute2 tools in order to use + extended matches. + +config NET_EMATCH_STACK + int "Stack size" + depends on NET_EMATCH + default "32" + ---help--- + Size of the local stack variable used while evaluating the tree of + ematches. Limits the depth of the tree, i.e. the number of + encapsulated precedences. Every level requires 4 bytes of addtional + stack space. + +config NET_EMATCH_CMP + tristate "Simple packet data comparison" + depends on NET_EMATCH + ---help--- + Say Y here if you want to be able to classify packets based on + simple packet data comparisons for 8, 16, and 32bit values. + + To compile this code as a module, choose M here: the + module will be called em_cmp. + +config NET_EMATCH_NBYTE + tristate "Multi byte comparison" + depends on NET_EMATCH + ---help--- + Say Y here if you want to be able to classify packets based on + multiple byte comparisons mainly useful for IPv6 address comparisons. + + To compile this code as a module, choose M here: the + module will be called em_nbyte. + +config NET_EMATCH_U32 + tristate "U32 hashing key" + depends on NET_EMATCH + ---help--- + Say Y here if you want to be able to classify packets using + the famous u32 key in combination with logic relations. + + To compile this code as a module, choose M here: the + module will be called em_u32. + +config NET_EMATCH_META + tristate "Metadata" + depends on NET_EMATCH + ---help--- + Say Y here if you want to be ablt to classify packets based on + metadata such as load average, netfilter attributes, socket + attributes and routing decisions. + + To compile this code as a module, choose M here: the + module will be called em_meta. config NET_CLS_ACT bool "Packet ACTION" diff -Nru a/net/sched/Makefile b/net/sched/Makefile --- a/net/sched/Makefile 2005-03-07 14:54:17 -08:00 +++ b/net/sched/Makefile 2005-03-07 14:54:17 -08:00 @@ -33,3 +33,9 @@ obj-$(CONFIG_NET_CLS_RSVP) += cls_rsvp.o obj-$(CONFIG_NET_CLS_TCINDEX) += cls_tcindex.o obj-$(CONFIG_NET_CLS_RSVP6) += cls_rsvp6.o +obj-$(CONFIG_NET_CLS_BASIC) += cls_basic.o +obj-$(CONFIG_NET_EMATCH) += ematch.o +obj-$(CONFIG_NET_EMATCH_CMP) += em_cmp.o +obj-$(CONFIG_NET_EMATCH_NBYTE) += em_nbyte.o +obj-$(CONFIG_NET_EMATCH_U32) += em_u32.o +obj-$(CONFIG_NET_EMATCH_META) += em_meta.o diff -Nru a/net/sched/cls_basic.c b/net/sched/cls_basic.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/cls_basic.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,303 @@ +/* + * net/sched/cls_basic.c Basic Packet Classifier. + * + * 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. + * + * Authors: Thomas Graf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct basic_head +{ + u32 hgenerator; + struct list_head flist; +}; + +struct basic_filter +{ + u32 handle; + struct tcf_exts exts; + struct tcf_ematch_tree ematches; + struct tcf_result res; + struct list_head link; +}; + +static struct tcf_ext_map basic_ext_map = { + .action = TCA_BASIC_ACT, + .police = TCA_BASIC_POLICE +}; + +static int basic_classify(struct sk_buff *skb, struct tcf_proto *tp, + struct tcf_result *res) +{ + int r; + struct basic_head *head = (struct basic_head *) tp->root; + struct basic_filter *f; + + list_for_each_entry(f, &head->flist, link) { + if (!tcf_em_tree_match(skb, &f->ematches, NULL)) + continue; + *res = f->res; + r = tcf_exts_exec(skb, &f->exts, res); + if (r < 0) + continue; + return r; + } + return -1; +} + +static unsigned long basic_get(struct tcf_proto *tp, u32 handle) +{ + unsigned long l = 0UL; + struct basic_head *head = (struct basic_head *) tp->root; + struct basic_filter *f; + + if (head == NULL) + return 0UL; + + list_for_each_entry(f, &head->flist, link) + if (f->handle == handle) + l = (unsigned long) f; + + return l; +} + +static void basic_put(struct tcf_proto *tp, unsigned long f) +{ +} + +static int basic_init(struct tcf_proto *tp) +{ + return 0; +} + +static inline void basic_delete_filter(struct tcf_proto *tp, + struct basic_filter *f) +{ + tcf_unbind_filter(tp, &f->res); + tcf_exts_destroy(tp, &f->exts); + tcf_em_tree_destroy(tp, &f->ematches); + kfree(f); +} + +static void basic_destroy(struct tcf_proto *tp) +{ + struct basic_head *head = (struct basic_head *) xchg(&tp->root, NULL); + struct basic_filter *f, *n; + + list_for_each_entry_safe(f, n, &head->flist, link) { + list_del(&f->link); + basic_delete_filter(tp, f); + } +} + +static int basic_delete(struct tcf_proto *tp, unsigned long arg) +{ + struct basic_head *head = (struct basic_head *) tp->root; + struct basic_filter *t, *f = (struct basic_filter *) arg; + + list_for_each_entry(t, &head->flist, link) + if (t == f) { + tcf_tree_lock(tp); + list_del(&t->link); + tcf_tree_unlock(tp); + basic_delete_filter(tp, t); + return 0; + } + + return -ENOENT; +} + +static inline int basic_set_parms(struct tcf_proto *tp, struct basic_filter *f, + unsigned long base, struct rtattr **tb, + struct rtattr *est) +{ + int err = -EINVAL; + struct tcf_exts e; + struct tcf_ematch_tree t; + + if (tb[TCA_BASIC_CLASSID-1]) + if (RTA_PAYLOAD(tb[TCA_BASIC_CLASSID-1]) < sizeof(u32)) + return err; + + err = tcf_exts_validate(tp, tb, est, &e, &basic_ext_map); + if (err < 0) + return err; + + err = tcf_em_tree_validate(tp, tb[TCA_BASIC_EMATCHES-1], &t); + if (err < 0) + goto errout; + + if (tb[TCA_BASIC_CLASSID-1]) { + f->res.classid = *(u32*)RTA_DATA(tb[TCA_BASIC_CLASSID-1]); + tcf_bind_filter(tp, &f->res, base); + } + + tcf_exts_change(tp, &f->exts, &e); + tcf_em_tree_change(tp, &f->ematches, &t); + + return 0; +errout: + tcf_exts_destroy(tp, &e); + return err; +} + +static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, + struct rtattr **tca, unsigned long *arg) +{ + int err = -EINVAL; + struct basic_head *head = (struct basic_head *) tp->root; + struct rtattr *tb[TCA_BASIC_MAX]; + struct basic_filter *f = (struct basic_filter *) *arg; + + if (tca[TCA_OPTIONS-1] == NULL) + return -EINVAL; + + if (rtattr_parse_nested(tb, TCA_BASIC_MAX, tca[TCA_OPTIONS-1]) < 0) + return -EINVAL; + + if (f != NULL) { + if (handle && f->handle != handle) + return -EINVAL; + return basic_set_parms(tp, f, base, tb, tca[TCA_RATE-1]); + } + + err = -ENOBUFS; + if (head == NULL) { + head = kmalloc(sizeof(*head), GFP_KERNEL); + if (head == NULL) + goto errout; + + memset(head, 0, sizeof(*head)); + INIT_LIST_HEAD(&head->flist); + tp->root = head; + } + + f = kmalloc(sizeof(*f), GFP_KERNEL); + if (f == NULL) + goto errout; + memset(f, 0, sizeof(*f)); + + err = -EINVAL; + if (handle) + f->handle = handle; + else { + int i = 0x80000000; + do { + if (++head->hgenerator == 0x7FFFFFFF) + head->hgenerator = 1; + } while (--i > 0 && basic_get(tp, head->hgenerator)); + + if (i <= 0) { + printk(KERN_ERR "Insufficient number of handles\n"); + goto errout; + } + + f->handle = head->hgenerator; + } + + err = basic_set_parms(tp, f, base, tb, tca[TCA_RATE-1]); + if (err < 0) + goto errout; + + tcf_tree_lock(tp); + list_add(&f->link, &head->flist); + tcf_tree_unlock(tp); + *arg = (unsigned long) f; + + return 0; +errout: + if (*arg == 0UL && f) + kfree(f); + + return err; +} + +static void basic_walk(struct tcf_proto *tp, struct tcf_walker *arg) +{ + struct basic_head *head = (struct basic_head *) tp->root; + struct basic_filter *f; + + list_for_each_entry(f, &head->flist, link) { + if (arg->count < arg->skip) + goto skip; + + if (arg->fn(tp, (unsigned long) f, arg) < 0) { + arg->stop = 1; + break; + } +skip: + arg->count++; + } +} + +static int basic_dump(struct tcf_proto *tp, unsigned long fh, + struct sk_buff *skb, struct tcmsg *t) +{ + struct basic_filter *f = (struct basic_filter *) fh; + unsigned char *b = skb->tail; + struct rtattr *rta; + + if (f == NULL) + return skb->len; + + t->tcm_handle = f->handle; + + rta = (struct rtattr *) b; + RTA_PUT(skb, TCA_OPTIONS, 0, NULL); + + if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 || + tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0) + goto rtattr_failure; + + rta->rta_len = (skb->tail - b); + return skb->len; + +rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +static struct tcf_proto_ops cls_basic_ops = { + .kind = "basic", + .classify = basic_classify, + .init = basic_init, + .destroy = basic_destroy, + .get = basic_get, + .put = basic_put, + .change = basic_change, + .delete = basic_delete, + .walk = basic_walk, + .dump = basic_dump, + .owner = THIS_MODULE, +}; + +static int __init init_basic(void) +{ + return register_tcf_proto_ops(&cls_basic_ops); +} + +static void __exit exit_basic(void) +{ + unregister_tcf_proto_ops(&cls_basic_ops); +} + +module_init(init_basic) +module_exit(exit_basic) +MODULE_LICENSE("GPL"); + diff -Nru a/net/sched/em_cmp.c b/net/sched/em_cmp.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/em_cmp.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,101 @@ +/* + * net/sched/em_cmp.c Simple packet data comparison ematch + * + * 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. + * + * Authors: Thomas Graf + */ + +#include +#include +#include +#include +#include +#include +#include + +static inline int cmp_needs_transformation(struct tcf_em_cmp *cmp) +{ + return unlikely(cmp->flags & TCF_EM_CMP_TRANS); +} + +static int em_cmp_match(struct sk_buff *skb, struct tcf_ematch *em, + struct tcf_pkt_info *info) +{ + struct tcf_em_cmp *cmp = (struct tcf_em_cmp *) em->data; + unsigned char *ptr = tcf_get_base_ptr(skb, cmp->layer) + cmp->off; + u32 val = 0; + + if (!tcf_valid_offset(skb, ptr, cmp->align)) + return 0; + + switch (cmp->align) { + case TCF_EM_ALIGN_U8: + val = *ptr; + break; + + case TCF_EM_ALIGN_U16: + val = *ptr << 8; + val |= *(ptr+1); + + if (cmp_needs_transformation(cmp)) + val = be16_to_cpu(val); + break; + + case TCF_EM_ALIGN_U32: + /* Worth checking boundries? The branching seems + * to get worse. Visit again. */ + val = *ptr << 24; + val |= *(ptr+1) << 16; + val |= *(ptr+2) << 8; + val |= *(ptr+3); + + if (cmp_needs_transformation(cmp)) + val = be32_to_cpu(val); + break; + + default: + return 0; + } + + if (cmp->mask) + val &= cmp->mask; + + switch (cmp->opnd) { + case TCF_EM_OPND_EQ: + return val == cmp->val; + case TCF_EM_OPND_LT: + return val < cmp->val; + case TCF_EM_OPND_GT: + return val > cmp->val; + } + + return 0; +} + +static struct tcf_ematch_ops em_cmp_ops = { + .kind = TCF_EM_CMP, + .datalen = sizeof(struct tcf_em_cmp), + .match = em_cmp_match, + .owner = THIS_MODULE, + .link = LIST_HEAD_INIT(em_cmp_ops.link) +}; + +static int __init init_em_cmp(void) +{ + return tcf_em_register(&em_cmp_ops); +} + +static void __exit exit_em_cmp(void) +{ + tcf_em_unregister(&em_cmp_ops); +} + +MODULE_LICENSE("GPL"); + +module_init(init_em_cmp); +module_exit(exit_em_cmp); + diff -Nru a/net/sched/em_meta.c b/net/sched/em_meta.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/em_meta.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,661 @@ +/* + * net/sched/em_meta.c Metadata ematch + * + * 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. + * + * Authors: Thomas Graf + * + * ========================================================================== + * + * The metadata ematch compares two meta objects where each object + * represents either a meta value stored in the kernel or a static + * value provided by userspace. The objects are not provided by + * userspace itself but rather a definition providing the information + * to build them. Every object is of a certain type which must be + * equal to the object it is being compared to. + * + * The definition of a objects conists of the type (meta type), a + * identifier (meta id) and additional type specific information. + * The meta id is either TCF_META_TYPE_VALUE for values provided by + * userspace or a index to the meta operations table consisting of + * function pointers to type specific meta data collectors returning + * the value of the requested meta value. + * + * lvalue rvalue + * +-----------+ +-----------+ + * | type: INT | | type: INT | + * def | id: INDEV | | id: VALUE | + * | data: | | data: 3 | + * +-----------+ +-----------+ + * | | + * ---> meta_ops[INT][INDEV](...) | + * | | + * ----------- | + * V V + * +-----------+ +-----------+ + * | type: INT | | type: INT | + * obj | id: INDEV | | id: VALUE | + * | data: 2 |<--data got filled out | data: 3 | + * +-----------+ +-----------+ + * | | + * --------------> 2 equals 3 <-------------- + * + * This is a simplified schema, the complexity varies depending + * on the meta type. Obviously, the length of the data must also + * be provided for non-numeric types. + * + * Additionaly, type dependant modifiers such as shift operators + * or mask may be applied to extend the functionaliy. As of now, + * the variable length type supports shifting the byte string to + * the right, eating up any number of octets and thus supporting + * wildcard interface name comparisons such as "ppp%" matching + * ppp0..9. + * + * NOTE: Certain meta values depend on other subsystems and are + * only available if that subsytem is enabled in the kernel. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct meta_obj +{ + unsigned long value; + unsigned int len; +}; + +struct meta_value +{ + struct tcf_meta_val hdr; + unsigned long val; + unsigned int len; +}; + +struct meta_match +{ + struct meta_value lvalue; + struct meta_value rvalue; +}; + +static inline int meta_id(struct meta_value *v) +{ + return TCF_META_ID(v->hdr.kind); +} + +static inline int meta_type(struct meta_value *v) +{ + return TCF_META_TYPE(v->hdr.kind); +} + +#define META_COLLECTOR(FUNC) static void meta_##FUNC(struct sk_buff *skb, \ + struct tcf_pkt_info *info, struct meta_value *v, \ + struct meta_obj *dst, int *err) + +/************************************************************************** + * System status & misc + **************************************************************************/ + +META_COLLECTOR(int_random) +{ + get_random_bytes(&dst->value, sizeof(dst->value)); +} + +static inline unsigned long fixed_loadavg(int load) +{ + int rnd_load = load + (FIXED_1/200); + int rnd_frac = ((rnd_load & (FIXED_1-1)) * 100) >> FSHIFT; + + return ((rnd_load >> FSHIFT) * 100) + rnd_frac; +} + +META_COLLECTOR(int_loadavg_0) +{ + dst->value = fixed_loadavg(avenrun[0]); +} + +META_COLLECTOR(int_loadavg_1) +{ + dst->value = fixed_loadavg(avenrun[1]); +} + +META_COLLECTOR(int_loadavg_2) +{ + dst->value = fixed_loadavg(avenrun[2]); +} + +/************************************************************************** + * Device names & indices + **************************************************************************/ + +static inline int int_dev(struct net_device *dev, struct meta_obj *dst) +{ + if (unlikely(dev == NULL)) + return -1; + + dst->value = dev->ifindex; + return 0; +} + +static inline int var_dev(struct net_device *dev, struct meta_obj *dst) +{ + if (unlikely(dev == NULL)) + return -1; + + dst->value = (unsigned long) dev->name; + dst->len = strlen(dev->name); + return 0; +} + +META_COLLECTOR(int_dev) +{ + *err = int_dev(skb->dev, dst); +} + +META_COLLECTOR(var_dev) +{ + *err = var_dev(skb->dev, dst); +} + +META_COLLECTOR(int_indev) +{ + *err = int_dev(skb->input_dev, dst); +} + +META_COLLECTOR(var_indev) +{ + *err = var_dev(skb->input_dev, dst); +} + +META_COLLECTOR(int_realdev) +{ + *err = int_dev(skb->real_dev, dst); +} + +META_COLLECTOR(var_realdev) +{ + *err = var_dev(skb->real_dev, dst); +} + +/************************************************************************** + * skb attributes + **************************************************************************/ + +META_COLLECTOR(int_priority) +{ + dst->value = skb->priority; +} + +META_COLLECTOR(int_protocol) +{ + /* Let userspace take care of the byte ordering */ + dst->value = skb->protocol; +} + +META_COLLECTOR(int_security) +{ + dst->value = skb->security; +} + +META_COLLECTOR(int_pkttype) +{ + dst->value = skb->pkt_type; +} + +META_COLLECTOR(int_pktlen) +{ + dst->value = skb->len; +} + +META_COLLECTOR(int_datalen) +{ + dst->value = skb->data_len; +} + +META_COLLECTOR(int_maclen) +{ + dst->value = skb->mac_len; +} + +/************************************************************************** + * Netfilter + **************************************************************************/ + +#ifdef CONFIG_NETFILTER +META_COLLECTOR(int_nfmark) +{ + dst->value = skb->nfmark; +} +#endif + +/************************************************************************** + * Traffic Control + **************************************************************************/ + +META_COLLECTOR(int_tcindex) +{ + dst->value = skb->tc_index; +} + +#ifdef CONFIG_NET_CLS_ACT +META_COLLECTOR(int_tcverd) +{ + dst->value = skb->tc_verd; +} + +META_COLLECTOR(int_tcclassid) +{ + dst->value = skb->tc_classid; +} +#endif + +/************************************************************************** + * Routing + **************************************************************************/ + +#ifdef CONFIG_NET_CLS_ROUTE +META_COLLECTOR(int_rtclassid) +{ + if (unlikely(skb->dst == NULL)) + *err = -1; + else + dst->value = skb->dst->tclassid; +} +#endif + +META_COLLECTOR(int_rtiif) +{ + if (unlikely(skb->dst == NULL)) + *err = -1; + else + dst->value = ((struct rtable*) skb->dst)->fl.iif; +} + +/************************************************************************** + * Meta value collectors assignment table + **************************************************************************/ + +struct meta_ops +{ + void (*get)(struct sk_buff *, struct tcf_pkt_info *, + struct meta_value *, struct meta_obj *, int *); +}; + +/* Meta value operations table listing all meta value collectors and + * assigns them to a type and meta id. */ +static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { + [TCF_META_TYPE_VAR] = { + [TCF_META_ID_DEV] = { .get = meta_var_dev }, + [TCF_META_ID_INDEV] = { .get = meta_var_indev }, + [TCF_META_ID_REALDEV] = { .get = meta_var_realdev } + }, + [TCF_META_TYPE_INT] = { + [TCF_META_ID_RANDOM] = { .get = meta_int_random }, + [TCF_META_ID_LOADAVG_0] = { .get = meta_int_loadavg_0 }, + [TCF_META_ID_LOADAVG_1] = { .get = meta_int_loadavg_1 }, + [TCF_META_ID_LOADAVG_2] = { .get = meta_int_loadavg_2 }, + [TCF_META_ID_DEV] = { .get = meta_int_dev }, + [TCF_META_ID_INDEV] = { .get = meta_int_indev }, + [TCF_META_ID_REALDEV] = { .get = meta_int_realdev }, + [TCF_META_ID_PRIORITY] = { .get = meta_int_priority }, + [TCF_META_ID_PROTOCOL] = { .get = meta_int_protocol }, + [TCF_META_ID_SECURITY] = { .get = meta_int_security }, + [TCF_META_ID_PKTTYPE] = { .get = meta_int_pkttype }, + [TCF_META_ID_PKTLEN] = { .get = meta_int_pktlen }, + [TCF_META_ID_DATALEN] = { .get = meta_int_datalen }, + [TCF_META_ID_MACLEN] = { .get = meta_int_maclen }, +#ifdef CONFIG_NETFILTER + [TCF_META_ID_NFMARK] = { .get = meta_int_nfmark }, +#endif + [TCF_META_ID_TCINDEX] = { .get = meta_int_tcindex }, +#ifdef CONFIG_NET_CLS_ACT + [TCF_META_ID_TCVERDICT] = { .get = meta_int_tcverd }, + [TCF_META_ID_TCCLASSID] = { .get = meta_int_tcclassid }, +#endif +#ifdef CONFIG_NET_CLS_ROUTE + [TCF_META_ID_RTCLASSID] = { .get = meta_int_rtclassid }, +#endif + [TCF_META_ID_RTIIF] = { .get = meta_int_rtiif } + } +}; + +static inline struct meta_ops * meta_ops(struct meta_value *val) +{ + return &__meta_ops[meta_type(val)][meta_id(val)]; +} + +/************************************************************************** + * Type specific operations for TCF_META_TYPE_VAR + **************************************************************************/ + +static int meta_var_compare(struct meta_obj *a, struct meta_obj *b) +{ + int r = a->len - b->len; + + if (r == 0) + r = memcmp((void *) a->value, (void *) b->value, a->len); + + return r; +} + +static int meta_var_change(struct meta_value *dst, struct rtattr *rta) +{ + int len = RTA_PAYLOAD(rta); + + dst->val = (unsigned long) kmalloc(len, GFP_KERNEL); + if (dst->val == 0UL) + return -ENOMEM; + memcpy((void *) dst->val, RTA_DATA(rta), len); + dst->len = len; + return 0; +} + +static void meta_var_destroy(struct meta_value *v) +{ + if (v->val) + kfree((void *) v->val); +} + +static void meta_var_apply_extras(struct meta_value *v, + struct meta_obj *dst) +{ + int shift = v->hdr.shift; + + if (shift && shift < dst->len) + dst->len -= shift; +} + +static int meta_var_dump(struct sk_buff *skb, struct meta_value *v, int tlv) +{ + if (v->val && v->len) + RTA_PUT(skb, tlv, v->len, (void *) v->val); + return 0; + +rtattr_failure: + return -1; +} + +/************************************************************************** + * Type specific operations for TCF_META_TYPE_INT + **************************************************************************/ + +static int meta_int_compare(struct meta_obj *a, struct meta_obj *b) +{ + /* Let gcc optimize it, the unlikely is not really based on + * some numbers but jump free code for mismatches seems + * more logical. */ + if (unlikely(a == b)) + return 0; + else if (a < b) + return -1; + else + return 1; +} + +static int meta_int_change(struct meta_value *dst, struct rtattr *rta) +{ + if (RTA_PAYLOAD(rta) >= sizeof(unsigned long)) { + dst->val = *(unsigned long *) RTA_DATA(rta); + dst->len = sizeof(unsigned long); + } else if (RTA_PAYLOAD(rta) == sizeof(u32)) { + dst->val = *(u32 *) RTA_DATA(rta); + dst->len = sizeof(u32); + } else + return -EINVAL; + + return 0; +} + +static void meta_int_apply_extras(struct meta_value *v, + struct meta_obj *dst) +{ + if (v->hdr.shift) + dst->value >>= v->hdr.shift; + + if (v->val) + dst->value &= v->val; +} + +static int meta_int_dump(struct sk_buff *skb, struct meta_value *v, int tlv) +{ + if (v->len == sizeof(unsigned long)) + RTA_PUT(skb, tlv, sizeof(unsigned long), &v->val); + else if (v->len == sizeof(u32)) { + u32 d = v->val; + RTA_PUT(skb, tlv, sizeof(d), &d); + } + + return 0; + +rtattr_failure: + return -1; +} + +/************************************************************************** + * Type specific operations table + **************************************************************************/ + +struct meta_type_ops +{ + void (*destroy)(struct meta_value *); + int (*compare)(struct meta_obj *, struct meta_obj *); + int (*change)(struct meta_value *, struct rtattr *); + void (*apply_extras)(struct meta_value *, struct meta_obj *); + int (*dump)(struct sk_buff *, struct meta_value *, int); +}; + +static struct meta_type_ops __meta_type_ops[TCF_META_TYPE_MAX+1] = { + [TCF_META_TYPE_VAR] = { + .destroy = meta_var_destroy, + .compare = meta_var_compare, + .change = meta_var_change, + .apply_extras = meta_var_apply_extras, + .dump = meta_var_dump + }, + [TCF_META_TYPE_INT] = { + .compare = meta_int_compare, + .change = meta_int_change, + .apply_extras = meta_int_apply_extras, + .dump = meta_int_dump + } +}; + +static inline struct meta_type_ops * meta_type_ops(struct meta_value *v) +{ + return &__meta_type_ops[meta_type(v)]; +} + +/************************************************************************** + * Core + **************************************************************************/ + +static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info, + struct meta_value *v, struct meta_obj *dst) +{ + int err = 0; + + if (meta_id(v) == TCF_META_ID_VALUE) { + dst->value = v->val; + dst->len = v->len; + return 0; + } + + meta_ops(v)->get(skb, info, v, dst, &err); + if (err < 0) + return err; + + if (meta_type_ops(v)->apply_extras) + meta_type_ops(v)->apply_extras(v, dst); + + return 0; +} + +static int em_meta_match(struct sk_buff *skb, struct tcf_ematch *m, + struct tcf_pkt_info *info) +{ + int r; + struct meta_match *meta = (struct meta_match *) m->data; + struct meta_obj l_value, r_value; + + if (meta_get(skb, info, &meta->lvalue, &l_value) < 0 || + meta_get(skb, info, &meta->rvalue, &r_value) < 0) + return 0; + + r = meta_type_ops(&meta->lvalue)->compare(&l_value, &r_value); + + switch (meta->lvalue.hdr.op) { + case TCF_EM_OPND_EQ: + return !r; + case TCF_EM_OPND_LT: + return r < 0; + case TCF_EM_OPND_GT: + return r > 0; + } + + return 0; +} + +static inline void meta_delete(struct meta_match *meta) +{ + struct meta_type_ops *ops = meta_type_ops(&meta->lvalue); + + if (ops && ops->destroy) { + ops->destroy(&meta->lvalue); + ops->destroy(&meta->rvalue); + } + + kfree(meta); +} + +static inline int meta_change_data(struct meta_value *dst, struct rtattr *rta) +{ + if (rta) { + if (RTA_PAYLOAD(rta) == 0) + return -EINVAL; + + return meta_type_ops(dst)->change(dst, rta); + } + + return 0; +} + +static inline int meta_is_supported(struct meta_value *val) +{ + return (!meta_id(val) || meta_ops(val)->get); +} + +static int em_meta_change(struct tcf_proto *tp, void *data, int len, + struct tcf_ematch *m) +{ + int err = -EINVAL; + struct rtattr *tb[TCA_EM_META_MAX]; + struct tcf_meta_hdr *hdr; + struct meta_match *meta = NULL; + + if (rtattr_parse(tb, TCA_EM_META_MAX, data, len) < 0) + goto errout; + + if (tb[TCA_EM_META_HDR-1] == NULL || + RTA_PAYLOAD(tb[TCA_EM_META_HDR-1]) < sizeof(*hdr)) + goto errout; + hdr = RTA_DATA(tb[TCA_EM_META_HDR-1]); + + if (TCF_META_TYPE(hdr->left.kind) != TCF_META_TYPE(hdr->right.kind) || + TCF_META_TYPE(hdr->left.kind) > TCF_META_TYPE_MAX || + TCF_META_ID(hdr->left.kind) > TCF_META_ID_MAX || + TCF_META_ID(hdr->right.kind) > TCF_META_ID_MAX) + goto errout; + + meta = kmalloc(sizeof(*meta), GFP_KERNEL); + if (meta == NULL) + goto errout; + memset(meta, 0, sizeof(*meta)); + + memcpy(&meta->lvalue.hdr, &hdr->left, sizeof(hdr->left)); + memcpy(&meta->rvalue.hdr, &hdr->right, sizeof(hdr->right)); + + if (!meta_is_supported(&meta->lvalue) || + !meta_is_supported(&meta->rvalue)) { + err = -EOPNOTSUPP; + goto errout; + } + + if (meta_change_data(&meta->lvalue, tb[TCA_EM_META_LVALUE-1]) < 0 || + meta_change_data(&meta->rvalue, tb[TCA_EM_META_RVALUE-1]) < 0) + goto errout; + + m->datalen = sizeof(*meta); + m->data = (unsigned long) meta; + + err = 0; +errout: + if (err && meta) + meta_delete(meta); + return err; +} + +static void em_meta_destroy(struct tcf_proto *tp, struct tcf_ematch *m) +{ + if (m) + meta_delete((struct meta_match *) m->data); +} + +static int em_meta_dump(struct sk_buff *skb, struct tcf_ematch *em) +{ + struct meta_match *meta = (struct meta_match *) em->data; + struct tcf_meta_hdr hdr; + struct meta_type_ops *ops; + + memset(&hdr, 0, sizeof(hdr)); + memcpy(&hdr.left, &meta->lvalue.hdr, sizeof(hdr.left)); + memcpy(&hdr.right, &meta->rvalue.hdr, sizeof(hdr.right)); + + RTA_PUT(skb, TCA_EM_META_HDR, sizeof(hdr), &hdr); + + ops = meta_type_ops(&meta->lvalue); + if (ops->dump(skb, &meta->lvalue, TCA_EM_META_LVALUE) < 0 || + ops->dump(skb, &meta->rvalue, TCA_EM_META_RVALUE) < 0) + goto rtattr_failure; + + return 0; + +rtattr_failure: + return -1; +} + +static struct tcf_ematch_ops em_meta_ops = { + .kind = TCF_EM_META, + .change = em_meta_change, + .match = em_meta_match, + .destroy = em_meta_destroy, + .dump = em_meta_dump, + .owner = THIS_MODULE, + .link = LIST_HEAD_INIT(em_meta_ops.link) +}; + +static int __init init_em_meta(void) +{ + return tcf_em_register(&em_meta_ops); +} + +static void __exit exit_em_meta(void) +{ + tcf_em_unregister(&em_meta_ops); +} + +MODULE_LICENSE("GPL"); + +module_init(init_em_meta); +module_exit(exit_em_meta); diff -Nru a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/em_nbyte.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,82 @@ +/* + * net/sched/em_nbyte.c N-Byte ematch + * + * 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. + * + * Authors: Thomas Graf + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct nbyte_data +{ + struct tcf_em_nbyte hdr; + char pattern[0]; +}; + +static int em_nbyte_change(struct tcf_proto *tp, void *data, int data_len, + struct tcf_ematch *em) +{ + struct tcf_em_nbyte *nbyte = data; + + if (data_len < sizeof(*nbyte) || + data_len < (sizeof(*nbyte) + nbyte->len)) + return -EINVAL; + + em->datalen = sizeof(*nbyte) + nbyte->len; + em->data = (unsigned long) kmalloc(em->datalen, GFP_KERNEL); + if (em->data == 0UL) + return -ENOBUFS; + + memcpy((void *) em->data, data, em->datalen); + + return 0; +} + +static int em_nbyte_match(struct sk_buff *skb, struct tcf_ematch *em, + struct tcf_pkt_info *info) +{ + struct nbyte_data *nbyte = (struct nbyte_data *) em->data; + unsigned char *ptr = tcf_get_base_ptr(skb, nbyte->hdr.layer); + + ptr += nbyte->hdr.off; + + if (!tcf_valid_offset(skb, ptr, nbyte->hdr.len)) + return 0; + + return !memcmp(ptr + nbyte->hdr.off, nbyte->pattern, nbyte->hdr.len); +} + +static struct tcf_ematch_ops em_nbyte_ops = { + .kind = TCF_EM_NBYTE, + .change = em_nbyte_change, + .match = em_nbyte_match, + .owner = THIS_MODULE, + .link = LIST_HEAD_INIT(em_nbyte_ops.link) +}; + +static int __init init_em_nbyte(void) +{ + return tcf_em_register(&em_nbyte_ops); +} + +static void __exit exit_em_nbyte(void) +{ + tcf_em_unregister(&em_nbyte_ops); +} + +MODULE_LICENSE("GPL"); + +module_init(init_em_nbyte); +module_exit(exit_em_nbyte); diff -Nru a/net/sched/em_u32.c b/net/sched/em_u32.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/em_u32.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,63 @@ +/* + * net/sched/em_u32.c U32 Ematch + * + * 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. + * + * Authors: Thomas Graf + * Alexey Kuznetsov, + * + * Based on net/sched/cls_u32.c + */ + +#include +#include +#include +#include +#include +#include + +static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em, + struct tcf_pkt_info *info) +{ + struct tc_u32_key *key = (struct tc_u32_key *) em->data; + unsigned char *ptr = skb->nh.raw; + + if (info) { + if (info->ptr) + ptr = info->ptr; + ptr += (info->nexthdr & key->offmask); + } + + ptr += key->off; + + if (!tcf_valid_offset(skb, ptr, sizeof(u32))) + return 0; + + return !(((*(u32*) ptr) ^ key->val) & key->mask); +} + +static struct tcf_ematch_ops em_u32_ops = { + .kind = TCF_EM_U32, + .datalen = sizeof(struct tc_u32_key), + .match = em_u32_match, + .owner = THIS_MODULE, + .link = LIST_HEAD_INIT(em_u32_ops.link) +}; + +static int __init init_em_u32(void) +{ + return tcf_em_register(&em_u32_ops); +} + +static void __exit exit_em_u32(void) +{ + tcf_em_unregister(&em_u32_ops); +} + +MODULE_LICENSE("GPL"); + +module_init(init_em_u32); +module_exit(exit_em_u32); diff -Nru a/net/sched/ematch.c b/net/sched/ematch.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/sched/ematch.c 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,524 @@ +/* + * net/sched/ematch.c Extended Match API + * + * 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. + * + * Authors: Thomas Graf + * + * ========================================================================== + * + * An extended match (ematch) is a small classification tool not worth + * writing a full classifier for. Ematches can be interconnected to form + * a logic expression and get attached to classifiers to extend their + * functionatlity. + * + * The userspace part transforms the logic expressions into an array + * consisting of multiple sequences of interconnected ematches separated + * by markers. Precedence is implemented by a special ematch kind + * referencing a sequence beyond the marker of the current sequence + * causing the current position in the sequence to be pushed onto a stack + * to allow the current position to be overwritten by the position referenced + * in the special ematch. Matching continues in the new sequence until a + * marker is reached causing the position to be restored from the stack. + * + * Example: + * A AND (B1 OR B2) AND C AND D + * + * ------->-PUSH------- + * -->-- / -->-- \ -->-- + * / \ / / \ \ / \ + * +-------+-------+-------+-------+-------+--------+ + * | A AND | B AND | C AND | D END | B1 OR | B2 END | + * +-------+-------+-------+-------+-------+--------+ + * \ / + * --------<-POP--------- + * + * where B is a virtual ematch referencing to sequence starting with B1. + * + * ========================================================================== + * + * How to write an ematch in 60 seconds + * ------------------------------------ + * + * 1) Provide a matcher function: + * static int my_match(struct sk_buff *skb, struct tcf_ematch *m, + * struct tcf_pkt_info *info) + * { + * struct mydata *d = (struct mydata *) m->data; + * + * if (...matching goes here...) + * return 1; + * else + * return 0; + * } + * + * 2) Fill out a struct tcf_ematch_ops: + * static struct tcf_ematch_ops my_ops = { + * .kind = unique id, + * .datalen = sizeof(struct mydata), + * .match = my_match, + * .owner = THIS_MODULE, + * }; + * + * 3) Register/Unregister your ematch: + * static int __init init_my_ematch(void) + * { + * return tcf_em_register(&my_ops); + * } + * + * static void __exit exit_my_ematch(void) + * { + * return tcf_em_unregister(&my_ops); + * } + * + * module_init(init_my_ematch); + * module_exit(exit_my_ematch); + * + * 4) By now you should have two more seconds left, barely enough to + * open up a beer to watch the compilation going. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static LIST_HEAD(ematch_ops); +static DEFINE_RWLOCK(ematch_mod_lock); + +static inline struct tcf_ematch_ops * tcf_em_lookup(u16 kind) +{ + struct tcf_ematch_ops *e = NULL; + + read_lock(&ematch_mod_lock); + list_for_each_entry(e, &ematch_ops, link) { + if (kind == e->kind) { + if (!try_module_get(e->owner)) + e = NULL; + read_unlock(&ematch_mod_lock); + return e; + } + } + read_unlock(&ematch_mod_lock); + + return NULL; +} + +/** + * tcf_em_register - register an extended match + * + * @ops: ematch operations lookup table + * + * This function must be called by ematches to announce their presence. + * The given @ops must have kind set to a unique identifier and the + * callback match() must be implemented. All other callbacks are optional + * and a fallback implementation is used instead. + * + * Returns -EEXISTS if an ematch of the same kind has already registered. + */ +int tcf_em_register(struct tcf_ematch_ops *ops) +{ + int err = -EEXIST; + struct tcf_ematch_ops *e; + + if (ops->match == NULL) + return -EINVAL; + + write_lock(&ematch_mod_lock); + list_for_each_entry(e, &ematch_ops, link) + if (ops->kind == e->kind) + goto errout; + + list_add_tail(&ops->link, &ematch_ops); + err = 0; +errout: + write_unlock(&ematch_mod_lock); + return err; +} + +/** + * tcf_em_unregister - unregster and extended match + * + * @ops: ematch operations lookup table + * + * This function must be called by ematches to announce their disappearance + * for examples when the module gets unloaded. The @ops parameter must be + * the same as the one used for registration. + * + * Returns -ENOENT if no matching ematch was found. + */ +int tcf_em_unregister(struct tcf_ematch_ops *ops) +{ + int err = 0; + struct tcf_ematch_ops *e; + + write_lock(&ematch_mod_lock); + list_for_each_entry(e, &ematch_ops, link) { + if (e == ops) { + list_del(&e->link); + goto out; + } + } + + err = -ENOENT; +out: + write_unlock(&ematch_mod_lock); + return err; +} + +static inline struct tcf_ematch * tcf_em_get_match(struct tcf_ematch_tree *tree, + int index) +{ + return &tree->matches[index]; +} + + +static int tcf_em_validate(struct tcf_proto *tp, + struct tcf_ematch_tree_hdr *tree_hdr, + struct tcf_ematch *em, struct rtattr *rta, int idx) +{ + int err = -EINVAL; + struct tcf_ematch_hdr *em_hdr = RTA_DATA(rta); + int data_len = RTA_PAYLOAD(rta) - sizeof(*em_hdr); + void *data = (void *) em_hdr + sizeof(*em_hdr); + + if (!TCF_EM_REL_VALID(em_hdr->flags)) + goto errout; + + if (em_hdr->kind == TCF_EM_CONTAINER) { + /* Special ematch called "container", carries an index + * referencing an external ematch sequence. */ + u32 ref; + + if (data_len < sizeof(ref)) + goto errout; + ref = *(u32 *) data; + + if (ref >= tree_hdr->nmatches) + goto errout; + + /* We do not allow backward jumps to avoid loops and jumps + * to our own position are of course illegal. */ + if (ref <= idx) + goto errout; + + + em->data = ref; + } else { + /* Note: This lookup will increase the module refcnt + * of the ematch module referenced. In case of a failure, + * a destroy function is called by the underlying layer + * which automatically releases the reference again, therefore + * the module MUST not be given back under any circumstances + * here. Be aware, the destroy function assumes that the + * module is held if the ops field is non zero. */ + em->ops = tcf_em_lookup(em_hdr->kind); + + if (em->ops == NULL) { + err = -ENOENT; + goto errout; + } + + /* ematch module provides expected length of data, so we + * can do a basic sanity check. */ + if (em->ops->datalen && data_len < em->ops->datalen) + goto errout; + + if (em->ops->change) { + err = em->ops->change(tp, data, data_len, em); + if (err < 0) + goto errout; + } else if (data_len > 0) { + /* ematch module doesn't provide an own change + * procedure and expects us to allocate and copy + * the ematch data. + * + * TCF_EM_SIMPLE may be specified stating that the + * data only consists of a u32 integer and the module + * does not expected a memory reference but rather + * the value carried. */ + if (em_hdr->flags & TCF_EM_SIMPLE) { + if (data_len < sizeof(u32)) + goto errout; + em->data = *(u32 *) data; + } else { + void *v = kmalloc(data_len, GFP_KERNEL); + if (v == NULL) { + err = -ENOBUFS; + goto errout; + } + memcpy(v, data, data_len); + em->data = (unsigned long) v; + } + } + } + + em->matchid = em_hdr->matchid; + em->flags = em_hdr->flags; + em->datalen = data_len; + + err = 0; +errout: + return err; +} + +/** + * tcf_em_tree_validate - validate ematch config TLV and build ematch tree + * + * @tp: classifier kind handle + * @rta: ematch tree configuration TLV + * @tree: destination ematch tree variable to store the resulting + * ematch tree. + * + * This function validates the given configuration TLV @rta and builds an + * ematch tree in @tree. The resulting tree must later be copied into + * the private classifier data using tcf_em_tree_change(). You MUST NOT + * provide the ematch tree variable of the private classifier data directly, + * the changes would not be locked properly. + * + * Returns a negative error code if the configuration TLV contains errors. + */ +int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta, + struct tcf_ematch_tree *tree) +{ + int idx, list_len, matches_len, err = -EINVAL; + struct rtattr *tb[TCA_EMATCH_TREE_MAX]; + struct rtattr *rt_match, *rt_hdr, *rt_list; + struct tcf_ematch_tree_hdr *tree_hdr; + struct tcf_ematch *em; + + if (rtattr_parse_nested(tb, TCA_EMATCH_TREE_MAX, rta) < 0) + goto errout; + + rt_hdr = tb[TCA_EMATCH_TREE_HDR-1]; + rt_list = tb[TCA_EMATCH_TREE_LIST-1]; + + if (rt_hdr == NULL || rt_list == NULL) + goto errout; + + if (RTA_PAYLOAD(rt_hdr) < sizeof(*tree_hdr) || + RTA_PAYLOAD(rt_list) < sizeof(*rt_match)) + goto errout; + + tree_hdr = RTA_DATA(rt_hdr); + memcpy(&tree->hdr, tree_hdr, sizeof(*tree_hdr)); + + rt_match = RTA_DATA(rt_list); + list_len = RTA_PAYLOAD(rt_list); + matches_len = tree_hdr->nmatches * sizeof(*em); + + tree->matches = kmalloc(matches_len, GFP_KERNEL); + if (tree->matches == NULL) + goto errout; + memset(tree->matches, 0, matches_len); + + /* We do not use rtattr_parse_nested here because the maximum + * number of attributes is unknown. This saves us the allocation + * for a tb buffer which would serve no purpose at all. + * + * The array of rt attributes is parsed in the order as they are + * provided, their type must be incremental from 1 to n. Even + * if it does not serve any real purpose, a failure of sticking + * to this policy will result in parsing failure. */ + for (idx = 0; RTA_OK(rt_match, list_len); idx++) { + err = -EINVAL; + + if (rt_match->rta_type != (idx + 1)) + goto errout_abort; + + if (idx >= tree_hdr->nmatches) + goto errout_abort; + + if (RTA_PAYLOAD(rt_match) < sizeof(struct tcf_ematch_hdr)) + goto errout_abort; + + em = tcf_em_get_match(tree, idx); + + err = tcf_em_validate(tp, tree_hdr, em, rt_match, idx); + if (err < 0) + goto errout_abort; + + rt_match = RTA_NEXT(rt_match, list_len); + } + + /* Check if the number of matches provided by userspace actually + * complies with the array of matches. The number was used for + * the validation of references and a mismatch could lead to + * undefined references during the matching process. */ + if (idx != tree_hdr->nmatches) { + err = -EINVAL; + goto errout_abort; + } + + err = 0; +errout: + return err; + +errout_abort: + tcf_em_tree_destroy(tp, tree); + return err; +} + +/** + * tcf_em_tree_destroy - destroy an ematch tree + * + * @tp: classifier kind handle + * @tree: ematch tree to be deleted + * + * This functions destroys an ematch tree previously created by + * tcf_em_tree_validate()/tcf_em_tree_change(). You must ensure that + * the ematch tree is not in use before calling this function. + */ +void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree) +{ + int i; + + if (tree->matches == NULL) + return; + + for (i = 0; i < tree->hdr.nmatches; i++) { + struct tcf_ematch *em = tcf_em_get_match(tree, i); + + if (em->ops) { + if (em->ops->destroy) + em->ops->destroy(tp, em); + else if (!tcf_em_is_simple(em) && em->data) + kfree((void *) em->data); + module_put(em->ops->owner); + } + } + + tree->hdr.nmatches = 0; + kfree(tree->matches); +} + +/** + * tcf_em_tree_dump - dump ematch tree into a rtnl message + * + * @skb: skb holding the rtnl message + * @t: ematch tree to be dumped + * @tlv: TLV type to be used to encapsulate the tree + * + * This function dumps a ematch tree into a rtnl message. It is valid to + * call this function while the ematch tree is in use. + * + * Returns -1 if the skb tailroom is insufficient. + */ +int tcf_em_tree_dump(struct sk_buff *skb, struct tcf_ematch_tree *tree, int tlv) +{ + int i; + struct rtattr * top_start = (struct rtattr*) skb->tail; + struct rtattr * list_start; + + RTA_PUT(skb, tlv, 0, NULL); + RTA_PUT(skb, TCA_EMATCH_TREE_HDR, sizeof(tree->hdr), &tree->hdr); + + list_start = (struct rtattr *) skb->tail; + RTA_PUT(skb, TCA_EMATCH_TREE_LIST, 0, NULL); + + for (i = 0; i < tree->hdr.nmatches; i++) { + struct rtattr *match_start = (struct rtattr*) skb->tail; + struct tcf_ematch *em = tcf_em_get_match(tree, i); + struct tcf_ematch_hdr em_hdr = { + .kind = em->ops ? em->ops->kind : TCF_EM_CONTAINER, + .matchid = em->matchid, + .flags = em->flags + }; + + RTA_PUT(skb, i+1, sizeof(em_hdr), &em_hdr); + + if (em->ops && em->ops->dump) { + if (em->ops->dump(skb, em) < 0) + goto rtattr_failure; + } else if (tcf_em_is_container(em) || tcf_em_is_simple(em)) { + u32 u = em->data; + RTA_PUT_NOHDR(skb, sizeof(u), &u); + } else if (em->datalen > 0) + RTA_PUT_NOHDR(skb, em->datalen, (void *) em->data); + + match_start->rta_len = skb->tail - (u8*) match_start; + } + + list_start->rta_len = skb->tail - (u8 *) list_start; + top_start->rta_len = skb->tail - (u8 *) top_start; + + return 0; + +rtattr_failure: + return -1; +} + +static inline int tcf_em_match(struct sk_buff *skb, struct tcf_ematch *em, + struct tcf_pkt_info *info) +{ + int r = em->ops->match(skb, em, info); + return tcf_em_is_inverted(em) ? !r : r; +} + +/* Do not use this function directly, use tcf_em_tree_match instead */ +int __tcf_em_tree_match(struct sk_buff *skb, struct tcf_ematch_tree *tree, + struct tcf_pkt_info *info) +{ + int stackp = 0, match_idx = 0, res = 0; + struct tcf_ematch *cur_match; + int stack[CONFIG_NET_EMATCH_STACK]; + +proceed: + while (match_idx < tree->hdr.nmatches) { + cur_match = tcf_em_get_match(tree, match_idx); + + if (tcf_em_is_container(cur_match)) { + if (unlikely(stackp >= CONFIG_NET_EMATCH_STACK)) + goto stack_overflow; + + stack[stackp++] = match_idx; + match_idx = cur_match->data; + goto proceed; + } + + res = tcf_em_match(skb, cur_match, info); + + if (tcf_em_early_end(cur_match, res)) + break; + + match_idx++; + } + +pop_stack: + if (stackp > 0) { + match_idx = stack[--stackp]; + cur_match = tcf_em_get_match(tree, match_idx); + + if (tcf_em_early_end(cur_match, res)) + goto pop_stack; + else { + match_idx++; + goto proceed; + } + } + + return res; + +stack_overflow: + if (net_ratelimit()) + printk("Local stack overflow, increase NET_EMATCH_STACK\n"); + return -1; +} + +EXPORT_SYMBOL(tcf_em_register); +EXPORT_SYMBOL(tcf_em_unregister); +EXPORT_SYMBOL(tcf_em_tree_validate); +EXPORT_SYMBOL(tcf_em_tree_destroy); +EXPORT_SYMBOL(tcf_em_tree_dump); +EXPORT_SYMBOL(__tcf_em_tree_match); diff -Nru a/net/sched/sch_atm.c b/net/sched/sch_atm.c --- a/net/sched/sch_atm.c 2005-03-07 14:54:17 -08:00 +++ b/net/sched/sch_atm.c 2005-03-07 14:54:17 -08:00 @@ -519,7 +519,7 @@ memcpy(skb_push(skb,flow->hdr_len),flow->hdr, flow->hdr_len); atomic_add(skb->truesize, - &flow->vcc->sk->sk_wmem_alloc); + &sk_atm(flow->vcc)->sk_wmem_alloc); /* atm.atm_options are already set by atm_tc_enqueue */ (void) flow->vcc->send(flow->vcc,skb); } diff -Nru a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c --- a/net/sunrpc/auth_gss/svcauth_gss.c 2005-03-07 14:54:17 -08:00 +++ b/net/sunrpc/auth_gss/svcauth_gss.c 2005-03-07 14:54:17 -08:00 @@ -730,6 +730,19 @@ struct rsc *rsci; }; +static int +svcauth_gss_set_client(struct svc_rqst *rqstp) +{ + struct gss_svc_data *svcdata = rqstp->rq_auth_data; + struct rsc *rsci = svcdata->rsci; + struct rpc_gss_wire_cred *gc = &svcdata->clcred; + + rqstp->rq_client = find_gss_auth_domain(rsci->mechctx, gc->gc_svc); + if (rqstp->rq_client == NULL) + return SVC_DENIED; + return SVC_OK; +} + /* * Accept an rpcsec packet. * If context establishment, punt to user space @@ -893,11 +906,6 @@ svc_putu32(resv, rpc_success); goto complete; case RPC_GSS_PROC_DATA: - *authp = rpc_autherr_badcred; - rqstp->rq_client = - find_gss_auth_domain(rsci->mechctx, gc->gc_svc); - if (rqstp->rq_client == NULL) - goto auth_err; *authp = rpcsec_gsserr_ctxproblem; if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) goto auth_err; @@ -911,8 +919,6 @@ if (unwrap_integ_data(&rqstp->rq_arg, gc->gc_seq, rsci->mechctx)) goto auth_err; - svcdata->rsci = rsci; - cache_get(&rsci->h); /* placeholders for length and seq. number: */ svcdata->body_start = resv->iov_base + resv->iov_len; svc_putu32(resv, 0); @@ -923,6 +929,8 @@ default: goto auth_err; } + svcdata->rsci = rsci; + cache_get(&rsci->h); ret = SVC_OK; goto out; } @@ -1052,6 +1060,7 @@ .accept = svcauth_gss_accept, .release = svcauth_gss_release, .domain_release = svcauth_gss_domain_release, + .set_client = svcauth_gss_set_client, }; int diff -Nru a/net/sunrpc/cache.c b/net/sunrpc/cache.c --- a/net/sunrpc/cache.c 2005-03-07 14:54:17 -08:00 +++ b/net/sunrpc/cache.c 2005-03-07 14:54:17 -08:00 @@ -321,12 +321,10 @@ if (test_and_clear_bit(CACHE_PENDING, &ch->flags)) queue_loose(current_detail, ch); - if (!atomic_read(&ch->refcnt)) + if (atomic_read(&ch->refcnt) == 1) break; } if (ch) { - cache_get(ch); - clear_bit(CACHE_HASHED, &ch->flags); *cp = ch->next; ch->next = NULL; current_detail->entries--; diff -Nru a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c --- a/net/sunrpc/sunrpc_syms.c 2005-03-07 14:54:18 -08:00 +++ b/net/sunrpc/sunrpc_syms.c 2005-03-07 14:54:18 -08:00 @@ -90,6 +90,7 @@ EXPORT_SYMBOL(svc_auth_register); EXPORT_SYMBOL(auth_domain_lookup); EXPORT_SYMBOL(svc_authenticate); +EXPORT_SYMBOL(svc_set_client); /* RPC statistics */ #ifdef CONFIG_PROC_FS diff -Nru a/net/sunrpc/svc.c b/net/sunrpc/svc.c --- a/net/sunrpc/svc.c 2005-03-07 14:54:18 -08:00 +++ b/net/sunrpc/svc.c 2005-03-07 14:54:18 -08:00 @@ -264,6 +264,7 @@ u32 dir, prog, vers, proc, auth_stat, rpc_stat; int auth_res; + u32 *accept_statp; rpc_stat = rpc_success; @@ -299,6 +300,9 @@ if (vers != 2) /* RPC version number */ goto err_bad_rpc; + /* Save position in case we later decide to reject: */ + accept_statp = resv->iov_base + resv->iov_len; + svc_putu32(resv, xdr_zero); /* ACCEPT */ rqstp->rq_prog = prog = ntohl(svc_getu32(argv)); /* program number */ @@ -311,10 +315,12 @@ * We do this before anything else in order to get a decent * auth verifier. */ - if (progp->pg_authenticate != NULL) - auth_res = progp->pg_authenticate(rqstp, &auth_stat); - else - auth_res = svc_authenticate(rqstp, &auth_stat); + auth_res = svc_authenticate(rqstp, &auth_stat); + /* Also give the program a chance to reject this call: */ + if (auth_res == SVC_OK) { + auth_stat = rpc_autherr_badcred; + auth_res = progp->pg_authenticate(rqstp); + } switch (auth_res) { case SVC_OK: break; @@ -437,7 +443,8 @@ err_bad_auth: dprintk("svc: authentication failed (%d)\n", ntohl(auth_stat)); serv->sv_stats->rpcbadauth++; - resv->iov_len -= 4; + /* Restore write pointer to location of accept status: */ + xdr_ressize_check(rqstp, accept_statp); svc_putu32(resv, xdr_one); /* REJECT */ svc_putu32(resv, xdr_one); /* AUTH_ERROR */ svc_putu32(resv, auth_stat); /* status */ diff -Nru a/net/sunrpc/svcauth.c b/net/sunrpc/svcauth.c --- a/net/sunrpc/svcauth.c 2005-03-07 14:54:17 -08:00 +++ b/net/sunrpc/svcauth.c 2005-03-07 14:54:17 -08:00 @@ -59,6 +59,11 @@ return aops->accept(rqstp, authp); } +int svc_set_client(struct svc_rqst *rqstp) +{ + return rqstp->rq_authop->set_client(rqstp); +} + /* A request, which was authenticated, has now executed. * Time to finalise the the credentials and verifier * and release and resources @@ -173,12 +178,12 @@ tmp = container_of(*hp, struct auth_domain, h); if (!auth_domain_match(tmp, item)) continue; - cache_get(&tmp->h); - if (!set) + if (!set) { + cache_get(&tmp->h); goto out_noset; + } *hp = tmp->h.next; tmp->h.next = NULL; - clear_bit(CACHE_HASHED, &tmp->h.flags); auth_domain_drop(&tmp->h, &auth_domain_cache); goto out_set; } @@ -187,9 +192,9 @@ goto out_nada; auth_domain_cache.entries++; out_set: - set_bit(CACHE_HASHED, &item->h.flags); item->h.next = *head; *head = &item->h; + cache_get(&item->h); write_unlock(&auth_domain_cache.hash_lock); cache_fresh(&auth_domain_cache, &item->h, item->h.expiry_time); cache_get(&item->h); diff -Nru a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c --- a/net/sunrpc/svcauth_unix.c 2005-03-07 14:54:17 -08:00 +++ b/net/sunrpc/svcauth_unix.c 2005-03-07 14:54:17 -08:00 @@ -368,7 +368,6 @@ struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *resv = &rqstp->rq_res.head[0]; struct svc_cred *cred = &rqstp->rq_cred; - int rv=0; cred->cr_group_info = NULL; rqstp->rq_client = NULL; @@ -394,19 +393,11 @@ if (cred->cr_group_info == NULL) return SVC_DROP; /* kmalloc failure - client must retry */ - rv = svcauth_unix_set_client(rqstp); - if (rv == SVC_DENIED) - goto badcred; - /* Put NULL verifier */ svc_putu32(resv, RPC_AUTH_NULL); svc_putu32(resv, 0); - return rv; - -badcred: - *authp = rpc_autherr_badcred; - return SVC_DENIED; + return SVC_OK; } static int @@ -429,6 +420,7 @@ .flavour = RPC_AUTH_NULL, .accept = svcauth_null_accept, .release = svcauth_null_release, + .set_client = svcauth_unix_set_client, }; @@ -440,7 +432,6 @@ struct svc_cred *cred = &rqstp->rq_cred; u32 slen, i; int len = argv->iov_len; - int rv=0; cred->cr_group_info = NULL; rqstp->rq_client = NULL; @@ -472,15 +463,11 @@ return SVC_DENIED; } - rv = svcauth_unix_set_client(rqstp); - if (rv == SVC_DENIED) - goto badcred; - /* Put NULL verifier */ svc_putu32(resv, RPC_AUTH_NULL); svc_putu32(resv, 0); - return rv; + return SVC_OK; badcred: *authp = rpc_autherr_badcred; @@ -510,5 +497,6 @@ .accept = svcauth_unix_accept, .release = svcauth_unix_release, .domain_release = svcauth_unix_domain_release, + .set_client = svcauth_unix_set_client, }; diff -Nru a/net/x25/af_x25.c b/net/x25/af_x25.c --- a/net/x25/af_x25.c 2005-03-07 14:54:18 -08:00 +++ b/net/x25/af_x25.c 2005-03-07 14:54:18 -08:00 @@ -444,33 +444,23 @@ static struct sock *x25_alloc_socket(void) { - struct x25_opt *x25; - struct sock *sk = sk_alloc(AF_X25, GFP_ATOMIC, 1, NULL); + struct x25_sock *x25; + struct sock *sk = sk_alloc(AF_X25, GFP_ATOMIC, + sizeof(struct x25_sock), NULL); if (!sk) goto out; - x25 = sk->sk_protinfo = kmalloc(sizeof(*x25), GFP_ATOMIC); - if (!x25) - goto frees; - - memset(x25, 0, sizeof(*x25)); - - x25->sk = sk; - sock_init_data(NULL, sk); sk_set_owner(sk, THIS_MODULE); + x25 = x25_sk(sk); skb_queue_head_init(&x25->ack_queue); skb_queue_head_init(&x25->fragment_queue); skb_queue_head_init(&x25->interrupt_in_queue); skb_queue_head_init(&x25->interrupt_out_queue); out: return sk; -frees: - sk_free(sk); - sk = NULL; - goto out; } void x25_init_timers(struct sock *sk); @@ -478,7 +468,7 @@ static int x25_create(struct socket *sock, int protocol) { struct sock *sk; - struct x25_opt *x25; + struct x25_sock *x25; int rc = -ESOCKTNOSUPPORT; if (sock->type != SOCK_SEQPACKET || protocol) @@ -519,7 +509,7 @@ static struct sock *x25_make_new(struct sock *osk) { struct sock *sk = NULL; - struct x25_opt *x25, *ox25; + struct x25_sock *x25, *ox25; if (osk->sk_type != SOCK_SEQPACKET) goto out; @@ -557,7 +547,7 @@ static int x25_release(struct socket *sock) { struct sock *sk = sock->sk; - struct x25_opt *x25; + struct x25_sock *x25; if (!sk) goto out; @@ -644,7 +634,7 @@ int addr_len, int flags) { struct sock *sk = sock->sk; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); struct sockaddr_x25 *addr = (struct sockaddr_x25 *)uaddr; struct x25_route *rt; int rc = 0; @@ -802,7 +792,7 @@ { struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)uaddr; struct sock *sk = sock->sk; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (peer) { if (sk->sk_state != TCP_ESTABLISHED) @@ -822,7 +812,7 @@ { struct sock *sk; struct sock *make; - struct x25_opt *makex25; + struct x25_sock *makex25; struct x25_address source_addr, dest_addr; struct x25_facilities facilities; struct x25_calluserdata calluserdata; @@ -935,7 +925,7 @@ struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); struct sockaddr_x25 *usx25 = (struct sockaddr_x25 *)msg->msg_name; struct sockaddr_x25 sx25; struct sk_buff *skb; @@ -1112,7 +1102,7 @@ int flags) { struct sock *sk = sock->sk; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; size_t copied; int qbit; @@ -1201,7 +1191,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); void __user *argp = (void __user *)arg; int rc; diff -Nru a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c --- a/net/x25/x25_facilities.c 2005-03-07 14:54:17 -08:00 +++ b/net/x25/x25_facilities.c 2005-03-07 14:54:17 -08:00 @@ -158,7 +158,7 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); struct x25_facilities *ours = &x25->facilities; struct x25_facilities theirs; int len; diff -Nru a/net/x25/x25_in.c b/net/x25/x25_in.c --- a/net/x25/x25_in.c 2005-03-07 14:54:18 -08:00 +++ b/net/x25/x25_in.c 2005-03-07 14:54:18 -08:00 @@ -34,7 +34,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) { struct sk_buff *skbo, *skbn = skb; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (more) { x25->fraglen += skb->len; @@ -89,7 +89,7 @@ switch (frametype) { case X25_CALL_ACCEPTED: { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); x25_stop_timer(sk); x25->condition = 0x00; @@ -165,7 +165,7 @@ { int queued = 0; int modulus; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); modulus = (x25->neighbour->extended) ? X25_EMODULUS : X25_SMODULUS; @@ -295,7 +295,7 @@ case X25_RESET_REQUEST: x25_write_internal(sk, X25_RESET_CONFIRMATION); case X25_RESET_CONFIRMATION: { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); x25_stop_timer(sk); x25->condition = 0x00; @@ -322,7 +322,7 @@ /* Higher level upcall for a LAPB frame */ int x25_process_rx_frame(struct sock *sk, struct sk_buff *skb) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); int queued = 0, frametype, ns, nr, q, d, m; if (x25->state == X25_STATE_0) diff -Nru a/net/x25/x25_out.c b/net/x25/x25_out.c --- a/net/x25/x25_out.c 2005-03-07 14:54:16 -08:00 +++ b/net/x25/x25_out.c 2005-03-07 14:54:16 -08:00 @@ -54,7 +54,7 @@ unsigned char header[X25_EXT_MIN_LEN]; int err, frontlen, len; int sent=0, noblock = X25_SKB_CB(skb)->flags & MSG_DONTWAIT; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); int header_len = x25->neighbour->extended ? X25_EXT_MIN_LEN : X25_STD_MIN_LEN; int max_len = x25_pacsize_to_bytes(x25->facilities.pacsize_out); @@ -116,7 +116,7 @@ */ static void x25_send_iframe(struct sock *sk, struct sk_buff *skb) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (!skb) return; @@ -139,7 +139,7 @@ struct sk_buff *skb, *skbn; unsigned short start, end; int modulus; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (x25->state != X25_STATE_3) return; @@ -212,7 +212,7 @@ void x25_enquiry_response(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (x25->condition & X25_COND_OWN_RX_BUSY) x25_write_internal(sk, X25_RNR); diff -Nru a/net/x25/x25_proc.c b/net/x25/x25_proc.c --- a/net/x25/x25_proc.c 2005-03-07 14:54:16 -08:00 +++ b/net/x25/x25_proc.c 2005-03-07 14:54:16 -08:00 @@ -134,7 +134,7 @@ static int x25_seq_socket_show(struct seq_file *seq, void *v) { struct sock *s; - struct x25_opt *x25; + struct x25_sock *x25; struct net_device *dev; const char *devname; diff -Nru a/net/x25/x25_subr.c b/net/x25/x25_subr.c --- a/net/x25/x25_subr.c 2005-03-07 14:54:16 -08:00 +++ b/net/x25/x25_subr.c 2005-03-07 14:54:16 -08:00 @@ -33,7 +33,7 @@ */ void x25_clear_queues(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); skb_queue_purge(&sk->sk_write_queue); skb_queue_purge(&x25->ack_queue); @@ -51,7 +51,7 @@ void x25_frames_acked(struct sock *sk, unsigned short nr) { struct sk_buff *skb; - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); int modulus = x25->neighbour->extended ? X25_EMODULUS : X25_SMODULUS; /* @@ -89,7 +89,7 @@ */ int x25_validate_nr(struct sock *sk, unsigned short nr) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); unsigned short vc = x25->va; int modulus = x25->neighbour->extended ? X25_EMODULUS : X25_SMODULUS; @@ -108,7 +108,7 @@ */ void x25_write_internal(struct sock *sk, int frametype) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); struct sk_buff *skb; unsigned char *dptr; unsigned char facilities[X25_MAX_FAC_LEN]; @@ -248,7 +248,7 @@ int x25_decode(struct sock *sk, struct sk_buff *skb, int *ns, int *nr, int *q, int *d, int *m) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); unsigned char *frame = skb->data; *ns = *nr = *q = *d = *m = 0; @@ -315,7 +315,7 @@ void x25_disconnect(struct sock *sk, int reason, unsigned char cause, unsigned char diagnostic) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); x25_clear_queues(sk); x25_stop_timer(sk); @@ -342,7 +342,7 @@ */ void x25_check_rbuf(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf / 2) && (x25->condition & X25_COND_OWN_RX_BUSY)) { diff -Nru a/net/x25/x25_timer.c b/net/x25/x25_timer.c --- a/net/x25/x25_timer.c 2005-03-07 14:54:16 -08:00 +++ b/net/x25/x25_timer.c 2005-03-07 14:54:16 -08:00 @@ -31,7 +31,7 @@ void x25_init_timers(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); init_timer(&x25->timer); x25->timer.data = (unsigned long)sk; @@ -54,28 +54,28 @@ void x25_start_t2timer(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); mod_timer(&x25->timer, jiffies + x25->t2); } void x25_start_t21timer(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); mod_timer(&x25->timer, jiffies + x25->t21); } void x25_start_t22timer(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); mod_timer(&x25->timer, jiffies + x25->t22); } void x25_start_t23timer(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); mod_timer(&x25->timer, jiffies + x25->t23); } @@ -87,7 +87,7 @@ unsigned long x25_display_timer(struct sock *sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); if (!timer_pending(&x25->timer)) return 0; @@ -138,7 +138,7 @@ */ static inline void x25_do_timer_expiry(struct sock * sk) { - struct x25_opt *x25 = x25_sk(sk); + struct x25_sock *x25 = x25_sk(sk); switch (x25->state) { diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c --- a/net/xfrm/xfrm_policy.c 2005-03-07 14:54:17 -08:00 +++ b/net/xfrm/xfrm_policy.c 2005-03-07 14:54:17 -08:00 @@ -1021,22 +1021,15 @@ static int stale_bundle(struct dst_entry *dst) { - struct dst_entry *child = dst; - - while (child) { - if (child->obsolete > 0 || - (child->dev && !netif_running(child->dev)) || - (child->xfrm && child->xfrm->km.state != XFRM_STATE_VALID)) { - return 1; - } - child = child->child; - } - - return 0; + return !xfrm_bundle_ok((struct xfrm_dst *)dst, NULL, AF_UNSPEC); } static void xfrm_dst_destroy(struct dst_entry *dst) { + struct xfrm_dst *xdst = (struct xfrm_dst *)dst; + + dst_release(xdst->route); + if (!dst->xfrm) return; xfrm_state_put(dst->xfrm); @@ -1120,6 +1113,94 @@ xfrm_prune_bundles(stale_bundle); return 0; } + +void xfrm_init_pmtu(struct dst_entry *dst) +{ + do { + struct xfrm_dst *xdst = (struct xfrm_dst *)dst; + u32 pmtu, route_mtu_cached; + + pmtu = dst_pmtu(dst->child); + xdst->child_mtu_cached = pmtu; + + pmtu = xfrm_state_mtu(dst->xfrm, pmtu); + + route_mtu_cached = dst_pmtu(xdst->route); + xdst->route_mtu_cached = route_mtu_cached; + + if (pmtu > route_mtu_cached) + pmtu = route_mtu_cached; + + dst->metrics[RTAX_MTU-1] = pmtu; + } while ((dst = dst->next)); +} + +EXPORT_SYMBOL(xfrm_init_pmtu); + +/* Check that the bundle accepts the flow and its components are + * still valid. + */ + +int xfrm_bundle_ok(struct xfrm_dst *first, struct flowi *fl, int family) +{ + struct dst_entry *dst = &first->u.dst; + struct xfrm_dst *last; + u32 mtu; + + if (!dst_check(dst->path, 0) || + (dst->dev && !netif_running(dst->dev))) + return 0; + + last = NULL; + + do { + struct xfrm_dst *xdst = (struct xfrm_dst *)dst; + + if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family)) + return 0; + if (dst->xfrm->km.state != XFRM_STATE_VALID) + return 0; + + mtu = dst_pmtu(dst->child); + if (xdst->child_mtu_cached != mtu) { + last = xdst; + xdst->child_mtu_cached = mtu; + } + + if (!dst_check(xdst->route, 0)) + return 0; + mtu = dst_pmtu(xdst->route); + if (xdst->route_mtu_cached != mtu) { + last = xdst; + xdst->route_mtu_cached = mtu; + } + + dst = dst->child; + } while (dst->xfrm); + + if (likely(!last)) + return 1; + + mtu = last->child_mtu_cached; + for (;;) { + dst = &last->u.dst; + + mtu = xfrm_state_mtu(dst->xfrm, mtu); + if (mtu > last->route_mtu_cached) + mtu = last->route_mtu_cached; + dst->metrics[RTAX_MTU-1] = mtu; + + if (last == first) + break; + + last = last->u.next; + last->child_mtu_cached = mtu; + } + + return 1; +} + +EXPORT_SYMBOL(xfrm_bundle_ok); /* Well... that's _TASK_. We need to scan through transformation * list and figure out what mss tcp should generate in order to diff -Nru a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c --- a/net/xfrm/xfrm_state.c 2005-03-07 14:54:17 -08:00 +++ b/net/xfrm/xfrm_state.c 2005-03-07 14:54:17 -08:00 @@ -966,6 +966,36 @@ } EXPORT_SYMBOL(xfrm_state_delete_tunnel); +int xfrm_state_mtu(struct xfrm_state *x, int mtu) +{ + int res = mtu; + + res -= x->props.header_len; + + for (;;) { + int m = res; + + if (m < 68) + return 68; + + spin_lock_bh(&x->lock); + if (x->km.state == XFRM_STATE_VALID && + x->type && x->type->get_max_size) + m = x->type->get_max_size(x, m); + else + m += x->props.header_len; + spin_unlock_bh(&x->lock); + + if (m <= mtu) + break; + res -= (m - mtu); + } + + return res; +} + +EXPORT_SYMBOL(xfrm_state_mtu); + void __init xfrm_state_init(void) { int i; diff -Nru a/sound/oss/dmasound/dac3550a.c b/sound/oss/dmasound/dac3550a.c --- a/sound/oss/dmasound/dac3550a.c 2005-03-07 14:54:16 -08:00 +++ b/sound/oss/dmasound/dac3550a.c 2005-03-07 14:54:16 -08:00 @@ -40,9 +40,6 @@ static int daca_detect_client(struct i2c_adapter *adapter, int address); static int daca_detach_client(struct i2c_client *client); -/* Unique ID allocation */ -static int daca_id; - struct i2c_driver daca_driver = { .owner = THIS_MODULE, .name = "DAC3550A driver V " DACA_VERSION, @@ -176,7 +173,6 @@ new_client->driver = &daca_driver; new_client->flags = 0; strcpy(new_client->name, client_name); - new_client->id = daca_id++; /* racy... */ if (daca_init_client(new_client)) goto bail; diff -Nru a/sound/parisc/Kconfig b/sound/parisc/Kconfig --- a/sound/parisc/Kconfig 2005-03-07 14:54:17 -08:00 +++ b/sound/parisc/Kconfig 2005-03-07 14:54:17 -08:00 @@ -1,6 +1,6 @@ # ALSA PA-RISC drivers -menu "ALSA GSC devices" +menu "GSC devices" depends on SND!=n && GSC config SND_HARMONY diff -Nru a/sound/parisc/harmony.c b/sound/parisc/harmony.c --- a/sound/parisc/harmony.c 2005-03-07 14:54:17 -08:00 +++ b/sound/parisc/harmony.c 2005-03-07 14:54:17 -08:00 @@ -1,264 +1,88 @@ -/* - * Harmony chipset driver +/* Hewlett-Packard Harmony audio driver * - * This is a sound driver for ASP's and Lasi's Harmony sound chip - * and is unlikely to be used for anything other than on a HP PA-RISC. + * This is a driver for the Harmony audio chipset found + * on the LASI ASIC of various early HP PA-RISC workstations. * - * Harmony is found in HP 712s, 715/new and many other GSC based machines. - * On older 715 machines you'll find the technically identical chip - * called 'Vivace'. Both Harmony and Vivace are supported by this driver. + * Copyright (C) 2004, Kyle McMartin * - * this ALSA driver is based on OSS driver by: - * Copyright 2000 (c) Linuxcare Canada, Alex deVries - * Copyright 2000-2002 (c) Helge Deller - * Copyright 2001 (c) Matthieu Delahaye + * Based on the previous Harmony incarnations by, + * Copyright 2000 (c) Linuxcare Canada, Alex deVries + * Copyright 2000-2003 (c) Helge Deller + * Copyright 2001 (c) Matthieu Delahaye + * Copyright 2001 (c) Jean-Christophe Vaugeois + * Copyright 2003 (c) Laurent Canet + * Copyright 2004 (c) Stuart Brady * - * TODO: - * - use generic DMA interface and ioremap()/iounmap() - * - capture is still untested (and probaby non-working) - * - spin locks - * - implement non-consistent DMA pages - * - implement gain meter - * - module parameters - * - correct cleaning sequence - * - better error checking - * - try to have a better quality. - * - */ - -/* - * Harmony chipset 'modus operandi'. - * - This chipset is found in some HP 32bit workstations, like 712, or B132 class. - * most of controls are done through registers. Register are found at a fixed offset - * from the hard physical adress, given in struct dev by register_parisc_driver. + * 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. * - * Playback and recording use 4kb pages (dma or not, depending on the machine). + * 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. * - * Most of PCM playback & capture is done through interrupt. When harmony needs - * a new buffer to put recorded data or read played PCM, it sends an interrupt. - * Bits 2 and 10 of DSTATUS register are '1' when harmony needs respectively - * a new page for recording and playing. - * Interrupt are disabled/enabled by writing to bit 32 of DSTATUS. - * Adresses of next page to be played is put in PNXTADD register, next page - * to be recorded is put in RNXTADD. There is 2 read-only registers, PCURADD and - * RCURADD that provides adress of current page. - * - * Harmony has no way to control full duplex or half duplex mode. It means - * that we always need to provide adresses of playback and capture data, even - * when this is not needed. That's why we statically alloc one graveyard - * buffer (to put recorded data in play-only mode) and a silence buffer. - * - * Bitrate, number of channels and data format are controlled with - * the CNTL register. + * 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. * - * Mixer work is done through one register (GAINCTL). Only input gain, - * output attenuation and general attenuation control is provided. There is - * also controls for enabling/disabling internal speaker and line - * input. + * Notes: + * - graveyard and silence buffers last for lifetime of + * the driver. playback and capture buffers are allocated + * per _open()/_close(). + * + * TODO: * - * Buffers used by this driver are all DMA consistent. */ -#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 -MODULE_AUTHOR("Laurent Canet "); -MODULE_DESCRIPTION("ALSA Harmony sound driver"); -MODULE_LICENSE("GPL"); -MODULE_SUPPORTED_DEVICE("{{ALSA,Harmony soundcard}}"); - -#undef DEBUG -#ifdef DEBUG -# define DPRINTK printk -#else -# define DPRINTK(x,...) -#endif - -#define PFX "harmony: " - -#define MAX_PCM_DEVICES 1 -#define MAX_PCM_SUBSTREAMS 4 -#define MAX_MIDI_DEVICES 0 - -#define HARMONY_BUF_SIZE 4096 -#define MAX_BUFS 10 -#define MAX_BUFFER_SIZE (MAX_BUFS * HARMONY_BUF_SIZE) - -/* number of silence & graveyard buffers */ -#define GRAVEYARD_BUFS 3 -#define SILENCE_BUFS 3 - -#define HARMONY_CNTL_C 0x80000000 - -#define HARMONY_DSTATUS_PN 0x00000200 -#define HARMONY_DSTATUS_RN 0x00000002 -#define HARMONY_DSTATUS_IE 0x80000000 - -#define HARMONY_DF_16BIT_LINEAR 0x00000000 -#define HARMONY_DF_8BIT_ULAW 0x00000001 -#define HARMONY_DF_8BIT_ALAW 0x00000002 - -#define HARMONY_SS_MONO 0x00000000 -#define HARMONY_SS_STEREO 0x00000001 - -/* - * Channels Mask in mixer register - * try some "reasonable" default gain values - */ - -#define HARMONY_GAIN_TOTAL_SILENCE 0x00F00FFF - -/* the following should be enough (mixer is - * very sensible on harmony) - */ -#define HARMONY_GAIN_DEFAULT 0x0F2FF082 - - -/* useless since only one card is supported ATM */ -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; - -module_param_array(index, int, NULL, 0444); -MODULE_PARM_DESC(index, "Index value for Harmony device."); -module_param_array(id, charp, NULL, 0444); -MODULE_PARM_DESC(id, "ID string for Harmony device."); -module_param_array(enable, bool, NULL, 0444); -MODULE_PARM_DESC(enable, "Enable Harmony device."); - -/* Register offset (from base hpa) */ -#define REG_ID 0x00 -#define REG_RESET 0x04 -#define REG_CNTL 0x08 -#define REG_GAINCTL 0x0C -#define REG_PNXTADD 0x10 -#define REG_PCURADD 0x14 -#define REG_RNXTADD 0x18 -#define REG_RCURADD 0x1C -#define REG_DSTATUS 0x20 -#define REG_OV 0x24 -#define REG_PIO 0x28 -#define REG_DIAG 0x3C - -/* - * main harmony structure - */ - -typedef struct snd_card_harmony { - - /* spinlocks (To be done) */ - spinlock_t mixer_lock; - spinlock_t control_lock; - - /* parameters */ - int irq; - unsigned long hpa; - int id; - int rev; - - u32 current_gain; - int data_format; /* HARMONY_DF_xx_BIT_xxx */ - int sample_rate; /* HARMONY_SR_xx_KHZ */ - int stereo_select; /* HARMONY_SS_MONO or HARMONY_SS_STEREO */ - int format_initialized; - - unsigned long ply_buffer; - int ply_buf; - int ply_count; - int ply_size; - int ply_stopped; - int ply_total; - - unsigned long cap_buffer; - int cap_buf; - int cap_count; - int cap_size; - int cap_stopped; - int cap_total; - - struct parisc_device *pa_dev; - - struct snd_dma_device dma_dev; - - /* the graveyard buffer is used as recording buffer when playback, - * because harmony always want a buffer to put recorded data */ - struct snd_dma_buffer graveyard_dma; - int graveyard_count; - - /* same thing for silence buffer */ - struct snd_dma_buffer silence_dma; - int silence_count; - - /* alsa stuff */ - snd_card_t *card; - snd_pcm_t *pcm; - snd_pcm_substream_t *playback_substream; - snd_pcm_substream_t *capture_substream; - snd_info_entry_t *proc_entry; -} snd_card_harmony_t; +#include "harmony.h" -static snd_card_t *snd_harmony_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; +static struct parisc_device_id snd_harmony_devtable[] = { + /* bushmaster / flounder */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007A }, + /* 712 / 715 */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007B }, + /* pace */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007E }, + /* outfield / coral II */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007F }, + { 0, } +}; -/* wait to be out of control mode */ -static inline void snd_harmony_wait_cntl(snd_card_harmony_t *harmony) -{ - int timeout = 5000; +MODULE_DEVICE_TABLE(parisc, snd_harmony_devtable); - while ( (gsc_readl(harmony->hpa+REG_CNTL) & HARMONY_CNTL_C) && --timeout) - { - /* Wait */ ; - } - if (timeout == 0) DPRINTK(KERN_DEBUG PFX "Error: wait cntl timeouted\n"); -} +#define NAME "harmony" +#define PFX NAME ": " - -/* - * sample rate routines - */ -static unsigned int snd_card_harmony_rates[] = { - 5125, 6615, 8000, 9600, +static unsigned int snd_harmony_rates[] = { + 5512, 6615, 8000, 9600, 11025, 16000, 18900, 22050, 27428, 32000, 33075, 37800, 44100, 48000 }; -static snd_pcm_hw_constraint_list_t hw_constraint_rates = { - .count = ARRAY_SIZE(snd_card_harmony_rates), - .list = snd_card_harmony_rates, - .mask = 0, -}; - -#define HARMONY_SR_8KHZ 0x08 -#define HARMONY_SR_16KHZ 0x09 -#define HARMONY_SR_27KHZ 0x0A -#define HARMONY_SR_32KHZ 0x0B -#define HARMONY_SR_48KHZ 0x0E -#define HARMONY_SR_9KHZ 0x0F -#define HARMONY_SR_5KHZ 0x10 -#define HARMONY_SR_11KHZ 0x11 -#define HARMONY_SR_18KHZ 0x12 -#define HARMONY_SR_22KHZ 0x13 -#define HARMONY_SR_37KHZ 0x14 -#define HARMONY_SR_44KHZ 0x15 -#define HARMONY_SR_33KHZ 0x16 -#define HARMONY_SR_6KHZ 0x17 - -/* bits corresponding to the entries of snd_card_harmony_rates */ static unsigned int rate_bits[14] = { HARMONY_SR_5KHZ, HARMONY_SR_6KHZ, HARMONY_SR_8KHZ, HARMONY_SR_9KHZ, HARMONY_SR_11KHZ, HARMONY_SR_16KHZ, @@ -267,642 +91,624 @@ HARMONY_SR_44KHZ, HARMONY_SR_48KHZ }; -/* snd_card_harmony_rate_bits - * @rate: index of current data rate in list - * returns: harmony hex code for registers - */ -static unsigned int snd_card_harmony_rate_bits(int rate) +static snd_pcm_hw_constraint_list_t hw_constraint_rates = { + .count = ARRAY_SIZE(snd_harmony_rates), + .list = snd_harmony_rates, + .mask = 0, +}; + +inline unsigned long +harmony_read(harmony_t *h, unsigned r) { - unsigned int 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 */ + return __raw_readl(h->iobase + r); } -/* - * update controls (data format, sample rate, number of channels) - * according to value supplied in data structure - */ -void snd_harmony_update_control(snd_card_harmony_t *harmony) +inline void +harmony_write(harmony_t *h, unsigned r, unsigned long v) { - u32 default_cntl; - - /* Set CNTL */ - default_cntl = (HARMONY_CNTL_C | /* The C bit */ - (harmony->data_format << 6) | /* Set the data format */ - (harmony->stereo_select << 5) | /* Stereo select */ - (harmony->sample_rate)); /* Set sample rate */ - - /* initialize CNTL */ - snd_harmony_wait_cntl(harmony); - - gsc_writel(default_cntl, harmony->hpa+REG_CNTL); - + __raw_writel(v, h->iobase + r); } -/* - * interruption controls routines - */ +static void +harmony_wait_for_control(harmony_t *h) +{ + while (harmony_read(h, HARMONY_CNTL) & HARMONY_CNTL_C) ; +} -static void snd_harmony_disable_interrupts(snd_card_harmony_t *chip) +inline void +harmony_reset(harmony_t *h) { - snd_harmony_wait_cntl(chip); - gsc_writel(0, chip->hpa+REG_DSTATUS); + harmony_write(h, HARMONY_RESET, 1); + mdelay(50); + harmony_write(h, HARMONY_RESET, 0); } -static void snd_harmony_enable_interrupts(snd_card_harmony_t *chip) +static void +harmony_disable_interrupts(harmony_t *h) { - snd_harmony_wait_cntl(chip); - gsc_writel(HARMONY_DSTATUS_IE, chip->hpa+REG_DSTATUS); + u32 dstatus; + harmony_wait_for_control(h); + dstatus = harmony_read(h, HARMONY_DSTATUS); + dstatus &= ~HARMONY_DSTATUS_IE; + harmony_write(h, HARMONY_DSTATUS, dstatus); } -/* - * interruption routine: - * The interrupt routine must provide adresse of next physical pages - * used by harmony - */ -static int snd_card_harmony_interrupt(int irq, void *dev, struct pt_regs *regs) +static void +harmony_enable_interrupts(harmony_t *h) { - snd_card_harmony_t *harmony = (snd_card_harmony_t *)dev; - u32 dstatus = 0; - unsigned long hpa = harmony->hpa; - - /* Turn off interrupts */ - snd_harmony_disable_interrupts(harmony); - - /* wait for control to free */ - snd_harmony_wait_cntl(harmony); - - /* Read dstatus and pcuradd (the current address) */ - dstatus = gsc_readl(hpa+REG_DSTATUS); - - /* Check if this is a request to get the next play buffer */ + u32 dstatus; + harmony_wait_for_control(h); + dstatus = harmony_read(h, HARMONY_DSTATUS); + dstatus |= HARMONY_DSTATUS_IE; + harmony_write(h, HARMONY_DSTATUS, dstatus); +} + +static void +harmony_mute(harmony_t *h) +{ + unsigned long flags; + + spin_lock_irqsave(&h->mixer_lock, flags); + harmony_wait_for_control(h); + harmony_write(h, HARMONY_GAINCTL, HARMONY_GAIN_SILENCE); + spin_unlock_irqrestore(&h->mixer_lock, flags); +} + +static void +harmony_unmute(harmony_t *h) +{ + unsigned long flags; + + spin_lock_irqsave(&h->mixer_lock, flags); + harmony_wait_for_control(h); + harmony_write(h, HARMONY_GAINCTL, h->st.gain); + spin_unlock_irqrestore(&h->mixer_lock, flags); +} + +static void +harmony_set_control(harmony_t *h) +{ + u32 ctrl; + unsigned long flags; + + spin_lock_irqsave(&h->lock, flags); + + ctrl = (HARMONY_CNTL_C | + (h->st.format << 6) | + (h->st.stereo << 5) | + (h->st.rate)); + + harmony_wait_for_control(h); + harmony_write(h, HARMONY_CNTL, ctrl); + + spin_unlock_irqrestore(&h->lock, flags); +} + +static irqreturn_t +snd_harmony_interrupt(int irq, void *dev, struct pt_regs *regs) +{ + u32 dstatus; + harmony_t *h = dev; + + spin_lock(&h->lock); + harmony_disable_interrupts(h); + harmony_wait_for_control(h); + dstatus = harmony_read(h, HARMONY_DSTATUS); + spin_unlock(&h->lock); + if (dstatus & HARMONY_DSTATUS_PN) { - if (harmony->playback_substream) { - harmony->ply_buf += harmony->ply_count; - harmony->ply_buf %= harmony->ply_size; - - gsc_writel(harmony->ply_buffer + harmony->ply_buf, - hpa+REG_PNXTADD); - - snd_pcm_period_elapsed(harmony->playback_substream); - harmony->ply_total++; + if (h->psubs) { + spin_lock(&h->lock); + h->pbuf.buf += h->pbuf.count; /* PAGE_SIZE */ + h->pbuf.buf %= h->pbuf.size; /* MAX_BUFS*PAGE_SIZE */ + + harmony_write(h, HARMONY_PNXTADD, + h->pbuf.addr + h->pbuf.buf); + h->stats.play_intr++; + spin_unlock(&h->lock); + snd_pcm_period_elapsed(h->psubs); } else { - gsc_writel(harmony->silence_dma.addr + - (HARMONY_BUF_SIZE*harmony->silence_count), - hpa+REG_PNXTADD); - harmony->silence_count++; - harmony->silence_count %= SILENCE_BUFS; + spin_lock(&h->lock); + harmony_write(h, HARMONY_PNXTADD, h->sdma.addr); + h->stats.silence_intr++; + spin_unlock(&h->lock); } } - - /* Check if we're being asked to fill in a recording buffer */ + if (dstatus & HARMONY_DSTATUS_RN) { - if (harmony->capture_substream) { - harmony->cap_buf += harmony->cap_count; - harmony->cap_buf %= harmony->cap_size; - - gsc_writel(harmony->cap_buffer + harmony->cap_buf, - hpa+REG_RNXTADD); - - snd_pcm_period_elapsed(harmony->capture_substream); - harmony->cap_total++; + if (h->csubs) { + spin_lock(&h->lock); + h->cbuf.buf += h->cbuf.count; + h->cbuf.buf %= h->cbuf.size; + + harmony_write(h, HARMONY_RNXTADD, + h->cbuf.addr + h->cbuf.buf); + h->stats.rec_intr++; + spin_unlock(&h->lock); + snd_pcm_period_elapsed(h->csubs); } else { - /* graveyard buffer */ - gsc_writel(harmony->graveyard_dma.addr + - (HARMONY_BUF_SIZE*harmony->graveyard_count), - hpa+REG_RNXTADD); - harmony->graveyard_count++; - harmony->graveyard_count %= GRAVEYARD_BUFS; + spin_lock(&h->lock); + harmony_write(h, HARMONY_RNXTADD, h->gdma.addr); + h->stats.graveyard_intr++; + spin_unlock(&h->lock); } } - snd_harmony_enable_interrupts(harmony); + + spin_lock(&h->lock); + harmony_enable_interrupts(h); + spin_unlock(&h->lock); return IRQ_HANDLED; } -/* - * proc entry - * this proc file will give some debugging info - */ - -static void snd_harmony_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) +static unsigned int +snd_harmony_rate_bits(int rate) { - snd_card_harmony_t *harmony = (snd_card_harmony_t *)entry->private_data; - - snd_iprintf(buffer, "LASI Harmony driver\nLaurent Canet \n\n"); - snd_iprintf(buffer, "IRQ %d, hpa %lx, id %d rev %d\n", - harmony->irq, harmony->hpa, - harmony->id, harmony->rev); - snd_iprintf(buffer, "Current gain %lx\n", (unsigned long) harmony->current_gain); - snd_iprintf(buffer, "\tsample rate=%d\n", harmony->sample_rate); - snd_iprintf(buffer, "\tstereo select=%d\n", harmony->stereo_select); - snd_iprintf(buffer, "\tbitperchan=%d\n\n", harmony->data_format); - - snd_iprintf(buffer, "Play status:\n"); - snd_iprintf(buffer, "\tstopped %d\n", harmony->ply_stopped); - snd_iprintf(buffer, "\tbuffer %lx, count %d\n", harmony->ply_buffer, harmony->ply_count); - snd_iprintf(buffer, "\tbuf %d size %d\n\n", harmony->ply_buf, harmony->ply_size); - - snd_iprintf(buffer, "Capture status:\n"); - snd_iprintf(buffer, "\tstopped %d\n", harmony->cap_stopped); - snd_iprintf(buffer, "\tbuffer %lx, count %d\n", harmony->cap_buffer, harmony->cap_count); - snd_iprintf(buffer, "\tbuf %d, size %d\n\n", harmony->cap_buf, harmony->cap_size); - - snd_iprintf(buffer, "Funny stats: total played=%d, recorded=%d\n\n", harmony->ply_total, harmony->cap_total); - - snd_iprintf(buffer, "Register:\n"); - snd_iprintf(buffer, "\tgainctl: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_GAINCTL)); - snd_iprintf(buffer, "\tcntl: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_CNTL)); - snd_iprintf(buffer, "\tid: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_ID)); - snd_iprintf(buffer, "\tpcuradd: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_PCURADD)); - snd_iprintf(buffer, "\trcuradd: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_RCURADD)); - snd_iprintf(buffer, "\tpnxtadd: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_PNXTADD)); - snd_iprintf(buffer, "\trnxtadd: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_RNXTADD)); - snd_iprintf(buffer, "\tdstatus: %lx\n", (unsigned long) gsc_readl(harmony->hpa+REG_DSTATUS)); - snd_iprintf(buffer, "\tov: %lx\n\n", (unsigned long) gsc_readl(harmony->hpa+REG_OV)); + unsigned int i; -} + for (i = 0; i < ARRAY_SIZE(snd_harmony_rates); i++) + if (snd_harmony_rates[i] == rate) + return rate_bits[i]; + + return HARMONY_SR_44KHZ; +} + +static snd_pcm_hardware_t snd_harmony_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_BLOCK_TRANSFER), + .formats = (SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_MU_LAW | + SNDRV_PCM_FMTBIT_A_LAW), + .rates = (SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_8000_48000 | + SNDRV_PCM_RATE_KNOT), + .rate_min = 5512, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = MAX_BUF_SIZE, + .period_bytes_min = BUF_SIZE, + .period_bytes_max = BUF_SIZE, + .periods_min = 1, + .periods_max = MAX_BUFS, + .fifo_size = 0, +}; -static void __devinit snd_harmony_proc_init(snd_card_harmony_t *harmony) +static snd_pcm_hardware_t snd_harmony_capture = { - snd_info_entry_t *entry; - - if (! snd_card_proc_new(harmony->card, "harmony", &entry)) - snd_info_set_text_ops(entry, harmony, 2048, snd_harmony_proc_read); -} - -/* - * PCM Stuff - */ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_BLOCK_TRANSFER), + .formats = (SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_MU_LAW | + SNDRV_PCM_FMTBIT_A_LAW), + .rates = (SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_8000_48000 | + SNDRV_PCM_RATE_KNOT), + .rate_min = 5512, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = MAX_BUF_SIZE, + .period_bytes_min = BUF_SIZE, + .period_bytes_max = BUF_SIZE, + .periods_min = 1, + .periods_max = MAX_BUFS, + .fifo_size = 0, +}; -static int snd_card_harmony_playback_ioctl(snd_pcm_substream_t * substream, - unsigned int cmd, - void *arg) +static int +snd_harmony_playback_trigger(snd_pcm_substream_t *ss, int cmd) { - return snd_pcm_lib_ioctl(substream, cmd, arg); -} + harmony_t *h = snd_pcm_substream_chip(ss); + unsigned long flags; -static int snd_card_harmony_capture_ioctl(snd_pcm_substream_t * substream, - unsigned int cmd, - void *arg) -{ - return snd_pcm_lib_ioctl(substream, cmd, arg); -} + if (h->st.capturing) + return -EBUSY; -static int snd_card_harmony_playback_trigger(snd_pcm_substream_t * substream, - int cmd) -{ - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - + spin_lock_irqsave(&h->lock, flags); switch (cmd) { - case SNDRV_PCM_TRIGGER_STOP: - if (harmony->ply_stopped) - return -EBUSY; - harmony->ply_stopped = 1; - snd_harmony_disable_interrupts(harmony); - break; - case SNDRV_PCM_TRIGGER_START: - if (!harmony->ply_stopped) - return -EBUSY; - harmony->ply_stopped = 0; - /* write the location of the first buffer to play */ - gsc_writel(harmony->ply_buffer, harmony->hpa+REG_PNXTADD); - snd_harmony_enable_interrupts(harmony); - break; - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - case SNDRV_PCM_TRIGGER_SUSPEND: - DPRINTK(KERN_INFO PFX "received unimplemented trigger: %d\n", cmd); - default: - return -EINVAL; + case SNDRV_PCM_TRIGGER_START: + h->st.playing = 1; + harmony_write(h, HARMONY_PNXTADD, h->pbuf.addr); + harmony_write(h, HARMONY_RNXTADD, h->gdma.addr); + harmony_unmute(h); + harmony_enable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_STOP: + h->st.playing = 0; + harmony_mute(h); + harmony_disable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_SUSPEND: + default: + spin_unlock_irqrestore(&h->lock, flags); + snd_BUG(); + return -EINVAL; } + spin_unlock_irqrestore(&h->lock, flags); + return 0; } -static int snd_card_harmony_capture_trigger(snd_pcm_substream_t * substream, - int cmd) +static int +snd_harmony_capture_trigger(snd_pcm_substream_t *ss, int cmd) { - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - - switch (cmd) { - case SNDRV_PCM_TRIGGER_STOP: - if (harmony->cap_stopped) - return -EBUSY; - harmony->cap_stopped = 1; - snd_harmony_disable_interrupts(harmony); - break; - case SNDRV_PCM_TRIGGER_START: - if (!harmony->cap_stopped) - return -EBUSY; - harmony->cap_stopped = 0; - snd_harmony_enable_interrupts(harmony); - break; - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - case SNDRV_PCM_TRIGGER_SUSPEND: - DPRINTK(KERN_INFO PFX "Received unimplemented trigger: %d\n", cmd); - default: - return -EINVAL; - } - return 0; + harmony_t *h = snd_pcm_substream_chip(ss); + unsigned long flags; + + if (h->st.playing) + return -EBUSY; + + spin_lock_irqsave(&h->lock, flags); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + h->st.capturing = 1; + harmony_write(h, HARMONY_PNXTADD, h->sdma.addr); + harmony_write(h, HARMONY_RNXTADD, h->cbuf.addr); + harmony_unmute(h); + harmony_enable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_STOP: + h->st.capturing = 0; + harmony_mute(h); + harmony_disable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_SUSPEND: + default: + spin_unlock_irqrestore(&h->lock, flags); + snd_BUG(); + return -EINVAL; + } + spin_unlock_irqrestore(&h->lock, flags); + + return 0; } -/* set data format */ -static int snd_harmony_set_data_format(snd_card_harmony_t *harmony, int pcm_format) +static int +snd_harmony_set_data_format(harmony_t *h, int fmt) { - int old_format = harmony->data_format; - int new_format = old_format; - switch (pcm_format) { + int o = h->st.format; + int n; + + switch(fmt) { case SNDRV_PCM_FORMAT_S16_BE: - new_format = HARMONY_DF_16BIT_LINEAR; + n = HARMONY_DF_16BIT_LINEAR; break; case SNDRV_PCM_FORMAT_A_LAW: - new_format = HARMONY_DF_8BIT_ALAW; + n = HARMONY_DF_8BIT_ALAW; break; case SNDRV_PCM_FORMAT_MU_LAW: - new_format = HARMONY_DF_8BIT_ULAW; + n = HARMONY_DF_8BIT_ULAW; break; + default: + n = HARMONY_DF_16BIT_LINEAR; + break; + } + + if (o != n) { + snd_pcm_format_set_silence(fmt, h->sdma.area, + SILENCE_BUFSZ / + snd_pcm_format_width(fmt)); } - /* re-initialize silence buffer if needed */ - if (old_format != new_format) - snd_pcm_format_set_silence(pcm_format, harmony->silence_dma.area, - (HARMONY_BUF_SIZE * SILENCE_BUFS * 8) / snd_pcm_format_width(pcm_format)); - return new_format; + return n; } -static int snd_card_harmony_playback_prepare(snd_pcm_substream_t * substream) +static int +snd_harmony_playback_prepare(snd_pcm_substream_t *ss) { - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; + harmony_t *h = snd_pcm_substream_chip(ss); + snd_pcm_runtime_t *rt = ss->runtime; - harmony->ply_size = snd_pcm_lib_buffer_bytes(substream); - harmony->ply_count = snd_pcm_lib_period_bytes(substream); - harmony->ply_buf = 0; - harmony->ply_stopped = 1; + if (h->st.capturing) + return -EBUSY; - /* initialize given sample rate */ - harmony->sample_rate = snd_card_harmony_rate_bits(runtime->rate); - - /* data format */ - harmony->data_format = snd_harmony_set_data_format(harmony, runtime->format); + h->pbuf.size = snd_pcm_lib_buffer_bytes(ss); + h->pbuf.count = snd_pcm_lib_period_bytes(ss); + h->pbuf.buf = 0; + h->st.playing = 0; - /* number of channels */ - if (runtime->channels == 2) - harmony->stereo_select = HARMONY_SS_STEREO; - else - harmony->stereo_select = HARMONY_SS_MONO; - - DPRINTK(KERN_INFO PFX "Playback_prepare, sr=%d(%x), df=%x, ss=%x hpa=%lx\n", runtime->rate, - harmony->sample_rate, harmony->data_format, harmony->stereo_select, harmony->hpa); - snd_harmony_update_control(harmony); - harmony->format_initialized = 1; - harmony->ply_buffer = runtime->dma_addr; + h->st.rate = snd_harmony_rate_bits(rt->rate); + h->st.format = snd_harmony_set_data_format(h, rt->format); + if (rt->channels == 2) + h->st.stereo = HARMONY_SS_STEREO; + else + h->st.stereo = HARMONY_SS_MONO; + + harmony_set_control(h); + + h->pbuf.addr = rt->dma_addr; + return 0; } -static int snd_card_harmony_capture_prepare(snd_pcm_substream_t * substream) +static int +snd_harmony_capture_prepare(snd_pcm_substream_t *ss) { - snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - - harmony->cap_size = snd_pcm_lib_buffer_bytes(substream); - harmony->cap_count = snd_pcm_lib_period_bytes(substream); - harmony->cap_count = 0; - harmony->cap_stopped = 1; - - /* initialize given sample rate */ - harmony->sample_rate = snd_card_harmony_rate_bits(runtime->rate); - - /* data format */ - harmony->data_format = snd_harmony_set_data_format(harmony, runtime->format); - - /* number of channels */ - if (runtime->channels == 1) - harmony->stereo_select = HARMONY_SS_MONO; - else if (runtime->channels == 2) - harmony->stereo_select = HARMONY_SS_STEREO; - - snd_harmony_update_control(harmony); - harmony->format_initialized = 1; - - harmony->cap_buffer = runtime->dma_addr; + harmony_t *h = snd_pcm_substream_chip(ss); + snd_pcm_runtime_t *rt = ss->runtime; - return 0; + if (h->st.playing) + return -EBUSY; + + h->cbuf.size = snd_pcm_lib_buffer_bytes(ss); + h->cbuf.count = snd_pcm_lib_period_bytes(ss); + h->cbuf.buf = 0; + h->st.capturing = 0; + + h->st.rate = snd_harmony_rate_bits(rt->rate); + h->st.format = snd_harmony_set_data_format(h, rt->format); + + if (rt->channels == 2) + h->st.stereo = HARMONY_SS_STEREO; + else + h->st.stereo = HARMONY_SS_MONO; + + harmony_set_control(h); + + h->cbuf.addr = rt->dma_addr; + + return 0; } -static snd_pcm_uframes_t snd_card_harmony_capture_pointer(snd_pcm_substream_t * substream) +static snd_pcm_uframes_t +snd_harmony_playback_pointer(snd_pcm_substream_t *ss) { - snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - unsigned long rcuradd; - int recorded; - - if (harmony->cap_stopped) return 0; - if (harmony->capture_substream == NULL) return 0; - - rcuradd = gsc_readl(harmony->hpa+REG_RCURADD); - recorded = (rcuradd - harmony->cap_buffer); - recorded %= harmony->cap_size; - - return bytes_to_frames(runtime, recorded); -} + snd_pcm_runtime_t *rt = ss->runtime; + harmony_t *h = snd_pcm_substream_chip(ss); + unsigned long pcuradd; + unsigned long played; -/* - */ + if (!(h->st.playing) || (h->psubs == NULL)) + return 0; -static snd_pcm_uframes_t snd_card_harmony_playback_pointer(snd_pcm_substream_t * substream) -{ - snd_pcm_runtime_t *runtime = substream->runtime; - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - int played; - long int pcuradd = gsc_readl(harmony->hpa+REG_PCURADD); - - if ((harmony->ply_stopped) || (harmony->playback_substream == NULL)) return 0; - if ((harmony->ply_buffer == 0) || (harmony->ply_size == 0)) return 0; - - played = (pcuradd - harmony->ply_buffer); - - printk(KERN_DEBUG PFX "Pointer is %lx-%lx = %d\n", pcuradd, harmony->ply_buffer, played); - - if (pcuradd > harmony->ply_buffer + harmony->ply_size) return 0; - - return bytes_to_frames(runtime, played); -} - -static snd_pcm_hardware_t snd_card_harmony_playback = -{ - .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_JOINT_DUPLEX | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_BLOCK_TRANSFER), - .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_A_LAW | SNDRV_PCM_FMTBIT_MU_LAW), - .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, - .rate_min = 5500, - .rate_max = 48000, - .channels_min = 1, - .channels_max = 2, - .buffer_bytes_max = MAX_BUFFER_SIZE, - .period_bytes_min = HARMONY_BUF_SIZE, - .period_bytes_max = HARMONY_BUF_SIZE, - .periods_min = 1, - .periods_max = MAX_BUFS, - .fifo_size = 0, -}; + if ((h->pbuf.addr == 0) || (h->pbuf.size == 0)) + return 0; + + pcuradd = harmony_read(h, HARMONY_PCURADD); + played = pcuradd - h->pbuf.addr; + +#ifdef HARMONY_DEBUG + printk(KERN_DEBUG PFX "playback_pointer is 0x%lx-0x%lx = %d bytes\n", + pcuradd, h->pbuf.addr, played); +#endif + + if (pcuradd > h->pbuf.addr + h->pbuf.size) { + return 0; + } + + return bytes_to_frames(rt, played); +} -static snd_pcm_hardware_t snd_card_harmony_capture = +static snd_pcm_uframes_t +snd_harmony_capture_pointer(snd_pcm_substream_t *ss) { - .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_JOINT_DUPLEX | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_BLOCK_TRANSFER), - .formats = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_A_LAW | SNDRV_PCM_FMTBIT_MU_LAW), - .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, - .rate_min = 5500, - .rate_max = 48000, - .channels_min = 1, - .channels_max = 2, - .buffer_bytes_max = MAX_BUFFER_SIZE, - .period_bytes_min = HARMONY_BUF_SIZE, - .period_bytes_max = HARMONY_BUF_SIZE, - .periods_min = 1, - .periods_max = MAX_BUFS, - .fifo_size = 0, -}; + snd_pcm_runtime_t *rt = ss->runtime; + harmony_t *h = snd_pcm_substream_chip(ss); + unsigned long rcuradd; + unsigned long caught; + + if (!(h->st.capturing) || (h->csubs == NULL)) + return 0; + + if ((h->cbuf.addr == 0) || (h->cbuf.size == 0)) + return 0; + + rcuradd = harmony_read(h, HARMONY_RCURADD); + caught = rcuradd - h->cbuf.addr; -static int snd_card_harmony_playback_open(snd_pcm_substream_t * substream) +#ifdef HARMONY_DEBUG + printk(KERN_DEBUG PFX "capture_pointer is 0x%lx-0x%lx = %d bytes\n", + rcuradd, h->cbuf.addr, caught); +#endif + + if (rcuradd > h->cbuf.addr + h->cbuf.size) { + return 0; + } + + return bytes_to_frames(rt, caught); +} + +static int +snd_harmony_playback_open(snd_pcm_substream_t *ss) { - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; + harmony_t *h = snd_pcm_substream_chip(ss); + snd_pcm_runtime_t *rt = ss->runtime; int err; - harmony->playback_substream = substream; - runtime->hw = snd_card_harmony_playback; - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraint_rates); + h->psubs = ss; + rt->hw = snd_harmony_playback; + snd_pcm_hw_constraint_list(rt, 0, SNDRV_PCM_HW_PARAM_RATE, + &hw_constraint_rates); - if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) + err = snd_pcm_hw_constraint_integer(rt, SNDRV_PCM_HW_PARAM_PERIODS); + if (err < 0) return err; return 0; } -static int snd_card_harmony_capture_open(snd_pcm_substream_t * substream) +static int +snd_harmony_capture_open(snd_pcm_substream_t *ss) { - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - snd_pcm_runtime_t *runtime = substream->runtime; - int err; - - harmony->capture_substream = substream; - runtime->hw = snd_card_harmony_capture; - snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraint_rates); - if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) - return err; - return 0; + harmony_t *h = snd_pcm_substream_chip(ss); + snd_pcm_runtime_t *rt = ss->runtime; + int err; + h->csubs = ss; + rt->hw = snd_harmony_capture; + snd_pcm_hw_constraint_list(rt, 0, SNDRV_PCM_HW_PARAM_RATE, + &hw_constraint_rates); + + err = snd_pcm_hw_constraint_integer(rt, SNDRV_PCM_HW_PARAM_PERIODS); + if (err < 0) + return err; + + return 0; } -static int snd_card_harmony_playback_close(snd_pcm_substream_t * substream) +static int +snd_harmony_playback_close(snd_pcm_substream_t *ss) { - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - - harmony->playback_substream = NULL; - harmony->ply_size = 0; - harmony->ply_buf = 0; - harmony->ply_buffer = 0; - harmony->ply_count = 0; - harmony->ply_stopped = 1; - harmony->format_initialized = 0; - + harmony_t *h = snd_pcm_substream_chip(ss); + h->psubs = NULL; return 0; } -static int snd_card_harmony_capture_close(snd_pcm_substream_t * substream) +static int +snd_harmony_capture_close(snd_pcm_substream_t *ss) { - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); - - harmony->capture_substream = NULL; - harmony->cap_size = 0; - harmony->cap_buf = 0; - harmony->cap_buffer = 0; - harmony->cap_count = 0; - harmony->cap_stopped = 1; - harmony->format_initialized = 0; - - return 0; + harmony_t *h = snd_pcm_substream_chip(ss); + h->csubs = NULL; + return 0; } -static int snd_card_harmony_hw_params(snd_pcm_substream_t *substream, - snd_pcm_hw_params_t * hw_params) +static int +snd_harmony_hw_params(snd_pcm_substream_t *ss, + snd_pcm_hw_params_t *hw) { int err; - snd_card_harmony_t *harmony = snd_pcm_substream_chip(substream); + harmony_t *h = snd_pcm_substream_chip(ss); + + err = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw)); + if (err > 0 && h->dma.type == SNDRV_DMA_TYPE_CONTINUOUS) + ss->runtime->dma_addr = __pa(ss->runtime->dma_area); - err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); - if (err > 0 && harmony->dma_dev.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; } -static int snd_card_harmony_hw_free(snd_pcm_substream_t *substream) +static int +snd_harmony_hw_free(snd_pcm_substream_t *ss) { - snd_pcm_lib_free_pages(substream); - return 0; + return snd_pcm_lib_free_pages(ss); } -static snd_pcm_ops_t snd_card_harmony_playback_ops = { - .open = snd_card_harmony_playback_open, - .close = snd_card_harmony_playback_close, - .ioctl = snd_card_harmony_playback_ioctl, - .hw_params = snd_card_harmony_hw_params, - .hw_free = snd_card_harmony_hw_free, - .prepare = snd_card_harmony_playback_prepare, - .trigger = snd_card_harmony_playback_trigger, - .pointer = snd_card_harmony_playback_pointer, +static snd_pcm_ops_t snd_harmony_playback_ops = { + .open = snd_harmony_playback_open, + .close = snd_harmony_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_harmony_hw_params, + .hw_free = snd_harmony_hw_free, + .prepare = snd_harmony_playback_prepare, + .trigger = snd_harmony_playback_trigger, + .pointer = snd_harmony_playback_pointer, }; -static snd_pcm_ops_t snd_card_harmony_capture_ops = { - .open = snd_card_harmony_capture_open, - .close = snd_card_harmony_capture_close, - .ioctl = snd_card_harmony_capture_ioctl, - .hw_params = snd_card_harmony_hw_params, - .hw_free = snd_card_harmony_hw_free, - .prepare = snd_card_harmony_capture_prepare, - .trigger = snd_card_harmony_capture_trigger, - .pointer = snd_card_harmony_capture_pointer, +static snd_pcm_ops_t snd_harmony_capture_ops = { + .open = snd_harmony_capture_open, + .close = snd_harmony_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_harmony_hw_params, + .hw_free = snd_harmony_hw_free, + .prepare = snd_harmony_capture_prepare, + .trigger = snd_harmony_capture_trigger, + .pointer = snd_harmony_capture_pointer, }; -static int snd_card_harmony_pcm_init(snd_card_harmony_t *harmony) +static int +snd_harmony_pcm_init(harmony_t *h) { snd_pcm_t *pcm; int err; - /* Request that IRQ */ - if (request_irq(harmony->irq, snd_card_harmony_interrupt, 0 ,"harmony", harmony)) { - printk(KERN_ERR PFX "Error requesting irq %d.\n", harmony->irq); - return -EFAULT; - } - - snd_harmony_disable_interrupts(harmony); + harmony_disable_interrupts(h); - if ((err = snd_pcm_new(harmony->card, "Harmony", 0, 1, 1, &pcm)) < 0) + err = snd_pcm_new(h->card, "harmony", 0, 1, 1, &pcm); + if (err < 0) return err; - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_harmony_playback_ops); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_harmony_capture_ops); - - pcm->private_data = harmony; + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_harmony_playback_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, + &snd_harmony_capture_ops); + + pcm->private_data = h; pcm->info_flags = 0; - strcpy(pcm->name, "Harmony"); - harmony->pcm = pcm; + strcpy(pcm->name, "harmony"); + h->pcm = pcm; + + h->psubs = NULL; + h->csubs = NULL; /* 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.type, - harmony->dma_dev.dev, - HARMONY_BUF_SIZE*GRAVEYARD_BUFS, - &harmony->graveyard_dma); - 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); - } + h->dma.type = SNDRV_DMA_TYPE_DEV; + h->dma.dev = &h->dev->dev; + err = snd_dma_alloc_pages(h->dma.type, + h->dma.dev, + BUF_SIZE*GRAVEYARD_BUFS, + &h->gdma); if (err < 0) { - printk(KERN_ERR PFX "can't allocate graveyard buffer\n"); + printk(KERN_ERR PFX "cannot allocate graveyard buffer!\n"); return err; } - harmony->graveyard_count = 0; /* initialize silence buffers */ - err = snd_dma_alloc_pages(harmony->dma_dev.type, - harmony->dma_dev.dev, - HARMONY_BUF_SIZE*SILENCE_BUFS, - &harmony->silence_dma); + err = snd_dma_alloc_pages(h->dma.type, + h->dma.dev, + BUF_SIZE*SILENCE_BUFS, + &h->sdma); if (err < 0) { - printk(KERN_ERR PFX "can't allocate silence buffer\n"); + printk(KERN_ERR PFX "cannot 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; - err = snd_pcm_lib_preallocate_pages_for_all(pcm, harmony->dma_dev.type, - harmony->dma_dev.dev, - MAX_BUFFER_SIZE, MAX_BUFFER_SIZE); + /* pre-allocate space for DMA */ + err = snd_pcm_lib_preallocate_pages_for_all(pcm, h->dma.type, + h->dma.dev, + MAX_BUF_SIZE, + MAX_BUF_SIZE); if (err < 0) { - printk(KERN_ERR PFX "buffer allocation error %d\n", err); - // return err; + printk(KERN_ERR PFX "buffer allocation error: %d\n", err); + return err; } return 0; } -/* - * mixer routines - */ - -static void snd_harmony_set_new_gain(snd_card_harmony_t *harmony) +static void +snd_harmony_set_new_gain(harmony_t *h) { - DPRINTK(KERN_INFO PFX "Setting new gain %x at %lx\n", harmony->current_gain, harmony->hpa+REG_GAINCTL); - /* Wait until we're out of control mode */ - snd_harmony_wait_cntl(harmony); - - gsc_writel(harmony->current_gain, harmony->hpa+REG_GAINCTL); + harmony_wait_for_control(h); + harmony_write(h, HARMONY_GAINCTL, h->st.gain); } -#define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \ -{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ - .info = snd_harmony_mixercontrol_info, \ - .get = snd_harmony_volume_get, .put = snd_harmony_volume_put, \ - .private_value = ((left_shift) | ((right_shift) << 8) | ((mask) << 16) | ((invert) << 24)) } - -static int snd_harmony_mixercontrol_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) -{ - int mask = (kcontrol->private_value >> 16) & 0xff; - int left_shift = (kcontrol->private_value) & 0xff; - int right_shift = (kcontrol->private_value >> 8) & 0xff; +static int +snd_harmony_mixercontrol_info(snd_kcontrol_t *kc, + snd_ctl_elem_info_t *uinfo) +{ + int mask = (kc->private_value >> 16) & 0xff; + int left_shift = (kc->private_value) & 0xff; + int right_shift = (kc->private_value >> 8) & 0xff; - uinfo->type = (mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER); - uinfo->count = (left_shift == right_shift) ? 1 : 2; + uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : + SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = left_shift == right_shift ? 1 : 2; uinfo->value.integer.min = 0; uinfo->value.integer.max = mask; + return 0; } - -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); - int shift_left = (kcontrol->private_value) & 0xff; - int shift_right = (kcontrol->private_value >> 8) & 0xff; - int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0xff; - unsigned long flags; + +static int +snd_harmony_volume_get(snd_kcontrol_t *kc, + snd_ctl_elem_value_t *ucontrol) +{ + harmony_t *h = snd_kcontrol_chip(kc); + int shift_left = (kc->private_value) & 0xff; + int shift_right = (kc->private_value >> 8) & 0xff; + int mask = (kc->private_value >> 16) & 0xff; + int invert = (kc->private_value >> 24) & 0xff; int left, right; + unsigned long flags; - spin_lock_irqsave(&harmony->mixer_lock, flags); - left = (harmony->current_gain >> shift_left) & mask; - right = (harmony->current_gain >> shift_right) & mask; + spin_lock_irqsave(&h->mixer_lock, flags); + + left = (h->st.gain >> shift_left) & mask; + right = (h->st.gain >> shift_right) & mask; if (invert) { left = mask - left; @@ -910,21 +716,24 @@ } ucontrol->value.integer.value[0] = left; ucontrol->value.integer.value[1] = right; - spin_unlock_irqrestore(&harmony->mixer_lock, flags); + + spin_unlock_irqrestore(&h->mixer_lock, flags); return 0; } -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); - int shift_left = (kcontrol->private_value) & 0xff; - int shift_right = (kcontrol->private_value >> 8) & 0xff; - int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0xff; - unsigned long flags; +static int +snd_harmony_volume_put(snd_kcontrol_t *kc, + snd_ctl_elem_value_t *ucontrol) +{ + harmony_t *h = snd_kcontrol_chip(kc); + int shift_left = (kc->private_value) & 0xff; + int shift_right = (kc->private_value >> 8) & 0xff; + int mask = (kc->private_value >> 16) & 0xff; + int invert = (kc->private_value >> 24) & 0xff; int left, right; - int old_gain = harmony->current_gain; + int old_gain = h->st.gain; + unsigned long flags; left = ucontrol->value.integer.value[0] & mask; right = ucontrol->value.integer.value[1] & mask; @@ -933,213 +742,249 @@ right = mask - right; } - spin_lock_irqsave(&harmony->mixer_lock, flags); - harmony->current_gain = harmony->current_gain & ~( (mask << shift_right) | (mask << shift_left)); - harmony->current_gain = harmony->current_gain | ((left << shift_left) | (right << shift_right) ); - snd_harmony_set_new_gain(harmony); - spin_unlock_irqrestore(&harmony->mixer_lock, flags); + spin_lock_irqsave(&h->mixer_lock, flags); + + h->st.gain &= ~( (mask << shift_right) | (mask << shift_left) ); + h->st.gain |= ( (left << shift_left) | (right << shift_right) ); + snd_harmony_set_new_gain(h); + + spin_unlock_irqrestore(&h->mixer_lock, flags); - return (old_gain - harmony->current_gain); + return (old_gain - h->st.gain); } -#define HARMONY_CONTROLS (sizeof(snd_harmony_controls)/sizeof(snd_kcontrol_new_t)) +#define HARMONY_CONTROLS (sizeof(snd_harmony_controls)/ \ + sizeof(snd_kcontrol_new_t)) + +#define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ + .info = snd_harmony_mixercontrol_info, \ + .get = snd_harmony_volume_get, .put = snd_harmony_volume_put, \ + .private_value = ((left_shift) | ((right_shift) << 8) | \ + ((mask) << 16) | ((invert) << 24)) } static snd_kcontrol_new_t snd_harmony_controls[] = { -HARMONY_VOLUME("PCM Capture Volume", 12, 16, 0x0f, 0), -HARMONY_VOLUME("Master Volume", 20, 20, 0x0f, 1), -HARMONY_VOLUME("PCM Playback Volume", 6, 0, 0x3f, 1), + HARMONY_VOLUME("Playback Volume", HARMONY_GAIN_LO_SHIFT, + HARMONY_GAIN_RO_SHIFT, HARMONY_GAIN_OUT, 1), + HARMONY_VOLUME("Capture Volume", HARMONY_GAIN_LI_SHIFT, + HARMONY_GAIN_RI_SHIFT, HARMONY_GAIN_IN, 0), }; -static void __init snd_harmony_reset_codec(snd_card_harmony_t *harmony) -{ - snd_harmony_wait_cntl(harmony); - gsc_writel(1, harmony->hpa+REG_RESET); - mdelay(50); /* wait 50 ms */ - gsc_writel(0, harmony->hpa+REG_RESET); -} - -/* - * Mute all the output and reset Harmony. - */ - -static void __init snd_harmony_mixer_reset(snd_card_harmony_t *harmony) +static void __init +snd_harmony_mixer_reset(harmony_t *h) { - harmony->current_gain = HARMONY_GAIN_TOTAL_SILENCE; - snd_harmony_set_new_gain(harmony); - snd_harmony_reset_codec(harmony); - harmony->current_gain = HARMONY_GAIN_DEFAULT; - snd_harmony_set_new_gain(harmony); + harmony_mute(h); + harmony_reset(h); + h->st.gain = HARMONY_GAIN_DEFAULT; + harmony_unmute(h); } - -static int __init snd_card_harmony_mixer_init(snd_card_harmony_t *harmony) +static int __init +snd_harmony_mixer_init(harmony_t *h) { - snd_card_t *card = harmony->card; + snd_card_t *card = h->card; int idx, err; - snd_assert(harmony != NULL, return -EINVAL); + snd_assert(h != NULL, return -EINVAL); strcpy(card->mixername, "Harmony Gain control interface"); for (idx = 0; idx < HARMONY_CONTROLS; idx++) { - if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_harmony_controls[idx], harmony))) < 0) + err = snd_ctl_add(card, + snd_ctl_new1(&snd_harmony_controls[idx], h)); + if (err < 0) return err; } - snd_harmony_mixer_reset(harmony); + snd_harmony_mixer_reset(h); return 0; } -static int snd_card_harmony_create(snd_card_t *card, struct parisc_device *pa_dev, snd_card_harmony_t *harmony) +static int +snd_harmony_free(harmony_t *h) { - u32 cntl; - - harmony->card = card; - - harmony->pa_dev = pa_dev; + if (h->gdma.addr) + snd_dma_free_pages(&h->gdma); + if (h->sdma.addr) + snd_dma_free_pages(&h->sdma); - /* Set the HPA of harmony */ - harmony->hpa = pa_dev->hpa; - - harmony->irq = pa_dev->irq; - if (!harmony->irq) { - printk(KERN_ERR PFX "no irq found\n"); - return -ENODEV; - } + if (h->irq >= 0) + free_irq(h->irq, h); - /* Grab the ID and revision from the device */ - harmony->id = (gsc_readl(harmony->hpa+REG_ID)&0x00ff0000) >> 16; - if ((harmony->id | 1) != 0x15) { - printk(KERN_WARNING PFX "wrong harmony id 0x%02x\n", harmony->id); - return -EBUSY; - } - cntl = gsc_readl(harmony->hpa+REG_CNTL); - harmony->rev = (cntl>>20) & 0xff; + if (h->iobase) + iounmap(h->iobase); - printk(KERN_INFO "Lasi Harmony Audio driver h/w id %i, rev. %i at 0x%lx, IRQ %i\n", harmony->id, harmony->rev, pa_dev->hpa, harmony->irq); - - /* Make sure the control bit isn't set, although I don't think it - ever is. */ - if (cntl & HARMONY_CNTL_C) { - printk(KERN_WARNING PFX "CNTL busy\n"); - harmony->hpa = 0; - return -EBUSY; + parisc_set_drvdata(h->dev, NULL); + + kfree(h); + return 0; +} + +static int +snd_harmony_dev_free(snd_device_t *dev) +{ + harmony_t *h = dev->device_data; + return snd_harmony_free(h); +} + +static int __devinit +snd_harmony_create(snd_card_t *card, + struct parisc_device *padev, + harmony_t **rchip) +{ + int err; + harmony_t *h; + static snd_device_ops_t ops = { + .dev_free = snd_harmony_dev_free, + }; + + *rchip = NULL; + + h = kmalloc(sizeof(*h), GFP_KERNEL); + if (h == NULL) + return -ENOMEM; + + memset(&h->st, 0, sizeof(h->st)); + memset(&h->stats, 0, sizeof(h->stats)); + memset(&h->pbuf, 0, sizeof(h->pbuf)); + memset(&h->cbuf, 0, sizeof(h->cbuf)); + + h->hpa = padev->hpa; + h->card = card; + h->dev = padev; + h->irq = padev->irq; + h->iobase = ioremap_nocache(padev->hpa, HARMONY_SIZE); + if (h->iobase == NULL) { + printk(KERN_ERR PFX "unable to remap hpa 0x%lx\n", + padev->hpa); + err = -EBUSY; + goto free_and_ret; } - + + err = request_irq(h->irq, snd_harmony_interrupt, 0, + "harmony", h); + if (err) { + printk(KERN_ERR PFX "could not obtain interrupt %d", + h->irq); + goto free_and_ret; + } + + spin_lock_init(&h->mixer_lock); + spin_lock_init(&h->lock); + + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, + h, &ops)) < 0) { + goto free_and_ret; + } + + *rchip = h; + return 0; + +free_and_ret: + snd_harmony_free(h); + return err; } - -static int __init snd_card_harmony_probe(struct parisc_device *pa_dev) + +static int __devinit +snd_harmony_probe(struct parisc_device *padev) { + int err; static int dev; - snd_card_harmony_t *chip; snd_card_t *card; - int err; - - if (dev >= SNDRV_CARDS) + harmony_t *h; + static int index = SNDRV_DEFAULT_IDX1; + static char *id = SNDRV_DEFAULT_STR1; + + h = parisc_get_drvdata(padev); + if (h != NULL) { return -ENODEV; - if (!enable[dev]) { - dev++; - return -ENOENT; } - - snd_harmony_cards[dev] = snd_card_new(index[dev], id[dev], THIS_MODULE, - sizeof(snd_card_harmony_t)); - card = snd_harmony_cards[dev]; - + + card = snd_card_new(index, id, THIS_MODULE, 0); if (card == NULL) return -ENOMEM; - chip = (struct snd_card_harmony *)card->private_data; - spin_lock_init(&chip->control_lock); - spin_lock_init(&chip->mixer_lock); - - if ((err = snd_card_harmony_create(card, pa_dev, chip)) < 0) { - printk(KERN_ERR PFX "Creation failed\n"); - snd_card_free(card); - return err; + + err = snd_harmony_create(card, padev, &h); + if (err < 0) { + goto free_and_ret; } - if ((err = snd_card_harmony_pcm_init(chip)) < 0) { - printk(KERN_ERR PFX "PCM Init failed\n"); - snd_card_free(card); - return err; + + err = snd_harmony_pcm_init(h); + if (err < 0) { + goto free_and_ret; } - if ((err = snd_card_harmony_mixer_init(chip)) < 0) { - printk(KERN_ERR PFX "Mixer init failed\n"); - snd_card_free(card); - return err; + + err = snd_harmony_mixer_init(h); + if (err < 0) { + goto free_and_ret; } - - snd_harmony_proc_init(chip); - - strcpy(card->driver, "Harmony"); - strcpy(card->shortname, "ALSA driver for LASI Harmony"); - sprintf(card->longname, "%s at h/w, id %i, rev. %i hpa 0x%lx, IRQ %i\n",card->shortname, chip->id, chip->rev, pa_dev->hpa, chip->irq); - if ((err = snd_card_register(card)) < 0) { - snd_card_free(card); - return err; + strcpy(card->driver, "harmony"); + strcpy(card->shortname, "Harmony"); + sprintf(card->longname, "%s at 0x%lx, irq %i", + card->shortname, h->hpa, h->irq); + + err = snd_card_register(card); + if (err < 0) { + goto free_and_ret; } - printk(KERN_DEBUG PFX "Successfully registered harmony pcm backend & mixer %d\n", dev); dev++; - return 0; -} + parisc_set_drvdata(padev, h); -static struct parisc_device_id snd_card_harmony_devicetbl[] = { - { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007A }, /* Bushmaster/Flounder */ - { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007B }, /* 712/715 Audio */ - { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007E }, /* Pace Audio */ - { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007F }, /* Outfield / Coral II */ - { 0, } -}; + return 0; -MODULE_DEVICE_TABLE(parisc, snd_card_harmony_devicetbl); +free_and_ret: + snd_card_free(card); + return err; +} -/* - * bloc device parisc. c'est une structure qui definit un device - * que l'on trouve sur parisc. - * On y trouve les differents numeros HVERSION correspondant au device - * en question (ce qui permet a l'inventory de l'identifier) et la fonction - * d'initialisation du chose - */ +static int __devexit +snd_harmony_remove(struct parisc_device *padev) +{ + harmony_t *h = parisc_get_drvdata(padev); + snd_card_free(h->card); + return 0; +} -static struct parisc_driver snd_card_harmony_driver = { - .name = "Lasi ALSA Harmony", - .id_table = snd_card_harmony_devicetbl, - .probe = snd_card_harmony_probe, +static struct parisc_driver snd_harmony_driver = { + .name = "harmony", + .id_table = snd_harmony_devtable, + .probe = snd_harmony_probe, + .remove = snd_harmony_remove, }; -static int __init alsa_card_harmony_init(void) +static int __init +alsa_harmony_init(void) { int err; - - if ((err = register_parisc_driver(&snd_card_harmony_driver)) < 0) { - printk(KERN_ERR "Harmony soundcard not found or device busy\n"); + + err = register_parisc_driver(&snd_harmony_driver); + if (err < 0) { + printk(KERN_ERR PFX "device not found\n"); return err; } return 0; } -static void __exit alsa_card_harmony_exit(void) +static void __exit +alsa_harmony_fini(void) { - int idx; - snd_card_harmony_t *harmony; + int err; + + err = unregister_parisc_driver(&snd_harmony_driver); + if (err < 0) { + printk(KERN_ERR PFX "failed to unregister\n"); + } - for (idx = 0; idx < SNDRV_CARDS; idx++) - { - if (snd_harmony_cards[idx] != NULL) - { - DPRINTK(KERN_INFO PFX "Freeing card %d\n", idx); - harmony = snd_harmony_cards[idx]->private_data; - free_irq(harmony->irq, harmony); - printk(KERN_INFO PFX "Card unloaded %d, irq=%d\n", idx, harmony->irq); - snd_card_free(snd_harmony_cards[idx]); - } - } - if (unregister_parisc_driver(&snd_card_harmony_driver) < 0) - printk(KERN_ERR PFX "Failed to unregister Harmony driver\n"); + return; } -module_init(alsa_card_harmony_init) -module_exit(alsa_card_harmony_exit) +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Kyle McMartin "); +MODULE_DESCRIPTION("Harmony sound driver"); + +module_init(alsa_harmony_init); +module_exit(alsa_harmony_fini); diff -Nru a/sound/parisc/harmony.h b/sound/parisc/harmony.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/sound/parisc/harmony.h 2005-03-07 14:54:18 -08:00 @@ -0,0 +1,151 @@ +/* Hewlett-Packard Harmony audio driver + * Copyright (C) 2004, Kyle McMartin + */ + +#ifndef __HARMONY_H__ +#define __HARMONY_H__ + +struct harmony_buffer { + unsigned long addr; + int buf; + int count; + int size; + int coherent; +}; + +typedef struct snd_card_harmony { + int irq; + + unsigned long hpa; /* hard physical address */ + void __iomem *iobase; /* remapped io address */ + + struct parisc_device *dev; + + struct { + u32 gain; + u32 rate; + u32 format; + u32 stereo; + int playing; + int capturing; + } st; + + struct snd_dma_device dma; /* playback/capture */ + struct harmony_buffer pbuf; + struct harmony_buffer cbuf; + + struct snd_dma_buffer gdma; /* graveyard */ + struct snd_dma_buffer sdma; /* silence */ + + struct { + unsigned long play_intr; + unsigned long rec_intr; + unsigned long graveyard_intr; + unsigned long silence_intr; + } stats; + + snd_pcm_t *pcm; + snd_card_t *card; + snd_pcm_substream_t *psubs; + snd_pcm_substream_t *csubs; + snd_info_entry_t *proc; + + spinlock_t lock; + spinlock_t mixer_lock; +} harmony_t; + +#define MAX_PCM_DEVICES 1 +#define MAX_PCM_SUBSTREAMS 4 +#define MAX_MIDI_DEVICES 0 + +#define HARMONY_SIZE 64 + +#define BUF_SIZE PAGE_SIZE +#define MAX_BUFS 10 +#define MAX_BUF_SIZE (MAX_BUFS * BUF_SIZE) + +#define PLAYBACK_BUFS MAX_BUFS +#define RECORD_BUFS MAX_BUFS +#define GRAVEYARD_BUFS 1 +#define GRAVEYARD_BUFSZ (GRAVEYARD_BUFS*BUF_SIZE) +#define SILENCE_BUFS 1 +#define SILENCE_BUFSZ (SILENCE_BUFS*BUF_SIZE) + +#define HARMONY_ID 0x000 +#define HARMONY_RESET 0x004 +#define HARMONY_CNTL 0x008 +#define HARMONY_GAINCTL 0x00c +#define HARMONY_PNXTADD 0x010 +#define HARMONY_PCURADD 0x014 +#define HARMONY_RNXTADD 0x018 +#define HARMONY_RCURADD 0x01c +#define HARMONY_DSTATUS 0x020 +#define HARMONY_OV 0x024 +#define HARMONY_PIO 0x028 +#define HARMONY_DIAG 0x03c + +#define HARMONY_CNTL_C 0x80000000 +#define HARMONY_CNTL_ST 0x00000020 +#define HARMONY_CNTL_44100 0x00000015 /* HARMONY_SR_44KHZ */ +#define HARMONY_CNTL_8000 0x00000008 /* HARMONY_SR_8KHZ */ + +#define HARMONY_DSTATUS_ID 0x00000000 /* interrupts off */ +#define HARMONY_DSTATUS_PN 0x00000200 /* playback fill */ +#define HARMONY_DSTATUS_RN 0x00000002 /* record fill */ +#define HARMONY_DSTATUS_IE 0x80000000 /* interrupts on */ + +#define HARMONY_DF_16BIT_LINEAR 0x00000000 +#define HARMONY_DF_8BIT_ULAW 0x00000001 +#define HARMONY_DF_8BIT_ALAW 0x00000002 + +#define HARMONY_SS_MONO 0x00000000 +#define HARMONY_SS_STEREO 0x00000001 + +#define HARMONY_GAIN_SILENCE 0x00F00FFF +#define HARMONY_GAIN_DEFAULT 0x0FF00000 + +#define HARMONY_GAIN_HE_SHIFT 27 +#define HARMONY_GAIN_HE_MASK (1 << HARMONY_GAIN_HE_SHIFT) +#define HARMONY_GAIN_LE_SHIFT 26 +#define HARMONY_GAIN_LE_MASK (1 << HARMONY_GAIN_LE_SHIFT) +#define HARMONY_GAIN_SE_SHIFT 25 +#define HARMONY_GAIN_SE_MASK (1 << HARMONY_GAIN_SE_SHIFT) +#define HARMONY_GAIN_IS_SHIFT 24 +#define HARMONY_GAIN_IS_MASK (1 << HARMONY_GAIN_IS_SHIFT) + +#define HARMONY_GAIN_MA 0x0f +#define HARMONY_GAIN_MA_SHIFT 20 +#define HARMONY_GAIN_MA_MASK (HARMONY_GAIN_MA << HARMONY_GAIN_MA_SHIFT) + +#define HARMONY_GAIN_IN 0x0f +#define HARMONY_GAIN_LI_SHIFT 16 +#define HARMONY_GAIN_LI_MASK (HARMONY_GAIN_IN << HARMONY_GAIN_LI_SHIFT) +#define HARMONY_GAIN_RI_SHIFT 12 +#define HARMONY_GAIN_RI_MASK (HARMONY_GAIN_IN << HARMONY_GAIN_RI_SHIFT) + +#define HARMONY_GAIN_OUT 0x3f +#define HARMONY_GAIN_LO_SHIFT 6 +#define HARMONY_GAIN_LO_MASK (HARMONY_GAIN_OUT << HARMONY_GAIN_LO_SHIFT) +#define HARMONY_GAIN_RO_SHIFT 0 +#define HARMONY_GAIN_RO_MASK (HARMONY_GAIN_OUT << HARMONY_GAIN_RO_SHIFT) + +#define HARMONY_MAX_OUT (HARMONY_GAIN_RO_MASK >> HARMONY_GAIN_RO_SHIFT) +#define HARMONY_MAX_IN (HARMONY_GAIN_RI_MASK >> HARMONY_GAIN_RI_SHIFT) +#define HARMONY_MAX_MON (HARMONY_GAIN_MA_MASK >> HARMONY_GAIN_MA_SHIFT) + +#define HARMONY_SR_8KHZ 0x08 +#define HARMONY_SR_16KHZ 0x09 +#define HARMONY_SR_27KHZ 0x0A +#define HARMONY_SR_32KHZ 0x0B +#define HARMONY_SR_48KHZ 0x0E +#define HARMONY_SR_9KHZ 0x0F +#define HARMONY_SR_5KHZ 0x10 +#define HARMONY_SR_11KHZ 0x11 +#define HARMONY_SR_18KHZ 0x12 +#define HARMONY_SR_22KHZ 0x13 +#define HARMONY_SR_37KHZ 0x14 +#define HARMONY_SR_44KHZ 0x15 +#define HARMONY_SR_33KHZ 0x16 +#define HARMONY_SR_6KHZ 0x17 + +#endif /* __HARMONY_H__ */ diff -Nru a/sound/ppc/keywest.c b/sound/ppc/keywest.c --- a/sound/ppc/keywest.c 2005-03-07 14:54:18 -08:00 +++ b/sound/ppc/keywest.c 2005-03-07 14:54:18 -08:00 @@ -76,8 +76,6 @@ new_client->flags = 0; strcpy(i2c_device_name(new_client), keywest_ctx->name); - - new_client->id = keywest_ctx->id++; /* Automatically unique */ keywest_ctx->client = new_client; /* Tell the i2c layer a new client has arrived */