]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of /home/tmlind/src/kernel/linux-2.6/
authorTony Lindgren <tony@atomide.com>
Thu, 25 Jan 2007 22:21:41 +0000 (14:21 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 25 Jan 2007 22:21:41 +0000 (14:21 -0800)
Conflicts:

drivers/mmc/omap.c
drivers/mtd/nand/Makefile

322 files changed:
CREDITS
Documentation/DocBook/libata.tmpl
Documentation/SubmitChecklist
Documentation/SubmittingPatches
Documentation/feature-removal-schedule.txt
Documentation/filesystems/ntfs.txt
Documentation/hwmon/w83793
Documentation/kdump/kdump.txt
Documentation/pci.txt
Documentation/powerpc/mpc52xx-device-tree-bindings.txt
Documentation/scsi/aacraid.txt
Documentation/usb/CREDITS
MAINTAINERS
Makefile
README
arch/i386/kernel/cpu/common.c
arch/i386/kernel/nmi.c
arch/i386/kernel/paravirt.c
arch/i386/kernel/smpboot.c
arch/i386/mach-voyager/voyager_smp.c
arch/mips/Kconfig
arch/mips/Makefile
arch/mips/dec/prom/memory.c
arch/mips/kernel/smtc.c
arch/mips/kernel/vpe.c
arch/mips/mm/init.c
arch/mips/mm/tlb-r4k.c
arch/mips/vr41xx/common/irq.c
arch/powerpc/boot/dts/lite5200.dts
arch/powerpc/boot/dts/lite5200b.dts
arch/powerpc/configs/cell_defconfig
arch/powerpc/configs/chrp32_defconfig
arch/powerpc/configs/g5_defconfig
arch/powerpc/configs/iseries_defconfig
arch/powerpc/configs/linkstation_defconfig
arch/powerpc/configs/lite5200_defconfig
arch/powerpc/configs/maple_defconfig
arch/powerpc/configs/mpc7448_hpc2_defconfig
arch/powerpc/configs/mpc834x_itx_defconfig
arch/powerpc/configs/mpc834x_mds_defconfig
arch/powerpc/configs/mpc8360emds_defconfig
arch/powerpc/configs/mpc8540_ads_defconfig
arch/powerpc/configs/mpc8560_ads_defconfig
arch/powerpc/configs/mpc85xx_cds_defconfig
arch/powerpc/configs/mpc8641_hpcn_defconfig
arch/powerpc/configs/pmac32_defconfig
arch/powerpc/configs/ppc64_defconfig
arch/powerpc/configs/ps3_defconfig
arch/powerpc/configs/pseries_defconfig
arch/powerpc/kernel/pci_32.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc8360e_pb.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/sysdev/mmio_nvram.c
arch/ppc/platforms/ev64360.c
arch/x86_64/kernel/nmi.c
block/elevator.c
drivers/acpi/video.c
drivers/ata/ahci.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/sata_mv.c
drivers/ata/sata_nv.c
drivers/ata/sata_via.c
drivers/atm/horizon.c
drivers/char/mem.c
drivers/char/tlclk.c
drivers/char/vr41xx_giu.c
drivers/hid/hid-core.c
drivers/hid/hid-input.c
drivers/hwmon/hwmon-vid.c
drivers/hwmon/w83793.c
drivers/infiniband/hw/ehca/ehca_cq.c
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/kvm/kvm_main.c
drivers/kvm/paging_tmpl.h
drivers/kvm/svm.c
drivers/kvm/vmx.c
drivers/kvm/x86_emulate.c
drivers/media/video/cx88/cx88-tvaudio.c
drivers/media/video/ks0127.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/tveeprom.c
drivers/media/video/usbvideo/quickcam_messenger.h
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/v4l2-common.c
drivers/media/video/video-buf.c
drivers/media/video/vivi.c
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptbase.h
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptctl.h
drivers/message/fusion/mptfc.c
drivers/message/fusion/mptlan.c
drivers/message/fusion/mptlan.h
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.h
drivers/message/fusion/mptspi.c
drivers/mmc/imxmmc.c
drivers/mmc/omap.c
drivers/mmc/pxamci.c
drivers/mmc/tifm_sd.c
drivers/mtd/Kconfig
drivers/mtd/Makefile
drivers/mtd/afs.c
drivers/mtd/chips/amd_flash.c
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0020.c
drivers/mtd/chips/gen_probe.c
drivers/mtd/chips/jedec.c
drivers/mtd/chips/jedec_probe.c
drivers/mtd/chips/map_absent.c
drivers/mtd/chips/map_ram.c
drivers/mtd/chips/map_rom.c
drivers/mtd/chips/sharp.c
drivers/mtd/cmdlinepart.c
drivers/mtd/devices/block2mtd.c
drivers/mtd/devices/ms02-nv.c
drivers/mtd/devices/mtd_dataflash.c
drivers/mtd/devices/phram.c
drivers/mtd/devices/slram.c
drivers/mtd/ftl.c
drivers/mtd/inftlcore.c
drivers/mtd/maps/Kconfig
drivers/mtd/maps/Makefile
drivers/mtd/maps/amd76xrom.c
drivers/mtd/maps/bast-flash.c
drivers/mtd/maps/ceiva.c
drivers/mtd/maps/ck804xrom.c [new file with mode: 0644]
drivers/mtd/maps/cstm_mips_ixx.c [deleted file]
drivers/mtd/maps/esb2rom.c [new file with mode: 0644]
drivers/mtd/maps/integrator-flash.c
drivers/mtd/maps/nettel.c
drivers/mtd/maps/omap_nor.c
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/maps/physmap.c
drivers/mtd/maps/physmap_of.c [new file with mode: 0644]
drivers/mtd/maps/plat-ram.c
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/maps/tqm834x.c
drivers/mtd/maps/tqm8xxl.c
drivers/mtd/mtd_blkdevs.c
drivers/mtd/mtdblock.c
drivers/mtd/mtdblock_ro.c
drivers/mtd/mtdchar.c
drivers/mtd/mtdconcat.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/Makefile
drivers/mtd/nand/at91_nand.c [new file with mode: 0644]
drivers/mtd/nand/cafe.c [new file with mode: 0644]
drivers/mtd/nand/cafe_ecc.c [new file with mode: 0644]
drivers/mtd/nand/cs553x_nand.c
drivers/mtd/nand/diskonchip.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/nand_ecc.c
drivers/mtd/nand/nandsim.c
drivers/mtd/nand/ndfc.c
drivers/mtd/nand/rtc_from4.c
drivers/mtd/nand/s3c2410.c
drivers/mtd/nftlcore.c
drivers/mtd/onenand/generic.c
drivers/mtd/onenand/onenand_base.c
drivers/mtd/onenand/onenand_bbt.c
drivers/mtd/redboot.c
drivers/mtd/rfd_ftl.c
drivers/mtd/ssfdc.c
drivers/net/8139cp.c
drivers/net/ehea/ehea.h
drivers/net/ehea/ehea_main.c
drivers/net/ehea/ehea_phyp.c
drivers/net/irda/irda-usb.c
drivers/net/irda/irda-usb.h
drivers/net/irda/stir4200.c
drivers/net/irda/vlsi_ir.c
drivers/net/irda/vlsi_ir.h
drivers/net/mv643xx_eth.c
drivers/net/myri10ge/myri10ge.c
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_hw.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/phy/phy.c
drivers/net/s2io.c
drivers/net/sis190.c
drivers/net/skge.c
drivers/net/sky2.c
drivers/net/ucc_geth.c
drivers/net/ucc_geth_phy.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/pci/pci-driver.c
drivers/pci/quirks.c
drivers/rtc/rtc-sh.c
drivers/scsi/3w-xxxx.c
drivers/scsi/3w-xxxx.h
drivers/scsi/Kconfig
drivers/scsi/aacraid/linit.c
drivers/scsi/advansys.c
drivers/scsi/iscsi_tcp.c
drivers/scsi/libiscsi.c
drivers/scsi/lpfc/lpfc_mem.c
drivers/scsi/megaraid/megaraid_sas.c
drivers/scsi/qla1280.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_gs.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/scsi_transport_spi.c
drivers/scsi/seagate.c
drivers/scsi/sr.c
drivers/usb/core/Kconfig
drivers/usb/core/hub.c
drivers/usb/host/ohci-ep93xx.c
drivers/usb/input/Kconfig
drivers/usb/input/hid-core.c
drivers/usb/input/hid-ff.c
drivers/usb/input/hiddev.c
drivers/usb/input/usbhid.h
drivers/usb/input/usbtouchscreen.c
drivers/usb/net/asix.c
drivers/usb/net/rndis_host.c
drivers/usb/serial/funsoft.c
drivers/usb/serial/option.c
drivers/usb/storage/unusual_devs.h
fs/block_dev.c
fs/cifs/CHANGES
fs/cifs/cifs_debug.c
fs/cifs/cifsfs.h
fs/cifs/misc.c
fs/cifs/sess.c
fs/jffs/jffs_fm.c
fs/jffs2/debug.c
fs/jffs2/debug.h
fs/jffs2/fs.c
fs/jffs2/gc.c
fs/jffs2/nodelist.h
fs/jffs2/readinode.c
fs/jffs2/scan.c
fs/jffs2/summary.c
fs/jffs2/super.c
fs/jffs2/symlink.c
fs/jffs2/wbuf.c
fs/jffs2/xattr.c
fs/nfs/dir.c
fs/nfs/inode.c
fs/nfs/symlink.c
fs/ntfs/ChangeLog
fs/ntfs/Makefile
fs/ntfs/dir.c
fs/ntfs/inode.c
fs/ntfs/inode.h
fs/ntfs/super.c
fs/ocfs2/export.c
fs/ocfs2/inode.c
fs/ocfs2/namei.c
fs/ocfs2/ocfs2_fs.h
fs/ocfs2/symlink.c
fs/reiserfs/file.c
fs/reiserfs/inode.c
include/asm-i386/processor.h
include/asm-ia64/checksum.h
include/asm-mips/checksum.h
include/asm-mips/hazards.h
include/asm-mips/irqflags.h
include/asm-mips/thread_info.h
include/asm-powerpc/atomic.h
include/linux/Kbuild
include/linux/hid-debug.h
include/linux/if_tunnel.h
include/linux/libata.h
include/linux/mmc/mmc.h
include/linux/mtd/blktrans.h
include/linux/mtd/mtd.h
include/linux/mtd/nand.h
include/linux/mtd/onenand.h
include/linux/mtd/onenand_regs.h
include/linux/mtio.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/nfs_fs.h
include/linux/qic117.h [deleted file]
include/linux/reiserfs_fs_i.h
include/linux/sunrpc/sched.h
include/linux/videodev2.h
include/net/netfilter/nf_conntrack_compat.h
include/net/sctp/sm.h
ipc/shm.c
kernel/irq/manage.c
kernel/profile.c
kernel/sys.c
mm/mempolicy.c
net/bluetooth/l2cap.c
net/core/flow.c
net/ipv4/netfilter/ip_conntrack_netlink.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c
net/ipv4/tcp_probe.c
net/ipv6/addrconf.c
net/ipv6/mcast.c
net/ipv6/route.c
net/netfilter/nf_conntrack_netlink.c
net/sctp/sm_make_chunk.c
net/sctp/sm_sideeffect.c
net/sctp/sm_statefuns.c
net/sctp/sm_statetable.c
net/sunrpc/clnt.c
net/sunrpc/sched.c
net/x25/x25_dev.c
net/xfrm/xfrm_policy.c
security/selinux/ss/services.c
sound/usb/usx2y/usbusx2yaudio.c
sound/usb/usx2y/usx2yhwdeppcm.c

diff --git a/CREDITS b/CREDITS
index 75c5ce82720c97ac4a2bd2f5c445386be64f6a20..ae08e4c10ed4f5c2364db7326cbdd4a7cce529f8 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -3279,7 +3279,7 @@ S: Sevilla 41005
 S: Spain
 
 N: Linus Torvalds
-E: torvalds@osdl.org
+E: torvalds@linux-foundation.org
 D: Original kernel hacker
 S: 12725 SW Millikan Way, Suite 400
 S: Beaverton, Oregon 97005
index 07a635590b36e8ff8c8a61086adb34e9d907bd65..e2e24b4778d447b8335e3f447f51883b618c306b 100644 (file)
@@ -883,7 +883,7 @@ and other resources, etc.
   </chapter>
 
   <chapter id="ataExceptions">
-     <title>ATA errors &amp; exceptions</title>
+     <title>ATA errors and exceptions</title>
 
   <para>
   This chapter tries to identify what error/exception conditions exist
index 2270efa101530f8f1de58e951d9c7b4a1f6969d0..bfbb2718a2799b972fa6663ffbc0b34a7b88b999 100644 (file)
@@ -72,3 +72,7 @@ kernel patches.
 
     If the new code is substantial, addition of subsystem-specific fault
     injection might be appropriate.
+
+22: Newly-added code has been compiled with `gcc -W'.  This will generate
+    lots of noise, but is good for finding bugs like "warning: comparison
+    between signed and unsigned".
index 302d148c2e18f0e0fe565bc9c9c1a2f4b232d346..b0d0043f7c46cdde154f6be25fe33ba3a98b645d 100644 (file)
@@ -134,9 +134,9 @@ Do not send more than 15 patches at once to the vger mailing lists!!!
 
 
 Linus Torvalds is the final arbiter of all changes accepted into the
-Linux kernel.  His e-mail address is <torvalds@osdl.org>.  He gets
-a lot of e-mail, so typically you should do your best to -avoid- sending
-him e-mail.
+Linux kernel.  His e-mail address is <torvalds@linux-foundation.org>. 
+He gets a lot of e-mail, so typically you should do your best to -avoid-
+sending him e-mail. 
 
 Patches which are bug fixes, are "obvious" changes, or similarly
 require little discussion should be sent or CC'd to Linus.  Patches
index fc532395d11687103d21748d59a61570e74c6c15..0ba6af02cdaf9ce2b48b11767d54ad06d4ff918e 100644 (file)
@@ -318,3 +318,10 @@ Why:       /proc/acpi/button has been replaced by events to the input layer
 Who:   Len Brown <len.brown@intel.com>
 
 ---------------------------
+
+What:  JFFS (version 1)
+When:  2.6.21
+Why:   Unmaintained for years, superceded by JFFS2 for years.
+Who:   Jeff Garzik <jeff@garzik.org>
+
+---------------------------
index 13ba649bda75dae1010891a62da6399ca25d7113..81779068b09bc4b63274460cf0a40977bf4b1bfd 100644 (file)
@@ -457,6 +457,8 @@ ChangeLog
 
 Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
 
+2.1.28:
+       - Fix a deadlock.
 2.1.27:
        - Implement page migration support so the kernel can move memory used
          by NTFS files and directories around for management purposes.
index 45e5408340e06c9b41fbc65eb802a925ad46133c..51171a83165bab36fbda7c6d44d9a124be6ec0d6 100644 (file)
@@ -45,18 +45,14 @@ This driver implements support for Winbond W83793G/W83793R chips.
   temp5-6 have a 1 degree Celsiis resolution.
 
 * Temperature sensor types
-  Temp1-4 have 3 possible types. It can be read from (and written to)
+  Temp1-4 have 2 possible types. It can be read from (and written to)
   temp[1-4]_type.
-  - If the value of 0, the related temperature channel stops
-    monitoring.
   - If the value is 3, it starts monitoring using a remote termal diode
     (default).
-  - If the value is 5, it starts monitoring using the temperature sensor
-    in AMD CPU and get result by AMDSI.
   - If the value is 6, it starts monitoring using the temperature sensor
     in Intel CPU and get result by PECI.
   Temp5-6 can be connected to external thermistors (value of
-  temp[5-6]_type is 4). They can also be disabled (value is 0).
+  temp[5-6]_type is 4).
 
 * Alarm mechanism
   For voltage sensors, an alarm triggers if the measured value is below
index 5af6676a88f05ed3e8a3bc6bef8a885ac29f30e1..073306818347fad7b2899a6a9eaa704c38a39723 100644 (file)
@@ -17,7 +17,7 @@ You can use common Linux commands, such as cp and scp, to copy the
 memory image to a dump file on the local disk, or across the network to
 a remote system.
 
-Kdump and kexec are currently supported on the x86, x86_64, ppc64 and IA64
+Kdump and kexec are currently supported on the x86, x86_64, ppc64 and ia64
 architectures.
 
 When the system kernel boots, it reserves a small section of memory for
@@ -61,7 +61,12 @@ Install kexec-tools
 
 2) Download the kexec-tools user-space package from the following URL:
 
-http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-testing-20061214.tar.gz
+http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-testing.tar.gz
+
+This is a symlink to the latest version, which at the time of writing is
+20061214, the only release of kexec-tools-testing so far. As other versions
+are made released, the older onese will remain available at
+http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
 
 Note: Latest kexec-tools-testing git tree is available at
 
@@ -71,11 +76,11 @@ http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools-testing.git;a=su
 
 3) Unpack the tarball with the tar command, as follows:
 
-   tar xvpzf kexec-tools-testing-20061214.tar.gz
+   tar xvpzf kexec-tools-testing.tar.gz
 
-4) Change to the kexec-tools-1.101 directory, as follows:
+4) Change to the kexec-tools directory, as follows:
 
-   cd kexec-tools-testing-20061214
+   cd kexec-tools-testing-VERSION
 
 5) Configure the package, as follows:
 
@@ -224,7 +229,23 @@ Dump-capture kernel config options (Arch Dependent, ppc64)
 
 Dump-capture kernel config options (Arch Dependent, ia64)
 ----------------------------------------------------------
-(To be filled)
+
+- No specific options are required to create a dump-capture kernel
+  for ia64, other than those specified in the arch idependent section
+  above. This means that it is possible to use the system kernel
+  as a dump-capture kernel if desired.
+
+  The crashkernel region can be automatically placed by the system
+  kernel at run time. This is done by specifying the base address as 0,
+  or omitting it all together.
+
+  crashkernel=256M@0
+  or
+  crashkernel=256M
+
+  If the start address is specified, note that the start address of the
+  kernel will be aligned to 64Mb, so if the start address is not then
+  any space below the alignment point will be wasted.
 
 
 Boot into System Kernel
@@ -243,6 +264,10 @@ Boot into System Kernel
 
    On ppc64, use "crashkernel=128M@32M".
 
+   On ia64, 256M@256M is a generous value that typically works.
+   The region may be automatically placed on ia64, see the
+   dump-capture kernel config option notes above.
+
 Load the Dump-capture Kernel
 ============================
 
@@ -261,7 +286,8 @@ For x86_64:
 For ppc64:
        - Use vmlinux
 For ia64:
-       (To be filled)
+       - Use vmlinux or vmlinuz.gz
+
 
 If you are using a uncompressed vmlinux image then use following command
 to load dump-capture kernel.
@@ -277,18 +303,19 @@ to load dump-capture kernel.
    --initrd=<initrd-for-dump-capture-kernel> \
    --append="root=<root-dev> <arch-specific-options>"
 
+Please note, that --args-linux does not need to be specified for ia64.
+It is planned to make this a no-op on that architecture, but for now
+it should be omitted
+
 Following are the arch specific command line options to be used while
 loading dump-capture kernel.
 
-For i386 and x86_64:
+For i386, x86_64 and ia64:
        "init 1 irqpoll maxcpus=1"
 
 For ppc64:
        "init 1 maxcpus=1 noirqdistrib"
 
-For IA64
-       (To be filled)
-
 
 Notes on loading the dump-capture kernel:
 
index 2b395e478961ca6606a97dfce813c0da91346317..fd5028eca13e68a99cee05d613eff1ac43b9b9a2 100644 (file)
-                        How To Write Linux PCI Drivers
 
-                  by Martin Mares <mj@ucw.cz> on 07-Feb-2000
+                       How To Write Linux PCI Drivers
+
+               by Martin Mares <mj@ucw.cz> on 07-Feb-2000
+       updated by Grant Grundler <grundler@parisc-linux.org> on 23-Dec-2006
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The world of PCI is vast and it's full of (mostly unpleasant) surprises.
-Different PCI devices have different requirements and different bugs --
-because of this, the PCI support layer in Linux kernel is not as trivial
-as one would wish. This short pamphlet tries to help all potential driver
-authors find their way through the deep forests of PCI handling.
+The world of PCI is vast and full of (mostly unpleasant) surprises.
+Since each CPU architecture implements different chip-sets and PCI devices
+have different requirements (erm, "features"), the result is the PCI support
+in the Linux kernel is not as trivial as one would wish. This short paper
+tries to introduce all potential driver authors to Linux APIs for
+PCI device drivers.
+
+A more complete resource is the third edition of "Linux Device Drivers"
+by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman.
+LDD3 is available for free (under Creative Commons License) from:
+
+       http://lwn.net/Kernel/LDD3/
+
+However, keep in mind that all documents are subject to "bit rot".
+Refer to the source code if things are not working as described here.
+
+Please send questions/comments/patches about Linux PCI API to the
+"Linux PCI" <linux-pci@atrey.karlin.mff.cuni.cz> mailing list.
+
 
 
 0. Structure of PCI drivers
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-There exist two kinds of PCI drivers: new-style ones (which leave most of
-probing for devices to the PCI layer and support online insertion and removal
-of devices [thus supporting PCI, hot-pluggable PCI and CardBus in a single
-driver]) and old-style ones which just do all the probing themselves. Unless
-you have a very good reason to do so, please don't use the old way of probing
-in any new code. After the driver finds the devices it wishes to operate
-on (either the old or the new way), it needs to perform the following steps:
+PCI drivers "discover" PCI devices in a system via pci_register_driver().
+Actually, it's the other way around. When the PCI generic code discovers
+a new device, the driver with a matching "description" will be notified.
+Details on this below.
+
+pci_register_driver() leaves most of the probing for devices to
+the PCI layer and supports online insertion/removal of devices [thus
+supporting hot-pluggable PCI, CardBus, and Express-Card in a single driver].
+pci_register_driver() call requires passing in a table of function
+pointers and thus dictates the high level structure of a driver.
+
+Once the driver knows about a PCI device and takes ownership, the
+driver generally needs to perform the following initialization:
 
        Enable the device
-       Access device configuration space
-       Discover resources (addresses and IRQ numbers) provided by the device
-       Allocate these resources
-       Communicate with the device
+       Request MMIO/IOP resources
+       Set the DMA mask size (for both coherent and streaming DMA)
+       Allocate and initialize shared control data (pci_allocate_coherent())
+       Access device configuration space (if needed)
+       Register IRQ handler (request_irq())
+       Initialize non-PCI (i.e. LAN/SCSI/etc parts of the chip)
+       Enable DMA/processing engines
+
+When done using the device, and perhaps the module needs to be unloaded,
+the driver needs to take the follow steps:
+       Disable the device from generating IRQs
+       Release the IRQ (free_irq())
+       Stop all DMA activity
+       Release DMA buffers (both streaming and coherent)
+       Unregister from other subsystems (e.g. scsi or netdev)
+       Release MMIO/IOP resources
        Disable the device
 
-Most of these topics are covered by the following sections, for the rest
-look at <linux/pci.h>, it's hopefully well commented.
+Most of these topics are covered in the following sections.
+For the rest look at LDD3 or <linux/pci.h> .
 
 If the PCI subsystem is not configured (CONFIG_PCI is not set), most of
-the functions described below are defined as inline functions either completely
-empty or just returning an appropriate error codes to avoid lots of ifdefs
-in the drivers.
+the PCI functions described below are defined as inline functions either
+completely empty or just returning an appropriate error codes to avoid
+lots of ifdefs in the drivers.
+
 
 
-1. New-style drivers
-~~~~~~~~~~~~~~~~~~~~
-The new-style drivers just call pci_register_driver during their initialization
-with a pointer to a structure describing the driver (struct pci_driver) which
-contains:
+1. pci_register_driver() call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-       name            Name of the driver
+PCI device drivers call pci_register_driver() during their
+initialization with a pointer to a structure describing the driver
+(struct pci_driver):
+
+       field name      Description
+       ----------      ------------------------------------------------------
        id_table        Pointer to table of device ID's the driver is
                        interested in.  Most drivers should export this
                        table using MODULE_DEVICE_TABLE(pci,...).
-       probe           Pointer to a probing function which gets called (during
-                       execution of pci_register_driver for already existing
-                       devices or later if a new device gets inserted) for all
-                       PCI devices which match the ID table and are not handled
-                       by the other drivers yet. This function gets passed a
-                       pointer to the pci_dev structure representing the device
-                       and also which entry in the ID table did the device
-                       match. It returns zero when the driver has accepted the
-                       device or an error code (negative number) otherwise.
-                       This function always gets called from process context,
-                       so it can sleep.
-       remove          Pointer to a function which gets called whenever a
-                       device being handled by this driver is removed (either
-                       during deregistration of the driver or when it's
-                       manually pulled out of a hot-pluggable slot). This
-                       function always gets called from process context, so it
-                       can sleep.
-       save_state      Save a device's state before it's suspend.
+
+       probe           This probing function gets called (during execution
+                       of pci_register_driver() for already existing
+                       devices or later if a new device gets inserted) for
+                       all PCI devices which match the ID table and are not
+                       "owned" by the other drivers yet. This function gets
+                       passed a "struct pci_dev *" for each device whose
+                       entry in the ID table matches the device. The probe
+                       function returns zero when the driver chooses to
+                       take "ownership" of the device or an error code
+                       (negative number) otherwise.
+                       The probe function always gets called from process
+                       context, so it can sleep.
+
+       remove          The remove() function gets called whenever a device
+                       being handled by this driver is removed (either during
+                       deregistration of the driver or when it's manually
+                       pulled out of a hot-pluggable slot).
+                       The remove function always gets called from process
+                       context, so it can sleep.
+
        suspend         Put device into low power state.
+       suspend_late    Put device into low power state.
+
+       resume_early    Wake device from low power state.
        resume          Wake device from low power state.
+
+               (Please see Documentation/power/pci.txt for descriptions
+               of PCI Power Management and the related functions.)
+
        enable_wake     Enable device to generate wake events from a low power
                        state.
 
-                       (Please see Documentation/power/pci.txt for descriptions
-                       of PCI Power Management and the related functions)
+       shutdown        Hook into reboot_notifier_list (kernel/sys.c).
+                       Intended to stop any idling DMA operations.
+                       Useful for enabling wake-on-lan (NIC) or changing
+                       the power state of a device before reboot.
+                       e.g. drivers/net/e100.c.
+
+       err_handler     See Documentation/pci-error-recovery.txt
+
+       multithread_probe       Enable multi-threaded probe/scan. Driver must
+                       provide its own locking/syncronization for init
+                       operations if this is enabled.
+
 
-The ID table is an array of struct pci_device_id ending with a all-zero entry.
-Each entry consists of:
+The ID table is an array of struct pci_device_id entries ending with an
+all-zero entry.  Each entry consists of:
+
+       vendor,device   Vendor and device ID to match (or PCI_ANY_ID)
 
-       vendor, device  Vendor and device ID to match (or PCI_ANY_ID)
        subvendor,      Subsystem vendor and device ID to match (or PCI_ANY_ID)
-       subdevice
-       class,          Device class to match. The class_mask tells which bits
-       class_mask      of the class are honored during the comparison.
+       subdevice,
+
+       class           Device class, subclass, and "interface" to match.
+                       See Appendix D of the PCI Local Bus Spec or
+                       include/linux/pci_ids.h for a full list of classes.
+                       Most drivers do not need to specify class/class_mask
+                       as vendor/device is normally sufficient.
+
+       class_mask      limit which sub-fields of the class field are compared.
+                       See drivers/scsi/sym53c8xx_2/ for example of usage.
+
        driver_data     Data private to the driver.
+                       Most drivers don't need to use driver_data field.
+                       Best practice is to use driver_data as an index
+                       into a static list of equivalent device types,
+                       instead of using it as a pointer.
 
-Most drivers don't need to use the driver_data field.  Best practice
-for use of driver_data is to use it as an index into a static list of
-equivalent device types, not to use it as a pointer.
 
-Have a table entry {PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID}
-to have probe() called for every PCI device known to the system.
+Most drivers only need PCI_DEVICE() or PCI_DEVICE_CLASS() to set up
+a pci_device_id table.
 
-New PCI IDs may be added to a device driver at runtime by writing
-to the file /sys/bus/pci/drivers/{driver}/new_id.  When added, the
-driver will probe for all devices it can support.
+New PCI IDs may be added to a device driver pci_ids table at runtime
+as shown below:
 
 echo "vendor device subvendor subdevice class class_mask driver_data" > \
- /sys/bus/pci/drivers/{driver}/new_id
-where all fields are passed in as hexadecimal values (no leading 0x).
-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 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.
+/sys/bus/pci/drivers/{driver}/new_id
+
+All fields are passed in as hexadecimal values (no leading 0x).
+Users need pass only as many fields as necessary:
+       o vendor, device, subvendor, and subdevice fields default
+         to PCI_ANY_ID (FFFFFFFF),
+       o class and classmask fields default to 0
+       o driver_data defaults to 0UL.
+
+Once added, the driver probe routine will be invoked for any unclaimed
+PCI devices listed in its (newly updated) pci_ids list.
 
 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.
 
+
+1.1 "Attributes" for driver functions/data
+
 Please mark the initialization and cleanup functions where appropriate
 (the corresponding macros are defined in <linux/init.h>):
 
        __init          Initialization code. Thrown away after the driver
                        initializes.
        __exit          Exit code. Ignored for non-modular drivers.
-       __devinit       Device initialization code. Identical to __init if
-                       the kernel is not compiled with CONFIG_HOTPLUG, normal
-                       function otherwise.
+
+
+       __devinit       Device initialization code.
+                       Identical to __init if the kernel is not compiled
+                       with CONFIG_HOTPLUG, normal function otherwise.
        __devexit       The same for __exit.
 
-Tips:
-       The module_init()/module_exit() functions (and all initialization
-        functions called only from these) should be marked __init/exit.
-       The struct pci_driver shouldn't be marked with any of these tags.
-       The ID table array should be marked __devinitdata.
-       The probe() and remove() functions (and all initialization
-       functions called only from these) should be marked __devinit/exit.
-       If you are sure the driver is not a hotplug driver then use only 
-       __init/exit __initdata/exitdata.
+Tips on when/where to use the above attributes:
+       o The module_init()/module_exit() functions (and all
+         initialization functions called _only_ from these)
+         should be marked __init/__exit.
 
-        Pointers to functions marked as __devexit must be created using
-        __devexit_p(function_name).  That will generate the function
-        name or NULL if the __devexit function will be discarded.
+       o Do not mark the struct pci_driver.
 
+       o The ID table array should be marked __devinitdata.
 
-2. How to find PCI devices manually (the old style)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-PCI drivers not using the pci_register_driver() interface search
-for PCI devices manually using the following constructs:
+       o The probe() and remove() functions should be marked __devinit
+         and __devexit respectively.  All initialization functions
+         exclusively called by the probe() routine, can be marked __devinit.
+         Ditto for remove() and __devexit.
+
+       o If mydriver_probe() is marked with __devinit(), then all address
+         references to mydriver_probe must use __devexit_p(mydriver_probe)
+         (in the struct pci_driver declaration for example).
+         __devexit_p() will generate the function name _or_ NULL if the
+         function will be discarded.  For an example, see drivers/net/tg3.c.
+
+       o Do NOT mark a function if you are not sure which mark to use.
+         Better to not mark the function than mark the function wrong.
+
+
+
+2. How to find PCI devices manually
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PCI drivers should have a really good reason for not using the
+pci_register_driver() interface to search for PCI devices.
+The main reason PCI devices are controlled by multiple drivers
+is because one PCI device implements several different HW services.
+E.g. combined serial/parallel port/floppy controller.
+
+A manual search may be performed using the following constructs:
 
 Searching by vendor and device ID:
 
@@ -150,87 +239,311 @@ Searching by class ID (iterate in a similar way):
 
 Searching by both vendor/device and subsystem vendor/device ID:
 
-       pci_get_subsys(VENDOR_ID, DEVICE_ID, SUBSYS_VENDOR_ID, SUBSYS_DEVICE_ID, dev).
+       pci_get_subsys(VENDOR_ID,DEVICE_ID, SUBSYS_VENDOR_ID, SUBSYS_DEVICE_ID, dev).
 
-   You can use the constant PCI_ANY_ID as a wildcard replacement for
+You can use the constant PCI_ANY_ID as a wildcard replacement for
 VENDOR_ID or DEVICE_ID.  This allows searching for any device from a
 specific vendor, for example.
 
-   These functions are hotplug-safe. They increment the reference count on
+These functions are hotplug-safe. They increment the reference count on
 the pci_dev that they return. You must eventually (possibly at module unload)
 decrement the reference count on these devices by calling pci_dev_put().
 
 
-3. Enabling and disabling devices
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-   Before you do anything with the device you've found, you need to enable
-it by calling pci_enable_device() which enables I/O and memory regions of
-the device, allocates an IRQ if necessary, assigns missing resources if
-needed and wakes up the device if it was in suspended state. Please note
-that this function can fail.
 
-   If you want to use the device in bus mastering mode, call pci_set_master()
-which enables the bus master bit in PCI_COMMAND register and also fixes
-the latency timer value if it's set to something bogus by the BIOS.
+3. Device Initialization Steps
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As noted in the introduction, most PCI drivers need the following steps
+for device initialization:
 
-   If you want to use the PCI Memory-Write-Invalidate transaction,
+       Enable the device
+       Request MMIO/IOP resources
+       Set the DMA mask size (for both coherent and streaming DMA)
+       Allocate and initialize shared control data (pci_allocate_coherent())
+       Access device configuration space (if needed)
+       Register IRQ handler (request_irq())
+       Initialize non-PCI (i.e. LAN/SCSI/etc parts of the chip)
+       Enable DMA/processing engines.
+
+The driver can access PCI config space registers at any time.
+(Well, almost. When running BIST, config space can go away...but
+that will just result in a PCI Bus Master Abort and config reads
+will return garbage).
+
+
+3.1 Enable the PCI device
+~~~~~~~~~~~~~~~~~~~~~~~~~
+Before touching any device registers, the driver needs to enable
+the PCI device by calling pci_enable_device(). This will:
+       o wake up the device if it was in suspended state,
+       o allocate I/O and memory regions of the device (if BIOS did not),
+       o allocate an IRQ (if BIOS did not).
+
+NOTE: pci_enable_device() can fail! Check the return value.
+NOTE2: Also see pci_enable_device_bars() below. Drivers can
+    attempt to enable only a subset of BARs they need.
+
+[ OS BUG: we don't check resource allocations before enabling those
+  resources. The sequence would make more sense if we called
+  pci_request_resources() before calling pci_enable_device().
+  Currently, the device drivers can't detect the bug when when two
+  devices have been allocated the same range. This is not a common
+  problem and unlikely to get fixed soon.
+
+  This has been discussed before but not changed as of 2.6.19:
+       http://lkml.org/lkml/2006/3/2/194
+]
+
+pci_set_master() will enable DMA by setting the bus master bit
+in the PCI_COMMAND register. It also fixes the latency timer value if
+it's set to something bogus by the BIOS.
+
+If the PCI device can use the PCI Memory-Write-Invalidate transaction,
 call pci_set_mwi().  This enables the PCI_COMMAND bit for Mem-Wr-Inval
 and also ensures that the cache line size register is set correctly.
-Make sure to check the return value of pci_set_mwi(), not all architectures
-may support Memory-Write-Invalidate.
+Check the return value of pci_set_mwi() as not all architectures
+or chip-sets may support Memory-Write-Invalidate.
+
+
+3.2 Request MMIO/IOP resources
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Memory (MMIO), and I/O port addresses should NOT be read directly
+from the PCI device config space. Use the values in the pci_dev structure
+as the PCI "bus address" might have been remapped to a "host physical"
+address by the arch/chip-set specific kernel support.
 
-   If your driver decides to stop using the device (e.g., there was an
-error while setting it up or the driver module is being unloaded), it
-should call pci_disable_device() to deallocate any IRQ resources, disable
-PCI bus-mastering, etc.  You should not do anything with the device after
+See Documentation/IO-mapping.txt for how to access device registers
+or device memory.
+
+The device driver needs to call pci_request_region() to verify
+no other device is already using the same address resource.
+Conversely, drivers should call pci_release_region() AFTER
 calling pci_disable_device().
+The idea is to prevent two devices colliding on the same address range.
+
+[ See OS BUG comment above. Currently (2.6.19), The driver can only
+  determine MMIO and IO Port resource availability _after_ calling
+  pci_enable_device(). ]
+
+Generic flavors of pci_request_region() are request_mem_region()
+(for MMIO ranges) and request_region() (for IO Port ranges).
+Use these for address resources that are not described by "normal" PCI
+BARs.
+
+Also see pci_request_selected_regions() below.
+
+
+3.3 Set the DMA mask size
+~~~~~~~~~~~~~~~~~~~~~~~~~
+[ If anything below doesn't make sense, please refer to
+  Documentation/DMA-API.txt. This section is just a reminder that
+  drivers need to indicate DMA capabilities of the device and is not
+  an authoritative source for DMA interfaces. ]
+
+While all drivers should explicitly indicate the DMA capability
+(e.g. 32 or 64 bit) of the PCI bus master, devices with more than
+32-bit bus master capability for streaming data need the driver
+to "register" this capability by calling pci_set_dma_mask() with
+appropriate parameters.  In general this allows more efficient DMA
+on systems where System RAM exists above 4G _physical_ address.
+
+Drivers for all PCI-X and PCIe compliant devices must call
+pci_set_dma_mask() as they are 64-bit DMA devices.
+
+Similarly, drivers must also "register" this capability if the device
+can directly address "consistent memory" in System RAM above 4G physical
+address by calling pci_set_consistent_dma_mask().
+Again, this includes drivers for all PCI-X and PCIe compliant devices.
+Many 64-bit "PCI" devices (before PCI-X) and some PCI-X devices are
+64-bit DMA capable for payload ("streaming") data but not control
+("consistent") data.
+
+
+3.4 Setup shared control data
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Once the DMA masks are set, the driver can allocate "consistent" (a.k.a. shared)
+memory.  See Documentation/DMA-API.txt for a full description of
+the DMA APIs. This section is just a reminder that it needs to be done
+before enabling DMA on the device.
+
+
+3.5 Initialize device registers
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Some drivers will need specific "capability" fields programmed
+or other "vendor specific" register initialized or reset.
+E.g. clearing pending interrupts.
+
+
+3.6 Register IRQ handler
+~~~~~~~~~~~~~~~~~~~~~~~~
+While calling request_irq() is the the last step described here,
+this is often just another intermediate step to initialize a device.
+This step can often be deferred until the device is opened for use.
+
+All interrupt handlers for IRQ lines should be registered with IRQF_SHARED
+and use the devid to map IRQs to devices (remember that all PCI IRQ lines
+can be shared).
+
+request_irq() will associate an interrupt handler and device handle
+with an interrupt number. Historically interrupt numbers represent
+IRQ lines which run from the PCI device to the Interrupt controller.
+With MSI and MSI-X (more below) the interrupt number is a CPU "vector".
+
+request_irq() also enables the interrupt. Make sure the device is
+quiesced and does not have any interrupts pending before registering
+the interrupt handler.
+
+MSI and MSI-X are PCI capabilities. Both are "Message Signaled Interrupts"
+which deliver interrupts to the CPU via a DMA write to a Local APIC.
+The fundamental difference between MSI and MSI-X is how multiple
+"vectors" get allocated. MSI requires contiguous blocks of vectors
+while MSI-X can allocate several individual ones.
+
+MSI capability can be enabled by calling pci_enable_msi() or
+pci_enable_msix() before calling request_irq(). This causes
+the PCI support to program CPU vector data into the PCI device
+capability registers.
+
+If your PCI device supports both, try to enable MSI-X first.
+Only one can be enabled at a time.  Many architectures, chip-sets,
+or BIOSes do NOT support MSI or MSI-X and the call to pci_enable_msi/msix
+will fail. This is important to note since many drivers have
+two (or more) interrupt handlers: one for MSI/MSI-X and another for IRQs.
+They choose which handler to register with request_irq() based on the
+return value from pci_enable_msi/msix().
+
+There are (at least) two really good reasons for using MSI:
+1) MSI is an exclusive interrupt vector by definition.
+   This means the interrupt handler doesn't have to verify
+   its device caused the interrupt.
+
+2) MSI avoids DMA/IRQ race conditions. DMA to host memory is guaranteed
+   to be visible to the host CPU(s) when the MSI is delivered. This
+   is important for both data coherency and avoiding stale control data.
+   This guarantee allows the driver to omit MMIO reads to flush
+   the DMA stream.
+
+See drivers/infiniband/hw/mthca/ or drivers/net/tg3.c for examples
+of MSI/MSI-X usage.
+
+
+
+4. PCI device shutdown
+~~~~~~~~~~~~~~~~~~~~~~~
+
+When a PCI device driver is being unloaded, most of the following
+steps need to be performed:
+
+       Disable the device from generating IRQs
+       Release the IRQ (free_irq())
+       Stop all DMA activity
+       Release DMA buffers (both streaming and consistent)
+       Unregister from other subsystems (e.g. scsi or netdev)
+       Disable device from responding to MMIO/IO Port addresses
+       Release MMIO/IO Port resource(s)
+
+
+4.1 Stop IRQs on the device
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+How to do this is chip/device specific. If it's not done, it opens
+the possibility of a "screaming interrupt" if (and only if)
+the IRQ is shared with another device.
+
+When the shared IRQ handler is "unhooked", the remaining devices
+using the same IRQ line will still need the IRQ enabled. Thus if the
+"unhooked" device asserts IRQ line, the system will respond assuming
+it was one of the remaining devices asserted the IRQ line. Since none
+of the other devices will handle the IRQ, the system will "hang" until
+it decides the IRQ isn't going to get handled and masks the IRQ (100,000
+iterations later). Once the shared IRQ is masked, the remaining devices
+will stop functioning properly. Not a nice situation.
+
+This is another reason to use MSI or MSI-X if it's available.
+MSI and MSI-X are defined to be exclusive interrupts and thus
+are not susceptible to the "screaming interrupt" problem.
+
+
+4.2 Release the IRQ
+~~~~~~~~~~~~~~~~~~~
+Once the device is quiesced (no more IRQs), one can call free_irq().
+This function will return control once any pending IRQs are handled,
+"unhook" the drivers IRQ handler from that IRQ, and finally release
+the IRQ if no one else is using it.
+
+
+4.3 Stop all DMA activity
+~~~~~~~~~~~~~~~~~~~~~~~~~
+It's extremely important to stop all DMA operations BEFORE attempting
+to deallocate DMA control data. Failure to do so can result in memory
+corruption, hangs, and on some chip-sets a hard crash.
 
-4. How to access PCI config space
+Stopping DMA after stopping the IRQs can avoid races where the
+IRQ handler might restart DMA engines.
+
+While this step sounds obvious and trivial, several "mature" drivers
+didn't get this step right in the past.
+
+
+4.4 Release DMA buffers
+~~~~~~~~~~~~~~~~~~~~~~~
+Once DMA is stopped, clean up streaming DMA first.
+I.e. unmap data buffers and return buffers to "upstream"
+owners if there is one.
+
+Then clean up "consistent" buffers which contain the control data.
+
+See Documentation/DMA-API.txt for details on unmapping interfaces.
+
+
+4.5 Unregister from other subsystems
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Most low level PCI device drivers support some other subsystem
+like USB, ALSA, SCSI, NetDev, Infiniband, etc. Make sure your
+driver isn't losing resources from that other subsystem.
+If this happens, typically the symptom is an Oops (panic) when
+the subsystem attempts to call into a driver that has been unloaded.
+
+
+4.6 Disable Device from responding to MMIO/IO Port addresses
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+io_unmap() MMIO or IO Port resources and then call pci_disable_device().
+This is the symmetric opposite of pci_enable_device().
+Do not access device registers after calling pci_disable_device().
+
+
+4.7 Release MMIO/IO Port Resource(s)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Call pci_release_region() to mark the MMIO or IO Port range as available.
+Failure to do so usually results in the inability to reload the driver.
+
+
+
+5. How to access PCI config space
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-   You can use pci_(read|write)_config_(byte|word|dword) to access the config
+
+You can use pci_(read|write)_config_(byte|word|dword) to access the config
 space of a device represented by struct pci_dev *. All these functions return 0
 when successful or an error code (PCIBIOS_...) which can be translated to a text
 string by pcibios_strerror. Most drivers expect that accesses to valid PCI
 devices don't fail.
 
-   If you don't have a struct pci_dev available, you can call
+If you don't have a struct pci_dev available, you can call
 pci_bus_(read|write)_config_(byte|word|dword) to access a given device
 and function on that bus.
 
-   If you access fields in the standard portion of the config header, please
+If you access fields in the standard portion of the config header, please
 use symbolic names of locations and bits declared in <linux/pci.h>.
 
-   If you need to access Extended PCI Capability registers, just call
+If you need to access Extended PCI Capability registers, just call
 pci_find_capability() for the particular capability and it will find the
 corresponding register block for you.
 
 
-5. Addresses and interrupts
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-   Memory and port addresses and interrupt numbers should NOT be read from the
-config space. You should use the values in the pci_dev structure as they might
-have been remapped by the kernel.
-
-   See Documentation/IO-mapping.txt for how to access device memory.
-
-   The device driver needs to call pci_request_region() to make sure
-no other device is already using the same resource. The driver is expected
-to determine MMIO and IO Port resource availability _before_ calling
-pci_enable_device().  Conversely, drivers should call pci_release_region()
-_after_ calling pci_disable_device(). The idea is to prevent two devices
-colliding on the same address range.
-
-Generic flavors of pci_request_region() are request_mem_region()
-(for MMIO ranges) and request_region() (for IO Port ranges).
-Use these for address resources that are not described by "normal" PCI
-interfaces (e.g. BAR).
-
-   All interrupt handlers should be registered with IRQF_SHARED and use the devid
-to map IRQs to devices (remember that all PCI interrupts are shared).
-
 
 6. Other interesting functions
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 pci_find_slot()                        Find pci_dev corresponding to given bus and
                                slot numbers.
 pci_set_power_state()          Set PCI Power Management state (0=D0 ... 3=D3)
@@ -247,11 +560,12 @@ pci_set_mwi()                     Enable Memory-Write-Invalidate transactions.
 pci_clear_mwi()                        Disable Memory-Write-Invalidate transactions.
 
 
+
 7. Miscellaneous hints
 ~~~~~~~~~~~~~~~~~~~~~~
-When displaying PCI slot names to the user (for example when a driver wants
-to tell the user what card has it found), please use pci_name(pci_dev)
-for this purpose.
+
+When displaying PCI device names to the user (for example when a driver wants
+to tell the user what card has it found), please use pci_name(pci_dev).
 
 Always refer to the PCI devices by a pointer to the pci_dev structure.
 All PCI layer functions use this identification and it's the only
@@ -259,31 +573,113 @@ reasonable one. Don't use bus/slot/function numbers except for very
 special purposes -- on systems with multiple primary buses their semantics
 can be pretty complex.
 
-If you're going to use PCI bus mastering DMA, take a look at
-Documentation/DMA-mapping.txt.
-
 Don't try to turn on Fast Back to Back writes in your driver.  All devices
 on the bus need to be capable of doing it, so this is something which needs
 to be handled by platform and generic code, not individual drivers.
 
 
+
 8. Vendor and device identifications
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For the future, let's avoid adding device ids to include/linux/pci_ids.h.
 
-PCI_VENDOR_ID_xxx for vendors, and a hex constant for device ids.
+One is not not required to add new device ids to include/linux/pci_ids.h.
+Please add PCI_VENDOR_ID_xxx for vendors and a hex constant for device ids.
+
+PCI_VENDOR_ID_xxx constants are re-used. The device ids are arbitrary
+hex numbers (vendor controlled) and normally used only in a single
+location, the pci_device_id table.
+
+Please DO submit new vendor/device ids to pciids.sourceforge.net project.
+
 
-Rationale:  PCI_VENDOR_ID_xxx constants are re-used, but device ids are not.
-    Further, device ids are arbitrary hex numbers, normally used only in a
-    single location, the pci_device_id table.
 
 9. Obsolete functions
 ~~~~~~~~~~~~~~~~~~~~~
+
 There are several functions which you might come across when trying to
 port an old driver to the new PCI interface.  They are no longer present
 in the kernel as they aren't compatible with hotplug or PCI domains or
 having sane locking.
 
-pci_find_device()              Superseded by pci_get_device()
-pci_find_subsys()              Superseded by pci_get_subsys()
-pci_find_slot()                        Superseded by pci_get_slot()
+pci_find_device()      Superseded by pci_get_device()
+pci_find_subsys()      Superseded by pci_get_subsys()
+pci_find_slot()                Superseded by pci_get_slot()
+
+
+The alternative is the traditional PCI device driver that walks PCI
+device lists. This is still possible but discouraged.
+
+
+
+10. pci_enable_device_bars() and Legacy I/O Port space
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Large servers may not be able to provide I/O port resources to all PCI
+devices. I/O Port space is only 64KB on Intel Architecture[1] and is
+likely also fragmented since the I/O base register of PCI-to-PCI
+bridge will usually be aligned to a 4KB boundary[2]. On such systems,
+pci_enable_device() and pci_request_region() will fail when
+attempting to enable I/O Port regions that don't have I/O Port
+resources assigned.
+
+Fortunately, many PCI devices which request I/O Port resources also
+provide access to the same registers via MMIO BARs. These devices can
+be handled without using I/O port space and the drivers typically
+offer a CONFIG_ option to only use MMIO regions
+(e.g. CONFIG_TULIP_MMIO). PCI devices typically provide I/O port
+interface for legacy OSes and will work when I/O port resources are not
+assigned. The "PCI Local Bus Specification Revision 3.0" discusses
+this on p.44, "IMPLEMENTATION NOTE".
+
+If your PCI device driver doesn't need I/O port resources assigned to
+I/O Port BARs, you should use pci_enable_device_bars() instead of
+pci_enable_device() in order not to enable I/O port regions for the
+corresponding devices. In addition, you should use
+pci_request_selected_regions() and pci_release_selected_regions()
+instead of pci_request_regions()/pci_release_regions() in order not to
+request/release I/O port regions for the corresponding devices.
+
+[1] Some systems support 64KB I/O port space per PCI segment.
+[2] Some PCI-to-PCI bridges support optional 1KB aligned I/O base.
+
+
+
+11. MMIO Space and "Write Posting"
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Converting a driver from using I/O Port space to using MMIO space
+often requires some additional changes. Specifically, "write posting"
+needs to be handled. Many drivers (e.g. tg3, acenic, sym53c8xx_2)
+already do this. I/O Port space guarantees write transactions reach the PCI
+device before the CPU can continue. Writes to MMIO space allow the CPU
+to continue before the transaction reaches the PCI device. HW weenies
+call this "Write Posting" because the write completion is "posted" to
+the CPU before the transaction has reached its destination.
+
+Thus, timing sensitive code should add readl() where the CPU is
+expected to wait before doing other work.  The classic "bit banging"
+sequence works fine for I/O Port space:
+
+       for (i = 8; --i; val >>= 1) {
+               outb(val & 1, ioport_reg);      /* write bit */
+               udelay(10);
+       }
+
+The same sequence for MMIO space should be:
+
+       for (i = 8; --i; val >>= 1) {
+               writeb(val & 1, mmio_reg);      /* write bit */
+               readb(safe_mmio_reg);           /* flush posted write */
+               udelay(10);
+       }
+
+It is important that "safe_mmio_reg" not have any side effects that
+interferes with the correct operation of the device.
+
+Another case to watch out for is when resetting a PCI device. Use PCI
+Configuration space reads to flush the writel(). This will gracefully
+handle the PCI master abort on all platforms if the PCI device is
+expected to not respond to a readl().  Most x86 platforms will allow
+MMIO reads to master abort (a.k.a. "Soft Fail") and return garbage
+(e.g. ~0). But many RISC platforms will crash (a.k.a."Hard Fail").
+
index 7fb3b8a44eb649f1060af13c474c812e181b0f22..69f016f02bb0f6055913528b2fa19428872a6584 100644 (file)
@@ -4,6 +4,12 @@ MPC52xx Device Tree Bindings
 (c) 2006 Secret Lab Technologies Ltd
 Grant Likely <grant.likely at secretlab.ca>
 
+********** DRAFT ***********
+* WARNING: Do not depend on the stability of these bindings just yet.
+* The MPC5200 device tree conventions are still in flux
+* Keep an eye on the linuxppc-dev mailing list for more details
+********** DRAFT ***********
+
 I - Introduction
 ================
 Boards supported by the arch/powerpc architecture require device tree be
index 3367130e64f6508b5501cfc2d9170970a870c30c..dc8e44fc650f25fd343ad680fbaa0e1ae2fd1ff9 100644 (file)
@@ -11,43 +11,42 @@ the original).
 Supported Cards/Chipsets
 -------------------------
        PCI ID (pci.ids)        OEM     Product
-       9005:0283:9005:0283     Adaptec Catapult (3210S with arc firmware)
-       9005:0284:9005:0284     Adaptec Tomcat (3410S with arc firmware)
        9005:0285:9005:0285     Adaptec 2200S (Vulcan)
        9005:0285:9005:0286     Adaptec 2120S (Crusader)
        9005:0285:9005:0287     Adaptec 2200S (Vulcan-2m)
        9005:0285:9005:0288     Adaptec 3230S (Harrier)
        9005:0285:9005:0289     Adaptec 3240S (Tornado)
        9005:0285:9005:028a     Adaptec 2020ZCR (Skyhawk)
-       9005:0285:9005:028b     Adaptec 2025ZCR (Terminator)
+       9005:0285:9005:028b     Adaptec 2025ZCR (Terminator)
        9005:0286:9005:028c     Adaptec 2230S (Lancer)
        9005:0286:9005:028c     Adaptec 2230SLP (Lancer)
        9005:0286:9005:028d     Adaptec 2130S (Lancer)
        9005:0285:9005:028e     Adaptec 2020SA (Skyhawk)
-       9005:0285:9005:028f     Adaptec 2025SA (Terminator)
+       9005:0285:9005:028f     Adaptec 2025SA (Terminator)
        9005:0285:9005:0290     Adaptec 2410SA (Jaguar)
-       9005:0285:103c:3227     Adaptec 2610SA (Bearcat HP release)
-       9005:0285:9005:0293     Adaptec 21610SA (Corsair-16)
+       9005:0285:103c:3227     Adaptec 2610SA (Bearcat HP release)
+       9005:0285:9005:0293     Adaptec 21610SA (Corsair-16)
        9005:0285:9005:0296     Adaptec 2240S (SabreExpress)
        9005:0285:9005:0292     Adaptec 2810SA (Corsair-8)
-       9005:0285:9005:0294     Adaptec Prowler
-       9005:0285:9005:0297     Adaptec 4005SAS (AvonPark)
-       9005:0285:9005:0298     Adaptec 4000SAS (BlackBird)
+       9005:0285:9005:0297     Adaptec 4005 (AvonPark)
+       9005:0285:9005:0298     Adaptec 4000 (BlackBird)
        9005:0285:9005:0299     Adaptec 4800SAS (Marauder-X)
        9005:0285:9005:029a     Adaptec 4805SAS (Marauder-E)
        9005:0286:9005:029b     Adaptec 2820SA (Intruder)
        9005:0286:9005:029c     Adaptec 2620SA (Intruder)
        9005:0286:9005:029d     Adaptec 2420SA (Intruder HP release)
-       9005:0286:9005:02a2     Adaptec 3800SAS (Hurricane44)
-       9005:0286:9005:02a7     Adaptec 3805SAS (Hurricane80)
-       9005:0286:9005:02a8     Adaptec 3400SAS (Hurricane40)
-       9005:0286:9005:02ac     Adaptec 1800SAS (Typhoon44)
-       9005:0286:9005:02b3     Adaptec 2400SAS (Hurricane40lm)
-       9005:0285:9005:02b5     Adaptec ASR5800 (Voodoo44)
-       9005:0285:9005:02b6     Adaptec ASR5805 (Voodoo80)
-       9005:0285:9005:02b7     Adaptec ASR5808 (Voodoo08)
+       9005:0286:9005:02ac     Adaptec 1800 (Typhoon44)
+       9005:0285:9005:02b5     Adaptec 5445 (Voodoo44)
+       9005:0285:9005:02b6     Adaptec 5805 (Voodoo80)
+       9005:0285:9005:02b7     Adaptec 5085 (Voodoo08)
+       9005:0285:9005:02bb     Adaptec 3405 (Marauder40LP)
+       9005:0285:9005:02bc     Adaptec 3805 (Marauder80LP)
+       9005:0285:9005:02c7     Adaptec 3085 (Marauder08ELP)
+       9005:0285:9005:02bd     Adaptec 31205 (Marauder120)
+       9005:0285:9005:02be     Adaptec 31605 (Marauder160)
+       9005:0285:9005:02c3     Adaptec 51205 (Voodoo120)
+       9005:0285:9005:02c4     Adaptec 51605 (Voodoo160)
        1011:0046:9005:0364     Adaptec 5400S (Mustang)
-       1011:0046:9005:0365     Adaptec 5400S (Mustang)
        9005:0287:9005:0800     Adaptec Themisto (Jupiter)
        9005:0200:9005:0200     Adaptec Themisto (Jupiter)
        9005:0286:9005:0800     Adaptec Callisto (Jupiter)
@@ -68,21 +67,32 @@ Supported Cards/Chipsets
        9005:0285:17aa:0287     Legend  S230 (Vulcan)
        9005:0285:9005:0290     IBM     ServeRAID 7t (Jaguar)
        9005:0285:1014:02F2     IBM     ServeRAID 8i (AvonPark)
-       9005:0285:1014:0312     IBM     ServeRAID 8i (AvonParkLite)
        9005:0286:1014:9540     IBM     ServeRAID 8k/8k-l4 (AuroraLite)
        9005:0286:1014:9580     IBM     ServeRAID 8k/8k-l8 (Aurora)
-       9005:0286:1014:034d     IBM     ServeRAID 8s (Hurricane)
-       9005:0286:9005:029e     ICP     ICP9024R0 (Lancer)
-       9005:0286:9005:029f     ICP     ICP9014R0 (Lancer)
+       9005:0285:1014:034d     IBM     ServeRAID 8s (Marauder-E)
+       9005:0286:9005:029e     ICP     ICP9024RO (Lancer)
+       9005:0286:9005:029f     ICP     ICP9014RO (Lancer)
        9005:0286:9005:02a0     ICP     ICP9047MA (Lancer)
        9005:0286:9005:02a1     ICP     ICP9087MA (Lancer)
-       9005:0286:9005:02a3     ICP     ICP5445AU (Hurricane44)
-       9005:0286:9005:02a4     ICP     ICP9085LI (Marauder-X)
-       9005:0286:9005:02a5     ICP     ICP5085BR (Marauder-E)
+       9005:0285:9005:02a4     ICP     ICP9085LI (Marauder-X)
+       9005:0285:9005:02a5     ICP     ICP5085BR (Marauder-E)
        9005:0286:9005:02a6     ICP     ICP9067MA (Intruder-6)
-       9005:0286:9005:02a9     ICP     ICP5085AU (Hurricane80)
-       9005:0286:9005:02aa     ICP     ICP5045AU (Hurricane40)
-       9005:0286:9005:02b4     ICP     ICP5045AL (Hurricane40lm)
+       9005:0285:9005:02b2     ICP     (Voodoo 8 internal 8 external)
+       9005:0285:9005:02b8     ICP     ICP5445SL (Voodoo44)
+       9005:0285:9005:02b9     ICP     ICP5085SL (Voodoo80)
+       9005:0285:9005:02ba     ICP     ICP5805SL (Voodoo08)
+       9005:0285:9005:02bf     ICP     ICP5045BL (Marauder40LP)
+       9005:0285:9005:02c0     ICP     ICP5085BL (Marauder80LP)
+       9005:0285:9005:02c8     ICP     ICP5805BL (Marauder08ELP)
+       9005:0285:9005:02c1     ICP     ICP5125BR (Marauder120)
+       9005:0285:9005:02c2     ICP     ICP5165BR (Marauder160)
+       9005:0285:9005:02c5     ICP     ICP5125SL (Voodoo120)
+       9005:0285:9005:02c6     ICP     ICP5165SL (Voodoo160)
+       9005:0286:9005:02ab             (Typhoon40)
+       9005:0286:9005:02ad             (Aurora ARK)
+       9005:0286:9005:02ae             (Aurora Lite ARK)
+       9005:0285:9005:02b0             (Sunrise Lake ARK)
+       9005:0285:9005:02b1     Adaptec (Voodoo 8 internal 8 external)
 
 People
 -------------------------
index 01e7f857ef35b9ec1e7bc5b230b12b0d083ee77e..27a721635f924808f1953e3a1e9cf3fdecd487a4 100644 (file)
@@ -21,7 +21,7 @@ difficult to maintain, add yourself with a patch if desired.
   Bill Ryder <bryder@sgi.com>
   Thomas Sailer <sailer@ife.ee.ethz.ch>
   Gregory P. Smith <greg@electricrain.com>
-  Linus Torvalds <torvalds@osdl.org>
+  Linus Torvalds <torvalds@linux-foundation.org>
   Roman Weissgaerber <weissg@vienna.at>
   <Kazuki.Yasumatsu@fujixerox.co.jp>
 
index 1b1491d64ca6740910b71bc6b4bf195844ce05bf..d6f04a81f7617de1afd1aae631071b6708f654ff 100644 (file)
@@ -1254,7 +1254,7 @@ S:        Maintained
 
 ETHERNET BRIDGE
 P:     Stephen Hemminger
-M:     shemminger@osdl.org
+M:     shemminger@linux-foundation.org
 L:     bridge@osdl.org
 W:     http://bridge.sourceforge.net/
 S:     Maintained
@@ -2277,7 +2277,7 @@ S:        Maintained
 
 NETEM NETWORK EMULATOR
 P:     Stephen Hemminger
-M:     shemminger@osdl.org
+M:     shemminger@linux-foundation.org
 L:     netem@osdl.org
 S:     Maintained
 
@@ -3081,7 +3081,7 @@ S:        Maintained
 
 SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
 P:     Stephen Hemminger
-M:     shemminger@osdl.org
+M:     shemminger@linux-foundation.org
 L:     netdev@vger.kernel.org
 S:     Maintained
 
@@ -3334,9 +3334,8 @@ W:        http://www.linux-usb.org/gadget
 S:     Maintained
 
 USB HID/HIDBP DRIVERS
-P:     Vojtech Pavlik
-M:     vojtech@suse.cz
-L:     linux-usb-users@lists.sourceforge.net
+P:     Jiri Kosina
+M:     jkosina@suse.cz
 L:     linux-usb-devel@lists.sourceforge.net
 S:     Maintained
 
index e60956d4bbb1dfad1d581baf57841af4e4ce9a0f..50d8f905d1586235f310126532b10dd2938a72a4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 20
-EXTRAVERSION =-rc5
+EXTRAVERSION =-rc6
 NAME = Homicidal Dwarf Hamster
 
 # *DOCUMENTATION*
diff --git a/README b/README
index c0556152302981b8369325d17d5d5634af064be9..46a66c6e76df3d14b1f3a50896c6100b02c2227c 100644 (file)
--- a/README
+++ b/README
@@ -278,8 +278,8 @@ IF SOMETHING GOES WRONG:
    the file MAINTAINERS to see if there is a particular person associated
    with the part of the kernel that you are having trouble with. If there
    isn't anyone listed there, then the second best thing is to mail
-   them to me (torvalds@osdl.org), and possibly to any other relevant
-   mailing-list or to the newsgroup.
+   them to me (torvalds@linux-foundation.org), and possibly to any other
+   relevant mailing-list or to the newsgroup.
 
  - In all bug-reports, *please* tell what kernel you are talking about,
    how to duplicate the problem, and what your setup is (use your common
index 8689d62abd4adc66729c5a58185612ddfd6271d6..8a8bbdaaf38aba279fa3df1672f05a0cdc5253cb 100644 (file)
@@ -710,11 +710,8 @@ __cpuinit int init_gdt(int cpu, struct task_struct *idle)
        return 1;
 }
 
-/* Common CPU init for both boot and secondary CPUs */
-static void __cpuinit _cpu_init(int cpu, struct task_struct *curr)
+void __cpuinit cpu_set_gdt(int cpu)
 {
-       struct tss_struct * t = &per_cpu(init_tss, cpu);
-       struct thread_struct *thread = &curr->thread;
        struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu);
 
        /* Reinit these anyway, even if they've already been done (on
@@ -722,6 +719,13 @@ static void __cpuinit _cpu_init(int cpu, struct task_struct *curr)
           the real ones). */
        load_gdt(cpu_gdt_descr);
        set_kernel_gs();
+}
+
+/* Common CPU init for both boot and secondary CPUs */
+static void __cpuinit _cpu_init(int cpu, struct task_struct *curr)
+{
+       struct tss_struct * t = &per_cpu(init_tss, cpu);
+       struct thread_struct *thread = &curr->thread;
 
        if (cpu_test_and_set(cpu, cpu_initialized)) {
                printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
@@ -807,6 +811,7 @@ void __cpuinit cpu_init(void)
                        local_irq_enable();
        }
 
+       cpu_set_gdt(cpu);
        _cpu_init(cpu, curr);
 }
 
index a5e34d655965ca28582e8806603bd1f631e606da..1a6f8bb8881ce72fa99909914beb70141b4a519f 100644 (file)
@@ -310,13 +310,7 @@ static int __init setup_nmi_watchdog(char *str)
 
        if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
                return 0;
-       /*
-        * If any other x86 CPU has a local APIC, then
-        * please test the NMI stuff there and send me the
-        * missing bits. Right now Intel P6/P4 and AMD K7 only.
-        */
-       if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0))
-               return 0;  /* no lapic support */
+
        nmi_watchdog = nmi;
        return 1;
 }
index 3dceab5828f1be6431fe3fbc9bd761a98a2f027d..e55fd05da0f521048c03bf68206f336e1cb6f94f 100644 (file)
@@ -566,4 +566,11 @@ struct paravirt_ops paravirt_ops = {
        .irq_enable_sysexit = native_irq_enable_sysexit,
        .iret = native_iret,
 };
-EXPORT_SYMBOL(paravirt_ops);
+
+/*
+ * NOTE: CONFIG_PARAVIRT is experimental and the paravirt_ops
+ * semantics are subject to change. Hence we only do this
+ * internal-only export of this, until it gets sorted out and
+ * all lowlevel CPU ops used by modules are separately exported.
+ */
+EXPORT_SYMBOL_GPL(paravirt_ops);
index dea7ef9d3e82804ea6b87089cafd88c435223113..8c6c8c52b95c0b574b837c279f84647d3b4ba867 100644 (file)
@@ -595,6 +595,12 @@ static void __cpuinit start_secondary(void *unused)
  */
 void __devinit initialize_secondary(void)
 {
+       /*
+        * switch to the per CPU GDT we already set up
+        * in do_boot_cpu()
+        */
+       cpu_set_gdt(current_thread_info()->cpu);
+
        /*
         * We don't actually need to load the full TSS,
         * basically just the stack pointer and the eip.
@@ -972,9 +978,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu)
        /* Stack for startup_32 can be just as for start_secondary onwards */
        stack_start.esp = (void *) idle->thread.esp;
 
-       start_pda = cpu_pda(cpu);
-       cpu_gdt_descr = per_cpu(cpu_gdt_descr, cpu);
-
        irq_ctx_init(cpu);
 
        x86_cpu_to_apicid[cpu] = apicid;
index 55428e656a3f9a90bddcb50770e92e7434fab16c..74aeedf277f424896c1beaf01580468ecfbe90b5 100644 (file)
@@ -772,6 +772,12 @@ initialize_secondary(void)
        set_current(hard_get_current());
 #endif
 
+       /*
+        * switch to the per CPU GDT we already set up
+        * in do_boot_cpu()
+        */
+       cpu_set_gdt(current_thread_info()->cpu);
+
        /*
         * We don't actually need to load the full TSS,
         * basically just the stack pointer and the eip.
index fd2ff0698a851e213a4e0b1e7b814a3d338847e6..bbd386f572d97a6ed6cc8413f50d5e09ac019382 100644 (file)
@@ -1568,6 +1568,20 @@ config MIPS_MT_FPAFF
        depends on MIPS_MT
        default y
 
+config MIPS_MT_SMTC_INSTANT_REPLAY
+       bool "Low-latency Dispatch of Deferred SMTC IPIs"
+       depends on MIPS_MT_SMTC
+       default y
+       help
+         SMTC pseudo-interrupts between TCs are deferred and queued
+         if the target TC is interrupt-inhibited (IXMT). In the first
+         SMTC prototypes, these queued IPIs were serviced on return
+         to user mode, or on entry into the kernel idle loop. The
+         INSTANT_REPLAY option dispatches them as part of local_irq_restore()
+         processing, which adds runtime overhead (hence the option to turn
+         it off), but ensures that IPIs are handled promptly even under
+         heavy I/O interrupt load.
+
 config MIPS_VPE_LOADER_TOM
        bool "Load VPE program into memory hidden from linux"
        depends on MIPS_VPE_LOADER
index d1b026a0337d843ef074b6036f02de7e73fc5d8b..c68b5d3e5d180c639e964df00557b60d43f3f3bd 100644 (file)
@@ -623,7 +623,7 @@ LDFLAGS                     += -m $(ld-emul)
 
 ifdef CONFIG_MIPS
 CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
-       egrep -vw '__GNUC_(MAJOR|MINOR|PATCHLEVEL)__' | \
+       egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
        sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
 ifdef CONFIG_64BIT
 CHECKFLAGS             += -m64
index 3027ce782797541fba21b43e6b8ded4ce6bcbe7a..3aa01d268f2d4f45398bd1ece332c0ecfa4d39ce 100644 (file)
@@ -122,7 +122,7 @@ unsigned long __init prom_free_prom_memory(void)
                addr += PAGE_SIZE;
        }
 
-       printk("Freeing unused PROM memory: %ldk freed\n",
+       printk("Freeing unused PROM memory: %ldkb freed\n",
               (end - PAGE_SIZE) >> 10);
 
        return end - PAGE_SIZE;
index 802febed7df595016087cb90e106e06030835f41..6a857bf030b070aee2d9861e727cfd3605e62200 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 
 #include <asm/cpu.h>
 #include <asm/processor.h>
@@ -261,6 +262,7 @@ void smtc_configure_tlb(void)
                    }
                }
                write_c0_mvpcontrol(read_c0_mvpcontrol() | MVPCONTROL_STLB);
+               ehb();
 
                /*
                 * Setup kernel data structures to use software total,
@@ -269,9 +271,12 @@ void smtc_configure_tlb(void)
                 * of their initialization in smtc_cpu_setup().
                 */
 
-               tlbsiz = tlbsiz & 0x3f; /* MIPS32 limits TLB indices to 64 */
-               cpu_data[0].tlbsize = tlbsiz;
+               /* MIPS32 limits TLB indices to 64 */
+               if (tlbsiz > 64)
+                       tlbsiz = 64;
+               cpu_data[0].tlbsize = current_cpu_data.tlbsize = tlbsiz;
                smtc_status |= SMTC_TLB_SHARED;
+               local_flush_tlb_all();
 
                printk("TLB of %d entry pairs shared by %d VPEs\n",
                        tlbsiz, vpes);
@@ -1016,6 +1021,35 @@ void setup_cross_vpe_interrupts(void)
  * SMTC-specific hacks invoked from elsewhere in the kernel.
  */
 
+void smtc_ipi_replay(void)
+{
+       /*
+        * To the extent that we've ever turned interrupts off,
+        * we may have accumulated deferred IPIs.  This is subtle.
+        * If we use the smtc_ipi_qdepth() macro, we'll get an
+        * exact number - but we'll also disable interrupts
+        * and create a window of failure where a new IPI gets
+        * queued after we test the depth but before we re-enable
+        * interrupts. So long as IXMT never gets set, however,
+        * we should be OK:  If we pick up something and dispatch
+        * it here, that's great. If we see nothing, but concurrent
+        * with this operation, another TC sends us an IPI, IXMT
+        * is clear, and we'll handle it as a real pseudo-interrupt
+        * and not a pseudo-pseudo interrupt.
+        */
+       if (IPIQ[smp_processor_id()].depth > 0) {
+               struct smtc_ipi *pipi;
+               extern void self_ipi(struct smtc_ipi *);
+
+               while ((pipi = smtc_ipi_dq(&IPIQ[smp_processor_id()]))) {
+                       self_ipi(pipi);
+                       smtc_cpu_stats[smp_processor_id()].selfipis++;
+               }
+       }
+}
+
+EXPORT_SYMBOL(smtc_ipi_replay);
+
 void smtc_idle_loop_hook(void)
 {
 #ifdef SMTC_IDLE_HOOK_DEBUG
@@ -1112,29 +1146,14 @@ void smtc_idle_loop_hook(void)
        if (pdb_msg != &id_ho_db_msg[0])
                printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg);
 #endif /* SMTC_IDLE_HOOK_DEBUG */
+
        /*
-        * To the extent that we've ever turned interrupts off,
-        * we may have accumulated deferred IPIs.  This is subtle.
-        * If we use the smtc_ipi_qdepth() macro, we'll get an
-        * exact number - but we'll also disable interrupts
-        * and create a window of failure where a new IPI gets
-        * queued after we test the depth but before we re-enable
-        * interrupts. So long as IXMT never gets set, however,
-        * we should be OK:  If we pick up something and dispatch
-        * it here, that's great. If we see nothing, but concurrent
-        * with this operation, another TC sends us an IPI, IXMT
-        * is clear, and we'll handle it as a real pseudo-interrupt
-        * and not a pseudo-pseudo interrupt.
+        * Replay any accumulated deferred IPIs. If "Instant Replay"
+        * is in use, there should never be any.
         */
-       if (IPIQ[smp_processor_id()].depth > 0) {
-               struct smtc_ipi *pipi;
-               extern void self_ipi(struct smtc_ipi *);
-
-               if ((pipi = smtc_ipi_dq(&IPIQ[smp_processor_id()])) != NULL) {
-                       self_ipi(pipi);
-                       smtc_cpu_stats[smp_processor_id()].selfipis++;
-               }
-       }
+#ifndef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY
+       smtc_ipi_replay();
+#endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */
 }
 
 void smtc_soft_dump(void)
index 666bef484dcbc613559fc2d887c30fc6cc457390..458fccf87c54ec436adb6bc9fb43c3bc84fbef32 100644 (file)
@@ -139,13 +139,16 @@ struct tc {
        struct list_head list;
 };
 
-struct vpecontrol_ {
+struct {
        /* Virtual processing elements */
        struct list_head vpe_list;
 
        /* Thread contexts */
        struct list_head tc_list;
-} vpecontrol;
+} vpecontrol = {
+       .vpe_list = LIST_HEAD_INIT(vpecontrol.vpe_list),
+       .tc_list = LIST_HEAD_INIT(vpecontrol.tc_list)
+};
 
 static void release_progmem(void *ptr);
 /* static __attribute_used__ void dump_vpe(struct vpe * v); */
@@ -1388,8 +1391,6 @@ static int __init vpe_module_init(void)
 
        /* dump_mtregs(); */
 
-       INIT_LIST_HEAD(&vpecontrol.vpe_list);
-       INIT_LIST_HEAD(&vpecontrol.tc_list);
 
        val = read_c0_mvpconf0();
        for (i = 0; i < ((val & MVPCONF0_PTC) + 1); i++) {
index 30245c09d0258e224475b0ceeb9e50d7c6c797a1..49065c133ebf4987d7f48666e90b0bac3076308c 100644 (file)
@@ -501,7 +501,8 @@ void free_initmem(void)
 
        freed = prom_free_prom_memory();
        if (freed)
-               printk(KERN_INFO "Freeing firmware memory: %ldk freed\n",freed);
+               printk(KERN_INFO "Freeing firmware memory: %ldkb freed\n",
+                      freed >> 10);
 
        free_init_pages("unused kernel memory",
                        __pa_symbol(&__init_begin),
index 2e0e21ef433ee1451ba4e7c125e4338b01bc64e0..65160d4984d9352234f493824479747da20cbdda 100644 (file)
@@ -106,7 +106,6 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
                ENTER_CRITICAL(flags);
                size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
                size = (size + 1) >> 1;
-               local_irq_save(flags);
                if (size <= current_cpu_data.tlbsize/2) {
                        int oldpid = read_c0_entryhi();
                        int newpid = cpu_asid(cpu, mm);
index 397ba94cd7ec251c504227c9733f27be98f15887..16decf4ac2f406923535ab39172eb59900a38d67 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Interrupt handing routines for NEC VR4100 series.
  *
- *  Copyright (C) 2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2005-2007  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  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
@@ -73,13 +73,19 @@ static void irq_dispatch(unsigned int irq)
        if (cascade->get_irq != NULL) {
                unsigned int source_irq = irq;
                desc = irq_desc + source_irq;
-               desc->chip->ack(source_irq);
+               if (desc->chip->mask_ack)
+                       desc->chip->mask_ack(source_irq);
+               else {
+                       desc->chip->mask(source_irq);
+                       desc->chip->ack(source_irq);
+               }
                irq = cascade->get_irq(irq);
                if (irq < 0)
                        atomic_inc(&irq_err_count);
                else
                        irq_dispatch(irq);
-               desc->chip->end(source_irq);
+               if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
+                       desc->chip->unmask(source_irq);
        } else
                do_IRQ(irq);
 }
index a8efb59f5dd7a8feb3a90584fa5033aa9c256689..186870704ad92832332e9582166117d1e44211db 100644 (file)
  * option) any later version.
  */
 
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
 / {
        model = "Lite5200";
        compatible = "lite5200\0lite52xx\0mpc5200\0mpc52xx";
index 1aabee432d86f13200fdfe37aa5d77ceae897470..5bb2760d7c30cf3e72fd5c0c40610d0f098b6ccc 100644 (file)
  * option) any later version.
  */
 
+/*
+ * WARNING: Do not depend on this tree layout remaining static just yet.
+ * The MPC5200 device tree conventions are still in flux
+ * Keep an eye on the linuxppc-dev mailing list for more details
+ */
+
 / {
        model = "Lite5200b";
        compatible = "lite5200b\0lite52xx\0mpc5200b\0mpc52xx";
index d1d25152f74f8a2db4b63771099a7065969ed6d5..e956548da00ce6276c5343d7200e1fae39676bd4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc1
-# Tue Dec 19 14:59:53 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:12:56 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -245,7 +245,6 @@ CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCIEPORTBUS=y
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -854,7 +853,6 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
-CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_UNIX98_PTYS=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_HVC_DRIVER=y
index fee72f8a2fb76858fc3323228966bed3fbf94031..029c9a0e730c683b1bd64bc9bdb36114dfab36d0 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:22:54 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:12:58 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 CONFIG_GENERIC_TBSYNC=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
 # Processor support
 #
 CONFIG_CLASSIC32=y
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 # CONFIG_PPC_85xx is not set
@@ -38,6 +40,8 @@ CONFIG_CLASSIC32=y
 # CONFIG_E200 is not set
 CONFIG_6xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
@@ -59,18 +63,22 @@ CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -79,12 +87,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -103,6 +111,7 @@ CONFIG_STOP_MACHINE=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 CONFIG_LBD=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -124,13 +133,16 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_ISERIES is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_APUS is not set
 CONFIG_PPC_CHRP=y
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 is not set
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
+CONFIG_PPC_NATIVE=y
 # CONFIG_UDBG_RTAS_CONSOLE is not set
 CONFIG_PPC_RTAS=y
 # CONFIG_RTAS_ERROR_LOGGING is not set
@@ -138,6 +150,8 @@ CONFIG_RTAS_PROC=y
 # CONFIG_MMIO_NVRAM is not set
 CONFIG_PPC_MPC106=y
 # CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
 # CONFIG_TAU is not set
 # CONFIG_WANT_EARLY_SERIAL is not set
@@ -149,6 +163,7 @@ CONFIG_MPIC=y
 CONFIG_HIGHMEM=y
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -161,6 +176,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 CONFIG_IRQ_ALL_CPUS=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -243,10 +259,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -263,24 +282,29 @@ CONFIG_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK_SUPPORT=y
+# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
+CONFIG_NF_CONNTRACK=m
+# CONFIG_NF_CT_ACCT is not set
+# CONFIG_NF_CONNTRACK_MARK is not set
+# CONFIG_NF_CONNTRACK_EVENTS is not set
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_IRC=m
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NETFILTER_XTABLES 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_CONNTRACK_EVENTS 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_NETBIOS_NS is not set
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_H323 is not set
-# CONFIG_IP_NF_SIP is not set
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 # CONFIG_IP_NF_QUEUE is not set
 
 #
@@ -306,7 +330,6 @@ CONFIG_IP_NF_AMANDA=m
 # 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
 
@@ -380,6 +403,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -407,7 +436,6 @@ CONFIG_IDEPCI_SHARE_IRQ=y
 # 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_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
@@ -422,6 +450,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
 # CONFIG_BLK_DEV_IT821X is not set
@@ -430,6 +459,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
+CONFIG_BLK_DEV_SL82C105=y
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 CONFIG_BLK_DEV_VIA82CXXX=y
@@ -445,6 +475,8 @@ CONFIG_IDEDMA_AUTO=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -464,14 +496,16 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_MULTI_LUN is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -487,12 +521,13 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-# CONFIG_ATA is not set
 # CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -506,17 +541,18 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_STEX 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_MMIO=y
-# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PSI240I is not set
 # CONFIG_SCSI_QLOGIC_FAS is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_SYM53C416 is not set
 # CONFIG_SCSI_DC395x is not set
@@ -525,6 +561,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Old CD-ROM drivers (not SCSI, not IDE)
@@ -557,6 +599,7 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -607,6 +650,7 @@ CONFIG_DE4X5=y
 # CONFIG_NET_ISA is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_PCNET32_NAPI is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_AC3200 is not set
@@ -655,6 +699,7 @@ CONFIG_MV643XX_ETH=y
 # CONFIG_MV643XX_ETH_0 is not set
 # CONFIG_MV643XX_ETH_1 is not set
 # CONFIG_MV643XX_ETH_2 is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -663,6 +708,7 @@ CONFIG_MV643XX_ETH=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -690,6 +736,7 @@ CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_MPPE=m
 CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
+CONFIG_SLHC=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
@@ -710,6 +757,7 @@ CONFIG_PPPOE=m
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -732,6 +780,7 @@ CONFIG_KEYBOARD_ATKBD=y
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
 # CONFIG_MOUSE_SERIAL is not set
@@ -778,12 +827,14 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_BRIQ_PANEL=m
 # CONFIG_HVC_RTAS is not set
 
 #
@@ -802,10 +853,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -814,7 +861,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -881,6 +927,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -888,15 +935,10 @@ CONFIG_I2C_ALGOBIT=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -909,6 +951,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB=y
+CONFIG_FB_DDC=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -949,6 +992,7 @@ CONFIG_FB_3DFX=y
 # CONFIG_FB_3DFX_ACCEL is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -978,6 +1022,11 @@ CONFIG_LOGO_LINUX_CLUT224=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -993,6 +1042,7 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1034,13 +1084,13 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
 # CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
@@ -1070,6 +1120,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 CONFIG_USB_MON=y
 
@@ -1087,6 +1138,7 @@ CONFIG_USB_MON=y
 #
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
@@ -1094,12 +1146,13 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1156,6 +1209,10 @@ CONFIG_USB_MON=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1166,6 +1223,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -1173,6 +1231,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1207,8 +1266,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -1307,18 +1368,23 @@ CONFIG_NLS_ISO8859_1=m
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1329,8 +1395,11 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1345,14 +1414,16 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_HIGHMEM is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUGGER=y
 CONFIG_XMON=y
 CONFIG_XMON_DEFAULT=y
+CONFIG_XMON_DISASSEMBLY=y
 # CONFIG_BDI_SWITCH is not set
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -1367,7 +1438,11 @@ CONFIG_XMON_DEFAULT=y
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
 # CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
 # CONFIG_CRYPTO_MD5 is not set
@@ -1376,6 +1451,10 @@ CONFIG_CRYPTO_SHA1=m
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_LRW is not set
 # CONFIG_CRYPTO_DES is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index 92d0a9dd0b8f67a4655745b18ef58097f83b5556..7724847f702a09a073cf61e952093ac6e233337b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:22:55 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:15:04 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -10,6 +10,8 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_ILOG2_U64=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -22,6 +24,8 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 CONFIG_GENERIC_TBSYNC=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -30,6 +34,9 @@ CONFIG_GENERIC_TBSYNC=y
 CONFIG_POWER4_ONLY=y
 CONFIG_POWER4=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+# CONFIG_PPC_OF_PLATFORM_PCI is not set
 CONFIG_ALTIVEC=y
 CONFIG_PPC_STD_MMU=y
 CONFIG_VIRT_CPU_ACCOUNTING=y
@@ -51,18 +58,22 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -71,12 +82,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -95,6 +106,7 @@ CONFIG_STOP_MACHINE=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 
 #
@@ -114,23 +126,28 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_ISERIES is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_APUS is not set
 # CONFIG_PPC_PSERIES is not set
+# CONFIG_PPC_ISERIES is not set
+# CONFIG_PPC_MPC52xx is not set
 CONFIG_PPC_PMAC=y
 CONFIG_PPC_PMAC64=y
 # CONFIG_PPC_MAPLE is not set
+# CONFIG_PPC_PASEMI is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PPC_IBM_CELL_BLADE is not set
-# CONFIG_UDBG_RTAS_CONSOLE is not set
+# CONFIG_PPC_PS3 is not set
+CONFIG_PPC_NATIVE=y
 CONFIG_U3_DART=y
 # CONFIG_PPC_RTAS is not set
 # CONFIG_MMIO_NVRAM is not set
 CONFIG_MPIC_BROKEN_U3=y
 # CONFIG_PPC_MPC106 is not set
 CONFIG_PPC_970_NAP=y
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_TABLE=y
 # CONFIG_CPU_FREQ_DEBUG is not set
@@ -152,6 +169,7 @@ CONFIG_MPIC=y
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -171,6 +189,7 @@ CONFIG_IRQ_ALL_CPUS=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -225,6 +244,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_NET_KEY=m
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -243,10 +263,13 @@ CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -263,24 +286,29 @@ CONFIG_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK_SUPPORT=y
+# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
+CONFIG_NF_CONNTRACK=m
+# CONFIG_NF_CT_ACCT is not set
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_IRC=m
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SIP is not set
+CONFIG_NF_CONNTRACK_TFTP=m
 # CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
 #
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_NETBIOS_NS is not set
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_H323 is not set
-# CONFIG_IP_NF_SIP is not set
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 
 #
@@ -307,7 +335,6 @@ CONFIG_LLC=y
 # 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
 
@@ -381,6 +408,12 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
 # CONFIG_CDROM_PKTCDVD_WCACHE is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -408,7 +441,6 @@ CONFIG_BLK_DEV_IDEPCI=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 # CONFIG_BLK_DEV_GENERIC is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
-# 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
@@ -423,6 +455,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
 # CONFIG_BLK_DEV_IT821X is not set
@@ -431,6 +464,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -448,6 +482,8 @@ CONFIG_IDEDMA_AUTO=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -467,14 +503,16 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -487,26 +525,12 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-CONFIG_ATA=y
-# CONFIG_SATA_AHCI is not set
-CONFIG_SATA_SVW=y
-# CONFIG_SCSI_ATA_PIIX is not set
-# CONFIG_SATA_MV is not set
-# CONFIG_SATA_NV is not set
-# CONFIG_SCSI_PDC_ADMA is not set
 # CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SATA_QSTOR is not set
-# CONFIG_SATA_PROMISE is not set
-# CONFIG_SATA_SX4 is not set
-# CONFIG_SATA_SIL is not set
-# CONFIG_SATA_SIL24 is not set
-# CONFIG_SATA_SIS is not set
-# CONFIG_SATA_ULI is not set
-# CONFIG_SATA_VIA is not set
-# CONFIG_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
@@ -515,14 +539,71 @@ CONFIG_SATA_SVW=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+CONFIG_ATA=y
+# CONFIG_SATA_AHCI is not set
+CONFIG_SATA_SVW=y
+# CONFIG_ATA_PIIX is not set
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -537,6 +618,7 @@ CONFIG_MD_RAID10=m
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_DEBUG is not set
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
@@ -591,11 +673,13 @@ CONFIG_IEEE1394_RAWIO=y
 CONFIG_ADB_PMU=y
 # CONFIG_ADB_PMU_LED is not set
 CONFIG_PMAC_SMU=y
+CONFIG_MAC_EMUMOUSEBTN=y
 CONFIG_THERM_PM72=y
 CONFIG_WINDFARM=y
 CONFIG_WINDFARM_PM81=y
 CONFIG_WINDFARM_PM91=y
 CONFIG_WINDFARM_PM112=y
+# CONFIG_PMAC_RACKMETER is not set
 
 #
 # Network device support
@@ -652,7 +736,7 @@ CONFIG_E1000=y
 # CONFIG_SK98LIN is not set
 CONFIG_TIGON3=y
 # CONFIG_BNX2 is not set
-# CONFIG_MV643XX_ETH is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -661,6 +745,7 @@ CONFIG_TIGON3=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -691,6 +776,7 @@ CONFIG_PPP_BSDCOMP=m
 # CONFIG_PPP_MPPE is not set
 CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
+CONFIG_SLHC=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
@@ -711,6 +797,7 @@ CONFIG_PPPOE=m
 # Input device support
 #
 CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
 
 #
 # Userland interfaces
@@ -733,6 +820,7 @@ CONFIG_INPUT_KEYBOARD=y
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
 CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 # CONFIG_MOUSE_SERIAL is not set
@@ -789,13 +877,7 @@ CONFIG_GEN_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
 CONFIG_AGP=m
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_VIA is not set
 CONFIG_AGP_UNINORTH=m
 # CONFIG_DRM is not set
 CONFIG_RAW_DRIVER=y
@@ -806,7 +888,6 @@ CONFIG_MAX_RAW_DEVS=256
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -871,6 +952,7 @@ CONFIG_I2C_POWERMAC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -878,15 +960,10 @@ CONFIG_I2C_POWERMAC=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -899,6 +976,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB=y
+CONFIG_FB_DDC=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -930,6 +1008,7 @@ CONFIG_FB_RADEON_I2C=y
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -1079,6 +1158,11 @@ CONFIG_SND_USB_AUDIO=m
 #
 # CONFIG_SOUND_PRIME is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -1094,6 +1178,7 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1135,18 +1220,19 @@ CONFIG_USB_STORAGE_SDDR55=y
 CONFIG_USB_STORAGE_JUMPSHOT=y
 # CONFIG_USB_STORAGE_ALAUDA is not set
 # CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_HIDINPUT_POWERBOOK is not set
 CONFIG_HID_FF=y
 CONFIG_HID_PID=y
 CONFIG_LOGITECH_FF=y
 CONFIG_THRUSTMASTER_FF=y
+# CONFIG_ZEROPLUS_FF is not set
 CONFIG_USB_HIDDEV=y
 # CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
@@ -1174,12 +1260,14 @@ CONFIG_USB_CATC=m
 CONFIG_USB_KAWETH=m
 CONFIG_USB_PEGASUS=m
 CONFIG_USB_RTL8150=m
+# CONFIG_USB_USBNET_MII is not set
 CONFIG_USB_USBNET=m
 # CONFIG_USB_NET_AX8817X is not set
 CONFIG_USB_NET_CDCETHER=m
 # CONFIG_USB_NET_GL620A is not set
 # CONFIG_USB_NET_NET1080 is not set
 # CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
 # CONFIG_USB_NET_RNDIS_HOST is not set
 # CONFIG_USB_NET_CDC_SUBSET is not set
 # CONFIG_USB_NET_ZAURUS is not set
@@ -1194,6 +1282,7 @@ CONFIG_USB_MON=y
 #
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
 # CONFIG_USB_SERIAL_ARK3116 is not set
 CONFIG_USB_SERIAL_BELKIN=m
@@ -1228,6 +1317,8 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
 CONFIG_USB_SERIAL_KLSI=m
 CONFIG_USB_SERIAL_KOBIL_SCT=m
 CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
 # CONFIG_USB_SERIAL_NAVMAN is not set
 CONFIG_USB_SERIAL_PL2303=m
 # CONFIG_USB_SERIAL_HP4X is not set
@@ -1239,6 +1330,7 @@ CONFIG_USB_SERIAL_CYBERJACK=m
 CONFIG_USB_SERIAL_XIRCOM=m
 # CONFIG_USB_SERIAL_OPTION is not set
 CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
 CONFIG_USB_EZUSB=y
 
 #
@@ -1246,6 +1338,7 @@ CONFIG_USB_EZUSB=y
 #
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
@@ -1253,12 +1346,13 @@ CONFIG_USB_EZUSB=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
 CONFIG_USB_APPLEDISPLAY=m
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1315,6 +1409,10 @@ CONFIG_USB_APPLEDISPLAY=m
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1328,6 +1426,7 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -1344,6 +1443,7 @@ CONFIG_XFS_FS=m
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1380,8 +1480,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
@@ -1504,18 +1606,23 @@ CONFIG_NLS_ISO8859_15=y
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=y
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=m
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1528,8 +1635,11 @@ CONFIG_OPROFILE=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1543,9 +1653,10 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
@@ -1565,7 +1676,12 @@ CONFIG_BOOTX_TEXT=y
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
@@ -1574,9 +1690,14 @@ CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
index b5005506c2f80c2ed0ff0bfd39628321c311076a..5fc87448704c37dd7d81ac01adfe7d2b8b26a423 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19-rc1
-# Fri Oct  6 13:25:04 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:16:44 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -10,6 +10,8 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_ILOG2_U64=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -23,6 +25,7 @@ CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -32,6 +35,9 @@ CONFIG_AUDIT_ARCH=y
 CONFIG_POWER3=y
 CONFIG_POWER4=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+# CONFIG_PPC_OF_PLATFORM_PCI is not set
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_VIRT_CPU_ACCOUNTING=y
@@ -63,12 +69,13 @@ CONFIG_AUDITSYSCALL=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
-# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -125,18 +132,22 @@ CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_APUS is not set
 # CONFIG_PPC_PSERIES is not set
 CONFIG_PPC_ISERIES=y
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_MAPLE is not set
 # CONFIG_PPC_PASEMI is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PPC_IBM_CELL_BLADE is not set
+# CONFIG_PPC_PS3 is not set
 # CONFIG_U3_DART is not set
 # CONFIG_PPC_RTAS is not set
 # CONFIG_MMIO_NVRAM is not set
 CONFIG_IBMVIO=y
 # CONFIG_PPC_MPC106 is not set
 # CONFIG_PPC_970_NAP is not set
+CONFIG_PPC_INDIRECT_IO=y
+CONFIG_GENERIC_IOMAP=y
 # CONFIG_CPU_FREQ is not set
 # CONFIG_WANT_EARLY_SERIAL is not set
 # CONFIG_MPIC is not set
@@ -146,6 +157,7 @@ CONFIG_IBMVIO=y
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -178,6 +190,7 @@ CONFIG_RESOURCES_64BIT=y
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_SCHED_SMT is not set
 CONFIG_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
 # CONFIG_PM is not set
 CONFIG_SECCOMP=y
 CONFIG_ISA_DMA_API=y
@@ -192,7 +205,6 @@ CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -245,6 +257,7 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -261,21 +274,37 @@ CONFIG_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK_SUPPORT=y
+# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
+CONFIG_NF_CONNTRACK=m
+# CONFIG_NF_CT_ACCT is not set
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_IRC=m
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SIP is not set
+CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
 CONFIG_NETFILTER_XT_TARGET_DSCP=m
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
 CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 # CONFIG_NETFILTER_XT_MATCH_DCCP is not set
 CONFIG_NETFILTER_XT_MATCH_DSCP=m
 # CONFIG_NETFILTER_XT_MATCH_ESP is not set
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
+# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -286,27 +315,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
+# CONFIG_NETFILTER_XT_MATCH_STATE is not set
 # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
 
 #
 # IP: Netfilter Configuration
 #
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_NETBIOS_NS is not set
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_H323 is not set
-# CONFIG_IP_NF_SIP is not set
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -317,23 +336,25 @@ CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_MATCH_ADDRTYPE=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_NF_NAT=m
+CONFIG_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_NF_NAT_SNMP_BASIC is not set
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+# CONFIG_NF_NAT_AMANDA is not set
+# CONFIG_NF_NAT_PPTP is not set
+# CONFIG_NF_NAT_H323 is not set
+# CONFIG_NF_NAT_SIP is not set
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -439,6 +460,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -449,6 +476,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
 CONFIG_SCSI_NETLINK=y
 CONFIG_SCSI_PROC_FS=y
 
@@ -469,6 +497,7 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
 # SCSI Transports
@@ -515,6 +544,7 @@ CONFIG_SCSI_IBMVSCSI=m
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
 
 #
 # Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -562,6 +592,7 @@ CONFIG_DM_ZERO=m
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -647,6 +678,7 @@ CONFIG_E1000=m
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -765,10 +797,6 @@ CONFIG_GEN_RTC=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
@@ -779,7 +807,6 @@ CONFIG_MAX_RAW_DEVS=256
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -795,6 +822,7 @@ CONFIG_MAX_RAW_DEVS=256
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -802,11 +830,6 @@ CONFIG_MAX_RAW_DEVS=256
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-# CONFIG_TIFM_CORE is not set
-
 #
 # Multimedia devices
 #
@@ -822,6 +845,7 @@ CONFIG_MAX_RAW_DEVS=256
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -829,6 +853,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+# CONFIG_HID is not set
+
 #
 # USB support
 #
@@ -891,6 +920,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -904,6 +937,7 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -937,6 +971,7 @@ CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -1024,7 +1059,6 @@ CONFIG_CIFS_POSIX=y
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
 # CONFIG_9P_FS is not set
-CONFIG_GENERIC_ACL=y
 
 #
 # Partition Types
@@ -1080,6 +1114,8 @@ CONFIG_NLS_ISO8859_1=y
 # Distributed Lock Manager
 #
 CONFIG_DLM=m
+CONFIG_DLM_TCP=y
+# CONFIG_DLM_SCTP is not set
 # CONFIG_DLM_DEBUG is not set
 
 #
@@ -1094,6 +1130,7 @@ CONFIG_VIOPATH=y
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1105,6 +1142,7 @@ CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1119,6 +1157,8 @@ CONFIG_PLIST=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1132,8 +1172,8 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_FORCED_INLINING is not set
@@ -1142,6 +1182,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
 # CONFIG_DEBUGGER is not set
 CONFIG_IRQSTACKS=y
+# CONFIG_BOOTX_TEXT is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
 
 #
@@ -1155,10 +1196,11 @@ CONFIG_IRQSTACKS=y
 #
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
@@ -1167,8 +1209,10 @@ CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_TGR192=m
+# CONFIG_CRYPTO_GF128MUL is not set
 CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
index 23fd210eb56a6e256987ca5b1171c856397b9d87..405c1c908213d0215ed9178c4f76ce7a19c3b53b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19-rc4
-# Wed Nov 15 20:36:30 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:17:58 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -22,13 +23,13 @@ CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
 # Processor support
 #
 CONFIG_CLASSIC32=y
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 # CONFIG_PPC_85xx is not set
@@ -69,12 +70,13 @@ CONFIG_POSIX_MQUEUE=y
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
-# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -130,6 +132,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_PPC_MULTIPLATFORM is not set
 CONFIG_EMBEDDED6xx=y
 # CONFIG_APUS is not set
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PPC_RTAS is not set
@@ -166,7 +169,6 @@ CONFIG_LINKSTATION=y
 # CONFIG_TQM8260 is not set
 # CONFIG_ADS8272 is not set
 # CONFIG_PQ2FADS is not set
-# CONFIG_LITE5200 is not set
 # CONFIG_EV64360 is not set
 CONFIG_PPC_GEN550=y
 CONFIG_MPC10X_BRIDGE=y
@@ -181,6 +183,7 @@ CONFIG_MPIC=y
 # CONFIG_HIGHMEM is not set
 CONFIG_HZ_100=y
 # CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=100
 CONFIG_PREEMPT_NONE=y
@@ -217,7 +220,6 @@ CONFIG_FSL_SOC=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -286,6 +288,7 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -302,18 +305,35 @@ CONFIG_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK_SUPPORT=y
+# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
+CONFIG_NF_CONNTRACK=m
+# CONFIG_NF_CT_ACCT is not set
+# CONFIG_NF_CONNTRACK_MARK is not set
+# CONFIG_NF_CONNTRACK_EVENTS is not set
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_IRC=m
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SIP is not set
+CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
 # CONFIG_NETFILTER_XT_TARGET_DSCP is not set
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
 # CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
 # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 # CONFIG_NETFILTER_XT_MATCH_DCCP is not set
 # CONFIG_NETFILTER_XT_MATCH_DSCP is not set
 CONFIG_NETFILTER_XT_MATCH_ESP=m
-# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
 CONFIG_NETFILTER_XT_MATCH_LIMIT=m
 CONFIG_NETFILTER_XT_MATCH_MAC=m
@@ -324,27 +344,17 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
 # CONFIG_NETFILTER_XT_MATCH_REALM is not set
 # CONFIG_NETFILTER_XT_MATCH_SCTP is not set
-CONFIG_NETFILTER_XT_MATCH_STATE=m
+# CONFIG_NETFILTER_XT_MATCH_STATE is not set
 # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
 # CONFIG_NETFILTER_XT_MATCH_STRING is not set
 # CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT 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_CONNTRACK_EVENTS 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_NETBIOS_NS is not set
-CONFIG_IP_NF_TFTP=m
-# CONFIG_IP_NF_AMANDA is not set
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_H323 is not set
-# CONFIG_IP_NF_SIP is not set
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 # CONFIG_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
@@ -355,22 +365,25 @@ CONFIG_IP_NF_MATCH_IPRANGE=m
 # CONFIG_IP_NF_MATCH_TTL is not set
 # CONFIG_IP_NF_MATCH_OWNER is not set
 # CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 # CONFIG_IP_NF_TARGET_LOG is not set
 # CONFIG_IP_NF_TARGET_ULOG is not set
 # CONFIG_IP_NF_TARGET_TCPMSS is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_NF_NAT=m
+CONFIG_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 is not set
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
+# CONFIG_NF_NAT_SNMP_BASIC is not set
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+# CONFIG_NF_NAT_AMANDA is not set
+# CONFIG_NF_NAT_PPTP is not set
+# CONFIG_NF_NAT_H323 is not set
+# CONFIG_NF_NAT_SIP is not set
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
@@ -580,6 +593,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
@@ -599,6 +613,7 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
 # SCSI Transports
@@ -646,6 +661,7 @@ CONFIG_SCSI_MULTI_LUN=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
 
 #
 # Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -683,6 +699,7 @@ CONFIG_ATA=y
 # CONFIG_PATA_IT821X is not set
 # CONFIG_PATA_JMICRON is not set
 # CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
 # CONFIG_PATA_MPIIX is not set
 # CONFIG_PATA_OLDPIIX is not set
 # CONFIG_PATA_NETCELL is not set
@@ -726,6 +743,7 @@ CONFIG_PATA_SIL680=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -777,6 +795,7 @@ CONFIG_R8169=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -899,6 +918,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -921,10 +941,6 @@ CONFIG_HW_RANDOM=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 is not set
@@ -1032,6 +1048,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
@@ -1042,6 +1059,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
@@ -1063,6 +1081,7 @@ CONFIG_HWMON=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Console display driver support
@@ -1076,6 +1095,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -1091,6 +1115,7 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1170,6 +1195,7 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 CONFIG_USB_MON=y
 
@@ -1218,6 +1244,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OPTION is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_DEBUG is not set
 
 #
 # USB Miscellaneous drivers
@@ -1323,6 +1350,10 @@ CONFIG_RTC_DRV_RS5C372=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1398,7 +1429,6 @@ CONFIG_RAMFS=y
 # 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
@@ -1487,9 +1517,15 @@ CONFIG_NLS_ISO8859_1=m
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=m
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1497,6 +1533,7 @@ CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1511,6 +1548,8 @@ CONFIG_OPROFILE=m
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1524,12 +1563,11 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
-# CONFIG_HEADERS_CHECK is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
 # CONFIG_BDI_SWITCH is not set
@@ -1551,6 +1589,7 @@ CONFIG_CRYPTO_ALGAPI=y
 CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
@@ -1559,8 +1598,10 @@ CONFIG_CRYPTO_SHA1=m
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
index ee7655776d45de258374789f8c0e3aba8c440fd2..8cbd87ded6b41d66bf423281bc450fc5fa744379 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19-rc6
-# Mon Nov 27 11:08:20 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:18:18 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -22,13 +23,13 @@ CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
 # Processor support
 #
 CONFIG_CLASSIC32=y
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 # CONFIG_PPC_85xx is not set
@@ -68,6 +69,7 @@ CONFIG_SYSVIPC=y
 # CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -151,6 +153,7 @@ CONFIG_PPC_LITE5200=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -259,6 +262,7 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -374,6 +378,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
 # CONFIG_SCSI_PROC_FS is not set
 
@@ -393,6 +398,7 @@ CONFIG_SCSI=y
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
 # SCSI Transports
@@ -440,6 +446,7 @@ CONFIG_SCSI=y
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
 
 #
 # Serial ATA (prod) and Parallel ATA (experimental) drivers
@@ -477,7 +484,7 @@ CONFIG_ATA=y
 # CONFIG_PATA_IT821X is not set
 # CONFIG_PATA_JMICRON is not set
 # CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MPC52xx=y
+# CONFIG_PATA_MARVELL is not set
 # CONFIG_PATA_MPIIX is not set
 # CONFIG_PATA_OLDPIIX is not set
 # CONFIG_PATA_NETCELL is not set
@@ -494,6 +501,7 @@ CONFIG_PATA_MPC52xx=y
 # CONFIG_PATA_SIS is not set
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_PLATFORM is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -521,6 +529,7 @@ CONFIG_PATA_MPC52xx=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -572,6 +581,7 @@ CONFIG_NETDEVICES=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -632,6 +642,7 @@ CONFIG_NETDEVICES=y
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_MPC52xx=y
@@ -657,10 +668,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 # 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 is not set
@@ -707,6 +714,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -776,6 +784,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -872,6 +884,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
@@ -880,6 +897,7 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -893,6 +911,8 @@ CONFIG_PRINTK_TIME=y
 CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -906,12 +926,11 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
-# CONFIG_HEADERS_CHECK is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
 # CONFIG_BDI_SWITCH is not set
index ae96a5b2f00dbd8ec53af5d94009b6c08770e0ef..de97f2f0ae9691a7e476031600f9a3eb284fd08f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18
-# Mon Oct  9 11:59:34 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:19:02 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -10,6 +10,8 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_ILOG2_U64=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -23,6 +25,7 @@ CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 CONFIG_GENERIC_TBSYNC=y
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -31,6 +34,9 @@ CONFIG_AUDIT_ARCH=y
 CONFIG_POWER4_ONLY=y
 CONFIG_POWER4=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+# CONFIG_PPC_OF_PLATFORM_PCI is not set
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_VIRT_CPU_ACCOUNTING=y
@@ -61,12 +67,13 @@ CONFIG_POSIX_MQUEUE=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
-# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -123,18 +130,27 @@ CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_APUS is not set
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_ISERIES is not set
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_PMAC is not set
 CONFIG_PPC_MAPLE=y
 # CONFIG_PPC_PASEMI is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PPC_IBM_CELL_BLADE is not set
+# CONFIG_PPC_PS3 is not set
+CONFIG_PPC_NATIVE=y
+CONFIG_UDBG_RTAS_CONSOLE=y
 CONFIG_U3_DART=y
-# CONFIG_PPC_RTAS is not set
+CONFIG_PPC_RTAS=y
+# CONFIG_RTAS_ERROR_LOGGING is not set
+CONFIG_RTAS_PROC=y
+# CONFIG_RTAS_FLASH is not set
 # CONFIG_MMIO_NVRAM is not set
 CONFIG_MPIC_BROKEN_U3=y
 # CONFIG_PPC_MPC106 is not set
 CONFIG_PPC_970_NAP=y
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
 # CONFIG_WANT_EARLY_SERIAL is not set
 CONFIG_MPIC=y
@@ -144,6 +160,7 @@ CONFIG_MPIC=y
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -190,7 +207,6 @@ CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -246,6 +262,7 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -345,6 +362,12 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -371,7 +394,6 @@ CONFIG_IDEPCI_SHARE_IRQ=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 CONFIG_BLK_DEV_GENERIC=y
 # CONFIG_BLK_DEV_OPTI621 is not set
-# 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
@@ -395,6 +417,7 @@ CONFIG_BLK_DEV_AMD74XX=y
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -439,6 +462,7 @@ CONFIG_IDEDMA_AUTO=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -523,6 +547,7 @@ CONFIG_TIGON3=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -618,6 +643,8 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_HVC_DRIVER=y
+CONFIG_HVC_RTAS=y
 
 #
 # IPMI
@@ -634,10 +661,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -647,7 +670,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -711,6 +733,7 @@ CONFIG_I2C_AMD8111=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -718,16 +741,10 @@ CONFIG_I2C_AMD8111=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-# CONFIG_TIFM_CORE is not set
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -740,6 +757,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Console display driver support
@@ -753,6 +771,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -768,6 +791,7 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -803,7 +827,6 @@ CONFIG_USB_UHCI_HCD=y
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
@@ -819,7 +842,6 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_ATI_REMOTE2 is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_APPLETOUCH is not set
-# CONFIG_USB_TRANCEVIBRATOR is not set
 
 #
 # USB Imaging devices
@@ -833,6 +855,7 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_KAWETH is not set
 CONFIG_USB_PEGASUS=y
 # CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 CONFIG_USB_MON=y
 
@@ -881,6 +904,7 @@ 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_MOS7720 is not set
 # CONFIG_USB_SERIAL_MOS7840 is not set
 # CONFIG_USB_SERIAL_NAVMAN is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
@@ -892,6 +916,7 @@ CONFIG_USB_SERIAL_TI=m
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OPTION is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_DEBUG is not set
 CONFIG_USB_EZUSB=y
 
 #
@@ -913,6 +938,7 @@ CONFIG_USB_EZUSB=y
 # CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -969,6 +995,10 @@ CONFIG_USB_EZUSB=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -978,12 +1008,14 @@ CONFIG_EXT2_FS_XIP=y
 CONFIG_FS_XIP=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1132,15 +1164,22 @@ CONFIG_NLS_DEFAULT="utf-8"
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=y
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=y
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1155,6 +1194,8 @@ CONFIG_PLIST=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1169,8 +1210,8 @@ CONFIG_DEBUG_SLAB=y
 CONFIG_DEBUG_SPINLOCK_SLEEP=y
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_FORCED_INLINING is not set
@@ -1180,6 +1221,7 @@ CONFIG_DEBUG_STACK_USAGE=y
 CONFIG_DEBUGGER=y
 CONFIG_XMON=y
 CONFIG_XMON_DEFAULT=y
+CONFIG_XMON_DISASSEMBLY=y
 # CONFIG_IRQSTACKS is not set
 CONFIG_BOOTX_TEXT=y
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -1195,9 +1237,10 @@ CONFIG_BOOTX_TEXT=y
 #
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
@@ -1206,8 +1249,10 @@ CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
 CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index d1811e754518d01930eafd188391d502e4c5bd8c..fdf09eabe6e72745cd7d1dcc517cd2ab50af38ec 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:26:55 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:20:53 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 CONFIG_CLASSIC32=y
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 # CONFIG_PPC_85xx is not set
@@ -38,6 +40,8 @@ CONFIG_CLASSIC32=y
 # CONFIG_E200 is not set
 CONFIG_6xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
@@ -58,16 +62,20 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_HOTPLUG=y
@@ -75,12 +83,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -93,6 +101,7 @@ CONFIG_BASE_SMALL=0
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 CONFIG_LBD=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -114,19 +123,19 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 # CONFIG_PPC_MULTIPLATFORM is not set
-# CONFIG_PPC_ISERIES is not set
 CONFIG_EMBEDDED6xx=y
 # CONFIG_APUS is not set
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
-# CONFIG_UDBG_RTAS_CONSOLE is not set
 # CONFIG_PPC_RTAS is not set
 # CONFIG_MMIO_NVRAM is not set
 # CONFIG_PPC_MPC106 is not set
 # CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
 # CONFIG_TAU is not set
-# CONFIG_PPC_TODC is not set
 # CONFIG_KATANA is not set
 # CONFIG_WILLOW is not set
 # CONFIG_CPCI690 is not set
@@ -141,6 +150,7 @@ CONFIG_EMBEDDED6xx=y
 # CONFIG_PRPMC750 is not set
 # CONFIG_PRPMC800 is not set
 # CONFIG_SANDPOINT is not set
+# CONFIG_LINKSTATION is not set
 CONFIG_MPC7448HPC2=y
 # CONFIG_RADSTONE_PPC7D is not set
 # CONFIG_PAL4 is not set
@@ -152,7 +162,6 @@ CONFIG_MPC7448HPC2=y
 # CONFIG_TQM8260 is not set
 # CONFIG_ADS8272 is not set
 # CONFIG_PQ2FADS is not set
-# CONFIG_LITE5200 is not set
 # CONFIG_EV64360 is not set
 CONFIG_TSI108_BRIDGE=y
 # CONFIG_WANT_EARLY_SERIAL is not set
@@ -164,6 +173,7 @@ CONFIG_MPIC=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -173,6 +183,7 @@ CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -237,6 +248,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -258,10 +270,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -291,7 +306,6 @@ CONFIG_TCP_CONG_BIC=y
 # 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
 
@@ -361,6 +375,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -371,6 +391,8 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -389,14 +411,16 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -409,27 +433,13 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-CONFIG_ATA=y
-# CONFIG_SATA_AHCI is not set
-# CONFIG_SATA_SVW is not set
-# CONFIG_SCSI_ATA_PIIX is not set
-CONFIG_SATA_MV=y
-# CONFIG_SATA_NV is not set
-# CONFIG_SCSI_PDC_ADMA is not set
 # CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SATA_QSTOR is not set
-# CONFIG_SATA_PROMISE is not set
-# CONFIG_SATA_SX4 is not set
-# CONFIG_SATA_SIL is not set
-# CONFIG_SATA_SIL24 is not set
-# CONFIG_SATA_SIS is not set
-# CONFIG_SATA_ULI is not set
-# CONFIG_SATA_VIA is not set
-# CONFIG_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
@@ -438,15 +448,73 @@ CONFIG_SATA_MV=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+CONFIG_ATA=y
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SVW is not set
+# CONFIG_ATA_PIIX is not set
+CONFIG_SATA_MV=y
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_PLATFORM is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -474,6 +542,7 @@ CONFIG_SATA_MV=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -505,6 +574,7 @@ CONFIG_PHYLIB=y
 # CONFIG_CICADA_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -563,6 +633,8 @@ CONFIG_8139TOO=y
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
+CONFIG_TSI108_ETH=y
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -571,6 +643,7 @@ CONFIG_8139TOO=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -610,6 +683,7 @@ CONFIG_8139TOO=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -654,6 +728,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -677,10 +752,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -689,7 +760,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -705,6 +775,7 @@ CONFIG_GEN_RTC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -713,17 +784,14 @@ CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -735,6 +803,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -742,6 +811,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -804,6 +878,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -814,6 +892,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -821,6 +900,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -850,8 +930,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -920,14 +1002,21 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -938,12 +1027,14 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_DEBUG_FS is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
 
@@ -957,7 +1048,3 @@ CONFIG_LOG_BUF_SHIFT=14
 # Cryptographic options
 #
 # CONFIG_CRYPTO is not set
-
-#
-# Hardware crypto devices
-#
index 0561b73a918f5c3545f7850e40f1fed7dbea2795..45757b61370216898fdc43f3da58d58d05e82eb8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18
-# Mon Sep 25 19:41:14 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:23:43 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -22,13 +23,13 @@ CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 CONFIG_PPC_83xx=y
 # CONFIG_PPC_85xx is not set
@@ -40,6 +41,8 @@ CONFIG_PPC_83xx=y
 CONFIG_6xx=y
 CONFIG_83xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
@@ -59,16 +62,20 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_EMBEDDED=y
 CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -98,6 +105,7 @@ CONFIG_MODULE_UNLOAD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -120,8 +128,10 @@ CONFIG_PPC_GEN550=y
 #
 # Platform support
 #
+# CONFIG_MPC832x_MDS is not set
 # CONFIG_MPC834x_SYS is not set
 CONFIG_MPC834x_ITX=y
+# CONFIG_MPC8360E_PB is not set
 CONFIG_MPC834x=y
 # CONFIG_MPIC is not set
 
@@ -131,6 +141,7 @@ CONFIG_MPC834x=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -138,8 +149,10 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
+CONFIG_MATH_EMULATION=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -206,6 +219,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -227,10 +241,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -410,10 +427,17 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 # CONFIG_BLK_DEV_IDE is not set
 # CONFIG_BLK_DEV_HD_ONLY is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -423,6 +447,8 @@ CONFIG_IDE=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -441,14 +467,16 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -461,27 +489,13 @@ CONFIG_SCSI_SPI_ATTRS=y
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-CONFIG_ATA=y
-# CONFIG_SATA_AHCI is not set
-# CONFIG_SATA_SVW is not set
-# CONFIG_SCSI_ATA_PIIX is not set
-# CONFIG_SATA_MV is not set
-# CONFIG_SATA_NV is not set
-# CONFIG_SCSI_PDC_ADMA is not set
 # CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SATA_QSTOR is not set
-# CONFIG_SATA_PROMISE is not set
-# CONFIG_SATA_SX4 is not set
-CONFIG_SATA_SIL=y
-# CONFIG_SATA_SIL24 is not set
-# CONFIG_SATA_SIS is not set
-# CONFIG_SATA_ULI is not set
-# CONFIG_SATA_VIA is not set
-# CONFIG_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
@@ -490,15 +504,73 @@ CONFIG_SATA_SIL=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+CONFIG_ATA=y
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SVW is not set
+# CONFIG_ATA_PIIX is not set
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+CONFIG_SATA_SIL=y
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_PLATFORM is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -535,6 +607,7 @@ CONFIG_MD_RAID1=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -566,6 +639,7 @@ CONFIG_PHYLIB=y
 CONFIG_CICADA_PHY=y
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -622,6 +696,7 @@ CONFIG_E100=y
 # CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
 CONFIG_GFAR_NAPI=y
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -630,6 +705,7 @@ CONFIG_GFAR_NAPI=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -669,6 +745,7 @@ CONFIG_GFAR_NAPI=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -713,6 +790,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -753,10 +831,6 @@ CONFIG_HW_RANDOM=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 is not set
@@ -765,7 +839,6 @@ CONFIG_HW_RANDOM=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -842,6 +915,7 @@ CONFIG_SPI_MPC83xx=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -876,29 +950,27 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -911,6 +983,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -918,6 +991,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -933,6 +1011,7 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -972,6 +1051,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
@@ -1010,6 +1090,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 CONFIG_USB_MON=y
 
@@ -1027,6 +1108,7 @@ CONFIG_USB_MON=y
 #
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
@@ -1034,12 +1116,13 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1067,6 +1150,7 @@ CONFIG_USB_ETH_RNDIS=y
 # CONFIG_USB_GADGETFS is not set
 # CONFIG_USB_FILE_STORAGE is not set
 # CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
 
 #
 # MMC/SD Card support
@@ -1102,6 +1186,7 @@ CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_HCTOSYS=y
 CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
 
 #
 # RTC interfaces
@@ -1144,6 +1229,10 @@ CONFIG_NET_DMA=y
 #
 CONFIG_INTEL_IOATDMA=y
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1154,6 +1243,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -1161,6 +1251,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1190,8 +1281,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -1206,7 +1299,6 @@ CONFIG_RAMFS=y
 # 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
@@ -1249,6 +1341,10 @@ CONFIG_PARTITION_ADVANCED=y
 # CONFIG_ATARI_PARTITION is not set
 # CONFIG_MAC_PARTITION is not set
 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
@@ -1261,14 +1357,21 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1279,8 +1382,11 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1294,9 +1400,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
@@ -1316,8 +1423,10 @@ CONFIG_FORCED_INLINING=y
 #
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ALGAPI=y
-# CONFIG_CRYPTO_MANAGER is not set
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
@@ -1326,8 +1435,10 @@ CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_ECB is not set
-# CONFIG_CRYPTO_CBC is not set
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index 9eefab967898223635c846588a5b824b37c09a29..c24db58be45773fb93aa2cc8ac60e5141a656cdd 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:28:54 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:24:10 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 CONFIG_PPC_83xx=y
 # CONFIG_PPC_85xx is not set
@@ -39,6 +41,8 @@ CONFIG_PPC_83xx=y
 CONFIG_6xx=y
 CONFIG_83xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
@@ -58,28 +62,32 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 # CONFIG_EPOLL is not set
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -97,6 +105,7 @@ CONFIG_MODULE_UNLOAD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -119,8 +128,10 @@ CONFIG_PPC_GEN550=y
 #
 # Platform support
 #
+# CONFIG_MPC832x_MDS is not set
 CONFIG_MPC834x_SYS=y
 # CONFIG_MPC834x_ITX is not set
+# CONFIG_MPC8360E_PB is not set
 CONFIG_MPC834x=y
 # CONFIG_MPIC is not set
 
@@ -130,6 +141,7 @@ CONFIG_MPC834x=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -137,8 +149,10 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
+CONFIG_MATH_EMULATION=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -204,6 +218,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -225,10 +240,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -258,7 +276,6 @@ CONFIG_TCP_CONG_BIC=y
 # 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
 
@@ -328,6 +345,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -338,6 +361,12 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -362,6 +391,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -393,6 +423,7 @@ CONFIG_MARVELL_PHY=y
 # CONFIG_CICADA_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -449,6 +480,7 @@ CONFIG_E100=y
 # CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
 # CONFIG_GFAR_NAPI is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -457,6 +489,7 @@ CONFIG_GIANFAR=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -495,6 +528,7 @@ CONFIG_GIANFAR=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -539,6 +573,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -575,10 +610,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -587,7 +618,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -653,6 +683,7 @@ CONFIG_I2C_MPC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -686,29 +717,27 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -720,6 +749,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -727,6 +757,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -789,6 +824,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -799,6 +838,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -806,6 +846,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -835,8 +876,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -904,14 +947,21 @@ CONFIG_PARTITION_ADVANCED=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -922,11 +972,14 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -941,7 +994,11 @@ CONFIG_LOG_BUF_SHIFT=14
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
@@ -950,6 +1007,10 @@ CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index c0703415d6084d4887979351a60b7de2a0bc2423..58e6795dbfe5bd0babf2e0f5e9301248c805181a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18
-# Thu Sep 21 18:14:27 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:24:40 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -22,13 +23,13 @@ CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 CONFIG_PPC_83xx=y
 # CONFIG_PPC_85xx is not set
@@ -40,6 +41,8 @@ CONFIG_PPC_83xx=y
 CONFIG_6xx=y
 CONFIG_83xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
 # CONFIG_SMP is not set
@@ -59,16 +62,20 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_EMBEDDED=y
 CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 # CONFIG_KALLSYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
@@ -98,6 +105,7 @@ CONFIG_MODULE_UNLOAD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -121,6 +129,7 @@ CONFIG_PPC_GEN550=y
 #
 # Platform support
 #
+# CONFIG_MPC832x_MDS is not set
 # CONFIG_MPC834x_SYS is not set
 # CONFIG_MPC834x_ITX is not set
 CONFIG_MPC8360E_PB=y
@@ -133,6 +142,7 @@ CONFIG_PPC_MPC836x=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -140,8 +150,10 @@ CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT is not set
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
+CONFIG_MATH_EMULATION=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -207,6 +219,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -228,10 +241,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -330,6 +346,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -340,6 +362,8 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -358,14 +382,16 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -378,11 +404,12 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -392,15 +419,22 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -428,6 +462,7 @@ CONFIG_SCSI_PROC_FS=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -488,6 +523,7 @@ CONFIG_UCC_GETH=y
 # CONFIG_UGETH_MAGIC_PACKET is not set
 # CONFIG_UGETH_FILTERING is not set
 # CONFIG_UGETH_TX_ON_DEMOND is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -496,6 +532,7 @@ CONFIG_UCC_GETH=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -535,6 +572,7 @@ CONFIG_UCC_GETH=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -579,6 +617,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -615,10 +654,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -627,7 +662,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -693,6 +727,7 @@ CONFIG_I2C_MPC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -726,29 +761,27 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83781D is not set
 # CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -760,6 +793,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -767,6 +801,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -829,6 +868,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -839,6 +882,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -846,6 +890,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -875,8 +920,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -944,21 +991,28 @@ CONFIG_PARTITION_ADVANCED=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # QE Options
 #
-# CONFIG_UCC_SLOW is not set
+CONFIG_UCC_SLOW=y
 CONFIG_UCC_FAST=y
 CONFIG_UCC=y
 
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -969,11 +1023,14 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_SERIAL_TEXT_DEBUG is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -988,7 +1045,11 @@ CONFIG_LOG_BUF_SHIFT=14
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
 # CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=y
@@ -997,6 +1058,10 @@ CONFIG_CRYPTO_MD5=y
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_WP512 is not set
 # CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index 67e7d0b5793df52f355b89fb678335956d0fa567..17120c472304294b9b3d458fc02d12a281ca1a92 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:29:23 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:25:24 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 CONFIG_PPC_85xx=y
@@ -38,6 +40,8 @@ CONFIG_PPC_85xx=y
 # CONFIG_E200 is not set
 CONFIG_85xx=y
 CONFIG_E500=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_BOOKE=y
 CONFIG_FSL_BOOKE=y
 # CONFIG_PHYS_64BIT is not set
@@ -58,16 +62,20 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -76,12 +84,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -94,6 +102,7 @@ CONFIG_BASE_SMALL=0
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -116,6 +125,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 CONFIG_MPC8540_ADS=y
+# CONFIG_MPC8560_ADS is not set
 # CONFIG_MPC85xx_CDS is not set
 CONFIG_MPC8540=y
 CONFIG_PPC_INDIRECT_PCI_BE=y
@@ -127,6 +137,7 @@ CONFIG_MPIC=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -137,6 +148,7 @@ CONFIG_BINFMT_MISC=y
 CONFIG_MATH_EMULATION=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -199,6 +211,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -220,10 +233,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -253,7 +269,6 @@ CONFIG_TCP_CONG_BIC=y
 # 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
 
@@ -319,6 +334,11 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -329,6 +349,12 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -351,6 +377,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -377,6 +404,7 @@ CONFIG_PHYLIB=y
 # CONFIG_CICADA_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -429,6 +457,7 @@ CONFIG_GFAR_NAPI=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -472,6 +501,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
@@ -493,17 +523,12 @@ 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_RAW_DRIVER is not set
 
 #
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -519,6 +544,7 @@ CONFIG_GEN_RTC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -527,17 +553,14 @@ CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -549,6 +572,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -556,6 +580,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -616,6 +645,10 @@ CONFIG_FIRMWARE_EDID=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -626,6 +659,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -633,6 +667,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -662,8 +697,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -728,14 +765,21 @@ CONFIG_PARTITION_ADVANCED=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -746,8 +790,11 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -761,10 +808,10 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
@@ -782,7 +829,3 @@ CONFIG_FORCED_INLINING=y
 # Cryptographic options
 #
 # CONFIG_CRYPTO is not set
-
-#
-# Hardware crypto devices
-#
index ddc2a7b07ba0e4d1ce81a5352e808a03fd8b678b..ecaa267a853cef71850040a767f05c6a1a8e0bc5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc4
-# Fri Aug 11 16:45:05 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:25:53 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 CONFIG_PPC_85xx=y
@@ -38,6 +40,8 @@ CONFIG_PPC_85xx=y
 # CONFIG_E200 is not set
 CONFIG_85xx=y
 CONFIG_E500=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_BOOKE=y
 CONFIG_FSL_BOOKE=y
 # CONFIG_PHYS_64BIT is not set
@@ -58,16 +62,20 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -76,12 +84,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -94,6 +102,7 @@ CONFIG_BASE_SMALL=0
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -110,7 +119,6 @@ CONFIG_DEFAULT_AS=y
 # CONFIG_DEFAULT_CFQ is not set
 # CONFIG_DEFAULT_NOOP is not set
 CONFIG_DEFAULT_IOSCHED="anticipatory"
-CONFIG_MPIC=y
 CONFIG_CPM2=y
 # CONFIG_WANT_EARLY_SERIAL is not set
 
@@ -122,6 +130,7 @@ CONFIG_MPC8560_ADS=y
 # CONFIG_MPC85xx_CDS is not set
 CONFIG_MPC8560=y
 CONFIG_PPC_INDIRECT_PCI_BE=y
+CONFIG_MPIC=y
 
 #
 # Kernel options
@@ -129,6 +138,7 @@ CONFIG_PPC_INDIRECT_PCI_BE=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -140,6 +150,7 @@ CONFIG_BINFMT_MISC=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_PC_KEYBOARD is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -152,13 +163,13 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_PROC_DEVICETREE is not set
 # CONFIG_CMDLINE_BOOL is not set
 # CONFIG_PM is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
 # CONFIG_SECCOMP is not set
 CONFIG_ISA_DMA_API=y
 
 #
 # Bus options
 #
+# CONFIG_MPIC_WEIRD is not set
 # CONFIG_PPC_I8259 is not set
 CONFIG_PPC_INDIRECT_PCI=y
 CONFIG_FSL_SOC=y
@@ -205,6 +216,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -226,10 +238,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -259,7 +274,6 @@ CONFIG_TCP_CONG_BIC=y
 # 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
 
@@ -330,6 +344,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -340,6 +360,12 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -364,6 +390,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -395,6 +422,7 @@ CONFIG_DAVICOM_PHY=y
 # CONFIG_CICADA_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -437,6 +465,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
 CONFIG_GFAR_NAPI=y
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -445,6 +474,7 @@ CONFIG_GFAR_NAPI=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -483,6 +513,7 @@ CONFIG_GFAR_NAPI=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -522,6 +553,7 @@ CONFIG_INPUT=y
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_SERIAL_CPM=y
@@ -536,7 +568,6 @@ CONFIG_SERIAL_CPM_SCC2=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_BRIQ_PANEL is not set
 
 #
 # IPMI
@@ -554,10 +585,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -566,7 +593,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -582,6 +608,7 @@ CONFIG_GEN_RTC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -590,17 +617,14 @@ CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -612,6 +636,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -619,6 +644,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -681,6 +711,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -691,6 +725,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -698,6 +733,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -727,8 +763,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -793,14 +831,21 @@ CONFIG_PARTITION_ADVANCED=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -811,8 +856,11 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -826,10 +874,10 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
@@ -848,7 +896,3 @@ CONFIG_FORCED_INLINING=y
 # Cryptographic options
 #
 # CONFIG_CRYPTO is not set
-
-#
-# Hardware crypto devices
-#
index 72edf9f66829b77ab3b9e1a21fbf916125f5f145..1f61bce33e3252d9f8fa5c97ab8ac279a64abad3 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:29:49 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:26:46 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 CONFIG_PPC_85xx=y
@@ -38,6 +40,8 @@ CONFIG_PPC_85xx=y
 # CONFIG_E200 is not set
 CONFIG_85xx=y
 CONFIG_E500=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_BOOKE=y
 CONFIG_FSL_BOOKE=y
 # CONFIG_PHYS_64BIT is not set
@@ -58,16 +62,20 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -76,12 +84,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -94,6 +102,7 @@ CONFIG_BASE_SMALL=0
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -116,6 +125,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 # CONFIG_MPC8540_ADS is not set
+# CONFIG_MPC8560_ADS is not set
 CONFIG_MPC85xx_CDS=y
 CONFIG_MPC8540=y
 CONFIG_PPC_INDIRECT_PCI_BE=y
@@ -127,6 +137,7 @@ CONFIG_MPIC=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -137,6 +148,7 @@ CONFIG_BINFMT_MISC=y
 CONFIG_MATH_EMULATION=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -202,6 +214,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -223,10 +236,13 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -256,7 +272,6 @@ CONFIG_TCP_CONG_BIC=y
 # 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
 
@@ -327,10 +342,17 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -353,7 +375,6 @@ CONFIG_IDEPCI_SHARE_IRQ=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
 CONFIG_BLK_DEV_GENERIC=y
 # CONFIG_BLK_DEV_OPTI621 is not set
-# 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 is not set
@@ -367,6 +388,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
 # CONFIG_BLK_DEV_IT821X is not set
@@ -375,6 +397,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 CONFIG_BLK_DEV_VIA82CXXX=y
@@ -389,6 +412,12 @@ CONFIG_BLK_DEV_IDEDMA=y
 #
 # CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -413,6 +442,7 @@ CONFIG_BLK_DEV_IDEDMA=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -444,6 +474,7 @@ CONFIG_PHYLIB=y
 # CONFIG_CICADA_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -483,6 +514,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
 CONFIG_GFAR_NAPI=y
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -491,6 +523,7 @@ CONFIG_GFAR_NAPI=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -529,6 +562,7 @@ CONFIG_GFAR_NAPI=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -573,6 +607,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -596,10 +631,6 @@ CONFIG_GEN_RTC=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 is not set
@@ -608,7 +639,6 @@ CONFIG_GEN_RTC=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -624,6 +654,7 @@ CONFIG_GEN_RTC=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -632,17 +663,14 @@ CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_VT1211 is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -654,6 +682,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -661,6 +690,11 @@ CONFIG_FIRMWARE_EDID=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -723,6 +757,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -733,6 +771,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -740,6 +779,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -769,8 +809,10 @@ CONFIG_DNOTIFY=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -835,14 +877,21 @@ CONFIG_PARTITION_ADVANCED=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -853,8 +902,11 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -868,10 +920,10 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
@@ -889,7 +941,3 @@ CONFIG_FORCED_INLINING=y
 # Cryptographic options
 #
 # CONFIG_CRYPTO is not set
-
-#
-# Hardware crypto devices
-#
index 92a527fccf83c4ad07bd66de109d5718465402c1..53fcd6932f5bfea322b8e09d286f8c2d0a51211a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:30:15 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:27:14 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 CONFIG_GENERIC_TBSYNC=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
 # Processor support
 #
 # CONFIG_CLASSIC32 is not set
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 # CONFIG_PPC_85xx is not set
@@ -38,6 +40,8 @@ CONFIG_PPC_86xx=y
 # CONFIG_E200 is not set
 CONFIG_6xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_ALTIVEC=y
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
@@ -62,15 +66,18 @@ CONFIG_LOCALVERSION=""
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -79,15 +86,15 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 # CONFIG_ELF_CORE is not set
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
-# CONFIG_SLAB is not set
+CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-CONFIG_SLOB=y
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -97,6 +104,7 @@ CONFIG_SLOB=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
@@ -129,6 +137,7 @@ CONFIG_MPC8641=y
 CONFIG_HIGHMEM=y
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
 CONFIG_HZ_1000=y
 CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
@@ -140,6 +149,7 @@ CONFIG_BINFMT_ELF=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_IRQ_ALL_CPUS is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -206,6 +216,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -226,21 +237,29 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_INET_TUNNEL is not set
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 CONFIG_IPV6=y
 # CONFIG_IPV6_PRIVACY is not set
 # CONFIG_IPV6_ROUTER_PREF is not set
 # CONFIG_INET6_AH is not set
 # CONFIG_INET6_ESP is not set
 # CONFIG_INET6_IPCOMP is not set
+# CONFIG_IPV6_MIP6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
 CONFIG_INET6_XFRM_MODE_TRANSPORT=y
 CONFIG_INET6_XFRM_MODE_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_BEET=y
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=y
 # CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -267,7 +286,6 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
 # 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
 
@@ -338,6 +356,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -348,6 +372,12 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_NETLINK is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -372,6 +402,7 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -403,6 +434,7 @@ CONFIG_PHYLIB=y
 # CONFIG_CICADA_PHY is not set
 CONFIG_VITESSE_PHY=y
 # CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
 # CONFIG_FIXED_PHY is not set
 
 #
@@ -440,6 +472,7 @@ CONFIG_MII=y
 # CONFIG_BNX2 is not set
 CONFIG_GIANFAR=y
 # CONFIG_GFAR_NAPI is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -448,6 +481,7 @@ CONFIG_GIANFAR=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -486,6 +520,7 @@ CONFIG_GIANFAR=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -542,6 +577,7 @@ CONFIG_SERIAL_8250_RSA=y
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
@@ -563,10 +599,6 @@ CONFIG_UNIX98_PTYS=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 is not set
@@ -575,7 +607,6 @@ CONFIG_UNIX98_PTYS=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -640,6 +671,7 @@ CONFIG_SENSORS_EEPROM=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -647,15 +679,10 @@ CONFIG_SENSORS_EEPROM=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -667,6 +694,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Console display driver support
@@ -681,6 +709,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -743,6 +776,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -753,6 +790,7 @@ 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_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -760,6 +798,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -788,8 +827,10 @@ CONFIG_FS_MBCACHE=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -903,14 +944,21 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -921,12 +969,16 @@ CONFIG_PLIST=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
@@ -936,10 +988,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
-# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUGGER is not set
@@ -957,7 +1009,3 @@ CONFIG_FORCED_INLINING=y
 # Cryptographic options
 #
 # CONFIG_CRYPTO is not set
-
-#
-# Hardware crypto devices
-#
index 765c8bb90ddd12078bd92b725c7d3d4081a71e2b..f611df480fd9c3ce0b05b6dc2f2a83a857b59b1c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:30:23 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:28:56 2007
 #
 # CONFIG_PPC64 is not set
 CONFIG_PPC32=y
@@ -10,6 +10,7 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -21,13 +22,14 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
 # Processor support
 #
 CONFIG_CLASSIC32=y
-# CONFIG_PPC_52xx is not set
 # CONFIG_PPC_82xx is not set
 # CONFIG_PPC_83xx is not set
 # CONFIG_PPC_85xx is not set
@@ -38,6 +40,8 @@ CONFIG_CLASSIC32=y
 # CONFIG_E200 is not set
 CONFIG_6xx=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
 CONFIG_ALTIVEC=y
 CONFIG_PPC_STD_MMU=y
 CONFIG_PPC_STD_MMU_32=y
@@ -58,17 +62,21 @@ CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -77,12 +85,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -100,6 +108,7 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 CONFIG_LBD=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 CONFIG_LSF=y
@@ -121,18 +130,22 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_ISERIES is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_APUS is not set
 # CONFIG_PPC_CHRP is not set
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_EFIKA is not set
+# CONFIG_PPC_LITE5200 is not set
 CONFIG_PPC_PMAC=y
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
-# CONFIG_UDBG_RTAS_CONSOLE is not set
+CONFIG_PPC_NATIVE=y
 # CONFIG_PPC_RTAS is not set
 # CONFIG_MMIO_NVRAM is not set
 CONFIG_PPC_MPC106=y
 # CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_TABLE=y
 # CONFIG_CPU_FREQ_DEBUG is not set
@@ -157,6 +170,7 @@ CONFIG_MPIC=y
 # CONFIG_HIGHMEM is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -167,6 +181,7 @@ CONFIG_BINFMT_MISC=m
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 # CONFIG_KEXEC is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -181,6 +196,8 @@ CONFIG_PROC_DEVICETREE=y
 CONFIG_PM=y
 # CONFIG_PM_LEGACY is not set
 CONFIG_PM_DEBUG=y
+# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
+CONFIG_PM_SYSFS_DEPRECATED=y
 CONFIG_SOFTWARE_SUSPEND=y
 CONFIG_PM_STD_PARTITION=""
 CONFIG_SECCOMP=y
@@ -254,6 +271,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_NET_KEY=y
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -272,10 +290,13 @@ CONFIG_INET_ESP=y
 # CONFIG_INET_TUNNEL is not set
 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -292,14 +313,33 @@ CONFIG_NETFILTER=y
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK_SUPPORT=y
+# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
+CONFIG_NF_CONNTRACK=m
+# CONFIG_NF_CT_ACCT is not set
+# CONFIG_NF_CONNTRACK_MARK is not set
+# CONFIG_NF_CONNTRACK_EVENTS is not set
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_IRC=m
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SIP is not set
+CONFIG_NF_CONNTRACK_TFTP=m
 CONFIG_NETFILTER_XTABLES=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
 CONFIG_NETFILTER_XT_TARGET_MARK=m
 CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
 CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
 CONFIG_NETFILTER_XT_MATCH_COMMENT=m
 CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
 CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
 CONFIG_NETFILTER_XT_MATCH_ESP=m
 CONFIG_NETFILTER_XT_MATCH_HELPER=m
 CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -312,61 +352,49 @@ CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
 # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
 CONFIG_NETFILTER_XT_MATCH_REALM=m
 CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
+# CONFIG_NETFILTER_XT_MATCH_STATE is not set
 # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
 CONFIG_NETFILTER_XT_MATCH_STRING=m
 CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT 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_CONNTRACK_EVENTS 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_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-# CONFIG_IP_NF_SIP is not set
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 # CONFIG_IP_NF_QUEUE is not set
 CONFIG_IP_NF_IPTABLES=m
 CONFIG_IP_NF_MATCH_IPRANGE=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=m
 CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_MATCH_OWNER=m
 CONFIG_IP_NF_MATCH_ADDRTYPE=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_NF_NAT=m
+CONFIG_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_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
+# CONFIG_NF_NAT_SNMP_BASIC is not set
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+# CONFIG_NF_NAT_AMANDA is not set
+# CONFIG_NF_NAT_PPTP is not set
+# CONFIG_NF_NAT_H323 is not set
+# CONFIG_NF_NAT_SIP is not set
 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_TTL=m
 CONFIG_IP_NF_RAW=m
 CONFIG_IP_NF_ARPTABLES=m
@@ -384,8 +412,11 @@ CONFIG_IP_DCCP_ACKVEC=y
 # DCCP CCIDs Configuration (EXPERIMENTAL)
 #
 CONFIG_IP_DCCP_CCID2=m
+# CONFIG_IP_DCCP_CCID2_DEBUG is not set
 CONFIG_IP_DCCP_CCID3=m
 CONFIG_IP_DCCP_TFRC_LIB=m
+# CONFIG_IP_DCCP_CCID3_DEBUG is not set
+CONFIG_IP_DCCP_CCID3_RTO=100
 
 #
 # DCCP Kernel Hacking
@@ -410,7 +441,6 @@ CONFIG_IP_DCCP_TFRC_LIB=m
 # 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
 
@@ -566,6 +596,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -594,7 +630,6 @@ CONFIG_IDEPCI_SHARE_IRQ=y
 # 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_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
@@ -609,6 +644,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 # CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
 # CONFIG_BLK_DEV_IT821X is not set
@@ -617,6 +653,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
 CONFIG_BLK_DEV_PDC202XX_NEW=y
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
+CONFIG_BLK_DEV_SL82C105=y
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -634,6 +671,8 @@ CONFIG_IDEDMA_AUTO=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+CONFIG_SCSI_NETLINK=y
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -653,14 +692,16 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_MULTI_LUN is not set
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -678,11 +719,12 @@ CONFIG_AIC7XXX_DEBUG_MASK=0
 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 CONFIG_SCSI_AIC7XXX_OLD=m
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
 # CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-# CONFIG_ATA is not set
 # CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -692,14 +734,15 @@ CONFIG_SCSI_AIC7XXX_OLD=m
 # CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX 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_MMIO=y
-# CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -709,6 +752,7 @@ CONFIG_SCSI_MESH=y
 CONFIG_SCSI_MESH_SYNC_RATE=5
 CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
 CONFIG_SCSI_MAC53C94=y
+# CONFIG_SCSI_SRP is not set
 
 #
 # PCMCIA SCSI adapter support
@@ -719,6 +763,11 @@ CONFIG_SCSI_MAC53C94=y
 # CONFIG_PCMCIA_QLOGIC is not set
 # CONFIG_PCMCIA_SYM53C500 is not set
 
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
 #
 # Multi-device support (RAID and LVM)
 #
@@ -732,6 +781,7 @@ CONFIG_MD_RAID10=m
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
@@ -798,6 +848,7 @@ CONFIG_THERM_WINDTUNNEL=m
 CONFIG_THERM_ADT746X=m
 # CONFIG_WINDFARM is not set
 # CONFIG_ANSLCD is not set
+CONFIG_PMAC_RACKMETER=m
 
 #
 # Network device support
@@ -838,6 +889,7 @@ CONFIG_SUNGEM=y
 # CONFIG_HP100 is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_PCNET32_NAPI is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
@@ -874,6 +926,7 @@ CONFIG_PCNET32=y
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
 # CONFIG_MV643XX_ETH is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -882,6 +935,7 @@ CONFIG_PCNET32=y
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -957,6 +1011,7 @@ CONFIG_PPP_BSDCOMP=m
 # CONFIG_PPP_MPPE is not set
 # CONFIG_PPPOE is not set
 # CONFIG_SLIP is not set
+CONFIG_SLHC=y
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
@@ -977,6 +1032,7 @@ CONFIG_PPP_BSDCOMP=m
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -999,6 +1055,7 @@ CONFIG_INPUT_KEYBOARD=y
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
 CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 # CONFIG_MOUSE_SERIAL is not set
@@ -1039,6 +1096,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 #
 # Non-8250 serial port support
 #
+# CONFIG_SERIAL_UARTLITE is not set
 CONFIG_SERIAL_CORE=m
 CONFIG_SERIAL_PMACZILOG=m
 # CONFIG_SERIAL_JSM is not set
@@ -1062,13 +1120,7 @@ CONFIG_GEN_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
 CONFIG_AGP=m
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_VIA is not set
 CONFIG_AGP_UNINORTH=m
 CONFIG_DRM=m
 # CONFIG_DRM_TDFX is not set
@@ -1091,7 +1143,6 @@ CONFIG_DRM_RADEON=m
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -1166,15 +1217,10 @@ CONFIG_I2C_POWERMAC=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -1187,6 +1233,7 @@ CONFIG_VIDEO_V4L2=y
 #
 # CONFIG_FIRMWARE_EDID is not set
 CONFIG_FB=y
+CONFIG_FB_DDC=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -1235,6 +1282,7 @@ CONFIG_FB_3DFX=y
 # CONFIG_FB_3DFX_ACCEL is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -1392,6 +1440,11 @@ CONFIG_SND_USB_AUDIO=m
 #
 # CONFIG_SOUND_PRIME is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -1408,6 +1461,7 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 CONFIG_USB_DYNAMIC_MINORS=y
 # CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1448,13 +1502,13 @@ CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
 CONFIG_USB_HIDINPUT_POWERBOOK=y
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
@@ -1484,12 +1538,14 @@ CONFIG_USB_APPLETOUCH=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
+CONFIG_USB_USBNET_MII=m
 CONFIG_USB_USBNET=m
 CONFIG_USB_NET_AX8817X=m
 CONFIG_USB_NET_CDCETHER=m
 # CONFIG_USB_NET_GL620A is not set
 CONFIG_USB_NET_NET1080=m
 # CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
 # CONFIG_USB_NET_RNDIS_HOST is not set
 # CONFIG_USB_NET_CDC_SUBSET is not set
 CONFIG_USB_NET_ZAURUS=m
@@ -1504,6 +1560,7 @@ CONFIG_USB_MON=y
 #
 CONFIG_USB_SERIAL=m
 # CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_AIRCABLE is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
 # CONFIG_USB_SERIAL_ARK3116 is not set
 # CONFIG_USB_SERIAL_BELKIN is not set
@@ -1538,6 +1595,8 @@ 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_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
 # CONFIG_USB_SERIAL_NAVMAN is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_HP4X is not set
@@ -1548,6 +1607,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
 # CONFIG_USB_SERIAL_XIRCOM is not set
 # CONFIG_USB_SERIAL_OPTION is not set
 # CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_DEBUG is not set
 CONFIG_USB_EZUSB=y
 
 #
@@ -1555,6 +1615,7 @@ CONFIG_USB_EZUSB=y
 #
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
@@ -1562,12 +1623,13 @@ CONFIG_USB_EZUSB=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
 CONFIG_USB_APPLEDISPLAY=m
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1629,6 +1691,10 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1639,6 +1705,7 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 # CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -1646,6 +1713,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1682,8 +1750,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
@@ -1801,9 +1871,15 @@ CONFIG_NLS_ISO8859_1=m
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=m
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC16=y
 CONFIG_CRC32=y
@@ -1815,6 +1891,7 @@ CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TEXTSEARCH_BM=m
 CONFIG_TEXTSEARCH_FSM=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1826,8 +1903,11 @@ CONFIG_OPROFILE=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1841,14 +1921,16 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_FORCED_INLINING is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUGGER=y
 CONFIG_XMON=y
 CONFIG_XMON_DEFAULT=y
+CONFIG_XMON_DISASSEMBLY=y
 # CONFIG_BDI_SWITCH is not set
 CONFIG_BOOTX_TEXT=y
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -1863,7 +1945,12 @@ CONFIG_BOOTX_TEXT=y
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
@@ -1872,9 +1959,14 @@ CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_TGR192=m
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
index 340376a470017c173d06c0a6e7521079c6d430fc..debac66e82589bee8e3518db45e305a06c3c503f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc3
-# Tue Jan  2 15:32:44 2007
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:28:58 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -246,7 +246,6 @@ CONFIG_PPC_I8259=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
index 70ed61337f5c03ad20b3775055c2baf4a99b0466..32560876c3dc0518d818696e5bc05edf9ddeda52 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19-rc6
-# Tue Nov 21 19:38:53 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:29:11 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -10,6 +10,8 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_ILOG2_U64=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -23,6 +25,7 @@ CONFIG_PPC_OF=y
 # CONFIG_PPC_UDBG_16550 is not set
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -64,6 +67,7 @@ CONFIG_SYSVIPC=y
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -126,6 +130,7 @@ CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_APUS is not set
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_ISERIES is not set
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_MAPLE is not set
 # CONFIG_PPC_PASEMI is not set
@@ -164,6 +169,7 @@ CONFIG_PS3_VUART=y
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -261,6 +267,7 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
@@ -366,6 +373,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
 
@@ -385,6 +393,7 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_CONSTANTS is not set
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
 # SCSI Transports
@@ -427,6 +436,7 @@ CONFIG_SCSI_PROC_FS=y
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -549,10 +559,6 @@ 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_RAW_DRIVER is not set
 # CONFIG_HANGCHECK_TIMER is not set
 
@@ -598,6 +604,7 @@ CONFIG_GEN_RTC=y
 #
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Console display driver support
@@ -611,6 +618,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -671,6 +683,10 @@ CONFIG_DUMMY_CONSOLE=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -771,6 +787,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
@@ -779,6 +800,7 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -793,6 +815,8 @@ CONFIG_PLIST=y
 CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -806,12 +830,11 @@ CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_SPINLOCK_SLEEP=y
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_DEBUG_LIST=y
 CONFIG_FORCED_INLINING=y
-# CONFIG_HEADERS_CHECK is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
index d2833c1a1f3d784f7b0b37302fb9728a64516dea..1c794fe718fd52dfe520d19db5f464f514b86d50 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc6
-# Sun Sep 10 10:45:12 2006
+# Linux kernel version: 2.6.20-rc5
+# Mon Jan 22 22:31:27 2007
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -10,6 +10,8 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_ILOG2_U64=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -22,6 +24,8 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -31,6 +35,9 @@ CONFIG_PPC_UDBG_16550=y
 CONFIG_POWER3=y
 CONFIG_POWER4=y
 CONFIG_PPC_FPU=y
+# CONFIG_PPC_DCR_NATIVE is not set
+# CONFIG_PPC_DCR_MMIO is not set
+# CONFIG_PPC_OF_PLATFORM_PCI is not set
 CONFIG_ALTIVEC=y
 CONFIG_PPC_STD_MMU=y
 CONFIG_VIRT_CPU_ACCOUNTING=y
@@ -52,19 +59,22 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
-# CONFIG_TASKSTATS is not set
-CONFIG_SYSCTL=y
+# CONFIG_UTS_NS is not set
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -73,12 +83,12 @@ CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
-CONFIG_RT_MUTEXES=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
 CONFIG_SHMEM=y
 CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_SLOB is not set
@@ -97,6 +107,7 @@ CONFIG_STOP_MACHINE=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 
 #
@@ -116,15 +127,19 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # Platform support
 #
 CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_PPC_ISERIES is not set
 # CONFIG_EMBEDDED6xx is not set
 # CONFIG_APUS is not set
 CONFIG_PPC_PSERIES=y
+# CONFIG_PPC_ISERIES is not set
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_MAPLE is not set
+# CONFIG_PPC_PASEMI is not set
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set
 # CONFIG_PPC_IBM_CELL_BLADE is not set
+# CONFIG_PPC_PS3 is not set
+CONFIG_PPC_NATIVE=y
 # CONFIG_UDBG_RTAS_CONSOLE is not set
 CONFIG_XICS=y
 # CONFIG_U3_DART is not set
@@ -137,6 +152,8 @@ CONFIG_IBMVIO=y
 CONFIG_IBMEBUS=y
 # CONFIG_PPC_MPC106 is not set
 # CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
 # CONFIG_WANT_EARLY_SERIAL is not set
 CONFIG_MPIC=y
@@ -146,6 +163,7 @@ CONFIG_MPIC=y
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -170,6 +188,7 @@ CONFIG_NODES_SHIFT=4
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_FLATMEM_MANUAL is not set
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -183,7 +202,6 @@ CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NODES_SPAN_OTHER_NODES=y
 # CONFIG_PPC_64K_PAGES is not set
 CONFIG_SCHED_SMT=y
@@ -235,6 +253,7 @@ CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_NET_KEY=m
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
@@ -253,10 +272,13 @@ CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INET_TUNNEL=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -275,25 +297,30 @@ CONFIG_NETFILTER=y
 CONFIG_NETFILTER_NETLINK=y
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK_SUPPORT=y
+# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
+CONFIG_NF_CONNTRACK=m
+# CONFIG_NF_CT_ACCT is not set
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+CONFIG_NF_CONNTRACK_FTP=m
+# CONFIG_NF_CONNTRACK_H323 is not set
+CONFIG_NF_CONNTRACK_IRC=m
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SIP is not set
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
 # CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
 #
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_NETBIOS_NS is not set
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_H323 is not set
-# CONFIG_IP_NF_SIP is not set
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
 CONFIG_IP_NF_QUEUE=m
 
 #
@@ -320,7 +347,6 @@ CONFIG_LLC=y
 # 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
 
@@ -401,6 +427,12 @@ CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 
+#
+# Misc devices
+#
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
 #
 # ATA/ATAPI/MFM/RLL support
 #
@@ -428,7 +460,6 @@ CONFIG_IDEPCI_SHARE_IRQ=y
 # 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_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
@@ -443,6 +474,7 @@ CONFIG_BLK_DEV_AMD74XX=y
 # CONFIG_BLK_DEV_CS5530 is not set
 # CONFIG_BLK_DEV_HPT34X is not set
 # CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_JMICRON is not set
 # CONFIG_BLK_DEV_SC1200 is not set
 # CONFIG_BLK_DEV_PIIX is not set
 # CONFIG_BLK_DEV_IT821X is not set
@@ -451,6 +483,7 @@ CONFIG_BLK_DEV_AMD74XX=y
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 # CONFIG_BLK_DEV_SIIMAGE is not set
+CONFIG_BLK_DEV_SL82C105=y
 # CONFIG_BLK_DEV_SLC90E66 is not set
 # CONFIG_BLK_DEV_TRM290 is not set
 # CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -465,6 +498,8 @@ CONFIG_IDEDMA_AUTO=y
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+CONFIG_SCSI_NETLINK=y
 CONFIG_SCSI_PROC_FS=y
 
 #
@@ -484,14 +519,16 @@ CONFIG_CHR_DEV_SG=y
 CONFIG_SCSI_MULTI_LUN=y
 CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
 
 #
-# SCSI Transport Attributes
+# SCSI Transports
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
 CONFIG_SCSI_ISCSI_ATTRS=m
 CONFIG_SCSI_SAS_ATTRS=m
+# CONFIG_SCSI_SAS_LIBSAS is not set
 
 #
 # SCSI low-level drivers
@@ -504,10 +541,11 @@ CONFIG_SCSI_SAS_ATTRS=m
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
-CONFIG_ATA=y
 # CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -520,6 +558,7 @@ CONFIG_SCSI_IBMVSCSI=y
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_STEX is not set
 CONFIG_SCSI_SYM53C8XX_2=y
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
@@ -530,10 +569,66 @@ CONFIG_SCSI_IPR_TRACE=y
 CONFIG_SCSI_IPR_DUMP=y
 # CONFIG_SCSI_QLOGIC_1280 is not set
 CONFIG_SCSI_QLA_FC=m
+# CONFIG_SCSI_QLA_ISCSI is not set
 CONFIG_SCSI_LPFC=m
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+CONFIG_ATA=y
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SVW is not set
+# CONFIG_ATA_PIIX is not set
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+# CONFIG_SATA_VIA is not set
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+# CONFIG_PATA_ARTOP is not set
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -548,6 +643,7 @@ CONFIG_MD_RAID10=m
 CONFIG_MD_MULTIPATH=m
 CONFIG_MD_FAULTY=m
 CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_DEBUG is not set
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
@@ -576,6 +672,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -617,6 +714,7 @@ CONFIG_VORTEX=y
 CONFIG_IBMVETH=y
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=y
+# CONFIG_PCNET32_NAPI is not set
 # CONFIG_AMD8111_ETH is not set
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
@@ -655,17 +753,19 @@ CONFIG_E1000=y
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
 # CONFIG_BNX2 is not set
-# CONFIG_MV643XX_ETH is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
 #
 # CONFIG_CHELSIO_T1 is not set
+CONFIG_EHEA=m
 CONFIG_IXGB=m
 # CONFIG_IXGB_NAPI is not set
 CONFIG_S2IO=m
 # CONFIG_S2IO_NAPI is not set
 # CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
 
 #
 # Token Ring devices
@@ -697,6 +797,7 @@ CONFIG_PPP_BSDCOMP=m
 # CONFIG_PPP_MPPE is not set
 CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
+CONFIG_SLHC=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
@@ -719,6 +820,7 @@ CONFIG_NET_POLL_CONTROLLER=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -741,6 +843,7 @@ CONFIG_KEYBOARD_ATKBD=y
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
 # CONFIG_MOUSE_SERIAL is not set
@@ -815,10 +918,6 @@ CONFIG_GEN_RTC=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
@@ -829,7 +928,6 @@ CONFIG_MAX_RAW_DEVS=1024
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -894,6 +992,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -901,15 +1000,10 @@ CONFIG_I2C_ALGOBIT=y
 # CONFIG_HWMON is not set
 # CONFIG_HWMON_VID is not set
 
-#
-# Misc devices
-#
-
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -922,6 +1016,7 @@ CONFIG_VIDEO_V4L2=y
 #
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB=y
+CONFIG_FB_DDC=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
@@ -957,6 +1052,7 @@ CONFIG_FB_RADEON_I2C=y
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
+CONFIG_FB_IBM_GXT4500=y
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -988,6 +1084,11 @@ CONFIG_LCD_DEVICE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -1003,6 +1104,7 @@ CONFIG_USB=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -1043,13 +1145,13 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_SDDR55 is not set
 # CONFIG_USB_STORAGE_JUMPSHOT is not set
 # CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 CONFIG_USB_HIDDEV=y
@@ -1079,6 +1181,7 @@ CONFIG_USB_HIDDEV=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 CONFIG_USB_MON=y
 
@@ -1097,6 +1200,7 @@ CONFIG_USB_MON=y
 #
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
@@ -1104,12 +1208,13 @@ CONFIG_USB_MON=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
 # CONFIG_USB_SISUSBVGA is not set
 # CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -1148,6 +1253,9 @@ CONFIG_INFINIBAND_USER_ACCESS=m
 CONFIG_INFINIBAND_ADDR_TRANS=y
 CONFIG_INFINIBAND_MTHCA=m
 CONFIG_INFINIBAND_MTHCA_DEBUG=y
+CONFIG_INFINIBAND_EHCA=m
+CONFIG_INFINIBAND_EHCA_SCALING=y
+# CONFIG_INFINIBAND_AMSO1100 is not set
 CONFIG_INFINIBAND_IPOIB=m
 CONFIG_INFINIBAND_IPOIB_DEBUG=y
 # CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
@@ -1176,6 +1284,10 @@ CONFIG_INFINIBAND_SRP=m
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1189,6 +1301,7 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_XATTR=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -1209,6 +1322,7 @@ CONFIG_XFS_FS=m
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+# CONFIG_GFS2_FS is not set
 CONFIG_OCFS2_FS=m
 CONFIG_OCFS2_DEBUG_MASKLOG=y
 # CONFIG_MINIX_FS is not set
@@ -1246,8 +1360,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
@@ -1356,18 +1472,23 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=m
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1380,8 +1501,11 @@ CONFIG_KPROBES=y
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1395,16 +1519,20 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
 CONFIG_DEBUG_STACKOVERFLOW=y
 # CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_HCALL_STATS=y
 CONFIG_DEBUGGER=y
 CONFIG_XMON=y
 CONFIG_XMON_DEFAULT=y
+CONFIG_XMON_DISASSEMBLY=y
 CONFIG_IRQSTACKS=y
 # CONFIG_BOOTX_TEXT is not set
 # CONFIG_PPC_EARLY_DEBUG is not set
@@ -1419,7 +1547,12 @@ CONFIG_IRQSTACKS=y
 # Cryptographic options
 #
 CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
@@ -1428,9 +1561,14 @@ CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_TGR192=m
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_LRW is not set
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_CAST5=m
index 2847cd51a2d7c8c3dbee81184494d1dbc37ebcbe..c54f3639c5ade452a20af537b14e840647f24dfe 100644 (file)
@@ -775,11 +775,6 @@ static struct device_node *scan_OF_for_pci_bus(struct pci_bus *bus)
        np = scan_OF_for_pci_dev(parent, bus->self->devfn);
        of_node_put(parent);
 
-       /* sanity check */
-       if (strcmp(np->type, "pci") != 0)
-               printk(KERN_WARNING "pci: wrong type \"%s\" for bridge %s\n",
-                      np->type, np->full_name);
-
        return np;
 }
 
index f58c9780b66f705e3fe69aea463abdfe31b5c706..4d471190be8dc8ea877ca35fbc893b29b42fc635 100644 (file)
@@ -103,7 +103,7 @@ static void __init mpc832x_sys_setup_arch(void)
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
-       if ((np = of_find_node_by_name(np, "par_io")) != NULL) {
+       if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
                par_io_init(np);
                of_node_put(np);
 
index 7bfd47ad723317ed13aa83c5241b6203cfef3f9a..53b92a904e8e11a74ea1f76ad8b476008e23ebba 100644 (file)
@@ -108,7 +108,7 @@ static void __init mpc8360_sys_setup_arch(void)
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
-       if ((np = of_find_node_by_name(np, "par_io")) != NULL) {
+       if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
                par_io_init(np);
                of_node_put(np);
 
index 3c95392f4f41d8edf944002824bb013069311f45..e6653a868b91c6177c79d60a97a542bd6e79a7fe 100644 (file)
@@ -459,7 +459,8 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
                tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
                                   phb->node);
                iommu_table_setparms(phb, dn, tbl);
-               dev->dev.archdata.dma_data = iommu_init_table(tbl, phb->node);
+               PCI_DN(dn)->iommu_table = iommu_init_table(tbl, phb->node);
+               dev->dev.archdata.dma_data = PCI_DN(dn)->iommu_table;
                return;
        }
 
index ff23f5a4d4b91887e3de34060b62e86dc3a9b158..e073e246293d08fb44be9bf927eb4402e1331d18 100644 (file)
@@ -80,33 +80,39 @@ static ssize_t mmio_nvram_get_size(void)
 int __init mmio_nvram_init(void)
 {
        struct device_node *nvram_node;
-       const unsigned long *buffer;
-       int proplen;
        unsigned long nvram_addr;
+       struct resource r;
        int ret;
 
-       ret = -ENODEV;
        nvram_node = of_find_node_by_type(NULL, "nvram");
-       if (!nvram_node)
+       if (!nvram_node) {
+               printk(KERN_WARNING "nvram: no node found in device-tree\n");
+               return -ENODEV;
+       }
+
+       ret = of_address_to_resource(nvram_node, 0, &r);
+       if (ret) {
+               printk(KERN_WARNING "nvram: failed to get address (err %d)\n",
+                      ret);
                goto out;
-
-       ret = -EIO;
-       buffer = get_property(nvram_node, "reg", &proplen);
-       if (proplen != 2*sizeof(unsigned long))
-               goto out;
-
-       ret = -ENODEV;
-       nvram_addr = buffer[0];
-       mmio_nvram_len = buffer[1];
-       if ( (!mmio_nvram_len) || (!nvram_addr) )
+       }
+       nvram_addr = r.start;
+       mmio_nvram_len = r.end - r.start + 1;
+       if ( (!mmio_nvram_len) || (!nvram_addr) ) {
+               printk(KERN_WARNING "nvram: address or lenght is 0\n");
+               ret = -EIO;
                goto out;
+       }
 
        mmio_nvram_start = ioremap(nvram_addr, mmio_nvram_len);
-       if (!mmio_nvram_start)
+       if (!mmio_nvram_start) {
+               printk(KERN_WARNING "nvram: failed to ioremap\n");
+               ret = -ENOMEM;
                goto out;
+       }
 
-       printk(KERN_INFO "mmio NVRAM, %luk mapped to %p\n",
-              mmio_nvram_len >> 10, mmio_nvram_start);
+       printk(KERN_INFO "mmio NVRAM, %luk at 0x%lx mapped to %p\n",
+              mmio_nvram_len >> 10, nvram_addr, mmio_nvram_start);
 
        ppc_md.nvram_read       = mmio_nvram_read;
        ppc_md.nvram_write      = mmio_nvram_write;
index 90ed375c9b903771cecb6c5cebf946efcb0f94d6..f87e06f6bab99aabffbda6a6c104314400760637 100644 (file)
@@ -358,13 +358,12 @@ ev64360_setup_mtd(void)
 
        ptbl_entries = 3;
 
-       if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition),
+       if ((ptbl = kzalloc(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 = "reserved";
        ptbl[0].offset = 0;
index 186aebbae32d25414b076bb53762ac31de6c5c6e..9cb42ecb7f8966bb90bf3426f8b82e0cad9b55cf 100644 (file)
@@ -302,8 +302,6 @@ int __init setup_nmi_watchdog(char *str)
        if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
                return 0;
 
-       if ((nmi == NMI_LOCAL_APIC) && (nmi_known_cpu() == 0))
-               return 0;  /* no lapic support */
        nmi_watchdog = nmi;
        return 1;
 }
index 536be740ba4e6443f4ecb3501b4d45631385e4e6..f6dafa8c7c4d03bea2522125895bf43579480cb9 100644 (file)
@@ -590,6 +590,12 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
                 */
                rq->cmd_flags |= REQ_SOFTBARRIER;
 
+               /*
+                * Most requeues happen because of a busy condition,
+                * don't force unplug of the queue for that case.
+                */
+               unplug_it = 0;
+
                if (q->ordseq == 0) {
                        list_add(&rq->queuelist, &q->queue_head);
                        break;
@@ -604,11 +610,6 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
                }
 
                list_add_tail(&rq->queuelist, pos);
-               /*
-                * most requeues happen because of a busy condition, don't
-                * force unplug of the queue for that case.
-                */
-               unplug_it = 0;
                break;
 
        default:
index 36b37d755dbcc01339a29ced4c2f1b6516d27dbe..3d54680d0333c34464b1df9e5fe2631b63050079 100644 (file)
@@ -1677,8 +1677,6 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
        struct acpi_video_device *video_device = data;
        struct acpi_device *device = NULL;
 
-
-       printk("video device notify\n");
        if (!video_device)
                return;
 
index b517d24935514cc08e4c5d0b35a9273b1cdd060c..e3c7b312287af7c810357937bbd5a0738ecfd00f 100644 (file)
@@ -361,7 +361,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        { PCI_VDEVICE(INTEL, 0x27c1), board_ahci }, /* ICH7 */
        { PCI_VDEVICE(INTEL, 0x27c5), board_ahci }, /* ICH7M */
        { PCI_VDEVICE(INTEL, 0x27c3), board_ahci }, /* ICH7R */
-       { PCI_VDEVICE(AL, 0x5288), board_ahci }, /* ULi M5288 */
+       { PCI_VDEVICE(AL, 0x5288), board_ahci_ign_iferr }, /* ULi M5288 */
        { PCI_VDEVICE(INTEL, 0x2681), board_ahci }, /* ESB2 */
        { PCI_VDEVICE(INTEL, 0x2682), board_ahci }, /* ESB2 */
        { PCI_VDEVICE(INTEL, 0x2683), board_ahci }, /* ESB2 */
@@ -586,35 +586,18 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap)
 {
        u32 cmd, scontrol;
 
-       cmd = readl(port_mmio + PORT_CMD) & ~PORT_CMD_ICC_MASK;
-
-       if (cap & HOST_CAP_SSC) {
-               /* enable transitions to slumber mode */
-               scontrol = readl(port_mmio + PORT_SCR_CTL);
-               if ((scontrol & 0x0f00) > 0x100) {
-                       scontrol &= ~0xf00;
-                       writel(scontrol, port_mmio + PORT_SCR_CTL);
-               }
-
-               /* put device into slumber mode */
-               writel(cmd | PORT_CMD_ICC_SLUMBER, port_mmio + PORT_CMD);
-
-               /* wait for the transition to complete */
-               ata_wait_register(port_mmio + PORT_CMD, PORT_CMD_ICC_SLUMBER,
-                                 PORT_CMD_ICC_SLUMBER, 1, 50);
-       }
+       if (!(cap & HOST_CAP_SSS))
+               return;
 
-       /* put device into listen mode */
-       if (cap & HOST_CAP_SSS) {
-               /* first set PxSCTL.DET to 0 */
-               scontrol = readl(port_mmio + PORT_SCR_CTL);
-               scontrol &= ~0xf;
-               writel(scontrol, port_mmio + PORT_SCR_CTL);
+       /* put device into listen mode, first set PxSCTL.DET to 0 */
+       scontrol = readl(port_mmio + PORT_SCR_CTL);
+       scontrol &= ~0xf;
+       writel(scontrol, port_mmio + PORT_SCR_CTL);
 
-               /* then set PxCMD.SUD to 0 */
-               cmd &= ~PORT_CMD_SPIN_UP;
-               writel(cmd, port_mmio + PORT_CMD);
-       }
+       /* then set PxCMD.SUD to 0 */
+       cmd = readl(port_mmio + PORT_CMD) & ~PORT_CMD_ICC_MASK;
+       cmd &= ~PORT_CMD_SPIN_UP;
+       writel(cmd, port_mmio + PORT_CMD);
 }
 
 static void ahci_init_port(void __iomem *port_mmio, u32 cap,
index 08ad44b3e48fe47c17db93df394890c8aad4b855..56cf59b60ec4595a8cd9d434f3dcc1db3f2fa2fd 100644 (file)
@@ -1979,6 +1979,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 
                ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
 
+               /* collect port action mask recorded in dev actions */
+               ehc->i.action |= ehc->i.dev_action[i] & ~ATA_EH_PERDEV_MASK;
+               ehc->i.dev_action[i] &= ATA_EH_PERDEV_MASK;
+
                /* process hotplug request */
                if (dev->flags & ATA_DFLAG_DETACH)
                        ata_eh_detach_dev(dev);
index 836947da5b14de4f7e75859d2e500cb2001b31a4..7cc5a4a910a43fa48adc032ae44aae09c1ff73af 100644 (file)
@@ -372,7 +372,7 @@ struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
                if (cmd->use_sg) {
                        qc->__sg = (struct scatterlist *) cmd->request_buffer;
                        qc->n_elem = cmd->use_sg;
-               } else {
+               } else if (cmd->request_bufflen) {
                        qc->__sg = &qc->sgent;
                        qc->n_elem = 1;
                }
index 1b8e0eb9e0321a2254b1c8a162f71afca0f4cdea..aae0b5201c1edb109a750ab717416a567126a220 100644 (file)
@@ -523,8 +523,7 @@ static const struct ata_port_info mv_port_info[] = {
        },
        {  /* chip_7042 */
                .sht            = &mv_sht,
-               .flags          = (MV_COMMON_FLAGS | MV_6XXX_FLAGS |
-                                  MV_FLAG_DUAL_HC),
+               .flags          = (MV_COMMON_FLAGS | MV_6XXX_FLAGS),
                .pio_mask       = 0x1f, /* pio0-4 */
                .udma_mask      = 0x7f, /* udma0-6 */
                .port_ops       = &mv_iie_ops,
@@ -545,6 +544,8 @@ static const struct pci_device_id mv_pci_tbl[] = {
 
        { PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
 
+       { PCI_VDEVICE(TTI, 0x2310), chip_7042 },
+
        { }                     /* terminate list */
 };
 
index f6d498e1cf80b11f0dd23299415633d5d00e86f1..f7a963eb1f028ea77a7ce4576d64c3c595faa574 100644 (file)
@@ -700,7 +700,6 @@ static void nv_adma_check_cpb(struct ata_port *ap, int cpb_num, int force_err)
 static int nv_host_intr(struct ata_port *ap, u8 irq_stat)
 {
        struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
-       int handled;
 
        /* freeze if hotplugged */
        if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) {
@@ -719,13 +718,7 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat)
        }
 
        /* handle interrupt */
-       handled = ata_host_intr(ap, qc);
-       if (unlikely(!handled)) {
-               /* spurious, clear it */
-               ata_check_status(ap);
-       }
-
-       return 1;
+       return ata_host_intr(ap, qc);
 }
 
 static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
@@ -752,6 +745,11 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
                        if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) {
                                u8 irq_stat = readb(host->mmio_base + NV_INT_STATUS_CK804)
                                        >> (NV_INT_PORT_SHIFT * i);
+                               if(ata_tag_valid(ap->active_tag))
+                                       /** NV_INT_DEV indication seems unreliable at times
+                                           at least in ADMA mode. Force it on always when a
+                                           command is active, to prevent losing interrupts. */
+                                       irq_stat |= NV_INT_DEV;
                                handled += nv_host_intr(ap, irq_stat);
                                continue;
                        }
index 1c7f19aecc25f25973e2235ffd78b121026af304..88f0565c88836df0eeaa6cf359ce031029c161c8 100644 (file)
@@ -77,6 +77,7 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
 static void vt6420_error_handler(struct ata_port *ap);
 
 static const struct pci_device_id svia_pci_tbl[] = {
+       { PCI_VDEVICE(VIA, 0x5337), vt6420 },
        { PCI_VDEVICE(VIA, 0x0591), vt6420 },
        { PCI_VDEVICE(VIA, 0x3149), vt6420 },
        { PCI_VDEVICE(VIA, 0x3249), vt6421 },
index 4dc10105d61023311586f6f930950d4dc04d44ea..f96446c358bae79fe41ae51b254f5ad7f486a899 100644 (file)
@@ -1845,7 +1845,7 @@ static u16 __devinit read_bia (const hrz_dev * dev, u16 addr)
 
 /********** initialise a card **********/
 
-static int __init hrz_init (hrz_dev * dev) {
+static int __devinit hrz_init (hrz_dev * dev) {
   int onefivefive;
   
   u16 chan;
index 4f1813e04754117c5f046ff12513b8464339791a..f5c160caf9f480978db2cb0698192268433370ae 100644 (file)
@@ -293,8 +293,8 @@ static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
 {
        unsigned long pfn;
 
-       /* Turn a pfn offset into an absolute pfn */
-       pfn = PFN_DOWN(virt_to_phys((void *)PAGE_OFFSET)) + vma->vm_pgoff;
+       /* Turn a kernel-virtual address into a physical page frame */
+       pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
 
        /*
         * RED-PEN: on some architectures there is more mapped memory
index 448d5083c3810abf73d0ea647c44773c5bc52508..4fac2bdf62156e48fa036c2516ae42b2019aac33 100644 (file)
@@ -186,6 +186,7 @@ static int got_event;               /* if events processing have been done */
 static void switchover_timeout(unsigned long data);
 static struct timer_list switchover_timer =
        TIMER_INITIALIZER(switchover_timeout , 0, 0);
+static unsigned long tlclk_timer_data;
 
 static struct tlclk_alarms *alarm_events;
 
@@ -197,10 +198,19 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id);
 
 static DECLARE_WAIT_QUEUE_HEAD(wq);
 
+static unsigned long useflags;
+static DEFINE_MUTEX(tlclk_mutex);
+
 static int tlclk_open(struct inode *inode, struct file *filp)
 {
        int result;
 
+       if (test_and_set_bit(0, &useflags))
+               return -EBUSY;
+               /* this legacy device is always one per system and it doesn't
+                * know how to handle multiple concurrent clients.
+                */
+
        /* Make sure there is no interrupt pending while
         * initialising interrupt handler */
        inb(TLCLK_REG6);
@@ -221,6 +231,7 @@ static int tlclk_open(struct inode *inode, struct file *filp)
 static int tlclk_release(struct inode *inode, struct file *filp)
 {
        free_irq(telclk_interrupt, tlclk_interrupt);
+       clear_bit(0, &useflags);
 
        return 0;
 }
@@ -230,26 +241,25 @@ static ssize_t tlclk_read(struct file *filp, char __user *buf, size_t count,
 {
        if (count < sizeof(struct tlclk_alarms))
                return -EIO;
+       if (mutex_lock_interruptible(&tlclk_mutex))
+               return -EINTR;
+
 
        wait_event_interruptible(wq, got_event);
-       if (copy_to_user(buf, alarm_events, sizeof(struct tlclk_alarms)))
+       if (copy_to_user(buf, alarm_events, sizeof(struct tlclk_alarms))) {
+               mutex_unlock(&tlclk_mutex);
                return -EFAULT;
+       }
 
        memset(alarm_events, 0, sizeof(struct tlclk_alarms));
        got_event = 0;
 
+       mutex_unlock(&tlclk_mutex);
        return  sizeof(struct tlclk_alarms);
 }
 
-static ssize_t tlclk_write(struct file *filp, const char __user *buf, size_t count,
-           loff_t *f_pos)
-{
-       return 0;
-}
-
 static const struct file_operations tlclk_fops = {
        .read = tlclk_read,
-       .write = tlclk_write,
        .open = tlclk_open,
        .release = tlclk_release,
 
@@ -540,7 +550,7 @@ static ssize_t store_select_amcb1_transmit_clock(struct device *d,
                        SET_PORT_BITS(TLCLK_REG3, 0xf8, 0x7);
                        switch (val) {
                        case CLK_8_592MHz:
-                               SET_PORT_BITS(TLCLK_REG0, 0xfc, 1);
+                               SET_PORT_BITS(TLCLK_REG0, 0xfc, 2);
                                break;
                        case CLK_11_184MHz:
                                SET_PORT_BITS(TLCLK_REG0, 0xfc, 0);
@@ -549,7 +559,7 @@ static ssize_t store_select_amcb1_transmit_clock(struct device *d,
                                SET_PORT_BITS(TLCLK_REG0, 0xfc, 3);
                                break;
                        case CLK_44_736MHz:
-                               SET_PORT_BITS(TLCLK_REG0, 0xfc, 2);
+                               SET_PORT_BITS(TLCLK_REG0, 0xfc, 1);
                                break;
                        }
                } else
@@ -839,11 +849,13 @@ static void __exit tlclk_cleanup(void)
 
 static void switchover_timeout(unsigned long data)
 {
-       if ((data & 1)) {
-               if ((inb(TLCLK_REG1) & 0x08) != (data & 0x08))
+       unsigned long flags = *(unsigned long *) data;
+
+       if ((flags & 1)) {
+               if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08))
                        alarm_events->switchover_primary++;
        } else {
-               if ((inb(TLCLK_REG1) & 0x08) != (data & 0x08))
+               if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08))
                        alarm_events->switchover_secondary++;
        }
 
@@ -901,8 +913,9 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id)
 
                /* TIMEOUT in ~10ms */
                switchover_timer.expires = jiffies + msecs_to_jiffies(10);
-               switchover_timer.data = inb(TLCLK_REG1);
-               add_timer(&switchover_timer);
+               tlclk_timer_data = inb(TLCLK_REG1);
+               switchover_timer.data = (unsigned long) &tlclk_timer_data;
+               mod_timer(&switchover_timer, switchover_timer.expires);
        } else {
                got_event = 1;
                wake_up(&wq);
index a744dad9cf450f6a911efaa62f31983f47cdfe14..0cea8d4907dfb965d509e356f51c18ca23118756 100644 (file)
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2002 MontaVista Software Inc.
  *     Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
- *  Copyright (C) 2003-2005  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
+ *  Copyright (C) 2003-2007  Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
  *
  *  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
@@ -125,30 +125,17 @@ static inline uint16_t giu_clear(uint16_t offset, uint16_t clear)
        return data;
 }
 
-static unsigned int startup_giuint_low_irq(unsigned int irq)
+static void ack_giuint_low(unsigned int irq)
 {
-       unsigned int pin;
-
-       pin = GPIO_PIN_OF_IRQ(irq);
-       giu_write(GIUINTSTATL, 1 << pin);
-       giu_set(GIUINTENL, 1 << pin);
-
-       return 0;
+       giu_write(GIUINTSTATL, 1 << GPIO_PIN_OF_IRQ(irq));
 }
 
-static void shutdown_giuint_low_irq(unsigned int irq)
+static void mask_giuint_low(unsigned int irq)
 {
        giu_clear(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq));
 }
 
-static void enable_giuint_low_irq(unsigned int irq)
-{
-       giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq));
-}
-
-#define disable_giuint_low_irq shutdown_giuint_low_irq
-
-static void ack_giuint_low_irq(unsigned int irq)
+static void mask_ack_giuint_low(unsigned int irq)
 {
        unsigned int pin;
 
@@ -157,46 +144,30 @@ static void ack_giuint_low_irq(unsigned int irq)
        giu_write(GIUINTSTATL, 1 << pin);
 }
 
-static void end_giuint_low_irq(unsigned int irq)
+static void unmask_giuint_low(unsigned int irq)
 {
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq));
+       giu_set(GIUINTENL, 1 << GPIO_PIN_OF_IRQ(irq));
 }
 
-static struct hw_interrupt_type giuint_low_irq_type = {
-       .typename       = "GIUINTL",
-       .startup        = startup_giuint_low_irq,
-       .shutdown       = shutdown_giuint_low_irq,
-       .enable         = enable_giuint_low_irq,
-       .disable        = disable_giuint_low_irq,
-       .ack            = ack_giuint_low_irq,
-       .end            = end_giuint_low_irq,
+static struct irq_chip giuint_low_irq_chip = {
+       .name           = "GIUINTL",
+       .ack            = ack_giuint_low,
+       .mask           = mask_giuint_low,
+       .mask_ack       = mask_ack_giuint_low,
+       .unmask         = unmask_giuint_low,
 };
 
-static unsigned int startup_giuint_high_irq(unsigned int irq)
+static void ack_giuint_high(unsigned int irq)
 {
-       unsigned int pin;
-
-       pin = GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET;
-       giu_write(GIUINTSTATH, 1 << pin);
-       giu_set(GIUINTENH, 1 << pin);
-
-       return 0;
+       giu_write(GIUINTSTATH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
 }
 
-static void shutdown_giuint_high_irq(unsigned int irq)
+static void mask_giuint_high(unsigned int irq)
 {
        giu_clear(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
 }
 
-static void enable_giuint_high_irq(unsigned int irq)
-{
-       giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
-}
-
-#define disable_giuint_high_irq        shutdown_giuint_high_irq
-
-static void ack_giuint_high_irq(unsigned int irq)
+static void mask_ack_giuint_high(unsigned int irq)
 {
        unsigned int pin;
 
@@ -205,20 +176,17 @@ static void ack_giuint_high_irq(unsigned int irq)
        giu_write(GIUINTSTATH, 1 << pin);
 }
 
-static void end_giuint_high_irq(unsigned int irq)
+static void unmask_giuint_high(unsigned int irq)
 {
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
+       giu_set(GIUINTENH, 1 << (GPIO_PIN_OF_IRQ(irq) - GIUINT_HIGH_OFFSET));
 }
 
-static struct hw_interrupt_type giuint_high_irq_type = {
-       .typename       = "GIUINTH",
-       .startup        = startup_giuint_high_irq,
-       .shutdown       = shutdown_giuint_high_irq,
-       .enable         = enable_giuint_high_irq,
-       .disable        = disable_giuint_high_irq,
-       .ack            = ack_giuint_high_irq,
-       .end            = end_giuint_high_irq,
+static struct irq_chip giuint_high_irq_chip = {
+       .name           = "GIUINTH",
+       .ack            = ack_giuint_high,
+       .mask           = mask_giuint_high,
+       .mask_ack       = mask_ack_giuint_high,
+       .unmask         = unmask_giuint_high,
 };
 
 static int giu_get_irq(unsigned int irq)
@@ -282,9 +250,15 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_
                                        break;
                                }
                        }
+                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                                                &giuint_low_irq_chip,
+                                                handle_edge_irq);
                } else {
                        giu_clear(GIUINTTYPL, mask);
                        giu_clear(GIUINTHTSELL, mask);
+                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                                                &giuint_low_irq_chip,
+                                                handle_level_irq);
                }
                giu_write(GIUINTSTATL, mask);
        } else if (pin < GIUINT_HIGH_MAX) {
@@ -311,9 +285,15 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_
                                        break;
                                }
                        }
+                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                                                &giuint_high_irq_chip,
+                                                handle_edge_irq);
                } else {
                        giu_clear(GIUINTTYPH, mask);
                        giu_clear(GIUINTHTSELH, mask);
+                       set_irq_chip_and_handler(GIU_IRQ(pin),
+                                                &giuint_high_irq_chip,
+                                                handle_level_irq);
                }
                giu_write(GIUINTSTATH, mask);
        }
@@ -617,10 +597,11 @@ static const struct file_operations gpio_fops = {
 static int __devinit giu_probe(struct platform_device *dev)
 {
        unsigned long start, size, flags = 0;
-       unsigned int nr_pins = 0;
+       unsigned int nr_pins = 0, trigger, i, pin;
        struct resource *res1, *res2 = NULL;
        void *base;
-       int retval, i;
+       struct irq_chip *chip;
+       int retval;
 
        switch (current_cpu_data.cputype) {
        case CPU_VR4111:
@@ -688,11 +669,20 @@ static int __devinit giu_probe(struct platform_device *dev)
        giu_write(GIUINTENL, 0);
        giu_write(GIUINTENH, 0);
 
+       trigger = giu_read(GIUINTTYPH) << 16;
+       trigger |= giu_read(GIUINTTYPL);
        for (i = GIU_IRQ_BASE; i <= GIU_IRQ_LAST; i++) {
-               if (i < GIU_IRQ(GIUINT_HIGH_OFFSET))
-                       irq_desc[i].chip = &giuint_low_irq_type;
+               pin = GPIO_PIN_OF_IRQ(i);
+               if (pin < GIUINT_HIGH_OFFSET)
+                       chip = &giuint_low_irq_chip;
                else
-                       irq_desc[i].chip = &giuint_high_irq_type;
+                       chip = &giuint_high_irq_chip;
+
+               if (trigger & (1 << pin))
+                       set_irq_chip_and_handler(i, chip, handle_edge_irq);
+               else
+                       set_irq_chip_and_handler(i, chip, handle_level_irq);
+
        }
 
        return cascade_irq(GIUINT_IRQ, giu_get_irq);
index 1e1a7770a6b9a53f18be6f138f89ecfc474e33e4..b8cf50fcd64d358e2dadfbb5935bde979886506b 100644 (file)
@@ -880,6 +880,10 @@ static void hid_output_field(struct hid_field *field, __u8 *data)
        unsigned size = field->report_size;
        unsigned n;
 
+       /* make sure the unused bits in the last byte are zeros */
+       if (count > 0 && size > 0)
+               data[(count*size-1)/8] = 0;
+
        for (n = 0; n < count; n++) {
                if (field->logical_minimum < 0) /* signed values */
                        implement(data, offset + n * size, size, s32ton(field->value[n], size));
@@ -947,7 +951,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
        }
 
 #ifdef DEBUG_DATA
-       printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", len, report_enum->numbered ? "" : "un");
+       printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un");
 #endif
 
        n = 0;                          /* Normally report number is 0 */
index 28689e3eb552c2ec672ce64a42b0fec5c0fef724..9cf591a1bda37a13698f5fe52e17e159cd714bf8 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
-#include <linux/usb/input.h>
 
 #undef DEBUG
 
@@ -364,9 +363,22 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
                        break;
 
                case HID_UP_LED:
-                       if (((usage->hid - 1) & 0xffff) >= LED_MAX)
-                               goto ignore;
-                       map_led((usage->hid - 1) & 0xffff);
+
+                       switch (usage->hid & 0xffff) {                        /* HID-Value:                   */
+                               case 0x01:  map_led (LED_NUML);     break;    /*   "Num Lock"                 */
+                               case 0x02:  map_led (LED_CAPSL);    break;    /*   "Caps Lock"                */
+                               case 0x03:  map_led (LED_SCROLLL);  break;    /*   "Scroll Lock"              */
+                               case 0x04:  map_led (LED_COMPOSE);  break;    /*   "Compose"                  */
+                               case 0x05:  map_led (LED_KANA);     break;    /*   "Kana"                     */
+                               case 0x27:  map_led (LED_SLEEP);    break;    /*   "Stand-By"                 */
+                               case 0x4c:  map_led (LED_SUSPEND);  break;    /*   "System Suspend"           */
+                               case 0x09:  map_led (LED_MUTE);     break;    /*   "Mute"                     */
+                               case 0x4b:  map_led (LED_MISC);     break;    /*   "Generic Indicator"        */
+                               case 0x19:  map_led (LED_MAIL);     break;    /*   "Message Waiting"          */
+                               case 0x4d:  map_led (LED_CHARGING); break;    /*   "External Power Connected" */
+
+                               default: goto ignore;
+                       }
                        break;
 
                case HID_UP_DIGITIZER:
index 31c42002708f9ee050235778e7147be234acdf22..b80f6ed5acfc9897f6e370c1dc3083caaacb6134 100644 (file)
@@ -93,7 +93,7 @@ int vid_from_reg(int val, u8 vrm)
        case 110:               /* Intel Conroe */
                                /* compute in uV, round to mV */
                val &= 0xff;
-               if(((val & 0x7e) == 0xfe) || (!(val & 0x7e)))
+               if (val < 0x02 || val > 0xb2)
                        return 0;
                return((1600000 - (val - 2) * 6250 + 500) / 1000);
        case 24:                /* Opteron processor */
index c12ac5abc2bb4e16cf9876d4f147bb4b10792515..253ffaf1568a7baefdeb86468b3467ae23d5466c 100644 (file)
@@ -117,6 +117,7 @@ static const u16 W83793_REG_IN[][3] = {
 /* Low Bits of Vcore A/B Vtt Read/High/Low */
 static const u16 W83793_REG_IN_LOW_BITS[] = { 0x1b, 0x68, 0x69 };
 static u8 scale_in[] = { 2, 2, 2, 16, 16, 16, 8, 24, 24, 16 };
+static u8 scale_in_add[] = { 0, 0, 0, 0, 0, 0, 0, 150, 150, 0 };
 
 #define W83793_REG_FAN(index)          (0x23 + 2 * (index))    /* High byte */
 #define W83793_REG_FAN_MIN(index)      (0x90 + 2 * (index))    /* High byte */
@@ -203,6 +204,8 @@ struct w83793_data {
        u8 temp_fan_map[6];     /* Temp controls which pwm fan, bit field */
 
        u8 has_pwm;
+       u8 has_temp;
+       u8 has_vid;
        u8 pwm_enable;          /* Register value, each Temp has 1 bit */
        u8 pwm_uptime;          /* Register value */
        u8 pwm_downtime;        /* Register value */
@@ -500,7 +503,7 @@ store_temp(struct device *dev, struct device_attribute *attr,
        each has 4 mode:(2 bits)
        0:      Stop monitor
        1:      Use internal temp sensor(default)
-       2:      Use sensor in AMD CPU and get result by AMDSI
+       2:      Reserved
        3:      Use sensor in Intel CPU and get result by PECI
 
        TR1-TR2
@@ -509,8 +512,8 @@ store_temp(struct device *dev, struct device_attribute *attr,
        1:      To enable temp sensors monitor
 */
 
-/* 0 disable, 5 AMDSI, 6 PECI */
-static u8 TO_TEMP_MODE[] = { 0, 0, 5, 6 };
+/* 0 disable, 6 PECI */
+static u8 TO_TEMP_MODE[] = { 0, 0, 0, 6 };
 
 static ssize_t
 show_temp_mode(struct device *dev, struct device_attribute *attr, char *buf)
@@ -550,11 +553,10 @@ store_temp_mode(struct device *dev, struct device_attribute *attr,
        u8 val = simple_strtoul(buf, NULL, 10);
 
        /* transform the sysfs interface values into table above */
-       if ((val == 5 || val == 6) && (index < 4)) {
+       if ((val == 6) && (index < 4)) {
                val -= 3;
        } else if ((val == 3 && index < 4)
-               || (val == 4 && index >= 4)
-               || val == 0) {
+               || (val == 4 && index >= 4)) {
                /* transform diode or thermistor into internal enable */
                val = !!val;
        } else {
@@ -839,7 +841,9 @@ show_in(struct device *dev, struct device_attribute *attr, char *buf)
                val <<= 2;
                val += (data->in_low_bits[nr] >> (index * 2)) & 0x3;
        }
-       return sprintf(buf, "%d\n", val * scale_in[index]);
+       /* voltage inputs 5VDD and 5VSB needs 150mV offset */
+       val = val * scale_in[index] + scale_in_add[index];
+       return sprintf(buf, "%d\n", val);
 }
 
 static ssize_t
@@ -859,6 +863,10 @@ store_in(struct device *dev, struct device_attribute *attr,
             scale_in[index] / 2) / scale_in[index];
        mutex_lock(&data->update_lock);
        if (index > 2) {
+               /* fix the limit values of 5VDD and 5VSB to ALARM mechanism */
+               if (1 == nr || 2 == nr) {
+                       val -= scale_in_add[index] / scale_in[index];
+               }
                val = SENSORS_LIMIT(val, 0, 255);
        } else {
                val = SENSORS_LIMIT(val, 0, 0x3FF);
@@ -979,12 +987,6 @@ static struct sensor_device_attribute_2 w83793_sensor_attr_2[] = {
        SENSOR_ATTR_IN(7),
        SENSOR_ATTR_IN(8),
        SENSOR_ATTR_IN(9),
-       SENSOR_ATTR_TEMP(1),
-       SENSOR_ATTR_TEMP(2),
-       SENSOR_ATTR_TEMP(3),
-       SENSOR_ATTR_TEMP(4),
-       SENSOR_ATTR_TEMP(5),
-       SENSOR_ATTR_TEMP(6),
        SENSOR_ATTR_FAN(1),
        SENSOR_ATTR_FAN(2),
        SENSOR_ATTR_FAN(3),
@@ -995,6 +997,15 @@ static struct sensor_device_attribute_2 w83793_sensor_attr_2[] = {
        SENSOR_ATTR_PWM(3),
 };
 
+static struct sensor_device_attribute_2 w83793_temp[] = {
+       SENSOR_ATTR_TEMP(1),
+       SENSOR_ATTR_TEMP(2),
+       SENSOR_ATTR_TEMP(3),
+       SENSOR_ATTR_TEMP(4),
+       SENSOR_ATTR_TEMP(5),
+       SENSOR_ATTR_TEMP(6),
+};
+
 /* Fan6-Fan12 */
 static struct sensor_device_attribute_2 w83793_left_fan[] = {
        SENSOR_ATTR_FAN(6),
@@ -1015,9 +1026,12 @@ static struct sensor_device_attribute_2 w83793_left_pwm[] = {
        SENSOR_ATTR_PWM(8),
 };
 
-static struct sensor_device_attribute_2 sda_single_files[] = {
+static struct sensor_device_attribute_2 w83793_vid[] = {
        SENSOR_ATTR_2(cpu0_vid, S_IRUGO, show_vid, NULL, NOT_USED, 0),
        SENSOR_ATTR_2(cpu1_vid, S_IRUGO, show_vid, NULL, NOT_USED, 1),
+};
+
+static struct sensor_device_attribute_2 sda_single_files[] = {
        SENSOR_ATTR_2(vrm, S_IWUSR | S_IRUGO, show_vrm, store_vrm,
                      NOT_USED, NOT_USED),
        SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep,
@@ -1070,11 +1084,17 @@ static int w83793_detach_client(struct i2c_client *client)
                for (i = 0; i < ARRAY_SIZE(sda_single_files); i++)
                        device_remove_file(dev, &sda_single_files[i].dev_attr);
 
+               for (i = 0; i < ARRAY_SIZE(w83793_vid); i++)
+                       device_remove_file(dev, &w83793_vid[i].dev_attr);
+
                for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++)
                        device_remove_file(dev, &w83793_left_fan[i].dev_attr);
 
                for (i = 0; i < ARRAY_SIZE(w83793_left_pwm); i++)
                        device_remove_file(dev, &w83793_left_pwm[i].dev_attr);
+
+               for (i = 0; i < ARRAY_SIZE(w83793_temp); i++)
+                       device_remove_file(dev, &w83793_temp[i].dev_attr);
        }
 
        if ((err = i2c_detach_client(client)))
@@ -1187,6 +1207,7 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
        struct w83793_data *data;
        int files_fan = ARRAY_SIZE(w83793_left_fan) / 7;
        int files_pwm = ARRAY_SIZE(w83793_left_pwm) / 5;
+       int files_temp = ARRAY_SIZE(w83793_temp) / 6;
        int err = 0;
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
@@ -1313,6 +1334,44 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
                data->has_pwm |= 0x80;
        }
 
+       tmp = w83793_read_value(client, W83793_REG_FANIN_SEL);
+       if ((tmp & 0x01) && (val & 0x08)) {     /* fan 9, second location */
+               data->has_fan |= 0x100;
+       }
+       if ((tmp & 0x02) && (val & 0x10)) {     /* fan 10, second location */
+               data->has_fan |= 0x200;
+       }
+       if ((tmp & 0x04) && (val & 0x20)) {     /* fan 11, second location */
+               data->has_fan |= 0x400;
+       }
+       if ((tmp & 0x08) && (val & 0x40)) {     /* fan 12, second location */
+               data->has_fan |= 0x800;
+       }
+
+       /* check the temp1-6 mode, ignore former AMDSI selected inputs */
+       tmp = w83793_read_value(client,W83793_REG_TEMP_MODE[0]);
+       if (tmp & 0x01)
+               data->has_temp |= 0x01;
+       if (tmp & 0x04)
+               data->has_temp |= 0x02;
+       if (tmp & 0x10)
+               data->has_temp |= 0x04;
+       if (tmp & 0x40)
+               data->has_temp |= 0x08;
+
+       tmp = w83793_read_value(client,W83793_REG_TEMP_MODE[1]);
+       if (tmp & 0x01)
+               data->has_temp |= 0x10;
+       if (tmp & 0x02)
+               data->has_temp |= 0x20;
+
+       /* Detect the VID usage and ignore unused input */
+       tmp = w83793_read_value(client, W83793_REG_MFC);
+       if (!(tmp & 0x29))
+               data->has_vid |= 0x1;   /* has VIDA */
+       if (tmp & 0x80)
+               data->has_vid |= 0x2;   /* has VIDB */
+
        /* Register sysfs hooks */
        for (i = 0; i < ARRAY_SIZE(w83793_sensor_attr_2); i++) {
                err = device_create_file(dev,
@@ -1321,6 +1380,14 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
                        goto exit_remove;
        }
 
+       for (i = 0; i < ARRAY_SIZE(w83793_vid); i++) {
+               if (!(data->has_vid & (1 << i)))
+                       continue;
+               err = device_create_file(dev, &w83793_vid[i].dev_attr);
+               if (err)
+                       goto exit_remove;
+       }
+
        for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) {
                err = device_create_file(dev, &sda_single_files[i].dev_attr);
                if (err)
@@ -1328,6 +1395,19 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
 
        }
 
+       for (i = 0; i < 6; i++) {
+               int j;
+               if (!(data->has_temp & (1 << i)))
+                       continue;
+               for (j = 0; j < files_temp; j++) {
+                       err = device_create_file(dev,
+                                               &w83793_temp[(i) * files_temp
+                                                               + j].dev_attr);
+                       if (err)
+                               goto exit_remove;
+               }
+       }
+
        for (i = 5; i < 12; i++) {
                int j;
                if (!(data->has_fan & (1 << i)))
@@ -1371,12 +1451,18 @@ exit_remove:
        for (i = 0; i < ARRAY_SIZE(sda_single_files); i++)
                device_remove_file(dev, &sda_single_files[i].dev_attr);
 
+       for (i = 0; i < ARRAY_SIZE(w83793_vid); i++)
+               device_remove_file(dev, &w83793_vid[i].dev_attr);
+
        for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++)
                device_remove_file(dev, &w83793_left_fan[i].dev_attr);
 
        for (i = 0; i < ARRAY_SIZE(w83793_left_pwm); i++)
                device_remove_file(dev, &w83793_left_pwm[i].dev_attr);
 
+       for (i = 0; i < ARRAY_SIZE(w83793_temp); i++)
+               device_remove_file(dev, &w83793_temp[i].dev_attr);
+
        if (data->lm75[0] != NULL) {
                i2c_detach_client(data->lm75[0]);
                kfree(data->lm75[0]);
@@ -1428,6 +1514,8 @@ static void w83793_update_nonvolatile(struct device *dev)
        }
 
        for (i = 0; i < ARRAY_SIZE(data->temp_fan_map); i++) {
+               if (!(data->has_temp & (1 << i)))
+                       continue;
                data->temp_fan_map[i] =
                    w83793_read_value(client, W83793_REG_TEMP_FAN_MAP(i));
                for (j = 1; j < 5; j++) {
@@ -1510,9 +1598,12 @@ static struct w83793_data *w83793_update_device(struct device *dev)
                    w83793_read_value(client, W83793_REG_FAN(i) + 1);
        }
 
-       for (i = 0; i < ARRAY_SIZE(data->temp); i++)
+       for (i = 0; i < ARRAY_SIZE(data->temp); i++) {
+               if (!(data->has_temp & (1 << i)))
+                       continue;
                data->temp[i][TEMP_READ] =
                    w83793_read_value(client, W83793_REG_TEMP[i][TEMP_READ]);
+       }
 
        data->temp_low_bits =
            w83793_read_value(client, W83793_REG_TEMP_LOW_BITS);
@@ -1527,8 +1618,10 @@ static struct w83793_data *w83793_update_device(struct device *dev)
        for (i = 0; i < ARRAY_SIZE(data->alarms); i++)
                data->alarms[i] =
                    w83793_read_value(client, W83793_REG_ALARM(i));
-       data->vid[0] = w83793_read_value(client, W83793_REG_VID_INA);
-       data->vid[1] = w83793_read_value(client, W83793_REG_VID_INB);
+       if (data->has_vid & 0x01)
+               data->vid[0] = w83793_read_value(client, W83793_REG_VID_INA);
+       if (data->has_vid & 0x02)
+               data->vid[1] = w83793_read_value(client, W83793_REG_VID_INB);
        w83793_update_nonvolatile(dev);
        data->last_updated = jiffies;
        data->valid = 1;
index 93995b658d94a7dedbe816f2927589a63b51dde4..6074c897f51c81a1a8da9b478eb59091ec851c96 100644 (file)
@@ -344,8 +344,11 @@ int ehca_destroy_cq(struct ib_cq *cq)
        unsigned long flags;
 
        spin_lock_irqsave(&ehca_cq_idr_lock, flags);
-       while (my_cq->nr_callbacks)
+       while (my_cq->nr_callbacks) {
+               spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
                yield();
+               spin_lock_irqsave(&ehca_cq_idr_lock, flags);
+       }
 
        idr_remove(&ehca_cq_idr, my_cq->token);
        spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
index e7209afb4250c1bc7261513b897e606de53e4a12..c069be8cbcb291868b0419e8867e48d8b7acc6e2 100644 (file)
@@ -440,7 +440,8 @@ void ehca_tasklet_eq(unsigned long data)
                                        cq = idr_find(&ehca_cq_idr, token);
 
                                        if (cq == NULL) {
-                                               spin_unlock(&ehca_cq_idr_lock);
+                                               spin_unlock_irqrestore(&ehca_cq_idr_lock,
+                                                                      flags);
                                                break;
                                        }
 
index cdecbf5911c8f20e043b8153e31b584893320922..72611fd15103302631a074a26f2cd2c0312d9b6d 100644 (file)
@@ -1621,18 +1621,30 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target)
                switch (token) {
                case SRP_OPT_ID_EXT:
                        p = match_strdup(args);
+                       if (!p) {
+                               ret = -ENOMEM;
+                               goto out;
+                       }
                        target->id_ext = cpu_to_be64(simple_strtoull(p, NULL, 16));
                        kfree(p);
                        break;
 
                case SRP_OPT_IOC_GUID:
                        p = match_strdup(args);
+                       if (!p) {
+                               ret = -ENOMEM;
+                               goto out;
+                       }
                        target->ioc_guid = cpu_to_be64(simple_strtoull(p, NULL, 16));
                        kfree(p);
                        break;
 
                case SRP_OPT_DGID:
                        p = match_strdup(args);
+                       if (!p) {
+                               ret = -ENOMEM;
+                               goto out;
+                       }
                        if (strlen(p) != 32) {
                                printk(KERN_WARNING PFX "bad dest GID parameter '%s'\n", p);
                                kfree(p);
@@ -1656,6 +1668,10 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target)
 
                case SRP_OPT_SERVICE_ID:
                        p = match_strdup(args);
+                       if (!p) {
+                               ret = -ENOMEM;
+                               goto out;
+                       }
                        target->service_id = cpu_to_be64(simple_strtoull(p, NULL, 16));
                        kfree(p);
                        break;
@@ -1693,6 +1709,10 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target)
 
                case SRP_OPT_INITIATOR_EXT:
                        p = match_strdup(args);
+                       if (!p) {
+                               ret = -ENOMEM;
+                               goto out;
+                       }
                        target->initiator_ext = cpu_to_be64(simple_strtoull(p, NULL, 16));
                        kfree(p);
                        break;
index 67c1154960f0a308f72e41c7a5e2f54f2afc2894..be4651abe72c3bcb4d6a93fd2525b299d901e979 100644 (file)
@@ -272,7 +272,9 @@ static void kvm_free_physmem(struct kvm *kvm)
 
 static void kvm_free_vcpu(struct kvm_vcpu *vcpu)
 {
+       vcpu_load(vcpu->kvm, vcpu_slot(vcpu));
        kvm_mmu_destroy(vcpu);
+       vcpu_put(vcpu);
        kvm_arch_ops->vcpu_free(vcpu);
 }
 
index 2dbf4307ed9ed1e5ea7629bcd551c4b32f3eed08..6bc41950fbb352a96b86af4d0196822248c9b218 100644 (file)
@@ -274,7 +274,7 @@ static int FNAME(fix_write_pf)(struct kvm_vcpu *vcpu,
        struct kvm_mmu_page *page;
 
        if (is_writeble_pte(*shadow_ent))
-               return 0;
+               return !user || (*shadow_ent & PT_USER_MASK);
 
        writable_shadow = *shadow_ent & PT_SHADOW_WRITABLE_MASK;
        if (user) {
index 714f6a7841cdfbec2bf408153682d00b4b814a12..7397bfbbcb1cec356bd91826f4455d2728b2b75d 100644 (file)
@@ -1407,7 +1407,8 @@ static int svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
        int r;
 
 again:
-       do_interrupt_requests(vcpu, kvm_run);
+       if (!vcpu->mmio_read_completed)
+               do_interrupt_requests(vcpu, kvm_run);
 
        clgi();
 
index ce219e3f557fecfbe64aadf71bc6cad1ca17cb1f..27f2751c3baa66e404631f37c5ddb7ed15ebc23f 100644 (file)
@@ -1717,7 +1717,8 @@ again:
        vmcs_writel(HOST_GS_BASE, segment_base(gs_sel));
 #endif
 
-       do_interrupt_requests(vcpu, kvm_run);
+       if (!vcpu->mmio_read_completed)
+               do_interrupt_requests(vcpu, kvm_run);
 
        if (vcpu->guest_debug.enabled)
                kvm_guest_debug_pre(vcpu);
@@ -1824,7 +1825,7 @@ again:
 #endif
                "setbe %0 \n\t"
                "popf \n\t"
-             : "=g" (fail)
+             : "=q" (fail)
              : "r"(vcpu->launched), "d"((unsigned long)HOST_RSP),
                "c"(vcpu),
                [rax]"i"(offsetof(struct kvm_vcpu, regs[VCPU_REGS_RAX])),
index be70795b4822073500ff823d7697a3f26818f95d..7513cddb929f91e6d033c5cc33a7e37c476badd4 100644 (file)
@@ -61,6 +61,7 @@
 #define ModRM       (1<<6)
 /* Destination is only written; never read. */
 #define Mov         (1<<7)
+#define BitOp       (1<<8)
 
 static u8 opcode_table[256] = {
        /* 0x00 - 0x07 */
@@ -148,7 +149,7 @@ static u8 opcode_table[256] = {
        0, 0, ByteOp | DstMem | SrcNone | ModRM, DstMem | SrcNone | ModRM
 };
 
-static u8 twobyte_table[256] = {
+static u16 twobyte_table[256] = {
        /* 0x00 - 0x0F */
        0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0,
        0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0,
@@ -180,16 +181,16 @@ static u8 twobyte_table[256] = {
        /* 0x90 - 0x9F */
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        /* 0xA0 - 0xA7 */
-       0, 0, 0, DstMem | SrcReg | ModRM, 0, 0, 0, 0,
+       0, 0, 0, DstMem | SrcReg | ModRM | BitOp, 0, 0, 0, 0,
        /* 0xA8 - 0xAF */
-       0, 0, 0, DstMem | SrcReg | ModRM, 0, 0, 0, 0,
+       0, 0, 0, DstMem | SrcReg | ModRM | BitOp, 0, 0, 0, 0,
        /* 0xB0 - 0xB7 */
        ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, 0,
-           DstMem | SrcReg | ModRM,
+           DstMem | SrcReg | ModRM | BitOp,
        0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
            DstReg | SrcMem16 | ModRM | Mov,
        /* 0xB8 - 0xBF */
-       0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM,
+       0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM | BitOp,
        0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
            DstReg | SrcMem16 | ModRM | Mov,
        /* 0xC0 - 0xCF */
@@ -469,7 +470,8 @@ static int read_descriptor(struct x86_emulate_ctxt *ctxt,
 int
 x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
 {
-       u8 b, d, sib, twobyte = 0, rex_prefix = 0;
+       unsigned d;
+       u8 b, sib, twobyte = 0, rex_prefix = 0;
        u8 modrm, modrm_mod = 0, modrm_reg = 0, modrm_rm = 0;
        unsigned long *override_base = NULL;
        unsigned int op_bytes, ad_bytes, lock_prefix = 0, rep_prefix = 0, i;
@@ -726,46 +728,6 @@ done_prefixes:
                ;
        }
 
-       /* Decode and fetch the destination operand: register or memory. */
-       switch (d & DstMask) {
-       case ImplicitOps:
-               /* Special instructions do their own operand decoding. */
-               goto special_insn;
-       case DstReg:
-               dst.type = OP_REG;
-               if ((d & ByteOp)
-                   && !(twobyte_table && (b == 0xb6 || b == 0xb7))) {
-                       dst.ptr = decode_register(modrm_reg, _regs,
-                                                 (rex_prefix == 0));
-                       dst.val = *(u8 *) dst.ptr;
-                       dst.bytes = 1;
-               } else {
-                       dst.ptr = decode_register(modrm_reg, _regs, 0);
-                       switch ((dst.bytes = op_bytes)) {
-                       case 2:
-                               dst.val = *(u16 *)dst.ptr;
-                               break;
-                       case 4:
-                               dst.val = *(u32 *)dst.ptr;
-                               break;
-                       case 8:
-                               dst.val = *(u64 *)dst.ptr;
-                               break;
-                       }
-               }
-               break;
-       case DstMem:
-               dst.type = OP_MEM;
-               dst.ptr = (unsigned long *)cr2;
-               dst.bytes = (d & ByteOp) ? 1 : op_bytes;
-               if (!(d & Mov) && /* optimisation - avoid slow emulated read */
-                   ((rc = ops->read_emulated((unsigned long)dst.ptr,
-                                             &dst.val, dst.bytes, ctxt)) != 0))
-                       goto done;
-               break;
-       }
-       dst.orig_val = dst.val;
-
        /*
         * Decode and fetch the source operand: register, memory
         * or immediate.
@@ -838,6 +800,50 @@ done_prefixes:
                break;
        }
 
+       /* Decode and fetch the destination operand: register or memory. */
+       switch (d & DstMask) {
+       case ImplicitOps:
+               /* Special instructions do their own operand decoding. */
+               goto special_insn;
+       case DstReg:
+               dst.type = OP_REG;
+               if ((d & ByteOp)
+                   && !(twobyte_table && (b == 0xb6 || b == 0xb7))) {
+                       dst.ptr = decode_register(modrm_reg, _regs,
+                                                 (rex_prefix == 0));
+                       dst.val = *(u8 *) dst.ptr;
+                       dst.bytes = 1;
+               } else {
+                       dst.ptr = decode_register(modrm_reg, _regs, 0);
+                       switch ((dst.bytes = op_bytes)) {
+                       case 2:
+                               dst.val = *(u16 *)dst.ptr;
+                               break;
+                       case 4:
+                               dst.val = *(u32 *)dst.ptr;
+                               break;
+                       case 8:
+                               dst.val = *(u64 *)dst.ptr;
+                               break;
+                       }
+               }
+               break;
+       case DstMem:
+               dst.type = OP_MEM;
+               dst.ptr = (unsigned long *)cr2;
+               dst.bytes = (d & ByteOp) ? 1 : op_bytes;
+               if (d & BitOp) {
+                       dst.ptr += src.val / BITS_PER_LONG;
+                       dst.bytes = sizeof(long);
+               }
+               if (!(d & Mov) && /* optimisation - avoid slow emulated read */
+                   ((rc = ops->read_emulated((unsigned long)dst.ptr,
+                                             &dst.val, dst.bytes, ctxt)) != 0))
+                       goto done;
+               break;
+       }
+       dst.orig_val = dst.val;
+
        if (twobyte)
                goto twobyte_insn;
 
index 3482e0114d43ec4cba7bbedf643824a26c9bcd20..2bd84d351a18eb3bf7e9f2301583ed04a004ed16 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/errno.h>
+#include <linux/freezer.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
@@ -961,6 +962,7 @@ int cx88_audio_thread(void *data)
                msleep_interruptible(1000);
                if (kthread_should_stop())
                        break;
+               try_to_freeze();
 
                /* just monitor the audio status for now ... */
                memset(&t, 0, sizeof(t));
index c1a377f797d9b21679bf6c23d4fe23bb51c2ac6e..b6cd21e6dab93140a44551e31029682476bdb673 100644 (file)
@@ -712,13 +712,13 @@ static int ks0127_command(struct i2c_client *client,
                *iarg = 0;
                status = ks0127_read(ks, KS_STAT);
                if (!(status & 0x20))            /* NOVID not set */
-                       *iarg = (*iarg & DECODER_STATUS_GOOD);
+                       *iarg = (*iarg | DECODER_STATUS_GOOD);
                if ((status & 0x01))                  /* CLOCK set */
-                       *iarg = (*iarg & DECODER_STATUS_COLOR);
+                       *iarg = (*iarg | DECODER_STATUS_COLOR);
                if ((status & 0x08))               /* PALDET set */
-                       *iarg = (*iarg & DECODER_STATUS_PAL);
+                       *iarg = (*iarg | DECODER_STATUS_PAL);
                else
-                       *iarg = (*iarg & DECODER_STATUS_NTSC);
+                       *iarg = (*iarg | DECODER_STATUS_NTSC);
                break;
 
        //Catch any unknown command
index 4dead84aff4629d56f29c40cc29311730a807e02..ae984bbe36b6104bd209085d89dad26c62f1c02e 100644 (file)
@@ -2570,6 +2570,7 @@ struct saa7134_board saa7134_boards[] = {
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
+               .gpiomask       = 1 << 21,
                .inputs = {{
                        .name   = name_tv,
                        .vmux   = 1,
@@ -2578,15 +2579,20 @@ struct saa7134_board saa7134_boards[] = {
                },{
                        .name   = name_comp1,
                        .vmux   = 3,
-                       .amux   = LINE1,
+                       .amux   = LINE2,        /* unconfirmed, taken from Philips driver */
+               },{
+                       .name   = name_comp2,
+                       .vmux   = 0,            /* untested, Composite over S-Video */
+                       .amux   = LINE2,
                },{
                        .name   = name_svideo,
-                       .vmux   = 0,
-                       .amux   = LINE1,
+                       .vmux   = 8,
+                       .amux   = LINE2,
                }},
                .radio = {
                        .name   = name_radio,
-                       .amux   = LINE1,
+                       .amux   = TV,
+                       .gpio   = 0x0200000,
                },
        },
        [SAA7134_BOARD_CINERGY250PCI] = {
index 2624e3f7dd29e2763fdd82406d7ea4a4cdedd5d8..4e7c1fa668d309a2c245175acb9fc1dea4ac6c95 100644 (file)
@@ -184,7 +184,7 @@ hauppauge_tuner[] =
        { TUNER_ABSENT,        "Thompson DTT757"},
        /* 80-89 */
        { TUNER_ABSENT,        "Philips FQ1216LME MK3"},
-       { TUNER_ABSENT,        "LG TAPC G701D"},
+       { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"},
        { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"},
        { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"},
        { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"},
index baab9c081b52c29ea53016773f6b8c4cae0e76e5..17ace394d98175830d885a5cadfbda5d9aa7eb35 100644 (file)
@@ -35,27 +35,13 @@ struct rgb {
 };
 
 struct bayL0 {
-#ifdef __BIG_ENDIAN
-       u8 r;
-       u8 g;
-#elif __LITTLE_ENDIAN
        u8 g;
        u8 r;
-#else
-#error not byte order defined
-#endif
 };
 
 struct bayL1 {
-#ifdef __BIG_ENDIAN
-       u8 g;
-       u8 b;
-#elif __LITTLE_ENDIAN
        u8 b;
        u8 g;
-#else
-#error not byte order defined
-#endif
 };
 
 struct cam_size {
index 8c7eba2a728e16fb3f041780f43a3c9370b8843c..7243337b771a5031b54ec861d1cd6fc1e7e25d25 100644 (file)
@@ -1080,7 +1080,6 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf,
        int noblock = file->f_flags & O_NONBLOCK;
        unsigned long lock_flags;
 
-       int frmx = -1;
        int ret,i;
        struct usbvision_frame *frame;
 
@@ -1155,7 +1154,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf,
                frame->bytes_read = 0;
 
                /* Mark it as available to be used again. */
-               usbvision->frame[frmx].grabstate = FrameState_Unused;
+               frame->grabstate = FrameState_Unused;
 /*     } */
 
        return count;
index 752c82c37f558277d14e36f4a150e98e2c9f9e81..b87d571e046337122bcfd0759a885ac006089482 100644 (file)
@@ -90,8 +90,15 @@ MODULE_LICENSE("GPL");
 char *v4l2_norm_to_name(v4l2_std_id id)
 {
        char *name;
+       u32 myid = id;
 
-       switch (id) {
+       /* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle
+          64 bit comparations. So, on that architecture, with some gcc variants,
+          compilation fails. Currently, the max value is 30bit wide.
+        */
+       BUG_ON(myid != id);
+
+       switch (myid) {
        case V4L2_STD_PAL:
                name="PAL";             break;
        case V4L2_STD_PAL_BG:
index f429f49901b9a0394980f1aea61f2715eb9ddc63..6504a5866849ab73d6058304d9b7dd91b9c85db7 100644 (file)
@@ -700,6 +700,7 @@ videobuf_qbuf(struct videobuf_queue *q,
                goto done;
        }
        if (buf->state == STATE_QUEUED ||
+           buf->state == STATE_PREPARED ||
            buf->state == STATE_ACTIVE) {
                dprintk(1,"qbuf: buffer is already queued or active.\n");
                goto done;
@@ -1229,7 +1230,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
                vaddr,vma->vm_start,vma->vm_end);
        if (vaddr > vma->vm_end)
                return NOPAGE_SIGBUS;
-       page = alloc_page(GFP_USER);
+       page = alloc_page(GFP_USER | __GFP_DMA32);
        if (!page)
                return NOPAGE_OOM;
        clear_user_page(page_address(page), vaddr, page);
index bacb311b4f24b6d6f645ac716d3ffc1be37902a3..d4cf5566673149b0708aff82bf42599fa55cc6cb 100644 (file)
@@ -270,10 +270,15 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
        char *p,*s,*basep;
        struct page *pg;
        u8   chr,r,g,b,color;
+       unsigned long flags;
+       spinlock_t spinlock;
+
+       spin_lock_init(&spinlock);
 
        /* Get first addr pointed to pixel position */
        oldpg=get_addr_pos(pos,pages,to_addr);
        pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
+       spin_lock_irqsave(&spinlock,flags);
        basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;
 
        /* We will just duplicate the second pixel at the packet */
@@ -376,6 +381,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
 
 end:
        kunmap_atomic(basep, KM_BOUNCE_READ);
+       spin_unlock_irqrestore(&spinlock,flags);
+
 }
 static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
 {
index 6e068cf1049beed6ef94ff42d79e88c5a8809831..b3f28a03b6a99f247648c9f12dc19f348d26213f 100644 (file)
@@ -5,7 +5,7 @@
  *      For use with LSI Logic PCI chip/adapter(s)
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
@@ -73,6 +73,7 @@
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 /*
  *  cmd line parameters
index a4afad4ecab23ef09ac190a5e33fdb6554cdce54..e316708f76bd90e8777df1cda033ecb060834353 100644 (file)
@@ -5,7 +5,7 @@
  *          LSIFC9xx/LSI409xx Fibre Channel
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
 #endif
 
 #ifndef COPYRIGHT
-#define COPYRIGHT      "Copyright (c) 1999-2005 " MODULEAUTHOR
+#define COPYRIGHT      "Copyright (c) 1999-2007 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON       "3.04.02"
-#define MPT_LINUX_PACKAGE_NAME         "@(#)mptlinux-3.04.02"
+#define MPT_LINUX_VERSION_COMMON       "3.04.03"
+#define MPT_LINUX_PACKAGE_NAME         "@(#)mptlinux-3.04.03"
 #define WHAT_MAGIC_STRING              "@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
@@ -1059,7 +1059,7 @@ extern int                  mpt_stm_index;        /* needed by mptstm.c */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 #endif         /* } __KERNEL__ */
 
-#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__)
+#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) || defined(__powerpc__)
 #define CAST_U32_TO_PTR(x)     ((void *)(u64)x)
 #define CAST_PTR_TO_U32(x)     ((u32)(u64)x)
 #else
index 30975ccd9947622de211661134bc74e94ceea254..504632da43470fdbbca038e9d7dc46e3f91fdde2 100644 (file)
@@ -4,7 +4,7 @@
  *      For use with LSI Logic PCI chip/adapters
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
@@ -66,7 +66,7 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_tcq.h>
 
-#define COPYRIGHT      "Copyright (c) 1999-2005 LSI Logic Corporation"
+#define COPYRIGHT      "Copyright (c) 1999-2007 LSI Logic Corporation"
 #define MODULEAUTHOR   "LSI Logic Corporation"
 #include "mptbase.h"
 #include "mptctl.h"
@@ -79,6 +79,7 @@
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
index 043941882c6e8b05c39f5b8341944abad9f3b10d..e65a1cf5eb0b776f26b265641c729aaa80948563 100644 (file)
@@ -5,7 +5,7 @@
  *          LSIFC9xx/LSI409xx Fibre Channel
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
index ca2f9107f1459ff465b6ea7244d7ce24d5038117..c819c23b55b1aeb3ca477fd6c689c9cbc0134ff3 100644 (file)
@@ -3,7 +3,7 @@
  *      For use with LSI Logic PCI chip/adapter(s)
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
@@ -75,6 +75,7 @@
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 /* Command line args */
 #define MPTFC_DEV_LOSS_TMO (60)
index b7c4407c5e3f2d5f3d5c6b6b4ae89bb61fc28154..2936204d8ad629f367cbdc00af8156ffd14bf5a5 100644 (file)
@@ -4,7 +4,7 @@
  *      For use with LSI Logic Fibre Channel PCI chip/adapters
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 2000-2005 LSI Logic Corporation
+ *  Copyright (c) 2000-2007 LSI Logic Corporation
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 #include <linux/module.h>
 #include <linux/fs.h>
 
+#define my_VERSION     MPT_LINUX_VERSION_COMMON
 #define MYNAM          "mptlan"
 
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
index 3726ecba570707357c8728ce7799224b2d1e2915..70ab75e7c263174a3a45020d7c503d21d3c1aa89 100644 (file)
@@ -4,7 +4,7 @@
  *      For use with LSI Logic Fibre Channel PCI chip/adapters
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 2000-2005 LSI Logic Corporation
+ *  Copyright (c) 2000-2007 LSI Logic Corporation
  *
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
index 4f0c530e47b05fc3c77cc25b2a42cf561fb37923..09e9a9d96410942dcfe21bb2d0484ee8f0956693 100644 (file)
@@ -3,9 +3,9 @@
  *      For use with LSI Logic PCI chip/adapter(s)
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
- *  Copyright (c) 2005-2006 Dell
+ *  Copyright (c) 2005-2007 Dell
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
@@ -75,6 +75,7 @@
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 static int mpt_pt_clear;
 module_param(mpt_pt_clear, int, 0);
@@ -245,7 +246,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0)
        printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle));
        printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle));
        printk("Slot=0x%X\n", le16_to_cpu(pg0->Slot));
-       printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address));
+       printk("SAS Address=0x%llX\n", (unsigned long long)
+           le64_to_cpu(sas_address));
        printk("Target ID=0x%X\n", pg0->TargetID);
        printk("Bus=0x%X\n", pg0->Bus);
        /* The PhyNum field specifies the PHY number of the parent
@@ -349,9 +351,9 @@ mptsas_port_delete(struct mptsas_portinfo_details * port_details)
        phy_info = port_info->phy_info;
 
        dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d "
-               "bitmask=0x%016llX\n",
-               __FUNCTION__, port_details, port_details->num_phys,
-                   port_details->phy_bitmask));
+           "bitmask=0x%016llX\n", __FUNCTION__, port_details,
+           port_details->num_phys, (unsigned long long)
+           port_details->phy_bitmask));
 
        for (i = 0; i < port_info->num_phys; i++, phy_info++) {
                if(phy_info->port_details != port_details)
@@ -476,7 +478,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
        for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) {
                sas_address = phy_info->attached.sas_address;
                dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n",
-                       i, sas_address));
+                   i, (unsigned long long)sas_address));
                if (!sas_address)
                        continue;
                port_details = phy_info->port_details;
@@ -495,8 +497,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
                                    (1 << phy_info->phy_id);
                        phy_info->sas_port_add_phy=1;
                        dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t"
-                               "phy_id=%d sas_address=0x%018llX\n",
-                               i, sas_address));
+                           "phy_id=%d sas_address=0x%018llX\n",
+                           i, (unsigned long long)sas_address));
                        phy_info->port_details = port_details;
                }
 
@@ -512,8 +514,9 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
                        if (phy_info_cmp->port_details == port_details )
                                continue;
                        dsaswideprintk((KERN_DEBUG
-                               "\t\tphy_id=%d sas_address=0x%018llX\n",
-                               j, phy_info_cmp->attached.sas_address));
+                           "\t\tphy_id=%d sas_address=0x%018llX\n",
+                           j, (unsigned long long)
+                           phy_info_cmp->attached.sas_address));
                        if (phy_info_cmp->port_details) {
                                port_details->rphy =
                                    mptsas_get_rphy(phy_info_cmp);
@@ -546,11 +549,10 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
                if (!port_details)
                        continue;
                dsaswideprintk((KERN_DEBUG
-                       "%s: [%p]: phy_id=%02d num_phys=%02d "
-                       "bitmask=0x%016llX\n",
-                       __FUNCTION__,
-                       port_details, i, port_details->num_phys,
-                       port_details->phy_bitmask));
+                   "%s: [%p]: phy_id=%02d num_phys=%02d "
+                   "bitmask=0x%016llX\n", __FUNCTION__,
+                   port_details, i, port_details->num_phys,
+                   (unsigned long long)port_details->phy_bitmask));
                dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n",
                        port_details->port, port_details->rphy));
        }
@@ -2079,8 +2081,10 @@ mptsas_persist_clear_table(struct work_struct *work)
 static void
 mptsas_reprobe_lun(struct scsi_device *sdev, void *data)
 {
+       int rc;
+
        sdev->no_uld_attach = data ? 1 : 0;
-       scsi_device_reprobe(sdev);
+       rc = scsi_device_reprobe(sdev);
 }
 
 static void
index 2c72c36b8171cd67f26114c9c2f97b4d70b0b2d6..f0cca3ea93b20b8d4f72279480ac56e81e681b13 100644 (file)
@@ -3,7 +3,7 @@
  *      For use with LSI Logic PCI chip/adapter(s)
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
@@ -76,6 +76,7 @@
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 
@@ -701,6 +702,17 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
                                                break;
                                        }
                                }
+                       } else if (ioc->bus_type == FC) {
+                               /*
+                                * The FC IOC may kill a request for variety of
+                                * reasons, some of which may be recovered by a
+                                * retry, some which are unlikely to be
+                                * recovered. Return DID_ERROR instead of
+                                * DID_RESET to permit retry of the command,
+                                * just not an infinite number of them
+                                */
+                               sc->result = DID_ERROR << 16;
+                               break;
                        }
 
                        /*
@@ -2688,7 +2700,8 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, VirtTarget *vtarget,
                    struct scsi_device *sdev)
 {
        dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n",
-               hd->ioc->name, vtarget->bus_id, vtarget->target_id, lun, hd));
+               hd->ioc->name, vtarget->bus_id, vtarget->target_id,
+               sdev->lun, hd));
 
        /* Is LUN supported? If so, upper 2 bits will be 0
        * in first byte of inquiry data.
@@ -2770,7 +2783,7 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target,
                                else {
                                        factor = MPT_ULTRA320;
                                        if (scsi_device_qas(sdev)) {
-                                               ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id));
+                                               ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id));
                                                noQas = 0;
                                        }
                                        if (sdev->type == TYPE_TAPE &&
index 14a5b6c2e2bdeb4ea60f8e992ec516641d167a29..187c8af0890b3e6590b61aa9783d0b3238fd2ad9 100644 (file)
@@ -5,7 +5,7 @@
  *          LSIFC9xx/LSI409xx Fibre Channel
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
index 36641da59289eea7a4468892d1a85a48503737b5..203c661d2c79c782324b849fa57589289da95e09 100644 (file)
@@ -3,7 +3,7 @@
  *      For use with LSI Logic PCI chip/adapter(s)
  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
  *
- *  Copyright (c) 1999-2005 LSI Logic Corporation
+ *  Copyright (c) 1999-2007 LSI Logic Corporation
  *  (mailto:mpt_linux_developer@lsil.com)
  *
  */
@@ -77,6 +77,7 @@
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
 MODULE_LICENSE("GPL");
+MODULE_VERSION(my_VERSION);
 
 /* Command line args */
 static int mpt_saf_te = MPTSCSIH_SAF_TE;
index 06e7fcd192217317bef3d0159c5823144ca6619a..bfb9ff693208fa51c81667622a699cd5748916c0 100644 (file)
@@ -351,9 +351,6 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd,
        case MMC_RSP_R3: /* short */
                cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R3;
                break;
-       case MMC_RSP_R6: /* short CRC */
-               cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R6;
-               break;
        default:
                break;
        }
index 594d28bcdab31eccada3f98a177c3db5bb1c840b..d30540b2761420cff6bf445f761b8d0b27b34b40 100644 (file)
@@ -2,7 +2,7 @@
  *  linux/drivers/media/mmc/omap.c
  *
  *  Copyright (C) 2004 Nokia Corporation
- *  Written by Tuukka Tikkanen and Juha Yrjölä <juha.yrjola@nokia.com>
+ *  Written by Tuukka Tikkanen and Juha Yrjölä<juha.yrjola@nokia.com>
  *  Misc hacks here and there by Tony Lindgren <tony@atomide.com>
  *  Other hacks (DMA, SD, etc) by David Brownell
  *
@@ -37,7 +37,6 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
 #include <asm/arch/tps65010.h>
-#include <asm/arch/board-sx1.h>
 
 #define        OMAP_MMC_REG_CMD        0x00
 #define        OMAP_MMC_REG_ARGL       0x04
@@ -209,7 +208,7 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
                break;
        case MMC_RSP_R1:
        case MMC_RSP_R1B:
-               /* resp 1, resp 1b */
+               /* resp 1, 1b, 6, 7 */
                resptype = 1;
                break;
        case MMC_RSP_R2:
@@ -218,9 +217,6 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
        case MMC_RSP_R3:
                resptype = 3;
                break;
-       case MMC_RSP_R6:
-               resptype = 6;
-               break;
        default:
                dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd));
                break;
@@ -911,9 +907,7 @@ static void innovator_fpga_socket_power(int on)
  */
 static void mmc_omap_power(struct mmc_omap_host *host, int on)
 {
-       if (machine_is_sx1())
-               sx1_setmmcpower(on);
-       else if (on) {
+       if (on) {
                if (machine_is_omap_innovator())
                        innovator_fpga_socket_power(1);
                else if (machine_is_omap_h2())
@@ -927,7 +921,6 @@ static void mmc_omap_power(struct mmc_omap_host *host, int on)
                } else
                        if (host->power_pin >= 0)
                                omap_set_gpio_dataout(host->power_pin, 1);
-               msleep(1);
        } else {
                if (machine_is_omap_innovator())
                        innovator_fpga_socket_power(0);
@@ -947,31 +940,30 @@ static void mmc_omap_power(struct mmc_omap_host *host, int on)
 static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
        struct mmc_omap_host *host = mmc_priv(mmc);
-       int fclk_rate;
        int dsor;
-       int freq, i;
+       int realclock, i;
 
-       freq = ios->clock;
+       realclock = ios->clock;
 
-       /* At least on OMAP2420, the divisor must be != 0 for the
-        * initialization sequence to complete successfully. */
-       if (freq == 0)
-               freq = 4000000;
+       if (ios->clock == 0)
+               dsor = 0;
+       else {
+               int func_clk_rate = clk_get_rate(host->fclk);
 
-       fclk_rate = clk_get_rate(host->fclk);
-       dsor = fclk_rate / freq;
-       if (dsor < 1)
-               dsor = 1;
+               dsor = func_clk_rate / realclock;
+               if (dsor < 1)
+                       dsor = 1;
 
-       if (fclk_rate / dsor > freq)
-               dsor++;
+               if (func_clk_rate / dsor > realclock)
+                       dsor++;
 
-       if (dsor > 250)
-               dsor = 250;
-       dsor++;
+               if (dsor > 250)
+                       dsor = 250;
+               dsor++;
 
-       if (ios->bus_width == MMC_BUS_WIDTH_4)
-               dsor |= 1 << 15;
+               if (ios->bus_width == MMC_BUS_WIDTH_4)
+                       dsor |= 1 << 15;
+       }
 
        switch (ios->power_mode) {
        case MMC_POWER_OFF:
@@ -1039,7 +1031,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
                return -ENXIO;
 
        res = request_mem_region(res->start, res->end - res->start + 1,
-                                pdev->name);
+                                pdev->name);
        if (res == NULL)
                return -EBUSY;
 
@@ -1054,7 +1046,6 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
 
        spin_lock_init(&host->dma_lock);
        init_timer(&host->dma_timer);
-
        host->dma_timer.function = mmc_omap_dma_timer;
        host->dma_timer.data = (unsigned long) host;
 
index 45a9283ce4988784cc231c069350488f3b693d21..6073d998b11f3ee1164d3209be639a21ba640be3 100644 (file)
@@ -171,7 +171,7 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd,
 
 #define RSP_TYPE(x)    ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))
        switch (RSP_TYPE(mmc_resp_type(cmd))) {
-       case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6 */
+       case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6, r7 */
                cmdat |= CMDAT_RESP_SHORT;
                break;
        case RSP_TYPE(MMC_RSP_R3):
index f18ad998b3cb05bf85925b83802c608dbfc899a1..fa4a52886b97c9a358eab60cca56c05b5cd219fa 100644 (file)
@@ -173,9 +173,6 @@ static unsigned int tifm_sd_op_flags(struct mmc_command *cmd)
        case MMC_RSP_R3:
                rc |= TIFM_MMCSD_RSP_R3;
                break;
-       case MMC_RSP_R6:
-               rc |= TIFM_MMCSD_RSP_R6;
-               break;
        default:
                BUG();
        }
index a304b34c2632f32c1713a9d337c02a4e27453bdd..26f75c29944017e53bb42ca7316d64550a993e65 100644 (file)
@@ -164,9 +164,15 @@ config MTD_CHAR
          memory chips, and also use ioctl() to obtain information about
          the device, or to erase parts of it.
 
+config MTD_BLKDEVS
+       tristate "Common interface to block layer for MTD 'translation layers'"
+       depends on MTD && BLOCK
+       default n
+
 config MTD_BLOCK
        tristate "Caching block device access to MTD devices"
        depends on MTD && BLOCK
+       select MTD_BLKDEVS
        ---help---
          Although most flash chips have an erase size too large to be useful
          as block devices, it is possible to use MTD devices which are based
@@ -189,6 +195,7 @@ config MTD_BLOCK
 config MTD_BLOCK_RO
        tristate "Readonly block device access to MTD devices"
        depends on MTD_BLOCK!=y && MTD && BLOCK
+       select MTD_BLKDEVS
        help
          This allows you to mount read-only file systems (such as cramfs)
          from an MTD device, without the overhead (and danger) of the caching
@@ -200,6 +207,7 @@ config MTD_BLOCK_RO
 config FTL
        tristate "FTL (Flash Translation Layer) support"
        depends on MTD && BLOCK
+       select MTD_BLKDEVS
        ---help---
          This provides support for the original Flash Translation Layer which
          is part of the PCMCIA specification. It uses a kind of pseudo-
@@ -216,6 +224,7 @@ config FTL
 config NFTL
        tristate "NFTL (NAND Flash Translation Layer) support"
        depends on MTD && BLOCK
+       select MTD_BLKDEVS
        ---help---
          This provides support for the NAND Flash Translation Layer which is
          used on M-Systems' DiskOnChip devices. It uses a kind of pseudo-
@@ -239,6 +248,7 @@ config NFTL_RW
 config INFTL
        tristate "INFTL (Inverse NAND Flash Translation Layer) support"
        depends on MTD && BLOCK
+       select MTD_BLKDEVS
        ---help---
          This provides support for the Inverse NAND Flash Translation
          Layer which is used on M-Systems' newer DiskOnChip devices. It
@@ -256,6 +266,7 @@ config INFTL
 config RFD_FTL
         tristate "Resident Flash Disk (Flash Translation Layer) support"
        depends on MTD && BLOCK
+       select MTD_BLKDEVS
        ---help---
          This provides support for the flash translation layer known
          as the Resident Flash Disk (RFD), as used by the Embedded BIOS
@@ -265,8 +276,8 @@ config RFD_FTL
 
 config SSFDC
        tristate "NAND SSFDC (SmartMedia) read only translation layer"
-       depends on MTD
-       default n
+       depends on MTD && BLOCK
+       select MTD_BLKDEVS
        help
          This enables read only access to SmartMedia formatted NAND
          flash. You can mount it with FAT file system.
index 1e36b9aed98b1304f7854f6c533ed3704520da82..c130e6261adfe6a02c1eab2409963f61900d5e03 100644 (file)
@@ -15,13 +15,14 @@ obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
 
 # 'Users' - code which presents functionality to userspace.
 obj-$(CONFIG_MTD_CHAR)         += mtdchar.o
-obj-$(CONFIG_MTD_BLOCK)                += mtdblock.o mtd_blkdevs.o
-obj-$(CONFIG_MTD_BLOCK_RO)     += mtdblock_ro.o mtd_blkdevs.o
-obj-$(CONFIG_FTL)              += ftl.o mtd_blkdevs.o
-obj-$(CONFIG_NFTL)             += nftl.o mtd_blkdevs.o
-obj-$(CONFIG_INFTL)            += inftl.o mtd_blkdevs.o
-obj-$(CONFIG_RFD_FTL)          += rfd_ftl.o mtd_blkdevs.o
-obj-$(CONFIG_SSFDC)            += ssfdc.o mtd_blkdevs.o
+obj-$(CONFIG_MTD_BLKDEVS)      += mtd_blkdevs.o
+obj-$(CONFIG_MTD_BLOCK)                += mtdblock.o
+obj-$(CONFIG_MTD_BLOCK_RO)     += mtdblock_ro.o
+obj-$(CONFIG_FTL)              += ftl.o
+obj-$(CONFIG_NFTL)             += nftl.o
+obj-$(CONFIG_INFTL)            += inftl.o
+obj-$(CONFIG_RFD_FTL)          += rfd_ftl.o
+obj-$(CONFIG_SSFDC)            += ssfdc.o
 
 nftl-objs              := nftlcore.o nftlmount.o
 inftl-objs             := inftlcore.o inftlmount.o
index 6a45be04564b7cd6b92b4b7afab76696d50feb23..52d51eb91c16f7c1a7a5ec7c3cbbcd5936cb5a39 100644 (file)
@@ -207,11 +207,10 @@ static int parse_afs_partitions(struct mtd_info *mtd,
        if (!sz)
                return ret;
 
-       parts = kmalloc(sz, GFP_KERNEL);
+       parts = kzalloc(sz, GFP_KERNEL);
        if (!parts)
                return -ENOMEM;
 
-       memset(parts, 0, sz);
        str = (char *)(parts + idx);
 
        /*
index 16eaca69fb5aff52137560149b4409217463f47b..e7999f15d85a51881f54a2d49d79506c3a3623d0 100644 (file)
@@ -643,13 +643,12 @@ static struct mtd_info *amd_flash_probe(struct map_info *map)
        int reg_idx;
        int offset;
 
-       mtd = (struct mtd_info*)kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd) {
                printk(KERN_WARNING
                       "%s: kmalloc failed for info structure\n", map->name);
                return NULL;
        }
-       memset(mtd, 0, sizeof(*mtd));
        mtd->priv = map;
 
        memset(&temp, 0, sizeof(temp));
index 296159ec5189eafc0e6c68d118bde8772725ac95..f69184a92eb2389d7370d726a346602c117d51dd 100644 (file)
@@ -337,12 +337,11 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
        struct mtd_info *mtd;
        int i;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd) {
                printk(KERN_ERR "Failed to allocate memory for MTD device\n");
                return NULL;
        }
-       memset(mtd, 0, sizeof(*mtd));
        mtd->priv = map;
        mtd->type = MTD_NORFLASH;
 
@@ -2224,6 +2223,8 @@ static int cfi_intelext_suspend(struct mtd_info *mtd)
                case FL_CFI_QUERY:
                case FL_JEDEC_QUERY:
                        if (chip->oldstate == FL_READY) {
+                               /* place the chip in a known state before suspend */
+                               map_write(map, CMD(0xFF), cfi->chips[i].start);
                                chip->oldstate = chip->state;
                                chip->state = FL_PM_SUSPENDED;
                                /* No need to wake_up() on this state change -
index 702ae4cd8691c510e33ecc3892bccd0c16653f61..e3acd398fb37910c539dfb22fb0a8921748522ff 100644 (file)
@@ -48,6 +48,7 @@
 #define MANUFACTURER_ATMEL     0x001F
 #define MANUFACTURER_SST       0x00BF
 #define SST49LF004B            0x0060
+#define SST49LF040B            0x0050
 #define SST49LF008A            0x005a
 #define AT49BV6416             0x00d6
 
@@ -233,6 +234,7 @@ static struct cfi_fixup cfi_fixup_table[] = {
 };
 static struct cfi_fixup jedec_fixup_table[] = {
        { MANUFACTURER_SST, SST49LF004B, fixup_use_fwh_lock, NULL, },
+       { MANUFACTURER_SST, SST49LF040B, fixup_use_fwh_lock, NULL, },
        { MANUFACTURER_SST, SST49LF008A, fixup_use_fwh_lock, NULL, },
        { 0, 0, NULL, NULL }
 };
@@ -255,12 +257,11 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
        struct mtd_info *mtd;
        int i;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd) {
                printk(KERN_WARNING "Failed to allocate memory for MTD device\n");
                return NULL;
        }
-       memset(mtd, 0, sizeof(*mtd));
        mtd->priv = map;
        mtd->type = MTD_NORFLASH;
 
@@ -519,10 +520,12 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
                if (mode == FL_WRITING) /* FIXME: Erase-suspend-program appears broken. */
                        goto sleep;
 
-               if (!(mode == FL_READY || mode == FL_POINT
+               if (!(   mode == FL_READY
+                     || mode == FL_POINT
                      || !cfip
                      || (mode == FL_WRITING && (cfip->EraseSuspend & 0x2))
-                     || (mode == FL_WRITING && (cfip->EraseSuspend & 0x1))))
+                     || (mode == FL_WRITING && (cfip->EraseSuspend & 0x1)
+                   )))
                        goto sleep;
 
                /* We could check to see if we're trying to access the sector
index fae70a5db5409f65307a6f851edfaafda6bb039e..d56849f5f107bbb119569ef42c27f3cdbc5e60ab 100644 (file)
@@ -172,7 +172,7 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
        int i,j;
        unsigned long devsize = (1<<cfi->cfiq->DevSize) * cfi->interleave;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips);
 
        if (!mtd) {
@@ -181,7 +181,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
                return NULL;
        }
 
-       memset(mtd, 0, sizeof(*mtd));
        mtd->priv = map;
        mtd->type = MTD_NORFLASH;
        mtd->size = devsize * cfi->numchips;
index cdb0f590b40c117ba246f23e2351528608476df2..2eb696d7b97b0ca61ebf61c29cdfdaa2b70a3a91 100644 (file)
@@ -40,7 +40,7 @@ struct mtd_info *mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp)
        if (mtd) {
                if (mtd->size > map->size) {
                        printk(KERN_WARNING "Reducing visibility of %ldKiB chip to %ldKiB\n",
-                              (unsigned long)mtd->size >> 10, 
+                              (unsigned long)mtd->size >> 10,
                               (unsigned long)map->size >> 10);
                        mtd->size = map->size;
                }
@@ -113,13 +113,12 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi
        }
 
        mapsize = (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG;
-       chip_map = kmalloc(mapsize, GFP_KERNEL);
+       chip_map = kzalloc(mapsize, GFP_KERNEL);
        if (!chip_map) {
                printk(KERN_WARNING "%s: kmalloc failed for CFI chip map\n", map->name);
                kfree(cfi.cfiq);
                return NULL;
        }
-       memset (chip_map, 0, mapsize);
 
        set_bit(0, chip_map); /* Mark first chip valid */
 
index 2c3f019197c116463b74b04645dd6baf54e0dd65..14e57b2bf8424ccc287a184bdd9e08a26f7925c4 100644 (file)
@@ -116,11 +116,10 @@ static struct mtd_info *jedec_probe(struct map_info *map)
    char Part[200];
    memset(&priv,0,sizeof(priv));
 
-   MTD = kmalloc(sizeof(struct mtd_info) + sizeof(struct jedec_private), GFP_KERNEL);
+   MTD = kzalloc(sizeof(struct mtd_info) + sizeof(struct jedec_private), GFP_KERNEL);
    if (!MTD)
           return NULL;
 
-   memset(MTD, 0, sizeof(struct mtd_info) + sizeof(struct jedec_private));
    priv = (struct jedec_private *)&MTD[1];
 
    my_bank_size = map->size;
index 1154dac715aa62b6f89eea9337809ad14b38d7a5..58e561e87699026de75ff94b9960128adb1490ac 100644 (file)
 #define SST39SF010A    0x00B5
 #define SST39SF020A    0x00B6
 #define SST49LF004B    0x0060
+#define SST49LF040B    0x0050
 #define SST49LF008A    0x005a
 #define SST49LF030A    0x001C
 #define SST49LF040A    0x0051
@@ -1400,6 +1401,20 @@ static const struct amd_flash_info jedec_table[] = {
                        ERASEINFO(0x01000,64),
                }
        }, {
+               .mfr_id         = MANUFACTURER_SST,
+               .dev_id         = SST49LF040B,
+               .name           = "SST 49LF040B",
+               .uaddr          = {
+                       [0] = MTD_UADDR_0x5555_0x2AAA /* x8 */
+               },
+               .DevSize        = SIZE_512KiB,
+               .CmdSet         = P_ID_AMD_STD,
+               .NumEraseRegions= 1,
+               .regions        = {
+                       ERASEINFO(0x01000,128),
+               }
+       }, {
+
                .mfr_id         = MANUFACTURER_SST,
                .dev_id         = SST49LF004B,
                .name           = "SST 49LF004B",
@@ -1874,7 +1889,7 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index)
 
 
 /*
- * There is a BIG problem properly ID'ing the JEDEC devic and guaranteeing
+ * There is a BIG problem properly ID'ing the JEDEC device and guaranteeing
  * the mapped address, unlock addresses, and proper chip ID.  This function
  * attempts to minimize errors.  It is doubtfull that this probe will ever
  * be perfect - consequently there should be some module parameters that
index ac01a949b687a4513e7217c0c59ac1f492d06a45..fc478c0f93f55bdcce74f7f82393a5c36a39b605 100644 (file)
@@ -47,13 +47,11 @@ static struct mtd_info *map_absent_probe(struct map_info *map)
 {
        struct mtd_info *mtd;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd) {
                return NULL;
        }
 
-       memset(mtd, 0, sizeof(*mtd));
-
        map->fldrv      = &map_absent_chipdrv;
        mtd->priv       = map;
        mtd->name       = map->name;
index 3a66680abfd06cc3b3c6b60e129e957d84e912a9..5cb6d5263661a63f862d458a6b3a2dfdc31686ae 100644 (file)
@@ -55,12 +55,10 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
 #endif
        /* OK. It seems to be RAM. */
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd)
                return NULL;
 
-       memset(mtd, 0, sizeof(*mtd));
-
        map->fldrv = &mapram_chipdrv;
        mtd->priv = map;
        mtd->name = map->name;
index 1b328b1378fda2d9d288d535434a7113a7262d74..cb27f855074c279a65ce23a53cc2615ff9417d55 100644 (file)
@@ -31,12 +31,10 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
 {
        struct mtd_info *mtd;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd)
                return NULL;
 
-       memset(mtd, 0, sizeof(*mtd));
-
        map->fldrv = &maprom_chipdrv;
        mtd->priv = map;
        mtd->name = map->name;
index 967abbecdff9bb450aab9852e28c5ee84d39dcc7..c9cd3d21ccfaa98c64d976e29cabc0fef28ee7d0 100644 (file)
@@ -112,18 +112,16 @@ static struct mtd_info *sharp_probe(struct map_info *map)
        struct sharp_info *sharp = NULL;
        int width;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if(!mtd)
                return NULL;
 
-       sharp = kmalloc(sizeof(*sharp), GFP_KERNEL);
+       sharp = kzalloc(sizeof(*sharp), GFP_KERNEL);
        if(!sharp) {
                kfree(mtd);
                return NULL;
        }
 
-       memset(mtd, 0, sizeof(*mtd));
-
        width = sharp_probe_map(map,mtd);
        if(!width){
                kfree(mtd);
@@ -143,7 +141,6 @@ static struct mtd_info *sharp_probe(struct map_info *map)
        mtd->writesize = 1;
        mtd->name = map->name;
 
-       memset(sharp, 0, sizeof(*sharp));
        sharp->chipshift = 23;
        sharp->numchips = 1;
        sharp->chips[0].start = 0;
index a7a7bfe33879e0cc56bb07d25e4b23b7302b65f7..23fab14f1637cab5fb4ee175ff5eaea6db141915 100644 (file)
@@ -163,13 +163,12 @@ static struct mtd_partition * newpart(char *s,
                *num_parts = this_part + 1;
                alloc_size = *num_parts * sizeof(struct mtd_partition) +
                             extra_mem_size;
-               parts = kmalloc(alloc_size, GFP_KERNEL);
+               parts = kzalloc(alloc_size, GFP_KERNEL);
                if (!parts)
                {
                        printk(KERN_ERR ERRP "out of memory\n");
                        return NULL;
                }
-               memset(parts, 0, alloc_size);
                extra_mem = (unsigned char *)(parts + *num_parts);
        }
        /* enter this partition (offset will be calculated later if it is zero at this point) */
@@ -346,7 +345,7 @@ static int parse_cmdline_partitions(struct mtd_info *master,
  *
  * This function needs to be visible for bootloaders.
  */
-int mtdpart_setup(char *s)
+static int mtdpart_setup(char *s)
 {
        cmdline = s;
        return 1;
index 401c6a294baaebc7951dbca2a213dc2312a05072..6d917a4daa9db24b4d9e7cb23281e1842cef9283 100644 (file)
@@ -295,10 +295,9 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
        if (!devname)
                return NULL;
 
-       dev = kmalloc(sizeof(struct block2mtd_dev), GFP_KERNEL);
+       dev = kzalloc(sizeof(struct block2mtd_dev), GFP_KERNEL);
        if (!dev)
                return NULL;
-       memset(dev, 0, sizeof(*dev));
 
        /* Get a handle on the device */
        bdev = open_bdev_excl(devname, O_RDWR, NULL);
index 08dfb899b27204ef036e693826643bd6452d8f38..9cff119a202483cd9cea74438c190b5a4fbb7171 100644 (file)
@@ -131,11 +131,10 @@ static int __init ms02nv_init_one(ulong addr)
        int ret = -ENODEV;
 
        /* The module decodes 8MiB of address space. */
-       mod_res = kmalloc(sizeof(*mod_res), GFP_KERNEL);
+       mod_res = kzalloc(sizeof(*mod_res), GFP_KERNEL);
        if (!mod_res)
                return -ENOMEM;
 
-       memset(mod_res, 0, sizeof(*mod_res));
        mod_res->name = ms02nv_name;
        mod_res->start = addr;
        mod_res->end = addr + MS02NV_SLOT_SIZE - 1;
@@ -153,24 +152,21 @@ static int __init ms02nv_init_one(ulong addr)
        }
 
        ret = -ENOMEM;
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd)
                goto err_out_mod_res_rel;
-       memset(mtd, 0, sizeof(*mtd));
-       mp = kmalloc(sizeof(*mp), GFP_KERNEL);
+       mp = kzalloc(sizeof(*mp), GFP_KERNEL);
        if (!mp)
                goto err_out_mtd;
-       memset(mp, 0, sizeof(*mp));
 
        mtd->priv = mp;
        mp->resource.module = mod_res;
 
        /* Firmware's diagnostic NVRAM area. */
-       diag_res = kmalloc(sizeof(*diag_res), GFP_KERNEL);
+       diag_res = kzalloc(sizeof(*diag_res), GFP_KERNEL);
        if (!diag_res)
                goto err_out_mp;
 
-       memset(diag_res, 0, sizeof(*diag_res));
        diag_res->name = ms02nv_res_diag_ram;
        diag_res->start = addr;
        diag_res->end = addr + MS02NV_RAM - 1;
@@ -180,11 +176,10 @@ static int __init ms02nv_init_one(ulong addr)
        mp->resource.diag_ram = diag_res;
 
        /* User-available general-purpose NVRAM area. */
-       user_res = kmalloc(sizeof(*user_res), GFP_KERNEL);
+       user_res = kzalloc(sizeof(*user_res), GFP_KERNEL);
        if (!user_res)
                goto err_out_diag_res;
 
-       memset(user_res, 0, sizeof(*user_res));
        user_res->name = ms02nv_res_user_ram;
        user_res->start = addr + MS02NV_RAM;
        user_res->end = addr + size - 1;
@@ -194,11 +189,10 @@ static int __init ms02nv_init_one(ulong addr)
        mp->resource.user_ram = user_res;
 
        /* Control and status register. */
-       csr_res = kmalloc(sizeof(*csr_res), GFP_KERNEL);
+       csr_res = kzalloc(sizeof(*csr_res), GFP_KERNEL);
        if (!csr_res)
                goto err_out_user_res;
 
-       memset(csr_res, 0, sizeof(*csr_res));
        csr_res->name = ms02nv_res_csr;
        csr_res->start = addr + MS02NV_CSR;
        csr_res->end = addr + MS02NV_CSR + 3;
index 910e4061dfd231dd31a5c1c97bf7d3f8d6c41f71..a987e917f4e07e4c1bc534b574f66841d9c55cd3 100644 (file)
@@ -480,7 +480,7 @@ add_dataflash(struct spi_device *spi, char *name,
        device->writesize = pagesize;
        device->owner = THIS_MODULE;
        device->type = MTD_DATAFLASH;
-       device->flags = MTD_CAP_NORFLASH;
+       device->flags = MTD_WRITEABLE;
        device->erase = dataflash_erase;
        device->read = dataflash_read;
        device->write = dataflash_write;
index 6c7337f9ebbbfce6edc1f204f1d1b58d6bff2be5..56cc1ca7ffd5e7d8c552c47d3d0089fe4014c2e6 100644 (file)
@@ -126,12 +126,10 @@ static int register_device(char *name, unsigned long start, unsigned long len)
        struct phram_mtd_list *new;
        int ret = -ENOMEM;
 
-       new = kmalloc(sizeof(*new), GFP_KERNEL);
+       new = kzalloc(sizeof(*new), GFP_KERNEL);
        if (!new)
                goto out0;
 
-       memset(new, 0, sizeof(*new));
-
        ret = -EIO;
        new->mtd.priv = ioremap(start, len);
        if (!new->mtd.priv) {
index 542a0c009006d4b682d30c03fa437a4f0b62a2aa..5f49248a48564398a82239c569bf860b5d431da0 100644 (file)
@@ -168,19 +168,16 @@ static int register_device(char *name, unsigned long start, unsigned long length
                E("slram: Cannot allocate new MTD device.\n");
                return(-ENOMEM);
        }
-       (*curmtd)->mtdinfo = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
+       (*curmtd)->mtdinfo = kzalloc(sizeof(struct mtd_info), GFP_KERNEL);
        (*curmtd)->next = NULL;
 
        if ((*curmtd)->mtdinfo) {
-               memset((char *)(*curmtd)->mtdinfo, 0, sizeof(struct mtd_info));
                (*curmtd)->mtdinfo->priv =
-                       kmalloc(sizeof(slram_priv_t), GFP_KERNEL);
+                       kzalloc(sizeof(slram_priv_t), GFP_KERNEL);
 
                if (!(*curmtd)->mtdinfo->priv) {
                        kfree((*curmtd)->mtdinfo);
                        (*curmtd)->mtdinfo = NULL;
-               } else {
-                       memset((*curmtd)->mtdinfo->priv,0,sizeof(slram_priv_t));
                }
        }
 
index 8a878b34eca0b34c090f2ec41f6c72d41d4f307c..24235d4f1d23219255da945d14afe2493a742ef6 100644 (file)
@@ -1033,7 +1033,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 {
        partition_t *partition;
 
-       partition = kmalloc(sizeof(partition_t), GFP_KERNEL);
+       partition = kzalloc(sizeof(partition_t), GFP_KERNEL);
 
        if (!partition) {
                printk(KERN_WARNING "No memory to scan for FTL on %s\n",
@@ -1041,8 +1041,6 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
                return;
        }
 
-       memset(partition, 0, sizeof(partition_t));
-
        partition->mbd.mtd = mtd;
 
        if ((scan_header(partition) == 0) &&
@@ -1054,7 +1052,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
                       le32_to_cpu(partition->header.FormattedSize) >> 10);
 #endif
                partition->mbd.size = le32_to_cpu(partition->header.FormattedSize) >> 9;
-               partition->mbd.blksize = SECTOR_SIZE;
+
                partition->mbd.tr = tr;
                partition->mbd.devnum = -1;
                if (!add_mtd_blktrans_dev((void *)partition))
@@ -1076,6 +1074,7 @@ struct mtd_blktrans_ops ftl_tr = {
        .name           = "ftl",
        .major          = FTL_MAJOR,
        .part_bits      = PART_BITS,
+       .blksize        = SECTOR_SIZE,
        .readsect       = ftl_readsect,
        .writesect      = ftl_writesect,
        .getgeo         = ftl_getgeo,
index 4116535805f1dbec9f81b75a1e5ace9103706f56..b0e396504e67cf98d2469afc881594706c706bd9 100644 (file)
@@ -67,17 +67,16 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 
        DEBUG(MTD_DEBUG_LEVEL3, "INFTL: add_mtd for %s\n", mtd->name);
 
-       inftl = kmalloc(sizeof(*inftl), GFP_KERNEL);
+       inftl = kzalloc(sizeof(*inftl), GFP_KERNEL);
 
        if (!inftl) {
                printk(KERN_WARNING "INFTL: Out of memory for data structures\n");
                return;
        }
-       memset(inftl, 0, sizeof(*inftl));
 
        inftl->mbd.mtd = mtd;
        inftl->mbd.devnum = -1;
-       inftl->mbd.blksize = 512;
+
        inftl->mbd.tr = tr;
 
        if (INFTL_mount(inftl) < 0) {
@@ -163,10 +162,9 @@ int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
        ops.ooblen = len;
        ops.oobbuf = buf;
        ops.datbuf = NULL;
-       ops.len = len;
 
        res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
-       *retlen = ops.retlen;
+       *retlen = ops.oobretlen;
        return res;
 }
 
@@ -184,10 +182,9 @@ int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
        ops.ooblen = len;
        ops.oobbuf = buf;
        ops.datbuf = NULL;
-       ops.len = len;
 
        res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
-       *retlen = ops.retlen;
+       *retlen = ops.oobretlen;
        return res;
 }
 
@@ -945,6 +942,7 @@ static struct mtd_blktrans_ops inftl_tr = {
        .name           = "inftl",
        .major          = INFTL_MAJOR,
        .part_bits      = INFTL_PARTN_BITS,
+       .blksize        = 512,
        .getgeo         = inftl_getgeo,
        .readsect       = inftl_readblock,
        .writesect      = inftl_writeblock,
index d132ed571f1398d8ec8fb35f6c126c6aafd5f717..f457315579db924c71ba6298ec91f0e6a952af9d 100644 (file)
@@ -60,6 +60,15 @@ config MTD_PHYSMAP_BANKWIDTH
          Ignore this option if you use run-time physmap configuration
          (i.e., run-time calling physmap_configure()).
 
+config MTD_PHYSMAP_OF
+       tristate "Flash device in physical memory map based on OF descirption"
+       depends on PPC_OF && (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
+       help
+         This provides a 'mapping' driver which allows the NOR Flash and
+         ROM driver code to communicate with chips which are mapped
+         physically into the CPU's memory. The mapping description here is
+         taken from OF device tree.
+
 config MTD_SUN_UFLASH
        tristate "Sun Microsystems userflash support"
        depends on SPARC && MTD_CFI
@@ -184,6 +193,24 @@ config MTD_ICHXROM
 
          BE VERY CAREFUL.
 
+config MTD_ESB2ROM
+        tristate "BIOS flash chip on Intel ESB Controller Hub 2"
+        depends on X86 && MTD_JEDECPROBE && PCI
+        help
+          Support for treating the BIOS flash chip on ESB2 motherboards
+          as an MTD device - with this you can reprogram your BIOS.
+
+          BE VERY CAREFUL.
+
+config MTD_CK804XROM
+       tristate "BIOS flash chip on Nvidia CK804"
+       depends on X86 && MTD_JEDECPROBE
+       help
+         Support for treating the BIOS flash chip on nvidia motherboards
+         as an MTD device - with this you can reprogram your BIOS.
+
+         BE VERY CAREFUL.
+
 config MTD_SCB2_FLASH
        tristate "BIOS flash chip on Intel SCB2 boards"
        depends on X86 && MTD_JEDECPROBE
@@ -355,50 +382,6 @@ config MTD_TQM834x
          TQ Components TQM834x boards. If you have one of these boards
          and would like to use the flash chips on it, say 'Y'.
 
-config MTD_CSTM_MIPS_IXX
-       tristate "Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board"
-       depends on MIPS && MTD_CFI && MTD_JEDECPROBE && MTD_PARTITIONS
-       help
-         This provides a mapping driver for the Integrated Technology
-         Express, Inc (ITE) QED-4N-S01B eval board and the Globespan IVR
-         Reference Board. It provides the necessary addressing, length,
-         buswidth, vpp code and addition setup of the flash device for
-         these boards. In addition, this mapping driver can be used for
-         other boards via setting of the CONFIG_MTD_CSTM_MIPS_IXX_START/
-         LEN/BUSWIDTH parameters. This mapping will provide one mtd device
-         using one partition. The start address can be offset from the
-         beginning of flash and the len can be less than the total flash
-         device size to allow a window into the flash. Both CFI and JEDEC
-         probes are called.
-
-config MTD_CSTM_MIPS_IXX_START
-       hex "Physical start address of flash mapping"
-       depends on MTD_CSTM_MIPS_IXX
-       default "0x8000000"
-       help
-         This is the physical memory location that the MTD driver will
-         use for the flash chips on your particular target board.
-         Refer to the memory map which should hopefully be in the
-         documentation for your board.
-
-config MTD_CSTM_MIPS_IXX_LEN
-       hex "Physical length of flash mapping"
-       depends on MTD_CSTM_MIPS_IXX
-       default "0x4000000"
-       help
-         This is the total length that the MTD driver will use for the
-         flash chips on your particular board.  Refer to the memory
-         map which should hopefully be in the documentation for your
-         board.
-
-config MTD_CSTM_MIPS_IXX_BUSWIDTH
-       int "Bus width in octets"
-       depends on MTD_CSTM_MIPS_IXX
-       default "2"
-       help
-         This is the total bus width of the mapping of the flash chips
-         on your particular board.
-
 config MTD_OCELOT
        tristate "Momenco Ocelot boot flash device"
        depends on MIPS && MOMENCO_OCELOT
index 191c1928bbeca6715b3e889e28f64e30012668f5..071d0bf922b601d9ddb93908940009a5d1683ea5 100644 (file)
@@ -12,12 +12,13 @@ obj-$(CONFIG_MTD_CDB89712)  += cdb89712.o
 obj-$(CONFIG_MTD_ARM_INTEGRATOR)+= integrator-flash.o
 obj-$(CONFIG_MTD_BAST)         += bast-flash.o
 obj-$(CONFIG_MTD_CFI_FLAGADM)  += cfi_flagadm.o
-obj-$(CONFIG_MTD_CSTM_MIPS_IXX)        += cstm_mips_ixx.o
 obj-$(CONFIG_MTD_DC21285)      += dc21285.o
 obj-$(CONFIG_MTD_DILNETPC)     += dilnetpc.o
 obj-$(CONFIG_MTD_L440GX)       += l440gx.o
 obj-$(CONFIG_MTD_AMD76XROM)    += amd76xrom.o
+obj-$(CONFIG_MTD_ESB2ROM)      += esb2rom.o
 obj-$(CONFIG_MTD_ICHXROM)      += ichxrom.o
+obj-$(CONFIG_MTD_CK804XROM)    += ck804xrom.o
 obj-$(CONFIG_MTD_TSUNAMI)      += tsunami_flash.o
 obj-$(CONFIG_MTD_LUBBOCK)      += lubbock-flash.o
 obj-$(CONFIG_MTD_MAINSTONE)    += mainstone-flash.o
@@ -25,6 +26,7 @@ obj-$(CONFIG_MTD_MBX860)      += mbx860.o
 obj-$(CONFIG_MTD_CEIVA)                += ceiva.o
 obj-$(CONFIG_MTD_OCTAGON)      += octagon-5066.o
 obj-$(CONFIG_MTD_PHYSMAP)      += physmap.o
+obj-$(CONFIG_MTD_PHYSMAP_OF)   += physmap_of.o
 obj-$(CONFIG_MTD_PNC2000)      += pnc2000.o
 obj-$(CONFIG_MTD_PCMCIA)       += pcmciamtd.o
 obj-$(CONFIG_MTD_RPXLITE)      += rpxlite.o
index 797caffb20b138b74eebe602878d0c617cb2253e..78b671172bb225d6978cacd5f164c13628a39066 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/module.h>
 #include <linux/types.h>
+#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <asm/io.h>
@@ -44,6 +45,23 @@ struct amd76xrom_map_info {
        char map_name[sizeof(MOD_NAME) + 2 + ADDRESS_NAME_LEN];
 };
 
+/* The 2 bits controlling the window size are often set to allow reading
+ * the BIOS, but too small to allow writing, since the lock registers are
+ * 4MiB lower in the address space than the data.
+ *
+ * This is intended to prevent flashing the bios, perhaps accidentally.
+ *
+ * This parameter allows the normal driver to over-ride the BIOS settings.
+ *
+ * The bits are 6 and 7.  If both bits are set, it is a 5MiB window.
+ * If only the 7 Bit is set, it is a 4MiB window.  Otherwise, a
+ * 64KiB window.
+ *
+ */
+static uint win_size_bits;
+module_param(win_size_bits, uint, 0);
+MODULE_PARM_DESC(win_size_bits, "ROM window size bits override for 0x43 byte, normally set by BIOS.");
+
 static struct amd76xrom_window amd76xrom_window = {
        .maps = LIST_HEAD_INIT(amd76xrom_window.maps),
 };
@@ -95,6 +113,16 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
        /* Remember the pci dev I find the window in - already have a ref */
        window->pdev = pdev;
 
+       /* Enable the selected rom window.  This is often incorrectly
+        * set up by the BIOS, and the 4MiB offset for the lock registers
+        * requires the full 5MiB of window space.
+        *
+        * This 'write, then read' approach leaves the bits for
+        * other uses of the hardware info.
+        */
+       pci_read_config_byte(pdev, 0x43, &byte);
+       pci_write_config_byte(pdev, 0x43, byte | win_size_bits );
+
        /* Assume the rom window is properly setup, and find it's size */
        pci_read_config_byte(pdev, 0x43, &byte);
        if ((byte & ((1<<7)|(1<<6))) == ((1<<7)|(1<<6))) {
@@ -129,12 +157,6 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
                        (unsigned long long)window->rsrc.end);
        }
 
-#if 0
-
-       /* Enable the selected rom window */
-       pci_read_config_byte(pdev, 0x43, &byte);
-       pci_write_config_byte(pdev, 0x43, byte | rwindow->segen_bits);
-#endif
 
        /* Enable writes through the rom window */
        pci_read_config_byte(pdev, 0x40, &byte);
index e074bb6787d21fb0a9c75447b00d01d8348d78eb..fc3b2672d1e2a58d18bdd248af1f8362f8b76321 100644 (file)
@@ -131,7 +131,7 @@ static int bast_flash_probe(struct platform_device *pdev)
 
        info->map.phys = res->start;
        info->map.size = res->end - res->start + 1;
-       info->map.name = pdev->dev.bus_id;      
+       info->map.name = pdev->dev.bus_id;
        info->map.bankwidth = 2;
 
        if (info->map.size > AREA_MAXSIZE)
index 0402c21e291d40c750bd9a047dcf7f13bc811d7e..629e6e2641a84c7ca5e2d0ecd53b56566008362b 100644 (file)
@@ -122,10 +122,9 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info
        /*
         * Allocate the map_info structs in one go.
         */
-       maps = kmalloc(sizeof(struct map_info) * nr, GFP_KERNEL);
+       maps = kzalloc(sizeof(struct map_info) * nr, GFP_KERNEL);
        if (!maps)
                return -ENOMEM;
-       memset(maps, 0, sizeof(struct map_info) * nr);
        /*
         * Claim and then map the memory regions.
         */
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
new file mode 100644 (file)
index 0000000..238d42e
--- /dev/null
@@ -0,0 +1,356 @@
+/*
+ * ck804xrom.c
+ *
+ * Normal mappings of chips in physical memory
+ *
+ * Dave Olsen <dolsen@lnxi.com>
+ * Ryan Jackson <rjackson@lnxi.com>
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/cfi.h>
+#include <linux/mtd/flashchip.h>
+#include <linux/pci.h>
+#include <linux/pci_ids.h>
+#include <linux/list.h>
+
+
+#define MOD_NAME KBUILD_BASENAME
+
+#define ADDRESS_NAME_LEN 18
+
+#define ROM_PROBE_STEP_SIZE (64*1024)
+
+struct ck804xrom_window {
+       void __iomem *virt;
+       unsigned long phys;
+       unsigned long size;
+       struct list_head maps;
+       struct resource rsrc;
+       struct pci_dev *pdev;
+};
+
+struct ck804xrom_map_info {
+       struct list_head list;
+       struct map_info map;
+       struct mtd_info *mtd;
+       struct resource rsrc;
+       char map_name[sizeof(MOD_NAME) + 2 + ADDRESS_NAME_LEN];
+};
+
+
+/* The 2 bits controlling the window size are often set to allow reading
+ * the BIOS, but too small to allow writing, since the lock registers are
+ * 4MiB lower in the address space than the data.
+ *
+ * This is intended to prevent flashing the bios, perhaps accidentally.
+ *
+ * This parameter allows the normal driver to override the BIOS settings.
+ *
+ * The bits are 6 and 7.  If both bits are set, it is a 5MiB window.
+ * If only the 7 Bit is set, it is a 4MiB window.  Otherwise, a
+ * 64KiB window.
+ *
+ */
+static uint win_size_bits = 0;
+module_param(win_size_bits, uint, 0);
+MODULE_PARM_DESC(win_size_bits, "ROM window size bits override for 0x88 byte, normally set by BIOS.");
+
+static struct ck804xrom_window ck804xrom_window = {
+       .maps = LIST_HEAD_INIT(ck804xrom_window.maps),
+};
+
+static void ck804xrom_cleanup(struct ck804xrom_window *window)
+{
+       struct ck804xrom_map_info *map, *scratch;
+       u8 byte;
+
+       if (window->pdev) {
+               /* Disable writes through the rom window */
+               pci_read_config_byte(window->pdev, 0x6d, &byte);
+               pci_write_config_byte(window->pdev, 0x6d, byte & ~1);
+       }
+
+       /* Free all of the mtd devices */
+       list_for_each_entry_safe(map, scratch, &window->maps, list) {
+               if (map->rsrc.parent)
+                       release_resource(&map->rsrc);
+
+               del_mtd_device(map->mtd);
+               map_destroy(map->mtd);
+               list_del(&map->list);
+               kfree(map);
+       }
+       if (window->rsrc.parent)
+               release_resource(&window->rsrc);
+
+       if (window->virt) {
+               iounmap(window->virt);
+               window->virt = NULL;
+               window->phys = 0;
+               window->size = 0;
+       }
+       pci_dev_put(window->pdev);
+}
+
+
+static int __devinit ck804xrom_init_one (struct pci_dev *pdev,
+       const struct pci_device_id *ent)
+{
+       static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
+       u8 byte;
+       struct ck804xrom_window *window = &ck804xrom_window;
+       struct ck804xrom_map_info *map = NULL;
+       unsigned long map_top;
+
+       /* Remember the pci dev I find the window in */
+       window->pdev = pci_dev_get(pdev);
+
+       /* Enable the selected rom window.  This is often incorrectly
+        * set up by the BIOS, and the 4MiB offset for the lock registers
+        * requires the full 5MiB of window space.
+        *
+        * This 'write, then read' approach leaves the bits for
+        * other uses of the hardware info.
+        */
+        pci_read_config_byte(pdev, 0x88, &byte);
+        pci_write_config_byte(pdev, 0x88, byte | win_size_bits );
+
+
+       /* Assume the rom window is properly setup, and find it's size */
+       pci_read_config_byte(pdev, 0x88, &byte);
+
+       if ((byte & ((1<<7)|(1<<6))) == ((1<<7)|(1<<6)))
+               window->phys = 0xffb00000; /* 5MiB */
+       else if ((byte & (1<<7)) == (1<<7))
+               window->phys = 0xffc00000; /* 4MiB */
+       else
+               window->phys = 0xffff0000; /* 64KiB */
+
+       window->size = 0xffffffffUL - window->phys + 1UL;
+
+       /*
+        * Try to reserve the window mem region.  If this fails then
+        * it is likely due to a fragment of the window being
+        * "reserved" by the BIOS.  In the case that the
+        * request_mem_region() fails then once the rom size is
+        * discovered we will try to reserve the unreserved fragment.
+        */
+       window->rsrc.name = MOD_NAME;
+       window->rsrc.start = window->phys;
+       window->rsrc.end   = window->phys + window->size - 1;
+       window->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+       if (request_resource(&iomem_resource, &window->rsrc)) {
+               window->rsrc.parent = NULL;
+               printk(KERN_ERR MOD_NAME
+                       " %s(): Unable to register resource"
+                       " 0x%.016llx-0x%.016llx - kernel bug?\n",
+                       __func__,
+                       (unsigned long long)window->rsrc.start,
+                       (unsigned long long)window->rsrc.end);
+       }
+
+
+       /* Enable writes through the rom window */
+       pci_read_config_byte(pdev, 0x6d, &byte);
+       pci_write_config_byte(pdev, 0x6d, byte | 1);
+
+       /* FIXME handle registers 0x80 - 0x8C the bios region locks */
+
+       /* For write accesses caches are useless */
+       window->virt = ioremap_nocache(window->phys, window->size);
+       if (!window->virt) {
+               printk(KERN_ERR MOD_NAME ": ioremap(%08lx, %08lx) failed\n",
+                       window->phys, window->size);
+               goto out;
+       }
+
+       /* Get the first address to look for a rom chip at */
+       map_top = window->phys;
+#if 1
+       /* The probe sequence run over the firmware hub lock
+        * registers sets them to 0x7 (no access).
+        * Probe at most the last 4MiB of the address space.
+        */
+       if (map_top < 0xffc00000)
+               map_top = 0xffc00000;
+#endif
+       /* Loop  through and look for rom chips.  Since we don't know the
+        * starting address for each chip, probe every ROM_PROBE_STEP_SIZE
+        * bytes from the starting address of the window.
+        */
+       while((map_top - 1) < 0xffffffffUL) {
+               struct cfi_private *cfi;
+               unsigned long offset;
+               int i;
+
+               if (!map)
+                       map = kmalloc(sizeof(*map), GFP_KERNEL);
+
+               if (!map) {
+                       printk(KERN_ERR MOD_NAME ": kmalloc failed");
+                       goto out;
+               }
+               memset(map, 0, sizeof(*map));
+               INIT_LIST_HEAD(&map->list);
+               map->map.name = map->map_name;
+               map->map.phys = map_top;
+               offset = map_top - window->phys;
+               map->map.virt = (void __iomem *)
+                       (((unsigned long)(window->virt)) + offset);
+               map->map.size = 0xffffffffUL - map_top + 1UL;
+               /* Set the name of the map to the address I am trying */
+               sprintf(map->map_name, "%s @%08lx",
+                       MOD_NAME, map->map.phys);
+
+               /* There is no generic VPP support */
+               for(map->map.bankwidth = 32; map->map.bankwidth;
+                       map->map.bankwidth >>= 1)
+               {
+                       char **probe_type;
+                       /* Skip bankwidths that are not supported */
+                       if (!map_bankwidth_supported(map->map.bankwidth))
+                               continue;
+
+                       /* Setup the map methods */
+                       simple_map_init(&map->map);
+
+                       /* Try all of the probe methods */
+                       probe_type = rom_probe_types;
+                       for(; *probe_type; probe_type++) {
+                               map->mtd = do_map_probe(*probe_type, &map->map);
+                               if (map->mtd)
+                                       goto found;
+                       }
+               }
+               map_top += ROM_PROBE_STEP_SIZE;
+               continue;
+       found:
+               /* Trim the size if we are larger than the map */
+               if (map->mtd->size > map->map.size) {
+                       printk(KERN_WARNING MOD_NAME
+                               " rom(%u) larger than window(%lu). fixing...\n",
+                               map->mtd->size, map->map.size);
+                       map->mtd->size = map->map.size;
+               }
+               if (window->rsrc.parent) {
+                       /*
+                        * Registering the MTD device in iomem may not be possible
+                        * if there is a BIOS "reserved" and BUSY range.  If this
+                        * fails then continue anyway.
+                        */
+                       map->rsrc.name  = map->map_name;
+                       map->rsrc.start = map->map.phys;
+                       map->rsrc.end   = map->map.phys + map->mtd->size - 1;
+                       map->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+                       if (request_resource(&window->rsrc, &map->rsrc)) {
+                               printk(KERN_ERR MOD_NAME
+                                       ": cannot reserve MTD resource\n");
+                               map->rsrc.parent = NULL;
+                       }
+               }
+
+               /* Make the whole region visible in the map */
+               map->map.virt = window->virt;
+               map->map.phys = window->phys;
+               cfi = map->map.fldrv_priv;
+               for(i = 0; i < cfi->numchips; i++)
+                       cfi->chips[i].start += offset;
+
+               /* Now that the mtd devices is complete claim and export it */
+               map->mtd->owner = THIS_MODULE;
+               if (add_mtd_device(map->mtd)) {
+                       map_destroy(map->mtd);
+                       map->mtd = NULL;
+                       goto out;
+               }
+
+
+               /* Calculate the new value of map_top */
+               map_top += map->mtd->size;
+
+               /* File away the map structure */
+               list_add(&map->list, &window->maps);
+               map = NULL;
+       }
+
+ out:
+       /* Free any left over map structures */
+       if (map)
+               kfree(map);
+
+       /* See if I have any map structures */
+       if (list_empty(&window->maps)) {
+               ck804xrom_cleanup(window);
+               return -ENODEV;
+       }
+       return 0;
+}
+
+
+static void __devexit ck804xrom_remove_one (struct pci_dev *pdev)
+{
+       struct ck804xrom_window *window = &ck804xrom_window;
+
+       ck804xrom_cleanup(window);
+}
+
+static struct pci_device_id ck804xrom_pci_tbl[] = {
+       { PCI_VENDOR_ID_NVIDIA, 0x0051,
+        PCI_ANY_ID, PCI_ANY_ID, }, /* nvidia ck804 */
+       { 0, }
+};
+
+MODULE_DEVICE_TABLE(pci, ck804xrom_pci_tbl);
+
+#if 0
+static struct pci_driver ck804xrom_driver = {
+       .name =         MOD_NAME,
+       .id_table =     ck804xrom_pci_tbl,
+       .probe =        ck804xrom_init_one,
+       .remove =       ck804xrom_remove_one,
+};
+#endif
+
+static int __init init_ck804xrom(void)
+{
+       struct pci_dev *pdev;
+       struct pci_device_id *id;
+       int retVal;
+       pdev = NULL;
+
+       for(id = ck804xrom_pci_tbl; id->vendor; id++) {
+               pdev = pci_find_device(id->vendor, id->device, NULL);
+               if (pdev)
+                       break;
+       }
+       if (pdev) {
+               retVal = ck804xrom_init_one(pdev, &ck804xrom_pci_tbl[0]);
+               pci_dev_put(pdev);
+               return retVal;
+       }
+       return -ENXIO;
+#if 0
+       return pci_module_init(&ck804xrom_driver);
+#endif
+}
+
+static void __exit cleanup_ck804xrom(void)
+{
+       ck804xrom_remove_one(ck804xrom_window.pdev);
+}
+
+module_init(init_ck804xrom);
+module_exit(cleanup_ck804xrom);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Eric Biederman <ebiederman@lnxi.com>, Dave Olsen <dolsen@lnxi.com>");
+MODULE_DESCRIPTION("MTD map driver for BIOS chips on the Nvidia ck804 southbridge");
+
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c
deleted file mode 100644 (file)
index df2c38e..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * $Id: cstm_mips_ixx.c,v 1.14 2005/11/07 11:14:26 gleixner Exp $
- *
- * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
- * Config with both CFI and JEDEC device support.
- *
- * Basically physmap.c with the addition of partitions and
- * an array of mapping info to accomodate more than one flash type per board.
- *
- * Copyright 2000 MontaVista Software Inc.
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  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 <linux/module.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <asm/io.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/partitions.h>
-#include <linux/delay.h>
-
-#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
-#define CC_GCR             0xB4013818
-#define CC_GPBCR           0xB401380A
-#define CC_GPBDR           0xB4013808
-#define CC_M68K_DEVICE     1
-#define CC_M68K_FUNCTION   6
-#define CC_CONFADDR        0xB8004000
-#define CC_CONFDATA        0xB8004004
-#define CC_FC_FCR          0xB8002004
-#define CC_FC_DCR          0xB8002008
-#define CC_GPACR           0xB4013802
-#define CC_GPAICR          0xB4013804
-#endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
-
-#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
-void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp)
-{
-       static DEFINE_SPINLOCK(vpp_lock);
-       static int vpp_count = 0;
-       unsigned long flags;
-
-       spin_lock_irqsave(&vpp_lock, flags);
-
-       if (vpp) {
-               if (!vpp_count++) {
-                       __u16   data;
-                       __u8    data1;
-                       static u8 first = 1;
-
-                       // Set GPIO port B pin3 to high
-                       data = *(__u16 *)(CC_GPBCR);
-                       data = (data & 0xff0f) | 0x0040;
-                       *(__u16 *)CC_GPBCR = data;
-                       *(__u8 *)CC_GPBDR = (*(__u8*)CC_GPBDR) | 0x08;
-                       if (first) {
-                               first = 0;
-                               /* need to have this delay for first
-                                  enabling vpp after powerup */
-                               udelay(40);
-                       }
-               }
-       } else {
-               if (!--vpp_count) {
-                       __u16   data;
-
-                       // Set GPIO port B pin3 to high
-                       data = *(__u16 *)(CC_GPBCR);
-                       data = (data & 0xff3f) | 0x0040;
-                       *(__u16 *)CC_GPBCR = data;
-                       *(__u8 *)CC_GPBDR = (*(__u8*)CC_GPBDR) & 0xf7;
-               }
-       }
-       spin_unlock_irqrestore(&vpp_lock, flags);
-}
-#endif
-
-/* board and partition description */
-
-#define MAX_PHYSMAP_PARTITIONS    8
-struct cstm_mips_ixx_info {
-       char *name;
-       unsigned long window_addr;
-       unsigned long window_size;
-       int bankwidth;
-       int num_partitions;
-};
-
-#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
-#define PHYSMAP_NUMBER  1  // number of board desc structs needed, one per contiguous flash type
-const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
-{
-    {   // 28F128J3A in 2x16 configuration
-        "big flash",     // name
-       0x08000000,      // window_addr
-       0x02000000,      // window_size
-        4,               // bankwidth
-       1,               // num_partitions
-    }
-
-};
-static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = {
-{   // 28F128J3A in 2x16 configuration
-       {
-               .name = "main partition ",
-               .size = 0x02000000, // 128 x 2 x 128k byte sectors
-               .offset = 0,
-       },
-},
-};
-#else /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
-#define PHYSMAP_NUMBER  1  // number of board desc structs needed, one per contiguous flash type
-const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] =
-{
-    {
-        "MTD flash",                   // name
-       CONFIG_MTD_CSTM_MIPS_IXX_START,      // window_addr
-       CONFIG_MTD_CSTM_MIPS_IXX_LEN,        // window_size
-        CONFIG_MTD_CSTM_MIPS_IXX_BUSWIDTH,   // bankwidth
-       1,                             // num_partitions
-    },
-
-};
-static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = {
-{
-       {
-               .name = "main partition",
-               .size =  CONFIG_MTD_CSTM_MIPS_IXX_LEN,
-               .offset = 0,
-       },
-},
-};
-#endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
-
-struct map_info cstm_mips_ixx_map[PHYSMAP_NUMBER];
-
-int __init init_cstm_mips_ixx(void)
-{
-       int i;
-       int jedec;
-        struct mtd_info *mymtd;
-        struct mtd_partition *parts;
-
-       /* Initialize mapping */
-       for (i=0;i<PHYSMAP_NUMBER;i++) {
-               printk(KERN_NOTICE "cstm_mips_ixx flash device: 0x%lx at 0x%lx\n",
-                      cstm_mips_ixx_board_desc[i].window_size, cstm_mips_ixx_board_desc[i].window_addr);
-
-
-               cstm_mips_ixx_map[i].phys = cstm_mips_ixx_board_desc[i].window_addr;
-               cstm_mips_ixx_map[i].virt = ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size);
-               if (!cstm_mips_ixx_map[i].virt) {
-                       int j = 0;
-                       printk(KERN_WARNING "Failed to ioremap\n");
-                       for (j = 0; j < i; j++) {
-                               if (cstm_mips_ixx_map[j].virt) {
-                                       iounmap(cstm_mips_ixx_map[j].virt);
-                                       cstm_mips_ixx_map[j].virt = NULL;
-                               }
-                       }
-                       return -EIO;
-               }
-               cstm_mips_ixx_map[i].name = cstm_mips_ixx_board_desc[i].name;
-               cstm_mips_ixx_map[i].size = cstm_mips_ixx_board_desc[i].window_size;
-               cstm_mips_ixx_map[i].bankwidth = cstm_mips_ixx_board_desc[i].bankwidth;
-#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
-                cstm_mips_ixx_map[i].set_vpp = cstm_mips_ixx_set_vpp;
-#endif
-               simple_map_init(&cstm_mips_ixx_map[i]);
-               //printk(KERN_NOTICE "cstm_mips_ixx: ioremap is %x\n",(unsigned int)(cstm_mips_ixx_map[i].virt));
-       }
-
-#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
-        setup_ITE_IVR_flash();
-#endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
-
-       for (i=0;i<PHYSMAP_NUMBER;i++) {
-                parts = &cstm_mips_ixx_partitions[i][0];
-               jedec = 0;
-               mymtd = (struct mtd_info *)do_map_probe("cfi_probe", &cstm_mips_ixx_map[i]);
-               //printk(KERN_NOTICE "phymap %d cfi_probe: mymtd is %x\n",i,(unsigned int)mymtd);
-               if (!mymtd) {
-                       jedec = 1;
-                       mymtd = (struct mtd_info *)do_map_probe("jedec", &cstm_mips_ixx_map[i]);
-                       printk(KERN_NOTICE "cstm_mips_ixx %d jedec: mymtd is %x\n",i,(unsigned int)mymtd);
-               }
-               if (mymtd) {
-                       mymtd->owner = THIS_MODULE;
-
-                       cstm_mips_ixx_map[i].map_priv_2 = (unsigned long)mymtd;
-                       add_mtd_partitions(mymtd, parts, cstm_mips_ixx_board_desc[i].num_partitions);
-               }
-               else {
-                       for (i = 0; i < PHYSMAP_NUMBER; i++) {
-                               if (cstm_mips_ixx_map[i].virt) {
-                                       iounmap(cstm_mips_ixx_map[i].virt);
-                                       cstm_mips_ixx_map[i].virt = NULL;
-                               }
-                       }
-                       return -ENXIO;
-               }
-       }
-       return 0;
-}
-
-static void __exit cleanup_cstm_mips_ixx(void)
-{
-       int i;
-        struct mtd_info *mymtd;
-
-       for (i=0;i<PHYSMAP_NUMBER;i++) {
-               mymtd = (struct mtd_info *)cstm_mips_ixx_map[i].map_priv_2;
-               if (mymtd) {
-                       del_mtd_partitions(mymtd);
-                       map_destroy(mymtd);
-               }
-               if (cstm_mips_ixx_map[i].virt) {
-                       iounmap((void *)cstm_mips_ixx_map[i].virt);
-                       cstm_mips_ixx_map[i].virt = 0;
-               }
-       }
-}
-#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
-void PCISetULongByOffset(__u32 DevNumber, __u32 FuncNumber, __u32 Offset, __u32 data)
-{
-       __u32   offset;
-
-       offset = ( unsigned long )( 0x80000000 | ( DevNumber << 11 ) + ( FuncNumber << 8 ) + Offset) ;
-
-       *(__u32 *)CC_CONFADDR = offset;
-       *(__u32 *)CC_CONFDATA = data;
-}
-void setup_ITE_IVR_flash()
-{
-               __u32   size, base;
-
-               size = 0x0e000000;              // 32MiB
-               base = (0x08000000) >> 8 >>1; // Bug: we must shift one more bit
-
-               /* need to set ITE flash to 32 bits instead of default 8 */
-#ifdef CONFIG_MIPS_IVR
-               *(__u32 *)CC_FC_FCR = 0x55;
-               *(__u32 *)CC_GPACR = 0xfffc;
-#else
-               *(__u32 *)CC_FC_FCR = 0x77;
-#endif
-               /* turn bursting off */
-               *(__u32 *)CC_FC_DCR = 0x0;
-
-               /* setup for one chip 4 byte PCI access */
-               PCISetULongByOffset(CC_M68K_DEVICE, CC_M68K_FUNCTION, 0x60, size | base);
-               PCISetULongByOffset(CC_M68K_DEVICE, CC_M68K_FUNCTION, 0x64, 0x02);
-}
-#endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */
-
-module_init(init_cstm_mips_ixx);
-module_exit(cleanup_cstm_mips_ixx);
-
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Alice Hennessy <ahennessy@mvista.com>");
-MODULE_DESCRIPTION("MTD map driver for ITE 8172G and Globespan IVR boards");
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c
new file mode 100644 (file)
index 0000000..a9d808a
--- /dev/null
@@ -0,0 +1,450 @@
+/*
+ * esb2rom.c
+ *
+ * Normal mappings of flash chips in physical memory
+ * through the Intel ESB2 Southbridge.
+ *
+ * This was derived from ichxrom.c in May 2006 by
+ *     Lew Glendenning <lglendenning@lnxi.com>
+ *
+ * Eric Biederman, of course, was a major help in this effort.
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/cfi.h>
+#include <linux/mtd/flashchip.h>
+#include <linux/pci.h>
+#include <linux/pci_ids.h>
+#include <linux/list.h>
+
+#define MOD_NAME KBUILD_BASENAME
+
+#define ADDRESS_NAME_LEN 18
+
+#define ROM_PROBE_STEP_SIZE (64*1024) /* 64KiB */
+
+#define BIOS_CNTL      0xDC
+#define BIOS_LOCK_ENABLE       0x02
+#define BIOS_WRITE_ENABLE      0x01
+
+/* This became a 16-bit register, and EN2 has disappeared */
+#define FWH_DEC_EN1    0xD8
+#define FWH_F8_EN      0x8000
+#define FWH_F0_EN      0x4000
+#define FWH_E8_EN      0x2000
+#define FWH_E0_EN      0x1000
+#define FWH_D8_EN      0x0800
+#define FWH_D0_EN      0x0400
+#define FWH_C8_EN      0x0200
+#define FWH_C0_EN      0x0100
+#define FWH_LEGACY_F_EN        0x0080
+#define FWH_LEGACY_E_EN        0x0040
+/* reserved  0x0020 and 0x0010 */
+#define FWH_70_EN      0x0008
+#define FWH_60_EN      0x0004
+#define FWH_50_EN      0x0002
+#define FWH_40_EN      0x0001
+
+/* these are 32-bit values */
+#define FWH_SEL1       0xD0
+#define FWH_SEL2       0xD4
+
+#define FWH_8MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN | FWH_C8_EN | FWH_C0_EN | \
+                        FWH_70_EN | FWH_60_EN | FWH_50_EN | FWH_40_EN)
+
+#define FWH_7MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN | FWH_C8_EN | FWH_C0_EN | \
+                        FWH_70_EN | FWH_60_EN | FWH_50_EN)
+
+#define FWH_6MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN | FWH_C8_EN | FWH_C0_EN | \
+                        FWH_70_EN | FWH_60_EN)
+
+#define FWH_5MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN | FWH_C8_EN | FWH_C0_EN | \
+                        FWH_70_EN)
+
+#define FWH_4MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN | FWH_C8_EN | FWH_C0_EN)
+
+#define FWH_3_5MiB     (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN | FWH_C8_EN)
+
+#define FWH_3MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN | FWH_D0_EN)
+
+#define FWH_2_5MiB     (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN | \
+                        FWH_D8_EN)
+
+#define FWH_2MiB       (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN | FWH_E0_EN)
+
+#define FWH_1_5MiB     (FWH_F8_EN | FWH_F0_EN | FWH_E8_EN)
+
+#define FWH_1MiB       (FWH_F8_EN | FWH_F0_EN)
+
+#define FWH_0_5MiB     (FWH_F8_EN)
+
+
+struct esb2rom_window {
+       void __iomem* virt;
+       unsigned long phys;
+       unsigned long size;
+       struct list_head maps;
+       struct resource rsrc;
+       struct pci_dev *pdev;
+};
+
+struct esb2rom_map_info {
+       struct list_head list;
+       struct map_info map;
+       struct mtd_info *mtd;
+       struct resource rsrc;
+       char map_name[sizeof(MOD_NAME) + 2 + ADDRESS_NAME_LEN];
+};
+
+static struct esb2rom_window esb2rom_window = {
+       .maps = LIST_HEAD_INIT(esb2rom_window.maps),
+};
+
+static void esb2rom_cleanup(struct esb2rom_window *window)
+{
+       struct esb2rom_map_info *map, *scratch;
+       u8 byte;
+
+       /* Disable writes through the rom window */
+       pci_read_config_byte(window->pdev, BIOS_CNTL, &byte);
+       pci_write_config_byte(window->pdev, BIOS_CNTL,
+               byte & ~BIOS_WRITE_ENABLE);
+
+       /* Free all of the mtd devices */
+       list_for_each_entry_safe(map, scratch, &window->maps, list) {
+               if (map->rsrc.parent)
+                       release_resource(&map->rsrc);
+               del_mtd_device(map->mtd);
+               map_destroy(map->mtd);
+               list_del(&map->list);
+               kfree(map);
+       }
+       if (window->rsrc.parent)
+               release_resource(&window->rsrc);
+       if (window->virt) {
+               iounmap(window->virt);
+               window->virt = NULL;
+               window->phys = 0;
+               window->size = 0;
+       }
+       pci_dev_put(window->pdev);
+}
+
+static int __devinit esb2rom_init_one(struct pci_dev *pdev,
+                               const struct pci_device_id *ent)
+{
+       static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
+       struct esb2rom_window *window = &esb2rom_window;
+       struct esb2rom_map_info *map = NULL;
+       unsigned long map_top;
+       u8 byte;
+       u16 word;
+
+       /* For now I just handle the ecb2 and I assume there
+        * are not a lot of resources up at the top of the address
+        * space.  It is possible to handle other devices in the
+        * top 16MiB but it is very painful.  Also since
+        * you can only really attach a FWH to an ICHX there
+        * a number of simplifications you can make.
+        *
+        * Also you can page firmware hubs if an 8MiB window isn't enough
+        * but don't currently handle that case either.
+        */
+       window->pdev = pci_dev_get(pdev);
+
+       /* RLG:  experiment 2.  Force the window registers to the widest values */
+
+/*
+       pci_read_config_word(pdev, FWH_DEC_EN1, &word);
+       printk(KERN_DEBUG "Original FWH_DEC_EN1 : %x\n", word);
+       pci_write_config_byte(pdev, FWH_DEC_EN1, 0xff);
+       pci_read_config_byte(pdev, FWH_DEC_EN1, &byte);
+       printk(KERN_DEBUG "New FWH_DEC_EN1 : %x\n", byte);
+
+       pci_read_config_byte(pdev, FWH_DEC_EN2, &byte);
+       printk(KERN_DEBUG "Original FWH_DEC_EN2 : %x\n", byte);
+       pci_write_config_byte(pdev, FWH_DEC_EN2, 0x0f);
+       pci_read_config_byte(pdev, FWH_DEC_EN2, &byte);
+       printk(KERN_DEBUG "New FWH_DEC_EN2 : %x\n", byte);
+*/
+
+       /* Find a region continuous to the end of the ROM window  */
+       window->phys = 0;
+       pci_read_config_word(pdev, FWH_DEC_EN1, &word);
+       printk(KERN_DEBUG "pci_read_config_byte : %x\n", word);
+
+       if ((word & FWH_8MiB) == FWH_8MiB)
+               window->phys = 0xff400000;
+       else if ((word & FWH_7MiB) == FWH_7MiB)
+               window->phys = 0xff500000;
+       else if ((word & FWH_6MiB) == FWH_6MiB)
+               window->phys = 0xff600000;
+       else if ((word & FWH_5MiB) == FWH_5MiB)
+               window->phys = 0xFF700000;
+       else if ((word & FWH_4MiB) == FWH_4MiB)
+               window->phys = 0xffc00000;
+       else if ((word & FWH_3_5MiB) == FWH_3_5MiB)
+               window->phys = 0xffc80000;
+       else if ((word & FWH_3MiB) == FWH_3MiB)
+               window->phys = 0xffd00000;
+       else if ((word & FWH_2_5MiB) == FWH_2_5MiB)
+               window->phys = 0xffd80000;
+       else if ((word & FWH_2MiB) == FWH_2MiB)
+               window->phys = 0xffe00000;
+       else if ((word & FWH_1_5MiB) == FWH_1_5MiB)
+               window->phys = 0xffe80000;
+       else if ((word & FWH_1MiB) == FWH_1MiB)
+               window->phys = 0xfff00000;
+       else if ((word & FWH_0_5MiB) == FWH_0_5MiB)
+               window->phys = 0xfff80000;
+
+       /* reserved  0x0020 and 0x0010 */
+       window->phys -= 0x400000UL;
+       window->size = (0xffffffffUL - window->phys) + 1UL;
+
+       /* Enable writes through the rom window */
+       pci_read_config_byte(pdev, BIOS_CNTL, &byte);
+       if (!(byte & BIOS_WRITE_ENABLE)  && (byte & (BIOS_LOCK_ENABLE))) {
+               /* The BIOS will generate an error if I enable
+                * this device, so don't even try.
+                */
+               printk(KERN_ERR MOD_NAME ": firmware access control, I can't enable writes\n");
+               goto out;
+       }
+       pci_write_config_byte(pdev, BIOS_CNTL, byte | BIOS_WRITE_ENABLE);
+
+       /*
+        * Try to reserve the window mem region.  If this fails then
+        * it is likely due to the window being "reseved" by the BIOS.
+        */
+       window->rsrc.name = MOD_NAME;
+       window->rsrc.start = window->phys;
+       window->rsrc.end   = window->phys + window->size - 1;
+       window->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+       if (request_resource(&iomem_resource, &window->rsrc)) {
+               window->rsrc.parent = NULL;
+               printk(KERN_DEBUG MOD_NAME
+                       ": %s(): Unable to register resource"
+                       " 0x%.08llx-0x%.08llx - kernel bug?\n",
+                       __func__,
+                       (unsigned long long)window->rsrc.start,
+                       (unsigned long long)window->rsrc.end);
+       }
+
+       /* Map the firmware hub into my address space. */
+       window->virt = ioremap_nocache(window->phys, window->size);
+       if (!window->virt) {
+               printk(KERN_ERR MOD_NAME ": ioremap(%08lx, %08lx) failed\n",
+                       window->phys, window->size);
+               goto out;
+       }
+
+       /* Get the first address to look for an rom chip at */
+       map_top = window->phys;
+       if ((window->phys & 0x3fffff) != 0) {
+               /* if not aligned on 4MiB, look 4MiB lower in address space */
+               map_top = window->phys + 0x400000;
+       }
+#if 1
+       /* The probe sequence run over the firmware hub lock
+        * registers sets them to 0x7 (no access).
+        * (Insane hardware design, but most copied Intel's.)
+        * ==> Probe at most the last 4M of the address space.
+        */
+       if (map_top < 0xffc00000)
+               map_top = 0xffc00000;
+#endif
+       /* Loop through and look for rom chips */
+       while ((map_top - 1) < 0xffffffffUL) {
+               struct cfi_private *cfi;
+               unsigned long offset;
+               int i;
+
+               if (!map)
+                       map = kmalloc(sizeof(*map), GFP_KERNEL);
+               if (!map) {
+                       printk(KERN_ERR MOD_NAME ": kmalloc failed");
+                       goto out;
+               }
+               memset(map, 0, sizeof(*map));
+               INIT_LIST_HEAD(&map->list);
+               map->map.name = map->map_name;
+               map->map.phys = map_top;
+               offset = map_top - window->phys;
+               map->map.virt = (void __iomem *)
+                       (((unsigned long)(window->virt)) + offset);
+               map->map.size = 0xffffffffUL - map_top + 1UL;
+               /* Set the name of the map to the address I am trying */
+               sprintf(map->map_name, "%s @%08lx",
+                       MOD_NAME, map->map.phys);
+
+               /* Firmware hubs only use vpp when being programmed
+                * in a factory setting.  So in-place programming
+                * needs to use a different method.
+                */
+               for(map->map.bankwidth = 32; map->map.bankwidth;
+                       map->map.bankwidth >>= 1) {
+                       char **probe_type;
+                       /* Skip bankwidths that are not supported */
+                       if (!map_bankwidth_supported(map->map.bankwidth))
+                               continue;
+
+                       /* Setup the map methods */
+                       simple_map_init(&map->map);
+
+                       /* Try all of the probe methods */
+                       probe_type = rom_probe_types;
+                       for(; *probe_type; probe_type++) {
+                               map->mtd = do_map_probe(*probe_type, &map->map);
+                               if (map->mtd)
+                                       goto found;
+                       }
+               }
+               map_top += ROM_PROBE_STEP_SIZE;
+               continue;
+       found:
+               /* Trim the size if we are larger than the map */
+               if (map->mtd->size > map->map.size) {
+                       printk(KERN_WARNING MOD_NAME
+                               " rom(%u) larger than window(%lu). fixing...\n",
+                               map->mtd->size, map->map.size);
+                       map->mtd->size = map->map.size;
+               }
+               if (window->rsrc.parent) {
+                       /*
+                        * Registering the MTD device in iomem may not be possible
+                        * if there is a BIOS "reserved" and BUSY range.  If this
+                        * fails then continue anyway.
+                        */
+                       map->rsrc.name  = map->map_name;
+                       map->rsrc.start = map->map.phys;
+                       map->rsrc.end   = map->map.phys + map->mtd->size - 1;
+                       map->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+                       if (request_resource(&window->rsrc, &map->rsrc)) {
+                               printk(KERN_ERR MOD_NAME
+                                       ": cannot reserve MTD resource\n");
+                               map->rsrc.parent = NULL;
+                       }
+               }
+
+               /* Make the whole region visible in the map */
+               map->map.virt = window->virt;
+               map->map.phys = window->phys;
+               cfi = map->map.fldrv_priv;
+               for(i = 0; i < cfi->numchips; i++)
+                       cfi->chips[i].start += offset;
+
+               /* Now that the mtd devices is complete claim and export it */
+               map->mtd->owner = THIS_MODULE;
+               if (add_mtd_device(map->mtd)) {
+                       map_destroy(map->mtd);
+                       map->mtd = NULL;
+                       goto out;
+               }
+
+               /* Calculate the new value of map_top */
+               map_top += map->mtd->size;
+
+               /* File away the map structure */
+               list_add(&map->list, &window->maps);
+               map = NULL;
+       }
+
+ out:
+       /* Free any left over map structures */
+       kfree(map);
+
+       /* See if I have any map structures */
+       if (list_empty(&window->maps)) {
+               esb2rom_cleanup(window);
+               return -ENODEV;
+       }
+       return 0;
+}
+
+static void __devexit esb2rom_remove_one (struct pci_dev *pdev)
+{
+       struct esb2rom_window *window = &esb2rom_window;
+       esb2rom_cleanup(window);
+}
+
+static struct pci_device_id esb2rom_pci_tbl[] __devinitdata = {
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
+         PCI_ANY_ID, PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
+         PCI_ANY_ID, PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,
+         PCI_ANY_ID, PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0,
+         PCI_ANY_ID, PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1,
+         PCI_ANY_ID, PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0,
+         PCI_ANY_ID, PCI_ANY_ID, },
+       { 0, },
+};
+
+#if 0
+MODULE_DEVICE_TABLE(pci, esb2rom_pci_tbl);
+
+static struct pci_driver esb2rom_driver = {
+       .name =         MOD_NAME,
+       .id_table =     esb2rom_pci_tbl,
+       .probe =        esb2rom_init_one,
+       .remove =       esb2rom_remove_one,
+};
+#endif
+
+static int __init init_esb2rom(void)
+{
+       struct pci_dev *pdev;
+       struct pci_device_id *id;
+       int retVal;
+
+       pdev = NULL;
+       for (id = esb2rom_pci_tbl; id->vendor; id++) {
+               printk(KERN_DEBUG "device id = %x\n", id->device);
+               pdev = pci_get_device(id->vendor, id->device, NULL);
+               if (pdev) {
+                       printk(KERN_DEBUG "matched device = %x\n", id->device);
+                       break;
+               }
+       }
+       if (pdev) {
+               printk(KERN_DEBUG "matched device id %x\n", id->device);
+               retVal = esb2rom_init_one(pdev, &esb2rom_pci_tbl[0]);
+               pci_dev_put(pdev);
+               printk(KERN_DEBUG "retVal = %d\n", retVal);
+               return retVal;
+       }
+       return -ENXIO;
+#if 0
+       return pci_register_driver(&esb2rom_driver);
+#endif
+}
+
+static void __exit cleanup_esb2rom(void)
+{
+       esb2rom_remove_one(esb2rom_window.pdev);
+}
+
+module_init(init_esb2rom);
+module_exit(cleanup_esb2rom);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Lew Glendenning <lglendenning@lnxi.com>");
+MODULE_DESCRIPTION("MTD map driver for BIOS chips on the ESB2 southbridge");
index c8db01b3e45f2d68f4a6612f47d67cd5c9153e6b..6946d802e6f67e1c03a577e01fa345d2b794715b 100644 (file)
@@ -75,14 +75,12 @@ static int armflash_probe(struct platform_device *dev)
        int err;
        void __iomem *base;
 
-       info = kmalloc(sizeof(struct armflash_info), GFP_KERNEL);
+       info = kzalloc(sizeof(struct armflash_info), GFP_KERNEL);
        if (!info) {
                err = -ENOMEM;
                goto out;
        }
 
-       memset(info, 0, sizeof(struct armflash_info));
-
        info->plat = plat;
        if (plat && plat->init) {
                err = plat->init();
index f9e8e5bcbc3354d659520e7e68c4b219c15dfa35..9f53c655af3a9e18f1d7c1e9d6a07fb4ade7a824 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/cfi.h>
 #include <linux/reboot.h>
+#include <linux/err.h>
 #include <linux/kdev_t.h>
 #include <linux/root_dev.h>
 #include <asm/io.h>
@@ -178,7 +179,7 @@ int nettel_eraseconfig(void)
 
        init_waitqueue_head(&wait_q);
        mtd = get_mtd_device(NULL, 2);
-       if (mtd) {
+       if (!IS_ERR(mtd)) {
                nettel_erase.mtd = mtd;
                nettel_erase.callback = nettel_erasecallback;
                nettel_erase.callback = NULL;
@@ -471,7 +472,7 @@ out_unmap2:
        iounmap(nettel_amd_map.virt);
 
        return(rc);
-               
+
 }
 
 /****************************************************************************/
index 6614e9721f9228b4138df80579530c8b63b4c607..a0a12af08aa034db80cf10cafb742d456bacb925 100644 (file)
@@ -80,12 +80,10 @@ static int __devinit omapflash_probe(struct platform_device *pdev)
        struct resource *res = pdev->resource;
        unsigned long size = res->end - res->start + 1;
 
-       info = kmalloc(sizeof(struct omapflash_info), GFP_KERNEL);
+       info = kzalloc(sizeof(struct omapflash_info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       memset(info, 0, sizeof(struct omapflash_info));
-
        if (!request_mem_region(res->start, size, "flash")) {
                err = -EBUSY;
                goto out_free_info;
index 995347b1beba5c1a90cfc4144b274da652164223..eaeb56a4070acadbe9633fddad14bc8b69a0f829 100644 (file)
@@ -735,11 +735,10 @@ static int pcmciamtd_probe(struct pcmcia_device *link)
        struct pcmciamtd_dev *dev;
 
        /* Create new memory card device */
-       dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev) return -ENOMEM;
        DEBUG(1, "dev=0x%p", dev);
 
-       memset(dev, 0, sizeof(*dev));
        dev->p_dev = link;
        link->priv = dev;
 
index d1717763f719778512e1229a42336773d00305d1..28c5ffd75233a27fd8dd40ba23cf739fe5710f69 100644 (file)
@@ -89,15 +89,14 @@ static int physmap_flash_probe(struct platform_device *dev)
                return -ENODEV;
 
                printk(KERN_NOTICE "physmap platform flash device: %.8llx at %.8llx\n",
-           (unsigned long long)dev->resource->end - dev->resource->start + 1,
+           (unsigned long long)(dev->resource->end - dev->resource->start + 1),
            (unsigned long long)dev->resource->start);
 
-       info = kmalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
+       info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
        if (info == NULL) {
                err = -ENOMEM;
                goto err_out;
        }
-       memset(info, 0, sizeof(*info));
 
        platform_set_drvdata(dev, info);
 
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
new file mode 100644 (file)
index 0000000..7efe744
--- /dev/null
@@ -0,0 +1,255 @@
+/*
+ * Normal mappings of chips in physical memory for OF devices
+ *
+ * Copyright (C) 2006 MontaVista Software Inc.
+ * Author: Vitaly Wool <vwool@ru.mvista.com>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <asm/io.h>
+#include <asm/prom.h>
+#include <asm/of_device.h>
+#include <asm/of_platform.h>
+
+struct physmap_flash_info {
+       struct mtd_info         *mtd;
+       struct map_info         map;
+       struct resource         *res;
+#ifdef CONFIG_MTD_PARTITIONS
+       int                     nr_parts;
+       struct mtd_partition    *parts;
+#endif
+};
+
+static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
+#ifdef CONFIG_MTD_PARTITIONS
+static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
+#endif
+
+#ifdef CONFIG_MTD_PARTITIONS
+static int parse_flash_partitions(struct device_node *node,
+               struct mtd_partition **parts)
+{
+       int i, plen, retval = -ENOMEM;
+       const  u32  *part;
+       const  char *name;
+
+       part = get_property(node, "partitions", &plen);
+       if (part == NULL)
+               goto err;
+
+       retval = plen / (2 * sizeof(u32));
+       *parts = kzalloc(retval * sizeof(struct mtd_partition), GFP_KERNEL);
+       if (*parts == NULL) {
+               printk(KERN_ERR "Can't allocate the flash partition data!\n");
+               goto err;
+       }
+
+       name = get_property(node, "partition-names", &plen);
+
+       for (i = 0; i < retval; i++) {
+               (*parts)[i].offset = *part++;
+               (*parts)[i].size   = *part & ~1;
+               if (*part++ & 1) /* bit 0 set signifies read only partition */
+                       (*parts)[i].mask_flags = MTD_WRITEABLE;
+
+               if (name != NULL && plen > 0) {
+                       int len = strlen(name) + 1;
+
+                       (*parts)[i].name = (char *)name;
+                       plen -= len;
+                       name += len;
+               } else
+                       (*parts)[i].name = "unnamed";
+       }
+err:
+       return retval;
+}
+#endif
+
+static int of_physmap_remove(struct of_device *dev)
+{
+       struct physmap_flash_info *info;
+
+       info = dev_get_drvdata(&dev->dev);
+       if (info == NULL)
+               return 0;
+       dev_set_drvdata(&dev->dev, NULL);
+
+       if (info->mtd != NULL) {
+#ifdef CONFIG_MTD_PARTITIONS
+               if (info->nr_parts) {
+                       del_mtd_partitions(info->mtd);
+                       kfree(info->parts);
+               } else {
+                       del_mtd_device(info->mtd);
+               }
+#else
+               del_mtd_device(info->mtd);
+#endif
+               map_destroy(info->mtd);
+       }
+
+       if (info->map.virt != NULL)
+               iounmap(info->map.virt);
+
+       if (info->res != NULL) {
+               release_resource(info->res);
+               kfree(info->res);
+       }
+
+       return 0;
+}
+
+static int __devinit of_physmap_probe(struct of_device *dev, const struct of_device_id *match)
+{
+       struct device_node *dp = dev->node;
+       struct resource res;
+       struct physmap_flash_info *info;
+       const char **probe_type;
+       const char *of_probe;
+       const u32 *width;
+       int err;
+
+
+       if (of_address_to_resource(dp, 0, &res)) {
+               dev_err(&dev->dev, "Can't get the flash mapping!\n");
+               err = -EINVAL;
+               goto err_out;
+       }
+
+               dev_dbg(&dev->dev, "physmap flash device: %.8llx at %.8llx\n",
+           (unsigned long long)res.end - res.start + 1,
+           (unsigned long long)res.start);
+
+       info = kzalloc(sizeof(struct physmap_flash_info), GFP_KERNEL);
+       if (info == NULL) {
+               err = -ENOMEM;
+               goto err_out;
+       }
+       memset(info, 0, sizeof(*info));
+
+       dev_set_drvdata(&dev->dev, info);
+
+       info->res = request_mem_region(res.start, res.end - res.start + 1,
+                       dev->dev.bus_id);
+       if (info->res == NULL) {
+               dev_err(&dev->dev, "Could not reserve memory region\n");
+               err = -ENOMEM;
+               goto err_out;
+       }
+
+       width = get_property(dp, "bank-width", NULL);
+       if (width == NULL) {
+               dev_err(&dev->dev, "Can't get the flash bank width!\n");
+               err = -EINVAL;
+               goto err_out;
+       }
+
+       info->map.name = dev->dev.bus_id;
+       info->map.phys = res.start;
+       info->map.size = res.end - res.start + 1;
+       info->map.bankwidth = *width;
+
+       info->map.virt = ioremap(info->map.phys, info->map.size);
+       if (info->map.virt == NULL) {
+               dev_err(&dev->dev, "Failed to ioremap flash region\n");
+               err = EIO;
+               goto err_out;
+       }
+
+       simple_map_init(&info->map);
+
+       of_probe = get_property(dp, "probe-type", NULL);
+       if (of_probe == NULL) {
+               probe_type = rom_probe_types;
+               for (; info->mtd == NULL && *probe_type != NULL; probe_type++)
+                       info->mtd = do_map_probe(*probe_type, &info->map);
+       } else if (!strcmp(of_probe, "CFI"))
+               info->mtd = do_map_probe("cfi_probe", &info->map);
+       else if (!strcmp(of_probe, "JEDEC"))
+               info->mtd = do_map_probe("jedec_probe", &info->map);
+       else {
+               if (strcmp(of_probe, "ROM"))
+                       dev_dbg(&dev->dev, "map_probe: don't know probe type "
+                       "'%s', mapping as rom\n");
+               info->mtd = do_map_probe("mtd_rom", &info->map);
+       }
+       if (info->mtd == NULL) {
+               dev_err(&dev->dev, "map_probe failed\n");
+               err = -ENXIO;
+               goto err_out;
+       }
+       info->mtd->owner = THIS_MODULE;
+
+#ifdef CONFIG_MTD_PARTITIONS
+       err = parse_mtd_partitions(info->mtd, part_probe_types, &info->parts, 0);
+       if (err > 0) {
+               add_mtd_partitions(info->mtd, info->parts, err);
+       } else if ((err = parse_flash_partitions(dp, &info->parts)) > 0) {
+               dev_info(&dev->dev, "Using OF partition information\n");
+               add_mtd_partitions(info->mtd, info->parts, err);
+               info->nr_parts = err;
+       } else
+#endif
+
+       add_mtd_device(info->mtd);
+       return 0;
+
+err_out:
+       of_physmap_remove(dev);
+       return err;
+
+       return 0;
+
+
+}
+
+static struct of_device_id of_physmap_match[] = {
+       {
+               .type           = "rom",
+               .compatible     = "direct-mapped"
+       },
+       { },
+};
+
+MODULE_DEVICE_TABLE(of, of_physmap_match);
+
+
+static struct of_platform_driver of_physmap_flash_driver = {
+       .name           = "physmap-flash",
+       .match_table    = of_physmap_match,
+       .probe          = of_physmap_probe,
+       .remove         = of_physmap_remove,
+};
+
+static int __init of_physmap_init(void)
+{
+       return of_register_platform_driver(&of_physmap_flash_driver);
+}
+
+static void __exit of_physmap_exit(void)
+{
+       of_unregister_platform_driver(&of_physmap_flash_driver);
+}
+
+module_init(of_physmap_init);
+module_exit(of_physmap_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>");
+MODULE_DESCRIPTION("Configurable MTD map driver for OF");
index 5d3c75451ca292afb002d6f817f5c7e6bc3c4569..2b6504ecbbd16a362331000f501ee5371f5ed862 100644 (file)
@@ -147,14 +147,13 @@ static int platram_probe(struct platform_device *pdev)
 
        pdata = pdev->dev.platform_data;
 
-       info = kmalloc(sizeof(*info), GFP_KERNEL);
+       info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (info == NULL) {
                dev_err(&pdev->dev, "no memory for flash info\n");
                err = -ENOMEM;
                goto exit_error;
        }
 
-       memset(info, 0, sizeof(*info));
        platform_set_drvdata(pdev, info);
 
        info->dev = &pdev->dev;
index 950bf1c578417f0d2ba3d5b035fd0adb8e5b99ac..f904e6bd02e05856f220bea1fe89afb0566b60c6 100644 (file)
@@ -273,14 +273,12 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
        /*
         * Allocate the map_info structs in one go.
         */
-       info = kmalloc(size, GFP_KERNEL);
+       info = kzalloc(size, GFP_KERNEL);
        if (!info) {
                ret = -ENOMEM;
                goto out;
        }
 
-       memset(info, 0, size);
-
        if (plat->init) {
                ret = plat->init();
                if (ret)
index 58e5912bd381463ea971cbb53c9b7d0f0719ace8..9adc970e55e6a871f225bcb2827024fda5bb1609 100644 (file)
@@ -132,20 +132,16 @@ static int __init init_tqm834x_mtd(void)
 
                pr_debug("%s: chip probing count %d\n", __FUNCTION__, idx);
 
-               map_banks[idx] =
-                       (struct map_info *)kmalloc(sizeof(struct map_info),
-                                                  GFP_KERNEL);
+               map_banks[idx] = kzalloc(sizeof(struct map_info), GFP_KERNEL);
                if (map_banks[idx] == NULL) {
                        ret = -ENOMEM;
                        goto error_mem;
                }
-               memset((void *)map_banks[idx], 0, sizeof(struct map_info));
-               map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL);
+               map_banks[idx]->name = kzalloc(16, GFP_KERNEL);
                if (map_banks[idx]->name == NULL) {
                        ret = -ENOMEM;
                        goto error_mem;
                }
-               memset((void *)map_banks[idx]->name, 0, 16);
 
                sprintf(map_banks[idx]->name, "TQM834x-%d", idx);
                map_banks[idx]->size = flash_size;
index 19578ba84ee8d934e0354fdb0adf80f61beaa8c0..37e4ded9b60033c2b8dce6005953d77687c3d41c 100644 (file)
@@ -134,14 +134,13 @@ int __init init_tqm_mtd(void)
 
                printk(KERN_INFO "%s: chip probing count %d\n", __FUNCTION__, idx);
 
-               map_banks[idx] = (struct map_info *)kmalloc(sizeof(struct map_info), GFP_KERNEL);
+               map_banks[idx] = kzalloc(sizeof(struct map_info), GFP_KERNEL);
                if(map_banks[idx] == NULL) {
                        ret = -ENOMEM;
                        /* FIXME: What if some MTD devices were probed already? */
                        goto error_mem;
                }
 
-               memset((void *)map_banks[idx], 0, sizeof(struct map_info));
                map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL);
 
                if (!map_banks[idx]->name) {
index 178b53b56be91380cbbf3e1f2d46c01bd60470c1..b879a66daa9e037964ff858f362e8b7cb062b207 100644 (file)
@@ -42,19 +42,20 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
        unsigned long block, nsect;
        char *buf;
 
-       block = req->sector;
-       nsect = req->current_nr_sectors;
+       block = req->sector << 9 >> tr->blkshift;
+       nsect = req->current_nr_sectors << 9 >> tr->blkshift;
+
        buf = req->buffer;
 
        if (!blk_fs_request(req))
                return 0;
 
-       if (block + nsect > get_capacity(req->rq_disk))
+       if (req->sector + req->current_nr_sectors > get_capacity(req->rq_disk))
                return 0;
 
        switch(rq_data_dir(req)) {
        case READ:
-               for (; nsect > 0; nsect--, block++, buf += 512)
+               for (; nsect > 0; nsect--, block++, buf += tr->blksize)
                        if (tr->readsect(dev, block, buf))
                                return 0;
                return 1;
@@ -63,7 +64,7 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
                if (!tr->writesect)
                        return 0;
 
-               for (; nsect > 0; nsect--, block++, buf += 512)
+               for (; nsect > 0; nsect--, block++, buf += tr->blksize)
                        if (tr->writesect(dev, block, buf))
                                return 0;
                return 1;
@@ -297,7 +298,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
 
        /* 2.5 has capacity in units of 512 bytes while still
           having BLOCK_SIZE_BITS set to 10. Just to keep us amused. */
-       set_capacity(gd, (new->size * new->blksize) >> 9);
+       set_capacity(gd, (new->size * tr->blksize) >> 9);
 
        gd->private_data = new;
        new->blkcore_priv = gd;
@@ -372,12 +373,10 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
        if (!blktrans_notifier.list.next)
                register_mtd_user(&blktrans_notifier);
 
-       tr->blkcore_priv = kmalloc(sizeof(*tr->blkcore_priv), GFP_KERNEL);
+       tr->blkcore_priv = kzalloc(sizeof(*tr->blkcore_priv), GFP_KERNEL);
        if (!tr->blkcore_priv)
                return -ENOMEM;
 
-       memset(tr->blkcore_priv, 0, sizeof(*tr->blkcore_priv));
-
        mutex_lock(&mtd_table_mutex);
 
        ret = register_blkdev(tr->major, tr->name);
@@ -401,6 +400,8 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
        }
 
        tr->blkcore_priv->rq->queuedata = tr;
+       blk_queue_hardsect_size(tr->blkcore_priv->rq, tr->blksize);
+       tr->blkshift = ffs(tr->blksize) - 1;
 
        ret = kernel_thread(mtd_blktrans_thread, tr, CLONE_KERNEL);
        if (ret < 0) {
index 04ed34694b147f4c691b046680d0d995186d496f..952da30b17452d829bc97b669b626a38d1836ab5 100644 (file)
@@ -278,11 +278,10 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
        }
 
        /* OK, it's not open. Create cache info for it */
-       mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
+       mtdblk = kzalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
        if (!mtdblk)
                return -ENOMEM;
 
-       memset(mtdblk, 0, sizeof(*mtdblk));
        mtdblk->count = 1;
        mtdblk->mtd = mtd;
 
@@ -339,16 +338,14 @@ static int mtdblock_flush(struct mtd_blktrans_dev *dev)
 
 static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 {
-       struct mtd_blktrans_dev *dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+       struct mtd_blktrans_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
 
        if (!dev)
                return;
 
-       memset(dev, 0, sizeof(*dev));
-
        dev->mtd = mtd;
        dev->devnum = mtd->index;
-       dev->blksize = 512;
+
        dev->size = mtd->size >> 9;
        dev->tr = tr;
 
@@ -368,6 +365,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
        .name           = "mtdblock",
        .major          = 31,
        .part_bits      = 0,
+       .blksize        = 512,
        .open           = mtdblock_open,
        .flush          = mtdblock_flush,
        .release        = mtdblock_release,
index 29563ed258a4788bf86eb03341b4fad0440ed2d0..f79dbb49b1a2601ae596283d75ca83564121d0d5 100644 (file)
@@ -33,16 +33,14 @@ static int mtdblock_writesect(struct mtd_blktrans_dev *dev,
 
 static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 {
-       struct mtd_blktrans_dev *dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+       struct mtd_blktrans_dev *dev = kzalloc(sizeof(*dev), GFP_KERNEL);
 
        if (!dev)
                return;
 
-       memset(dev, 0, sizeof(*dev));
-
        dev->mtd = mtd;
        dev->devnum = mtd->index;
-       dev->blksize = 512;
+
        dev->size = mtd->size >> 9;
        dev->tr = tr;
        dev->readonly = 1;
@@ -60,6 +58,7 @@ static struct mtd_blktrans_ops mtdblock_tr = {
        .name           = "mtdblock",
        .major          = 31,
        .part_bits      = 0,
+       .blksize        = 512,
        .readsect       = mtdblock_readsect,
        .writesect      = mtdblock_writesect,
        .add_mtd        = mtdblock_add_mtd,
index 5b6acfcb2b880be00cc77be7abafbf0c71b264da..3013d0883b97212eb4ff1ea80c655872ec8cef75 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/device.h>
 #include <linux/fs.h>
+#include <linux/err.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -100,8 +101,8 @@ static int mtd_open(struct inode *inode, struct file *file)
 
        mtd = get_mtd_device(NULL, devnum);
 
-       if (!mtd)
-               return -ENODEV;
+       if (IS_ERR(mtd))
+               return PTR_ERR(mtd);
 
        if (MTD_ABSENT == mtd->type) {
                put_mtd_device(mtd);
@@ -431,7 +432,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                if(!(file->f_mode & 2))
                        return -EPERM;
 
-               erase=kmalloc(sizeof(struct erase_info),GFP_KERNEL);
+               erase=kzalloc(sizeof(struct erase_info),GFP_KERNEL);
                if (!erase)
                        ret = -ENOMEM;
                else {
@@ -440,7 +441,6 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
 
                        init_waitqueue_head(&waitq);
 
-                       memset (erase,0,sizeof(struct erase_info));
                        if (copy_from_user(&erase->addr, argp,
                                    sizeof(struct erase_info_user))) {
                                kfree(erase);
@@ -499,13 +499,12 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                if (ret)
                        return ret;
 
-               ops.len = buf.length;
                ops.ooblen = buf.length;
                ops.ooboffs = buf.start & (mtd->oobsize - 1);
                ops.datbuf = NULL;
                ops.mode = MTD_OOB_PLACE;
 
-               if (ops.ooboffs && ops.len > (mtd->oobsize - ops.ooboffs))
+               if (ops.ooboffs && ops.ooblen > (mtd->oobsize - ops.ooboffs))
                        return -EINVAL;
 
                ops.oobbuf = kmalloc(buf.length, GFP_KERNEL);
@@ -520,7 +519,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                buf.start &= ~(mtd->oobsize - 1);
                ret = mtd->write_oob(mtd, buf.start, &ops);
 
-               if (copy_to_user(argp + sizeof(uint32_t), &ops.retlen,
+               if (copy_to_user(argp + sizeof(uint32_t), &ops.oobretlen,
                                 sizeof(uint32_t)))
                        ret = -EFAULT;
 
@@ -548,7 +547,6 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                if (ret)
                        return ret;
 
-               ops.len = buf.length;
                ops.ooblen = buf.length;
                ops.ooboffs = buf.start & (mtd->oobsize - 1);
                ops.datbuf = NULL;
@@ -564,10 +562,10 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                buf.start &= ~(mtd->oobsize - 1);
                ret = mtd->read_oob(mtd, buf.start, &ops);
 
-               if (put_user(ops.retlen, (uint32_t __user *)argp))
+               if (put_user(ops.oobretlen, (uint32_t __user *)argp))
                        ret = -EFAULT;
-               else if (ops.retlen && copy_to_user(buf.ptr, ops.oobbuf,
-                                                   ops.retlen))
+               else if (ops.oobretlen && copy_to_user(buf.ptr, ops.oobbuf,
+                                                   ops.oobretlen))
                        ret = -EFAULT;
 
                kfree(ops.oobbuf);
@@ -616,6 +614,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                memcpy(&oi.eccpos, mtd->ecclayout->eccpos, sizeof(oi.eccpos));
                memcpy(&oi.oobfree, mtd->ecclayout->oobfree,
                       sizeof(oi.oobfree));
+               oi.eccbytes = mtd->ecclayout->eccbytes;
 
                if (copy_to_user(argp, &oi, sizeof(struct nand_oobinfo)))
                        return -EFAULT;
@@ -715,7 +714,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
                if (!mtd->ecclayout)
                        return -EOPNOTSUPP;
 
-               if (copy_to_user(argp, &mtd->ecclayout,
+               if (copy_to_user(argp, mtd->ecclayout,
                                 sizeof(struct nand_ecclayout)))
                        return -EFAULT;
                break;
index 1fea631b58520aef095c356730709722f6b38248..06902683bc2a7c0a71541558b76aaad032e0c578 100644 (file)
@@ -247,7 +247,7 @@ concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
        struct mtd_oob_ops devops = *ops;
        int i, err, ret = 0;
 
-       ops->retlen = 0;
+       ops->retlen = ops->oobretlen = 0;
 
        for (i = 0; i < concat->num_subdev; i++) {
                struct mtd_info *subdev = concat->subdev[i];
@@ -263,6 +263,7 @@ concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
 
                err = subdev->read_oob(subdev, from, &devops);
                ops->retlen += devops.retlen;
+               ops->oobretlen += devops.oobretlen;
 
                /* Save information about bitflips! */
                if (unlikely(err)) {
@@ -278,14 +279,18 @@ concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
                                return err;
                }
 
-               devops.len = ops->len - ops->retlen;
-               if (!devops.len)
-                       return ret;
-
-               if (devops.datbuf)
+               if (devops.datbuf) {
+                       devops.len = ops->len - ops->retlen;
+                       if (!devops.len)
+                               return ret;
                        devops.datbuf += devops.retlen;
-               if (devops.oobbuf)
-                       devops.oobbuf += devops.ooblen;
+               }
+               if (devops.oobbuf) {
+                       devops.ooblen = ops->ooblen - ops->oobretlen;
+                       if (!devops.ooblen)
+                               return ret;
+                       devops.oobbuf += ops->oobretlen;
+               }
 
                from = 0;
        }
@@ -321,14 +326,18 @@ concat_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops)
                if (err)
                        return err;
 
-               devops.len = ops->len - ops->retlen;
-               if (!devops.len)
-                       return 0;
-
-               if (devops.datbuf)
+               if (devops.datbuf) {
+                       devops.len = ops->len - ops->retlen;
+                       if (!devops.len)
+                               return 0;
                        devops.datbuf += devops.retlen;
-               if (devops.oobbuf)
-                       devops.oobbuf += devops.ooblen;
+               }
+               if (devops.oobbuf) {
+                       devops.ooblen = ops->ooblen - ops->oobretlen;
+                       if (!devops.ooblen)
+                               return 0;
+                       devops.oobbuf += devops.oobretlen;
+               }
                to = 0;
        }
        return -EINVAL;
@@ -699,14 +708,13 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],     /* subdevices to c
 
        /* allocate the device structure */
        size = SIZEOF_STRUCT_MTD_CONCAT(num_devs);
-       concat = kmalloc(size, GFP_KERNEL);
+       concat = kzalloc(size, GFP_KERNEL);
        if (!concat) {
                printk
                    ("memory allocation error while creating concatenated device \"%s\"\n",
                     name);
                return NULL;
        }
-       memset(concat, 0, size);
        concat->subdev = (struct mtd_info **) (concat + 1);
 
        /*
@@ -764,6 +772,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[],       /* subdevices to c
                concat->mtd.ecc_stats.badblocks +=
                        subdev[i]->ecc_stats.badblocks;
                if (concat->mtd.writesize   !=  subdev[i]->writesize ||
+                   concat->mtd.subpage_sft != subdev[i]->subpage_sft ||
                    concat->mtd.oobsize    !=  subdev[i]->oobsize ||
                    concat->mtd.ecctype    !=  subdev[i]->ecctype ||
                    concat->mtd.eccsize    !=  subdev[i]->eccsize ||
index c4d26de74349e55f9ae32269ff780b0dde50e767..7070110aba2a62fb9650a6c14c2e49e38f98ea37 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/timer.h>
 #include <linux/major.h>
 #include <linux/fs.h>
+#include <linux/err.h>
 #include <linux/ioctl.h>
 #include <linux/init.h>
 #include <linux/mtd/compatmac.h>
@@ -192,14 +193,14 @@ int unregister_mtd_user (struct mtd_notifier *old)
  *     Given a number and NULL address, return the num'th entry in the device
  *     table, if any.  Given an address and num == -1, search the device table
  *     for a device with that address and return if it's still present. Given
- *     both, return the num'th driver only if its address matches. Return NULL
- *     if not.
+ *     both, return the num'th driver only if its address matches. Return
+ *     error code if not.
  */
 
 struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num)
 {
        struct mtd_info *ret = NULL;
-       int i;
+       int i, err = -ENODEV;
 
        mutex_lock(&mtd_table_mutex);
 
@@ -213,14 +214,73 @@ struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num)
                        ret = NULL;
        }
 
-       if (ret && !try_module_get(ret->owner))
-               ret = NULL;
+       if (!ret)
+               goto out_unlock;
+
+       if (!try_module_get(ret->owner))
+               goto out_unlock;
 
-       if (ret)
-               ret->usecount++;
+       if (ret->get_device) {
+               err = ret->get_device(ret);
+               if (err)
+                       goto out_put;
+       }
 
+       ret->usecount++;
        mutex_unlock(&mtd_table_mutex);
        return ret;
+
+out_put:
+       module_put(ret->owner);
+out_unlock:
+       mutex_unlock(&mtd_table_mutex);
+       return ERR_PTR(err);
+}
+
+/**
+ *     get_mtd_device_nm - obtain a validated handle for an MTD device by
+ *     device name
+ *     @name: MTD device name to open
+ *
+ *     This function returns MTD device description structure in case of
+ *     success and an error code in case of failure.
+ */
+
+struct mtd_info *get_mtd_device_nm(const char *name)
+{
+       int i, err = -ENODEV;
+       struct mtd_info *mtd = NULL;
+
+       mutex_lock(&mtd_table_mutex);
+
+       for (i = 0; i < MAX_MTD_DEVICES; i++) {
+               if (mtd_table[i] && !strcmp(name, mtd_table[i]->name)) {
+                       mtd = mtd_table[i];
+                       break;
+               }
+       }
+
+       if (!mtd)
+               goto out_unlock;
+
+       if (!try_module_get(mtd->owner))
+               goto out_unlock;
+
+       if (mtd->get_device) {
+               err = mtd->get_device(mtd);
+               if (err)
+                       goto out_put;
+       }
+
+       mtd->usecount++;
+       mutex_unlock(&mtd_table_mutex);
+       return mtd;
+
+out_put:
+       module_put(mtd->owner);
+out_unlock:
+       mutex_unlock(&mtd_table_mutex);
+       return ERR_PTR(err);
 }
 
 void put_mtd_device(struct mtd_info *mtd)
@@ -229,6 +289,8 @@ void put_mtd_device(struct mtd_info *mtd)
 
        mutex_lock(&mtd_table_mutex);
        c = --mtd->usecount;
+       if (mtd->put_device)
+               mtd->put_device(mtd);
        mutex_unlock(&mtd_table_mutex);
        BUG_ON(c < 0);
 
@@ -236,7 +298,7 @@ void put_mtd_device(struct mtd_info *mtd)
 }
 
 /* default_mtd_writev - default mtd writev method for MTD devices that
- *                     dont implement their own
+ *                     don't implement their own
  */
 
 int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
@@ -264,13 +326,14 @@ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
        return ret;
 }
 
-EXPORT_SYMBOL(add_mtd_device);
-EXPORT_SYMBOL(del_mtd_device);
-EXPORT_SYMBOL(get_mtd_device);
-EXPORT_SYMBOL(put_mtd_device);
-EXPORT_SYMBOL(register_mtd_user);
-EXPORT_SYMBOL(unregister_mtd_user);
-EXPORT_SYMBOL(default_mtd_writev);
+EXPORT_SYMBOL_GPL(add_mtd_device);
+EXPORT_SYMBOL_GPL(del_mtd_device);
+EXPORT_SYMBOL_GPL(get_mtd_device);
+EXPORT_SYMBOL_GPL(get_mtd_device_nm);
+EXPORT_SYMBOL_GPL(put_mtd_device);
+EXPORT_SYMBOL_GPL(register_mtd_user);
+EXPORT_SYMBOL_GPL(unregister_mtd_user);
+EXPORT_SYMBOL_GPL(default_mtd_writev);
 
 #ifdef CONFIG_PROC_FS
 
index 06a930372b7a5eb174d03872763612ecc0753adb..bafd2fba87bde0f2b6f82bed155e751cbe408c12 100644 (file)
@@ -94,7 +94,7 @@ static int part_read_oob(struct mtd_info *mtd, loff_t from,
 
        if (from >= mtd->size)
                return -EINVAL;
-       if (from + ops->len > mtd->size)
+       if (ops->datbuf && from + ops->len > mtd->size)
                return -EINVAL;
        res = part->master->read_oob(part->master, from + part->offset, ops);
 
@@ -161,7 +161,7 @@ static int part_write_oob(struct mtd_info *mtd, loff_t to,
 
        if (to >= mtd->size)
                return -EINVAL;
-       if (to + ops->len > mtd->size)
+       if (ops->datbuf && to + ops->len > mtd->size)
                return -EINVAL;
        return part->master->write_oob(part->master, to + part->offset, ops);
 }
@@ -323,14 +323,13 @@ int add_mtd_partitions(struct mtd_info *master,
        for (i = 0; i < nbparts; i++) {
 
                /* allocate the partition structure */
-               slave = kmalloc (sizeof(*slave), GFP_KERNEL);
+               slave = kzalloc (sizeof(*slave), GFP_KERNEL);
                if (!slave) {
                        printk ("memory allocation error while creating partitions for \"%s\"\n",
                                master->name);
                        del_mtd_partitions(master);
                        return -ENOMEM;
                }
-               memset(slave, 0, sizeof(*slave));
                list_add(&slave->list, &mtd_partitions);
 
                /* set up the MTD object for this partition */
@@ -341,6 +340,7 @@ int add_mtd_partitions(struct mtd_info *master,
                slave->mtd.oobsize = master->oobsize;
                slave->mtd.ecctype = master->ecctype;
                slave->mtd.eccsize = master->eccsize;
+               slave->mtd.subpage_sft = master->subpage_sft;
 
                slave->mtd.name = parts[i].name;
                slave->mtd.bank_size = master->bank_size;
index accea2f73af2c932825b40453a724ef03cf53960..dac231acacbd08c098913ce16cf7100dd3078c78 100644 (file)
@@ -103,6 +103,7 @@ config MTD_NAND_RTC_FROM4
        depends on MTD_NAND && SH_SOLUTION_ENGINE
        select REED_SOLOMON
        select REED_SOLOMON_DEC8
+       select BITREVERSE
        help
          This enables the driver for the Renesas Technology AG-AND
          flash interface board (FROM_BOARD4)
@@ -145,6 +146,7 @@ config MTD_NAND_S3C2410_HWECC
 config MTD_NAND_NDFC
        tristate "NDFC NanD Flash Controller"
        depends on MTD_NAND && 44x
+       select MTD_NAND_ECC_SMC
        help
         NDFC Nand Flash Controllers are integrated in EP44x SoCs
 
@@ -232,6 +234,13 @@ config MTD_NAND_SHARPSL
        tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
        depends on MTD_NAND && ARCH_PXA
 
+config MTD_NAND_CAFE
+       tristate "NAND support for OLPC CAFÉ chip"
+       depends on PCI
+       help
+        Use NAND flash attached to the CAFÉ chip designed for the $100
+        laptop.
+
 config MTD_NAND_CS553X
        tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
        depends on MTD_NAND && X86_32 && (X86_PC || X86_GENERICARCH)
@@ -245,6 +254,13 @@ config MTD_NAND_CS553X
 
          If you say "m", the module will be called "cs553x_nand.ko".
 
+config MTD_NAND_AT91
+       bool "Support for NAND Flash / SmartMedia on AT91"
+       depends on MTD_NAND && ARCH_AT91
+       help
+         Enables support for NAND Flash / Smart Media Card interface
+         on Atmel AT91 processors.
+
 config MTD_NAND_NANDSIM
        tristate "Support for NAND Flash Simulator"
        depends on MTD_NAND && MTD_PARTITIONS
index e7cf382297a8a4bfe9d48380a64130bfa62fa30e..69da27e2285e107aab70b90915c43f5a03de027e 100644 (file)
@@ -6,6 +6,7 @@
 obj-$(CONFIG_MTD_NAND)                 += nand.o nand_ecc.o
 obj-$(CONFIG_MTD_NAND_IDS)             += nand_ids.o
 
+obj-$(CONFIG_MTD_NAND_CAFE)            += cafe_nand.o
 obj-$(CONFIG_MTD_NAND_SPIA)            += spia.o
 obj-$(CONFIG_MTD_NAND_AMS_DELTA)       += ams-delta.o
 obj-$(CONFIG_MTD_NAND_TOTO)            += toto.o
@@ -24,5 +25,7 @@ obj-$(CONFIG_MTD_NAND_CS553X)         += cs553x_nand.o
 obj-$(CONFIG_MTD_NAND_NDFC)            += ndfc.o
 obj-$(CONFIG_MTD_NAND_OMAP)            += omap-nand-flash.o
 obj-$(CONFIG_MTD_NAND_OMAP_HW)         += omap-hw.o
+obj-$(CONFIG_MTD_NAND_AT91)            += at91_nand.o
 
-nand-objs = nand_base.o nand_bbt.o
+nand-objs := nand_base.o nand_bbt.o
+cafe_nand-objs := cafe.o cafe_ecc.o
diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c
new file mode 100644 (file)
index 0000000..14b80cc
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+ * drivers/mtd/nand/at91_nand.c
+ *
+ *  Copyright (C) 2003 Rick Bronson
+ *
+ *  Derived from drivers/mtd/nand/autcpu12.c
+ *      Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de)
+ *
+ *  Derived from drivers/mtd/spia.c
+ *      Copyright (C) 2000 Steven J. Hill (sjhill@cotw.com)
+ *
+ * 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 <linux/slab.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/io.h>
+#include <asm/sizes.h>
+
+#include <asm/hardware.h>
+#include <asm/arch/board.h>
+#include <asm/arch/gpio.h>
+
+struct at91_nand_host {
+       struct nand_chip        nand_chip;
+       struct mtd_info         mtd;
+       void __iomem            *io_base;
+       struct at91_nand_data   *board;
+};
+
+/*
+ * Hardware specific access to control-lines
+ */
+static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+{
+       struct nand_chip *nand_chip = mtd->priv;
+       struct at91_nand_host *host = nand_chip->priv;
+
+       if (cmd == NAND_CMD_NONE)
+               return;
+
+       if (ctrl & NAND_CLE)
+               writeb(cmd, host->io_base + (1 << host->board->cle));
+       else
+               writeb(cmd, host->io_base + (1 << host->board->ale));
+}
+
+/*
+ * Read the Device Ready pin.
+ */
+static int at91_nand_device_ready(struct mtd_info *mtd)
+{
+       struct nand_chip *nand_chip = mtd->priv;
+       struct at91_nand_host *host = nand_chip->priv;
+
+       return at91_get_gpio_value(host->board->rdy_pin);
+}
+
+/*
+ * Enable NAND.
+ */
+static void at91_nand_enable(struct at91_nand_host *host)
+{
+       if (host->board->enable_pin)
+               at91_set_gpio_value(host->board->enable_pin, 0);
+}
+
+/*
+ * Disable NAND.
+ */
+static void at91_nand_disable(struct at91_nand_host *host)
+{
+       if (host->board->enable_pin)
+               at91_set_gpio_value(host->board->enable_pin, 1);
+}
+
+/*
+ * Probe for the NAND device.
+ */
+static int __init at91_nand_probe(struct platform_device *pdev)
+{
+       struct at91_nand_host *host;
+       struct mtd_info *mtd;
+       struct nand_chip *nand_chip;
+       int res;
+
+#ifdef CONFIG_MTD_PARTITIONS
+       struct mtd_partition *partitions = NULL;
+       int num_partitions = 0;
+#endif
+
+       /* Allocate memory for the device structure (and zero it) */
+       host = kzalloc(sizeof(struct at91_nand_host), GFP_KERNEL);
+       if (!host) {
+               printk(KERN_ERR "at91_nand: failed to allocate device structure.\n");
+               return -ENOMEM;
+       }
+
+       host->io_base = ioremap(pdev->resource[0].start,
+                               pdev->resource[0].end - pdev->resource[0].start + 1);
+       if (host->io_base == NULL) {
+               printk(KERN_ERR "at91_nand: ioremap failed\n");
+               kfree(host);
+               return -EIO;
+       }
+
+       mtd = &host->mtd;
+       nand_chip = &host->nand_chip;
+       host->board = pdev->dev.platform_data;
+
+       nand_chip->priv = host;         /* link the private data structures */
+       mtd->priv = nand_chip;
+       mtd->owner = THIS_MODULE;
+
+       /* Set address of NAND IO lines */
+       nand_chip->IO_ADDR_R = host->io_base;
+       nand_chip->IO_ADDR_W = host->io_base;
+       nand_chip->cmd_ctrl = at91_nand_cmd_ctrl;
+       nand_chip->dev_ready = at91_nand_device_ready;
+       nand_chip->ecc.mode = NAND_ECC_SOFT;    /* enable ECC */
+       nand_chip->chip_delay = 20;             /* 20us command delay time */
+
+       if (host->board->bus_width_16)          /* 16-bit bus width */
+               nand_chip->options |= NAND_BUSWIDTH_16;
+
+       platform_set_drvdata(pdev, host);
+       at91_nand_enable(host);
+
+       if (host->board->det_pin) {
+               if (at91_get_gpio_value(host->board->det_pin)) {
+                       printk ("No SmartMedia card inserted.\n");
+                       res = ENXIO;
+                       goto out;
+               }
+       }
+
+       /* Scan to find existance of the device */
+       if (nand_scan(mtd, 1)) {
+               res = -ENXIO;
+               goto out;
+       }
+
+#ifdef CONFIG_MTD_PARTITIONS
+       if (host->board->partition_info)
+               partitions = host->board->partition_info(mtd->size, &num_partitions);
+
+       if ((!partitions) || (num_partitions == 0)) {
+               printk(KERN_ERR "at91_nand: No parititions defined, or unsupported device.\n");
+               res = ENXIO;
+               goto release;
+       }
+
+       res = add_mtd_partitions(mtd, partitions, num_partitions);
+#else
+       res = add_mtd_device(mtd);
+#endif
+
+       if (!res)
+               return res;
+
+release:
+       nand_release(mtd);
+out:
+       at91_nand_disable(host);
+       platform_set_drvdata(pdev, NULL);
+       iounmap(host->io_base);
+       kfree(host);
+       return res;
+}
+
+/*
+ * Remove a NAND device.
+ */
+static int __devexit at91_nand_remove(struct platform_device *pdev)
+{
+       struct at91_nand_host *host = platform_get_drvdata(pdev);
+       struct mtd_info *mtd = &host->mtd;
+
+       nand_release(mtd);
+
+       at91_nand_disable(host);
+
+       iounmap(host->io_base);
+       kfree(host);
+
+       return 0;
+}
+
+static struct platform_driver at91_nand_driver = {
+       .probe          = at91_nand_probe,
+       .remove         = at91_nand_remove,
+       .driver         = {
+               .name   = "at91_nand",
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int __init at91_nand_init(void)
+{
+       return platform_driver_register(&at91_nand_driver);
+}
+
+
+static void __exit at91_nand_exit(void)
+{
+       platform_driver_unregister(&at91_nand_driver);
+}
+
+
+module_init(at91_nand_init);
+module_exit(at91_nand_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Rick Bronson");
+MODULE_DESCRIPTION("NAND/SmartMedia driver for AT91RM9200");
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
new file mode 100644 (file)
index 0000000..b8d9b64
--- /dev/null
@@ -0,0 +1,770 @@
+/*
+ * Driver for One Laptop Per Child â€˜CAFÉ’ controller, aka Marvell 88ALP01
+ *
+ * Copyright Â© 2006 Red Hat, Inc.
+ * Copyright Â© 2006 David Woodhouse <dwmw2@infradead.org>
+ */
+
+#define DEBUG
+
+#include <linux/device.h>
+#undef DEBUG
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <asm/io.h>
+
+#define CAFE_NAND_CTRL1                0x00
+#define CAFE_NAND_CTRL2                0x04
+#define CAFE_NAND_CTRL3                0x08
+#define CAFE_NAND_STATUS       0x0c
+#define CAFE_NAND_IRQ          0x10
+#define CAFE_NAND_IRQ_MASK     0x14
+#define CAFE_NAND_DATA_LEN     0x18
+#define CAFE_NAND_ADDR1                0x1c
+#define CAFE_NAND_ADDR2                0x20
+#define CAFE_NAND_TIMING1      0x24
+#define CAFE_NAND_TIMING2      0x28
+#define CAFE_NAND_TIMING3      0x2c
+#define CAFE_NAND_NONMEM       0x30
+#define CAFE_NAND_ECC_RESULT   0x3C
+#define CAFE_NAND_DMA_CTRL     0x40
+#define CAFE_NAND_DMA_ADDR0    0x44
+#define CAFE_NAND_DMA_ADDR1    0x48
+#define CAFE_NAND_ECC_SYN01    0x50
+#define CAFE_NAND_ECC_SYN23    0x54
+#define CAFE_NAND_ECC_SYN45    0x58
+#define CAFE_NAND_ECC_SYN67    0x5c
+#define CAFE_NAND_READ_DATA    0x1000
+#define CAFE_NAND_WRITE_DATA   0x2000
+
+#define CAFE_GLOBAL_CTRL       0x3004
+#define CAFE_GLOBAL_IRQ                0x3008
+#define CAFE_GLOBAL_IRQ_MASK   0x300c
+#define CAFE_NAND_RESET                0x3034
+
+int cafe_correct_ecc(unsigned char *buf,
+                    unsigned short *chk_syndrome_list);
+
+struct cafe_priv {
+       struct nand_chip nand;
+       struct pci_dev *pdev;
+       void __iomem *mmio;
+       uint32_t ctl1;
+       uint32_t ctl2;
+       int datalen;
+       int nr_data;
+       int data_pos;
+       int page_addr;
+       dma_addr_t dmaaddr;
+       unsigned char *dmabuf;
+};
+
+static int usedma = 1;
+module_param(usedma, int, 0644);
+
+static int skipbbt = 0;
+module_param(skipbbt, int, 0644);
+
+static int debug = 0;
+module_param(debug, int, 0644);
+
+static int regdebug = 0;
+module_param(regdebug, int, 0644);
+
+static int checkecc = 1;
+module_param(checkecc, int, 0644);
+
+static int slowtiming = 0;
+module_param(slowtiming, int, 0644);
+
+/* Hrm. Why isn't this already conditional on something in the struct device? */
+#define cafe_dev_dbg(dev, args...) do { if (debug) dev_dbg(dev, ##args); } while(0)
+
+/* Make it easier to switch to PIO if we need to */
+#define cafe_readl(cafe, addr)                 readl((cafe)->mmio + CAFE_##addr)
+#define cafe_writel(cafe, datum, addr)         writel(datum, (cafe)->mmio + CAFE_##addr)
+
+static int cafe_device_ready(struct mtd_info *mtd)
+{
+       struct cafe_priv *cafe = mtd->priv;
+       int result = !!(cafe_readl(cafe, NAND_STATUS) | 0x40000000);
+       uint32_t irqs = cafe_readl(cafe, NAND_IRQ);
+
+       cafe_writel(cafe, irqs, NAND_IRQ);
+
+       cafe_dev_dbg(&cafe->pdev->dev, "NAND device is%s ready, IRQ %x (%x) (%x,%x)\n",
+               result?"":" not", irqs, cafe_readl(cafe, NAND_IRQ),
+               cafe_readl(cafe, GLOBAL_IRQ), cafe_readl(cafe, GLOBAL_IRQ_MASK));
+
+       return result;
+}
+
+
+static void cafe_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
+{
+       struct cafe_priv *cafe = mtd->priv;
+
+       if (usedma)
+               memcpy(cafe->dmabuf + cafe->datalen, buf, len);
+       else
+               memcpy_toio(cafe->mmio + CAFE_NAND_WRITE_DATA + cafe->datalen, buf, len);
+
+       cafe->datalen += len;
+
+       cafe_dev_dbg(&cafe->pdev->dev, "Copy 0x%x bytes to write buffer. datalen 0x%x\n",
+               len, cafe->datalen);
+}
+
+static void cafe_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
+{
+       struct cafe_priv *cafe = mtd->priv;
+
+       if (usedma)
+               memcpy(buf, cafe->dmabuf + cafe->datalen, len);
+       else
+               memcpy_fromio(buf, cafe->mmio + CAFE_NAND_READ_DATA + cafe->datalen, len);
+
+       cafe_dev_dbg(&cafe->pdev->dev, "Copy 0x%x bytes from position 0x%x in read buffer.\n",
+                 len, cafe->datalen);
+       cafe->datalen += len;
+}
+
+static uint8_t cafe_read_byte(struct mtd_info *mtd)
+{
+       struct cafe_priv *cafe = mtd->priv;
+       uint8_t d;
+
+       cafe_read_buf(mtd, &d, 1);
+       cafe_dev_dbg(&cafe->pdev->dev, "Read %02x\n", d);
+
+       return d;
+}
+
+static void cafe_nand_cmdfunc(struct mtd_info *mtd, unsigned command,
+                             int column, int page_addr)
+{
+       struct cafe_priv *cafe = mtd->priv;
+       int adrbytes = 0;
+       uint32_t ctl1;
+       uint32_t doneint = 0x80000000;
+
+       cafe_dev_dbg(&cafe->pdev->dev, "cmdfunc %02x, 0x%x, 0x%x\n",
+               command, column, page_addr);
+
+       if (command == NAND_CMD_ERASE2 || command == NAND_CMD_PAGEPROG) {
+               /* Second half of a command we already calculated */
+               cafe_writel(cafe, cafe->ctl2 | 0x100 | command, NAND_CTRL2);
+               ctl1 = cafe->ctl1;
+               cafe->ctl2 &= ~(1<<30);
+               cafe_dev_dbg(&cafe->pdev->dev, "Continue command, ctl1 %08x, #data %d\n",
+                         cafe->ctl1, cafe->nr_data);
+               goto do_command;
+       }
+       /* Reset ECC engine */
+       cafe_writel(cafe, 0, NAND_CTRL2);
+
+       /* Emulate NAND_CMD_READOOB on large-page chips */
+       if (mtd->writesize > 512 &&
+           command == NAND_CMD_READOOB) {
+               column += mtd->writesize;
+               command = NAND_CMD_READ0;
+       }
+
+       /* FIXME: Do we need to send read command before sending data
+          for small-page chips, to position the buffer correctly? */
+
+       if (column != -1) {
+               cafe_writel(cafe, column, NAND_ADDR1);
+               adrbytes = 2;
+               if (page_addr != -1)
+                       goto write_adr2;
+       } else if (page_addr != -1) {
+               cafe_writel(cafe, page_addr & 0xffff, NAND_ADDR1);
+               page_addr >>= 16;
+       write_adr2:
+               cafe_writel(cafe, page_addr, NAND_ADDR2);
+               adrbytes += 2;
+               if (mtd->size > mtd->writesize << 16)
+                       adrbytes++;
+       }
+
+       cafe->data_pos = cafe->datalen = 0;
+
+       /* Set command valid bit */
+       ctl1 = 0x80000000 | command;
+
+       /* Set RD or WR bits as appropriate */
+       if (command == NAND_CMD_READID || command == NAND_CMD_STATUS) {
+               ctl1 |= (1<<26); /* rd */
+               /* Always 5 bytes, for now */
+               cafe->datalen = 4;
+               /* And one address cycle -- even for STATUS, since the controller doesn't work without */
+               adrbytes = 1;
+       } else if (command == NAND_CMD_READ0 || command == NAND_CMD_READ1 ||
+                  command == NAND_CMD_READOOB || command == NAND_CMD_RNDOUT) {
+               ctl1 |= 1<<26; /* rd */
+               /* For now, assume just read to end of page */
+               cafe->datalen = mtd->writesize + mtd->oobsize - column;
+       } else if (command == NAND_CMD_SEQIN)
+               ctl1 |= 1<<25; /* wr */
+
+       /* Set number of address bytes */
+       if (adrbytes)
+               ctl1 |= ((adrbytes-1)|8) << 27;
+
+       if (command == NAND_CMD_SEQIN || command == NAND_CMD_ERASE1) {
+               /* Ignore the first command of a pair; the hardware
+                  deals with them both at once, later */
+               cafe->ctl1 = ctl1;
+               cafe_dev_dbg(&cafe->pdev->dev, "Setup for delayed command, ctl1 %08x, dlen %x\n",
+                         cafe->ctl1, cafe->datalen);
+               return;
+       }
+       /* RNDOUT and READ0 commands need a following byte */
+       if (command == NAND_CMD_RNDOUT)
+               cafe_writel(cafe, cafe->ctl2 | 0x100 | NAND_CMD_RNDOUTSTART, NAND_CTRL2);
+       else if (command == NAND_CMD_READ0 && mtd->writesize > 512)
+               cafe_writel(cafe, cafe->ctl2 | 0x100 | NAND_CMD_READSTART, NAND_CTRL2);
+
+ do_command:
+       cafe_dev_dbg(&cafe->pdev->dev, "dlen %x, ctl1 %x, ctl2 %x\n",
+               cafe->datalen, ctl1, cafe_readl(cafe, NAND_CTRL2));
+
+       /* NB: The datasheet lies -- we really should be subtracting 1 here */
+       cafe_writel(cafe, cafe->datalen, NAND_DATA_LEN);
+       cafe_writel(cafe, 0x90000000, NAND_IRQ);
+       if (usedma && (ctl1 & (3<<25))) {
+               uint32_t dmactl = 0xc0000000 + cafe->datalen;
+               /* If WR or RD bits set, set up DMA */
+               if (ctl1 & (1<<26)) {
+                       /* It's a read */
+                       dmactl |= (1<<29);
+                       /* ... so it's done when the DMA is done, not just
+                          the command. */
+                       doneint = 0x10000000;
+               }
+               cafe_writel(cafe, dmactl, NAND_DMA_CTRL);
+       }
+       cafe->datalen = 0;
+
+       if (unlikely(regdebug)) {
+               int i;
+               printk("About to write command %08x to register 0\n", ctl1);
+               for (i=4; i< 0x5c; i+=4)
+                       printk("Register %x: %08x\n", i, readl(cafe->mmio + i));
+       }
+
+       cafe_writel(cafe, ctl1, NAND_CTRL1);
+       /* Apply this short delay always to ensure that we do wait tWB in
+        * any case on any machine. */
+       ndelay(100);
+
+       if (1) {
+               int c = 500000;
+               uint32_t irqs;
+
+               while (c--) {
+                       irqs = cafe_readl(cafe, NAND_IRQ);
+                       if (irqs & doneint)
+                               break;
+                       udelay(1);
+                       if (!(c % 100000))
+                               cafe_dev_dbg(&cafe->pdev->dev, "Wait for ready, IRQ %x\n", irqs);
+                       cpu_relax();
+               }
+               cafe_writel(cafe, doneint, NAND_IRQ);
+               cafe_dev_dbg(&cafe->pdev->dev, "Command %x completed after %d usec, irqs %x (%x)\n",
+                            command, 500000-c, irqs, cafe_readl(cafe, NAND_IRQ));
+       }
+
+       WARN_ON(cafe->ctl2 & (1<<30));
+
+       switch (command) {
+
+       case NAND_CMD_CACHEDPROG:
+       case NAND_CMD_PAGEPROG:
+       case NAND_CMD_ERASE1:
+       case NAND_CMD_ERASE2:
+       case NAND_CMD_SEQIN:
+       case NAND_CMD_RNDIN:
+       case NAND_CMD_STATUS:
+       case NAND_CMD_DEPLETE1:
+       case NAND_CMD_RNDOUT:
+       case NAND_CMD_STATUS_ERROR:
+       case NAND_CMD_STATUS_ERROR0:
+       case NAND_CMD_STATUS_ERROR1:
+       case NAND_CMD_STATUS_ERROR2:
+       case NAND_CMD_STATUS_ERROR3:
+               cafe_writel(cafe, cafe->ctl2, NAND_CTRL2);
+               return;
+       }
+       nand_wait_ready(mtd);
+       cafe_writel(cafe, cafe->ctl2, NAND_CTRL2);
+}
+
+static void cafe_select_chip(struct mtd_info *mtd, int chipnr)
+{
+       //struct cafe_priv *cafe = mtd->priv;
+       //      cafe_dev_dbg(&cafe->pdev->dev, "select_chip %d\n", chipnr);
+}
+
+static int cafe_nand_interrupt(int irq, void *id)
+{
+       struct mtd_info *mtd = id;
+       struct cafe_priv *cafe = mtd->priv;
+       uint32_t irqs = cafe_readl(cafe, NAND_IRQ);
+       cafe_writel(cafe, irqs & ~0x90000000, NAND_IRQ);
+       if (!irqs)
+               return IRQ_NONE;
+
+       cafe_dev_dbg(&cafe->pdev->dev, "irq, bits %x (%x)\n", irqs, cafe_readl(cafe, NAND_IRQ));
+       return IRQ_HANDLED;
+}
+
+static void cafe_nand_bug(struct mtd_info *mtd)
+{
+       BUG();
+}
+
+static int cafe_nand_write_oob(struct mtd_info *mtd,
+                              struct nand_chip *chip, int page)
+{
+       int status = 0;
+
+       chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page);
+       chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
+       chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
+       status = chip->waitfunc(mtd, chip);
+
+       return status & NAND_STATUS_FAIL ? -EIO : 0;
+}
+
+/* Don't use -- use nand_read_oob_std for now */
+static int cafe_nand_read_oob(struct mtd_info *mtd, struct nand_chip *chip,
+                             int page, int sndcmd)
+{
+       chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page);
+       chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
+       return 1;
+}
+/**
+ * cafe_nand_read_page_syndrome - {REPLACABLE] hardware ecc syndrom based page read
+ * @mtd:       mtd info structure
+ * @chip:      nand chip info structure
+ * @buf:       buffer to store read data
+ *
+ * The hw generator calculates the error syndrome automatically. Therefor
+ * we need a special oob layout and handling.
+ */
+static int cafe_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip,
+                              uint8_t *buf)
+{
+       struct cafe_priv *cafe = mtd->priv;
+
+       cafe_dev_dbg(&cafe->pdev->dev, "ECC result %08x SYN1,2 %08x\n",
+                    cafe_readl(cafe, NAND_ECC_RESULT),
+                    cafe_readl(cafe, NAND_ECC_SYN01));
+
+       chip->read_buf(mtd, buf, mtd->writesize);
+       chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
+
+       if (checkecc && cafe_readl(cafe, NAND_ECC_RESULT) & (1<<18)) {
+               unsigned short syn[8];
+               int i;
+
+               for (i=0; i<8; i+=2) {
+                       uint32_t tmp = cafe_readl(cafe, NAND_ECC_SYN01 + (i*2));
+                       syn[i] = tmp & 0xfff;
+                       syn[i+1] = (tmp >> 16) & 0xfff;
+               }
+
+               if ((i = cafe_correct_ecc(buf, syn)) < 0) {
+                       dev_dbg(&cafe->pdev->dev, "Failed to correct ECC at %08x\n",
+                               cafe_readl(cafe, NAND_ADDR2) * 2048);
+                       for (i=0; i< 0x5c; i+=4)
+                               printk("Register %x: %08x\n", i, readl(cafe->mmio + i));
+                       mtd->ecc_stats.failed++;
+               } else {
+                       dev_dbg(&cafe->pdev->dev, "Corrected %d symbol errors\n", i);
+                       mtd->ecc_stats.corrected += i;
+               }
+       }
+
+
+       return 0;
+}
+
+static struct nand_ecclayout cafe_oobinfo_2048 = {
+       .eccbytes = 14,
+       .eccpos = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
+       .oobfree = {{14, 50}}
+};
+
+/* Ick. The BBT code really ought to be able to work this bit out
+   for itself from the above, at least for the 2KiB case */
+static uint8_t cafe_bbt_pattern_2048[] = { 'B', 'b', 't', '0' };
+static uint8_t cafe_mirror_pattern_2048[] = { '1', 't', 'b', 'B' };
+
+static uint8_t cafe_bbt_pattern_512[] = { 0xBB };
+static uint8_t cafe_mirror_pattern_512[] = { 0xBC };
+
+
+static struct nand_bbt_descr cafe_bbt_main_descr_2048 = {
+       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
+               | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
+       .offs = 14,
+       .len = 4,
+       .veroffs = 18,
+       .maxblocks = 4,
+       .pattern = cafe_bbt_pattern_2048
+};
+
+static struct nand_bbt_descr cafe_bbt_mirror_descr_2048 = {
+       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
+               | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
+       .offs = 14,
+       .len = 4,
+       .veroffs = 18,
+       .maxblocks = 4,
+       .pattern = cafe_mirror_pattern_2048
+};
+
+static struct nand_ecclayout cafe_oobinfo_512 = {
+       .eccbytes = 14,
+       .eccpos = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13},
+       .oobfree = {{14, 2}}
+};
+
+static struct nand_bbt_descr cafe_bbt_main_descr_512 = {
+       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
+               | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
+       .offs = 14,
+       .len = 1,
+       .veroffs = 15,
+       .maxblocks = 4,
+       .pattern = cafe_bbt_pattern_512
+};
+
+static struct nand_bbt_descr cafe_bbt_mirror_descr_512 = {
+       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
+               | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
+       .offs = 14,
+       .len = 1,
+       .veroffs = 15,
+       .maxblocks = 4,
+       .pattern = cafe_mirror_pattern_512
+};
+
+
+static void cafe_nand_write_page_lowlevel(struct mtd_info *mtd,
+                                         struct nand_chip *chip, const uint8_t *buf)
+{
+       struct cafe_priv *cafe = mtd->priv;
+
+       chip->write_buf(mtd, buf, mtd->writesize);
+       chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
+
+       /* Set up ECC autogeneration */
+       cafe->ctl2 |= (1<<30);
+}
+
+static int cafe_nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
+                               const uint8_t *buf, int page, int cached, int raw)
+{
+       int status;
+
+       chip->cmdfunc(mtd, NAND_CMD_SEQIN, 0x00, page);
+
+       if (unlikely(raw))
+               chip->ecc.write_page_raw(mtd, chip, buf);
+       else
+               chip->ecc.write_page(mtd, chip, buf);
+
+       /*
+        * Cached progamming disabled for now, Not sure if its worth the
+        * trouble. The speed gain is not very impressive. (2.3->2.6Mib/s)
+        */
+       cached = 0;
+
+       if (!cached || !(chip->options & NAND_CACHEPRG)) {
+
+               chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
+               status = chip->waitfunc(mtd, chip);
+               /*
+                * See if operation failed and additional status checks are
+                * available
+                */
+               if ((status & NAND_STATUS_FAIL) && (chip->errstat))
+                       status = chip->errstat(mtd, chip, FL_WRITING, status,
+                                              page);
+
+               if (status & NAND_STATUS_FAIL)
+                       return -EIO;
+       } else {
+               chip->cmdfunc(mtd, NAND_CMD_CACHEDPROG, -1, -1);
+               status = chip->waitfunc(mtd, chip);
+       }
+
+#ifdef CONFIG_MTD_NAND_VERIFY_WRITE
+       /* Send command to read back the data */
+       chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
+
+       if (chip->verify_buf(mtd, buf, mtd->writesize))
+               return -EIO;
+#endif
+       return 0;
+}
+
+static int cafe_nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
+{
+       return 0;
+}
+
+static int __devinit cafe_nand_probe(struct pci_dev *pdev,
+                                    const struct pci_device_id *ent)
+{
+       struct mtd_info *mtd;
+       struct cafe_priv *cafe;
+       uint32_t ctrl;
+       int err = 0;
+
+       err = pci_enable_device(pdev);
+       if (err)
+               return err;
+
+       pci_set_master(pdev);
+
+       mtd = kzalloc(sizeof(*mtd) + sizeof(struct cafe_priv), GFP_KERNEL);
+       if (!mtd) {
+               dev_warn(&pdev->dev, "failed to alloc mtd_info\n");
+               return  -ENOMEM;
+       }
+       cafe = (void *)(&mtd[1]);
+
+       mtd->priv = cafe;
+       mtd->owner = THIS_MODULE;
+
+       cafe->pdev = pdev;
+       cafe->mmio = pci_iomap(pdev, 0, 0);
+       if (!cafe->mmio) {
+               dev_warn(&pdev->dev, "failed to iomap\n");
+               err = -ENOMEM;
+               goto out_free_mtd;
+       }
+       cafe->dmabuf = dma_alloc_coherent(&cafe->pdev->dev, 2112 + sizeof(struct nand_buffers),
+                                         &cafe->dmaaddr, GFP_KERNEL);
+       if (!cafe->dmabuf) {
+               err = -ENOMEM;
+               goto out_ior;
+       }
+       cafe->nand.buffers = (void *)cafe->dmabuf + 2112;
+
+       cafe->nand.cmdfunc = cafe_nand_cmdfunc;
+       cafe->nand.dev_ready = cafe_device_ready;
+       cafe->nand.read_byte = cafe_read_byte;
+       cafe->nand.read_buf = cafe_read_buf;
+       cafe->nand.write_buf = cafe_write_buf;
+       cafe->nand.select_chip = cafe_select_chip;
+
+       cafe->nand.chip_delay = 0;
+
+       /* Enable the following for a flash based bad block table */
+       cafe->nand.options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR | NAND_OWN_BUFFERS;
+
+       if (skipbbt) {
+               cafe->nand.options |= NAND_SKIP_BBTSCAN;
+               cafe->nand.block_bad = cafe_nand_block_bad;
+       }
+
+       /* Start off by resetting the NAND controller completely */
+       cafe_writel(cafe, 1, NAND_RESET);
+       cafe_writel(cafe, 0, NAND_RESET);
+
+       cafe_writel(cafe, 0xffffffff, NAND_IRQ_MASK);
+
+       /* Timings from Marvell's test code (not verified or calculated by us) */
+       if (!slowtiming) {
+               cafe_writel(cafe, 0x01010a0a, NAND_TIMING1);
+               cafe_writel(cafe, 0x24121212, NAND_TIMING2);
+               cafe_writel(cafe, 0x11000000, NAND_TIMING3);
+       } else {
+               cafe_writel(cafe, 0xffffffff, NAND_TIMING1);
+               cafe_writel(cafe, 0xffffffff, NAND_TIMING2);
+               cafe_writel(cafe, 0xffffffff, NAND_TIMING3);
+       }
+       cafe_writel(cafe, 0xffffffff, NAND_IRQ_MASK);
+       err = request_irq(pdev->irq, &cafe_nand_interrupt, SA_SHIRQ, "CAFE NAND", mtd);
+       if (err) {
+               dev_warn(&pdev->dev, "Could not register IRQ %d\n", pdev->irq);
+
+               goto out_free_dma;
+       }
+#if 1
+       /* Disable master reset, enable NAND clock */
+       ctrl = cafe_readl(cafe, GLOBAL_CTRL);
+       ctrl &= 0xffffeff0;
+       ctrl |= 0x00007000;
+       cafe_writel(cafe, ctrl | 0x05, GLOBAL_CTRL);
+       cafe_writel(cafe, ctrl | 0x0a, GLOBAL_CTRL);
+       cafe_writel(cafe, 0, NAND_DMA_CTRL);
+
+       cafe_writel(cafe, 0x7006, GLOBAL_CTRL);
+       cafe_writel(cafe, 0x700a, GLOBAL_CTRL);
+
+       /* Set up DMA address */
+       cafe_writel(cafe, cafe->dmaaddr & 0xffffffff, NAND_DMA_ADDR0);
+       if (sizeof(cafe->dmaaddr) > 4)
+               /* Shift in two parts to shut the compiler up */
+               cafe_writel(cafe, (cafe->dmaaddr >> 16) >> 16, NAND_DMA_ADDR1);
+       else
+               cafe_writel(cafe, 0, NAND_DMA_ADDR1);
+
+       cafe_dev_dbg(&cafe->pdev->dev, "Set DMA address to %x (virt %p)\n",
+               cafe_readl(cafe, NAND_DMA_ADDR0), cafe->dmabuf);
+
+       /* Enable NAND IRQ in global IRQ mask register */
+       cafe_writel(cafe, 0x80000007, GLOBAL_IRQ_MASK);
+       cafe_dev_dbg(&cafe->pdev->dev, "Control %x, IRQ mask %x\n",
+               cafe_readl(cafe, GLOBAL_CTRL), cafe_readl(cafe, GLOBAL_IRQ_MASK));
+#endif
+#if 1
+       mtd->writesize=2048;
+       mtd->oobsize = 0x40;
+       memset(cafe->dmabuf, 0x5a, 2112);
+       cafe->nand.cmdfunc(mtd, NAND_CMD_READID, 0, -1);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+#endif
+#if 0
+       cafe->nand.cmdfunc(mtd, NAND_CMD_READ0, 0, 0);
+       //      nand_wait_ready(mtd);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+       cafe->nand.read_byte(mtd);
+#endif
+#if 0
+       writel(0x84600070, cafe->mmio);
+       udelay(10);
+       cafe_dev_dbg(&cafe->pdev->dev, "Status %x\n", cafe_readl(cafe, NAND_NONMEM));
+#endif
+       /* Scan to find existance of the device */
+       if (nand_scan_ident(mtd, 1)) {
+               err = -ENXIO;
+               goto out_irq;
+       }
+
+       cafe->ctl2 = 1<<27; /* Reed-Solomon ECC */
+       if (mtd->writesize == 2048)
+               cafe->ctl2 |= 1<<29; /* 2KiB page size */
+
+       /* Set up ECC according to the type of chip we found */
+       if (mtd->writesize == 2048) {
+               cafe->nand.ecc.layout = &cafe_oobinfo_2048;
+               cafe->nand.bbt_td = &cafe_bbt_main_descr_2048;
+               cafe->nand.bbt_md = &cafe_bbt_mirror_descr_2048;
+       } else if (mtd->writesize == 512) {
+               cafe->nand.ecc.layout = &cafe_oobinfo_512;
+               cafe->nand.bbt_td = &cafe_bbt_main_descr_512;
+               cafe->nand.bbt_md = &cafe_bbt_mirror_descr_512;
+       } else {
+               printk(KERN_WARNING "Unexpected NAND flash writesize %d. Aborting\n",
+                      mtd->writesize);
+               goto out_irq;
+       }
+       cafe->nand.ecc.mode = NAND_ECC_HW_SYNDROME;
+       cafe->nand.ecc.size = mtd->writesize;
+       cafe->nand.ecc.bytes = 14;
+       cafe->nand.ecc.hwctl  = (void *)cafe_nand_bug;
+       cafe->nand.ecc.calculate = (void *)cafe_nand_bug;
+       cafe->nand.ecc.correct  = (void *)cafe_nand_bug;
+       cafe->nand.write_page = cafe_nand_write_page;
+       cafe->nand.ecc.write_page = cafe_nand_write_page_lowlevel;
+       cafe->nand.ecc.write_oob = cafe_nand_write_oob;
+       cafe->nand.ecc.read_page = cafe_nand_read_page;
+       cafe->nand.ecc.read_oob = cafe_nand_read_oob;
+
+       err = nand_scan_tail(mtd);
+       if (err)
+               goto out_irq;
+
+       pci_set_drvdata(pdev, mtd);
+       add_mtd_device(mtd);
+       goto out;
+
+ out_irq:
+       /* Disable NAND IRQ in global IRQ mask register */
+       cafe_writel(cafe, ~1 & cafe_readl(cafe, GLOBAL_IRQ_MASK), GLOBAL_IRQ_MASK);
+       free_irq(pdev->irq, mtd);
+ out_free_dma:
+       dma_free_coherent(&cafe->pdev->dev, 2112, cafe->dmabuf, cafe->dmaaddr);
+ out_ior:
+       pci_iounmap(pdev, cafe->mmio);
+ out_free_mtd:
+       kfree(mtd);
+ out:
+       return err;
+}
+
+static void __devexit cafe_nand_remove(struct pci_dev *pdev)
+{
+       struct mtd_info *mtd = pci_get_drvdata(pdev);
+       struct cafe_priv *cafe = mtd->priv;
+
+       del_mtd_device(mtd);
+       /* Disable NAND IRQ in global IRQ mask register */
+       cafe_writel(cafe, ~1 & cafe_readl(cafe, GLOBAL_IRQ_MASK), GLOBAL_IRQ_MASK);
+       free_irq(pdev->irq, mtd);
+       nand_release(mtd);
+       pci_iounmap(pdev, cafe->mmio);
+       dma_free_coherent(&cafe->pdev->dev, 2112, cafe->dmabuf, cafe->dmaaddr);
+       kfree(mtd);
+}
+
+static struct pci_device_id cafe_nand_tbl[] = {
+       { 0x11ab, 0x4100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MEMORY_FLASH << 8, 0xFFFF0 }
+};
+
+MODULE_DEVICE_TABLE(pci, cafe_nand_tbl);
+
+static struct pci_driver cafe_nand_pci_driver = {
+       .name = "CAFÉ NAND",
+       .id_table = cafe_nand_tbl,
+       .probe = cafe_nand_probe,
+       .remove = __devexit_p(cafe_nand_remove),
+#ifdef CONFIG_PMx
+       .suspend = cafe_nand_suspend,
+       .resume = cafe_nand_resume,
+#endif
+};
+
+static int cafe_nand_init(void)
+{
+       return pci_register_driver(&cafe_nand_pci_driver);
+}
+
+static void cafe_nand_exit(void)
+{
+       pci_unregister_driver(&cafe_nand_pci_driver);
+}
+module_init(cafe_nand_init);
+module_exit(cafe_nand_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
+MODULE_DESCRIPTION("NAND flash driver for OLPC CAFE chip");
+
+/* Correct ECC for 2048 bytes of 0xff:
+   41 a0 71 65 54 27 f3 93 ec a9 be ed 0b a1 */
+
+/* dwmw2's B-test board, in case of completely screwing it:
+Bad eraseblock 2394 at 0x12b40000
+Bad eraseblock 2627 at 0x14860000
+Bad eraseblock 3349 at 0x1a2a0000
+*/
diff --git a/drivers/mtd/nand/cafe_ecc.c b/drivers/mtd/nand/cafe_ecc.c
new file mode 100644 (file)
index 0000000..1b9fa05
--- /dev/null
@@ -0,0 +1,1381 @@
+/* Error correction for CAFÉ NAND controller
+ *
+ * Â© 2006 Marvell, Inc.
+ * Author: Tom Chiou
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+
+static unsigned short gf4096_mul(unsigned short, unsigned short);
+static unsigned short gf64_mul(unsigned short, unsigned short);
+static unsigned short gf4096_inv(unsigned short);
+static unsigned short err_pos(unsigned short);
+static void find_4bit_err_coefs(unsigned short, unsigned short, unsigned short,
+                               unsigned short, unsigned short, unsigned short,
+                               unsigned short, unsigned short, unsigned short *);
+static void zero_4x5_col3(unsigned short[4][5]);
+static void zero_4x5_col2(unsigned short[4][5]);
+static void zero_4x5_col1(unsigned short[4][5]);
+static void swap_4x5_rows(unsigned short[4][5], int, int, int);
+static void swap_2x3_rows(unsigned short m[2][3]);
+static void solve_4x5(unsigned short m[4][5], unsigned short *, int *);
+static void sort_coefs(int *, unsigned short *, int);
+static void find_4bit_err_pats(unsigned short, unsigned short, unsigned short,
+                              unsigned short, unsigned short, unsigned short,
+                              unsigned short, unsigned short, unsigned short *);
+static void find_3bit_err_coefs(unsigned short, unsigned short, unsigned short,
+                               unsigned short, unsigned short, unsigned short,
+                               unsigned short *);
+static void zero_3x4_col2(unsigned short[3][4]);
+static void zero_3x4_col1(unsigned short[3][4]);
+static void swap_3x4_rows(unsigned short[3][4], int, int, int);
+static void solve_3x4(unsigned short[3][4], unsigned short *, int *);
+static void find_3bit_err_pats(unsigned short, unsigned short, unsigned short,
+                              unsigned short, unsigned short, unsigned short,
+                              unsigned short *);
+
+static void find_2bit_err_pats(unsigned short, unsigned short, unsigned short,
+                              unsigned short, unsigned short *);
+static void find_2x2_soln(unsigned short, unsigned short, unsigned short,
+                         unsigned short, unsigned short, unsigned short,
+                         unsigned short *);
+static void solve_2x3(unsigned short[2][3], unsigned short *);
+static int chk_no_err_only(unsigned short *, unsigned short *);
+static int chk_1_err_only(unsigned short *, unsigned short *);
+static int chk_2_err_only(unsigned short *, unsigned short *);
+static int chk_3_err_only(unsigned short *, unsigned short *);
+static int chk_4_err_only(unsigned short *, unsigned short *);
+
+static unsigned short gf64_mul(unsigned short a, unsigned short b)
+{
+       unsigned short tmp1, tmp2, tmp3, tmp4, tmp5;
+       unsigned short c_bit0, c_bit1, c_bit2, c_bit3, c_bit4, c_bit5, c;
+
+       tmp1 = ((a) ^ (a >> 5));
+       tmp2 = ((a >> 4) ^ (a >> 5));
+       tmp3 = ((a >> 3) ^ (a >> 4));
+       tmp4 = ((a >> 2) ^ (a >> 3));
+       tmp5 = ((a >> 1) ^ (a >> 2));
+
+       c_bit0 = ((a & b) ^ ((a >> 5) & (b >> 1)) ^ ((a >> 4) & (b >> 2)) ^
+                 ((a >> 3) & (b >> 3)) ^ ((a >> 2) & (b >> 4)) ^ ((a >> 1) & (b >> 5))) & 0x1;
+
+       c_bit1 = (((a >> 1) & b) ^ (tmp1 & (b >> 1)) ^ (tmp2 & (b >> 2)) ^
+                 (tmp3 & (b >> 3)) ^ (tmp4 & (b >> 4)) ^ (tmp5 & (b >> 5))) & 0x1;
+
+       c_bit2 = (((a >> 2) & b) ^ ((a >> 1) & (b >> 1)) ^ (tmp1 & (b >> 2)) ^
+                 (tmp2 & (b >> 3)) ^ (tmp3 & (b >> 4)) ^ (tmp4 & (b >> 5))) & 0x1;
+
+       c_bit3 = (((a >> 3) & b) ^ ((a >> 2) & (b >> 1)) ^ ((a >> 1) & (b >> 2)) ^
+                 (tmp1 & (b >> 3)) ^ (tmp2 & (b >> 4)) ^ (tmp3 & (b >> 5))) & 0x1;
+
+       c_bit4 = (((a >> 4) & b) ^ ((a >> 3) & (b >> 1)) ^ ((a >> 2) & (b >> 2)) ^
+                 ((a >> 1) & (b >> 3)) ^ (tmp1 & (b >> 4)) ^ (tmp2 & (b >> 5))) & 0x1;
+
+       c_bit5 = (((a >> 5) & b) ^ ((a >> 4) & (b >> 1)) ^ ((a >> 3) & (b >> 2)) ^
+                 ((a >> 2) & (b >> 3)) ^ ((a >> 1) & (b >> 4)) ^ (tmp1 & (b >> 5))) & 0x1;
+
+       c = c_bit0 | (c_bit1 << 1) | (c_bit2 << 2) | (c_bit3 << 3) | (c_bit4 << 4) | (c_bit5 << 5);
+
+       return c;
+}
+
+static unsigned short gf4096_mul(unsigned short a, unsigned short b)
+{
+       unsigned short ah, al, bh, bl, alxah, blxbh, ablh, albl, ahbh, ahbhB, c;
+
+       ah = (a >> 6) & 0x3f;
+       al = a & 0x3f;
+       bh = (b >> 6) & 0x3f;
+       bl = b & 0x3f;
+       alxah = al ^ ah;
+       blxbh = bl ^ bh;
+
+       ablh = gf64_mul(alxah, blxbh);
+       albl = gf64_mul(al, bl);
+       ahbh = gf64_mul(ah, bh);
+
+       ahbhB = ((ahbh & 0x1) << 5) |
+           ((ahbh & 0x20) >> 1) |
+           ((ahbh & 0x10) >> 1) | ((ahbh & 0x8) >> 1) | ((ahbh & 0x4) >> 1) | (((ahbh >> 1) ^ ahbh) & 0x1);
+
+       c = ((ablh ^ albl) << 6) | (ahbhB ^ albl);
+       return c;
+}
+
+static void find_2bit_err_pats(unsigned short s0, unsigned short s1, unsigned short r0, unsigned short r1, unsigned short *pats)
+{
+       find_2x2_soln(0x1, 0x1, r0, r1, s0, s1, pats);
+}
+
+static void find_3bit_err_coefs(unsigned short s0, unsigned short s1,
+                               unsigned short s2, unsigned short s3, unsigned short s4, unsigned short s5, unsigned short *coefs)
+{
+       unsigned short m[3][4];
+       int row_order[3];
+
+       row_order[0] = 0;
+       row_order[1] = 1;
+       row_order[2] = 2;
+       m[0][0] = s2;
+       m[0][1] = s1;
+       m[0][2] = s0;
+       m[0][3] = s3;
+       m[1][0] = s3;
+       m[1][1] = s2;
+       m[1][2] = s1;
+       m[1][3] = s4;
+       m[2][0] = s4;
+       m[2][1] = s3;
+       m[2][2] = s2;
+       m[2][3] = s5;
+
+       if (m[0][2] != 0x0) {
+               zero_3x4_col2(m);
+       } else if (m[1][2] != 0x0) {
+               swap_3x4_rows(m, 0, 1, 4);
+               zero_3x4_col2(m);
+       } else if (m[2][2] != 0x0) {
+               swap_3x4_rows(m, 0, 2, 4);
+               zero_3x4_col2(m);
+       } else {
+               printk(KERN_ERR "Error: find_3bit_err_coefs, s0,s1,s2 all zeros!\n");
+       }
+
+       if (m[1][1] != 0x0) {
+               zero_3x4_col1(m);
+       } else if (m[2][1] != 0x0) {
+               swap_3x4_rows(m, 1, 2, 4);
+               zero_3x4_col1(m);
+       } else {
+               printk(KERN_ERR "Error: find_3bit_err_coefs, cannot resolve col 1!\n");
+       }
+
+       /* solve coefs */
+       solve_3x4(m, coefs, row_order);
+}
+
+static void zero_3x4_col2(unsigned short m[3][4])
+{
+       unsigned short minv1, minv2;
+
+       minv1 = gf4096_mul(m[1][2], gf4096_inv(m[0][2]));
+       minv2 = gf4096_mul(m[2][2], gf4096_inv(m[0][2]));
+       m[1][0] = m[1][0] ^ gf4096_mul(m[0][0], minv1);
+       m[1][1] = m[1][1] ^ gf4096_mul(m[0][1], minv1);
+       m[1][3] = m[1][3] ^ gf4096_mul(m[0][3], minv1);
+       m[2][0] = m[2][0] ^ gf4096_mul(m[0][0], minv2);
+       m[2][1] = m[2][1] ^ gf4096_mul(m[0][1], minv2);
+       m[2][3] = m[2][3] ^ gf4096_mul(m[0][3], minv2);
+}
+
+static void zero_3x4_col1(unsigned short m[3][4])
+{
+       unsigned short minv;
+       minv = gf4096_mul(m[2][1], gf4096_inv(m[1][1]));
+       m[2][0] = m[2][0] ^ gf4096_mul(m[1][0], minv);
+       m[2][3] = m[2][3] ^ gf4096_mul(m[1][3], minv);
+}
+
+static void swap_3x4_rows(unsigned short m[3][4], int i, int j, int col_width)
+{
+       unsigned short tmp0;
+       int cnt;
+       for (cnt = 0; cnt < col_width; cnt++) {
+               tmp0 = m[i][cnt];
+               m[i][cnt] = m[j][cnt];
+               m[j][cnt] = tmp0;
+       }
+}
+
+static void solve_3x4(unsigned short m[3][4], unsigned short *coefs, int *row_order)
+{
+       unsigned short tmp[3];
+       tmp[0] = gf4096_mul(m[2][3], gf4096_inv(m[2][0]));
+       tmp[1] = gf4096_mul((gf4096_mul(tmp[0], m[1][0]) ^ m[1][3]), gf4096_inv(m[1][1]));
+       tmp[2] = gf4096_mul((gf4096_mul(tmp[0], m[0][0]) ^ gf4096_mul(tmp[1], m[0][1]) ^ m[0][3]), gf4096_inv(m[0][2]));
+       sort_coefs(row_order, tmp, 3);
+       coefs[0] = tmp[0];
+       coefs[1] = tmp[1];
+       coefs[2] = tmp[2];
+}
+
+static void find_3bit_err_pats(unsigned short s0, unsigned short s1,
+                              unsigned short s2, unsigned short r0,
+                              unsigned short r1, unsigned short r2,
+                              unsigned short *pats)
+{
+       find_2x2_soln(r0 ^ r2, r1 ^ r2,
+                     gf4096_mul(r0, r0 ^ r2), gf4096_mul(r1, r1 ^ r2),
+                     gf4096_mul(s0, r2) ^ s1, gf4096_mul(s1, r2) ^ s2, pats);
+       pats[2] = s0 ^ pats[0] ^ pats[1];
+}
+
+static void find_4bit_err_coefs(unsigned short s0, unsigned short s1,
+                               unsigned short s2, unsigned short s3,
+                               unsigned short s4, unsigned short s5,
+                               unsigned short s6, unsigned short s7,
+                               unsigned short *coefs)
+{
+       unsigned short m[4][5];
+       int row_order[4];
+
+       row_order[0] = 0;
+       row_order[1] = 1;
+       row_order[2] = 2;
+       row_order[3] = 3;
+
+       m[0][0] = s3;
+       m[0][1] = s2;
+       m[0][2] = s1;
+       m[0][3] = s0;
+       m[0][4] = s4;
+       m[1][0] = s4;
+       m[1][1] = s3;
+       m[1][2] = s2;
+       m[1][3] = s1;
+       m[1][4] = s5;
+       m[2][0] = s5;
+       m[2][1] = s4;
+       m[2][2] = s3;
+       m[2][3] = s2;
+       m[2][4] = s6;
+       m[3][0] = s6;
+       m[3][1] = s5;
+       m[3][2] = s4;
+       m[3][3] = s3;
+       m[3][4] = s7;
+
+       if (m[0][3] != 0x0) {
+               zero_4x5_col3(m);
+       } else if (m[1][3] != 0x0) {
+               swap_4x5_rows(m, 0, 1, 5);
+               zero_4x5_col3(m);
+       } else if (m[2][3] != 0x0) {
+               swap_4x5_rows(m, 0, 2, 5);
+               zero_4x5_col3(m);
+       } else if (m[3][3] != 0x0) {
+               swap_4x5_rows(m, 0, 3, 5);
+               zero_4x5_col3(m);
+       } else {
+               printk(KERN_ERR "Error: find_4bit_err_coefs, s0,s1,s2,s3 all zeros!\n");
+       }
+
+       if (m[1][2] != 0x0) {
+               zero_4x5_col2(m);
+       } else if (m[2][2] != 0x0) {
+               swap_4x5_rows(m, 1, 2, 5);
+               zero_4x5_col2(m);
+       } else if (m[3][2] != 0x0) {
+               swap_4x5_rows(m, 1, 3, 5);
+               zero_4x5_col2(m);
+       } else {
+               printk(KERN_ERR "Error: find_4bit_err_coefs, cannot resolve col 2!\n");
+       }
+
+       if (m[2][1] != 0x0) {
+               zero_4x5_col1(m);
+       } else if (m[3][1] != 0x0) {
+               swap_4x5_rows(m, 2, 3, 5);
+               zero_4x5_col1(m);
+       } else {
+               printk(KERN_ERR "Error: find_4bit_err_coefs, cannot resolve col 1!\n");
+       }
+
+       solve_4x5(m, coefs, row_order);
+}
+
+static void zero_4x5_col3(unsigned short m[4][5])
+{
+       unsigned short minv1, minv2, minv3;
+
+       minv1 = gf4096_mul(m[1][3], gf4096_inv(m[0][3]));
+       minv2 = gf4096_mul(m[2][3], gf4096_inv(m[0][3]));
+       minv3 = gf4096_mul(m[3][3], gf4096_inv(m[0][3]));
+
+       m[1][0] = m[1][0] ^ gf4096_mul(m[0][0], minv1);
+       m[1][1] = m[1][1] ^ gf4096_mul(m[0][1], minv1);
+       m[1][2] = m[1][2] ^ gf4096_mul(m[0][2], minv1);
+       m[1][4] = m[1][4] ^ gf4096_mul(m[0][4], minv1);
+       m[2][0] = m[2][0] ^ gf4096_mul(m[0][0], minv2);
+       m[2][1] = m[2][1] ^ gf4096_mul(m[0][1], minv2);
+       m[2][2] = m[2][2] ^ gf4096_mul(m[0][2], minv2);
+       m[2][4] = m[2][4] ^ gf4096_mul(m[0][4], minv2);
+       m[3][0] = m[3][0] ^ gf4096_mul(m[0][0], minv3);
+       m[3][1] = m[3][1] ^ gf4096_mul(m[0][1], minv3);
+       m[3][2] = m[3][2] ^ gf4096_mul(m[0][2], minv3);
+       m[3][4] = m[3][4] ^ gf4096_mul(m[0][4], minv3);
+}
+
+static void zero_4x5_col2(unsigned short m[4][5])
+{
+       unsigned short minv2, minv3;
+
+       minv2 = gf4096_mul(m[2][2], gf4096_inv(m[1][2]));
+       minv3 = gf4096_mul(m[3][2], gf4096_inv(m[1][2]));
+
+       m[2][0] = m[2][0] ^ gf4096_mul(m[1][0], minv2);
+       m[2][1] = m[2][1] ^ gf4096_mul(m[1][1], minv2);
+       m[2][4] = m[2][4] ^ gf4096_mul(m[1][4], minv2);
+       m[3][0] = m[3][0] ^ gf4096_mul(m[1][0], minv3);
+       m[3][1] = m[3][1] ^ gf4096_mul(m[1][1], minv3);
+       m[3][4] = m[3][4] ^ gf4096_mul(m[1][4], minv3);
+}
+
+static void zero_4x5_col1(unsigned short m[4][5])
+{
+       unsigned short minv;
+
+       minv = gf4096_mul(m[3][1], gf4096_inv(m[2][1]));
+
+       m[3][0] = m[3][0] ^ gf4096_mul(m[2][0], minv);
+       m[3][4] = m[3][4] ^ gf4096_mul(m[2][4], minv);
+}
+
+static void swap_4x5_rows(unsigned short m[4][5], int i, int j, int col_width)
+{
+       unsigned short tmp0;
+       int cnt;
+
+       for (cnt = 0; cnt < col_width; cnt++) {
+               tmp0 = m[i][cnt];
+               m[i][cnt] = m[j][cnt];
+               m[j][cnt] = tmp0;
+       }
+}
+
+static void solve_4x5(unsigned short m[4][5], unsigned short *coefs, int *row_order)
+{
+       unsigned short tmp[4];
+
+       tmp[0] = gf4096_mul(m[3][4], gf4096_inv(m[3][0]));
+       tmp[1] = gf4096_mul((gf4096_mul(tmp[0], m[2][0]) ^ m[2][4]), gf4096_inv(m[2][1]));
+       tmp[2] = gf4096_mul((gf4096_mul(tmp[0], m[1][0]) ^ gf4096_mul(tmp[1], m[1][1]) ^ m[1][4]), gf4096_inv(m[1][2]));
+       tmp[3] = gf4096_mul((gf4096_mul(tmp[0], m[0][0]) ^
+                       gf4096_mul(tmp[1], m[0][1]) ^ gf4096_mul(tmp[2], m[0][2]) ^ m[0][4]), gf4096_inv(m[0][3]));
+       sort_coefs(row_order, tmp, 4);
+       coefs[0] = tmp[0];
+       coefs[1] = tmp[1];
+       coefs[2] = tmp[2];
+       coefs[3] = tmp[3];
+}
+
+static void sort_coefs(int *order, unsigned short *soln, int len)
+{
+       int cnt, start_cnt, least_ord, least_cnt;
+       unsigned short tmp0;
+       for (start_cnt = 0; start_cnt < len; start_cnt++) {
+               for (cnt = start_cnt; cnt < len; cnt++) {
+                       if (cnt == start_cnt) {
+                               least_ord = order[cnt];
+                               least_cnt = start_cnt;
+                       } else {
+                               if (least_ord > order[cnt]) {
+                                       least_ord = order[cnt];
+                                       least_cnt = cnt;
+                               }
+                       }
+               }
+               if (least_cnt != start_cnt) {
+                       tmp0 = order[least_cnt];
+                       order[least_cnt] = order[start_cnt];
+                       order[start_cnt] = tmp0;
+                       tmp0 = soln[least_cnt];
+                       soln[least_cnt] = soln[start_cnt];
+                       soln[start_cnt] = tmp0;
+               }
+       }
+}
+
+static void find_4bit_err_pats(unsigned short s0, unsigned short s1,
+                              unsigned short s2, unsigned short s3,
+                              unsigned short z1, unsigned short z2,
+                              unsigned short z3, unsigned short z4,
+                              unsigned short *pats)
+{
+       unsigned short z4_z1, z3z4_z3z3, z4_z2, s0z4_s1, z1z4_z1z1,
+               z4_z3, z2z4_z2z2, s1z4_s2, z3z3z4_z3z3z3, z1z1z4_z1z1z1, z2z2z4_z2z2z2, s2z4_s3;
+       unsigned short tmp0, tmp1, tmp2, tmp3;
+
+       z4_z1 = z4 ^ z1;
+       z3z4_z3z3 = gf4096_mul(z3, z4) ^ gf4096_mul(z3, z3);
+       z4_z2 = z4 ^ z2;
+       s0z4_s1 = gf4096_mul(s0, z4) ^ s1;
+       z1z4_z1z1 = gf4096_mul(z1, z4) ^ gf4096_mul(z1, z1);
+       z4_z3 = z4 ^ z3;
+       z2z4_z2z2 = gf4096_mul(z2, z4) ^ gf4096_mul(z2, z2);
+       s1z4_s2 = gf4096_mul(s1, z4) ^ s2;
+       z3z3z4_z3z3z3 = gf4096_mul(gf4096_mul(z3, z3), z4) ^ gf4096_mul(gf4096_mul(z3, z3), z3);
+       z1z1z4_z1z1z1 = gf4096_mul(gf4096_mul(z1, z1), z4) ^ gf4096_mul(gf4096_mul(z1, z1), z1);
+       z2z2z4_z2z2z2 = gf4096_mul(gf4096_mul(z2, z2), z4) ^ gf4096_mul(gf4096_mul(z2, z2), z2);
+       s2z4_s3 = gf4096_mul(s2, z4) ^ s3;
+
+       //find err pat 0,1
+       find_2x2_soln(gf4096_mul(z4_z1, z3z4_z3z3) ^
+                     gf4096_mul(z1z4_z1z1, z4_z3), gf4096_mul(z4_z2,
+                                                              z3z4_z3z3) ^
+                     gf4096_mul(z2z4_z2z2, z4_z3), gf4096_mul(z1z4_z1z1,
+                                                              z3z3z4_z3z3z3) ^
+                     gf4096_mul(z1z1z4_z1z1z1, z3z4_z3z3),
+                     gf4096_mul(z2z4_z2z2,
+                                z3z3z4_z3z3z3) ^ gf4096_mul(z2z2z4_z2z2z2,
+                                                            z3z4_z3z3),
+                     gf4096_mul(s0z4_s1, z3z4_z3z3) ^ gf4096_mul(s1z4_s2,
+                                                                 z4_z3),
+                     gf4096_mul(s1z4_s2, z3z3z4_z3z3z3) ^ gf4096_mul(s2z4_s3, z3z4_z3z3), pats);
+       tmp0 = pats[0];
+       tmp1 = pats[1];
+       tmp2 = pats[0] ^ pats[1] ^ s0;
+       tmp3 = gf4096_mul(pats[0], z1) ^ gf4096_mul(pats[1], z2) ^ s1;
+
+       //find err pat 2,3
+       find_2x2_soln(0x1, 0x1, z3, z4, tmp2, tmp3, pats);
+       pats[2] = pats[0];
+       pats[3] = pats[1];
+       pats[0] = tmp0;
+       pats[1] = tmp1;
+}
+
+static void find_2x2_soln(unsigned short c00, unsigned short c01,
+                         unsigned short c10, unsigned short c11,
+                         unsigned short lval0, unsigned short lval1,
+                         unsigned short *soln)
+{
+       unsigned short m[2][3];
+       m[0][0] = c00;
+       m[0][1] = c01;
+       m[0][2] = lval0;
+       m[1][0] = c10;
+       m[1][1] = c11;
+       m[1][2] = lval1;
+
+       if (m[0][1] != 0x0) {
+               /* */
+       } else if (m[1][1] != 0x0) {
+               swap_2x3_rows(m);
+       } else {
+               printk(KERN_ERR "Warning: find_2bit_err_coefs, s0,s1 all zeros!\n");
+       }
+
+       solve_2x3(m, soln);
+}
+
+static void swap_2x3_rows(unsigned short m[2][3])
+{
+       unsigned short tmp0;
+       int cnt;
+
+       for (cnt = 0; cnt < 3; cnt++) {
+               tmp0 = m[0][cnt];
+               m[0][cnt] = m[1][cnt];
+               m[1][cnt] = tmp0;
+       }
+}
+
+static void solve_2x3(unsigned short m[2][3], unsigned short *coefs)
+{
+       unsigned short minv;
+
+       minv = gf4096_mul(m[1][1], gf4096_inv(m[0][1]));
+       m[1][0] = m[1][0] ^ gf4096_mul(m[0][0], minv);
+       m[1][2] = m[1][2] ^ gf4096_mul(m[0][2], minv);
+       coefs[0] = gf4096_mul(m[1][2], gf4096_inv(m[1][0]));
+       coefs[1] = gf4096_mul((gf4096_mul(coefs[0], m[0][0]) ^ m[0][2]), gf4096_inv(m[0][1]));
+}
+
+static unsigned char gf64_inv[64] = {
+        0,  1, 33, 62, 49, 43, 31, 44, 57, 37, 52, 28, 46, 40, 22, 25,
+       61, 54, 51, 39, 26, 35, 14, 24, 23, 15, 20, 34, 11, 53, 45,  6,
+       63,  2, 27, 21, 56,  9, 50, 19, 13, 47, 48,  5,  7, 30, 12, 41,
+       42,  4, 38, 18, 10, 29, 17, 60, 36,  8, 59, 58, 55, 16,  3, 32
+};
+
+static unsigned short gf4096_inv(unsigned short din)
+{
+       unsigned short alahxal, ah2B, deno, inv, bl, bh;
+       unsigned short ah, al, ahxal;
+       unsigned short dout;
+
+       ah = (din >> 6) & 0x3f;
+       al = din & 0x3f;
+       ahxal = ah ^ al;
+       ah2B = (((ah ^ (ah >> 3)) & 0x1) << 5) |
+               ((ah >> 1) & 0x10) |
+               ((((ah >> 5) ^ (ah >> 2)) & 0x1) << 3) |
+               ((ah >> 2) & 0x4) | ((((ah >> 4) ^ (ah >> 1)) & 0x1) << 1) | (ah & 0x1);
+       alahxal = gf64_mul(ahxal, al);
+       deno = alahxal ^ ah2B;
+       inv = gf64_inv[deno];
+       bl = gf64_mul(inv, ahxal);
+       bh = gf64_mul(inv, ah);
+       dout = ((bh & 0x3f) << 6) | (bl & 0x3f);
+       return (((bh & 0x3f) << 6) | (bl & 0x3f));
+}
+
+static unsigned short err_pos_lut[4096] = {
+       0xfff, 0x000, 0x451, 0xfff, 0xfff, 0x3cf, 0xfff, 0x041,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x28a, 0xfff, 0x492, 0xfff,
+       0x145, 0xfff, 0xfff, 0x514, 0xfff, 0x082, 0xfff, 0xfff,
+       0xfff, 0x249, 0x38e, 0x410, 0xfff, 0x104, 0x208, 0x1c7,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x2cb, 0xfff, 0xfff, 0xfff,
+       0x0c3, 0x34d, 0x4d3, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x186, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x30c, 0x555, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x166, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x385, 0x14e, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4e1,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x538, 0xfff, 0x16d, 0xfff,
+       0xfff, 0xfff, 0x45b, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x29c, 0x2cc, 0x30b, 0x2b3, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x0b3, 0xfff, 0x2f7,
+       0xfff, 0x32b, 0xfff, 0xfff, 0xfff, 0xfff, 0x0a7, 0xfff,
+       0xfff, 0x2da, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x07e, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x11c, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x22f, 0xfff, 0x1f4, 0xfff, 0xfff,
+       0x2b0, 0x504, 0xfff, 0x114, 0xfff, 0xfff, 0xfff, 0x21d,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x00d, 0x3c4, 0x340, 0x10f,
+       0xfff, 0xfff, 0x266, 0x02e, 0xfff, 0xfff, 0xfff, 0x4f8,
+       0x337, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x07b, 0x168, 0xfff, 0xfff, 0x0fe,
+       0xfff, 0xfff, 0x51a, 0xfff, 0x458, 0xfff, 0x36d, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x073, 0x37d, 0x415, 0x550, 0xfff,
+       0xfff, 0xfff, 0x23b, 0x4b4, 0xfff, 0xfff, 0xfff, 0x1a1,
+       0xfff, 0xfff, 0x3aa, 0xfff, 0x117, 0x04d, 0x341, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x518, 0x03e, 0x0f2, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x363, 0xfff, 0x0b9, 0xfff, 0xfff,
+       0x241, 0xfff, 0xfff, 0x049, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x15f, 0x52d, 0xfff, 0xfff, 0xfff, 0x29e, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x4cf, 0x0fc, 0xfff, 0x36f, 0x3d3, 0xfff,
+       0x228, 0xfff, 0xfff, 0x45e, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x238, 0xfff, 0xfff, 0xfff, 0xfff, 0x47f, 0xfff, 0xfff,
+       0x43a, 0x265, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x3e8,
+       0xfff, 0xfff, 0x01a, 0xfff, 0xfff, 0xfff, 0xfff, 0x21e,
+       0x1fc, 0x40b, 0xfff, 0xfff, 0xfff, 0x2d0, 0x159, 0xfff,
+       0xfff, 0x313, 0xfff, 0xfff, 0x05c, 0x4cc, 0xfff, 0xfff,
+       0x0f6, 0x3d5, 0xfff, 0xfff, 0xfff, 0x54f, 0xfff, 0xfff,
+       0xfff, 0x172, 0x1e4, 0x07c, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x53c, 0x1ad, 0x535,
+       0x19b, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x092, 0xfff, 0x2be, 0xfff, 0xfff, 0x482,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x0e6, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x476, 0xfff, 0x51d, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x342, 0x2b5, 0x22e, 0x09a, 0xfff, 0x08d,
+       0x44f, 0x3ed, 0xfff, 0xfff, 0xfff, 0xfff, 0x3d1, 0xfff,
+       0xfff, 0x543, 0xfff, 0x48f, 0xfff, 0x3d2, 0xfff, 0x0d5,
+       0x113, 0x0ec, 0x427, 0xfff, 0xfff, 0xfff, 0x4c4, 0xfff,
+       0xfff, 0x50a, 0xfff, 0x144, 0xfff, 0x105, 0x39f, 0x294,
+       0x164, 0xfff, 0x31a, 0xfff, 0xfff, 0x49a, 0xfff, 0x130,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x1be, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x49e, 0x371, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x0e8, 0x49c, 0x0f4, 0xfff,
+       0x338, 0x1a7, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x36c, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x1ae, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x31b, 0xfff, 0xfff, 0x2dd, 0x522, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x2f4,
+       0x3c6, 0x30d, 0xfff, 0xfff, 0xfff, 0xfff, 0x34c, 0x18f,
+       0x30a, 0xfff, 0x01f, 0x079, 0xfff, 0xfff, 0x54d, 0x46b,
+       0x28c, 0x37f, 0xfff, 0xfff, 0xfff, 0xfff, 0x355, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x14f, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x359, 0x3fe, 0x3c5, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x423, 0xfff, 0xfff, 0x34a, 0x22c, 0xfff,
+       0x25a, 0xfff, 0xfff, 0x4ad, 0xfff, 0x28d, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x547, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x2e2, 0xfff, 0xfff, 0x1d5, 0xfff, 0x2a8, 0xfff, 0xfff,
+       0x03f, 0xfff, 0xfff, 0xfff, 0xfff, 0x3eb, 0x0fa, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x55b, 0xfff,
+       0x08e, 0xfff, 0x3ae, 0xfff, 0x3a4, 0xfff, 0x282, 0x158,
+       0xfff, 0x382, 0xfff, 0xfff, 0x499, 0xfff, 0xfff, 0x08a,
+       0xfff, 0xfff, 0xfff, 0x456, 0x3be, 0xfff, 0x1e2, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x559, 0xfff, 0x1a0, 0xfff,
+       0xfff, 0x0b4, 0xfff, 0xfff, 0xfff, 0x2df, 0xfff, 0xfff,
+       0xfff, 0x07f, 0x4f5, 0xfff, 0xfff, 0x27c, 0x133, 0x017,
+       0xfff, 0x3fd, 0xfff, 0xfff, 0xfff, 0x44d, 0x4cd, 0x17a,
+       0x0d7, 0x537, 0xfff, 0xfff, 0x353, 0xfff, 0xfff, 0x351,
+       0x366, 0xfff, 0x44a, 0xfff, 0x1a6, 0xfff, 0xfff, 0xfff,
+       0x291, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x1e3,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x389, 0xfff, 0x07a, 0xfff,
+       0x1b6, 0x2ed, 0xfff, 0xfff, 0xfff, 0xfff, 0x24e, 0x074,
+       0xfff, 0xfff, 0x3dc, 0xfff, 0x4e3, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x4eb, 0xfff, 0xfff, 0x3b8, 0x4de, 0xfff, 0x19c,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x262,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x076, 0x4e8, 0x3da,
+       0xfff, 0x531, 0xfff, 0xfff, 0x14a, 0xfff, 0x0a2, 0x433,
+       0x3df, 0x1e9, 0xfff, 0xfff, 0xfff, 0xfff, 0x3e7, 0x285,
+       0x2d8, 0xfff, 0xfff, 0xfff, 0x349, 0x18d, 0x098, 0xfff,
+       0x0df, 0x4bf, 0xfff, 0xfff, 0x0b2, 0xfff, 0x346, 0x24d,
+       0xfff, 0xfff, 0xfff, 0x24f, 0x4fa, 0x2f9, 0xfff, 0xfff,
+       0x3c9, 0xfff, 0x2b4, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x056, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x179, 0xfff, 0x0e9, 0x3f0, 0x33d, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x1fd, 0xfff, 0xfff, 0x526, 0xfff,
+       0xfff, 0xfff, 0x53d, 0xfff, 0xfff, 0xfff, 0x170, 0x331,
+       0xfff, 0x068, 0xfff, 0xfff, 0xfff, 0x3f7, 0xfff, 0x3d8,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x09f, 0x556, 0xfff, 0xfff, 0x02d, 0xfff, 0xfff,
+       0x553, 0xfff, 0xfff, 0xfff, 0x1f0, 0xfff, 0xfff, 0x4d6,
+       0x41e, 0xfff, 0xfff, 0xfff, 0xfff, 0x4d5, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x248, 0xfff, 0xfff, 0xfff, 0x0a3,
+       0xfff, 0x217, 0xfff, 0xfff, 0xfff, 0x4f1, 0x209, 0xfff,
+       0xfff, 0x475, 0x234, 0x52b, 0x398, 0xfff, 0x08b, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x2c2, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x268, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x4a3, 0xfff, 0x0aa, 0xfff, 0x1d9, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x155, 0xfff, 0xfff, 0xfff, 0xfff, 0x0bf,
+       0x539, 0xfff, 0xfff, 0x2f1, 0x545, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x2a7, 0x06f, 0xfff, 0x378, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x25e, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x15d, 0x02a, 0xfff, 0xfff, 0x0bc,
+       0x235, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x150, 0xfff, 0x1a9, 0xfff, 0xfff, 0xfff, 0xfff, 0x381,
+       0xfff, 0x04e, 0x270, 0x13f, 0xfff, 0xfff, 0x405, 0xfff,
+       0x3cd, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x2ef, 0xfff, 0x06a, 0xfff, 0xfff, 0xfff, 0x34f,
+       0x212, 0xfff, 0xfff, 0x0e2, 0xfff, 0x083, 0x298, 0xfff,
+       0xfff, 0xfff, 0x0c2, 0xfff, 0xfff, 0x52e, 0xfff, 0x488,
+       0xfff, 0xfff, 0xfff, 0x36b, 0xfff, 0xfff, 0xfff, 0x442,
+       0x091, 0xfff, 0x41c, 0xfff, 0xfff, 0x3a5, 0xfff, 0x4e6,
+       0xfff, 0xfff, 0x40d, 0x31d, 0xfff, 0xfff, 0xfff, 0x4c1,
+       0x053, 0xfff, 0x418, 0x13c, 0xfff, 0x350, 0xfff, 0x0ae,
+       0xfff, 0xfff, 0x41f, 0xfff, 0x470, 0xfff, 0x4ca, 0xfff,
+       0xfff, 0xfff, 0x02b, 0x450, 0xfff, 0x1f8, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x293, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x411, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x0b8, 0xfff, 0xfff, 0xfff,
+       0x3e1, 0xfff, 0xfff, 0xfff, 0xfff, 0x43c, 0xfff, 0x2b2,
+       0x2ab, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x1ec,
+       0xfff, 0xfff, 0xfff, 0x3f8, 0x034, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x11a, 0xfff, 0x541, 0x45c, 0x134,
+       0x1cc, 0xfff, 0xfff, 0xfff, 0x469, 0xfff, 0xfff, 0x44b,
+       0x161, 0xfff, 0xfff, 0xfff, 0x055, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x307, 0xfff, 0xfff, 0xfff, 0xfff, 0x2d1, 0xfff,
+       0xfff, 0xfff, 0x124, 0x37b, 0x26b, 0x336, 0xfff, 0xfff,
+       0x2e4, 0x3cb, 0xfff, 0xfff, 0x0f8, 0x3c8, 0xfff, 0xfff,
+       0xfff, 0x461, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4b5,
+       0x2cf, 0xfff, 0xfff, 0xfff, 0x20f, 0xfff, 0x35a, 0xfff,
+       0x490, 0xfff, 0x185, 0xfff, 0xfff, 0xfff, 0xfff, 0x42e,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x54b, 0xfff, 0xfff, 0xfff,
+       0x146, 0xfff, 0x412, 0xfff, 0xfff, 0xfff, 0x1ff, 0xfff,
+       0xfff, 0x3e0, 0xfff, 0xfff, 0xfff, 0xfff, 0x2d5, 0xfff,
+       0x4df, 0x505, 0xfff, 0x413, 0xfff, 0x1a5, 0xfff, 0x3b2,
+       0xfff, 0xfff, 0xfff, 0x35b, 0xfff, 0x116, 0xfff, 0xfff,
+       0x171, 0x4d0, 0xfff, 0x154, 0x12d, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x468, 0x4db, 0xfff,
+       0xfff, 0x1df, 0xfff, 0xfff, 0xfff, 0xfff, 0x05a, 0xfff,
+       0x0f1, 0x403, 0xfff, 0x22b, 0x2e0, 0xfff, 0xfff, 0xfff,
+       0x2b7, 0x373, 0xfff, 0xfff, 0xfff, 0xfff, 0x13e, 0xfff,
+       0xfff, 0xfff, 0x0d0, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x329, 0x1d2, 0x3fa, 0x047, 0xfff, 0x2f2, 0xfff, 0xfff,
+       0x141, 0x0ac, 0x1d7, 0xfff, 0x07d, 0xfff, 0xfff, 0xfff,
+       0x1c1, 0xfff, 0x487, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x045, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x288, 0x0cd, 0xfff, 0xfff, 0xfff, 0xfff, 0x226, 0x1d8,
+       0xfff, 0x153, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4cb,
+       0x528, 0xfff, 0xfff, 0xfff, 0x20a, 0x343, 0x3a1, 0xfff,
+       0xfff, 0xfff, 0x2d7, 0x2d3, 0x1aa, 0x4c5, 0xfff, 0xfff,
+       0xfff, 0x42b, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x3e9, 0xfff, 0x20b, 0x260,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x37c, 0x2fd,
+       0xfff, 0xfff, 0x2c8, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x31e, 0xfff, 0x335, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x135, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x35c, 0x4dd, 0x129, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x1ef, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x34e, 0xfff, 0xfff, 0xfff, 0xfff, 0x407, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x3ad, 0xfff, 0xfff, 0xfff,
+       0x379, 0xfff, 0xfff, 0x1d0, 0x38d, 0xfff, 0xfff, 0x1e8,
+       0x184, 0x3c1, 0x1c4, 0xfff, 0x1f9, 0xfff, 0xfff, 0x424,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x1d3, 0x0d4, 0xfff, 0x4e9,
+       0xfff, 0xfff, 0xfff, 0x530, 0x107, 0xfff, 0x106, 0x04f,
+       0xfff, 0xfff, 0x4c7, 0x503, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x15c, 0xfff, 0x23f, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x4f3, 0xfff, 0xfff, 0x3c7,
+       0xfff, 0x278, 0xfff, 0xfff, 0x0a6, 0xfff, 0xfff, 0xfff,
+       0x122, 0x1cf, 0xfff, 0x327, 0xfff, 0x2e5, 0xfff, 0x29d,
+       0xfff, 0xfff, 0x3f1, 0xfff, 0xfff, 0x48d, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x054, 0xfff, 0xfff, 0xfff, 0xfff, 0x178,
+       0x27e, 0x4e0, 0x352, 0x02f, 0x09c, 0xfff, 0x2a0, 0xfff,
+       0xfff, 0x46a, 0x457, 0xfff, 0xfff, 0x501, 0xfff, 0x2ba,
+       0xfff, 0xfff, 0xfff, 0x54e, 0x2e7, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x551, 0xfff, 0xfff, 0x1db, 0x2aa, 0xfff,
+       0xfff, 0x4bc, 0xfff, 0xfff, 0x395, 0xfff, 0x0de, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x455, 0xfff, 0x17e,
+       0xfff, 0x221, 0x4a7, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x388, 0xfff, 0xfff, 0xfff, 0x308, 0xfff, 0xfff, 0xfff,
+       0x20e, 0x4b9, 0xfff, 0x273, 0x20c, 0x09e, 0xfff, 0x057,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x3f2, 0xfff, 0x1a8, 0x3a6,
+       0x14c, 0xfff, 0xfff, 0x071, 0xfff, 0xfff, 0x53a, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x109, 0xfff, 0xfff, 0x399, 0xfff,
+       0x061, 0x4f0, 0x39e, 0x244, 0xfff, 0x035, 0xfff, 0xfff,
+       0x305, 0x47e, 0x297, 0xfff, 0xfff, 0x2b8, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x1bc, 0xfff, 0x2fc,
+       0xfff, 0xfff, 0x554, 0xfff, 0xfff, 0xfff, 0xfff, 0x3b6,
+       0xfff, 0xfff, 0xfff, 0x515, 0x397, 0xfff, 0xfff, 0x12f,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4e5,
+       0xfff, 0x4fc, 0xfff, 0xfff, 0x05e, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x0a8, 0x3af, 0x015, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x138, 0xfff, 0xfff, 0xfff, 0x540, 0xfff, 0xfff,
+       0xfff, 0x027, 0x523, 0x2f0, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x16c, 0xfff, 0x27d, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x04c, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4dc,
+       0xfff, 0xfff, 0x059, 0x301, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x1a3, 0xfff, 0x15a, 0xfff, 0xfff,
+       0x0a5, 0xfff, 0x435, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x051, 0xfff, 0xfff, 0x131, 0xfff, 0x4f4, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x441, 0xfff, 0x4fb, 0xfff, 0x03b,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x1ed, 0x274,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x0d3, 0x55e, 0x1b3,
+       0xfff, 0x0bd, 0xfff, 0xfff, 0xfff, 0xfff, 0x225, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x4b7, 0xfff, 0xfff, 0x2ff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4c3, 0xfff,
+       0x383, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x2f6,
+       0xfff, 0xfff, 0x1ee, 0xfff, 0x03d, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x26f, 0x1dc, 0xfff, 0x0db, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x0ce, 0xfff, 0xfff, 0x127, 0x03a,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x311, 0xfff,
+       0xfff, 0x13d, 0x09d, 0x47b, 0x2a6, 0x50d, 0x510, 0x19a,
+       0xfff, 0x354, 0x414, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x44c, 0x3b0, 0xfff, 0x23d, 0x429, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x4c0, 0x416, 0xfff, 0x05b, 0xfff, 0xfff, 0x137, 0xfff,
+       0x25f, 0x49f, 0xfff, 0x279, 0x013, 0xfff, 0xfff, 0xfff,
+       0x269, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x3d0, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x077, 0xfff, 0xfff, 0x3fb,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x271, 0x3a0, 0xfff, 0xfff,
+       0x40f, 0xfff, 0xfff, 0x3de, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x1ab, 0x26a,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x489, 0xfff, 0xfff,
+       0x252, 0xfff, 0xfff, 0xfff, 0xfff, 0x1b7, 0x42f, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x3b7,
+       0xfff, 0x2bb, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x0f7, 0x01d, 0xfff, 0x067, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x4e2, 0xfff, 0xfff, 0x4bb, 0xfff,
+       0xfff, 0xfff, 0x17b, 0xfff, 0x0ee, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x36e, 0xfff, 0xfff, 0xfff, 0x533, 0xfff,
+       0xfff, 0xfff, 0x4d4, 0x356, 0xfff, 0xfff, 0x375, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x4a4, 0x513, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4ff, 0xfff, 0x2af,
+       0xfff, 0xfff, 0x026, 0xfff, 0x0ad, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x26e, 0xfff, 0xfff, 0xfff, 0xfff, 0x493, 0xfff,
+       0x463, 0x4d2, 0x4be, 0xfff, 0xfff, 0xfff, 0xfff, 0x4f2,
+       0x0b6, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x32d, 0x315, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x13a, 0x4a1, 0xfff, 0x27a, 0xfff, 0xfff, 0xfff,
+       0x47a, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x334, 0xfff, 0xfff, 0xfff, 0xfff, 0x54c, 0xfff, 0xfff,
+       0xfff, 0x0c9, 0x007, 0xfff, 0xfff, 0x12e, 0xfff, 0x0ff,
+       0xfff, 0xfff, 0x3f5, 0x509, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x1c3, 0x2ad, 0xfff, 0xfff, 0x47c, 0x261, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x152, 0xfff, 0xfff, 0xfff, 0x339,
+       0xfff, 0x243, 0x1c0, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x063, 0xfff, 0xfff, 0x254, 0xfff, 0xfff, 0x173, 0xfff,
+       0x0c7, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x362, 0x259, 0x485, 0x374, 0x0dc, 0x3ab, 0xfff,
+       0x1c5, 0x534, 0x544, 0xfff, 0xfff, 0x508, 0xfff, 0x402,
+       0x408, 0xfff, 0x0e7, 0xfff, 0xfff, 0x00a, 0x205, 0xfff,
+       0xfff, 0x2b9, 0xfff, 0xfff, 0xfff, 0x465, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x23a, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x147, 0x19d, 0x115, 0x214, 0xfff, 0x090, 0x368,
+       0xfff, 0x210, 0xfff, 0xfff, 0x280, 0x52a, 0x163, 0x148,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x326, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x2de, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x206, 0x2c1, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x189, 0xfff, 0xfff, 0xfff, 0xfff, 0x367, 0xfff, 0x1a4,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x443, 0xfff, 0x27b,
+       0xfff, 0xfff, 0x251, 0x549, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x188, 0x04b, 0xfff, 0xfff, 0xfff, 0x31f,
+       0x4a6, 0xfff, 0x246, 0x1de, 0x156, 0xfff, 0xfff, 0xfff,
+       0x3a9, 0xfff, 0xfff, 0xfff, 0x2fa, 0xfff, 0x128, 0x0d1,
+       0x449, 0x255, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x258, 0xfff, 0xfff, 0xfff,
+       0x532, 0xfff, 0xfff, 0xfff, 0x303, 0x517, 0xfff, 0xfff,
+       0x2a9, 0x24a, 0xfff, 0xfff, 0x231, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x4b6, 0x516, 0xfff, 0xfff, 0x0e4, 0x0eb,
+       0xfff, 0x4e4, 0xfff, 0x275, 0xfff, 0xfff, 0x031, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x025, 0x21a, 0xfff, 0x0cc,
+       0x45f, 0x3d9, 0x289, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x23e, 0xfff, 0xfff, 0xfff, 0x438, 0x097,
+       0x419, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x0a9, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x37e, 0x0e0, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x431,
+       0x372, 0xfff, 0xfff, 0xfff, 0x1ba, 0x06e, 0xfff, 0x1b1,
+       0xfff, 0xfff, 0x12a, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x193, 0xfff, 0xfff, 0xfff, 0xfff, 0x10a,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x048, 0x1b4,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x295, 0x140, 0x108, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x16f, 0xfff, 0x0a4, 0x37a, 0xfff,
+       0x29a, 0xfff, 0x284, 0xfff, 0xfff, 0xfff, 0xfff, 0x4c6,
+       0x2a2, 0x3a3, 0xfff, 0x201, 0xfff, 0xfff, 0xfff, 0x4bd,
+       0x005, 0x54a, 0x3b5, 0x204, 0x2ee, 0x11d, 0x436, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x3ec, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x11f, 0x498, 0x21c, 0xfff,
+       0xfff, 0xfff, 0x3d6, 0xfff, 0x4ab, 0xfff, 0x432, 0x2eb,
+       0x542, 0x4fd, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x4ce, 0xfff, 0xfff, 0x2fb, 0xfff,
+       0xfff, 0x2e1, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x1b9, 0x037, 0x0dd,
+       0xfff, 0xfff, 0xfff, 0x2bf, 0x521, 0x496, 0x095, 0xfff,
+       0xfff, 0x328, 0x070, 0x1bf, 0xfff, 0x393, 0xfff, 0xfff,
+       0x102, 0xfff, 0xfff, 0x21b, 0xfff, 0x142, 0x263, 0x519,
+       0xfff, 0x2a5, 0x177, 0xfff, 0x14d, 0x471, 0x4ae, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x1f6, 0xfff, 0x481, 0xfff, 0xfff, 0xfff, 0x151, 0xfff,
+       0xfff, 0xfff, 0x085, 0x33f, 0xfff, 0xfff, 0xfff, 0x084,
+       0xfff, 0xfff, 0xfff, 0x345, 0x3a2, 0xfff, 0xfff, 0x0a0,
+       0x0da, 0x024, 0xfff, 0xfff, 0xfff, 0x1bd, 0xfff, 0x55c,
+       0x467, 0x445, 0xfff, 0xfff, 0xfff, 0x052, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x51e, 0xfff, 0xfff, 0x39d, 0xfff, 0x35f,
+       0xfff, 0x376, 0x3ee, 0xfff, 0xfff, 0xfff, 0xfff, 0x448,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x16a,
+       0xfff, 0x036, 0x38f, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x211,
+       0xfff, 0xfff, 0xfff, 0x230, 0xfff, 0xfff, 0x3ba, 0xfff,
+       0xfff, 0xfff, 0x3ce, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x229, 0xfff, 0x176, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x00b, 0xfff, 0x162, 0x018, 0xfff,
+       0xfff, 0x233, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x400, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x12b, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x3f4, 0xfff, 0x0f0, 0xfff, 0x1ac, 0xfff, 0xfff,
+       0x119, 0xfff, 0x2c0, 0xfff, 0xfff, 0xfff, 0x49b, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x23c, 0xfff,
+       0x4b3, 0x010, 0x064, 0xfff, 0xfff, 0x4ba, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x3c2, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x006, 0x196, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x100, 0x191, 0xfff,
+       0x1ea, 0x29f, 0xfff, 0xfff, 0xfff, 0x276, 0xfff, 0xfff,
+       0x2b1, 0x3b9, 0xfff, 0x03c, 0xfff, 0xfff, 0xfff, 0x180,
+       0xfff, 0x08f, 0xfff, 0xfff, 0x19e, 0x019, 0xfff, 0x0b0,
+       0x0fd, 0x332, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x06b, 0x2e8, 0xfff, 0x446, 0xfff, 0xfff, 0x004,
+       0x247, 0x197, 0xfff, 0x112, 0x169, 0x292, 0xfff, 0x302,
+       0xfff, 0xfff, 0x33b, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x287, 0x21f, 0xfff, 0x3ea, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x4e7, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x3a8, 0xfff, 0xfff, 0x2bc, 0xfff,
+       0x484, 0x296, 0xfff, 0x1c9, 0x08c, 0x1e5, 0x48a, 0xfff,
+       0x360, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x1ca, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x10d, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x066, 0x2ea, 0x28b, 0x25b, 0xfff, 0x072,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x2b6, 0xfff, 0xfff, 0x272,
+       0xfff, 0xfff, 0x525, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x2ca, 0xfff, 0xfff, 0xfff, 0x299, 0xfff, 0xfff, 0xfff,
+       0x558, 0x41a, 0xfff, 0x4f7, 0x557, 0xfff, 0x4a0, 0x344,
+       0x12c, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x125,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x40e, 0xfff, 0xfff, 0x502, 0xfff, 0x103, 0x3e6, 0xfff,
+       0x527, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x45d, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x44e, 0xfff, 0xfff, 0xfff, 0xfff, 0x0d2, 0x4c9, 0x35e,
+       0x459, 0x2d9, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x17d,
+       0x0c4, 0xfff, 0xfff, 0xfff, 0x3ac, 0x390, 0x094, 0xfff,
+       0x483, 0x0ab, 0xfff, 0x253, 0xfff, 0x391, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x123, 0x0ef, 0xfff, 0xfff, 0xfff, 0x330,
+       0x38c, 0xfff, 0xfff, 0x2ae, 0xfff, 0xfff, 0xfff, 0x042,
+       0x012, 0x06d, 0xfff, 0xfff, 0xfff, 0x32a, 0x3db, 0x364,
+       0x2dc, 0xfff, 0x30f, 0x3d7, 0x4a5, 0x050, 0xfff, 0xfff,
+       0x029, 0xfff, 0xfff, 0xfff, 0xfff, 0x1d1, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x480, 0xfff,
+       0x4ed, 0x081, 0x0a1, 0xfff, 0xfff, 0xfff, 0x30e, 0x52f,
+       0x257, 0xfff, 0xfff, 0x447, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x401, 0x3cc, 0xfff, 0xfff, 0x0fb,
+       0x2c9, 0x42a, 0x314, 0x33e, 0x3bd, 0x318, 0xfff, 0x10e,
+       0x2a1, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x24c,
+       0x506, 0xfff, 0x267, 0xfff, 0xfff, 0x219, 0xfff, 0x1eb,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x309, 0x3e2, 0x46c, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x384, 0xfff, 0xfff, 0xfff, 0xfff, 0x50c, 0xfff, 0x24b,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x038,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x194,
+       0x143, 0x3e3, 0xfff, 0xfff, 0xfff, 0x4c2, 0xfff, 0xfff,
+       0x0e1, 0x25c, 0xfff, 0x237, 0xfff, 0x1fe, 0xfff, 0xfff,
+       0xfff, 0x065, 0x2a4, 0xfff, 0x386, 0x55a, 0x11b, 0xfff,
+       0xfff, 0x192, 0xfff, 0x183, 0x00e, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x4b2, 0x18e, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x486, 0x4ef, 0x0c6, 0x380, 0xfff, 0x4a8, 0xfff,
+       0x0c5, 0xfff, 0xfff, 0xfff, 0xfff, 0x093, 0x1b8, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x2e6,
+       0xfff, 0x0f3, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x28e, 0xfff, 0x53b, 0x420, 0x22a, 0x33a, 0xfff, 0x387,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x2a3, 0xfff, 0xfff,
+       0xfff, 0x428, 0x500, 0xfff, 0xfff, 0x120, 0x2c6, 0x290,
+       0x2f5, 0x0e3, 0xfff, 0x0b7, 0xfff, 0x319, 0x474, 0xfff,
+       0xfff, 0xfff, 0x529, 0x014, 0xfff, 0x41b, 0x40a, 0x18b,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x0d9,
+       0xfff, 0x38a, 0xfff, 0xfff, 0xfff, 0xfff, 0x1ce, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x3b1, 0xfff, 0xfff, 0x05d,
+       0x2c4, 0xfff, 0xfff, 0x4af, 0xfff, 0x030, 0xfff, 0xfff,
+       0x203, 0xfff, 0x277, 0x256, 0xfff, 0xfff, 0xfff, 0x4f9,
+       0xfff, 0x2c7, 0xfff, 0x466, 0x016, 0x1cd, 0xfff, 0x167,
+       0xfff, 0xfff, 0x0c8, 0xfff, 0x43d, 0xfff, 0xfff, 0x020,
+       0xfff, 0xfff, 0x232, 0x1cb, 0x1e0, 0xfff, 0xfff, 0x347,
+       0xfff, 0x478, 0xfff, 0x365, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x358, 0xfff, 0x10b, 0xfff, 0x35d, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x452, 0x22d, 0xfff, 0xfff, 0x47d, 0xfff,
+       0x2f3, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x460, 0xfff,
+       0xfff, 0xfff, 0x50b, 0xfff, 0xfff, 0xfff, 0x2ec, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x4b1, 0x422, 0xfff, 0xfff,
+       0xfff, 0x2d4, 0xfff, 0x239, 0xfff, 0xfff, 0xfff, 0x439,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x491, 0x075, 0xfff, 0xfff, 0xfff, 0x06c, 0xfff,
+       0xfff, 0x0f9, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x139, 0xfff, 0x4f6, 0xfff, 0xfff, 0x409, 0xfff,
+       0xfff, 0x15b, 0xfff, 0xfff, 0x348, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x4a2, 0x49d, 0xfff, 0x033, 0x175, 0xfff, 0x039,
+       0xfff, 0x312, 0x40c, 0xfff, 0xfff, 0x325, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x4aa, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0x165, 0x3bc, 0x48c, 0x310, 0x096,
+       0xfff, 0xfff, 0x250, 0x1a2, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x20d, 0x2ac, 0xfff, 0xfff, 0x39b, 0xfff, 0x377, 0xfff,
+       0x512, 0x495, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x357, 0x4ea, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x198, 0xfff, 0xfff, 0xfff, 0x434, 0x04a,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x062, 0xfff, 0x1d6, 0x1c8,
+       0xfff, 0x1f3, 0x281, 0xfff, 0x462, 0xfff, 0xfff, 0xfff,
+       0x4b0, 0xfff, 0x207, 0xfff, 0xfff, 0xfff, 0xfff, 0x3dd,
+       0xfff, 0xfff, 0x55d, 0xfff, 0x552, 0x494, 0x1af, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x227, 0xfff, 0xfff, 0x069,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x43e,
+       0x0b5, 0xfff, 0x524, 0x2d2, 0xfff, 0xfff, 0xfff, 0x28f,
+       0xfff, 0x01b, 0x50e, 0xfff, 0xfff, 0x1bb, 0xfff, 0xfff,
+       0x41d, 0xfff, 0x32e, 0x48e, 0xfff, 0x1f7, 0x224, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x394, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x52c, 0xfff, 0xfff, 0xfff, 0x392, 0xfff, 0x1e7,
+       0xfff, 0xfff, 0x3f9, 0x3a7, 0xfff, 0x51f, 0xfff, 0x0bb,
+       0x118, 0x3ca, 0xfff, 0x1dd, 0xfff, 0x48b, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x50f, 0xfff, 0x0d6, 0xfff, 0x1fa, 0xfff,
+       0x11e, 0xfff, 0xfff, 0xfff, 0xfff, 0x4d7, 0xfff, 0x078,
+       0x008, 0xfff, 0x25d, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x032, 0x33c, 0xfff, 0x4d9, 0x160, 0xfff, 0xfff, 0x300,
+       0x0b1, 0xfff, 0x322, 0xfff, 0x4ec, 0xfff, 0xfff, 0x200,
+       0x00c, 0x369, 0x473, 0xfff, 0xfff, 0x32c, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x53e, 0x3d4, 0x417, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x34b, 0x001, 0x39a, 0x02c, 0xfff, 0xfff, 0x2ce, 0x00f,
+       0xfff, 0x0ba, 0xfff, 0xfff, 0xfff, 0xfff, 0x060, 0xfff,
+       0x406, 0xfff, 0xfff, 0xfff, 0x4ee, 0x4ac, 0xfff, 0x43f,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x29b, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x216,
+       0x190, 0xfff, 0x396, 0x464, 0xfff, 0xfff, 0x323, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x2e9, 0xfff, 0x26d,
+       0x2cd, 0x040, 0xfff, 0xfff, 0xfff, 0xfff, 0x38b, 0x3c0,
+       0xfff, 0xfff, 0xfff, 0x1f2, 0xfff, 0x0ea, 0xfff, 0xfff,
+       0x472, 0xfff, 0x1fb, 0xfff, 0xfff, 0x0af, 0x27f, 0xfff,
+       0xfff, 0xfff, 0x479, 0x023, 0xfff, 0x0d8, 0x3b3, 0xfff,
+       0xfff, 0xfff, 0x121, 0xfff, 0xfff, 0x3bf, 0xfff, 0xfff,
+       0x16b, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x45a, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x0be, 0xfff, 0xfff, 0xfff, 0x111, 0xfff, 0x220,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x09b, 0x218, 0xfff, 0x022, 0x202, 0xfff,
+       0x4c8, 0xfff, 0x0ed, 0xfff, 0xfff, 0x182, 0xfff, 0xfff,
+       0xfff, 0x17f, 0x213, 0xfff, 0x321, 0x36a, 0xfff, 0x086,
+       0xfff, 0xfff, 0xfff, 0x43b, 0x088, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x26c, 0xfff, 0x2f8, 0x3b4, 0xfff, 0xfff, 0xfff,
+       0x132, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x333, 0x444,
+       0x0c1, 0x4d8, 0x46d, 0x264, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x426, 0xfff, 0xfff, 0xfff, 0xfff, 0x2fe, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x011, 0xfff, 0x05f, 0xfff, 0xfff, 0xfff,
+       0xfff, 0x10c, 0x101, 0xfff, 0xfff, 0xfff, 0xfff, 0x110,
+       0xfff, 0x044, 0x304, 0x361, 0x404, 0xfff, 0x51b, 0x099,
+       0xfff, 0x440, 0xfff, 0xfff, 0xfff, 0x222, 0xfff, 0xfff,
+       0xfff, 0xfff, 0x1b5, 0xfff, 0x136, 0x430, 0xfff, 0x1da,
+       0xfff, 0xfff, 0xfff, 0x043, 0xfff, 0x17c, 0xfff, 0xfff,
+       0xfff, 0x01c, 0xfff, 0xfff, 0xfff, 0x425, 0x236, 0xfff,
+       0x317, 0xfff, 0xfff, 0x437, 0x3fc, 0xfff, 0x1f1, 0xfff,
+       0x324, 0xfff, 0xfff, 0x0ca, 0x306, 0xfff, 0x548, 0xfff,
+       0x46e, 0xfff, 0xfff, 0xfff, 0x4b8, 0x1c2, 0x286, 0xfff,
+       0xfff, 0x087, 0x18a, 0x19f, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x18c, 0xfff, 0x215, 0xfff, 0xfff, 0xfff, 0xfff, 0x283,
+       0xfff, 0xfff, 0xfff, 0x126, 0xfff, 0xfff, 0x370, 0xfff,
+       0x53f, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0x31c, 0xfff,
+       0x4d1, 0xfff, 0xfff, 0xfff, 0x021, 0xfff, 0x157, 0xfff,
+       0xfff, 0x028, 0x16e, 0xfff, 0x421, 0xfff, 0x1c6, 0xfff,
+       0xfff, 0x511, 0xfff, 0xfff, 0x39c, 0x46f, 0x1b2, 0xfff,
+       0xfff, 0x316, 0xfff, 0xfff, 0x009, 0xfff, 0xfff, 0x195,
+       0xfff, 0x240, 0x546, 0xfff, 0xfff, 0x520, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x454, 0xfff, 0xfff, 0xfff,
+       0x3f3, 0xfff, 0xfff, 0x187, 0xfff, 0x4a9, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x51c, 0x453, 0x1e6, 0xfff,
+       0xfff, 0xfff, 0x1b0, 0xfff, 0x477, 0xfff, 0xfff, 0xfff,
+       0x4fe, 0xfff, 0x32f, 0xfff, 0xfff, 0x15e, 0x1d4, 0xfff,
+       0x0e5, 0xfff, 0xfff, 0xfff, 0x242, 0x14b, 0x046, 0xfff,
+       0x3f6, 0x3bb, 0x3e4, 0xfff, 0xfff, 0x2e3, 0xfff, 0x245,
+       0xfff, 0x149, 0xfff, 0xfff, 0xfff, 0x2db, 0xfff, 0xfff,
+       0x181, 0xfff, 0x089, 0x2c5, 0xfff, 0x1f5, 0xfff, 0x2d6,
+       0x507, 0xfff, 0x42d, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0x080, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff, 0xfff,
+       0xfff, 0xfff, 0xfff, 0xfff, 0x3c3, 0x320, 0xfff, 0x1e1,
+       0xfff, 0x0f5, 0x13b, 0xfff, 0xfff, 0xfff, 0x003, 0x4da,
+       0xfff, 0xfff, 0xfff, 0x42c, 0xfff, 0xfff, 0x0cb, 0xfff,
+       0x536, 0x2c3, 0xfff, 0xfff, 0xfff, 0xfff, 0x199, 0xfff,
+       0xfff, 0x0c0, 0xfff, 0x01e, 0x497, 0xfff, 0xfff, 0x3e5,
+       0xfff, 0xfff, 0xfff, 0x0cf, 0xfff, 0x2bd, 0xfff, 0x223,
+       0xfff, 0x3ff, 0xfff, 0x058, 0x174, 0x3ef, 0xfff, 0x002
+};
+
+static unsigned short err_pos(unsigned short din)
+{
+       BUG_ON(din > 4096);
+       return err_pos_lut[din];
+}
+static int chk_no_err_only(unsigned short *chk_syndrome_list, unsigned short *err_info)
+{
+       if ((chk_syndrome_list[0] | chk_syndrome_list[1] |
+            chk_syndrome_list[2] | chk_syndrome_list[3] |
+            chk_syndrome_list[4] | chk_syndrome_list[5] |
+            chk_syndrome_list[6] | chk_syndrome_list[7]) != 0x0) {
+               return -EINVAL;
+       } else {
+               err_info[0] = 0x0;
+               return 0;
+       }
+}
+static int chk_1_err_only(unsigned short *chk_syndrome_list, unsigned short *err_info)
+{
+       unsigned short tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+       tmp0 = gf4096_mul(chk_syndrome_list[1], gf4096_inv(chk_syndrome_list[0]));
+       tmp1 = gf4096_mul(chk_syndrome_list[2], gf4096_inv(chk_syndrome_list[1]));
+       tmp2 = gf4096_mul(chk_syndrome_list[3], gf4096_inv(chk_syndrome_list[2]));
+       tmp3 = gf4096_mul(chk_syndrome_list[4], gf4096_inv(chk_syndrome_list[3]));
+       tmp4 = gf4096_mul(chk_syndrome_list[5], gf4096_inv(chk_syndrome_list[4]));
+       tmp5 = gf4096_mul(chk_syndrome_list[6], gf4096_inv(chk_syndrome_list[5]));
+       tmp6 = gf4096_mul(chk_syndrome_list[7], gf4096_inv(chk_syndrome_list[6]));
+       if ((tmp0 == tmp1) & (tmp1 == tmp2) & (tmp2 == tmp3) & (tmp3 == tmp4) & (tmp4 == tmp5) & (tmp5 == tmp6)) {
+               err_info[0] = 0x1;      // encode 1-symbol error as 0x1
+               err_info[1] = err_pos(tmp0);
+               err_info[1] = (unsigned short)(0x55e - err_info[1]);
+               err_info[5] = chk_syndrome_list[0];
+               return 0;
+       } else
+               return -EINVAL;
+}
+static int chk_2_err_only(unsigned short *chk_syndrome_list, unsigned short *err_info)
+{
+       unsigned short tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+       unsigned short coefs[4];
+       unsigned short err_pats[4];
+       int found_num_root = 0;
+       unsigned short bit2_root0, bit2_root1;
+       unsigned short bit2_root0_inv, bit2_root1_inv;
+       unsigned short err_loc_eqn, test_root;
+       unsigned short bit2_loc0, bit2_loc1;
+       unsigned short bit2_pat0, bit2_pat1;
+
+       find_2x2_soln(chk_syndrome_list[1],
+                     chk_syndrome_list[0],
+                     chk_syndrome_list[2], chk_syndrome_list[1], chk_syndrome_list[2], chk_syndrome_list[3], coefs);
+       for (test_root = 0x1; test_root < 0xfff; test_root++) {
+               err_loc_eqn =
+                   gf4096_mul(coefs[1], gf4096_mul(test_root, test_root)) ^ gf4096_mul(coefs[0], test_root) ^ 0x1;
+               if (err_loc_eqn == 0x0) {
+                       if (found_num_root == 0) {
+                               bit2_root0 = test_root;
+                               found_num_root = 1;
+                       } else if (found_num_root == 1) {
+                               bit2_root1 = test_root;
+                               found_num_root = 2;
+                               break;
+                       }
+               }
+       }
+       if (found_num_root != 2)
+               return -EINVAL;
+       else {
+               bit2_root0_inv = gf4096_inv(bit2_root0);
+               bit2_root1_inv = gf4096_inv(bit2_root1);
+               find_2bit_err_pats(chk_syndrome_list[0],
+                                  chk_syndrome_list[1], bit2_root0_inv, bit2_root1_inv, err_pats);
+               bit2_pat0 = err_pats[0];
+               bit2_pat1 = err_pats[1];
+               //for(x+1)
+               tmp0 = gf4096_mul(gf4096_mul(bit2_root0_inv, bit2_root0_inv), gf4096_mul(bit2_root0_inv, bit2_root0_inv));      //rinv0^4
+               tmp1 = gf4096_mul(bit2_root0_inv, tmp0);        //rinv0^5
+               tmp2 = gf4096_mul(bit2_root0_inv, tmp1);        //rinv0^6
+               tmp3 = gf4096_mul(bit2_root0_inv, tmp2);        //rinv0^7
+               tmp4 = gf4096_mul(gf4096_mul(bit2_root1_inv, bit2_root1_inv), gf4096_mul(bit2_root1_inv, bit2_root1_inv));      //rinv1^4
+               tmp5 = gf4096_mul(bit2_root1_inv, tmp4);        //rinv1^5
+               tmp6 = gf4096_mul(bit2_root1_inv, tmp5);        //rinv1^6
+               tmp7 = gf4096_mul(bit2_root1_inv, tmp6);        //rinv1^7
+               //check if only 2-bit error
+               if ((chk_syndrome_list[4] ==
+                    (gf4096_mul(bit2_pat0, tmp0) ^
+                     gf4096_mul(bit2_pat1,
+                                tmp4))) & (chk_syndrome_list[5] ==
+                                           (gf4096_mul(bit2_pat0, tmp1) ^
+                                            gf4096_mul(bit2_pat1,
+                                                       tmp5))) &
+                   (chk_syndrome_list[6] ==
+                    (gf4096_mul(bit2_pat0, tmp2) ^
+                     gf4096_mul(bit2_pat1,
+                                tmp6))) & (chk_syndrome_list[7] ==
+                                           (gf4096_mul(bit2_pat0, tmp3) ^ gf4096_mul(bit2_pat1, tmp7)))) {
+                       if ((err_pos(bit2_root0_inv) == 0xfff) | (err_pos(bit2_root1_inv) == 0xfff)) {
+                               return -EINVAL;
+                       } else {
+                               bit2_loc0 = 0x55e - err_pos(bit2_root0_inv);
+                               bit2_loc1 = 0x55e - err_pos(bit2_root1_inv);
+                               err_info[0] = 0x2;      // encode 2-symbol error as 0x2
+                               err_info[1] = bit2_loc0;
+                               err_info[2] = bit2_loc1;
+                               err_info[5] = bit2_pat0;
+                               err_info[6] = bit2_pat1;
+                               return 0;
+                       }
+               } else
+                       return -EINVAL;
+       }
+}
+static int chk_3_err_only(unsigned short *chk_syndrome_list, unsigned short *err_info)
+{
+       unsigned short tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+       unsigned short coefs[4];
+       unsigned short err_pats[4];
+       int found_num_root = 0;
+       unsigned short bit3_root0, bit3_root1, bit3_root2;
+       unsigned short bit3_root0_inv, bit3_root1_inv, bit3_root2_inv;
+       unsigned short err_loc_eqn, test_root;
+
+       find_3bit_err_coefs(chk_syndrome_list[0], chk_syndrome_list[1],
+                           chk_syndrome_list[2], chk_syndrome_list[3],
+                           chk_syndrome_list[4], chk_syndrome_list[5], coefs);
+
+       for (test_root = 0x1; test_root < 0xfff; test_root++) {
+               err_loc_eqn = gf4096_mul(coefs[2],
+                                        gf4096_mul(gf4096_mul(test_root, test_root),
+                                                   test_root)) ^ gf4096_mul(coefs[1], gf4096_mul(test_root, test_root))
+                       ^ gf4096_mul(coefs[0], test_root) ^ 0x1;
+
+               if (err_loc_eqn == 0x0) {
+                       if (found_num_root == 0) {
+                               bit3_root0 = test_root;
+                               found_num_root = 1;
+                       } else if (found_num_root == 1) {
+                               bit3_root1 = test_root;
+                               found_num_root = 2;
+                       } else if (found_num_root == 2) {
+                               bit3_root2 = test_root;
+                               found_num_root = 3;
+                               break;
+                       }
+               }
+       }
+       if (found_num_root != 3)
+               return -EINVAL;
+       else {
+               bit3_root0_inv = gf4096_inv(bit3_root0);
+               bit3_root1_inv = gf4096_inv(bit3_root1);
+               bit3_root2_inv = gf4096_inv(bit3_root2);
+
+               find_3bit_err_pats(chk_syndrome_list[0], chk_syndrome_list[1],
+                                  chk_syndrome_list[2], bit3_root0_inv,
+                                  bit3_root1_inv, bit3_root2_inv, err_pats);
+
+               //check if only 3-bit error
+               tmp0 = gf4096_mul(bit3_root0_inv, bit3_root0_inv);
+               tmp0 = gf4096_mul(tmp0, tmp0);
+               tmp0 = gf4096_mul(tmp0, bit3_root0_inv);
+               tmp0 = gf4096_mul(tmp0, bit3_root0_inv);        //rinv0^6
+               tmp1 = gf4096_mul(tmp0, bit3_root0_inv);        //rinv0^7
+               tmp2 = gf4096_mul(bit3_root1_inv, bit3_root1_inv);
+               tmp2 = gf4096_mul(tmp2, tmp2);
+               tmp2 = gf4096_mul(tmp2, bit3_root1_inv);
+               tmp2 = gf4096_mul(tmp2, bit3_root1_inv);        //rinv1^6
+               tmp3 = gf4096_mul(tmp2, bit3_root1_inv);        //rinv1^7
+               tmp4 = gf4096_mul(bit3_root2_inv, bit3_root2_inv);
+               tmp4 = gf4096_mul(tmp4, tmp4);
+               tmp4 = gf4096_mul(tmp4, bit3_root2_inv);
+               tmp4 = gf4096_mul(tmp4, bit3_root2_inv);        //rinv2^6
+               tmp5 = gf4096_mul(tmp4, bit3_root2_inv);        //rinv2^7
+
+               //check if only 3 errors
+               if ((chk_syndrome_list[6] == (gf4096_mul(err_pats[0], tmp0) ^
+                                             gf4096_mul(err_pats[1], tmp2) ^
+                                             gf4096_mul(err_pats[2], tmp4))) &
+                   (chk_syndrome_list[7] == (gf4096_mul(err_pats[0], tmp1) ^
+                                             gf4096_mul(err_pats[1], tmp3) ^ gf4096_mul(err_pats[2], tmp5)))) {
+                       if ((err_pos(bit3_root0_inv) == 0xfff) |
+                           (err_pos(bit3_root1_inv) == 0xfff) | (err_pos(bit3_root2_inv) == 0xfff)) {
+                               return -EINVAL;
+                       } else {
+                               err_info[0] = 0x3;
+                               err_info[1] = (0x55e - err_pos(bit3_root0_inv));
+                               err_info[2] = (0x55e - err_pos(bit3_root1_inv));
+                               err_info[3] = (0x55e - err_pos(bit3_root2_inv));
+                               err_info[5] = err_pats[0];
+                               err_info[6] = err_pats[1];
+                               err_info[7] = err_pats[2];
+                               return 0;
+                       }
+               } else
+                       return -EINVAL;
+       }
+}
+static int chk_4_err_only(unsigned short *chk_syndrome_list, unsigned short *err_info)
+{
+       unsigned short coefs[4];
+       unsigned short err_pats[4];
+       int found_num_root = 0;
+       unsigned short bit4_root0, bit4_root1, bit4_root2, bit4_root3;
+       unsigned short bit4_root0_inv, bit4_root1_inv, bit4_root2_inv, bit4_root3_inv;
+       unsigned short err_loc_eqn, test_root;
+
+       find_4bit_err_coefs(chk_syndrome_list[0],
+                           chk_syndrome_list[1],
+                           chk_syndrome_list[2],
+                           chk_syndrome_list[3],
+                           chk_syndrome_list[4],
+                           chk_syndrome_list[5], chk_syndrome_list[6], chk_syndrome_list[7], coefs);
+
+       for (test_root = 0x1; test_root < 0xfff; test_root++) {
+               err_loc_eqn =
+                   gf4096_mul(coefs[3],
+                              gf4096_mul(gf4096_mul
+                                         (gf4096_mul(test_root, test_root),
+                                          test_root),
+                                         test_root)) ^ gf4096_mul(coefs[2],
+                                                                  gf4096_mul
+                                                                  (gf4096_mul(test_root, test_root), test_root))
+                   ^ gf4096_mul(coefs[1], gf4096_mul(test_root, test_root)) ^ gf4096_mul(coefs[0], test_root)
+                   ^ 0x1;
+               if (err_loc_eqn == 0x0) {
+                       if (found_num_root == 0) {
+                               bit4_root0 = test_root;
+                               found_num_root = 1;
+                       } else if (found_num_root == 1) {
+                               bit4_root1 = test_root;
+                               found_num_root = 2;
+                       } else if (found_num_root == 2) {
+                               bit4_root2 = test_root;
+                               found_num_root = 3;
+                       } else {
+                               found_num_root = 4;
+                               bit4_root3 = test_root;
+                               break;
+                       }
+               }
+       }
+       if (found_num_root != 4) {
+               return -EINVAL;
+       } else {
+               bit4_root0_inv = gf4096_inv(bit4_root0);
+               bit4_root1_inv = gf4096_inv(bit4_root1);
+               bit4_root2_inv = gf4096_inv(bit4_root2);
+               bit4_root3_inv = gf4096_inv(bit4_root3);
+               find_4bit_err_pats(chk_syndrome_list[0],
+                                  chk_syndrome_list[1],
+                                  chk_syndrome_list[2],
+                                  chk_syndrome_list[3],
+                                  bit4_root0_inv, bit4_root1_inv, bit4_root2_inv, bit4_root3_inv, err_pats);
+               err_info[0] = 0x4;
+               err_info[1] = (0x55e - err_pos(bit4_root0_inv));
+               err_info[2] = (0x55e - err_pos(bit4_root1_inv));
+               err_info[3] = (0x55e - err_pos(bit4_root2_inv));
+               err_info[4] = (0x55e - err_pos(bit4_root3_inv));
+               err_info[5] = err_pats[0];
+               err_info[6] = err_pats[1];
+               err_info[7] = err_pats[2];
+               err_info[8] = err_pats[3];
+               return 0;
+       }
+}
+
+void correct_12bit_symbol(unsigned char *buf, unsigned short sym,
+                         unsigned short val)
+{
+       if (unlikely(sym > 1366)) {
+               printk(KERN_ERR "Error: symbol %d out of range; cannot correct\n", sym);
+       } else if (sym == 0) {
+               buf[0] ^= val;
+       } else if (sym & 1) {
+               buf[1+(3*(sym-1))/2] ^= (val >> 4);
+               buf[2+(3*(sym-1))/2] ^= ((val & 0xf) << 4);
+       } else {
+               buf[2+(3*(sym-2))/2] ^= (val >> 8);
+               buf[3+(3*(sym-2))/2] ^= (val & 0xff);
+       }
+}
+
+static int debugecc = 0;
+module_param(debugecc, int, 0644);
+
+int cafe_correct_ecc(unsigned char *buf,
+                    unsigned short *chk_syndrome_list)
+{
+       unsigned short err_info[9];
+       int i;
+
+       if (debugecc) {
+               printk(KERN_WARNING "cafe_correct_ecc invoked. Syndromes %x %x %x %x %x %x %x %x\n",
+                      chk_syndrome_list[0], chk_syndrome_list[1],
+                      chk_syndrome_list[2], chk_syndrome_list[3],
+                      chk_syndrome_list[4], chk_syndrome_list[5],
+                      chk_syndrome_list[6], chk_syndrome_list[7]);
+               for (i=0; i < 2048; i+=16) {
+                       printk(KERN_WARNING "D %04x: %02x %02x %02x %02x %02x %02x %02x %02x  %02x %02x %02x %02x %02x %02x %02x %02x\n",
+                              i,
+                              buf[i], buf[i+1], buf[i+2], buf[i+3],
+                              buf[i+4], buf[i+5], buf[i+6], buf[i+7],
+                              buf[i+8], buf[i+9], buf[i+10], buf[i+11],
+                              buf[i+12], buf[i+13], buf[i+14], buf[i+15]);
+               }
+               for ( ; i < 2112; i+=16) {
+                       printk(KERN_WARNING "O   %02x: %02x %02x %02x %02x %02x %02x %02x %02x  %02x %02x %02x %02x %02x %02x %02x %02x\n",
+                              i - 2048,
+                              buf[i], buf[i+1], buf[i+2], buf[i+3],
+                              buf[i+4], buf[i+5], buf[i+6], buf[i+7],
+                              buf[i+8], buf[i+9], buf[i+10], buf[i+11],
+                              buf[i+12], buf[i+13], buf[i+14], buf[i+15]);
+               }
+       }
+
+
+
+       if (chk_no_err_only(chk_syndrome_list, err_info) &&
+           chk_1_err_only(chk_syndrome_list, err_info) &&
+           chk_2_err_only(chk_syndrome_list, err_info) &&
+           chk_3_err_only(chk_syndrome_list, err_info) &&
+           chk_4_err_only(chk_syndrome_list, err_info)) {
+               return -EIO;
+       }
+
+       for (i=0; i < err_info[0]; i++) {
+               if (debugecc)
+                       printk(KERN_WARNING "Correct symbol %d with 0x%03x\n",
+                              err_info[1+i], err_info[5+i]);
+
+               correct_12bit_symbol(buf, err_info[1+i], err_info[5+i]);
+       }
+
+       return err_info[0];
+}
+
index 94924d52a9b96d10121ac34f26d3447702eb0ae7..8296305c8297e214914b2af60e96b656f39ac916 100644 (file)
@@ -11,7 +11,7 @@
  * published by the Free Software Foundation.
  *
  *  Overview:
- *   This is a device driver for the NAND flash controller found on 
+ *   This is a device driver for the NAND flash controller found on
  *   the AMD CS5535/CS5536 companion chipsets for the Geode processor.
  *
  */
@@ -303,7 +303,7 @@ static int __init cs553x_init(void)
                        err = cs553x_init_one(i, !!(val & FLSH_MEM_IO), val & 0xFFFFFFFF);
        }
 
-       /* Register all devices together here. This means we can easily hack it to 
+       /* Register all devices together here. This means we can easily hack it to
           do mtdconcat etc. if we want to. */
        for (i = 0; i < NR_CS553X_CONTROLLERS; i++) {
                if (cs553x_mtd[i]) {
index 6107f532855b8d4dbb901ff83c721e76a0b59af2..12608c13cce5b2365c3aaf5e77f2481ec9bef241 100644 (file)
@@ -1635,13 +1635,12 @@ static int __init doc_probe(unsigned long physadr)
 
        len = sizeof(struct mtd_info) +
            sizeof(struct nand_chip) + sizeof(struct doc_priv) + (2 * sizeof(struct nand_bbt_descr));
-       mtd = kmalloc(len, GFP_KERNEL);
+       mtd = kzalloc(len, GFP_KERNEL);
        if (!mtd) {
                printk(KERN_ERR "DiskOnChip kmalloc (%d bytes) failed!\n", len);
                ret = -ENOMEM;
                goto fail;
        }
-       memset(mtd, 0, len);
 
        nand                    = (struct nand_chip *) (mtd + 1);
        doc                     = (struct doc_priv *) (nand + 1);
index 41bfcae1fbf46ebbfb8aa2457efaf9f7d1723529..dfe56e03e48b0bf9ca9bfa89fc4b11e5e15d4dc6 100644 (file)
@@ -362,7 +362,7 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
                 * access
                 */
                ofs += mtd->oobsize;
-               chip->ops.len = 2;
+               chip->ops.len = chip->ops.ooblen = 2;
                chip->ops.datbuf = NULL;
                chip->ops.oobbuf = buf;
                chip->ops.ooboffs = chip->badblockpos & ~0x01;
@@ -755,7 +755,7 @@ static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
- * nand_read_page_swecc - {REPLACABLE] software ecc based page read function
+ * nand_read_page_swecc - [REPLACABLE] software ecc based page read function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
@@ -795,7 +795,7 @@ static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
- * nand_read_page_hwecc - {REPLACABLE] hardware ecc based page read function
+ * nand_read_page_hwecc - [REPLACABLE] hardware ecc based page read function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
@@ -839,7 +839,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
- * nand_read_page_syndrome - {REPLACABLE] hardware ecc syndrom based page read
+ * nand_read_page_syndrome - [REPLACABLE] hardware ecc syndrom based page read
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
@@ -897,12 +897,11 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
  * @chip:      nand chip structure
  * @oob:       oob destination address
  * @ops:       oob ops structure
+ * @len:       size of oob to transfer
  */
 static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob,
-                                 struct mtd_oob_ops *ops)
+                                 struct mtd_oob_ops *ops, size_t len)
 {
-       size_t len = ops->ooblen;
-
        switch(ops->mode) {
 
        case MTD_OOB_PLACE:
@@ -960,6 +959,7 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
        int sndcmd = 1;
        int ret = 0;
        uint32_t readlen = ops->len;
+       uint32_t oobreadlen = ops->ooblen;
        uint8_t *bufpoi, *oob, *buf;
 
        stats = mtd->ecc_stats;
@@ -971,7 +971,6 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
        page = realpage & chip->pagemask;
 
        col = (int)(from & (mtd->writesize - 1));
-       chip->oob_poi = chip->buffers->oobrbuf;
 
        buf = ops->datbuf;
        oob = ops->oobbuf;
@@ -1007,10 +1006,17 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
 
                        if (unlikely(oob)) {
                                /* Raw mode does data:oob:data:oob */
-                               if (ops->mode != MTD_OOB_RAW)
-                                       oob = nand_transfer_oob(chip, oob, ops);
-                               else
-                                       buf = nand_transfer_oob(chip, buf, ops);
+                               if (ops->mode != MTD_OOB_RAW) {
+                                       int toread = min(oobreadlen,
+                                               chip->ecc.layout->oobavail);
+                                       if (toread) {
+                                               oob = nand_transfer_oob(chip,
+                                                       oob, ops, toread);
+                                               oobreadlen -= toread;
+                                       }
+                               } else
+                                       buf = nand_transfer_oob(chip,
+                                               buf, ops, mtd->oobsize);
                        }
 
                        if (!(chip->options & NAND_NO_READRDY)) {
@@ -1057,6 +1063,8 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
        }
 
        ops->retlen = ops->len - (size_t) readlen;
+       if (oob)
+               ops->oobretlen = ops->ooblen - oobreadlen;
 
        if (ret)
                return ret;
@@ -1257,12 +1265,18 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
        int page, realpage, chipnr, sndcmd = 1;
        struct nand_chip *chip = mtd->priv;
        int blkcheck = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1;
-       int readlen = ops->len;
+       int readlen = ops->ooblen;
+       int len;
        uint8_t *buf = ops->oobbuf;
 
        DEBUG(MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08Lx, len = %i\n",
              (unsigned long long)from, readlen);
 
+       if (ops->mode == MTD_OOB_RAW)
+               len = mtd->oobsize;
+       else
+               len = chip->ecc.layout->oobavail;
+
        chipnr = (int)(from >> chip->chip_shift);
        chip->select_chip(mtd, chipnr);
 
@@ -1270,11 +1284,11 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
        realpage = (int)(from >> chip->page_shift);
        page = realpage & chip->pagemask;
 
-       chip->oob_poi = chip->buffers->oobrbuf;
-
        while(1) {
                sndcmd = chip->ecc.read_oob(mtd, chip, page, sndcmd);
-               buf = nand_transfer_oob(chip, buf, ops);
+
+               len = min(len, readlen);
+               buf = nand_transfer_oob(chip, buf, ops, len);
 
                if (!(chip->options & NAND_NO_READRDY)) {
                        /*
@@ -1289,7 +1303,7 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
                                nand_wait_ready(mtd);
                }
 
-               readlen -= ops->ooblen;
+               readlen -= len;
                if (!readlen)
                        break;
 
@@ -1311,7 +1325,7 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
                        sndcmd = 1;
        }
 
-       ops->retlen = ops->len;
+       ops->oobretlen = ops->ooblen;
        return 0;
 }
 
@@ -1332,7 +1346,7 @@ static int nand_read_oob(struct mtd_info *mtd, loff_t from,
        ops->retlen = 0;
 
        /* Do not allow reads past end of device */
-       if ((from + ops->len) > mtd->size) {
+       if (ops->datbuf && (from + ops->len) > mtd->size) {
                DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
                      "Attempt read beyond end of device\n");
                return -EINVAL;
@@ -1375,7 +1389,7 @@ static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
- * nand_write_page_swecc - {REPLACABLE] software ecc based page write function
+ * nand_write_page_swecc - [REPLACABLE] software ecc based page write function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       data buffer
@@ -1401,7 +1415,7 @@ static void nand_write_page_swecc(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
- * nand_write_page_hwecc - {REPLACABLE] hardware ecc based page write function
+ * nand_write_page_hwecc - [REPLACABLE] hardware ecc based page write function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       data buffer
@@ -1429,7 +1443,7 @@ static void nand_write_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
 }
 
 /**
- * nand_write_page_syndrome - {REPLACABLE] hardware ecc syndrom based page write
+ * nand_write_page_syndrome - [REPLACABLE] hardware ecc syndrom based page write
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       data buffer
@@ -1577,7 +1591,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
        return NULL;
 }
 
-#define NOTALIGNED(x) (x & (mtd->writesize-1)) != 0
+#define NOTALIGNED(x)  (x & (chip->subpagesize - 1)) != 0
 
 /**
  * nand_do_write_ops - [Internal] NAND write with ECC
@@ -1590,15 +1604,16 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
 static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
                             struct mtd_oob_ops *ops)
 {
-       int chipnr, realpage, page, blockmask;
+       int chipnr, realpage, page, blockmask, column;
        struct nand_chip *chip = mtd->priv;
        uint32_t writelen = ops->len;
        uint8_t *oob = ops->oobbuf;
        uint8_t *buf = ops->datbuf;
-       int bytes = mtd->writesize;
-       int ret;
+       int ret, subpage;
 
        ops->retlen = 0;
+       if (!writelen)
+               return 0;
 
        /* reject writes, which are not page aligned */
        if (NOTALIGNED(to) || NOTALIGNED(ops->len)) {
@@ -1607,8 +1622,11 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
                return -EINVAL;
        }
 
-       if (!writelen)
-               return 0;
+       column = to & (mtd->writesize - 1);
+       subpage = column || (writelen & (mtd->writesize - 1));
+
+       if (subpage && oob)
+               return -EINVAL;
 
        chipnr = (int)(to >> chip->chip_shift);
        chip->select_chip(mtd, chipnr);
@@ -1626,15 +1644,29 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
            (chip->pagebuf << chip->page_shift) < (to + ops->len))
                chip->pagebuf = -1;
 
-       chip->oob_poi = chip->buffers->oobwbuf;
+       /* If we're not given explicit OOB data, let it be 0xFF */
+       if (likely(!oob))
+               memset(chip->oob_poi, 0xff, mtd->oobsize);
 
        while(1) {
+               int bytes = mtd->writesize;
                int cached = writelen > bytes && page != blockmask;
+               uint8_t *wbuf = buf;
+
+               /* Partial page write ? */
+               if (unlikely(column || writelen < (mtd->writesize - 1))) {
+                       cached = 0;
+                       bytes = min_t(int, bytes - column, (int) writelen);
+                       chip->pagebuf = -1;
+                       memset(chip->buffers->databuf, 0xff, mtd->writesize);
+                       memcpy(&chip->buffers->databuf[column], buf, bytes);
+                       wbuf = chip->buffers->databuf;
+               }
 
                if (unlikely(oob))
                        oob = nand_fill_oob(chip, oob, ops);
 
-               ret = chip->write_page(mtd, chip, buf, page, cached,
+               ret = chip->write_page(mtd, chip, wbuf, page, cached,
                                       (ops->mode == MTD_OOB_RAW));
                if (ret)
                        break;
@@ -1643,6 +1675,7 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
                if (!writelen)
                        break;
 
+               column = 0;
                buf += bytes;
                realpage++;
 
@@ -1655,10 +1688,9 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
                }
        }
 
-       if (unlikely(oob))
-               memset(chip->oob_poi, 0xff, mtd->oobsize);
-
        ops->retlen = ops->len - writelen;
+       if (unlikely(oob))
+               ops->oobretlen = ops->ooblen;
        return ret;
 }
 
@@ -1714,10 +1746,10 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
        struct nand_chip *chip = mtd->priv;
 
        DEBUG(MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n",
-             (unsigned int)to, (int)ops->len);
+             (unsigned int)to, (int)ops->ooblen);
 
        /* Do not allow write past end of page */
-       if ((ops->ooboffs + ops->len) > mtd->oobsize) {
+       if ((ops->ooboffs + ops->ooblen) > mtd->oobsize) {
                DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
                      "Attempt to write past end of page\n");
                return -EINVAL;
@@ -1745,7 +1777,6 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
        if (page == chip->pagebuf)
                chip->pagebuf = -1;
 
-       chip->oob_poi = chip->buffers->oobwbuf;
        memset(chip->oob_poi, 0xff, mtd->oobsize);
        nand_fill_oob(chip, ops->oobbuf, ops);
        status = chip->ecc.write_oob(mtd, chip, page & chip->pagemask);
@@ -1754,7 +1785,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
        if (status)
                return status;
 
-       ops->retlen = ops->len;
+       ops->oobretlen = ops->ooblen;
 
        return 0;
 }
@@ -1774,7 +1805,7 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
        ops->retlen = 0;
 
        /* Do not allow writes past end of device */
-       if ((to + ops->len) > mtd->size) {
+       if (ops->datbuf && (to + ops->len) > mtd->size) {
                DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
                      "Attempt read beyond end of device\n");
                return -EINVAL;
@@ -2188,8 +2219,8 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
        /* Newer devices have all the information in additional id bytes */
        if (!type->pagesize) {
                int extid;
-               /* The 3rd id byte contains non relevant data ATM */
-               extid = chip->read_byte(mtd);
+               /* The 3rd id byte holds MLC / multichip data */
+               chip->cellinfo = chip->read_byte(mtd);
                /* The 4th id byte is the important one */
                extid = chip->read_byte(mtd);
                /* Calc pagesize */
@@ -2349,8 +2380,8 @@ int nand_scan_tail(struct mtd_info *mtd)
        if (!chip->buffers)
                return -ENOMEM;
 
-       /* Preset the internal oob write buffer */
-       memset(chip->buffers->oobwbuf, 0xff, mtd->oobsize);
+       /* Set the internal oob buffer location, just after the page data */
+       chip->oob_poi = chip->buffers->databuf + mtd->writesize;
 
        /*
         * If no default placement scheme is given, select an appropriate one
@@ -2469,6 +2500,24 @@ int nand_scan_tail(struct mtd_info *mtd)
        }
        chip->ecc.total = chip->ecc.steps * chip->ecc.bytes;
 
+       /*
+        * Allow subpage writes up to ecc.steps. Not possible for MLC
+        * FLASH.
+        */
+       if (!(chip->options & NAND_NO_SUBPAGE_WRITE) &&
+           !(chip->cellinfo & NAND_CI_CELLTYPE_MSK)) {
+               switch(chip->ecc.steps) {
+               case 2:
+                       mtd->subpage_sft = 1;
+                       break;
+               case 4:
+               case 8:
+                       mtd->subpage_sft = 2;
+                       break;
+               }
+       }
+       chip->subpagesize = mtd->writesize >> mtd->subpage_sft;
+
        /* Initialize state */
        chip->state = FL_READY;
 
index 9402653eb09b4982ac7d924beda88cb203442741..5e121ceaa59899ea94d964aab94df39845c18520 100644 (file)
@@ -333,7 +333,6 @@ static int scan_block_fast(struct mtd_info *mtd, struct nand_bbt_descr *bd,
        struct mtd_oob_ops ops;
        int j, ret;
 
-       ops.len = mtd->oobsize;
        ops.ooblen = mtd->oobsize;
        ops.oobbuf = buf;
        ops.ooboffs = 0;
@@ -676,10 +675,10 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
                                       "bad block table\n");
                        }
                        /* Read oob data */
-                       ops.len = (len >> this->page_shift) * mtd->oobsize;
+                       ops.ooblen = (len >> this->page_shift) * mtd->oobsize;
                        ops.oobbuf = &buf[len];
                        res = mtd->read_oob(mtd, to + mtd->writesize, &ops);
-                       if (res < 0 || ops.retlen != ops.len)
+                       if (res < 0 || ops.oobretlen != ops.ooblen)
                                goto outerr;
 
                        /* Calc the byte offset in the buffer */
@@ -961,14 +960,12 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
        struct nand_bbt_descr *md = this->bbt_md;
 
        len = mtd->size >> (this->bbt_erase_shift + 2);
-       /* Allocate memory (2bit per block) */
-       this->bbt = kmalloc(len, GFP_KERNEL);
+       /* Allocate memory (2bit per block) and clear the memory bad block table */
+       this->bbt = kzalloc(len, GFP_KERNEL);
        if (!this->bbt) {
                printk(KERN_ERR "nand_scan_bbt: Out of memory\n");
                return -ENOMEM;
        }
-       /* Clear the memory bad block table */
-       memset(this->bbt, 0x00, len);
 
        /* If no primary table decriptor is given, scan the device
         * to build a memory based bad block table
index dd438ca47d9ab46a1978483ffa0c5ce5b239c04a..fde593e5e634b7ecf564d2f3f04ba5d6c5294636 100644 (file)
@@ -112,7 +112,7 @@ int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
        tmp2 |= (reg2 & 0x01) << 0; /* B7 -> B0 */
 
        /* Calculate final ECC code */
-#ifdef CONFIG_NAND_ECC_SMC
+#ifdef CONFIG_MTD_NAND_ECC_SMC
        ecc_code[0] = ~tmp2;
        ecc_code[1] = ~tmp1;
 #else
@@ -148,7 +148,7 @@ int nand_correct_data(struct mtd_info *mtd, u_char *dat,
 {
        uint8_t s0, s1, s2;
 
-#ifdef CONFIG_NAND_ECC_SMC
+#ifdef CONFIG_MTD_NAND_ECC_SMC
        s0 = calc_ecc[0] ^ read_ecc[0];
        s1 = calc_ecc[1] ^ read_ecc[1];
        s2 = calc_ecc[2] ^ read_ecc[2];
index 545ff252d81eb675dfa7c5bf349b212461ee8240..c3bca9590ad21cbf65ca9f81e12d991c8e3a5203 100644 (file)
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/delay.h>
-#ifdef CONFIG_NS_ABS_POS
-#include <asm/io.h>
-#endif
-
 
 /* Default simulator parameters values */
 #if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE)  || \
@@ -164,7 +160,7 @@ MODULE_PARM_DESC(dbg,            "Output debug information if not zero");
 /* After a command is input, the simulator goes to one of the following states */
 #define STATE_CMD_READ0        0x00000001 /* read data from the beginning of page */
 #define STATE_CMD_READ1        0x00000002 /* read data from the second half of page */
-#define STATE_CMD_READSTART      0x00000003 /* read data second command (large page devices) */
+#define STATE_CMD_READSTART    0x00000003 /* read data second command (large page devices) */
 #define STATE_CMD_PAGEPROG     0x00000004 /* start page programm */
 #define STATE_CMD_READOOB      0x00000005 /* read OOB area */
 #define STATE_CMD_ERASE1       0x00000006 /* sector erase first command */
@@ -230,6 +226,14 @@ MODULE_PARM_DESC(dbg,            "Output debug information if not zero");
  */
 #define NS_MAX_PREVSTATES 1
 
+/*
+ * A union to represent flash memory contents and flash buffer.
+ */
+union ns_mem {
+       u_char *byte;    /* for byte access */
+       uint16_t *word;  /* for 16-bit word access */
+};
+
 /*
  * The structure which describes all the internal simulator data.
  */
@@ -247,17 +251,11 @@ struct nandsim {
        uint16_t npstates;      /* number of previous states saved */
        uint16_t stateidx;      /* current state index */
 
-       /* The simulated NAND flash image */
-       union flash_media {
-               u_char *byte;
-               uint16_t    *word;
-       } mem;
+       /* The simulated NAND flash pages array */
+       union ns_mem *pages;
 
        /* Internal buffer of page + OOB size bytes */
-       union internal_buffer {
-               u_char *byte;    /* for byte access */
-               uint16_t *word;  /* for 16-bit word access */
-       } buf;
+       union ns_mem buf;
 
        /* NAND flash "geometry" */
        struct nandsin_geometry {
@@ -345,13 +343,50 @@ static struct mtd_info *nsmtd;
 
 static u_char ns_verify_buf[NS_LARGEST_PAGE_SIZE];
 
+/*
+ * Allocate array of page pointers and initialize the array to NULL
+ * pointers.
+ *
+ * RETURNS: 0 if success, -ENOMEM if memory alloc fails.
+ */
+static int alloc_device(struct nandsim *ns)
+{
+       int i;
+
+       ns->pages = vmalloc(ns->geom.pgnum * sizeof(union ns_mem));
+       if (!ns->pages) {
+               NS_ERR("alloc_map: unable to allocate page array\n");
+               return -ENOMEM;
+       }
+       for (i = 0; i < ns->geom.pgnum; i++) {
+               ns->pages[i].byte = NULL;
+       }
+
+       return 0;
+}
+
+/*
+ * Free any allocated pages, and free the array of page pointers.
+ */
+static void free_device(struct nandsim *ns)
+{
+       int i;
+
+       if (ns->pages) {
+               for (i = 0; i < ns->geom.pgnum; i++) {
+                       if (ns->pages[i].byte)
+                               kfree(ns->pages[i].byte);
+               }
+               vfree(ns->pages);
+       }
+}
+
 /*
  * Initialize the nandsim structure.
  *
  * RETURNS: 0 if success, -ERRNO if failure.
  */
-static int
-init_nandsim(struct mtd_info *mtd)
+static int init_nandsim(struct mtd_info *mtd)
 {
        struct nand_chip *chip = (struct nand_chip *)mtd->priv;
        struct nandsim   *ns   = (struct nandsim *)(chip->priv);
@@ -405,7 +440,7 @@ init_nandsim(struct mtd_info *mtd)
                }
        } else {
                if (ns->geom.totsz <= (128 << 20)) {
-                       ns->geom.pgaddrbytes  = 5;
+                       ns->geom.pgaddrbytes  = 4;
                        ns->geom.secaddrbytes = 2;
                } else {
                        ns->geom.pgaddrbytes  = 5;
@@ -439,23 +474,8 @@ init_nandsim(struct mtd_info *mtd)
        printk("sector address bytes: %u\n",    ns->geom.secaddrbytes);
        printk("options: %#x\n",                ns->options);
 
-       /* Map / allocate and initialize the flash image */
-#ifdef CONFIG_NS_ABS_POS
-       ns->mem.byte = ioremap(CONFIG_NS_ABS_POS, ns->geom.totszoob);
-       if (!ns->mem.byte) {
-               NS_ERR("init_nandsim: failed to map the NAND flash image at address %p\n",
-                       (void *)CONFIG_NS_ABS_POS);
-               return -ENOMEM;
-       }
-#else
-       ns->mem.byte = vmalloc(ns->geom.totszoob);
-       if (!ns->mem.byte) {
-               NS_ERR("init_nandsim: unable to allocate %u bytes for flash image\n",
-                       ns->geom.totszoob);
-               return -ENOMEM;
-       }
-       memset(ns->mem.byte, 0xFF, ns->geom.totszoob);
-#endif
+       if (alloc_device(ns) != 0)
+               goto error;
 
        /* Allocate / initialize the internal buffer */
        ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
@@ -474,11 +494,7 @@ init_nandsim(struct mtd_info *mtd)
        return 0;
 
 error:
-#ifdef CONFIG_NS_ABS_POS
-       iounmap(ns->mem.byte);
-#else
-       vfree(ns->mem.byte);
-#endif
+       free_device(ns);
 
        return -ENOMEM;
 }
@@ -486,16 +502,10 @@ error:
 /*
  * Free the nandsim structure.
  */
-static void
-free_nandsim(struct nandsim *ns)
+static void free_nandsim(struct nandsim *ns)
 {
        kfree(ns->buf.byte);
-
-#ifdef CONFIG_NS_ABS_POS
-       iounmap(ns->mem.byte);
-#else
-       vfree(ns->mem.byte);
-#endif
+       free_device(ns);
 
        return;
 }
@@ -503,8 +513,7 @@ free_nandsim(struct nandsim *ns)
 /*
  * Returns the string representation of 'state' state.
  */
-static char *
-get_state_name(uint32_t state)
+static char *get_state_name(uint32_t state)
 {
        switch (NS_STATE(state)) {
                case STATE_CMD_READ0:
@@ -562,8 +571,7 @@ get_state_name(uint32_t state)
  *
  * RETURNS: 1 if wrong command, 0 if right.
  */
-static int
-check_command(int cmd)
+static int check_command(int cmd)
 {
        switch (cmd) {
 
@@ -589,8 +597,7 @@ check_command(int cmd)
 /*
  * Returns state after command is accepted by command number.
  */
-static uint32_t
-get_state_by_command(unsigned command)
+static uint32_t get_state_by_command(unsigned command)
 {
        switch (command) {
                case NAND_CMD_READ0:
@@ -626,8 +633,7 @@ get_state_by_command(unsigned command)
 /*
  * Move an address byte to the correspondent internal register.
  */
-static inline void
-accept_addr_byte(struct nandsim *ns, u_char bt)
+static inline void accept_addr_byte(struct nandsim *ns, u_char bt)
 {
        uint byte = (uint)bt;
 
@@ -645,8 +651,7 @@ accept_addr_byte(struct nandsim *ns, u_char bt)
 /*
  * Switch to STATE_READY state.
  */
-static inline void
-switch_to_ready_state(struct nandsim *ns, u_char status)
+static inline void switch_to_ready_state(struct nandsim *ns, u_char status)
 {
        NS_DBG("switch_to_ready_state: switch to %s state\n", get_state_name(STATE_READY));
 
@@ -705,8 +710,7 @@ switch_to_ready_state(struct nandsim *ns, u_char status)
  *          -1 - several matches.
  *           0 - operation is found.
  */
-static int
-find_operation(struct nandsim *ns, uint32_t flag)
+static int find_operation(struct nandsim *ns, uint32_t flag)
 {
        int opsfound = 0;
        int i, j, idx = 0;
@@ -790,15 +794,94 @@ find_operation(struct nandsim *ns, uint32_t flag)
        return -1;
 }
 
+/*
+ * Returns a pointer to the current page.
+ */
+static inline union ns_mem *NS_GET_PAGE(struct nandsim *ns)
+{
+       return &(ns->pages[ns->regs.row]);
+}
+
+/*
+ * Retuns a pointer to the current byte, within the current page.
+ */
+static inline u_char *NS_PAGE_BYTE_OFF(struct nandsim *ns)
+{
+       return NS_GET_PAGE(ns)->byte + ns->regs.column + ns->regs.off;
+}
+
+/*
+ * Fill the NAND buffer with data read from the specified page.
+ */
+static void read_page(struct nandsim *ns, int num)
+{
+       union ns_mem *mypage;
+
+       mypage = NS_GET_PAGE(ns);
+       if (mypage->byte == NULL) {
+               NS_DBG("read_page: page %d not allocated\n", ns->regs.row);
+               memset(ns->buf.byte, 0xFF, num);
+       } else {
+               NS_DBG("read_page: page %d allocated, reading from %d\n",
+                       ns->regs.row, ns->regs.column + ns->regs.off);
+               memcpy(ns->buf.byte, NS_PAGE_BYTE_OFF(ns), num);
+       }
+}
+
+/*
+ * Erase all pages in the specified sector.
+ */
+static void erase_sector(struct nandsim *ns)
+{
+       union ns_mem *mypage;
+       int i;
+
+       mypage = NS_GET_PAGE(ns);
+       for (i = 0; i < ns->geom.pgsec; i++) {
+               if (mypage->byte != NULL) {
+                       NS_DBG("erase_sector: freeing page %d\n", ns->regs.row+i);
+                       kfree(mypage->byte);
+                       mypage->byte = NULL;
+               }
+               mypage++;
+       }
+}
+
+/*
+ * Program the specified page with the contents from the NAND buffer.
+ */
+static int prog_page(struct nandsim *ns, int num)
+{
+       int i;
+       union ns_mem *mypage;
+       u_char *pg_off;
+
+       mypage = NS_GET_PAGE(ns);
+       if (mypage->byte == NULL) {
+               NS_DBG("prog_page: allocating page %d\n", ns->regs.row);
+               mypage->byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
+               if (mypage->byte == NULL) {
+                       NS_ERR("prog_page: error allocating memory for page %d\n", ns->regs.row);
+                       return -1;
+               }
+               memset(mypage->byte, 0xFF, ns->geom.pgszoob);
+       }
+
+       pg_off = NS_PAGE_BYTE_OFF(ns);
+       for (i = 0; i < num; i++)
+               pg_off[i] &= ns->buf.byte[i];
+
+       return 0;
+}
+
 /*
  * If state has any action bit, perform this action.
  *
  * RETURNS: 0 if success, -1 if error.
  */
-static int
-do_state_action(struct nandsim *ns, uint32_t action)
+static int do_state_action(struct nandsim *ns, uint32_t action)
 {
-       int i, num;
+       int num;
        int busdiv = ns->busw == 8 ? 1 : 2;
 
        action &= ACTION_MASK;
@@ -822,7 +905,7 @@ do_state_action(struct nandsim *ns, uint32_t action)
                        break;
                }
                num = ns->geom.pgszoob - ns->regs.off - ns->regs.column;
-               memcpy(ns->buf.byte, ns->mem.byte + NS_RAW_OFFSET(ns) + ns->regs.off, num);
+               read_page(ns, num);
 
                NS_DBG("do_state_action: (ACTION_CPY:) copy %d bytes to int buf, raw offset %d\n",
                        num, NS_RAW_OFFSET(ns) + ns->regs.off);
@@ -863,7 +946,7 @@ do_state_action(struct nandsim *ns, uint32_t action)
                                ns->regs.row, NS_RAW_OFFSET(ns));
                NS_LOG("erase sector %d\n", ns->regs.row >> (ns->geom.secshift - ns->geom.pgshift));
 
-               memset(ns->mem.byte + NS_RAW_OFFSET(ns), 0xFF, ns->geom.secszoob);
+               erase_sector(ns);
 
                NS_MDELAY(erase_delay);
 
@@ -886,8 +969,8 @@ do_state_action(struct nandsim *ns, uint32_t action)
                        return -1;
                }
 
-               for (i = 0; i < num; i++)
-                       ns->mem.byte[NS_RAW_OFFSET(ns) + ns->regs.off + i] &= ns->buf.byte[i];
+               if (prog_page(ns, num) == -1)
+                       return -1;
 
                NS_DBG("do_state_action: copy %d bytes from int buf to (%#x, %#x), raw off = %d\n",
                        num, ns->regs.row, ns->regs.column, NS_RAW_OFFSET(ns) + ns->regs.off);
@@ -928,8 +1011,7 @@ do_state_action(struct nandsim *ns, uint32_t action)
 /*
  * Switch simulator's state.
  */
-static void
-switch_state(struct nandsim *ns)
+static void switch_state(struct nandsim *ns)
 {
        if (ns->op) {
                /*
@@ -1070,8 +1152,7 @@ switch_state(struct nandsim *ns)
        }
 }
 
-static u_char
-ns_nand_read_byte(struct mtd_info *mtd)
+static u_char ns_nand_read_byte(struct mtd_info *mtd)
 {
         struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
        u_char outb = 0x00;
@@ -1144,8 +1225,7 @@ ns_nand_read_byte(struct mtd_info *mtd)
        return outb;
 }
 
-static void
-ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
+static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
 {
         struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
 
@@ -1308,15 +1388,13 @@ static void ns_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int bitmask)
                ns_nand_write_byte(mtd, cmd);
 }
 
-static int
-ns_device_ready(struct mtd_info *mtd)
+static int ns_device_ready(struct mtd_info *mtd)
 {
        NS_DBG("device_ready\n");
        return 1;
 }
 
-static uint16_t
-ns_nand_read_word(struct mtd_info *mtd)
+static uint16_t ns_nand_read_word(struct mtd_info *mtd)
 {
        struct nand_chip *chip = (struct nand_chip *)mtd->priv;
 
@@ -1325,8 +1403,7 @@ ns_nand_read_word(struct mtd_info *mtd)
        return chip->read_byte(mtd) | (chip->read_byte(mtd) << 8);
 }
 
-static void
-ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
+static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
 {
         struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
 
@@ -1353,8 +1430,7 @@ ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
        }
 }
 
-static void
-ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
+static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
 {
         struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
 
@@ -1407,8 +1483,7 @@ ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
        return;
 }
 
-static int
-ns_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
+static int ns_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
 {
        ns_nand_read_buf(mtd, (u_char *)&ns_verify_buf[0], len);
 
@@ -1436,14 +1511,12 @@ static int __init ns_init_module(void)
        }
 
        /* Allocate and initialize mtd_info, nand_chip and nandsim structures */
-       nsmtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip)
+       nsmtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip)
                                + sizeof(struct nandsim), GFP_KERNEL);
        if (!nsmtd) {
                NS_ERR("unable to allocate core structures.\n");
                return -ENOMEM;
        }
-       memset(nsmtd, 0, sizeof(struct mtd_info) + sizeof(struct nand_chip) +
-                       sizeof(struct nandsim));
        chip        = (struct nand_chip *)(nsmtd + 1);
         nsmtd->priv = (void *)chip;
        nand        = (struct nandsim *)(chip + 1);
index 039c759cfbfc5b1e1f28cf607b057d5cfe1fbfe7..fd7a8d5ba29a0d2c9bf626b1f21ddaf721ea7956 100644 (file)
@@ -56,7 +56,7 @@ static void ndfc_select_chip(struct mtd_info *mtd, int chip)
                ccr |= NDFC_CCR_BS(chip + pchip->chip_offset);
        } else
                ccr |= NDFC_CCR_RESET_CE;
-       writel(ccr, ndfc->ndfcbase + NDFC_CCR);
+       __raw_writel(ccr, ndfc->ndfcbase + NDFC_CCR);
 }
 
 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
index f8c49645324d7b5e458b08824beaabb535e42cd3..9189ec8f243eda85e2d89d5dd4037064d13ad2fc 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/rslib.h>
+#include <linux/bitrev.h>
 #include <linux/module.h>
 #include <linux/mtd/compatmac.h>
 #include <linux/mtd/mtd.h>
@@ -152,47 +153,6 @@ static struct nand_ecclayout rtc_from4_nand_oobinfo = {
        .oobfree = {{32, 32}}
 };
 
-/* Aargh. I missed the reversed bit order, when I
- * was talking to Renesas about the FPGA.
- *
- * The table is used for bit reordering and inversion
- * of the ecc byte which we get from the FPGA
- */
-static uint8_t revbits[256] = {
-       0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-       0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-       0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-       0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-       0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-       0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-       0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-       0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-       0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-       0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-       0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-       0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-       0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-       0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-       0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-       0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-       0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-       0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-       0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-       0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-       0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-       0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-       0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-       0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-       0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-       0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-       0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-       0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-       0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-       0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-       0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-       0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
-};
-
 #endif
 
 /*
@@ -397,7 +357,7 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha
        /* Read the syndrom pattern from the FPGA and correct the bitorder */
        rs_ecc = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC);
        for (i = 0; i < 8; i++) {
-               ecc[i] = revbits[(*rs_ecc) & 0xFF];
+               ecc[i] = bitrev8(*rs_ecc);
                rs_ecc++;
        }
 
@@ -496,7 +456,7 @@ static int rtc_from4_errstat(struct mtd_info *mtd, struct nand_chip *this,
                rtn = nand_do_read(mtd, page, len, &retlen, buf);
 
                /* if read failed or > 1-bit error corrected */
-               if (rtn || (mtd->ecc_stats.corrected - corrected) > 1) {
+               if (rtn || (mtd->ecc_stats.corrected - corrected) > 1)
                        er_stat |= 1 << 1;
                kfree(buf);
        }
index ff5cef24d5bb3ccbfc9ce0476e6db222c43af160..8b3203571eeb3e0d7afbb36bc9c8b092ff49b840 100644 (file)
@@ -283,7 +283,7 @@ static void s3c2410_nand_hwcontrol(struct mtd_info *mtd, int cmd,
                                   unsigned int ctrl)
 {
        struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd);
-       
+
        if (cmd == NAND_CMD_NONE)
                return;
 
index b5a5f8da4722e78ecd8d00efc50cca97724c34f3..4b1ba4fcfcd3235ad231259aa1ddae23b11b8599 100644 (file)
@@ -57,17 +57,16 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 
        DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name);
 
-       nftl = kmalloc(sizeof(struct NFTLrecord), GFP_KERNEL);
+       nftl = kzalloc(sizeof(struct NFTLrecord), GFP_KERNEL);
 
        if (!nftl) {
                printk(KERN_WARNING "NFTL: out of memory for data structures\n");
                return;
        }
-       memset(nftl, 0, sizeof(*nftl));
 
        nftl->mbd.mtd = mtd;
        nftl->mbd.devnum = -1;
-       nftl->mbd.blksize = 512;
+
        nftl->mbd.tr = tr;
 
         if (NFTL_mount(nftl) < 0) {
@@ -147,10 +146,9 @@ int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
        ops.ooblen = len;
        ops.oobbuf = buf;
        ops.datbuf = NULL;
-       ops.len = len;
 
        res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
-       *retlen = ops.retlen;
+       *retlen = ops.oobretlen;
        return res;
 }
 
@@ -168,10 +166,9 @@ int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
        ops.ooblen = len;
        ops.oobbuf = buf;
        ops.datbuf = NULL;
-       ops.len = len;
 
        res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
-       *retlen = ops.retlen;
+       *retlen = ops.oobretlen;
        return res;
 }
 
@@ -797,6 +794,7 @@ static struct mtd_blktrans_ops nftl_tr = {
        .name           = "nftl",
        .major          = NFTL_MAJOR,
        .part_bits      = NFTL_PARTN_BITS,
+       .blksize        = 512,
        .getgeo         = nftl_getgeo,
        .readsect       = nftl_readblock,
 #ifdef CONFIG_NFTL_RW
index af06a80f44de2278011cae50f9cff905a6fd2436..3d44d040a47def9bb00a7fea1b561135d8f84aa9 100644 (file)
@@ -45,12 +45,10 @@ static int __devinit generic_onenand_probe(struct device *dev)
        unsigned long size = res->end - res->start + 1;
        int err;
 
-       info = kmalloc(sizeof(struct onenand_info), GFP_KERNEL);
+       info = kzalloc(sizeof(struct onenand_info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
-       memset(info, 0, sizeof(struct onenand_info));
-
        if (!request_mem_region(res->start, size, dev->driver->name)) {
                err = -EBUSY;
                goto out_free_info;
@@ -63,6 +61,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
        }
 
        info->onenand.mmcontrol = pdata->mmcontrol;
+       info->onenand.irq = platform_get_irq(pdev, 0);
 
        info->mtd.name = pdev->dev.bus_id;
        info->mtd.priv = &info->onenand;
index 8ed68b28afe37651d85500889676f7a48a93e9b0..2da6bb26353e22c6966c0835cf596cb227ac1883 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/interrupt.h>
 #include <linux/jiffies.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -191,8 +192,6 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
        struct onenand_chip *this = mtd->priv;
        int value, readcmd = 0, block_cmd = 0;
        int block, page;
-       /* Now we use page size operation */
-       int sectors = 4, count = 4;
 
        /* Address translation */
        switch (cmd) {
@@ -244,6 +243,8 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
        }
 
        if (page != -1) {
+               /* Now we use page size operation */
+               int sectors = 4, count = 4;
                int dataram;
 
                switch (cmd) {
@@ -297,7 +298,7 @@ static int onenand_wait(struct mtd_info *mtd, int state)
        unsigned long timeout;
        unsigned int flags = ONENAND_INT_MASTER;
        unsigned int interrupt = 0;
-       unsigned int ctrl, ecc;
+       unsigned int ctrl;
 
        /* The 20 msec is enough */
        timeout = jiffies + msecs_to_jiffies(20);
@@ -309,7 +310,6 @@ static int onenand_wait(struct mtd_info *mtd, int state)
 
                if (state != FL_READING)
                        cond_resched();
-               touch_softlockup_watchdog();
        }
        /* To get correct interrupt status in timeout case */
        interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
@@ -317,28 +317,126 @@ static int onenand_wait(struct mtd_info *mtd, int state)
        ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
 
        if (ctrl & ONENAND_CTRL_ERROR) {
-               /* It maybe occur at initial bad block */
                DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: controller error = 0x%04x\n", ctrl);
-               /* Clear other interrupt bits for preventing ECC error */
-               interrupt &= ONENAND_INT_MASTER;
-       }
-
-       if (ctrl & ONENAND_CTRL_LOCK) {
-               DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: it's locked error = 0x%04x\n", ctrl);
-               return -EACCES;
+               if (ctrl & ONENAND_CTRL_LOCK)
+                       DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: it's locked error.\n");
+               return ctrl;
        }
 
        if (interrupt & ONENAND_INT_READ) {
-               ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
-               if (ecc & ONENAND_ECC_2BIT_ALL) {
+               int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
+               if (ecc) {
                        DEBUG(MTD_DEBUG_LEVEL0, "onenand_wait: ECC error = 0x%04x\n", ecc);
-                       return -EBADMSG;
+                       if (ecc & ONENAND_ECC_2BIT_ALL) {
+                               mtd->ecc_stats.failed++;
+                               return ecc;
+                       } else if (ecc & ONENAND_ECC_1BIT_ALL)
+                               mtd->ecc_stats.corrected++;
                }
        }
 
        return 0;
 }
 
+/*
+ * onenand_interrupt - [DEFAULT] onenand interrupt handler
+ * @param irq          onenand interrupt number
+ * @param dev_id       interrupt data
+ *
+ * complete the work
+ */
+static irqreturn_t onenand_interrupt(int irq, void *data)
+{
+       struct onenand_chip *this = (struct onenand_chip *) data;
+
+       /* To handle shared interrupt */
+       if (!this->complete.done)
+               complete(&this->complete);
+
+       return IRQ_HANDLED;
+}
+
+/*
+ * onenand_interrupt_wait - [DEFAULT] wait until the command is done
+ * @param mtd          MTD device structure
+ * @param state                state to select the max. timeout value
+ *
+ * Wait for command done.
+ */
+static int onenand_interrupt_wait(struct mtd_info *mtd, int state)
+{
+       struct onenand_chip *this = mtd->priv;
+
+       wait_for_completion(&this->complete);
+
+       return onenand_wait(mtd, state);
+}
+
+/*
+ * onenand_try_interrupt_wait - [DEFAULT] try interrupt wait
+ * @param mtd          MTD device structure
+ * @param state                state to select the max. timeout value
+ *
+ * Try interrupt based wait (It is used one-time)
+ */
+static int onenand_try_interrupt_wait(struct mtd_info *mtd, int state)
+{
+       struct onenand_chip *this = mtd->priv;
+       unsigned long remain, timeout;
+
+       /* We use interrupt wait first */
+       this->wait = onenand_interrupt_wait;
+
+       timeout = msecs_to_jiffies(100);
+       remain = wait_for_completion_timeout(&this->complete, timeout);
+       if (!remain) {
+               printk(KERN_INFO "OneNAND: There's no interrupt. "
+                               "We use the normal wait\n");
+
+               /* Release the irq */
+               free_irq(this->irq, this);
+
+               this->wait = onenand_wait;
+       }
+
+       return onenand_wait(mtd, state);
+}
+
+/*
+ * onenand_setup_wait - [OneNAND Interface] setup onenand wait method
+ * @param mtd          MTD device structure
+ *
+ * There's two method to wait onenand work
+ * 1. polling - read interrupt status register
+ * 2. interrupt - use the kernel interrupt method
+ */
+static void onenand_setup_wait(struct mtd_info *mtd)
+{
+       struct onenand_chip *this = mtd->priv;
+       int syscfg;
+
+       init_completion(&this->complete);
+
+       if (this->irq <= 0) {
+               this->wait = onenand_wait;
+               return;
+       }
+
+       if (request_irq(this->irq, &onenand_interrupt,
+                               IRQF_SHARED, "onenand", this)) {
+               /* If we can't get irq, use the normal wait */
+               this->wait = onenand_wait;
+               return;
+       }
+
+       /* Enable interrupt */
+       syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1);
+       syscfg |= ONENAND_SYS_CFG1_IOBE;
+       this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1);
+
+       this->wait = onenand_try_interrupt_wait;
+}
+
 /**
  * onenand_bufferram_offset - [DEFAULT] BufferRAM offset
  * @param mtd          MTD data structure
@@ -609,9 +707,10 @@ static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
        size_t *retlen, u_char *buf)
 {
        struct onenand_chip *this = mtd->priv;
+       struct mtd_ecc_stats stats;
        int read = 0, column;
        int thislen;
-       int ret = 0;
+       int ret = 0, boundary = 0;
 
        DEBUG(MTD_DEBUG_LEVEL3, "onenand_read: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len);
 
@@ -627,38 +726,61 @@ static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
 
        /* TODO handling oob */
 
-       while (read < len) {
-               thislen = min_t(int, mtd->writesize, len - read);
-
-               column = from & (mtd->writesize - 1);
-               if (column + thislen > mtd->writesize)
-                       thislen = mtd->writesize - column;
-
-               if (!onenand_check_bufferram(mtd, from)) {
-                       this->command(mtd, ONENAND_CMD_READ, from, mtd->writesize);
-
-                       ret = this->wait(mtd, FL_READING);
-                       /* First copy data and check return value for ECC handling */
-                       onenand_update_bufferram(mtd, from, 1);
-               }
-
-               this->read_bufferram(mtd, ONENAND_DATARAM, buf, column, thislen);
-
-               read += thislen;
-
-               if (read == len)
-                       break;
-
-               if (ret) {
-                       DEBUG(MTD_DEBUG_LEVEL0, "onenand_read: read failed = %d\n", ret);
-                       goto out;
-               }
-
-               from += thislen;
-               buf += thislen;
-       }
+       stats = mtd->ecc_stats;
+
+       /* Read-while-load method */
+
+       /* Do first load to bufferRAM */
+       if (read < len) {
+               if (!onenand_check_bufferram(mtd, from)) {
+                       this->command(mtd, ONENAND_CMD_READ, from, mtd->writesize);
+                       ret = this->wait(mtd, FL_READING);
+                       onenand_update_bufferram(mtd, from, !ret);
+               }
+       }
+
+       thislen = min_t(int, mtd->writesize, len - read);
+       column = from & (mtd->writesize - 1);
+       if (column + thislen > mtd->writesize)
+               thislen = mtd->writesize - column;
+
+       while (!ret) {
+               /* If there is more to load then start next load */
+               from += thislen;
+               if (read + thislen < len) {
+                       this->command(mtd, ONENAND_CMD_READ, from, mtd->writesize);
+                       /*
+                        * Chip boundary handling in DDP
+                        * Now we issued chip 1 read and pointed chip 1
+                        * bufferam so we have to point chip 0 bufferam.
+                        */
+                       if (this->device_id & ONENAND_DEVICE_IS_DDP &&
+                                       unlikely(from == (this->chipsize >> 1))) {
+                               this->write_word(0, this->base + ONENAND_REG_START_ADDRESS2);
+                               boundary = 1;
+                       } else
+                               boundary = 0;
+                       ONENAND_SET_PREV_BUFFERRAM(this);
+               }
+               /* While load is going, read from last bufferRAM */
+               this->read_bufferram(mtd, ONENAND_DATARAM, buf, column, thislen);
+               /* See if we are done */
+               read += thislen;
+               if (read == len)
+                       break;
+               /* Set up for next read from bufferRAM */
+               if (unlikely(boundary))
+                       this->write_word(0x8000, this->base + ONENAND_REG_START_ADDRESS2);
+               ONENAND_SET_NEXT_BUFFERRAM(this);
+               buf += thislen;
+               thislen = min_t(int, mtd->writesize, len - read);
+               column = 0;
+               cond_resched();
+               /* Now wait for load */
+               ret = this->wait(mtd, FL_READING);
+               onenand_update_bufferram(mtd, from, !ret);
+       }
 
-out:
        /* Deselect and wake up anyone waiting on the device */
        onenand_release_device(mtd);
 
@@ -668,7 +790,14 @@ out:
         * retlen == desired len and result == -EBADMSG
         */
        *retlen = read;
-       return ret;
+
+       if (mtd->ecc_stats.failed - stats.failed)
+               return -EBADMSG;
+
+       if (ret)
+               return ret;
+
+       return mtd->ecc_stats.corrected - stats.corrected ? -EUCLEAN : 0;
 }
 
 /**
@@ -705,6 +834,8 @@ int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
        column = from & (mtd->oobsize - 1);
 
        while (read < len) {
+               cond_resched();
+
                thislen = mtd->oobsize - column;
                thislen = min_t(int, thislen, len);
 
@@ -717,16 +848,16 @@ int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
 
                this->read_bufferram(mtd, ONENAND_SPARERAM, buf, column, thislen);
 
+               if (ret) {
+                       DEBUG(MTD_DEBUG_LEVEL0, "onenand_read_oob: read failed = 0x%x\n", ret);
+                       goto out;
+               }
+
                read += thislen;
 
                if (read == len)
                        break;
 
-               if (ret) {
-                       DEBUG(MTD_DEBUG_LEVEL0, "onenand_read_oob: read failed = %d\n", ret);
-                       goto out;
-               }
-
                buf += thislen;
 
                /* Read more? */
@@ -756,8 +887,8 @@ static int onenand_read_oob(struct mtd_info *mtd, loff_t from,
 {
        BUG_ON(ops->mode != MTD_OOB_PLACE);
 
-       return onenand_do_read_oob(mtd, from + ops->ooboffs, ops->len,
-                                  &ops->retlen, ops->oobbuf);
+       return onenand_do_read_oob(mtd, from + ops->ooboffs, ops->ooblen,
+                                  &ops->oobretlen, ops->oobbuf);
 }
 
 #ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
@@ -804,6 +935,10 @@ static int onenand_verify_page(struct mtd_info *mtd, u_char *buf, loff_t addr)
        void __iomem *dataram0, *dataram1;
        int ret = 0;
 
+       /* In partial page write, just skip it */
+       if ((addr & (mtd->writesize - 1)) != 0)
+               return 0;
+
        this->command(mtd, ONENAND_CMD_READ, addr, mtd->writesize);
 
        ret = this->wait(mtd, FL_READING);
@@ -826,7 +961,7 @@ static int onenand_verify_page(struct mtd_info *mtd, u_char *buf, loff_t addr)
 #define onenand_verify_oob(...)                (0)
 #endif
 
-#define NOTALIGNED(x)  ((x & (mtd->writesize - 1)) != 0)
+#define NOTALIGNED(x)  ((x & (this->subpagesize - 1)) != 0)
 
 /**
  * onenand_write - [MTD Interface] write buffer to FLASH
@@ -844,6 +979,7 @@ static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len,
        struct onenand_chip *this = mtd->priv;
        int written = 0;
        int ret = 0;
+       int column, subpage;
 
        DEBUG(MTD_DEBUG_LEVEL3, "onenand_write: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
 
@@ -862,45 +998,63 @@ static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len,
                 return -EINVAL;
         }
 
+       column = to & (mtd->writesize - 1);
+       subpage = column || (len & (mtd->writesize - 1));
+
        /* Grab the lock and see if the device is available */
        onenand_get_device(mtd, FL_WRITING);
 
        /* Loop until all data write */
        while (written < len) {
-               int thislen = min_t(int, mtd->writesize, len - written);
-
-               this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->writesize);
+               int bytes = mtd->writesize;
+               int thislen = min_t(int, bytes, len - written);
+               u_char *wbuf = (u_char *) buf;
+
+               cond_resched();
+
+               this->command(mtd, ONENAND_CMD_BUFFERRAM, to, bytes);
+
+               /* Partial page write */
+               if (subpage) {
+                       bytes = min_t(int, bytes - column, (int) len);
+                       memset(this->page_buf, 0xff, mtd->writesize);
+                       memcpy(this->page_buf + column, buf, bytes);
+                       wbuf = this->page_buf;
+                       /* Even though partial write, we need page size */
+                       thislen = mtd->writesize;
+               }
 
-               this->write_bufferram(mtd, ONENAND_DATARAM, buf, 0, thislen);
+               this->write_bufferram(mtd, ONENAND_DATARAM, wbuf, 0, thislen);
                this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize);
 
                this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
 
-               onenand_update_bufferram(mtd, to, 1);
+               /* In partial page write we don't update bufferram */
+               onenand_update_bufferram(mtd, to, !subpage);
 
                ret = this->wait(mtd, FL_WRITING);
                if (ret) {
                        DEBUG(MTD_DEBUG_LEVEL0, "onenand_write: write filaed %d\n", ret);
-                       goto out;
+                       break;
                }
 
-               written += thislen;
-
                /* Only check verify write turn on */
-               ret = onenand_verify_page(mtd, (u_char *) buf, to);
+               ret = onenand_verify_page(mtd, (u_char *) wbuf, to);
                if (ret) {
                        DEBUG(MTD_DEBUG_LEVEL0, "onenand_write: verify failed %d\n", ret);
-                       goto out;
+                       break;
                }
 
+               written += thislen;
+
                if (written == len)
                        break;
 
+               column = 0;
                to += thislen;
                buf += thislen;
        }
 
-out:
        /* Deselect and wake up anyone waiting on the device */
        onenand_release_device(mtd);
 
@@ -944,6 +1098,8 @@ static int onenand_do_write_oob(struct mtd_info *mtd, loff_t to, size_t len,
        while (written < len) {
                int thislen = min_t(int, mtd->oobsize, len - written);
 
+               cond_resched();
+
                column = to & (mtd->oobsize - 1);
 
                this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize);
@@ -999,8 +1155,8 @@ static int onenand_write_oob(struct mtd_info *mtd, loff_t to,
 {
        BUG_ON(ops->mode != MTD_OOB_PLACE);
 
-       return onenand_do_write_oob(mtd, to + ops->ooboffs, ops->len,
-                                   &ops->retlen, ops->oobbuf);
+       return onenand_do_write_oob(mtd, to + ops->ooboffs, ops->ooblen,
+                                   &ops->oobretlen, ops->oobbuf);
 }
 
 /**
@@ -1071,6 +1227,7 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
        instr->state = MTD_ERASING;
 
        while (len) {
+               cond_resched();
 
                /* Check if we have a bad block, we do not erase bad blocks */
                if (onenand_block_checkbad(mtd, addr, 0, 0)) {
@@ -1084,10 +1241,7 @@ static int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
                ret = this->wait(mtd, FL_ERASING);
                /* Check, if it is write protected */
                if (ret) {
-                       if (ret == -EPERM)
-                               DEBUG(MTD_DEBUG_LEVEL0, "onenand_erase: Device is write protected!!!\n");
-                       else
-                               DEBUG(MTD_DEBUG_LEVEL0, "onenand_erase: Failed erase, block %d\n", (unsigned) (addr >> this->erase_shift));
+                       DEBUG(MTD_DEBUG_LEVEL0, "onenand_erase: Failed erase, block %d\n", (unsigned) (addr >> this->erase_shift));
                        instr->state = MTD_ERASE_FAILED;
                        instr->fail_addr = addr;
                        goto erase_exit;
@@ -1129,7 +1283,6 @@ static void onenand_sync(struct mtd_info *mtd)
        onenand_release_device(mtd);
 }
 
-
 /**
  * onenand_block_isbad - [MTD Interface] Check whether the block at the given offset is bad
  * @param mtd          MTD device structure
@@ -1196,32 +1349,38 @@ static int onenand_block_markbad(struct mtd_info *mtd, loff_t ofs)
 }
 
 /**
- * onenand_unlock - [MTD Interface] Unlock block(s)
+ * onenand_do_lock_cmd - [OneNAND Interface] Lock or unlock block(s)
  * @param mtd          MTD device structure
  * @param ofs          offset relative to mtd start
- * @param len          number of bytes to unlock
+ * @param len          number of bytes to lock or unlock
  *
- * Unlock one or more blocks
+ * Lock or unlock one or more blocks
  */
-static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
+static int onenand_do_lock_cmd(struct mtd_info *mtd, loff_t ofs, size_t len, int cmd)
 {
        struct onenand_chip *this = mtd->priv;
        int start, end, block, value, status;
+       int wp_status_mask;
 
        start = ofs >> this->erase_shift;
        end = len >> this->erase_shift;
 
+       if (cmd == ONENAND_CMD_LOCK)
+               wp_status_mask = ONENAND_WP_LS;
+       else
+               wp_status_mask = ONENAND_WP_US;
+
        /* Continuous lock scheme */
        if (this->options & ONENAND_HAS_CONT_LOCK) {
                /* Set start block address */
                this->write_word(start, this->base + ONENAND_REG_START_BLOCK_ADDRESS);
                /* Set end block address */
                this->write_word(start + end - 1, this->base + ONENAND_REG_END_BLOCK_ADDRESS);
-               /* Write unlock command */
-               this->command(mtd, ONENAND_CMD_UNLOCK, 0, 0);
+               /* Write lock command */
+               this->command(mtd, cmd, 0, 0);
 
                /* There's no return value */
-               this->wait(mtd, FL_UNLOCKING);
+               this->wait(mtd, FL_LOCKING);
 
                /* Sanity check */
                while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS)
@@ -1230,7 +1389,7 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
 
                /* Check lock status */
                status = this->read_word(this->base + ONENAND_REG_WP_STATUS);
-               if (!(status & ONENAND_WP_US))
+               if (!(status & wp_status_mask))
                        printk(KERN_ERR "wp status = 0x%x\n", status);
 
                return 0;
@@ -1246,11 +1405,11 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
                this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2);
                /* Set start block address */
                this->write_word(block, this->base + ONENAND_REG_START_BLOCK_ADDRESS);
-               /* Write unlock command */
-               this->command(mtd, ONENAND_CMD_UNLOCK, 0, 0);
+               /* Write lock command */
+               this->command(mtd, cmd, 0, 0);
 
                /* There's no return value */
-               this->wait(mtd, FL_UNLOCKING);
+               this->wait(mtd, FL_LOCKING);
 
                /* Sanity check */
                while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS)
@@ -1259,13 +1418,39 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
 
                /* Check lock status */
                status = this->read_word(this->base + ONENAND_REG_WP_STATUS);
-               if (!(status & ONENAND_WP_US))
+               if (!(status & wp_status_mask))
                        printk(KERN_ERR "block = %d, wp status = 0x%x\n", block, status);
        }
 
        return 0;
 }
 
+/**
+ * onenand_lock - [MTD Interface] Lock block(s)
+ * @param mtd          MTD device structure
+ * @param ofs          offset relative to mtd start
+ * @param len          number of bytes to unlock
+ *
+ * Lock one or more blocks
+ */
+static int onenand_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
+{
+       return onenand_do_lock_cmd(mtd, ofs, len, ONENAND_CMD_LOCK);
+}
+
+/**
+ * onenand_unlock - [MTD Interface] Unlock block(s)
+ * @param mtd          MTD device structure
+ * @param ofs          offset relative to mtd start
+ * @param len          number of bytes to unlock
+ *
+ * Unlock one or more blocks
+ */
+static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
+{
+       return onenand_do_lock_cmd(mtd, ofs, len, ONENAND_CMD_UNLOCK);
+}
+
 /**
  * onenand_check_lock_status - [OneNAND Interface] Check lock status
  * @param this         onenand chip data structure
@@ -1310,7 +1495,7 @@ static int onenand_unlock_all(struct mtd_info *mtd)
                this->command(mtd, ONENAND_CMD_UNLOCK_ALL, 0, 0);
 
                /* There's no return value */
-               this->wait(mtd, FL_UNLOCKING);
+               this->wait(mtd, FL_LOCKING);
 
                /* Sanity check */
                while (this->read_word(this->base + ONENAND_REG_CTRL_STATUS)
@@ -1334,7 +1519,7 @@ static int onenand_unlock_all(struct mtd_info *mtd)
                return 0;
        }
 
-       mtd->unlock(mtd, 0x0, this->chipsize);
+       onenand_unlock(mtd, 0x0, this->chipsize);
 
        return 0;
 }
@@ -1762,7 +1947,7 @@ static int onenand_probe(struct mtd_info *mtd)
        /* Read manufacturer and device IDs from Register */
        maf_id = this->read_word(this->base + ONENAND_REG_MANUFACTURER_ID);
        dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID);
-       ver_id= this->read_word(this->base + ONENAND_REG_VERSION_ID);
+       ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID);
 
        /* Check OneNAND device */
        if (maf_id != bram_maf_id || dev_id != bram_dev_id)
@@ -1846,7 +2031,7 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
        if (!this->command)
                this->command = onenand_command;
        if (!this->wait)
-               this->wait = onenand_wait;
+               onenand_setup_wait(mtd);
 
        if (!this->read_bufferram)
                this->read_bufferram = onenand_read_bufferram;
@@ -1883,23 +2068,30 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
        init_waitqueue_head(&this->wq);
        spin_lock_init(&this->chip_lock);
 
+       /*
+        * Allow subpage writes up to oobsize.
+        */
        switch (mtd->oobsize) {
        case 64:
                this->ecclayout = &onenand_oob_64;
+               mtd->subpage_sft = 2;
                break;
 
        case 32:
                this->ecclayout = &onenand_oob_32;
+               mtd->subpage_sft = 1;
                break;
 
        default:
                printk(KERN_WARNING "No OOB scheme defined for oobsize %d\n",
                        mtd->oobsize);
+               mtd->subpage_sft = 0;
                /* To prevent kernel oops */
                this->ecclayout = &onenand_oob_32;
                break;
        }
 
+       this->subpagesize = mtd->writesize >> mtd->subpage_sft;
        mtd->ecclayout = this->ecclayout;
 
        /* Fill in remaining MTD driver data */
@@ -1922,7 +2114,7 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
        mtd->lock_user_prot_reg = onenand_lock_user_prot_reg;
 #endif
        mtd->sync = onenand_sync;
-       mtd->lock = NULL;
+       mtd->lock = onenand_lock;
        mtd->unlock = onenand_unlock;
        mtd->suspend = onenand_suspend;
        mtd->resume = onenand_resume;
index 1b00dac3d7d601dc6305e52ed9067a94e7a78aaf..98f8fd1c637510706676b3d5fff7289496f305d0 100644 (file)
@@ -93,13 +93,15 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
                        ret = onenand_do_read_oob(mtd, from + j * mtd->writesize + bd->offs,
                                                  readlen, &retlen, &buf[0]);
 
-                       if (ret)
+                       /* If it is a initial bad block, just ignore it */
+                       if (ret && !(ret & ONENAND_CTRL_LOAD))
                                return ret;
 
                        if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) {
                                bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
                                printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
                                        i >> 1, (unsigned int) from);
+                               mtd->ecc_stats.badblocks++;
                                break;
                        }
                }
@@ -177,14 +179,12 @@ int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
        int len, ret = 0;
 
        len = mtd->size >> (this->erase_shift + 2);
-       /* Allocate memory (2bit per block) */
-       bbm->bbt = kmalloc(len, GFP_KERNEL);
+       /* Allocate memory (2bit per block) and clear the memory bad block table */
+       bbm->bbt = kzalloc(len, GFP_KERNEL);
        if (!bbm->bbt) {
                printk(KERN_ERR "onenand_scan_bbt: Out of memory\n");
                return -ENOMEM;
        }
-       /* Clear the memory bad block table */
-       memset(bbm->bbt, 0x00, len);
 
        /* Set the bad block position */
        bbm->badblockpos = ONENAND_BADBLOCK_POS;
@@ -230,14 +230,12 @@ int onenand_default_bbt(struct mtd_info *mtd)
        struct onenand_chip *this = mtd->priv;
        struct bbm_info *bbm;
 
-       this->bbm = kmalloc(sizeof(struct bbm_info), GFP_KERNEL);
+       this->bbm = kzalloc(sizeof(struct bbm_info), GFP_KERNEL);
        if (!this->bbm)
                return -ENOMEM;
 
        bbm = this->bbm;
 
-       memset(bbm, 0, sizeof(struct bbm_info));
-
        /* 1KB page has same configuration as 2KB page */
        if (!bbm->badblock_pattern)
                bbm->badblock_pattern = &largepage_memorybased;
index 5b58523e4d4ecd597c8d72e63ae702a7b5d02389..035cd9b0cc08b327f83d8f12958eacdcab7f6c94 100644 (file)
@@ -96,7 +96,19 @@ static int parse_redboot_partitions(struct mtd_info *master,
                         */
                        if (swab32(buf[i].size) == master->erasesize) {
                                int j;
-                               for (j = 0; j < numslots && buf[j].name[0] != 0xff; ++j) {
+                               for (j = 0; j < numslots; ++j) {
+
+                                       /* A single 0xff denotes a deleted entry.
+                                        * Two of them in a row is the end of the table.
+                                        */
+                                       if (buf[j].name[0] == 0xff) {
+                                               if (buf[j].name[1] == 0xff) {
+                                                       break;
+                                               } else {
+                                                       continue;
+                                               }
+                                       }
+
                                        /* The unsigned long fields were written with the
                                         * wrong byte sex, name and pad have no byte sex.
                                         */
@@ -110,6 +122,9 @@ static int parse_redboot_partitions(struct mtd_info *master,
                                }
                        }
                        break;
+               } else {
+                       /* re-calculate of real numslots */
+                       numslots = buf[i].size / sizeof(struct fis_image_desc);
                }
        }
        if (i == numslots) {
@@ -123,8 +138,13 @@ static int parse_redboot_partitions(struct mtd_info *master,
        for (i = 0; i < numslots; i++) {
                struct fis_list *new_fl, **prev;
 
-               if (buf[i].name[0] == 0xff)
-                       continue;
+               if (buf[i].name[0] == 0xff) {
+                       if (buf[i].name[1] == 0xff) {
+                               break;
+                       } else {
+                               continue;
+                       }
+               }
                if (!redboot_checksum(&buf[i]))
                        break;
 
@@ -165,15 +185,13 @@ static int parse_redboot_partitions(struct mtd_info *master,
                }
        }
 #endif
-       parts = kmalloc(sizeof(*parts)*nrparts + nulllen + namelen, GFP_KERNEL);
+       parts = kzalloc(sizeof(*parts)*nrparts + nulllen + namelen, GFP_KERNEL);
 
        if (!parts) {
                ret = -ENOMEM;
                goto out;
        }
 
-       memset(parts, 0, sizeof(*parts)*nrparts + nulllen + namelen);
-
        nullname = (char *)&parts[nrparts];
 #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
        if (nulllen > 0) {
index 0f3baa5d9c2a08a147639518f4703251e595b7ad..d4b1ba8f23ef40b0dd072fc2c251c46f8f54dc7d 100644 (file)
@@ -787,7 +787,6 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 
        if (scan_header(part) == 0) {
                part->mbd.size = part->sector_count;
-               part->mbd.blksize = SECTOR_SIZE;
                part->mbd.tr = tr;
                part->mbd.devnum = -1;
                if (!(mtd->flags & MTD_WRITEABLE))
@@ -829,6 +828,8 @@ struct mtd_blktrans_ops rfd_ftl_tr = {
        .name           = "rfd",
        .major          = RFD_FTL_MAJOR,
        .part_bits      = PART_BITS,
+       .blksize        = SECTOR_SIZE,
+
        .readsect       = rfd_ftl_readsect,
        .writesect      = rfd_ftl_writesect,
        .getgeo         = rfd_ftl_getgeo,
index 79d3bb659bfe713a6685e2fc34a4c01d48827ac8..a5f3d60047d47f50da60ce7b8569ef326542173d 100644 (file)
@@ -172,13 +172,12 @@ static int read_raw_oob(struct mtd_info *mtd, loff_t offs, uint8_t *buf)
 
        ops.mode = MTD_OOB_RAW;
        ops.ooboffs = 0;
-       ops.ooblen = mtd->oobsize;
-       ops.len = OOB_SIZE;
+       ops.ooblen = OOB_SIZE;
        ops.oobbuf = buf;
        ops.datbuf = NULL;
 
        ret = mtd->read_oob(mtd, offs, &ops);
-       if (ret < 0 || ops.retlen != OOB_SIZE)
+       if (ret < 0 || ops.oobretlen != OOB_SIZE)
                return -1;
 
        return 0;
@@ -312,7 +311,6 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 
        ssfdc->mbd.mtd = mtd;
        ssfdc->mbd.devnum = -1;
-       ssfdc->mbd.blksize = SECTOR_SIZE;
        ssfdc->mbd.tr = tr;
        ssfdc->mbd.readonly = 1;
 
@@ -447,6 +445,7 @@ static struct mtd_blktrans_ops ssfdcr_tr = {
        .name           = "ssfdc",
        .major          = SSFDCR_MAJOR,
        .part_bits      = SSFDCR_PARTN_BITS,
+       .blksize        = SECTOR_SIZE,
        .getgeo         = ssfdcr_getgeo,
        .readsect       = ssfdcr_readsect,
        .add_mtd        = ssfdcr_add_mtd,
index e2cb19b582a1f2f892c96b266f8b29bfbb132384..6f93a765e56479ec9f0b598faf517468d3cd6ca0 100644 (file)
@@ -765,17 +765,18 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
        struct cp_private *cp = netdev_priv(dev);
        unsigned entry;
        u32 eor, flags;
+       unsigned long intr_flags;
 #if CP_VLAN_TAG_USED
        u32 vlan_tag = 0;
 #endif
        int mss = 0;
 
-       spin_lock_irq(&cp->lock);
+       spin_lock_irqsave(&cp->lock, intr_flags);
 
        /* This is a hard error, log it. */
        if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) {
                netif_stop_queue(dev);
-               spin_unlock_irq(&cp->lock);
+               spin_unlock_irqrestore(&cp->lock, intr_flags);
                printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
                       dev->name);
                return 1;
@@ -908,7 +909,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
        if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1))
                netif_stop_queue(dev);
 
-       spin_unlock_irq(&cp->lock);
+       spin_unlock_irqrestore(&cp->lock, intr_flags);
 
        cpw8(TxPoll, NormalTxPoll);
        dev->trans_start = jiffies;
index 39ad9f73d1ecccf2229e298771dbba297f8b22c3..be10a3a26b5b4c04f0ffaf11bebad3d97436f797 100644 (file)
@@ -39,7 +39,7 @@
 #include <asm/io.h>
 
 #define DRV_NAME       "ehea"
-#define DRV_VERSION    "EHEA_0043"
+#define DRV_VERSION    "EHEA_0044"
 
 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
        | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
index 83fa32f7239857c9d6a72f05eca538343b00c76b..1072e69ef85de679c9ac4517a3b8a3f05d34636c 100644 (file)
@@ -558,12 +558,12 @@ static irqreturn_t ehea_qp_aff_irq_handler(int irq, void *param)
        u32 qp_token;
 
        eqe = ehea_poll_eq(port->qp_eq);
-       ehea_debug("eqe=%p", eqe);
+
        while (eqe) {
-               ehea_debug("*eqe=%lx", *(u64*)eqe);
-               eqe = ehea_poll_eq(port->qp_eq);
                qp_token = EHEA_BMASK_GET(EHEA_EQE_QP_TOKEN, eqe->entry);
-               ehea_debug("next eqe=%p", eqe);
+               ehea_error("QP aff_err: entry=0x%lx, token=0x%x",
+                          eqe->entry, qp_token);
+               eqe = ehea_poll_eq(port->qp_eq);
        }
 
        return IRQ_HANDLED;
@@ -575,8 +575,9 @@ static struct ehea_port *ehea_get_port(struct ehea_adapter *adapter,
        int i;
 
        for (i = 0; i < adapter->num_ports; i++)
-               if (adapter->port[i]->logical_port_id == logical_port)
-                       return adapter->port[i];
+               if (adapter->port[i])
+                       if (adapter->port[i]->logical_port_id == logical_port)
+                               return adapter->port[i];
        return NULL;
 }
 
@@ -642,6 +643,8 @@ int ehea_sense_port_attr(struct ehea_port *port)
                break;
        }
 
+       port->autoneg = 1;
+
        /* Number of default QPs */
        port->num_def_qps = cb0->num_default_qps;
 
@@ -728,10 +731,7 @@ int ehea_set_portspeed(struct ehea_port *port, u32 port_speed)
                }
        } else {
                if (hret == H_AUTHORITY) {
-                       ehea_info("Hypervisor denied setting port speed. Either"
-                                 " this partition is not authorized to set "
-                                 "port speed or another partition has modified"
-                                 " port speed first.");
+                       ehea_info("Hypervisor denied setting port speed");
                        ret = -EPERM;
                } else {
                        ret = -EIO;
@@ -998,7 +998,7 @@ static int ehea_configure_port(struct ehea_port *port)
                     | EHEA_BMASK_SET(PXLY_RC_JUMBO_FRAME, 1);
 
        for (i = 0; i < port->num_def_qps; i++)
-               cb0->default_qpn_arr[i] = port->port_res[i].qp->init_attr.qp_nr;
+               cb0->default_qpn_arr[i] = port->port_res[0].qp->init_attr.qp_nr;
 
        if (netif_msg_ifup(port))
                ehea_dump(cb0, sizeof(*cb0), "ehea_configure_port");
@@ -1485,11 +1485,12 @@ out:
 
 static void ehea_promiscuous_error(u64 hret, int enable)
 {
-       ehea_info("Hypervisor denied %sabling promiscuous mode.%s",
-                 enable == 1 ? "en" : "dis",
-                 hret != H_AUTHORITY ? "" : " Another partition owning a "
-                 "logical port on the same physical port might have altered "
-                 "promiscuous mode first.");
+       if (hret == H_AUTHORITY)
+               ehea_info("Hypervisor denied %sabling promiscuous mode",
+                         enable == 1 ? "en" : "dis");
+       else
+               ehea_error("failed %sabling promiscuous mode",
+                          enable == 1 ? "en" : "dis");
 }
 
 static void ehea_promiscuous(struct net_device *dev, int enable)
@@ -2267,6 +2268,8 @@ static void ehea_tx_watchdog(struct net_device *dev)
 int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
 {
        struct hcp_query_ehea *cb;
+       struct device_node *lhea_dn = NULL;
+       struct device_node *eth_dn = NULL;
        u64 hret;
        int ret;
 
@@ -2283,7 +2286,18 @@ int ehea_sense_adapter_attr(struct ehea_adapter *adapter)
                goto out_herr;
        }
 
-       adapter->num_ports = cb->num_ports;
+       /* Determine the number of available logical ports
+        * by counting the child nodes of the lhea OFDT entry
+        */
+       adapter->num_ports = 0;
+       lhea_dn = of_find_node_by_name(lhea_dn, "lhea");
+       do {
+               eth_dn = of_get_next_child(lhea_dn, eth_dn);
+               if (eth_dn)
+                       adapter->num_ports++;
+       } while ( eth_dn );
+       of_node_put(lhea_dn);
+
        adapter->max_mc_mac = cb->max_mc_mac - 1;
        ret = 0;
 
@@ -2334,8 +2348,6 @@ static int ehea_setup_single_port(struct ehea_port *port,
 
        INIT_LIST_HEAD(&port->mc_list->list);
 
-       ehea_set_portspeed(port, EHEA_SPEED_AUTONEG);
-
        ret = ehea_sense_port_attr(port);
        if (ret)
                goto out;
@@ -2471,14 +2483,16 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev,
 
        adapter_handle = (u64*)get_property(dev->ofdev.node, "ibm,hea-handle",
                                            NULL);
-       if (!adapter_handle) {
+       if (adapter_handle)
+               adapter->handle = *adapter_handle;
+
+       if (!adapter->handle) {
                dev_err(&dev->ofdev.dev, "failed getting handle for adapter"
                        " '%s'\n", dev->ofdev.node->full_name);
                ret = -ENODEV;
                goto out_free_ad;
        }
 
-       adapter->handle = *adapter_handle;
        adapter->pd = EHEA_PD_ID;
 
        dev->ofdev.dev.driver_data = adapter;
index 0cfc2bc1a27b8a6c4ce49860a10f4e8999c50156..37716e05e808fe50e777da3490331bf60ea9a64e 100644 (file)
@@ -94,6 +94,7 @@ static long ehea_plpar_hcall9(unsigned long opcode,
 {
        long ret;
        int i, sleep_msecs;
+       u8 cb_cat;
 
        for (i = 0; i < 5; i++) {
                ret = plpar_hcall9(opcode, outs,
@@ -106,7 +107,13 @@ static long ehea_plpar_hcall9(unsigned long opcode,
                        continue;
                }
 
-               if (ret < H_SUCCESS)
+               cb_cat = EHEA_BMASK_GET(H_MEHEAPORT_CAT, arg2);
+
+               if ((ret < H_SUCCESS) && !(((ret == H_AUTHORITY)
+                   && (opcode == H_MODIFY_HEA_PORT))
+                   && (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
+                   || (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
+                   && (arg3 == H_PORT_CB7_DUCQPN)))))
                        ehea_error("opcode=%lx ret=%lx"
                                   " arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
                                   " arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
@@ -120,7 +127,6 @@ static long ehea_plpar_hcall9(unsigned long opcode,
                                   outs[0], outs[1], outs[2], outs[3],
                                   outs[4], outs[5], outs[6], outs[7],
                                   outs[8]);
-
                return ret;
        }
 
index 3ca1082ec7764b9b831e51c55745c2f43ef7b37c..340ee99652eb855359bf24faf9cc627988a97fe4 100644 (file)
@@ -441,25 +441,13 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
                goto drop;
        }
 
-       /* Make sure there is room for IrDA-USB header. The actual
-        * allocation will be done lower in skb_push().
-        * Also, we don't use directly skb_cow(), because it require
-        * headroom >= 16, which force unnecessary copies - Jean II */
-       if (skb_headroom(skb) < self->header_length) {
-               IRDA_DEBUG(0, "%s(), Insuficient skb headroom.\n", __FUNCTION__);
-               if (skb_cow(skb, self->header_length)) {
-                       IRDA_WARNING("%s(), failed skb_cow() !!!\n", __FUNCTION__);
-                       goto drop;
-               }
-       }
+       memcpy(self->tx_buff + self->header_length, skb->data, skb->len);
 
        /* Change setting for next frame */
-
        if (self->capability & IUC_STIR421X) {
                __u8 turnaround_time;
-               __u8* frame;
+               __u8* frame = self->tx_buff;
                turnaround_time = get_turnaround_time( skb );
-               frame= skb_push(skb, self->header_length);
                irda_usb_build_header(self, frame, 0);
                frame[2] = turnaround_time;
                if ((skb->len != 0) &&
@@ -472,17 +460,17 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
                        frame[1] = 0;
                }
        } else {
-               irda_usb_build_header(self, skb_push(skb, self->header_length), 0);
+               irda_usb_build_header(self, self->tx_buff, 0);
        }
 
        /* FIXME: Make macro out of this one */
        ((struct irda_skb_cb *)skb->cb)->context = self;
 
-        usb_fill_bulk_urb(urb, self->usbdev, 
+       usb_fill_bulk_urb(urb, self->usbdev,
                      usb_sndbulkpipe(self->usbdev, self->bulk_out_ep),
-                      skb->data, IRDA_SKB_MAX_MTU,
+                      self->tx_buff, skb->len + self->header_length,
                       write_bulk_callback, skb);
-       urb->transfer_buffer_length = skb->len;
+
        /* This flag (URB_ZERO_PACKET) indicates that what we send is not
         * a continuous stream of data but separate packets.
         * In this case, the USB layer will insert an empty USB frame (TD)
@@ -1455,6 +1443,9 @@ static inline void irda_usb_close(struct irda_usb_cb *self)
        /* Remove the speed buffer */
        kfree(self->speed_buff);
        self->speed_buff = NULL;
+
+       kfree(self->tx_buff);
+       self->tx_buff = NULL;
 }
 
 /********************** USB CONFIG SUBROUTINES **********************/
@@ -1524,8 +1515,6 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_
 
        IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n",
                __FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep);
-       /* Should be 8, 16, 32 or 64 bytes */
-       IRDA_ASSERT(self->bulk_out_mtu == 64, ;);
 
        return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0));
 }
@@ -1753,9 +1742,14 @@ static int irda_usb_probe(struct usb_interface *intf,
 
        memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU);
 
+       self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length,
+                               GFP_KERNEL);
+       if (self->tx_buff == NULL)
+               goto err_out_4;
+
        ret = irda_usb_open(self);
        if (ret) 
-               goto err_out_4;
+               goto err_out_5;
 
        IRDA_MESSAGE("IrDA: Registered device %s\n", net->name);
        usb_set_intfdata(intf, self);
@@ -1766,14 +1760,14 @@ static int irda_usb_probe(struct usb_interface *intf,
                self->needspatch = (ret < 0);
                if (self->needspatch) {
                        IRDA_ERROR("STIR421X: Couldn't upload patch\n");
-                       goto err_out_5;
+                       goto err_out_6;
                }
 
                /* replace IrDA class descriptor with what patched device is now reporting */
                irda_desc = irda_usb_find_class_desc (self->usbintf);
                if (irda_desc == NULL) {
                        ret = -ENODEV;
-                       goto err_out_5;
+                       goto err_out_6;
                }
                if (self->irda_desc)
                        kfree (self->irda_desc);
@@ -1782,9 +1776,10 @@ static int irda_usb_probe(struct usb_interface *intf,
        }
 
        return 0;
-
-err_out_5:
+err_out_6:
        unregister_netdev(self->netdev);
+err_out_5:
+       kfree(self->tx_buff);
 err_out_4:
        kfree(self->speed_buff);
 err_out_3:
index 6b2271f18e77409576490c16b08d0d0229b90340..e846c38224a335cbf9619f25abe48e3903dd7b99 100644 (file)
@@ -156,6 +156,7 @@ struct irda_usb_cb {
        struct irlap_cb   *irlap;       /* The link layer we are binded to */
        struct qos_info qos;
        char *speed_buff;               /* Buffer for speed changes */
+       char *tx_buff;
 
        struct timeval stamp;
        struct timeval now;
index c14a74634fd50a67f866cc9d2621a5772ede8f35..20d306fea4cbd558e3b0dc906548174b03475a79 100644 (file)
@@ -59,7 +59,7 @@
 #include <asm/byteorder.h>
 #include <asm/unaligned.h>
 
-MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>");
+MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>");
 MODULE_DESCRIPTION("IrDA-USB Dongle Driver for SigmaTel STIr4200");
 MODULE_LICENSE("GPL");
 
index 18c68193bf14edef5e48ab4ebf6eecb2f250ae33..e2b1af6184500aa9c3709647495ddadca405cf60 100644 (file)
@@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev)
        unsigned i;
 
        seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n",
-                  PCIDEV_NAME(pdev), (int)pdev->vendor, (int)pdev->device);
+                  pci_name(pdev), (int)pdev->vendor, (int)pdev->device);
        seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state);
        seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n",
                   pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask);
@@ -1401,7 +1401,7 @@ static void vlsi_tx_timeout(struct net_device *ndev)
 
        if (vlsi_start_hw(idev))
                IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n",
-                          __FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name);
+                          __FUNCTION__, pci_name(idev->pdev), ndev->name);
        else
                netif_start_queue(ndev);
 }
@@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                pdev->current_state = 0; /* hw must be running now */
 
        IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n",
-                    drivername, PCIDEV_NAME(pdev));
+                    drivername, pci_name(pdev));
 
        if ( !pci_resource_start(pdev,0)
             || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) {
@@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev)
 
        pci_set_drvdata(pdev, NULL);
 
-       IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev));
+       IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev));
 }
 
 #ifdef CONFIG_PM
@@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state)
 
        if (!ndev) {
                IRDA_ERROR("%s - %s: no netdevice \n",
-                          __FUNCTION__, PCIDEV_NAME(pdev));
+                          __FUNCTION__, pci_name(pdev));
                return 0;
        }
        idev = ndev->priv;      
@@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state)
                        pdev->current_state = state.event;
                }
                else
-                       IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event);
+                       IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, pci_name(pdev), pdev->current_state, state.event);
                up(&idev->sem);
                return 0;
        }
@@ -1787,7 +1787,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev)
 
        if (!ndev) {
                IRDA_ERROR("%s - %s: no netdevice \n",
-                          __FUNCTION__, PCIDEV_NAME(pdev));
+                          __FUNCTION__, pci_name(pdev));
                return 0;
        }
        idev = ndev->priv;      
@@ -1795,7 +1795,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev)
        if (pdev->current_state == 0) {
                up(&idev->sem);
                IRDA_WARNING("%s - %s: already resumed\n",
-                            __FUNCTION__, PCIDEV_NAME(pdev));
+                            __FUNCTION__, pci_name(pdev));
                return 0;
        }
        
index c37f0bc4c7f9f7257d8f3edad087a30b5c1e347a..2d3b773d8e3503294010f677d33eff62e5d96a4a 100644 (file)
 #define PCI_CLASS_SUBCLASS_MASK                0xffff
 #endif
 
-/* in recent 2.5 interrupt handlers have non-void return value */
-#ifndef IRQ_RETVAL
-typedef void irqreturn_t;
-#define IRQ_NONE
-#define IRQ_HANDLED
-#define IRQ_RETVAL(x)
-#endif
-
-/* some stuff need to check kernelversion. Not all 2.5 stuff was present
- * in early 2.5.x - the test is merely to separate 2.4 from 2.5
- */
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-
-/* PDE() introduced in 2.5.4 */
-#ifdef CONFIG_PROC_FS
-#define PDE(inode) ((inode)->i_private)
-#endif
-
-/* irda crc16 calculation exported in 2.5.42 */
-#define irda_calc_crc16(fcs,buf,len)   (GOOD_FCS)
-
-/* we use this for unified pci device name access */
-#define PCIDEV_NAME(pdev)      ((pdev)->name)
-
-#else /* 2.5 or later */
-
-/* whatever we get from the associated struct device - bus:slot:dev.fn id */
-#define PCIDEV_NAME(pdev)      (pci_name(pdev))
-
-#endif
-
 /* ================================================================ */
 
 /* non-standard PCI registers */
index c41ae4286eeae76daba0ee77bf24d08a3cbf1963..b3bf86422734a07eb7ec37da30bd1cd1acdb0b95 100644 (file)
@@ -314,6 +314,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
 
        while (mp->tx_desc_count > 0) {
                spin_lock_irqsave(&mp->lock, flags);
+
+               /* tx_desc_count might have changed before acquiring the lock */
+               if (mp->tx_desc_count <= 0) {
+                       spin_unlock_irqrestore(&mp->lock, flags);
+                       return released;
+               }
+
                tx_index = mp->tx_used_desc_q;
                desc = &mp->p_tx_desc_area[tx_index];
                cmd_sts = desc->cmd_sts;
@@ -332,13 +339,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
                if (skb)
                        mp->tx_skb[tx_index] = NULL;
 
-               spin_unlock_irqrestore(&mp->lock, flags);
-
                if (cmd_sts & ETH_ERROR_SUMMARY) {
                        printk("%s: Error in TX\n", dev->name);
                        mp->stats.tx_errors++;
                }
 
+               spin_unlock_irqrestore(&mp->lock, flags);
+
                if (cmd_sts & ETH_TX_FIRST_DESC)
                        dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
                else
index 07cf574197e5762239427f27c4d58c61d6d5ed27..61cbd4a604460448bd699664500f1803fb0794e7 100644 (file)
@@ -71,7 +71,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.1.0"
+#define MYRI10GE_VERSION_STR "1.2.0"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -274,6 +274,10 @@ static int myri10ge_fill_thresh = 256;
 module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed\n");
 
+static int myri10ge_wcfifo = 1;
+module_param(myri10ge_wcfifo, int, S_IRUGO);
+MODULE_PARM_DESC(myri10ge_wcfifo, "Enable WC Fifo when WC is enabled\n");
+
 #define MYRI10GE_FW_OFFSET 1024*1024
 #define MYRI10GE_HIGHPART_TO_U32(X) \
 (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0)
@@ -1714,7 +1718,7 @@ static int myri10ge_open(struct net_device *dev)
                goto abort_with_irq;
        }
 
-       if (mgp->mtrr >= 0) {
+       if (myri10ge_wcfifo && mgp->mtrr >= 0) {
                mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + MXGEFW_ETH_SEND_4;
                mgp->rx_small.wc_fifo =
                    (u8 __iomem *) mgp->sram + MXGEFW_ETH_RECV_SMALL;
@@ -2878,7 +2882,6 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        netdev->hard_start_xmit = myri10ge_xmit;
        netdev->get_stats = myri10ge_get_stats;
        netdev->base_addr = mgp->iomem_base;
-       netdev->irq = pdev->irq;
        netdev->change_mtu = myri10ge_change_mtu;
        netdev->set_multicast_list = myri10ge_set_multicast_list;
        netdev->set_mac_address = myri10ge_set_mac_address;
@@ -2888,6 +2891,15 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        netdev->poll = myri10ge_poll;
        netdev->weight = myri10ge_napi_weight;
 
+       /* make sure we can get an irq, and that MSI can be
+        * setup (if available).  Also ensure netdev->irq
+        * is set to correct value if MSI is enabled */
+       status = myri10ge_request_irq(mgp);
+       if (status != 0)
+               goto abort_with_firmware;
+       netdev->irq = pdev->irq;
+       myri10ge_free_irq(mgp);
+
        /* Save configuration space to be restored if the
         * nic resets due to a parity error */
        pci_save_state(pdev);
@@ -2903,8 +2915,9 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                dev_err(&pdev->dev, "register_netdev failed: %d\n", status);
                goto abort_with_state;
        }
-       dev_info(dev, "%d, tx bndry %d, fw %s, WC %s\n",
-                pdev->irq, mgp->tx.boundary, mgp->fw_name,
+       dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n",
+                (mgp->msi_enabled ? "MSI" : "xPIC"),
+                netdev->irq, mgp->tx.boundary, mgp->fw_name,
                 (mgp->mtrr >= 0 ? "Enabled" : "Disabled"));
 
        return 0;
index 6490acf053053fbc644630fbce8d10a3aa67d212..59324b1693d6e8bc8fe1aea8ef70642f3cb0a455 100644 (file)
 
 #include "netxen_nic_hw.h"
 
-#define NETXEN_NIC_BUILD_NO     "4"
+#define NETXEN_NIC_BUILD_NO     "2"
 #define _NETXEN_NIC_LINUX_MAJOR 3
 #define _NETXEN_NIC_LINUX_MINOR 3
-#define _NETXEN_NIC_LINUX_SUBVERSION 2
-#define NETXEN_NIC_LINUX_VERSIONID  "3.3.2" "-" NETXEN_NIC_BUILD_NO
-#define NETXEN_NIC_FW_VERSIONID "3.3.2"
+#define _NETXEN_NIC_LINUX_SUBVERSION 3
+#define NETXEN_NIC_LINUX_VERSIONID  "3.3.3" "-" NETXEN_NIC_BUILD_NO
 
 #define RCV_DESC_RINGSIZE      \
        (sizeof(struct rcv_desc) * adapter->max_rx_desc_count)
index c0c31d1914a7e6c9485f2a6f78e4cc1474b9bfc4..191e2336e3234b9db39cbf1f0c4bf54b75b29bed 100644 (file)
@@ -984,7 +984,8 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter)
                       _NETXEN_NIC_LINUX_MAJOR, fw_major);
                adapter->driver_mismatch = 1;
        }
-       if (fw_minor != _NETXEN_NIC_LINUX_MINOR) {
+       if (fw_minor != _NETXEN_NIC_LINUX_MINOR &&
+                       fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) {
                printk(KERN_ERR "The mismatch in driver version and firmware "
                       "version minor number\n"
                       "Driver version minor number = %d \t"
index 8a5792fea774147cb7c7761eb89203a088ea9386..96e1bee19ba0b4cdd98a5284faaefd6883ebacb2 100644 (file)
@@ -1144,7 +1144,7 @@ static int __init netxen_init_module(void)
        if ((netxen_workq = create_singlethread_workqueue("netxen")) == 0)
                return -ENOMEM;
 
-       return pci_module_init(&netxen_driver);
+       return pci_register_driver(&netxen_driver);
 }
 
 module_init(netxen_init_module);
index 342f4062de0b158f17b8a38979b731819e1ac072..461e8274ef695c298df58d19e13ffb292f22c7bf 100644 (file)
@@ -606,11 +606,14 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
     kio_addr_t ioaddr = dev->base_addr;
     struct el3_private *priv = netdev_priv(dev);
+    unsigned long flags;
 
     DEBUG(3, "%s: el3_start_xmit(length = %ld) called, "
          "status %4.4x.\n", dev->name, (long)skb->len,
          inw(ioaddr + EL3_STATUS));
 
+    spin_lock_irqsave(&priv->lock, flags);    
+
     priv->stats.tx_bytes += skb->len;
 
     /* Put out the doubleword header... */
@@ -628,6 +631,7 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
     dev_kfree_skb(skb);
     pop_tx_status(dev);
+    spin_unlock_irqrestore(&priv->lock, flags);    
     
     return 0;
 }
@@ -729,14 +733,13 @@ static void media_check(unsigned long arg)
 
     if (!netif_device_present(dev)) goto reschedule;
 
-    EL3WINDOW(1);
     /* Check for pending interrupt with expired latency timer: with
        this, we can limp along even if the interrupt is blocked */
     if ((inw(ioaddr + EL3_STATUS) & IntLatch) &&
        (inb(ioaddr + EL3_TIMER) == 0xff)) {
        if (!lp->fast_poll)
            printk(KERN_WARNING "%s: interrupt(s) dropped!\n", dev->name);
-       el3_interrupt(dev->irq, lp);
+       el3_interrupt(dev->irq, dev);
        lp->fast_poll = HZ;
     }
     if (lp->fast_poll) {
index e175f3910b18e53711429e9d940ef01814469483..9765fa6614676d1d62009cf38342e0969136b755 100644 (file)
@@ -286,6 +286,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd)
 
        return 0;
 }
+EXPORT_SYMBOL(phy_ethtool_sset);
 
 int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
 {
@@ -302,7 +303,7 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
 
        return 0;
 }
-
+EXPORT_SYMBOL(phy_ethtool_gset);
 
 /* Note that this function is currently incompatible with the
  * PHYCONTROL layer.  It changes registers without regard to
index 250cdbeefdfde0da0641c999e6af0f0272351aa0..1dd66b8ea0fae545e12b70da9e45a7b01c16d79b 100644 (file)
@@ -556,10 +556,9 @@ static int init_shared_mem(struct s2io_nic *nic)
                }
        }
 
-       nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL);
+       nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL);
        if (!nic->ufo_in_band_v)
                return -ENOMEM;
-       memset(nic->ufo_in_band_v, 0, size);
 
        /* Allocation and initialization of RXDs in Rings */
        size = 0;
index b70ed79d412157e09a7f2e08438bb031fb42bf35..45d91b1591001f67d0135b31765811345c69f396 100644 (file)
@@ -1562,7 +1562,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
        for (i = 0; i < MAC_ADDR_LEN / 2; i++) {
                __le16 w = sis190_read_eeprom(ioaddr, EEPROMMACAddr + i);
 
-               ((u16 *)dev->dev_addr)[0] = le16_to_cpu(w);
+               ((u16 *)dev->dev_addr)[i] = le16_to_cpu(w);
        }
 
        sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo));
index deedfd5f82266fd6c18796a9bc4b25a1e2f573e0..45283f3f95e4a345e4c769d2181432c0deba0082 100644 (file)
@@ -60,7 +60,7 @@
 #define LINK_HZ                        (HZ/2)
 
 MODULE_DESCRIPTION("SysKonnect Gigabit Ethernet driver");
-MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>");
+MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
 
index a6601e8d423c88ed7621291c6d4bc3839aa5e2d6..a2e804ddca6c5289e72932a4652315cdd4800ded 100644 (file)
@@ -3691,6 +3691,6 @@ module_init(sky2_init_module);
 module_exit(sky2_cleanup_module);
 
 MODULE_DESCRIPTION("Marvell Yukon 2 Gigabit Ethernet driver");
-MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>");
+MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
index 8243150f5b05ec6572cc8cfce779e7674a0b6ef0..7e4b23c7c1bab72dc73174c492ca9df70c326b6b 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/fsl_devices.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
+#include <linux/workqueue.h>
 
 #include <asm/of_platform.h>
 #include <asm/uaccess.h>
@@ -472,7 +473,7 @@ static void put_enet_addr_container(struct enet_addr_container *enet_addr_cont)
        kfree(enet_addr_cont);
 }
 
-static int set_mac_addr(__be16 __iomem *reg, u8 *mac)
+static void set_mac_addr(__be16 __iomem *reg, u8 *mac)
 {
        out_be16(&reg[0], ((u16)mac[5] << 8) | mac[4]);
        out_be16(&reg[1], ((u16)mac[3] << 8) | mac[2]);
@@ -3920,10 +3921,11 @@ static irqreturn_t phy_interrupt(int irq, void *dev_id)
 }
 
 /* Scheduled by the phy_interrupt/timer to handle PHY changes */
-static void ugeth_phy_change(void *data)
+static void ugeth_phy_change(struct work_struct *work)
 {
-       struct net_device *dev = (struct net_device *)data;
-       struct ucc_geth_private *ugeth = netdev_priv(dev);
+       struct ucc_geth_private *ugeth =
+               container_of(work, struct ucc_geth_private, tq);
+       struct net_device *dev = ugeth->dev;
        struct ucc_geth *ug_regs;
        int result = 0;
 
@@ -4080,7 +4082,7 @@ static int ucc_geth_open(struct net_device *dev)
 #endif                         /* CONFIG_UGETH_NAPI */
 
        /* Set up the PHY change work queue */
-       INIT_WORK(&ugeth->tq, ugeth_phy_change, dev);
+       INIT_WORK(&ugeth->tq, ugeth_phy_change);
 
        init_timer(&ugeth->phy_info_timer);
        ugeth->phy_info_timer.function = &ugeth_phy_startup_timer;
index 5360ec05eaa331b256f199714caba1df0b2c60e8..3c86592ce03c0d18b8eb6953bbfc7a17981147e9 100644 (file)
@@ -68,8 +68,31 @@ static int gbit_config_aneg(struct ugeth_mii_info *mii_info);
 static int genmii_config_aneg(struct ugeth_mii_info *mii_info);
 static int genmii_update_link(struct ugeth_mii_info *mii_info);
 static int genmii_read_status(struct ugeth_mii_info *mii_info);
-u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum);
-void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val);
+
+static u16 ucc_geth_phy_read(struct ugeth_mii_info *mii_info, u16 regnum)
+{
+       u16 retval;
+       unsigned long flags;
+
+       ugphy_vdbg("%s: IN", __FUNCTION__);
+
+       spin_lock_irqsave(&mii_info->mdio_lock, flags);
+       retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum);
+       spin_unlock_irqrestore(&mii_info->mdio_lock, flags);
+
+       return retval;
+}
+
+static void ucc_geth_phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val)
+{
+       unsigned long flags;
+
+       ugphy_vdbg("%s: IN", __FUNCTION__);
+
+       spin_lock_irqsave(&mii_info->mdio_lock, flags);
+       mii_info->mdio_write(mii_info->dev, mii_info->mii_id, regnum, val);
+       spin_unlock_irqrestore(&mii_info->mdio_lock, flags);
+}
 
 /* Write value to the PHY for this device to the register at regnum, */
 /* waiting until the write is done before it returns.  All PHY */
@@ -184,7 +207,7 @@ static void config_genmii_advert(struct ugeth_mii_info *mii_info)
        advertise = mii_info->advertising;
 
        /* Setup standard advertisement */
-       adv = phy_read(mii_info, MII_ADVERTISE);
+       adv = ucc_geth_phy_read(mii_info, MII_ADVERTISE);
        adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
        if (advertise & ADVERTISED_10baseT_Half)
                adv |= ADVERTISE_10HALF;
@@ -194,7 +217,7 @@ static void config_genmii_advert(struct ugeth_mii_info *mii_info)
                adv |= ADVERTISE_100HALF;
        if (advertise & ADVERTISED_100baseT_Full)
                adv |= ADVERTISE_100FULL;
-       phy_write(mii_info, MII_ADVERTISE, adv);
+       ucc_geth_phy_write(mii_info, MII_ADVERTISE, adv);
 }
 
 static void genmii_setup_forced(struct ugeth_mii_info *mii_info)
@@ -204,7 +227,7 @@ static void genmii_setup_forced(struct ugeth_mii_info *mii_info)
 
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
-       ctrl = phy_read(mii_info, MII_BMCR);
+       ctrl = ucc_geth_phy_read(mii_info, MII_BMCR);
 
        ctrl &=
            ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_SPEED1000 | BMCR_ANENABLE);
@@ -234,7 +257,7 @@ static void genmii_setup_forced(struct ugeth_mii_info *mii_info)
                break;
        }
 
-       phy_write(mii_info, MII_BMCR, ctrl);
+       ucc_geth_phy_write(mii_info, MII_BMCR, ctrl);
 }
 
 /* Enable and Restart Autonegotiation */
@@ -244,9 +267,9 @@ static void genmii_restart_aneg(struct ugeth_mii_info *mii_info)
 
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
-       ctl = phy_read(mii_info, MII_BMCR);
+       ctl = ucc_geth_phy_read(mii_info, MII_BMCR);
        ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
-       phy_write(mii_info, MII_BMCR, ctl);
+       ucc_geth_phy_write(mii_info, MII_BMCR, ctl);
 }
 
 static int gbit_config_aneg(struct ugeth_mii_info *mii_info)
@@ -261,14 +284,14 @@ static int gbit_config_aneg(struct ugeth_mii_info *mii_info)
                config_genmii_advert(mii_info);
                advertise = mii_info->advertising;
 
-               adv = phy_read(mii_info, MII_1000BASETCONTROL);
+               adv = ucc_geth_phy_read(mii_info, MII_1000BASETCONTROL);
                adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP |
                         MII_1000BASETCONTROL_HALFDUPLEXCAP);
                if (advertise & SUPPORTED_1000baseT_Half)
                        adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP;
                if (advertise & SUPPORTED_1000baseT_Full)
                        adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP;
-               phy_write(mii_info, MII_1000BASETCONTROL, adv);
+               ucc_geth_phy_write(mii_info, MII_1000BASETCONTROL, adv);
 
                /* Start/Restart aneg */
                genmii_restart_aneg(mii_info);
@@ -298,10 +321,10 @@ static int genmii_update_link(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        /* Do a fake read */
-       phy_read(mii_info, MII_BMSR);
+       ucc_geth_phy_read(mii_info, MII_BMSR);
 
        /* Read link and autonegotiation status */
-       status = phy_read(mii_info, MII_BMSR);
+       status = ucc_geth_phy_read(mii_info, MII_BMSR);
        if ((status & BMSR_LSTATUS) == 0)
                mii_info->link = 0;
        else
@@ -329,7 +352,7 @@ static int genmii_read_status(struct ugeth_mii_info *mii_info)
                return err;
 
        if (mii_info->autoneg) {
-               status = phy_read(mii_info, MII_LPA);
+               status = ucc_geth_phy_read(mii_info, MII_LPA);
 
                if (status & (LPA_10FULL | LPA_100FULL))
                        mii_info->duplex = DUPLEX_FULL;
@@ -352,9 +375,9 @@ static int marvell_init(struct ugeth_mii_info *mii_info)
 {
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
-       phy_write(mii_info, 0x14, 0x0cd2);
-       phy_write(mii_info, MII_BMCR,
-                 phy_read(mii_info, MII_BMCR) | BMCR_RESET);
+       ucc_geth_phy_write(mii_info, 0x14, 0x0cd2);
+       ucc_geth_phy_write(mii_info, MII_BMCR,
+                 ucc_geth_phy_read(mii_info, MII_BMCR) | BMCR_RESET);
        msleep(4000);
 
        return 0;
@@ -367,13 +390,13 @@ static int marvell_config_aneg(struct ugeth_mii_info *mii_info)
        /* The Marvell PHY has an errata which requires
         * that certain registers get written in order
         * to restart autonegotiation */
-       phy_write(mii_info, MII_BMCR, BMCR_RESET);
+       ucc_geth_phy_write(mii_info, MII_BMCR, BMCR_RESET);
 
-       phy_write(mii_info, 0x1d, 0x1f);
-       phy_write(mii_info, 0x1e, 0x200c);
-       phy_write(mii_info, 0x1d, 0x5);
-       phy_write(mii_info, 0x1e, 0);
-       phy_write(mii_info, 0x1e, 0x100);
+       ucc_geth_phy_write(mii_info, 0x1d, 0x1f);
+       ucc_geth_phy_write(mii_info, 0x1e, 0x200c);
+       ucc_geth_phy_write(mii_info, 0x1d, 0x5);
+       ucc_geth_phy_write(mii_info, 0x1e, 0);
+       ucc_geth_phy_write(mii_info, 0x1e, 0x100);
 
        gbit_config_aneg(mii_info);
 
@@ -398,7 +421,7 @@ static int marvell_read_status(struct ugeth_mii_info *mii_info)
         * are as set */
        if (mii_info->autoneg && mii_info->link) {
                int speed;
-               status = phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS);
+               status = ucc_geth_phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS);
 
                /* Get the duplexity */
                if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX)
@@ -430,7 +453,7 @@ static int marvell_ack_interrupt(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        /* Clear the interrupts by reading the reg */
-       phy_read(mii_info, MII_M1011_IEVENT);
+       ucc_geth_phy_read(mii_info, MII_M1011_IEVENT);
 
        return 0;
 }
@@ -440,9 +463,9 @@ static int marvell_config_intr(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        if (mii_info->interrupts == MII_INTERRUPT_ENABLED)
-               phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT);
+               ucc_geth_phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT);
        else
-               phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR);
+               ucc_geth_phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR);
 
        return 0;
 }
@@ -451,9 +474,9 @@ static int cis820x_init(struct ugeth_mii_info *mii_info)
 {
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
-       phy_write(mii_info, MII_CIS8201_AUX_CONSTAT,
+       ucc_geth_phy_write(mii_info, MII_CIS8201_AUX_CONSTAT,
                  MII_CIS8201_AUXCONSTAT_INIT);
-       phy_write(mii_info, MII_CIS8201_EXT_CON1, MII_CIS8201_EXTCON1_INIT);
+       ucc_geth_phy_write(mii_info, MII_CIS8201_EXT_CON1, MII_CIS8201_EXTCON1_INIT);
 
        return 0;
 }
@@ -477,7 +500,7 @@ static int cis820x_read_status(struct ugeth_mii_info *mii_info)
        if (mii_info->autoneg && mii_info->link) {
                int speed;
 
-               status = phy_read(mii_info, MII_CIS8201_AUX_CONSTAT);
+               status = ucc_geth_phy_read(mii_info, MII_CIS8201_AUX_CONSTAT);
                if (status & MII_CIS8201_AUXCONSTAT_DUPLEX)
                        mii_info->duplex = DUPLEX_FULL;
                else
@@ -505,7 +528,7 @@ static int cis820x_ack_interrupt(struct ugeth_mii_info *mii_info)
 {
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
-       phy_read(mii_info, MII_CIS8201_ISTAT);
+       ucc_geth_phy_read(mii_info, MII_CIS8201_ISTAT);
 
        return 0;
 }
@@ -515,9 +538,9 @@ static int cis820x_config_intr(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        if (mii_info->interrupts == MII_INTERRUPT_ENABLED)
-               phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK);
+               ucc_geth_phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK);
        else
-               phy_write(mii_info, MII_CIS8201_IMASK, 0);
+               ucc_geth_phy_write(mii_info, MII_CIS8201_IMASK, 0);
 
        return 0;
 }
@@ -541,7 +564,7 @@ static int dm9161_read_status(struct ugeth_mii_info *mii_info)
        /* If we aren't autonegotiating, assume speeds
         * are as set */
        if (mii_info->autoneg && mii_info->link) {
-               status = phy_read(mii_info, MII_DM9161_SCSR);
+               status = ucc_geth_phy_read(mii_info, MII_DM9161_SCSR);
                if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_100H))
                        mii_info->speed = SPEED_100;
                else
@@ -572,7 +595,7 @@ static void dm9161_timer(unsigned long data)
 {
        struct ugeth_mii_info *mii_info = (struct ugeth_mii_info *)data;
        struct dm9161_private *priv = mii_info->priv;
-       u16 status = phy_read(mii_info, MII_BMSR);
+       u16 status = ucc_geth_phy_read(mii_info, MII_BMSR);
 
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
@@ -599,11 +622,11 @@ static int dm9161_init(struct ugeth_mii_info *mii_info)
        /* Reset is not done yet */
        priv->resetdone = 0;
 
-       phy_write(mii_info, MII_BMCR,
-                 phy_read(mii_info, MII_BMCR) | BMCR_RESET);
+       ucc_geth_phy_write(mii_info, MII_BMCR,
+                 ucc_geth_phy_read(mii_info, MII_BMCR) | BMCR_RESET);
 
-       phy_write(mii_info, MII_BMCR,
-                 phy_read(mii_info, MII_BMCR) & ~BMCR_ISOLATE);
+       ucc_geth_phy_write(mii_info, MII_BMCR,
+                 ucc_geth_phy_read(mii_info, MII_BMCR) & ~BMCR_ISOLATE);
 
        config_genmii_advert(mii_info);
        /* Start/Restart aneg */
@@ -634,7 +657,7 @@ static int dm9161_ack_interrupt(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        /* Clear the interrupts by reading the reg */
-       phy_read(mii_info, MII_DM9161_INTR);
+       ucc_geth_phy_read(mii_info, MII_DM9161_INTR);
 
 
        return 0;
@@ -645,9 +668,9 @@ static int dm9161_config_intr(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        if (mii_info->interrupts == MII_INTERRUPT_ENABLED)
-               phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_INIT);
+               ucc_geth_phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_INIT);
        else
-               phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_STOP);
+               ucc_geth_phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_STOP);
 
        return 0;
 }
@@ -718,31 +741,6 @@ static struct phy_info *phy_info[] = {
        NULL
 };
 
-u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum)
-{
-       u16 retval;
-       unsigned long flags;
-
-       ugphy_vdbg("%s: IN", __FUNCTION__);
-
-       spin_lock_irqsave(&mii_info->mdio_lock, flags);
-       retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum);
-       spin_unlock_irqrestore(&mii_info->mdio_lock, flags);
-
-       return retval;
-}
-
-void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val)
-{
-       unsigned long flags;
-
-       ugphy_vdbg("%s: IN", __FUNCTION__);
-
-       spin_lock_irqsave(&mii_info->mdio_lock, flags);
-       mii_info->mdio_write(mii_info->dev, mii_info->mii_id, regnum, val);
-       spin_unlock_irqrestore(&mii_info->mdio_lock, flags);
-}
-
 /* Use the PHY ID registers to determine what type of PHY is attached
  * to device dev.  return a struct phy_info structure describing that PHY
  */
@@ -757,11 +755,11 @@ struct phy_info *get_phy_info(struct ugeth_mii_info *mii_info)
        ugphy_vdbg("%s: IN", __FUNCTION__);
 
        /* Grab the bits from PHYIR1, and put them in the upper half */
-       phy_reg = phy_read(mii_info, MII_PHYSID1);
+       phy_reg = ucc_geth_phy_read(mii_info, MII_PHYSID1);
        phy_ID = (phy_reg & 0xffff) << 16;
 
        /* Grab the bits from PHYIR2, and put them in the lower half */
-       phy_reg = phy_read(mii_info, MII_PHYSID2);
+       phy_reg = ucc_geth_phy_read(mii_info, MII_PHYSID2);
        phy_ID |= (phy_reg & 0xffff);
 
        /* loop through all the known PHY types, and find one that */
index 2ec2e5afce67dd67d6e62e235e4ac68db37fb76c..91b752e3d07e104f10673f35fc8aee2aa5199df8 100644 (file)
@@ -2701,8 +2701,8 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm)
                sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI);
 
                /* extract core_id, core_rev, core_vendor */
-               core_id = (sb_id_hi & 0xFFF0) >> 4;
-               core_rev = (sb_id_hi & 0xF);
+               core_id = (sb_id_hi & 0x8FF0) >> 4;
+               core_rev = ((sb_id_hi & 0xF) | ((sb_id_hi & 0x7000) >> 8));
                core_vendor = (sb_id_hi & 0xFFFF0000) >> 16;
 
                dprintk(KERN_INFO PFX "Core %d: ID 0x%x, rev 0x%x, vendor 0x%x\n",
@@ -2873,7 +2873,10 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm,
                sbimconfiglow = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
                sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
                sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
-               sbimconfiglow |= 0x32;
+               if (bcm->bustype == BCM43xx_BUSTYPE_PCI)
+                       sbimconfiglow |= 0x32;
+               else
+                       sbimconfiglow |= 0x53;
                bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, sbimconfiglow);
        }
 
@@ -3077,7 +3080,7 @@ static int bcm43xx_setup_backplane_pci_connection(struct bcm43xx_private *bcm,
        if (err)
                goto out;
 
-       if (bcm->current_core->rev < 6 ||
+       if (bcm->current_core->rev < 6 &&
                bcm->current_core->id == BCM43xx_COREID_PCI) {
                value = bcm43xx_read32(bcm, BCM43xx_CIR_SBINTVEC);
                value |= (1 << backplane_flag_nr);
index b8d2385e29bc04e72926e43d59e84ce59fc2bb27..92d5e8db0de7b63f0c92a761551af5452db30673 100644 (file)
@@ -150,8 +150,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
 }
 
 /**
- * pci_match_device - Tell if a PCI device structure has a matching
- *                    PCI device id structure
+ * pci_match_device - Tell if a PCI device structure has a matching PCI device id structure
  * @drv: the PCI driver to match against
  * @dev: the PCI device structure to match against
  *
index 0a70943f8bb6b5748ae3cf16d9da429b7120f9ec..ef882a8a094e7efe73808b5594aace721768819a 100644 (file)
@@ -1002,6 +1002,11 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
                        case 0x186a: /* M6Ne notebook */
                                asus_hides_smbus = 1;
                        }
+               if (dev->device == PCI_DEVICE_ID_INTEL_82865_HB)
+                       switch (dev->subsystem_device) {
+                       case 0x80f2: /* P4P800-X */
+                               asus_hides_smbus = 1;
+                       }
                if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) {
                        switch (dev->subsystem_device) {
                        case 0x1882: /* M6V notebook */
index e9e0934380b8c8e1a0f594d665be11a5e625505b..198b9f22fbff5ca93748e2c06b4f04d815ec94b5 100644 (file)
@@ -492,10 +492,10 @@ static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
 
        spin_lock_irq(&rtc->lock);
 
-       /* disable alarm interrupt and clear flag */
+       /* disable alarm interrupt and clear the alarm flag */
        rcr1 = readb(rtc->regbase + RCR1);
-       rcr1 &= ~RCR1_AF;
-       writeb(rcr1 & ~RCR1_AIE, rtc->regbase + RCR1);
+       rcr1 &= ~(RCR1_AF|RCR1_AIE);
+       writeb(rcr1, rtc->regbase + RCR1);
 
        rtc->rearm_aie = 0;
 
@@ -510,8 +510,10 @@ static int sh_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
                mon += 1;
        sh_rtc_write_alarm_value(rtc, mon, RMONAR);
 
-       /* Restore interrupt activation status */
-       writeb(rcr1, rtc->regbase + RCR1);
+       if (wkalrm->enabled) {
+               rcr1 |= RCR1_AIE;
+               writeb(rcr1, rtc->regbase + RCR1);
+       }
 
        spin_unlock_irq(&rtc->lock);
 
index 99a259c5a0c07c830b78936ee4983586d90c2dc9..e1b44d6c0c32e52e3741b10606573facd6d2d938 100644 (file)
@@ -6,7 +6,7 @@
                     Arnaldo Carvalho de Melo <acme@conectiva.com.br>
                      Brad Strand <linux@3ware.com>
 
-   Copyright (C) 1999-2005 3ware Inc.
+   Copyright (C) 1999-2007 3ware Inc.
 
    Kernel compatiblity By:     Andre Hedrick <andre@suse.com>
    Non-Copyright (C) 2000      Andre Hedrick <andre@suse.com>
                  before shutting down card.
                  Change to new 'change_queue_depth' api.
                  Fix 'handled=1' ISR usage, remove bogus IRQ check.
+   1.26.02.002 - Free irq handler in __tw_shutdown().
+                 Turn on RCD bit for caching mode page.
+                 Serialize reset code.
 */
 
 #include <linux/module.h>
 #include "3w-xxxx.h"
 
 /* Globals */
-#define TW_DRIVER_VERSION "1.26.02.001"
+#define TW_DRIVER_VERSION "1.26.02.002"
 static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT];
 static int tw_device_extension_count = 0;
 static int twe_major = -1;
@@ -226,7 +229,7 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION(TW_DRIVER_VERSION);
 
 /* Function prototypes */
-static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset);
+static int tw_reset_device_extension(TW_Device_Extension *tw_dev);
 
 /* Functions */
 
@@ -984,24 +987,12 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int
                        /* Now wait for the command to complete */
                        timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout);
 
-                       /* See if we reset while waiting for the ioctl to complete */
-                       if (test_bit(TW_IN_RESET, &tw_dev->flags)) {
-                               clear_bit(TW_IN_RESET, &tw_dev->flags);
-                               retval = -ERESTARTSYS;
-                               goto out2;
-                       }
-
                        /* We timed out, and didn't get an interrupt */
                        if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) {
                                /* Now we need to reset the board */
                                printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd);
                                retval = -EIO;
-                               spin_lock_irqsave(tw_dev->host->host_lock, flags);
-                               tw_dev->state[request_id] = TW_S_COMPLETED;
-                               tw_state_request_finish(tw_dev, request_id);
-                               tw_dev->posted_request_count--;
-                               spin_unlock_irqrestore(tw_dev->host->host_lock, flags);
-                               if (tw_reset_device_extension(tw_dev, 1)) {
+                               if (tw_reset_device_extension(tw_dev)) {
                                        printk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl(): Reset failed for card %d.\n", tw_dev->host->host_no);
                                }
                                goto out2;
@@ -1336,7 +1327,7 @@ static void tw_unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
 } /* End tw_unmap_scsi_data() */
 
 /* This function will reset a device extension */
-static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset) 
+static int tw_reset_device_extension(TW_Device_Extension *tw_dev)
 {
        int i = 0;
        struct scsi_cmnd *srb;
@@ -1382,15 +1373,10 @@ static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_rese
                printk(KERN_WARNING "3w-xxxx: scsi%d: Reset sequence failed.\n", tw_dev->host->host_no);
                return 1;
        }
-       TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
 
-       /* Wake up any ioctl that was pending before the reset */
-       if ((tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE) || (ioctl_reset)) {
-               clear_bit(TW_IN_RESET, &tw_dev->flags);
-       } else {
-               tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
-               wake_up(&tw_dev->ioctl_wqueue);
-       }
+       TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
+       clear_bit(TW_IN_RESET, &tw_dev->flags);
+       tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE;
 
        return 0;
 } /* End tw_reset_device_extension() */
@@ -1437,14 +1423,18 @@ static int tw_scsi_eh_reset(struct scsi_cmnd *SCpnt)
                "WARNING: Command (0x%x) timed out, resetting card.\n",
                SCpnt->cmnd[0]);
 
+       /* Make sure we are not issuing an ioctl or resetting from ioctl */
+       mutex_lock(&tw_dev->ioctl_lock);
+
        /* Now reset the card and some of the device extension data */
-       if (tw_reset_device_extension(tw_dev, 0)) {
+       if (tw_reset_device_extension(tw_dev)) {
                printk(KERN_WARNING "3w-xxxx: scsi%d: Reset failed.\n", tw_dev->host->host_no);
                goto out;
        }
 
        retval = SUCCESS;
 out:
+       mutex_unlock(&tw_dev->ioctl_lock);
        return retval;
 } /* End tw_scsi_eh_reset() */
 
@@ -1660,9 +1650,9 @@ static int tw_scsiop_mode_sense_complete(TW_Device_Extension *tw_dev, int reques
        request_buffer[4] = 0x8;        /* caching page */
        request_buffer[5] = 0xa;        /* page length */
        if (*flags & 0x1)
-               request_buffer[6] = 0x4;        /* WCE on */
+               request_buffer[6] = 0x5;        /* WCE on, RCD on */
        else
-               request_buffer[6] = 0x0;        /* WCE off */
+               request_buffer[6] = 0x1;        /* WCE off, RCD on */
        tw_transfer_internal(tw_dev, request_id, request_buffer,
                             sizeof(request_buffer));
 
@@ -2012,6 +2002,10 @@ static int tw_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd
        int retval = 1;
        TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;
 
+       /* If we are resetting due to timed out ioctl, report as busy */
+       if (test_bit(TW_IN_RESET, &tw_dev->flags))
+               return SCSI_MLQUEUE_HOST_BUSY;
+
        /* Save done function into Scsi_Cmnd struct */
        SCpnt->scsi_done = done;
                 
@@ -2100,6 +2094,10 @@ static irqreturn_t tw_interrupt(int irq, void *dev_instance)
 
        handled = 1;
 
+       /* If we are resetting, bail */
+       if (test_bit(TW_IN_RESET, &tw_dev->flags))
+               goto tw_interrupt_bail;
+
        /* Check controller for errors */
        if (tw_check_bits(status_reg_value)) {
                dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
@@ -2276,6 +2274,9 @@ static void __tw_shutdown(TW_Device_Extension *tw_dev)
        /* Disable interrupts */
        TW_DISABLE_INTERRUPTS(tw_dev);
 
+       /* Free up the IRQ */
+       free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
+
        printk(KERN_WARNING "3w-xxxx: Shutting down host %d.\n", tw_dev->host->host_no);
 
        /* Tell the card we are shutting down */
@@ -2444,9 +2445,6 @@ static void tw_remove(struct pci_dev *pdev)
                twe_major = -1;
        }
 
-       /* Free up the IRQ */
-       free_irq(tw_dev->tw_pci_dev->irq, tw_dev);
-
        /* Shutdown the card */
        __tw_shutdown(tw_dev);
 
index bbd654a2b9b1e5e15562cbbb1d3915b7e961b227..0742e68466565459fffc6a7ae6ffaae4f91c9422 100644 (file)
@@ -6,7 +6,7 @@
                     Arnaldo Carvalho de Melo <acme@conectiva.com.br>
                      Brad Strand <linux@3ware.com>
 
-   Copyright (C) 1999-2005 3ware Inc.
+   Copyright (C) 1999-2007 3ware Inc.
 
    Kernel compatiblity By:     Andre Hedrick <andre@suse.com>
    Non-Copyright (C) 2000      Andre Hedrick <andre@suse.com>
index 60f5827271851e064d1ce807dd2b1848f4950ab0..7869c34a4a3eed46f82c281adc238aa48e5591df 100644 (file)
@@ -1303,7 +1303,7 @@ config SCSI_LPFC
 
 config SCSI_SEAGATE
        tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support"
-       depends on X86 && ISA && SCSI && BROKEN
+       depends on X86 && ISA && SCSI
        ---help---
          These are 8-bit SCSI controllers; the ST-01 is also supported by
          this driver.  It is explained in section 3.9 of the SCSI-HOWTO,
index 359e7ddfdb4715329bf79f6b40953df462a72c87..d2cf875af59b6139fa99f63257b1e189fc22551a 100644 (file)
@@ -117,8 +117,8 @@ static struct pci_device_id aac_pci_tbl[] = {
        { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */
        { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */
        { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */
-       { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024R0 (Lancer) */
-       { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */
+       { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024RO (Lancer) */
+       { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014RO (Lancer) */
        { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */
        { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */
        { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */
@@ -137,15 +137,15 @@ static struct pci_device_id aac_pci_tbl[] = {
        { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 41 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
        { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 42 }, /* AAR-2610SA PCI SATA 6ch */
        { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 43 }, /* ASR-2240S (SabreExpress) */
-       { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 44 }, /* ASR-4005SAS */
+       { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 44 }, /* ASR-4005 */
        { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 45 }, /* IBM 8i (AvonPark) */
        { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 45 }, /* IBM 8i (AvonPark Lite) */
        { 0x9005, 0x0286, 0x1014, 0x9580, 0, 0, 46 }, /* IBM 8k/8k-l8 (Aurora) */
        { 0x9005, 0x0286, 0x1014, 0x9540, 0, 0, 47 }, /* IBM 8k/8k-l4 (Aurora Lite) */
-       { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000SAS (BlackBird) */
+       { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000 (BlackBird) */
        { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */
        { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */
-       { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800SAS (Hurricane44) */
+       { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800 (Hurricane44) */
 
        { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/
        { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/
@@ -193,8 +193,8 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2820SA      ", 1 }, /* AAR-2820SA (Intruder) */
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2620SA      ", 1 }, /* AAR-2620SA (Intruder) */
        { aac_rkt_init, "aacraid",  "ADAPTEC ", "AAR-2420SA      ", 1 }, /* AAR-2420SA (Intruder) */
-       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9024R0       ", 2 }, /* ICP9024R0 (Lancer) */
-       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9014R0       ", 1 }, /* ICP9014R0 (Lancer) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9024RO       ", 2 }, /* ICP9024RO (Lancer) */
+       { aac_rkt_init, "aacraid",  "ICP     ", "ICP9014RO       ", 1 }, /* ICP9014RO (Lancer) */
        { aac_rkt_init, "aacraid",  "ICP     ", "ICP9047MA       ", 1 }, /* ICP9047MA (Lancer) */
        { aac_rkt_init, "aacraid",  "ICP     ", "ICP9087MA       ", 1 }, /* ICP9087MA (Lancer) */
        { aac_rkt_init, "aacraid",  "ICP     ", "ICP5445AU       ", 1 }, /* ICP5445AU (Hurricane44) */
@@ -212,14 +212,14 @@ static struct aac_driver_ident aac_drivers[] = {
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2026ZCR     ", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2610SA      ", 1 }, /* SATA 6Ch (Bearcat) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2240S       ", 1 }, /* ASR-2240S (SabreExpress) */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4005SAS     ", 1 }, /* ASR-4005SAS */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4005        ", 1 }, /* ASR-4005 */
        { aac_rx_init, "ServeRAID","IBM     ", "ServeRAID 8i    ", 1 }, /* IBM 8i (AvonPark) */
        { aac_rkt_init, "ServeRAID","IBM     ", "ServeRAID 8k-l8 ", 1 }, /* IBM 8k/8k-l8 (Aurora) */
        { aac_rkt_init, "ServeRAID","IBM     ", "ServeRAID 8k-l4 ", 1 }, /* IBM 8k/8k-l4 (Aurora Lite) */
-       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4000SAS     ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4000        ", 1 }, /* ASR-4000 (BlackBird & AvonPark) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4800SAS     ", 1 }, /* ASR-4800SAS (Marauder-X) */
        { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-4805SAS     ", 1 }, /* ASR-4805SAS (Marauder-E) */
-       { aac_rkt_init, "aacraid",  "ADAPTEC ", "ASR-3800SAS     ", 1 }, /* ASR-3800SAS (Hurricane44) */
+       { aac_rkt_init, "aacraid",  "ADAPTEC ", "ASR-3800        ", 1 }, /* ASR-3800 (Hurricane44) */
 
        { aac_rx_init, "percraid", "DELL    ", "PERC 320/DC     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/
        { aac_sa_init, "aacraid",  "ADAPTEC ", "Adaptec 5400S   ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/
index 2b344356a29e997cd381c5697a3c82badb6c04a2..306bec355e45c9abc80b03631c23c64616983346 100644 (file)
@@ -18215,6 +18215,7 @@ AdvInquiryHandling(
 }
 MODULE_LICENSE("Dual BSD/GPL");
 
+#ifdef CONFIG_PCI
 /* PCI Devices supported by this driver */
 static struct pci_device_id advansys_pci_tbl[] __devinitdata = {
        { PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A,
@@ -18232,4 +18233,4 @@ static struct pci_device_id advansys_pci_tbl[] __devinitdata = {
        { }
 };
 MODULE_DEVICE_TABLE(pci, advansys_pci_tbl);
-
+#endif /* CONFIG_PCI */
index d0b139cccbbc388371f45005e6ae51d00f9e55c5..43768408437705fd81184e7be9e3a6a5d7bba0bb 100644 (file)
@@ -749,7 +749,7 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn)
                                if (!offset)
                                        crypto_hash_update(
                                                        &tcp_conn->rx_hash,
-                                                       &sg[i], 1);
+                                                       &sg[i], sg[i].length);
                                else
                                        partial_sg_digest_update(
                                                        &tcp_conn->rx_hash,
@@ -1777,13 +1777,13 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
        tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0,
                                                  CRYPTO_ALG_ASYNC);
        tcp_conn->tx_hash.flags = 0;
-       if (!tcp_conn->tx_hash.tfm)
+       if (IS_ERR(tcp_conn->tx_hash.tfm))
                goto free_tcp_conn;
 
        tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
                                                  CRYPTO_ALG_ASYNC);
        tcp_conn->rx_hash.flags = 0;
-       if (!tcp_conn->rx_hash.tfm)
+       if (IS_ERR(tcp_conn->rx_hash.tfm))
                goto free_tx_tfm;
 
        return cls_conn;
@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
                sk = tcp_conn->sock->sk;
                if (sk->sk_family == PF_INET) {
                        inet = inet_sk(sk);
-                       len = sprintf(buf, "%u.%u.%u.%u\n",
+                       len = sprintf(buf, NIPQUAD_FMT "\n",
                                      NIPQUAD(inet->daddr));
                } else {
                        np = inet6_sk(sk);
-                       len = sprintf(buf,
-                               "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
-                               NIP6(np->daddr));
+                       len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr));
                }
                mutex_unlock(&conn->xmitmutex);
                break;
index e11b23c641e28e36506c272a626b8dc5cbfc01ce..d37048c96eab5163231f04917408a6c418c25b79 100644 (file)
@@ -260,7 +260,7 @@ static int iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
        }
 
        if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) {
-               int senselen;
+               uint16_t senselen;
 
                if (datalen < 2) {
 invalid_datalen:
@@ -270,12 +270,12 @@ invalid_datalen:
                        goto out;
                }
 
-               senselen = (data[0] << 8) | data[1];
+               senselen = be16_to_cpu(*(uint16_t *)data);
                if (datalen < senselen)
                        goto invalid_datalen;
 
                memcpy(sc->sense_buffer, data + 2,
-                      min(senselen, SCSI_SENSE_BUFFERSIZE));
+                      min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE));
                debug_scsi("copied %d bytes of sense\n",
                           min(senselen, SCSI_SENSE_BUFFERSIZE));
        }
index 066292d3995a5b33eba898a34f76a1eab206c8c7..ec3bbbde6f7a397442eec29fbb477ca35a97f556 100644 (file)
@@ -56,6 +56,9 @@ lpfc_mem_alloc(struct lpfc_hba * phba)
 
        pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) *
                                         LPFC_MBUF_POOL_SIZE, GFP_KERNEL);
+       if (!pool->elements)
+               goto fail_free_lpfc_mbuf_pool;
+
        pool->max_count = 0;
        pool->current_count = 0;
        for ( i = 0; i < LPFC_MBUF_POOL_SIZE; i++) {
@@ -82,10 +85,11 @@ lpfc_mem_alloc(struct lpfc_hba * phba)
  fail_free_mbox_pool:
        mempool_destroy(phba->mbox_mem_pool);
  fail_free_mbuf_pool:
-       while (--i)
+       while (i--)
                pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt,
                                                 pool->elements[i].phys);
        kfree(pool->elements);
+ fail_free_lpfc_mbuf_pool:
        pci_pool_destroy(phba->lpfc_mbuf_pool);
  fail_free_dma_buf_pool:
        pci_pool_destroy(phba->lpfc_scsi_dma_buf_pool);
index 046223b4ae5747255082cc1747a3afaa5a02afc1..b5bdd0d7a8bf09b508c361713d1bf4ff2526de6b 100644 (file)
@@ -13,8 +13,8 @@
  * Version     : v00.00.03.05
  *
  * Authors:
- *     Sreenivas Bagalkote     <Sreenivas.Bagalkote@lsil.com>
- *     Sumant Patro            <Sumant.Patro@lsil.com>
+ *     Sreenivas Bagalkote     <Sreenivas.Bagalkote@lsi.com>
+ *     Sumant Patro            <Sumant.Patro@lsi.com>
  *
  * List of supported controllers
  *
@@ -45,7 +45,7 @@
 
 MODULE_LICENSE("GPL");
 MODULE_VERSION(MEGASAS_VERSION);
-MODULE_AUTHOR("sreenivas.bagalkote@lsil.com");
+MODULE_AUTHOR("megaraidlinux@lsi.com");
 MODULE_DESCRIPTION("LSI Logic MegaRAID SAS Driver");
 
 /*
index 16af5b79e5878ff23f8b920c6ad2bf6a125c2042..1548d42a3b4390781320fde64dddec2ae4316b8b 100644 (file)
@@ -1341,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp)
        int host_status = DID_ERROR;
        uint16_t comp_status = le16_to_cpu(sts->comp_status);
        uint16_t state_flags = le16_to_cpu(sts->state_flags);
-       uint16_t residual_length = le32_to_cpu(sts->residual_length);
+       uint32_t residual_length = le32_to_cpu(sts->residual_length);
        uint16_t scsi_status = le16_to_cpu(sts->scsi_status);
 #if DEBUG_QLA1280_INTR
        static char *reason[] = {
@@ -1413,8 +1413,10 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp)
                               "scsi: Underflow detected - retrying "
                               "command.\n");
                        host_status = DID_ERROR;
-               } else
+               } else {
+                       cp->resid = residual_length;
                        host_status = DID_OK;
+               }
                break;
 
        default:
index c4fc40f8e8caee98555358c2a2d1d0a9d01f4138..2c10130d9e03fe2a037f361ed80ef80963aa8f8b 100644 (file)
@@ -1602,6 +1602,7 @@ typedef struct fc_port {
 
 #define CT_REJECT_RESPONSE     0x8001
 #define CT_ACCEPT_RESPONSE     0x8002
+#define CT_REASON_INVALID_COMMAND_CODE 0x01
 #define CT_REASON_CANNOT_PERFORM       0x09
 #define CT_EXPL_ALREADY_REGISTERED     0x10
 
@@ -2079,6 +2080,7 @@ typedef struct scsi_qla_host {
                uint32_t        msi_enabled             :1;
                uint32_t        msix_enabled            :1;
                uint32_t        disable_serdes          :1;
+               uint32_t        gpsc_supported          :1;
        } flags;
 
        atomic_t        loop_state;
index 32ebeec45ff000bdb51e4d13d1e4e05bc692f000..e4dd12f4b80eaf014d84f9e837a9cc8c3901ab12 100644 (file)
@@ -45,7 +45,6 @@ extern void qla2x00_update_fcports(scsi_qla_host_t *);
 extern int qla2x00_abort_isp(scsi_qla_host_t *);
 
 extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *);
-extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *);
 
 extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *);
 extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *);
index 97fbc62ec66958ac4319aea507e2e4750c1ddb10..ec5b2dd90d6a6c27445765c8ebbc70c99dcdf012 100644 (file)
@@ -127,8 +127,8 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt,
                    ha->host_no, routine, ms_pkt->entry_status));
        } else {
                if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
-                       comp_status =
-                           ((struct ct_entry_24xx *)ms_pkt)->comp_status;
+                       comp_status = le16_to_cpu(
+                           ((struct ct_entry_24xx *)ms_pkt)->comp_status);
                else
                        comp_status = le16_to_cpu(ms_pkt->status);
                switch (comp_status) {
@@ -143,6 +143,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt,
                                DEBUG2_3(qla2x00_dump_buffer(
                                    (uint8_t *)&ct_rsp->header,
                                    sizeof(struct ct_rsp_hdr)));
+                               rval = QLA_INVALID_COMMAND;
                        } else
                                rval = QLA_SUCCESS;
                        break;
@@ -1683,7 +1684,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list)
                memset(list[i].fabric_port_name, 0, WWN_SIZE);
 
                /* Prepare common MS IOCB */
-               ms_pkt = qla2x00_prep_ms_iocb(ha, GFPN_ID_REQ_SIZE,
+               ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GFPN_ID_REQ_SIZE,
                    GFPN_ID_RSP_SIZE);
 
                /* Prepare CT request */
@@ -1784,6 +1785,8 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
 
        if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))
                return QLA_FUNCTION_FAILED;
+       if (!ha->flags.gpsc_supported)
+               return QLA_FUNCTION_FAILED;
 
        rval = qla2x00_mgmt_svr_login(ha);
        if (rval)
@@ -1813,8 +1816,19 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
                        /*EMPTY*/
                        DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB "
                            "failed (%d).\n", ha->host_no, rval));
-               } else if (qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp,
-                   "GPSC") != QLA_SUCCESS) {
+               } else if ((rval = qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp,
+                   "GPSC")) != QLA_SUCCESS) {
+                       /* FM command unsupported? */
+                       if (rval == QLA_INVALID_COMMAND &&
+                           ct_rsp->header.reason_code ==
+                           CT_REASON_INVALID_COMMAND_CODE) {
+                               DEBUG2(printk("scsi(%ld): GPSC command "
+                                   "unsupported, disabling query...\n",
+                                   ha->host_no));
+                               ha->flags.gpsc_supported = 0;
+                               rval = QLA_FUNCTION_FAILED;
+                               break;
+                       }
                        rval = QLA_FUNCTION_FAILED;
                } else {
                        /* Save portname */
index a823f0bc519dbf8e7c921d2fb3924a94f1aebab8..b3dac26ddba3e50767c852aecaf07921bf4f363a 100644 (file)
@@ -2103,40 +2103,7 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
        }
 }
 
-/*
- * qla2x00_update_fcport
- *     Updates device on list.
- *
- * Input:
- *     ha = adapter block pointer.
- *     fcport = port structure pointer.
- *
- * Return:
- *     0  - Success
- *  BIT_0 - error
- *
- * Context:
- *     Kernel context.
- */
-void
-qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
-{
-       fcport->ha = ha;
-       fcport->login_retry = 0;
-       fcport->port_login_retry_count = ha->port_down_retry_count *
-           PORT_RETRY_TIME;
-       atomic_set(&fcport->port_down_timer, ha->port_down_retry_count *
-           PORT_RETRY_TIME);
-       fcport->flags &= ~FCF_LOGIN_NEEDED;
-
-       qla2x00_iidma_fcport(ha, fcport);
-
-       atomic_set(&fcport->state, FCS_ONLINE);
-
-       qla2x00_reg_remote_port(ha, fcport);
-}
-
-void
+static void
 qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
 {
        struct fc_rport_identifiers rport_ids;
@@ -2178,6 +2145,39 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport)
                fcport->os_target_id = rport->scsi_target_id;
 }
 
+/*
+ * qla2x00_update_fcport
+ *     Updates device on list.
+ *
+ * Input:
+ *     ha = adapter block pointer.
+ *     fcport = port structure pointer.
+ *
+ * Return:
+ *     0  - Success
+ *  BIT_0 - error
+ *
+ * Context:
+ *     Kernel context.
+ */
+void
+qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport)
+{
+       fcport->ha = ha;
+       fcport->login_retry = 0;
+       fcport->port_login_retry_count = ha->port_down_retry_count *
+           PORT_RETRY_TIME;
+       atomic_set(&fcport->port_down_timer, ha->port_down_retry_count *
+           PORT_RETRY_TIME);
+       fcport->flags &= ~FCF_LOGIN_NEEDED;
+
+       qla2x00_iidma_fcport(ha, fcport);
+
+       atomic_set(&fcport->state, FCS_ONLINE);
+
+       qla2x00_reg_remote_port(ha, fcport);
+}
+
 /*
  * qla2x00_configure_fabric
  *      Setup SNS devices with loop ID's.
@@ -3476,9 +3476,11 @@ qla24xx_nvram_config(scsi_qla_host_t *ha)
 
        /* Set host adapter parameters. */
        ha->flags.disable_risc_code_load = 0;
-       ha->flags.enable_lip_reset = 1;
-       ha->flags.enable_lip_full_login = 1;
-       ha->flags.enable_target_reset = 1;
+       ha->flags.enable_lip_reset = 0;
+       ha->flags.enable_lip_full_login =
+           le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
+       ha->flags.enable_target_reset =
+           le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
        ha->flags.enable_led_scheme = 0;
        ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
 
index d3b6df4d55c890990f75d0239a62fd65b22213a9..39fd17b05be5ada3d3da55515c2d89bba857cd71 100644 (file)
@@ -134,11 +134,11 @@ qla2300_intr_handler(int irq, void *dev_id)
                if (stat & HSR_RISC_PAUSED) {
                        hccr = RD_REG_WORD(&reg->hccr);
                        if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8))
-                               qla_printk(KERN_INFO, ha,
-                                   "Parity error -- HCCR=%x.\n", hccr);
+                               qla_printk(KERN_INFO, ha, "Parity error -- "
+                                   "HCCR=%x, Dumping firmware!\n", hccr);
                        else
-                               qla_printk(KERN_INFO, ha,
-                                   "RISC paused -- HCCR=%x.\n", hccr);
+                               qla_printk(KERN_INFO, ha, "RISC paused -- "
+                                   "HCCR=%x, Dumping firmware!\n", hccr);
 
                        /*
                         * Issue a "HARD" reset in order for the RISC
@@ -147,6 +147,8 @@ qla2300_intr_handler(int irq, void *dev_id)
                         */
                        WRT_REG_WORD(&reg->hccr, HCCR_RESET_RISC);
                        RD_REG_WORD(&reg->hccr);
+
+                       ha->isp_ops.fw_dump(ha, 1);
                        set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
                        break;
                } else if ((stat & HSR_RISC_INT) == 0)
@@ -475,6 +477,8 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
                        set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags);
                }
                set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags);
+
+               ha->flags.gpsc_supported = 1;
                break;
 
        case MBA_CHG_IN_CONNECTION:     /* Change in connection mode */
@@ -1440,8 +1444,7 @@ qla24xx_intr_handler(int irq, void *dev_id)
 
                        qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, "
                            "Dumping firmware!\n", hccr);
-                       qla24xx_fw_dump(ha, 1);
-
+                       ha->isp_ops.fw_dump(ha, 1);
                        set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
                        break;
                } else if ((stat & HSRX_RISC_INT) == 0)
index 4cde76c85cb39a72610e2183fd7dc82fd6b7db95..077e5789beeb0870742c5720e8d13e5a5d58c9bf 100644 (file)
@@ -1339,9 +1339,9 @@ qla2x00_lip_reset(scsi_qla_host_t *ha)
 
        if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) {
                mcp->mb[0] = MBC_LIP_FULL_LOGIN;
-               mcp->mb[1] = BIT_0;
-               mcp->mb[2] = 0xff;
-               mcp->mb[3] = 0;
+               mcp->mb[1] = BIT_6;
+               mcp->mb[2] = 0;
+               mcp->mb[3] = ha->loop_reset_delay;
                mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0;
        } else {
                mcp->mb[0] = MBC_LIP_RESET;
@@ -1823,8 +1823,8 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha)
            ha->host_no));
 
        mcp->mb[0] = MBC_LIP_FULL_LOGIN;
-       mcp->mb[1] = 0;
-       mcp->mb[2] = 0xff;
+       mcp->mb[1] = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? BIT_3: 0;
+       mcp->mb[2] = 0;
        mcp->mb[3] = 0;
        mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0;
        mcp->in_mb = MBX_0;
@@ -2486,7 +2486,7 @@ qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma,
                mcp->mb[4] = LSW(MSD(eft_dma));
                mcp->mb[5] = MSW(MSD(eft_dma));
                mcp->mb[6] = buffers;
-               mcp->mb[7] = buffers;
+               mcp->mb[7] = 0;
                mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2;
        }
        mcp->tov = 30;
index d03523d3bf38b73d173ce07f9a55cfc2d6067335..d6445ae841ba965896c8993fce3ab38ae899f0e4 100644 (file)
@@ -1037,48 +1037,49 @@ eh_host_reset_lock:
 static int
 qla2x00_loop_reset(scsi_qla_host_t *ha)
 {
-       int status = QLA_SUCCESS;
+       int ret;
        struct fc_port *fcport;
 
+       if (ha->flags.enable_lip_full_login) {
+               ret = qla2x00_full_login_lip(ha);
+               if (ret != QLA_SUCCESS) {
+                       DEBUG2_3(printk("%s(%ld): bus_reset failed: "
+                           "full_login_lip=%d.\n", __func__, ha->host_no,
+                           ret));
+               }
+               atomic_set(&ha->loop_state, LOOP_DOWN);
+               atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME);
+               qla2x00_mark_all_devices_lost(ha, 0);
+               qla2x00_wait_for_loop_ready(ha);
+       }
+
        if (ha->flags.enable_lip_reset) {
-               status = qla2x00_lip_reset(ha);
+               ret = qla2x00_lip_reset(ha);
+               if (ret != QLA_SUCCESS) {
+                       DEBUG2_3(printk("%s(%ld): bus_reset failed: "
+                           "lip_reset=%d.\n", __func__, ha->host_no, ret));
+               }
+               qla2x00_wait_for_loop_ready(ha);
        }
 
-       if (status == QLA_SUCCESS && ha->flags.enable_target_reset) {
+       if (ha->flags.enable_target_reset) {
                list_for_each_entry(fcport, &ha->fcports, list) {
                        if (fcport->port_type != FCT_TARGET)
                                continue;
 
-                       status = qla2x00_device_reset(ha, fcport);
-                       if (status != QLA_SUCCESS)
-                               break;
+                       ret = qla2x00_device_reset(ha, fcport);
+                       if (ret != QLA_SUCCESS) {
+                               DEBUG2_3(printk("%s(%ld): bus_reset failed: "
+                                   "target_reset=%d d_id=%x.\n", __func__,
+                                   ha->host_no, ret, fcport->d_id.b24));
+                       }
                }
        }
 
-       if (status == QLA_SUCCESS &&
-               ((!ha->flags.enable_target_reset &&
-                 !ha->flags.enable_lip_reset) ||
-               ha->flags.enable_lip_full_login)) {
-
-               status = qla2x00_full_login_lip(ha);
-       }
-
        /* Issue marker command only when we are going to start the I/O */
        ha->marker_needed = 1;
 
-       if (status) {
-               /* Empty */
-               DEBUG2_3(printk("%s(%ld): **** FAILED ****\n",
-                               __func__,
-                               ha->host_no));
-       } else {
-               /* Empty */
-               DEBUG3(printk("%s(%ld): exiting normally.\n",
-                               __func__,
-                               ha->host_no));
-       }
-
-       return(status);
+       return QLA_SUCCESS;
 }
 
 /*
@@ -1413,7 +1414,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 
        sht = &qla2x00_driver_template;
        if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 ||
-           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432)
+           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432 ||
+           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP5422 ||
+           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP5432)
                sht = &qla24xx_driver_template;
        host = scsi_host_alloc(sht, sizeof(scsi_qla_host_t));
        if (host == NULL) {
index 1fa0bce6b24ec272120884d8ffedc33f0d7c11f3..459e0d6bd2b4d67757a57abd435afa5500dfa94d 100644 (file)
@@ -7,7 +7,7 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.01.07-k3"
+#define QLA2XXX_VERSION      "8.01.07-k4"
 
 #define QLA_DRIVER_MAJOR_VER   8
 #define QLA_DRIVER_MINOR_VER   1
index 14e635aa44ce6963b0f206a4324c603a00503af0..b83d03c4deef1934e051358082805b93627aa4e0 100644 (file)
@@ -133,12 +133,10 @@ struct async_scan_data {
 /**
  * scsi_complete_async_scans - Wait for asynchronous scans to complete
  *
- * Asynchronous scans add themselves to the scanning_hosts list.  Once
- * that list is empty, we know that the scans are complete.  Rather than
- * waking up periodically to check the state of the list, we pretend to be
- * a scanning task by adding ourselves at the end of the list and going to
- * sleep.  When the task before us wakes us up, we take ourselves off the
- * list and return.
+ * When this function returns, any host which started scanning before
+ * this function was called will have finished its scan.  Hosts which
+ * started scanning after this function was called may or may not have
+ * finished.
  */
 int scsi_complete_async_scans(void)
 {
@@ -171,6 +169,11 @@ int scsi_complete_async_scans(void)
 
        spin_lock(&async_scan_lock);
        list_del(&data->list);
+       if (!list_empty(&scanning_hosts)) {
+               struct async_scan_data *next = list_entry(scanning_hosts.next,
+                               struct async_scan_data, list);
+               complete(&next->prev_finished);
+       }
  done:
        spin_unlock(&async_scan_lock);
 
@@ -739,6 +742,14 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
                sdev->no_uld_attach = 1;
 
        switch (sdev->type = (inq_result[0] & 0x1f)) {
+       case TYPE_RBC:
+               /* RBC devices can return SCSI-3 compliance and yet
+                * still not support REPORT LUNS, so make them act as
+                * BLIST_NOREPORTLUN unless BLIST_REPORTLUN2 is
+                * specifically set */
+               if ((*bflags & BLIST_REPORTLUN2) == 0)
+                       *bflags |= BLIST_NOREPORTLUN;
+               /* fall through */
        case TYPE_TAPE:
        case TYPE_DISK:
        case TYPE_PRINTER:
@@ -749,11 +760,17 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
        case TYPE_ENCLOSURE:
        case TYPE_COMM:
        case TYPE_RAID:
-       case TYPE_RBC:
                sdev->writeable = 1;
                break;
-       case TYPE_WORM:
        case TYPE_ROM:
+               /* MMC devices can return SCSI-3 compliance and yet
+                * still not support REPORT LUNS, so make them act as
+                * BLIST_NOREPORTLUN unless BLIST_REPORTLUN2 is
+                * specifically set */
+               if ((*bflags & BLIST_REPORTLUN2) == 0)
+                       *bflags |= BLIST_NOREPORTLUN;
+               /* fall through */
+       case TYPE_WORM:
                sdev->writeable = 0;
                break;
        default:
index 9c22f1342715c7a1047f45bf1ee9e59941d26e88..ce0d14af33c86a2e6c51abfa8a6ebc8dd50417ba 100644 (file)
@@ -1416,7 +1416,7 @@ static __init int iscsi_transport_init(void)
 {
        int err;
 
-       printk(KERN_INFO "Loading iSCSI transport class v%s.",
+       printk(KERN_INFO "Loading iSCSI transport class v%s.\n",
                ISCSI_TRANSPORT_VERSION);
 
        err = class_register(&iscsi_transport_class);
index 3fded4831460573b4c5996fdc0f1bc3c8cf513ca..014d7fea1ff375d5a5c982c8d5c2f2d67d3be28b 100644 (file)
@@ -122,7 +122,7 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd,
                        if (!sshdr)
                                sshdr = &sshdr_tmp;
 
-                       if (scsi_normalize_sense(sense, sizeof(*sense),
+                       if (scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE,
                                                 sshdr)
                            && sshdr->sense_key == UNIT_ATTENTION)
                                continue;
index 5ffec2721b28566738b6d620305cd18887fcde38..ff62e9708e1c706078b8352d5f3e8ee698c1fcd8 100644 (file)
 #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0)
 #else
 #define DPRINTK( when, msg... ) do { } while (0)
+#define DEBUG 0
 #endif
 #define DANY( msg... ) DPRINTK( 0xffff, msg );
 
@@ -523,7 +524,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
 #ifdef ARBITRATE
                " ARBITRATE"
 #endif
-#ifdef DEBUG
+#if DEBUG
                " DEBUG"
 #endif
 #ifdef FAST
@@ -733,7 +734,7 @@ static int internal_command (unsigned char target, unsigned char lun,
        unsigned char *data = NULL;
        struct scatterlist *buffer = NULL;
        int clock, temp, nobuffs = 0, done = 0, len = 0;
-#ifdef DEBUG
+#if DEBUG
        int transfered = 0, phase = 0, newphase;
 #endif
        register unsigned char status_read;
index fae6e95a629884cdcffdb50058b522419115e722..89e9b36b17882daecaa73660647abd87ba8d9553 100644 (file)
@@ -468,7 +468,7 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd,
        }
 
        ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg);
-       if (ret != ENOSYS)
+       if (ret != -ENOSYS)
                return ret;
 
        /*
index f8324d8d06ac893b622bb1463371497011fb092b..3e66b2a9974a2adc4fac46bf2a328b04b976d922 100644 (file)
@@ -72,22 +72,6 @@ config USB_SUSPEND
 
          If you are unsure about this, say N here.
 
-config USB_MULTITHREAD_PROBE
-       bool "USB Multi-threaded probe (EXPERIMENTAL)"
-       depends on USB && EXPERIMENTAL
-       default n
-       help
-         Say Y here if you want the USB core to spawn a new thread for
-         every USB device that is probed.  This can cause a small speedup
-         in boot times on systems with a lot of different USB devices.
-
-         This option should be safe to enable, but if any odd probing
-         problems are found, please disable it, or dynamically turn it
-         off in the /sys/module/usbcore/parameters/multithread_probe
-         file
-
-         When in doubt, say N.
-
 config USB_OTG
        bool
        depends on USB && EXPERIMENTAL
index 2651c2e2a89f5671e842b4c979f84f8d75857449..1988224b362bf417f2618a8bcb1e448d32f87eee 100644 (file)
@@ -88,14 +88,7 @@ static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
 static struct task_struct *khubd_task;
 
 /* multithreaded probe logic */
-static int multithread_probe =
-#ifdef CONFIG_USB_MULTITHREAD_PROBE
-       1;
-#else
-       0;
-#endif
-module_param(multithread_probe, bool, S_IRUGO);
-MODULE_PARM_DESC(multithread_probe, "Run each USB device probe in a new thread");
+static int multithread_probe = 0;
 
 /* cycle leds on hubs that aren't blinking for attention */
 static int blinkenlights = 0;
index 43ae696b2ec28f1f872271f1cd304485dc833858..3348b07f0fe507209a261575d43d1d15073b7d55 100644 (file)
@@ -169,7 +169,7 @@ static int ohci_hcd_ep93xx_drv_remove(struct platform_device *pdev)
 static int ohci_hcd_ep93xx_drv_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
-       struct ochi_hcd *ohci = hcd_to_ohci(hcd);
+       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
 
        if (time_before(jiffies, ohci->next_statechange))
                msleep(5);
index 258a5d09d3dcf89eee352cdceb83b438b89d75ec..c7d887540d8d506db46ea65780e090910f28ea25 100644 (file)
@@ -7,7 +7,7 @@ comment "USB Input Devices"
 config USB_HID
        tristate "USB Human Interface Device (full HID) support"
        default y
-       depends on USB
+       depends on USB && INPUT
        select HID
        ---help---
          Say Y here if you want full HID support to connect USB keyboards,
index 89fa6885709b60b04ba0ca32322bb4a84ef786ae..ea3636d96e1ba4f03e6d5967c71d7dbe3944287b 100644 (file)
@@ -106,18 +106,18 @@ static void hid_reset(struct work_struct *work)
 
        if (test_bit(HID_CLEAR_HALT, &usbhid->iofl)) {
                dev_dbg(&usbhid->intf->dev, "clear halt\n");
-               rc = usb_clear_halt(to_usb_device(hid->dev), usbhid->urbin->pipe);
+               rc = usb_clear_halt(hid_to_usb_dev(hid), usbhid->urbin->pipe);
                clear_bit(HID_CLEAR_HALT, &usbhid->iofl);
                hid_start_in(hid);
        }
 
        else if (test_bit(HID_RESET_PENDING, &usbhid->iofl)) {
                dev_dbg(&usbhid->intf->dev, "resetting device\n");
-               rc = rc_lock = usb_lock_device_for_reset(to_usb_device(hid->dev), usbhid->intf);
+               rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf);
                if (rc_lock >= 0) {
-                       rc = usb_reset_composite_device(to_usb_device(hid->dev), usbhid->intf);
+                       rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf);
                        if (rc_lock)
-                               usb_unlock_device(to_usb_device(hid->dev));
+                               usb_unlock_device(hid_to_usb_dev(hid));
                }
                clear_bit(HID_RESET_PENDING, &usbhid->iofl);
        }
@@ -129,8 +129,8 @@ static void hid_reset(struct work_struct *work)
                break;
        default:
                err("can't reset device, %s-%s/input%d, status %d",
-                               to_usb_device(hid->dev)->bus->bus_name,
-                               to_usb_device(hid->dev)->devpath,
+                               hid_to_usb_dev(hid)->bus->bus_name,
+                               hid_to_usb_dev(hid)->devpath,
                                usbhid->ifnum, rc);
                /* FALLTHROUGH */
        case -EHOSTUNREACH:
@@ -217,8 +217,8 @@ static void hid_irq_in(struct urb *urb)
                clear_bit(HID_IN_RUNNING, &usbhid->iofl);
                if (status != -EPERM) {
                        err("can't resubmit intr, %s-%s/input%d, status %d",
-                                       to_usb_device(hid->dev)->bus->bus_name,
-                                       to_usb_device(hid->dev)->devpath,
+                                       hid_to_usb_dev(hid)->bus->bus_name,
+                                       hid_to_usb_dev(hid)->devpath,
                                        usbhid->ifnum, status);
                        hid_io_error(hid);
                }
@@ -251,7 +251,7 @@ static int hid_submit_out(struct hid_device *hid)
 
        hid_output_report(report, usbhid->outbuf);
        usbhid->urbout->transfer_buffer_length = ((report->size - 1) >> 3) + 1 + (report->id > 0);
-       usbhid->urbout->dev = to_usb_device(hid->dev);
+       usbhid->urbout->dev = hid_to_usb_dev(hid);
 
        dbg("submitting out urb");
 
@@ -276,13 +276,13 @@ static int hid_submit_ctrl(struct hid_device *hid)
        len = ((report->size - 1) >> 3) + 1 + (report->id > 0);
        if (dir == USB_DIR_OUT) {
                hid_output_report(report, usbhid->ctrlbuf);
-               usbhid->urbctrl->pipe = usb_sndctrlpipe(to_usb_device(hid->dev), 0);
+               usbhid->urbctrl->pipe = usb_sndctrlpipe(hid_to_usb_dev(hid), 0);
                usbhid->urbctrl->transfer_buffer_length = len;
        } else {
                int maxpacket, padlen;
 
-               usbhid->urbctrl->pipe = usb_rcvctrlpipe(to_usb_device(hid->dev), 0);
-               maxpacket = usb_maxpacket(to_usb_device(hid->dev), usbhid->urbctrl->pipe, 0);
+               usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0);
+               maxpacket = usb_maxpacket(hid_to_usb_dev(hid), usbhid->urbctrl->pipe, 0);
                if (maxpacket > 0) {
                        padlen = (len + maxpacket - 1) / maxpacket;
                        padlen *= maxpacket;
@@ -292,7 +292,7 @@ static int hid_submit_ctrl(struct hid_device *hid)
                        padlen = 0;
                usbhid->urbctrl->transfer_buffer_length = padlen;
        }
-       usbhid->urbctrl->dev = to_usb_device(hid->dev);
+       usbhid->urbctrl->dev = hid_to_usb_dev(hid);
 
        usbhid->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE | dir;
        usbhid->cr->bRequest = (dir == USB_DIR_OUT) ? HID_REQ_SET_REPORT : HID_REQ_GET_REPORT;
@@ -582,6 +582,8 @@ void usbhid_init_reports(struct hid_device *hid)
 }
 
 #define USB_VENDOR_ID_GTCO             0x078c
+#define USB_VENDOR_ID_GTCO_IPANEL_1    0x08ca
+#define USB_VENDOR_ID_GTCO_IPANEL_2     0x5543
 #define USB_DEVICE_ID_GTCO_90          0x0090
 #define USB_DEVICE_ID_GTCO_100         0x0100
 #define USB_DEVICE_ID_GTCO_101         0x0101
@@ -627,6 +629,9 @@ void usbhid_init_reports(struct hid_device *hid)
 #define USB_DEVICE_ID_GTCO_1004                0x1004
 #define USB_DEVICE_ID_GTCO_1005                0x1005
 #define USB_DEVICE_ID_GTCO_1006                0x1006
+#define USB_DEVICE_ID_GTCO_10          0x0010
+#define USB_DEVICE_ID_GTCO_8           0x0008
+#define USB_DEVICE_ID_GTCO_d            0x000d
 
 #define USB_VENDOR_ID_WACOM            0x056a
 
@@ -791,6 +796,9 @@ void usbhid_init_reports(struct hid_device *hid)
 #define USB_VENDOR_ID_LOGITECH         0x046d
 #define USB_DEVICE_ID_LOGITECH_USB_RECEIVER    0xc101
 
+#define USB_VENDOR_ID_IMATION          0x0718
+#define USB_DEVICE_ID_DISC_STAKKA      0xd000
+
 /*
  * Alphabetically sorted blacklist by quirk type.
  */
@@ -875,6 +883,10 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO_IPANEL_1, USB_DEVICE_ID_GTCO_10, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_8, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_d, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE },
@@ -951,7 +963,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-       { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
+       { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
@@ -1187,7 +1199,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
 
        hid->version = le16_to_cpu(hdesc->bcdHID);
        hid->country = hdesc->bCountryCode;
-       hid->dev = &dev->dev;
+       hid->dev = &intf->dev;
        usbhid->intf = intf;
        usbhid->ifnum = interface->desc.bInterfaceNumber;
 
@@ -1282,7 +1294,7 @@ static void hid_disconnect(struct usb_interface *intf)
        usb_free_urb(usbhid->urbctrl);
        usb_free_urb(usbhid->urbout);
 
-       hid_free_buffers(to_usb_device(hid->dev), hid);
+       hid_free_buffers(hid_to_usb_dev(hid), hid);
        hid_free_device(hid);
 }
 
index f8f660ee3fac0a581207b7327611c6100d8daf7c..59ed65e7a6217f5e15e8756aaec816b6b9615eca 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/usb.h>
 
 #include <linux/hid.h>
+#include "usbhid.h"
 
 /*
  * This table contains pointers to initializers. To add support for new
@@ -70,8 +71,8 @@ static struct hid_ff_initializer inits[] = {
 int hid_ff_init(struct hid_device* hid)
 {
        struct hid_ff_initializer *init;
-       int vendor = le16_to_cpu(to_usb_device(hid->dev)->descriptor.idVendor);
-       int product = le16_to_cpu(to_usb_device(hid->dev)->descriptor.idProduct);
+       int vendor = le16_to_cpu(hid_to_usb_dev(hid)->descriptor.idVendor);
+       int product = le16_to_cpu(hid_to_usb_dev(hid)->descriptor.idProduct);
 
        for (init = inits; init->idVendor; init++)
                if (init->idVendor == vendor && init->idProduct == product)
index 114d6c9f64b17175ffb0fc8d8edde27be24c507c..a8b3d66cd4988b6f133f8804de4a643faeabacc3 100644 (file)
@@ -384,7 +384,7 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
        struct hiddev_list *list = file->private_data;
        struct hiddev *hiddev = list->hiddev;
        struct hid_device *hid = hiddev->hid;
-       struct usb_device *dev = to_usb_device(hid->dev);
+       struct usb_device *dev = hid_to_usb_dev(hid);
        struct hiddev_collection_info cinfo;
        struct hiddev_report_info rinfo;
        struct hiddev_field_info finfo;
index 830107e5251f7b5ce7ee9268c323258b1ea7a955..0023f96d4294f1d3e6acc05627e4133d899b8b85 100644 (file)
@@ -80,5 +80,8 @@ struct usbhid_device {
 
 };
 
+#define        hid_to_usb_dev(hid_dev) \
+       container_of(hid_dev->dev->parent, struct usb_device, dev)
+
 #endif
 
index 7f3c57da9bc0767abf96a69e87f02b13fa296249..86e37a20f8e55997f6af50c6bbcb279937047993 100644 (file)
@@ -66,7 +66,7 @@ struct usbtouch_device_info {
 
        void (*process_pkt) (struct usbtouch_usb *usbtouch, unsigned char *pkt, int len);
        int  (*get_pkt_len) (unsigned char *pkt, int len);
-       int  (*read_data)   (unsigned char *pkt, int *x, int *y, int *touch, int *press);
+       int  (*read_data)   (struct usbtouch_usb *usbtouch, unsigned char *pkt);
        int  (*init)        (struct usbtouch_usb *usbtouch);
 };
 
@@ -85,6 +85,9 @@ struct usbtouch_usb {
        struct usbtouch_device_info *type;
        char name[128];
        char phys[64];
+
+       int x, y;
+       int touch, press;
 };
 
 
@@ -161,14 +164,14 @@ static struct usb_device_id usbtouch_devices[] = {
 #define EGALAX_PKT_TYPE_REPT           0x80
 #define EGALAX_PKT_TYPE_DIAG           0x0A
 
-static int egalax_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int egalax_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
        if ((pkt[0] & EGALAX_PKT_TYPE_MASK) != EGALAX_PKT_TYPE_REPT)
                return 0;
 
-       *x = ((pkt[3] & 0x0F) << 7) | (pkt[4] & 0x7F);
-       *y = ((pkt[1] & 0x0F) << 7) | (pkt[2] & 0x7F);
-       *touch = pkt[0] & 0x01;
+       dev->x = ((pkt[3] & 0x0F) << 7) | (pkt[4] & 0x7F);
+       dev->y = ((pkt[1] & 0x0F) << 7) | (pkt[2] & 0x7F);
+       dev->touch = pkt[0] & 0x01;
 
        return 1;
 }
@@ -195,11 +198,11 @@ static int egalax_get_pkt_len(unsigned char *buf, int len)
  * PanJit Part
  */
 #ifdef CONFIG_USB_TOUCHSCREEN_PANJIT
-static int panjit_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int panjit_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-       *x = ((pkt[2] & 0x0F) << 8) | pkt[1];
-       *y = ((pkt[4] & 0x0F) << 8) | pkt[3];
-       *touch = pkt[0] & 0x01;
+       dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1];
+       dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3];
+       dev->touch = pkt[0] & 0x01;
 
        return 1;
 }
@@ -215,11 +218,11 @@ static int panjit_read_data(unsigned char *pkt, int *x, int *y, int *touch, int
 #define MTOUCHUSB_RESET                 7
 #define MTOUCHUSB_REQ_CTRLLR_ID         10
 
-static int mtouch_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int mtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-       *x = (pkt[8] << 8) | pkt[7];
-       *y = (pkt[10] << 8) | pkt[9];
-       *touch = (pkt[2] & 0x40) ? 1 : 0;
+       dev->x = (pkt[8] << 8) | pkt[7];
+       dev->y = (pkt[10] << 8) | pkt[9];
+       dev->touch = (pkt[2] & 0x40) ? 1 : 0;
 
        return 1;
 }
@@ -260,14 +263,32 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)
  * ITM Part
  */
 #ifdef CONFIG_USB_TOUCHSCREEN_ITM
-static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int itm_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-       *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F);
-       *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
-       *press = ((pkt[2] & 0x01) << 7) | (pkt[5] & 0x7F);
-       *touch = ~pkt[7] & 0x20;
+       int touch;
+       /*
+        * ITM devices report invalid x/y data if not touched.
+        * if the screen was touched before but is not touched any more
+        * report touch as 0 with the last valid x/y data once. then stop
+        * reporting data until touched again.
+        */
+       dev->press = ((pkt[2] & 0x01) << 7) | (pkt[5] & 0x7F);
+
+       touch = ~pkt[7] & 0x20;
+       if (!touch) {
+               if (dev->touch) {
+                       dev->touch = 0;
+                       return 1;
+               }
 
-       return *touch;
+               return 0;
+       }
+
+       dev->x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F);
+       dev->y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
+       dev->touch = touch;
+
+       return 1;
 }
 #endif
 
@@ -276,7 +297,7 @@ static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *pr
  * eTurboTouch part
  */
 #ifdef CONFIG_USB_TOUCHSCREEN_ETURBO
-static int eturbo_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int eturbo_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
        unsigned int shift;
 
@@ -285,9 +306,9 @@ static int eturbo_read_data(unsigned char *pkt, int *x, int *y, int *touch, int
                return 0;
 
        shift = (6 - (pkt[0] & 0x03));
-       *x = ((pkt[3] << 7) | pkt[4]) >> shift;
-       *y = ((pkt[1] << 7) | pkt[2]) >> shift;
-       *touch = (pkt[0] & 0x10) ? 1 : 0;
+       dev->x = ((pkt[3] << 7) | pkt[4]) >> shift;
+       dev->y = ((pkt[1] << 7) | pkt[2]) >> shift;
+       dev->touch = (pkt[0] & 0x10) ? 1 : 0;
 
        return 1;
 }
@@ -307,14 +328,14 @@ static int eturbo_get_pkt_len(unsigned char *buf, int len)
  * Gunze part
  */
 #ifdef CONFIG_USB_TOUCHSCREEN_GUNZE
-static int gunze_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int gunze_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
        if (!(pkt[0] & 0x80) || ((pkt[1] | pkt[2] | pkt[3]) & 0x80))
                return 0;
 
-       *x = ((pkt[0] & 0x1F) << 7) | (pkt[2] & 0x7F);
-       *y = ((pkt[1] & 0x1F) << 7) | (pkt[3] & 0x7F);
-       *touch = pkt[0] & 0x20;
+       dev->x = ((pkt[0] & 0x1F) << 7) | (pkt[2] & 0x7F);
+       dev->y = ((pkt[1] & 0x1F) << 7) | (pkt[3] & 0x7F);
+       dev->touch = pkt[0] & 0x20;
 
        return 1;
 }
@@ -383,11 +404,11 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)
 }
 
 
-static int dmc_tsc10_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press)
+static int dmc_tsc10_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-       *x = ((pkt[2] & 0x03) << 8) | pkt[1];
-       *y = ((pkt[4] & 0x03) << 8) | pkt[3];
-       *touch = pkt[0] & 0x01;
+       dev->x = ((pkt[2] & 0x03) << 8) | pkt[1];
+       dev->y = ((pkt[4] & 0x03) << 8) | pkt[3];
+       dev->touch = pkt[0] & 0x01;
 
        return 1;
 }
@@ -492,23 +513,22 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
 static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch,
                                  unsigned char *pkt, int len)
 {
-       int x, y, touch, press;
        struct usbtouch_device_info *type = usbtouch->type;
 
-       if (!type->read_data(pkt, &x, &y, &touch, &press))
+       if (!type->read_data(usbtouch, pkt))
                        return;
 
-       input_report_key(usbtouch->input, BTN_TOUCH, touch);
+       input_report_key(usbtouch->input, BTN_TOUCH, usbtouch->touch);
 
        if (swap_xy) {
-               input_report_abs(usbtouch->input, ABS_X, y);
-               input_report_abs(usbtouch->input, ABS_Y, x);
+               input_report_abs(usbtouch->input, ABS_X, usbtouch->y);
+               input_report_abs(usbtouch->input, ABS_Y, usbtouch->x);
        } else {
-               input_report_abs(usbtouch->input, ABS_X, x);
-               input_report_abs(usbtouch->input, ABS_Y, y);
+               input_report_abs(usbtouch->input, ABS_X, usbtouch->x);
+               input_report_abs(usbtouch->input, ABS_Y, usbtouch->y);
        }
        if (type->max_press)
-               input_report_abs(usbtouch->input, ABS_PRESSURE, press);
+               input_report_abs(usbtouch->input, ABS_PRESSURE, usbtouch->press);
        input_sync(usbtouch->input);
 }
 
index f538013965b003d7d622b8920e86967ce3bd8f3b..896449f0cf85b7a2f15b7ec1ece5df065319a447 100644 (file)
@@ -898,7 +898,7 @@ static int ax88772_link_reset(struct usbnet *dev)
 
 static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
 {
-       int ret;
+       int ret, embd_phy;
        void *buf;
        u16 rx_ctl;
        struct asix_data *data = (struct asix_data *)&dev->data;
@@ -919,13 +919,15 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
                        AX_GPIO_RSE | AX_GPIO_GPO_2 | AX_GPIO_GPO2EN, 5)) < 0)
                goto out2;
 
+       /* 0x10 is the phy id of the embedded 10/100 ethernet phy */
+       embd_phy = ((asix_get_phy_addr(dev) & 0x1f) == 0x10 ? 1 : 0);
        if ((ret = asix_write_cmd(dev, AX_CMD_SW_PHY_SELECT,
-                               1, 0, 0, buf)) < 0) {
+                               embd_phy, 0, 0, buf)) < 0) {
                dbg("Select PHY #1 failed: %d", ret);
                goto out2;
        }
 
-       if ((ret = asix_sw_reset(dev, AX_SWRESET_IPPD)) < 0)
+       if ((ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL)) < 0)
                goto out2;
 
        msleep(150);
@@ -933,8 +935,14 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
                goto out2;
 
        msleep(150);
-       if ((ret = asix_sw_reset(dev, AX_SWRESET_IPRL | AX_SWRESET_PRL)) < 0)
-               goto out2;
+       if (embd_phy) {
+               if ((ret = asix_sw_reset(dev, AX_SWRESET_IPRL)) < 0)
+                       goto out2;
+       }
+       else {
+               if ((ret = asix_sw_reset(dev, AX_SWRESET_PRTE)) < 0)
+                       goto out2;
+       }
 
        msleep(150);
        rx_ctl = asix_read_rx_ctl(dev);
index ea5f44de3de2e6aa3edbc157b394925fcb685515..a322a16d9cf8a52f0548dc2845a1b47534196801 100644 (file)
@@ -379,6 +379,7 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
 {
        int                     retval;
        struct net_device       *net = dev->net;
+       struct cdc_state        *info = (void *) &dev->data;
        union {
                void                    *buf;
                struct rndis_msg_hdr    *header;
@@ -397,7 +398,7 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
                return -ENOMEM;
        retval = usbnet_generic_cdc_bind(dev, intf);
        if (retval < 0)
-               goto done;
+               goto fail;
 
        net->hard_header_len += sizeof (struct rndis_data_hdr);
 
@@ -412,10 +413,7 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
        if (unlikely(retval < 0)) {
                /* it might not even be an RNDIS device!! */
                dev_err(&intf->dev, "RNDIS init failed, %d\n", retval);
-fail:
-               usb_driver_release_interface(driver_of(intf),
-                       ((struct cdc_state *)&(dev->data))->data);
-               goto done;
+               goto fail_and_release;
        }
        dev->hard_mtu = le32_to_cpu(u.init_c->max_transfer_size);
        /* REVISIT:  peripheral "alignment" request is ignored ... */
@@ -431,7 +429,7 @@ fail:
        retval = rndis_command(dev, u.header);
        if (unlikely(retval < 0)) {
                dev_err(&intf->dev, "rndis get ethaddr, %d\n", retval);
-               goto fail;
+               goto fail_and_release;
        }
        tmp = le32_to_cpu(u.get_c->offset);
        if (unlikely((tmp + 8) > (1024 - ETH_ALEN)
@@ -439,7 +437,7 @@ fail:
                dev_err(&intf->dev, "rndis ethaddr off %d len %d ?\n",
                        tmp, le32_to_cpu(u.get_c->len));
                retval = -EDOM;
-               goto fail;
+               goto fail_and_release;
        }
        memcpy(net->dev_addr, tmp + (char *)&u.get_c->request_id, ETH_ALEN);
 
@@ -455,11 +453,18 @@ fail:
        retval = rndis_command(dev, u.header);
        if (unlikely(retval < 0)) {
                dev_err(&intf->dev, "rndis set packet filter, %d\n", retval);
-               goto fail;
+               goto fail_and_release;
        }
 
        retval = 0;
-done:
+
+       kfree(u.buf);
+       return retval;
+
+fail_and_release:
+       usb_set_intfdata(info->data, NULL);
+       usb_driver_release_interface(driver_of(intf), info->data);
+fail:
        kfree(u.buf);
        return retval;
 }
index 31501c9361b9d43c242cc4a1fc35106a4cd9f110..2bebd63d5ed19e11b0f9ce174317737100e0de66 100644 (file)
@@ -27,7 +27,7 @@ MODULE_DEVICE_TABLE(usb, id_table);
 static int funsoft_ioctl(struct usb_serial_port *port, struct file *file,
                         unsigned int cmd, unsigned long arg)
 {
-       struct termios t;
+       struct ktermios t;
 
        dbg("%s - port %d, cmd 0x%04x", __FUNCTION__, port->number, cmd);
 
index 5ca04e82ea196a491f9b20c1f1cd3e82c9c35eeb..0fed43a96871d0967f4b2d4ee7a13695ea46b2e0 100644 (file)
@@ -78,6 +78,7 @@ static int  option_send_setup(struct usb_serial_port *port);
 #define OPTION_PRODUCT_FUSION2          0x6300
 #define OPTION_PRODUCT_COBRA            0x6500
 #define OPTION_PRODUCT_COBRA2           0x6600
+#define OPTION_PRODUCT_GTMAX36          0x6701
 #define HUAWEI_PRODUCT_E600             0x1001
 #define HUAWEI_PRODUCT_E220             0x1003
 #define AUDIOVOX_PRODUCT_AIRCARD        0x0112
@@ -90,6 +91,7 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
+       { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTMAX36) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
        { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
@@ -104,6 +106,7 @@ static struct usb_device_id option_ids1[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
+       { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTMAX36) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
        { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
index cddef3efba0a9e770934f6d9c2a89d2e475e148f..b49f2a78189e2d7bd532020318dc9dd696a45a9f 100644 (file)
@@ -197,6 +197,13 @@ UNUSUAL_DEV(  0x0421, 0x047c, 0x0370, 0x0370,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_MAX_SECTORS_64 ),
 
+/* Reported by Manuel Osdoba <manuel.osdoba@tu-ilmenau.de> */
+UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x0452,
+               "Nokia",
+               "Nokia 6233",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_MAX_SECTORS_64 ),
+
 /* Reported by Alex Corcoles <alex@corcoles.net> */
 UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x0370,
                "Nokia",
@@ -254,6 +261,18 @@ UNUSUAL_DEV(  0x045a, 0x5210, 0x0101, 0x0101,
                US_SC_SCSI, US_PR_KARMA, rio_karma_init, 0),
 #endif
 
+/*
+ * This virtual floppy is found in Sun equipment (x4600, x4200m2, etc.)
+ * Reported by Pete Zaitcev <zaitcev@redhat.com>
+ * This device chokes on both version of MODE SENSE which we have, so
+ * use_10_for_ms is not effective, and we use US_FL_NO_WP_DETECT.
+ */
+UNUSUAL_DEV(  0x046b, 0xff40, 0x0100, 0x0100,
+               "AMI",
+               "Virtual Floppy",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_NO_WP_DETECT),
+
 /* Patch submitted by Philipp Friedrich <philipp@void.at> */
 UNUSUAL_DEV(  0x0482, 0x0100, 0x0100, 0x0100,
                "Kyocera",
index 8b18e43b82fe8e156bab431070a882ea5cb9a5bf..d9bdf2b3ade2922a0564a4630f3b3ce461d1c176 100644 (file)
@@ -146,7 +146,7 @@ static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error)
                iocb->ki_nbytes = -EIO;
 
        if (atomic_dec_and_test(bio_count)) {
-               if (iocb->ki_nbytes < 0)
+               if ((long)iocb->ki_nbytes < 0)
                        aio_complete(iocb, iocb->ki_nbytes, 0);
                else
                        aio_complete(iocb, iocb->ki_left, 0);
@@ -190,6 +190,12 @@ static struct page *blk_get_page(unsigned long addr, size_t count, int rw,
        return pvec->page[pvec->idx++];
 }
 
+/* return a page back to pvec array */
+static void blk_unget_page(struct page *page, struct pvec *pvec)
+{
+       pvec->page[--pvec->idx] = page;
+}
+
 static ssize_t
 blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
                 loff_t pos, unsigned long nr_segs)
@@ -278,6 +284,8 @@ same_bio:
                                count = min(count, nbytes);
                                goto same_bio;
                        }
+               } else {
+                       blk_unget_page(page, &pvec);
                }
 
                /* bio is ready, submit it */
index 3539d6ef96114b53350e42274b1f83deda6e52a3..d04d2f7448d9e4a872a0d548a54c47c411e6df2f 100644 (file)
@@ -1,3 +1,7 @@
+Version 1.47
+------------
+Fix oops in list_del during mount caused by unaligned string.
+
 Version 1.46
 ------------
 Support deep tree mounts.  Better support OS/2, Win9x (DOS) time stamps.
index 96abeb7389784d4e3f5fa6eb4ee72ea8d66b947a..6017c465440eaef7299e60632b0f03b71dcbffe4 100644 (file)
@@ -143,8 +143,8 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
                ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
                if((ses->serverDomain == NULL) || (ses->serverOS == NULL) ||
                   (ses->serverNOS == NULL)) {
-                       buf += sprintf("\nentry for %s not fully displayed\n\t",
-                                       ses->serverName);
+                       buf += sprintf(buf, "\nentry for %s not fully "
+                                       "displayed\n\t", ses->serverName);
                        
                } else {
                        length =
index a243f779b363a9a9cff261f65f23027dc9e30c15..8aa66dcf13bd2f342dd19d72e148bc91725151cc 100644 (file)
@@ -100,5 +100,5 @@ extern ssize_t      cifs_getxattr(struct dentry *, const char *, void *, size_t);
 extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
 extern int cifs_ioctl (struct inode * inode, struct file * filep,
                       unsigned int command, unsigned long arg);
-#define CIFS_VERSION   "1.46"
+#define CIFS_VERSION   "1.47"
 #endif                         /* _CIFSFS_H */
index aedf683f011fe42606f7d58bb5005d1744dae543..19cc294c7c70b5de4b96f193642df5487648a5e4 100644 (file)
@@ -71,9 +71,7 @@ sesInfoAlloc(void)
 {
        struct cifsSesInfo *ret_buf;
 
-       ret_buf =
-           (struct cifsSesInfo *) kzalloc(sizeof (struct cifsSesInfo),
-                                          GFP_KERNEL);
+       ret_buf = kzalloc(sizeof (struct cifsSesInfo), GFP_KERNEL);
        if (ret_buf) {
                write_lock(&GlobalSMBSeslock);
                atomic_inc(&sesInfoAllocCount);
@@ -109,9 +107,7 @@ struct cifsTconInfo *
 tconInfoAlloc(void)
 {
        struct cifsTconInfo *ret_buf;
-       ret_buf =
-           (struct cifsTconInfo *) kzalloc(sizeof (struct cifsTconInfo),
-                                           GFP_KERNEL);
+       ret_buf = kzalloc(sizeof (struct cifsTconInfo), GFP_KERNEL);
        if (ret_buf) {
                write_lock(&GlobalSMBSeslock);
                atomic_inc(&tconInfoAllocCount);
index bbdda99dce610364b71b5218cb061b3dfc577cd9..758464630893e8082339f6018ce16cf74028e9e5 100644 (file)
@@ -182,11 +182,14 @@ static int decode_unicode_ssetup(char ** pbcc_area, int bleft, struct cifsSesInf
        cFYI(1,("bleft %d",bleft));
 
 
-       /* word align, if bytes remaining is not even */
-       if(bleft % 2) {
-               bleft--;
-               data++;
-       }
+       /* SMB header is unaligned, so cifs servers word align start of
+          Unicode strings */
+       data++;
+       bleft--; /* Windows servers do not always double null terminate
+                   their final Unicode string - in which case we
+                   now will not attempt to decode the byte of junk
+                   which follows it */
+                   
        words_left = bleft / 2;
 
        /* save off server operating system */
index 077258b2103e5bac0d386a46102f4741292e5b2d..5a95fbdd6fdba7b7d94830e55c6bb6e7ace11efb 100644 (file)
@@ -17,6 +17,7 @@
  *
  */
 #include <linux/slab.h>
+#include <linux/err.h>
 #include <linux/blkdev.h>
 #include <linux/jffs.h>
 #include "jffs_fm.h"
@@ -104,7 +105,7 @@ jffs_build_begin(struct jffs_control *c, int unit)
 
        mtd = get_mtd_device(NULL, unit);
 
-       if (!mtd) {
+       if (IS_ERR(mtd)) {
                kfree(fmc);
                DJM(no_jffs_fmcontrol--);
                return NULL;
index 72b4fc13a106053bfa64773f3d9e9609ce5ebd7d..4189e4a360503154b3e7bff953c69670ab953ebc 100644 (file)
@@ -178,8 +178,8 @@ __jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c,
        while (ref2) {
                uint32_t totlen = ref_totlen(c, jeb, ref2);
 
-               if (ref2->flash_offset < jeb->offset ||
-                               ref2->flash_offset > jeb->offset + c->sector_size) {
+               if (ref_offset(ref2) < jeb->offset ||
+                               ref_offset(ref2) > jeb->offset + c->sector_size) {
                        JFFS2_ERROR("node_ref %#08x shouldn't be in block at %#08x.\n",
                                ref_offset(ref2), jeb->offset);
                        goto error;
index 3daf3bca03767050d1580f6731996e1aaa4d6e6f..f89c85d5a3f8cd28946ace7eebf03103706ca9cd 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef _JFFS2_DEBUG_H_
 #define _JFFS2_DEBUG_H_
 
+#include <linux/sched.h>
 
 #ifndef CONFIG_JFFS2_FS_DEBUG
 #define CONFIG_JFFS2_FS_DEBUG 0
index 7bc1a4201c0c233437dd5e60d45159620b39e57c..abb90c0c09cc93ea2b1c8ae83d6da09c29c15a16 100644 (file)
@@ -502,12 +502,11 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
        if (ret)
                return ret;
 
-       c->inocache_list = kmalloc(INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *), GFP_KERNEL);
+       c->inocache_list = kcalloc(INOCACHE_HASHSIZE, sizeof(struct jffs2_inode_cache *), GFP_KERNEL);
        if (!c->inocache_list) {
                ret = -ENOMEM;
                goto out_wbuf;
        }
-       memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *));
 
        jffs2_init_xattr_subsystem(c);
 
index daff3341ff92b58cb72916678f69603e64ed5972..3a3cf225981f5a28daa3d2dc5fbce4e26ccf9c9d 100644 (file)
@@ -838,6 +838,8 @@ static int jffs2_garbage_collect_deletion_dirent(struct jffs2_sb_info *c, struct
 
                for (raw = f->inocache->nodes; raw != (void *)f->inocache; raw = raw->next_in_ino) {
 
+                       cond_resched();
+
                        /* We only care about obsolete ones */
                        if (!(ref_obsolete(raw)))
                                continue;
index 0ddfd70307fb33dc1bf27404111bceffd48fa6cd..4178b4b5594824997e33948fd063d7d6248dea4f 100644 (file)
@@ -294,23 +294,21 @@ static inline int jffs2_encode_dev(union jffs2_device_node *jdev, dev_t rdev)
 
 static inline struct jffs2_node_frag *frag_first(struct rb_root *root)
 {
-       struct rb_node *node = root->rb_node;
+       struct rb_node *node = rb_first(root);
 
        if (!node)
                return NULL;
-       while(node->rb_left)
-               node = node->rb_left;
+
        return rb_entry(node, struct jffs2_node_frag, rb);
 }
 
 static inline struct jffs2_node_frag *frag_last(struct rb_root *root)
 {
-       struct rb_node *node = root->rb_node;
+       struct rb_node *node = rb_last(root);
 
        if (!node)
                return NULL;
-       while(node->rb_right)
-               node = node->rb_right;
+
        return rb_entry(node, struct jffs2_node_frag, rb);
 }
 
index 266423b2709d04be8709164b0dacdbbebc4f22b8..58a0b912e9d05ce5697ff1239711ead97671e152 100644 (file)
@@ -944,13 +944,12 @@ int jffs2_do_read_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
 int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic)
 {
        struct jffs2_raw_inode n;
-       struct jffs2_inode_info *f = kmalloc(sizeof(*f), GFP_KERNEL);
+       struct jffs2_inode_info *f = kzalloc(sizeof(*f), GFP_KERNEL);
        int ret;
 
        if (!f)
                return -ENOMEM;
 
-       memset(f, 0, sizeof(*f));
        init_MUTEX_LOCKED(&f->sem);
        f->inocache = ic;
 
index e2413466ddd5ac34d54f580769667111c64b8414..3af746eaff0ec124168e0baffa247de09253e68c 100644 (file)
@@ -128,17 +128,19 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
        }
 
        if (jffs2_sum_active()) {
-               s = kmalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
+               s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
                if (!s) {
+                       kfree(flashbuf);
                        JFFS2_WARNING("Can't allocate memory for summary\n");
                        return -ENOMEM;
                }
-               memset(s, 0, sizeof(struct jffs2_summary));
        }
 
        for (i=0; i<c->nr_blocks; i++) {
                struct jffs2_eraseblock *jeb = &c->blocks[i];
 
+               cond_resched();
+
                /* reset summary info for next eraseblock scan */
                jffs2_sum_reset_collected(s);
 
index e52cef526d90e8161e162adbc9727fbf262ddfdd..25265965bdc1f67254dc51463510e19af07ec7aa 100644 (file)
 
 int jffs2_sum_init(struct jffs2_sb_info *c)
 {
-       c->summary = kmalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
+       c->summary = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
 
        if (!c->summary) {
                JFFS2_WARNING("Can't allocate memory for summary information!\n");
                return -ENOMEM;
        }
 
-       memset(c->summary, 0, sizeof(struct jffs2_summary));
-
        c->summary->sum_buf = vmalloc(c->sector_size);
 
        if (!c->summary->sum_buf) {
@@ -398,6 +396,8 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras
        for (i=0; i<je32_to_cpu(summary->sum_num); i++) {
                dbg_summary("processing summary index %d\n", i);
 
+               cond_resched();
+
                /* Make sure there's a spare ref for dirty space */
                err = jffs2_prealloc_raw_node_refs(c, jeb, 2);
                if (err)
index 7deb7825402156fcd5f04d47b518452df2945a7f..08a0e6c49e61d77b4d51b03714108df0b0840462 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/fs.h>
+#include <linux/err.h>
 #include <linux/mount.h>
 #include <linux/jffs2.h>
 #include <linux/pagemap.h>
@@ -184,9 +185,9 @@ static int jffs2_get_sb_mtdnr(struct file_system_type *fs_type,
        struct mtd_info *mtd;
 
        mtd = get_mtd_device(NULL, mtdnr);
-       if (!mtd) {
+       if (IS_ERR(mtd)) {
                D1(printk(KERN_DEBUG "jffs2: MTD device #%u doesn't appear to exist\n", mtdnr));
-               return -EINVAL;
+               return PTR_ERR(mtd);
        }
 
        return jffs2_get_sb_mtd(fs_type, flags, dev_name, data, mtd, mnt);
@@ -221,7 +222,7 @@ static int jffs2_get_sb(struct file_system_type *fs_type,
                        D1(printk(KERN_DEBUG "jffs2_get_sb(): mtd:%%s, name \"%s\"\n", dev_name+4));
                        for (mtdnr = 0; mtdnr < MAX_MTD_DEVICES; mtdnr++) {
                                mtd = get_mtd_device(NULL, mtdnr);
-                               if (mtd) {
+                               if (!IS_ERR(mtd)) {
                                        if (!strcmp(mtd->name, dev_name+4))
                                                return jffs2_get_sb_mtd(fs_type, flags, dev_name, data, mtd, mnt);
                                        put_mtd_device(mtd);
index fc211b6e9b03ec1b6dd4641179d18854d8df3d4b..b90d5aa3d96972a14fbd144c933cd894a4df69ca 100644 (file)
@@ -51,7 +51,7 @@ static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
         */
 
        if (!p) {
-               printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n");
+               printk(KERN_ERR "jffs2_follow_link(): can't find symlink target\n");
                p = ERR_PTR(-EIO);
        }
        D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->target));
index 70707309dfa1c983250f9eb2307159fa51dda20e..9c99859f5eddb12f24386d1cab20f71dd52ef756 100644 (file)
@@ -969,8 +969,7 @@ int jffs2_check_oob_empty(struct jffs2_sb_info *c,
        int oobsize = c->mtd->oobsize;
        struct mtd_oob_ops ops;
 
-       ops.len = NR_OOB_SCAN_PAGES * oobsize;
-       ops.ooblen = oobsize;
+       ops.ooblen = NR_OOB_SCAN_PAGES * oobsize;
        ops.oobbuf = c->oobbuf;
        ops.ooboffs = 0;
        ops.datbuf = NULL;
@@ -983,10 +982,10 @@ int jffs2_check_oob_empty(struct jffs2_sb_info *c,
                return ret;
        }
 
-       if (ops.retlen < ops.len) {
+       if (ops.oobretlen < ops.ooblen) {
                D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB "
                          "returned short read (%zd bytes not %d) for block "
-                         "at %08x\n", ops.retlen, ops.len, jeb->offset));
+                         "at %08x\n", ops.oobretlen, ops.ooblen, jeb->offset));
                return -EIO;
        }
 
@@ -1005,7 +1004,7 @@ int jffs2_check_oob_empty(struct jffs2_sb_info *c,
        }
 
        /* we know, we are aligned :) */
-       for (page = oobsize; page < ops.len; page += sizeof(long)) {
+       for (page = oobsize; page < ops.ooblen; page += sizeof(long)) {
                long dat = *(long *)(&ops.oobbuf[page]);
                if(dat != -1)
                        return 1;
@@ -1033,7 +1032,6 @@ int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c,
                return 2;
        }
 
-       ops.len = oobsize;
        ops.ooblen = oobsize;
        ops.oobbuf = c->oobbuf;
        ops.ooboffs = 0;
@@ -1048,10 +1046,10 @@ int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c,
                return ret;
        }
 
-       if (ops.retlen < ops.len) {
+       if (ops.oobretlen < ops.ooblen) {
                D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): "
                            "Read OOB return short read (%zd bytes not %d) "
-                           "for block at %08x\n", ops.retlen, ops.len,
+                           "for block at %08x\n", ops.oobretlen, ops.ooblen,
                            jeb->offset));
                return -EIO;
        }
@@ -1090,8 +1088,7 @@ int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c,
        n.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER);
        n.totlen = cpu_to_je32(8);
 
-       ops.len = c->fsdata_len;
-       ops.ooblen = c->fsdata_len;;
+       ops.ooblen = c->fsdata_len;
        ops.oobbuf = (uint8_t *)&n;
        ops.ooboffs = c->fsdata_pos;
        ops.datbuf = NULL;
@@ -1105,10 +1102,10 @@ int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c,
                          jeb->offset, ret));
                return ret;
        }
-       if (ops.retlen != ops.len) {
+       if (ops.oobretlen != ops.ooblen) {
                D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): "
                          "Short write for block at %08x: %zd not %d\n",
-                         jeb->offset, ops.retlen, ops.len));
+                         jeb->offset, ops.oobretlen, ops.ooblen));
                return -EIO;
        }
        return 0;
index 4da09ce1d1f52fc12182ab34afceef584706b186..4bb3f189733027d159462f91a131b929909481f4 100644 (file)
@@ -399,8 +399,6 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu
 {
        /* must be called under down_write(xattr_sem) */
        if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) {
-               uint32_t xid = xd->xid, version = xd->version;
-
                unload_xattr_datum(c, xd);
                xd->flags |= JFFS2_XFLAGS_DEAD;
                if (xd->node == (void *)xd) {
@@ -411,7 +409,8 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu
                }
                spin_unlock(&c->erase_completion_lock);
 
-               dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n", xid, version);
+               dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n",
+                         xd->xid, xd->version);
        }
 }
 
index dee3d6c0f194178c6a1c060ff2eb1121a1d7d5aa..d9ba8cb0ee75b22b8618f1fe9f75dd13b2cb9259 100644 (file)
@@ -532,7 +532,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
 
        lock_kernel();
 
-       res = nfs_revalidate_mapping(inode, filp->f_mapping);
+       res = nfs_revalidate_mapping_nolock(inode, filp->f_mapping);
        if (res < 0) {
                unlock_kernel();
                return res;
index 63e4702793090b6d0109b31dcfff4306a0742e24..d83498282837168fc9d1256f4f72c09f8b33ca40 100644 (file)
@@ -665,49 +665,86 @@ int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
        return __nfs_revalidate_inode(server, inode);
 }
 
+static int nfs_invalidate_mapping_nolock(struct inode *inode, struct address_space *mapping)
+{
+       struct nfs_inode *nfsi = NFS_I(inode);
+       
+       if (mapping->nrpages != 0) {
+               int ret = invalidate_inode_pages2(mapping);
+               if (ret < 0)
+                       return ret;
+       }
+       spin_lock(&inode->i_lock);
+       nfsi->cache_validity &= ~NFS_INO_INVALID_DATA;
+       if (S_ISDIR(inode->i_mode)) {
+               memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf));
+               /* This ensures we revalidate child dentries */
+               nfsi->cache_change_attribute = jiffies;
+       }
+       spin_unlock(&inode->i_lock);
+       nfs_inc_stats(inode, NFSIOS_DATAINVALIDATE);
+       dfprintk(PAGECACHE, "NFS: (%s/%Ld) data cache invalidated\n",
+                       inode->i_sb->s_id, (long long)NFS_FILEID(inode));
+       return 0;
+}
+
+static int nfs_invalidate_mapping(struct inode *inode, struct address_space *mapping)
+{
+       int ret = 0;
+
+       mutex_lock(&inode->i_mutex);
+       if (NFS_I(inode)->cache_validity & NFS_INO_INVALID_DATA) {
+               ret = nfs_sync_mapping(mapping);
+               if (ret == 0)
+                       ret = nfs_invalidate_mapping_nolock(inode, mapping);
+       }
+       mutex_unlock(&inode->i_mutex);
+       return ret;
+}
+
 /**
- * nfs_revalidate_mapping - Revalidate the pagecache
+ * nfs_revalidate_mapping_nolock - Revalidate the pagecache
  * @inode - pointer to host inode
  * @mapping - pointer to mapping
  */
-int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
+int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping)
 {
        struct nfs_inode *nfsi = NFS_I(inode);
        int ret = 0;
 
-       if (NFS_STALE(inode))
-               ret = -ESTALE;
        if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)
-                       || nfs_attribute_timeout(inode))
+                       || nfs_attribute_timeout(inode) || NFS_STALE(inode)) {
                ret = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
-       if (ret < 0)
-               goto out;
+               if (ret < 0)
+                       goto out;
+       }
+       if (nfsi->cache_validity & NFS_INO_INVALID_DATA)
+               ret = nfs_invalidate_mapping_nolock(inode, mapping);
+out:
+       return ret;
+}
 
-       if (nfsi->cache_validity & NFS_INO_INVALID_DATA) {
-               if (mapping->nrpages != 0) {
-                       if (S_ISREG(inode->i_mode)) {
-                               ret = nfs_sync_mapping(mapping);
-                               if (ret < 0)
-                                       goto out;
-                       }
-                       ret = invalidate_inode_pages2(mapping);
-                       if (ret < 0)
-                               goto out;
-               }
-               spin_lock(&inode->i_lock);
-               nfsi->cache_validity &= ~NFS_INO_INVALID_DATA;
-               if (S_ISDIR(inode->i_mode)) {
-                       memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf));
-                       /* This ensures we revalidate child dentries */
-                       nfsi->cache_change_attribute = jiffies;
-               }
-               spin_unlock(&inode->i_lock);
+/**
+ * nfs_revalidate_mapping - Revalidate the pagecache
+ * @inode - pointer to host inode
+ * @mapping - pointer to mapping
+ *
+ * This version of the function will take the inode->i_mutex and attempt to
+ * flush out all dirty data if it needs to invalidate the page cache.
+ */
+int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
+{
+       struct nfs_inode *nfsi = NFS_I(inode);
+       int ret = 0;
 
-               nfs_inc_stats(inode, NFSIOS_DATAINVALIDATE);
-               dfprintk(PAGECACHE, "NFS: (%s/%Ld) data cache invalidated\n",
-                               inode->i_sb->s_id,
-                               (long long)NFS_FILEID(inode));
+       if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE)
+                       || nfs_attribute_timeout(inode) || NFS_STALE(inode)) {
+               ret = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
+               if (ret < 0)
+                       goto out;
        }
+       if (nfsi->cache_validity & NFS_INO_INVALID_DATA)
+               ret = nfs_invalidate_mapping(inode, mapping);
 out:
        return ret;
 }
index 6c686112cc03fa3c3dcea70180653640d95aaeb9..525c136c7d8ce34ff341151cd9c7230bff8cc5b1 100644 (file)
@@ -50,7 +50,9 @@ static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct inode *inode = dentry->d_inode;
        struct page *page;
-       void *err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping));
+       void *err;
+
+       err = ERR_PTR(nfs_revalidate_mapping_nolock(inode, inode->i_mapping));
        if (err)
                goto read_failed;
        page = read_cache_page(&inode->i_data, 0,
index 35cc4b1d60f77600e0c4ac3a2b3d42c41ecb8e52..af4ef808fa940589d8bcc282b708269e8b30c03e 100644 (file)
@@ -17,6 +17,13 @@ ToDo/Notes:
          happen is unclear however so it is worth waiting until someone hits
          the problem.
 
+2.1.28 - Fix a deadlock.
+
+       - Fix deadlock in fs/ntfs/inode.c::ntfs_put_inode().  Thanks to Sergey
+         Vlasov for the report and detailed analysis of the deadlock.  The fix
+         involved getting rid of ntfs_put_inode() altogether and hence NTFS no
+         longer has a ->put_inode super operation.
+
 2.1.27 - Various bug fixes and cleanups.
 
        - Fix two compiler warnings on Alpha.  Thanks to Andrew Morton for
index e27b4eacffbf25a263ff509e176d44fb6b3fe2fb..8255083855653478890d62c0a43fc6a8142328f9 100644 (file)
@@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \
             index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o \
             unistr.o upcase.o
 
-EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.27\"
+EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.28\"
 
 ifeq ($(CONFIG_NTFS_DEBUG),y)
 EXTRA_CFLAGS += -DDEBUG
index 8296c29ae3b8394719bff4ceead2fa81dfd6001b..74f99a6a369bf757df3670ece2c008292d65ddc5 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001-2005 Anton Altaparmakov
+ * Copyright (c) 2001-2007 Anton Altaparmakov
  * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
@@ -1249,16 +1249,12 @@ skip_index_root:
        /* Get the offset into the index allocation attribute. */
        ia_pos = (s64)fpos - vol->mft_record_size;
        ia_mapping = vdir->i_mapping;
-       bmp_vi = ndir->itype.index.bmp_ino;
-       if (unlikely(!bmp_vi)) {
-               ntfs_debug("Inode 0x%lx, regetting index bitmap.", vdir->i_ino);
-               bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
-               if (IS_ERR(bmp_vi)) {
-                       ntfs_error(sb, "Failed to get bitmap attribute.");
-                       err = PTR_ERR(bmp_vi);
-                       goto err_out;
-               }
-               ndir->itype.index.bmp_ino = bmp_vi;
+       ntfs_debug("Inode 0x%lx, getting index bitmap.", vdir->i_ino);
+       bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
+       if (IS_ERR(bmp_vi)) {
+               ntfs_error(sb, "Failed to get bitmap attribute.");
+               err = PTR_ERR(bmp_vi);
+               goto err_out;
        }
        bmp_mapping = bmp_vi->i_mapping;
        /* Get the starting bitmap bit position and sanity check it. */
@@ -1266,7 +1262,7 @@ skip_index_root:
        if (unlikely(bmp_pos >> 3 >= i_size_read(bmp_vi))) {
                ntfs_error(sb, "Current index allocation position exceeds "
                                "index bitmap size.");
-               goto err_out;
+               goto iput_err_out;
        }
        /* Get the starting bit position in the current bitmap page. */
        cur_bmp_pos = bmp_pos & ((PAGE_CACHE_SIZE * 8) - 1);
@@ -1282,7 +1278,7 @@ get_next_bmp_page:
                ntfs_error(sb, "Reading index bitmap failed.");
                err = PTR_ERR(bmp_page);
                bmp_page = NULL;
-               goto err_out;
+               goto iput_err_out;
        }
        bmp = (u8*)page_address(bmp_page);
        /* Find next index block in use. */
@@ -1429,6 +1425,7 @@ find_next_index_buffer:
                        /* @ia_page is already unlocked in this case. */
                        ntfs_unmap_page(ia_page);
                        ntfs_unmap_page(bmp_page);
+                       iput(bmp_vi);
                        goto abort;
                }
        }
@@ -1439,6 +1436,7 @@ unm_EOD:
                ntfs_unmap_page(ia_page);
        }
        ntfs_unmap_page(bmp_page);
+       iput(bmp_vi);
 EOD:
        /* We are finished, set fpos to EOD. */
        fpos = i_size + vol->mft_record_size;
@@ -1455,8 +1453,11 @@ done:
        filp->f_pos = fpos;
        return 0;
 err_out:
-       if (bmp_page)
+       if (bmp_page) {
                ntfs_unmap_page(bmp_page);
+iput_err_out:
+               iput(bmp_vi);
+       }
        if (ia_page) {
                unlock_page(ia_page);
                ntfs_unmap_page(ia_page);
@@ -1529,14 +1530,22 @@ static int ntfs_dir_open(struct inode *vi, struct file *filp)
 static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry,
                int datasync)
 {
-       struct inode *vi = dentry->d_inode;
-       ntfs_inode *ni = NTFS_I(vi);
+       struct inode *bmp_vi, *vi = dentry->d_inode;
        int err, ret;
+       ntfs_attr na;
 
        ntfs_debug("Entering for inode 0x%lx.", vi->i_ino);
        BUG_ON(!S_ISDIR(vi->i_mode));
-       if (NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino)
-               write_inode_now(ni->itype.index.bmp_ino, !datasync);
+       /* If the bitmap attribute inode is in memory sync it, too. */
+       na.mft_no = vi->i_ino;
+       na.type = AT_BITMAP;
+       na.name = I30;
+       na.name_len = 4;
+       bmp_vi = ilookup5(vi->i_sb, vi->i_ino, (test_t)ntfs_test_inode, &na);
+       if (bmp_vi) {
+               write_inode_now(bmp_vi, !datasync);
+               iput(bmp_vi);
+       }
        ret = ntfs_write_inode(vi, 1);
        write_inode_now(vi, !datasync);
        err = sync_blockdev(vi->i_sb->s_bdev);
index 247989891b4b6e45cd9f20548a91d202c1cea82e..f8bf8da67ee8f86bb0813b231f55ddbfc5148a46 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * inode.c - NTFS kernel inode handling. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001-2006 Anton Altaparmakov
+ * Copyright (c) 2001-2007 Anton Altaparmakov
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -95,7 +95,7 @@ int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
  * If initializing the normal file/directory inode, set @na->type to AT_UNUSED.
  * In that case, @na->name and @na->name_len should be set to NULL and 0,
  * respectively. Although that is not strictly necessary as
- * ntfs_read_inode_locked() will fill them in later.
+ * ntfs_read_locked_inode() will fill them in later.
  *
  * Return 0 on success and -errno on error.
  *
@@ -171,8 +171,8 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi,
 struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no)
 {
        struct inode *vi;
-       ntfs_attr na;
        int err;
+       ntfs_attr na;
 
        na.mft_no = mft_no;
        na.type = AT_UNUSED;
@@ -229,8 +229,8 @@ struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPE type,
                ntfschar *name, u32 name_len)
 {
        struct inode *vi;
-       ntfs_attr na;
        int err;
+       ntfs_attr na;
 
        /* Make sure no one calls ntfs_attr_iget() for indices. */
        BUG_ON(type == AT_INDEX_ALLOCATION);
@@ -287,8 +287,8 @@ struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
                u32 name_len)
 {
        struct inode *vi;
-       ntfs_attr na;
        int err;
+       ntfs_attr na;
 
        na.mft_no = base_vi->i_ino;
        na.type = AT_INDEX_ALLOCATION;
@@ -402,7 +402,6 @@ void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
        ntfs_init_runlist(&ni->attr_list_rl);
        lockdep_set_class(&ni->attr_list_rl.lock,
                                &attr_list_rl_lock_class);
-       ni->itype.index.bmp_ino = NULL;
        ni->itype.index.block_size = 0;
        ni->itype.index.vcn_size = 0;
        ni->itype.index.collation_rule = 0;
@@ -546,6 +545,7 @@ static int ntfs_read_locked_inode(struct inode *vi)
 {
        ntfs_volume *vol = NTFS_SB(vi->i_sb);
        ntfs_inode *ni;
+       struct inode *bvi;
        MFT_RECORD *m;
        ATTR_RECORD *a;
        STANDARD_INFORMATION *si;
@@ -780,7 +780,6 @@ skip_attr_list_load:
         */
        if (S_ISDIR(vi->i_mode)) {
                loff_t bvi_size;
-               struct inode *bvi;
                ntfs_inode *bni;
                INDEX_ROOT *ir;
                u8 *ir_end, *index_end;
@@ -985,13 +984,12 @@ skip_attr_list_load:
                        err = PTR_ERR(bvi);
                        goto unm_err_out;
                }
-               ni->itype.index.bmp_ino = bvi;
                bni = NTFS_I(bvi);
                if (NInoCompressed(bni) || NInoEncrypted(bni) ||
                                NInoSparse(bni)) {
                        ntfs_error(vi->i_sb, "$BITMAP attribute is compressed "
                                        "and/or encrypted and/or sparse.");
-                       goto unm_err_out;
+                       goto iput_unm_err_out;
                }
                /* Consistency check bitmap size vs. index allocation size. */
                bvi_size = i_size_read(bvi);
@@ -1000,8 +998,10 @@ skip_attr_list_load:
                        ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) "
                                        "for index allocation (0x%llx).",
                                        bvi_size << 3, vi->i_size);
-                       goto unm_err_out;
+                       goto iput_unm_err_out;
                }
+               /* No longer need the bitmap attribute inode. */
+               iput(bvi);
 skip_large_dir_stuff:
                /* Setup the operations for this inode. */
                vi->i_op = &ntfs_dir_inode_ops;
@@ -1176,7 +1176,8 @@ no_data_attr_special_case:
                vi->i_blocks = ni->allocated_size >> 9;
        ntfs_debug("Done.");
        return 0;
-
+iput_unm_err_out:
+       iput(bvi);
 unm_err_out:
        if (!err)
                err = -EIO;
@@ -1697,7 +1698,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
                                vi->i_size);
                goto iput_unm_err_out;
        }
-       ni->itype.index.bmp_ino = bvi;
+       iput(bvi);
 skip_large_index_stuff:
        /* Setup the operations for this index inode. */
        vi->i_op = NULL;
@@ -1714,7 +1715,6 @@ skip_large_index_stuff:
 
        ntfs_debug("Done.");
        return 0;
-
 iput_unm_err_out:
        iput(bvi);
 unm_err_out:
@@ -2191,37 +2191,6 @@ err_out:
        return -1;
 }
 
-/**
- * ntfs_put_inode - handler for when the inode reference count is decremented
- * @vi:                vfs inode
- *
- * The VFS calls ntfs_put_inode() every time the inode reference count (i_count)
- * is about to be decremented (but before the decrement itself.
- *
- * If the inode @vi is a directory with two references, one of which is being
- * dropped, we need to put the attribute inode for the directory index bitmap,
- * if it is present, otherwise the directory inode would remain pinned for
- * ever.
- */
-void ntfs_put_inode(struct inode *vi)
-{
-       if (S_ISDIR(vi->i_mode) && atomic_read(&vi->i_count) == 2) {
-               ntfs_inode *ni = NTFS_I(vi);
-               if (NInoIndexAllocPresent(ni)) {
-                       struct inode *bvi = NULL;
-                       mutex_lock(&vi->i_mutex);
-                       if (atomic_read(&vi->i_count) == 2) {
-                               bvi = ni->itype.index.bmp_ino;
-                               if (bvi)
-                                       ni->itype.index.bmp_ino = NULL;
-                       }
-                       mutex_unlock(&vi->i_mutex);
-                       if (bvi)
-                               iput(bvi);
-               }
-       }
-}
-
 static void __ntfs_clear_inode(ntfs_inode *ni)
 {
        /* Free all alocated memory. */
@@ -2287,18 +2256,6 @@ void ntfs_clear_big_inode(struct inode *vi)
 {
        ntfs_inode *ni = NTFS_I(vi);
 
-       /*
-        * If the inode @vi is an index inode we need to put the attribute
-        * inode for the index bitmap, if it is present, otherwise the index
-        * inode would disappear and the attribute inode for the index bitmap
-        * would no longer be referenced from anywhere and thus it would remain
-        * pinned for ever.
-        */
-       if (NInoAttr(ni) && (ni->type == AT_INDEX_ALLOCATION) &&
-                       NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino) {
-               iput(ni->itype.index.bmp_ino);
-               ni->itype.index.bmp_ino = NULL;
-       }
 #ifdef NTFS_RW
        if (NInoDirty(ni)) {
                bool was_bad = (is_bad_inode(vi));
index f088291e017caa377ad8174a8aaf57af0d28ff26..117eaf8032a34ee44aacce0cc38d26c5f23772b3 100644 (file)
@@ -2,7 +2,7 @@
  * inode.h - Defines for inode structures NTFS Linux kernel driver. Part of
  *          the Linux-NTFS project.
  *
- * Copyright (c) 2001-2005 Anton Altaparmakov
+ * Copyright (c) 2001-2007 Anton Altaparmakov
  * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
@@ -101,8 +101,6 @@ struct _ntfs_inode {
        runlist attr_list_rl;   /* Run list for the attribute list value. */
        union {
                struct { /* It is a directory, $MFT, or an index inode. */
-                       struct inode *bmp_ino;  /* Attribute inode for the
-                                                  index $BITMAP. */
                        u32 block_size;         /* Size of an index block. */
                        u32 vcn_size;           /* Size of a vcn in this
                                                   index. */
@@ -300,8 +298,6 @@ extern void ntfs_clear_extent_inode(ntfs_inode *ni);
 
 extern int ntfs_read_inode_mount(struct inode *vi);
 
-extern void ntfs_put_inode(struct inode *vi);
-
 extern int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt);
 
 #ifdef NTFS_RW
index 03a391ac71457a282aeb1703c5585877d93533f9..babf94d90deff8dd4a51e624055c2132c00265a5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001-2006 Anton Altaparmakov
+ * Copyright (c) 2001-2007 Anton Altaparmakov
  * Copyright (c) 2001,2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
@@ -2702,9 +2702,6 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs)
 static struct super_operations ntfs_sops = {
        .alloc_inode    = ntfs_alloc_big_inode,   /* VFS: Allocate new inode. */
        .destroy_inode  = ntfs_destroy_big_inode, /* VFS: Deallocate inode. */
-       .put_inode      = ntfs_put_inode,         /* VFS: Called just before
-                                                    the inode reference count
-                                                    is decreased. */
 #ifdef NTFS_RW
        //.dirty_inode  = NULL,                 /* VFS: Called from
        //                                         __mark_inode_dirty(). */
@@ -3261,7 +3258,7 @@ static void __exit exit_ntfs_fs(void)
 }
 
 MODULE_AUTHOR("Anton Altaparmakov <aia21@cantab.net>");
-MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2006 Anton Altaparmakov");
+MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2007 Anton Altaparmakov");
 MODULE_VERSION(NTFS_VERSION);
 MODULE_LICENSE("GPL");
 #ifdef DEBUG
index 06be6e774cf943e08c41b616fc2d99ceb17efc11..56e1fefc1205e824cd2f1bef79941f2fdf5b9bed 100644 (file)
@@ -60,14 +60,11 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb, void *vobjp)
 
        inode = ocfs2_iget(OCFS2_SB(sb), handle->ih_blkno, 0);
 
-       if (IS_ERR(inode)) {
-               mlog_errno(PTR_ERR(inode));
+       if (IS_ERR(inode))
                return (void *)inode;
-       }
 
        if (handle->ih_generation != inode->i_generation) {
                iput(inode);
-               mlog_errno(-ESTALE);
                return ERR_PTR(-ESTALE);
        }
 
index e4d91493d7d74a9efa29e8e55ead977cee06de70..28ab56f2b98c50bf8300140c9002b801060c66a9 100644 (file)
@@ -146,7 +146,6 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, int flags)
        if (is_bad_inode(inode)) {
                iput(inode);
                inode = ERR_PTR(-ESTALE);
-               mlog_errno(PTR_ERR(inode));
                goto bail;
        }
 
@@ -155,8 +154,7 @@ bail:
                mlog(0, "returning inode with number %llu\n",
                     (unsigned long long)OCFS2_I(inode)->ip_blkno);
                mlog_exit_ptr(inode);
-       } else
-               mlog_errno(PTR_ERR(inode));
+       }
 
        return inode;
 }
@@ -247,7 +245,7 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
         * today.  change if needed. */
        if (!OCFS2_IS_VALID_DINODE(fe) ||
            !(fe->i_flags & cpu_to_le32(OCFS2_VALID_FL))) {
-               mlog(ML_ERROR, "Invalid dinode: i_ino=%lu, i_blkno=%llu, "
+               mlog(0, "Invalid dinode: i_ino=%lu, i_blkno=%llu, "
                     "signature = %.*s, flags = 0x%x\n",
                     inode->i_ino,
                     (unsigned long long)le64_to_cpu(fe->i_blkno), 7,
@@ -478,11 +476,8 @@ static int ocfs2_read_locked_inode(struct inode *inode,
            S_ISBLK(le16_to_cpu(fe->i_mode)))
                inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev));
 
-       if (ocfs2_populate_inode(inode, fe, 0) < 0) {
-               mlog(ML_ERROR, "populate failed! i_blkno=%llu, i_ino=%lu\n",
-                    (unsigned long long)fe->i_blkno, inode->i_ino);
+       if (ocfs2_populate_inode(inode, fe, 0) < 0)
                goto bail;
-       }
 
        BUG_ON(args->fi_blkno != le64_to_cpu(fe->i_blkno));
 
index 9637039c263355676716b72b98eaa9f147867dfb..f3d7803b4b46f18622cbb6156a25f80fa6b89a82 100644 (file)
@@ -932,14 +932,15 @@ static int ocfs2_unlink(struct inode *dir,
                goto leave;
        }
 
-       if (S_ISDIR(inode->i_mode)) {
+       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       if (S_ISDIR(inode->i_mode))
                drop_nlink(dir);
-               status = ocfs2_mark_inode_dirty(handle, dir,
-                                               parent_node_bh);
-               if (status < 0) {
-                       mlog_errno(status);
+
+       status = ocfs2_mark_inode_dirty(handle, dir, parent_node_bh);
+       if (status < 0) {
+               mlog_errno(status);
+               if (S_ISDIR(inode->i_mode))
                        inc_nlink(dir);
-               }
        }
 
 leave:
@@ -1068,6 +1069,7 @@ static int ocfs2_rename(struct inode *old_dir,
        char orphan_name[OCFS2_ORPHAN_NAMELEN + 1];
        struct buffer_head *orphan_entry_bh = NULL;
        struct buffer_head *newfe_bh = NULL;
+       struct buffer_head *old_inode_bh = NULL;
        struct buffer_head *insert_entry_bh = NULL;
        struct ocfs2_super *osb = NULL;
        u64 newfe_blkno;
@@ -1079,7 +1081,7 @@ static int ocfs2_rename(struct inode *old_dir,
        struct buffer_head *new_de_bh = NULL, *old_de_bh = NULL; // bhs for above
        struct buffer_head *old_inode_de_bh = NULL; // if old_dentry is a dir,
                                                    // this is the 1st dirent bh
-       nlink_t old_dir_nlink = old_dir->i_nlink, new_dir_nlink = new_dir->i_nlink;
+       nlink_t old_dir_nlink = old_dir->i_nlink;
 
        /* At some point it might be nice to break this function up a
         * bit. */
@@ -1139,12 +1141,11 @@ static int ocfs2_rename(struct inode *old_dir,
        }
 
        /*
-        * Though we don't require an inode meta data update if
-        * old_inode is not a directory, we lock anyway here to ensure
-        * the vote thread on other nodes won't have to concurrently
-        * downconvert the inode and the dentry locks.
+        * Aside from allowing a meta data update, the locking here
+        * also ensures that the vote thread on other nodes won't have
+        * to concurrently downconvert the inode and the dentry locks.
         */
-       status = ocfs2_meta_lock(old_inode, NULL, 1);
+       status = ocfs2_meta_lock(old_inode, &old_inode_bh, 1);
        if (status < 0) {
                if (status != -ENOENT)
                        mlog_errno(status);
@@ -1355,6 +1356,7 @@ static int ocfs2_rename(struct inode *old_dir,
 
        old_inode->i_ctime = CURRENT_TIME;
        mark_inode_dirty(old_inode);
+       ocfs2_mark_inode_dirty(handle, old_inode, old_inode_bh);
 
        /* now that the name has been added to new_dir, remove the old name */
        status = ocfs2_delete_entry(handle, old_dir, old_de, old_de_bh);
@@ -1384,27 +1386,22 @@ static int ocfs2_rename(struct inode *old_dir,
                }
        }
        mark_inode_dirty(old_dir);
-       if (new_inode)
+       ocfs2_mark_inode_dirty(handle, old_dir, old_dir_bh);
+       if (new_inode) {
                mark_inode_dirty(new_inode);
+               ocfs2_mark_inode_dirty(handle, new_inode, newfe_bh);
+       }
 
-       if (old_dir != new_dir)
-               if (new_dir_nlink != new_dir->i_nlink) {
-                       if (!new_dir_bh) {
-                               mlog(ML_ERROR, "need to change nlink for new "
-                                    "dir %llu from %d to %d but bh is NULL\n",
-                                    (unsigned long long)OCFS2_I(new_dir)->ip_blkno,
-                                    (int)new_dir_nlink, new_dir->i_nlink);
-                       } else {
-                               struct ocfs2_dinode *fe;
-                               status = ocfs2_journal_access(handle,
-                                                             new_dir,
-                                                             new_dir_bh,
-                                                             OCFS2_JOURNAL_ACCESS_WRITE);
-                               fe = (struct ocfs2_dinode *) new_dir_bh->b_data;
-                               fe->i_links_count = cpu_to_le16(new_dir->i_nlink);
-                               status = ocfs2_journal_dirty(handle, new_dir_bh);
-                       }
-               }
+       if (old_dir != new_dir) {
+               /* Keep the same times on both directories.*/
+               new_dir->i_ctime = new_dir->i_mtime = old_dir->i_ctime;
+
+               /*
+                * This will also pick up the i_nlink change from the
+                * block above.
+                */
+               ocfs2_mark_inode_dirty(handle, new_dir, new_dir_bh);
+       }
 
        if (old_dir_nlink != old_dir->i_nlink) {
                if (!old_dir_bh) {
@@ -1455,6 +1452,8 @@ bail:
                iput(new_inode);
        if (newfe_bh)
                brelse(newfe_bh);
+       if (old_inode_bh)
+               brelse(old_inode_bh);
        if (old_dir_bh)
                brelse(old_dir_bh);
        if (new_dir_bh)
@@ -1826,6 +1825,13 @@ static int __ocfs2_add_entry(handle_t *handle,
                     (le16_to_cpu(de->rec_len) >= rec_len)) ||
                    (le16_to_cpu(de->rec_len) >=
                     (OCFS2_DIR_REC_LEN(de->name_len) + rec_len))) {
+                       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+                       retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh);
+                       if (retval < 0) {
+                               mlog_errno(retval);
+                               goto bail;
+                       }
+
                        status = ocfs2_journal_access(handle, dir, insert_bh,
                                                      OCFS2_JOURNAL_ACCESS_WRITE);
                        /* By now the buffer is marked for journaling */
@@ -1848,7 +1854,6 @@ static int __ocfs2_add_entry(handle_t *handle,
                        de->name_len = namelen;
                        memcpy(de->name, name, namelen);
 
-                       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
                        dir->i_version++;
                        status = ocfs2_journal_dirty(handle, insert_bh);
                        retval = 0;
index b5c68567077ecaab02bfd0dd903d24f12e13eb56..c99e9058c1988940451d7faf21d24818c83e71cc 100644 (file)
@@ -85,7 +85,7 @@
 #define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask)                  \
        OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
 
-#define OCFS2_FEATURE_COMPAT_SUPP      0
+#define OCFS2_FEATURE_COMPAT_SUPP      OCFS2_FEATURE_COMPAT_BACKUP_SB
 #define OCFS2_FEATURE_INCOMPAT_SUPP    OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT
 #define OCFS2_FEATURE_RO_COMPAT_SUPP   0
 
 /* Support for sparse allocation in b-trees */
 #define OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC    0x0010
 
+/*
+ * backup superblock flag is used to indicate that this volume
+ * has backup superblocks.
+ */
+#define OCFS2_FEATURE_COMPAT_BACKUP_SB         0x0001
+
+/* The byte offset of the first backup block will be 1G.
+ * The following will be 4G, 16G, 64G, 256G and 1T.
+ */
+#define OCFS2_BACKUP_SB_START                  1 << 30
+
+/* the max backup superblock nums */
+#define OCFS2_MAX_BACKUP_SUPERBLOCKS   6
+
 /*
  * Flags on ocfs2_dinode.i_flags
  */
@@ -566,6 +580,20 @@ static inline int ocfs2_truncate_recs_per_inode(struct super_block *sb)
 
        return size / sizeof(struct ocfs2_truncate_rec);
 }
+
+static inline u64 ocfs2_backup_super_blkno(struct super_block *sb, int index)
+{
+       u64 offset = OCFS2_BACKUP_SB_START;
+
+       if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) {
+               offset <<= (2 * index);
+               offset /= sb->s_blocksize;
+               return offset;
+       }
+
+       return 0;
+
+}
 #else
 static inline int ocfs2_fast_symlink_chars(int blocksize)
 {
@@ -631,6 +659,19 @@ static inline int ocfs2_truncate_recs_per_inode(int blocksize)
 
        return size / sizeof(struct ocfs2_truncate_rec);
 }
+
+static inline uint64_t ocfs2_backup_super_blkno(int blocksize, int index)
+{
+       uint64_t offset = OCFS2_BACKUP_SB_START;
+
+       if (index >= 0 && index < OCFS2_MAX_BACKUP_SUPERBLOCKS) {
+               offset <<= (2 * index);
+               offset /= blocksize;
+               return offset;
+       }
+
+       return 0;
+}
 #endif  /* __KERNEL__ */
 
 
index 957d6878b03ef4bfa307d91d7f55f6fd0e0c885b..03b0191534d56b1a7ce4e51bb1c9a16c0d83042b 100644 (file)
@@ -158,8 +158,7 @@ static void *ocfs2_follow_link(struct dentry *dentry,
        }
 
        status = vfs_follow_link(nd, link);
-       if (status && status != -ENOENT)
-               mlog_errno(status);
+
 bail:
        if (page) {
                kunmap(page);
index 99b6f329ba23edc7b513e9b7dd606028497bb275..5109f1d5e7ffcbe2eb08340221439b440fd5ba57 100644 (file)
@@ -48,6 +48,11 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp)
        }
 
        mutex_lock(&inode->i_mutex);
+
+       mutex_lock(&(REISERFS_I(inode)->i_mmap));
+       if (REISERFS_I(inode)->i_flags & i_ever_mapped)
+               REISERFS_I(inode)->i_flags &= ~i_pack_on_close_mask;
+
        reiserfs_write_lock(inode->i_sb);
        /* freeing preallocation only involves relogging blocks that
         * are already in the current transaction.  preallocation gets
@@ -100,11 +105,24 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp)
                err = reiserfs_truncate_file(inode, 0);
        }
       out:
+       mutex_unlock(&(REISERFS_I(inode)->i_mmap));
        mutex_unlock(&inode->i_mutex);
        reiserfs_write_unlock(inode->i_sb);
        return err;
 }
 
+static int reiserfs_file_mmap(struct file *file, struct vm_area_struct *vma)
+{
+       struct inode *inode;
+
+       inode = file->f_path.dentry->d_inode;
+       mutex_lock(&(REISERFS_I(inode)->i_mmap));
+       REISERFS_I(inode)->i_flags |= i_ever_mapped;
+       mutex_unlock(&(REISERFS_I(inode)->i_mmap));
+
+       return generic_file_mmap(file, vma);
+}
+
 static void reiserfs_vfs_truncate_file(struct inode *inode)
 {
        reiserfs_truncate_file(inode, 1);
@@ -1527,7 +1545,7 @@ const struct file_operations reiserfs_file_operations = {
 #ifdef CONFIG_COMPAT
        .compat_ioctl = reiserfs_compat_ioctl,
 #endif
-       .mmap = generic_file_mmap,
+       .mmap = reiserfs_file_mmap,
        .open = generic_file_open,
        .release = reiserfs_file_release,
        .fsync = reiserfs_sync_file,
index f3d1c4a77979d1506903c88df9c8cdc76c388a09..9fcbfe3169776516162b7a68bfbf845975adb639 100644 (file)
@@ -1125,6 +1125,7 @@ static void init_inode(struct inode *inode, struct treepath *path)
        REISERFS_I(inode)->i_prealloc_count = 0;
        REISERFS_I(inode)->i_trans_id = 0;
        REISERFS_I(inode)->i_jl = NULL;
+       mutex_init(&(REISERFS_I(inode)->i_mmap));
        reiserfs_init_acl_access(inode);
        reiserfs_init_acl_default(inode);
        reiserfs_init_xattr_rwsem(inode);
@@ -1832,6 +1833,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
        REISERFS_I(inode)->i_attrs =
            REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK;
        sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode);
+       mutex_init(&(REISERFS_I(inode)->i_mmap));
        reiserfs_init_acl_access(inode);
        reiserfs_init_acl_default(inode);
        reiserfs_init_xattr_rwsem(inode);
index a52d65440429b99520ff6fa355ccd95d92611619..359f10b54f59ba7c99297dac910b73e4c0406796 100644 (file)
@@ -743,6 +743,7 @@ extern void enable_sep_cpu(void);
 extern int sysenter_setup(void);
 
 extern int init_gdt(int cpu, struct task_struct *idle);
+extern void cpu_set_gdt(int);
 extern void secondary_cpu_init(void);
 
 #endif /* __ASM_I386_PROCESSOR_H */
index 2b78582cbd61710807b3a38c38e81631aab1ca9d..97af155057e4bcfa668eb006c935e68b1436dbca 100644 (file)
@@ -72,8 +72,8 @@ static inline __sum16 csum_fold(__wsum csum)
 
 #define _HAVE_ARCH_IPV6_CSUM   1
 struct in6_addr;
-extern unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
-       struct in6_addr *daddr, __u32 len, unsigned short proto,
-       unsigned int csum);
+extern __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
+       const struct in6_addr *daddr, __u32 len, unsigned short proto,
+       __wsum csum);
 
 #endif /* _ASM_IA64_CHECKSUM_H */
index 24cdcc6eaab887b5adb08772ad0c2d53abbba11c..20a81e1548f5c91419b1077c75e802e35871af44 100644 (file)
@@ -159,7 +159,8 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr,
 #endif
        "       .set    pop"
        : "=r" (sum)
-       : "0" (daddr), "r"(saddr),
+       : "0" ((__force unsigned long)daddr),
+         "r" ((__force unsigned long)saddr),
 #ifdef __MIPSEL__
          "r" ((proto + len) << 8),
 #else
index 0fe02945feba0b8a18868126a99d977558294d33..50073157a617dfcd0583bb8cfde6621285953736 100644 (file)
@@ -157,7 +157,7 @@ ASMMACRO(back_to_back_c0_hazard,
  * processors.
  */
 ASMMACRO(mtc0_tlbw_hazard,
-       nop
+       nop; nop
        )
 ASMMACRO(tlbw_use_hazard,
        nop; nop; nop
index 46bf5de5ac720f1691b75bce5ea022eb7cf7d874..af3b07dfad4be2fea39a75522347ac81ed0a8b3f 100644 (file)
 
 #include <asm/hazards.h>
 
+/*
+ * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred IPIs,
+ * at the cost of branch and call overhead on each local_irq_restore()
+ */
+
+#ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY
+
+extern void smtc_ipi_replay(void);
+
+#define irq_restore_epilog(flags)                              \
+do {                                                           \
+       if (!(flags & 0x0400))                                  \
+               smtc_ipi_replay();                              \
+} while (0)
+
+#else
+
+#define irq_restore_epilog(ignore) do { } while (0)
+
+#endif /* CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY */
+
 __asm__ (
        "       .macro  raw_local_irq_enable                            \n"
        "       .set    push                                            \n"
@@ -193,6 +214,7 @@ do {                                                                        \
                : "=r" (__tmp1)                                         \
                : "0" (flags)                                           \
                : "memory");                                            \
+       irq_restore_epilog(flags);                                      \
 } while(0)
 
 static inline int raw_irqs_disabled_flags(unsigned long flags)
index e475c45ea263e57d34409137429bb63f982d9e83..fbcda82044738b34674f8630aab3905dc2a7bf44 100644 (file)
@@ -118,6 +118,7 @@ register struct thread_info *__current_thread_info __asm__("$28");
 #define TIF_USEDFPU            16      /* FPU was used by this task this quantum (SMP) */
 #define TIF_POLLING_NRFLAG     17      /* true if poll_idle() is polling TIF_NEED_RESCHED */
 #define TIF_MEMDIE             18
+#define TIF_FREEZE             19
 #define TIF_SYSCALL_TRACE      31      /* syscall trace active */
 
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
@@ -129,6 +130,7 @@ register struct thread_info *__current_thread_info __asm__("$28");
 #define _TIF_RESTORE_SIGMASK   (1<<TIF_RESTORE_SIGMASK)
 #define _TIF_USEDFPU           (1<<TIF_USEDFPU)
 #define _TIF_POLLING_NRFLAG    (1<<TIF_POLLING_NRFLAG)
+#define _TIF_FREEZE            (1<<TIF_FREEZE)
 
 /* work to do on interrupt/exception return */
 #define _TIF_WORK_MASK         (0x0000ffef & ~_TIF_SECCOMP)
index 53283e2540b381ff086508d69052dd1b188bc6d1..f038e33e6d48677d0da1d5150dfc0b5f1f8a6931 100644 (file)
@@ -207,7 +207,8 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
 
 /*
  * Atomically test *v and decrement if it is greater than 0.
- * The function returns the old value of *v minus 1.
+ * The function returns the old value of *v minus 1, even if
+ * the atomic variable, v, was not decremented.
  */
 static __inline__ int atomic_dec_if_positive(atomic_t *v)
 {
@@ -216,14 +217,15 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
        __asm__ __volatile__(
        LWSYNC_ON_SMP
 "1:    lwarx   %0,0,%1         # atomic_dec_if_positive\n\
-       addic.  %0,%0,-1\n\
+       cmpwi   %0,1\n\
+       addi    %0,%0,-1\n\
        blt-    2f\n"
        PPC405_ERR77(0,%1)
 "      stwcx.  %0,0,%1\n\
        bne-    1b"
        ISYNC_ON_SMP
        "\n\
-2:"    : "=&r" (t)
+2:"    : "=&b" (t)
        : "r" (&v->counter)
        : "cc", "memory");
 
index 862e483cce8a03e7eb5398d03bd622fec5d1c107..157db77a717079cb7a7035a02fc635339fcc9752 100644 (file)
@@ -69,7 +69,6 @@ header-y += hysdn_if.h
 header-y += i2c-dev.h
 header-y += i8k.h
 header-y += icmp.h
-header-y += if_addr.h
 header-y += if_arcnet.h
 header-y += if_arp.h
 header-y += if_bonding.h
@@ -79,7 +78,6 @@ header-y += if_fddi.h
 header-y += if.h
 header-y += if_hippi.h
 header-y += if_infiniband.h
-header-y += if_link.h
 header-y += if_packet.h
 header-y += if_plip.h
 header-y += if_ppp.h
@@ -129,7 +127,6 @@ header-y += posix_types.h
 header-y += ppdev.h
 header-y += prctl.h
 header-y += ps2esdi.h
-header-y += qic117.h
 header-y += qnxtypes.h
 header-y += quotaio_v1.h
 header-y += quotaio_v2.h
@@ -214,6 +211,7 @@ unifdef-y += hpet.h
 unifdef-y += i2c.h
 unifdef-y += i2o-dev.h
 unifdef-y += icmpv6.h
+unifdef-y += if_addr.h
 unifdef-y += if_bridge.h
 unifdef-y += if_ec.h
 unifdef-y += if_eql.h
@@ -221,6 +219,7 @@ unifdef-y += if_ether.h
 unifdef-y += if_fddi.h
 unifdef-y += if_frad.h
 unifdef-y += if_ltalk.h
+unifdef-y += if_link.h
 unifdef-y += if_pppox.h
 unifdef-y += if_shaper.h
 unifdef-y += if_tr.h
index f04d6d75c09878c0a87bc1d9e5acacb586881d51..8e4dbb51fc702f6703e520bfbae497c60aa80d26 100644 (file)
@@ -700,9 +700,10 @@ static char *keys[KEY_MAX + 1] = {
 
 static char *relatives[REL_MAX + 1] = {
        [REL_X] = "X",                  [REL_Y] = "Y",
-       [REL_Z] = "Z",                  [REL_HWHEEL] = "HWheel",
-       [REL_DIAL] = "Dial",            [REL_WHEEL] = "Wheel",
-       [REL_MISC] = "Misc",
+       [REL_Z] = "Z",                  [REL_RX] = "Rx",
+       [REL_RY] = "Ry",                [REL_RZ] = "Rz",
+       [REL_HWHEEL] = "HWheel",        [REL_DIAL] = "Dial",
+       [REL_WHEEL] = "Wheel",          [REL_MISC] = "Misc",
 };
 
 static char *absolutes[ABS_MAX + 1] = {
index 8de079ba11076e2ee4a6f5d4d9c2703eafbca999..660b5010c2d96bdeecc331e635f5375c59937ec5 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _IF_TUNNEL_H_
 #define _IF_TUNNEL_H_
 
+#include <linux/types.h>
+
 #define SIOCGETTUNNEL   (SIOCDEVPRIVATE + 0)
 #define SIOCADDTUNNEL   (SIOCDEVPRIVATE + 1)
 #define SIOCDELTUNNEL   (SIOCDEVPRIVATE + 2)
index ab2754830322f96a5e1a80538104fa143a6028b1..f7f268e3874904d4de275ce6df87a54e4a518e37 100644 (file)
@@ -1143,12 +1143,15 @@ static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf)
 
 static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
 {
+       qc->dma_dir = DMA_NONE;
        qc->__sg = NULL;
        qc->flags = 0;
        qc->cursect = qc->cursg = qc->cursg_ofs = 0;
        qc->nsect = 0;
        qc->nbytes = qc->curbytes = 0;
+       qc->n_elem = 0;
        qc->err_mask = 0;
+       qc->pad_len = 0;
 
        ata_tf_init(qc->dev, &qc->tf);
 
index a3594dfd696399ae8609417cafdc1f0ca844272a..bcf24909d67730ca79f416b4bfa0b2875939fdd5 100644 (file)
@@ -42,7 +42,7 @@ struct mmc_command {
 #define MMC_RSP_R1B    (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
 #define MMC_RSP_R2     (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
 #define MMC_RSP_R3     (MMC_RSP_PRESENT)
-#define MMC_RSP_R6     (MMC_RSP_PRESENT|MMC_RSP_CRC)
+#define MMC_RSP_R6     (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
 
 #define mmc_resp_type(cmd)     ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))
 
index 72fc68c5ee963afbfa331527501983c558ea9e8b..9a6e2f953cba17292fb222bc616c70a1563b4439 100644 (file)
@@ -24,7 +24,6 @@ struct mtd_blktrans_dev {
        struct mtd_info *mtd;
        struct mutex lock;
        int devnum;
-       int blksize;
        unsigned long size;
        int readonly;
        void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */
@@ -36,6 +35,8 @@ struct mtd_blktrans_ops {
        char *name;
        int major;
        int part_bits;
+       int blksize;
+       int blkshift;
 
        /* Access functions */
        int (*readsect)(struct mtd_blktrans_dev *dev,
index 94a443d45258485cf79e71f76c7d01bc2c39b2eb..d644e57703ad0ef256b2099af0b883c06959ce35 100644 (file)
@@ -23,7 +23,7 @@
 
 #define MTD_CHAR_MAJOR 90
 #define MTD_BLOCK_MAJOR 31
-#define MAX_MTD_DEVICES 16
+#define MAX_MTD_DEVICES 32
 
 #define MTD_ERASE_PENDING              0x01
 #define MTD_ERASING            0x02
@@ -75,15 +75,12 @@ typedef enum {
  * struct mtd_oob_ops - oob operation operands
  * @mode:      operation mode
  *
- * @len:       number of bytes to write/read. When a data buffer is given
- *             (datbuf != NULL) this is the number of data bytes. When
- *             no data buffer is available this is the number of oob bytes.
+ * @len:       number of data bytes to write/read
  *
- * @retlen:    number of bytes written/read. When a data buffer is given
- *             (datbuf != NULL) this is the number of data bytes. When
- *             no data buffer is available this is the number of oob bytes.
+ * @retlen:    number of data bytes written/read
  *
- * @ooblen:    number of oob bytes per page
+ * @ooblen:    number of oob bytes to write/read
+ * @oobretlen: number of oob bytes written/read
  * @ooboffs:   offset of oob data in the oob area (only relevant when
  *             mode = MTD_OOB_PLACE)
  * @datbuf:    data buffer - if NULL only oob data are read/written
@@ -94,6 +91,7 @@ struct mtd_oob_ops {
        size_t          len;
        size_t          retlen;
        size_t          ooblen;
+       size_t          oobretlen;
        uint32_t        ooboffs;
        uint8_t         *datbuf;
        uint8_t         *oobbuf;
@@ -202,11 +200,20 @@ struct mtd_info {
 
        /* ECC status information */
        struct mtd_ecc_stats ecc_stats;
+       /* Subpage shift (NAND) */
+       int subpage_sft;
 
        void *priv;
 
        struct module *owner;
        int usecount;
+
+       /* If the driver is something smart, like UBI, it may need to maintain
+        * its own reference counting. The below functions are only for driver.
+        * The driver may register its callbacks. These callbacks are not
+        * supposed to be called by MTD users */
+       int (*get_device) (struct mtd_info *mtd);
+       void (*put_device) (struct mtd_info *mtd);
 };
 
 
@@ -216,6 +223,7 @@ extern int add_mtd_device(struct mtd_info *mtd);
 extern int del_mtd_device (struct mtd_info *mtd);
 
 extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
+extern struct mtd_info *get_mtd_device_nm(const char *name);
 
 extern void put_mtd_device(struct mtd_info *mtd);
 
index 8b3ef418721980542adccfb4feb8cc63f82410af..2071b02f0526f6507d9355015939f09029a51586 100644 (file)
@@ -166,6 +166,9 @@ typedef enum {
  * for all large page devices, as they do not support
  * autoincrement.*/
 #define NAND_NO_READRDY                0x00000100
+/* Chip does not allow subpage writes */
+#define NAND_NO_SUBPAGE_WRITE  0x00000200
+
 
 /* Options valid for Samsung large page devices */
 #define NAND_SAMSUNG_LP_OPTIONS \
@@ -193,6 +196,9 @@ typedef enum {
 /* Nand scan has allocated controller struct */
 #define NAND_CONTROLLER_ALLOC  0x80000000
 
+/* Cell info constants */
+#define NAND_CI_CHIPNR_MSK     0x03
+#define NAND_CI_CELLTYPE_MSK   0x0C
 
 /*
  * nand_state_t - chip states
@@ -286,9 +292,7 @@ struct nand_ecc_ctrl {
  * struct nand_buffers - buffer structure for read/write
  * @ecccalc:   buffer for calculated ecc
  * @ecccode:   buffer for ecc read from flash
- * @oobwbuf:   buffer for write oob data
  * @databuf:   buffer for data - dynamically sized
- * @oobrbuf:   buffer to read oob data
  *
  * Do not change the order of buffers. databuf and oobrbuf must be in
  * consecutive order.
@@ -296,9 +300,7 @@ struct nand_ecc_ctrl {
 struct nand_buffers {
        uint8_t ecccalc[NAND_MAX_OOBSIZE];
        uint8_t ecccode[NAND_MAX_OOBSIZE];
-       uint8_t oobwbuf[NAND_MAX_OOBSIZE];
-       uint8_t databuf[NAND_MAX_PAGESIZE];
-       uint8_t oobrbuf[NAND_MAX_OOBSIZE];
+       uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE];
 };
 
 /**
@@ -345,6 +347,7 @@ struct nand_buffers {
  * @chipsize:          [INTERN] the size of one chip for multichip arrays
  * @pagemask:          [INTERN] page number mask = number of (pages / chip) - 1
  * @pagebuf:           [INTERN] holds the pagenumber which is currently in data_buf
+ * @subpagesize:       [INTERN] holds the subpagesize
  * @ecclayout:         [REPLACEABLE] the default ecc placement scheme
  * @bbt:               [INTERN] bad block table pointer
  * @bbt_td:            [REPLACEABLE] bad block table descriptor for flash lookup
@@ -392,6 +395,8 @@ struct nand_chip {
        unsigned long   chipsize;
        int             pagemask;
        int             pagebuf;
+       int             subpagesize;
+       uint8_t         cellinfo;
        int             badblockpos;
 
        nand_state_t    state;
index 6f045b586e768b16d2d9949828a6d6f2d99f5985..f775a7af3890087215ce16504a8da68f513310dd 100644 (file)
@@ -13,6 +13,7 @@
 #define __LINUX_MTD_ONENAND_H
 
 #include <linux/spinlock.h>
+#include <linux/completion.h>
 #include <linux/mtd/onenand_regs.h>
 #include <linux/mtd/bbm.h>
 
@@ -33,7 +34,6 @@ typedef enum {
        FL_WRITING,
        FL_ERASING,
        FL_SYNCING,
-       FL_UNLOCKING,
        FL_LOCKING,
        FL_RESETING,
        FL_OTPING,
@@ -88,6 +88,7 @@ struct onenand_bufferram {
  *                     operation is in progress
  * @state:             [INTERN] the current state of the OneNAND device
  * @page_buf:          data buffer
+ * @subpagesize:       [INTERN] holds the subpagesize
  * @ecclayout:         [REPLACEABLE] the default ecc placement scheme
  * @bbm:               [REPLACEABLE] pointer to Bad Block Management
  * @priv:              [OPTIONAL] pointer to private chip date
@@ -120,11 +121,15 @@ struct onenand_chip {
        int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
        int (*scan_bbt)(struct mtd_info *mtd);
 
+       struct completion       complete;
+       int                     irq;
+
        spinlock_t              chip_lock;
        wait_queue_head_t       wq;
        onenand_state_t         state;
        unsigned char           *page_buf;
 
+       int                     subpagesize;
        struct nand_ecclayout   *ecclayout;
 
        void                    *bbm;
@@ -138,6 +143,7 @@ struct onenand_chip {
 #define ONENAND_CURRENT_BUFFERRAM(this)                (this->bufferram_index)
 #define ONENAND_NEXT_BUFFERRAM(this)           (this->bufferram_index ^ 1)
 #define ONENAND_SET_NEXT_BUFFERRAM(this)       (this->bufferram_index ^= 1)
+#define ONENAND_SET_PREV_BUFFERRAM(this)       (this->bufferram_index ^= 1)
 
 #define ONENAND_GET_SYS_CFG1(this)                                     \
        (this->read_word(this->base + ONENAND_REG_SYS_CFG1))
index 9e409fe6ded6ab76ed7d52507f47870a1bc11bfb..e31c8f5d42712601744823dd22c5f31be157f333 100644 (file)
  * ECC Status Reigser FF00h (R)
  */
 #define ONENAND_ECC_1BIT               (1 << 0)
+#define ONENAND_ECC_1BIT_ALL           (0x5555)
 #define ONENAND_ECC_2BIT               (1 << 1)
 #define ONENAND_ECC_2BIT_ALL           (0xAAAA)
 
index 8c66151821e39429d2404910a93f8f14732648e4..6f8d2d45a8fb502b086757d410482070b8ec1654 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <linux/types.h>
 #include <linux/ioctl.h>
-#include <linux/qic117.h>
 
 /*
  * Structures and definitions for mag tape io control commands
@@ -116,32 +115,6 @@ struct     mtget {
 #define MT_ISFTAPE_UNKNOWN     0x800000 /* obsolete */
 #define MT_ISFTAPE_FLAG        0x800000
 
-struct mt_tape_info {
-       long t_type;            /* device type id (mt_type) */
-       char *t_name;           /* descriptive name */
-};
-
-#define MT_TAPE_INFO   { \
-       {MT_ISUNKNOWN,          "Unknown type of tape device"}, \
-       {MT_ISQIC02,            "Generic QIC-02 tape streamer"}, \
-       {MT_ISWT5150,           "Wangtek 5150, QIC-150"}, \
-       {MT_ISARCHIVE_5945L2,   "Archive 5945L-2"}, \
-       {MT_ISCMSJ500,          "CMS Jumbo 500"}, \
-       {MT_ISTDC3610,          "Tandberg TDC 3610, QIC-24"}, \
-       {MT_ISARCHIVE_VP60I,    "Archive VP60i, QIC-02"}, \
-       {MT_ISARCHIVE_2150L,    "Archive Viper 2150L"}, \
-       {MT_ISARCHIVE_2060L,    "Archive Viper 2060L"}, \
-       {MT_ISARCHIVESC499,     "Archive SC-499 QIC-36 controller"}, \
-       {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \
-       {MT_ISWT5099EEN24,      "Wangtek 5099-een24, 60MB"}, \
-       {MT_ISTEAC_MT2ST,       "Teac MT-2ST 155mb data cassette drive"}, \
-       {MT_ISEVEREX_FT40A,     "Everex FT40A, QIC-40"}, \
-       {MT_ISONSTREAM_SC,      "OnStream SC-, DI-, DP-, or USB tape drive"}, \
-       {MT_ISSCSI1,            "Generic SCSI-1 tape"}, \
-       {MT_ISSCSI2,            "Generic SCSI-2 tape"}, \
-       {0, NULL} \
-}
-
 
 /* structure for MTIOCPOS - mag tape get position command */
 
@@ -150,130 +123,11 @@ struct   mtpos {
 };
 
 
-/*  structure for MTIOCVOLINFO, query information about the volume
- *  currently positioned at (zftape)
- */
-struct mtvolinfo {
-       unsigned int mt_volno;   /* vol-number */
-       unsigned int mt_blksz;   /* blocksize used when recording */
-       unsigned int mt_rawsize; /* raw tape space consumed, in kb */
-       unsigned int mt_size;    /* volume size after decompression, in kb */
-       unsigned int mt_cmpr:1;  /* this volume has been compressed */
-};
-
-/* raw access to a floppy drive, read and write an arbitrary segment.
- * For ftape/zftape to support formatting etc.
- */
-#define MT_FT_RD_SINGLE  0
-#define MT_FT_RD_AHEAD   1
-#define MT_FT_WR_ASYNC   0 /* start tape only when all buffers are full     */
-#define MT_FT_WR_MULTI   1 /* start tape, continue until buffers are empty  */
-#define MT_FT_WR_SINGLE  2 /* write a single segment and stop afterwards    */
-#define MT_FT_WR_DELETE  3 /* write deleted data marks, one segment at time */
-
-struct mtftseg
-{            
-       unsigned mt_segno;   /* the segment to read or write */
-       unsigned mt_mode;    /* modes for read/write (sync/async etc.) */
-       int      mt_result;  /* result of r/w request, not of the ioctl */
-       void    __user *mt_data;    /* User space buffer: must be 29kb */
-};
-
-/* get tape capacity (ftape/zftape)
- */
-struct mttapesize {
-       unsigned long mt_capacity; /* entire, uncompressed capacity 
-                                   * of a cartridge
-                                   */
-       unsigned long mt_used;     /* what has been used so far, raw 
-                                   * uncompressed amount
-                                   */
-};
-
-/*  possible values of the ftfmt_op field
- */
-#define FTFMT_SET_PARMS                1 /* set software parms */
-#define FTFMT_GET_PARMS                2 /* get software parms */
-#define FTFMT_FORMAT_TRACK     3 /* start formatting a tape track   */
-#define FTFMT_STATUS           4 /* monitor formatting a tape track */
-#define FTFMT_VERIFY           5 /* verify the given segment        */
-
-struct ftfmtparms {
-       unsigned char  ft_qicstd;   /* QIC-40/QIC-80/QIC-3010/QIC-3020 */
-       unsigned char  ft_fmtcode;  /* Refer to the QIC specs */
-       unsigned char  ft_fhm;      /* floppy head max */
-       unsigned char  ft_ftm;      /* floppy track max */
-       unsigned short ft_spt;      /* segments per track */
-       unsigned short ft_tpc;      /* tracks per cartridge */
-};
-
-struct ftfmttrack {
-       unsigned int  ft_track;   /* track to format */
-       unsigned char ft_gap3;    /* size of gap3, for FORMAT_TRK */
-};
-
-struct ftfmtstatus {
-       unsigned int  ft_segment;  /* segment currently being formatted */
-};
-
-struct ftfmtverify {
-       unsigned int  ft_segment;   /* segment to verify */
-       unsigned long ft_bsm;       /* bsm as result of VERIFY cmd */
-};
-
-struct mtftformat {
-       unsigned int fmt_op;      /* operation to perform */
-       union fmt_arg {
-               struct ftfmtparms  fmt_parms;  /* format parameters */
-               struct ftfmttrack  fmt_track;  /* ctrl while formatting */
-               struct ftfmtstatus fmt_status;
-               struct ftfmtverify fmt_verify; /* for verifying */ 
-       } fmt_arg;
-};
-
-struct mtftcmd {
-       unsigned int ft_wait_before; /* timeout to wait for drive to get ready 
-                                     * before command is sent. Milliseconds
-                                     */
-       qic117_cmd_t ft_cmd;         /* command to send */
-       unsigned char ft_parm_cnt;   /* zero: no parm is sent. */
-       unsigned char ft_parms[3];   /* parameter(s) to send to
-                                     * the drive. The parms are nibbles
-                                     * driver sends cmd + 2 step pulses */
-       unsigned int ft_result_bits; /* if non zero, number of bits
-                                     * returned by the tape drive
-                                     */
-       unsigned int ft_result;      /* the result returned by the tape drive*/
-       unsigned int ft_wait_after;  /* timeout to wait for drive to get ready
-                                     * after command is sent. 0: don't wait */
-       int ft_status;               /* status returned by ready wait
-                                     * undefined if timeout was 0.
-                                     */
-       int ft_error;                /* error code if error status was set by 
-                                     * command
-                                     */
-};
-
 /* mag tape io control commands */
 #define        MTIOCTOP        _IOW('m', 1, struct mtop)       /* do a mag tape op */
 #define        MTIOCGET        _IOR('m', 2, struct mtget)      /* get tape status */
 #define        MTIOCPOS        _IOR('m', 3, struct mtpos)      /* get tape position */
 
-/* The next two are used by the QIC-02 driver for runtime reconfiguration.
- * See tpqic02.h for struct mtconfiginfo.
- */
-#define        MTIOCGETCONFIG  _IOR('m', 4, struct mtconfiginfo) /* get tape config */
-#define        MTIOCSETCONFIG  _IOW('m', 5, struct mtconfiginfo) /* set tape config */
-
-/* the next six are used by the floppy ftape drivers and its frontends
- * sorry, but MTIOCTOP commands are write only.
- */
-#define        MTIOCRDFTSEG    _IOWR('m', 6, struct mtftseg)  /* read a segment */
-#define        MTIOCWRFTSEG    _IOWR('m', 7, struct mtftseg)   /* write a segment */
-#define MTIOCVOLINFO   _IOR('m',  8, struct mtvolinfo) /* info about volume */
-#define MTIOCGETSIZE    _IOR('m',  9, struct mttapesize)/* get cartridge size*/
-#define MTIOCFTFORMAT   _IOWR('m', 10, struct mtftformat) /* format ftape */
-#define MTIOCFTCMD     _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */
 
 /* Generic Mag Tape (device independent) status macros for examining
  * mt_gstat -- HP-UX compatible.
index 4f06dad0bde90d5f6de514adb2d2825e3c4ad861..98d566c5e32ac362fb5be6a0554d3d318332b534 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/netfilter/x_tables.h>
 
 #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
-#define IPT_TABLE_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
 #define ipt_match xt_match
 #define ipt_target xt_target
 #define ipt_table xt_table
index 04963063e6200023dd0524f023b30f4973317df1..c5d4084773e8bf321ddba31e1370bfe0ae7cce64 100644 (file)
@@ -308,6 +308,7 @@ extern int nfs_attribute_timeout(struct inode *inode);
 extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
 extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
 extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
+extern int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping);
 extern int nfs_setattr(struct dentry *, struct iattr *);
 extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
 extern void nfs_begin_attr_update(struct inode *);
diff --git a/include/linux/qic117.h b/include/linux/qic117.h
deleted file mode 100644 (file)
index 07b537e..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-#ifndef _QIC117_H
-#define _QIC117_H
-
-/*
- *      Copyright (C) 1993-1996 Bas Laarhoven,
- *                (C) 1997      Claus-Justus Heine.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING.  If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- *
- * $Source: /homes/cvs/ftape-stacked/include/linux/qic117.h,v $
- * $Revision: 1.2 $
- * $Date: 1997/10/05 19:19:32 $
- *
- *      This file contains QIC-117 spec. related definitions for the
- *      QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux.
- *
- *      These data were taken from the Quarter-Inch Cartridge
- *      Drive Standards, Inc. document titled:
- *      `Common Command Set Interface Specification for Flexible
- *       Disk Controller Based Minicartridge Tape Drives'
- *       document QIC-117 Revision J, 28 Aug 96.
- *      For more information, contact:
- *       Quarter-Inch Cartridge Drive Standards, Inc.
- *       311 East Carrillo Street
- *       Santa Barbara, California 93101
- *       Telephone (805) 963-3853
- *       Fax       (805) 962-1541
- *       WWW       http://www.qic.org
- *
- *      Current QIC standard revisions (of interest) are:
- *       QIC-40-MC,   Rev. M,  2 Sep 92.
- *       QIC-80-MC,   Rev. N, 20 Mar 96.
- *       QIC-80-MC,   Rev. K, 15 Dec 94.
- *       QIC-113,     Rev. G, 15 Jun 95.
- *       QIC-117,     Rev. J, 28 Aug 96.
- *       QIC-122,     Rev. B,  6 Mar 91.
- *       QIC-130,     Rev. C,  2 Sep 92.
- *       QIC-3010-MC, Rev. F, 14 Jun 95.
- *       QIC-3020-MC, Rev. G, 31 Aug 95.
- *       QIC-CRF3,    Rev. B, 15 Jun 95.
- * */
-
-/*
- *      QIC-117 common command set rev. J.
- *      These commands are sent to the tape unit
- *      as number of pulses over the step line.
- */
-
-typedef enum {
-       QIC_NO_COMMAND                  = 0,
-       QIC_RESET                       = 1,
-       QIC_REPORT_NEXT_BIT             = 2,
-       QIC_PAUSE                       = 3,
-       QIC_MICRO_STEP_PAUSE            = 4,
-       QIC_ALTERNATE_TIMEOUT           = 5,
-       QIC_REPORT_DRIVE_STATUS         = 6,
-       QIC_REPORT_ERROR_CODE           = 7,
-       QIC_REPORT_DRIVE_CONFIGURATION  = 8,
-       QIC_REPORT_ROM_VERSION          = 9,
-       QIC_LOGICAL_FORWARD             = 10,
-       QIC_PHYSICAL_REVERSE            = 11,
-       QIC_PHYSICAL_FORWARD            = 12,
-       QIC_SEEK_HEAD_TO_TRACK          = 13,
-       QIC_SEEK_LOAD_POINT             = 14,
-       QIC_ENTER_FORMAT_MODE           = 15,
-       QIC_WRITE_REFERENCE_BURST       = 16,
-       QIC_ENTER_VERIFY_MODE           = 17,
-       QIC_STOP_TAPE                   = 18,
-/* commands 19-20: reserved */
-       QIC_MICRO_STEP_HEAD_UP          = 21,
-       QIC_MICRO_STEP_HEAD_DOWN        = 22,
-       QIC_SOFT_SELECT                 = 23,
-       QIC_SOFT_DESELECT               = 24,
-       QIC_SKIP_REVERSE                = 25,
-       QIC_SKIP_FORWARD                = 26,
-       QIC_SELECT_RATE                 = 27,
-/* command 27, in ccs2: Select Rate or Format */
-       QIC_ENTER_DIAGNOSTIC_1          = 28,
-       QIC_ENTER_DIAGNOSTIC_2          = 29,
-       QIC_ENTER_PRIMARY_MODE          = 30,
-/* command 31: vendor unique */
-       QIC_REPORT_VENDOR_ID            = 32,
-       QIC_REPORT_TAPE_STATUS          = 33,
-       QIC_SKIP_EXTENDED_REVERSE       = 34,
-       QIC_SKIP_EXTENDED_FORWARD       = 35,
-       QIC_CALIBRATE_TAPE_LENGTH       = 36,
-       QIC_REPORT_FORMAT_SEGMENTS      = 37,
-       QIC_SET_FORMAT_SEGMENTS         = 38,
-/* commands 39-45: reserved */
-       QIC_PHANTOM_SELECT              = 46,
-       QIC_PHANTOM_DESELECT            = 47
-} qic117_cmd_t;
-
-typedef enum {
-       discretional = 0, required, ccs1, ccs2
-} qic_compatibility;
-
-typedef enum {
-       unused, mode, motion, report
-} command_types;
-
-struct qic117_command_table {
-       char *name;
-       __u8 mask;
-       __u8 state;
-       __u8 cmd_type;
-       __u8 non_intr;
-       __u8 level;
-};
-
-#define QIC117_COMMANDS {\
-/* command                           mask  state cmd_type           */\
-/* |    name                         |     |     |       non_intr   */\
-/* |    |                            |     |     |       |  level   */\
-/* 0*/ {NULL,                        0x00, 0x00, mode,   0, discretional},\
-/* 1*/ {"soft reset",                0x00, 0x00, motion, 1, required},\
-/* 2*/ {"report next bit",           0x00, 0x00, report, 0, required},\
-/* 3*/ {"pause",                     0x36, 0x24, motion, 1, required},\
-/* 4*/ {"micro step pause",          0x36, 0x24, motion, 1, required},\
-/* 5*/ {"alternate command timeout", 0x00, 0x00, mode,   0, required},\
-/* 6*/ {"report drive status",       0x00, 0x00, report, 0, required},\
-/* 7*/ {"report error code",         0x01, 0x01, report, 0, required},\
-/* 8*/ {"report drive configuration",0x00, 0x00, report, 0, required},\
-/* 9*/ {"report rom version",        0x00, 0x00, report, 0, required},\
-/*10*/ {"logical forward",           0x37, 0x25, motion, 0, required},\
-/*11*/ {"physical reverse",          0x17, 0x05, motion, 0, required},\
-/*12*/ {"physical forward",          0x17, 0x05, motion, 0, required},\
-/*13*/ {"seek head to track",        0x37, 0x25, motion, 0, required},\
-/*14*/ {"seek load point",           0x17, 0x05, motion, 1, required},\
-/*15*/ {"enter format mode",         0x1f, 0x05, mode,   0, required},\
-/*16*/ {"write reference burst",     0x1f, 0x05, motion, 1, required},\
-/*17*/ {"enter verify mode",         0x37, 0x25, mode,   0, required},\
-/*18*/ {"stop tape",                 0x00, 0x00, motion, 1, required},\
-/*19*/ {"reserved (19)",             0x00, 0x00, unused, 0, discretional},\
-/*20*/ {"reserved (20)",             0x00, 0x00, unused, 0, discretional},\
-/*21*/ {"micro step head up",        0x02, 0x00, motion, 0, required},\
-/*22*/ {"micro step head down",      0x02, 0x00, motion, 0, required},\
-/*23*/ {"soft select",               0x00, 0x00, mode,   0, discretional},\
-/*24*/ {"soft deselect",             0x00, 0x00, mode,   0, discretional},\
-/*25*/ {"skip segments reverse",     0x36, 0x24, motion, 1, required},\
-/*26*/ {"skip segments forward",     0x36, 0x24, motion, 1, required},\
-/*27*/ {"select rate or format",     0x03, 0x01, mode,   0, required /* [ccs2] */},\
-/*28*/ {"enter diag mode 1",         0x00, 0x00, mode,   0, discretional},\
-/*29*/ {"enter diag mode 2",         0x00, 0x00, mode,   0, discretional},\
-/*30*/ {"enter primary mode",        0x00, 0x00, mode,   0, required},\
-/*31*/ {"vendor unique (31)",        0x00, 0x00, unused, 0, discretional},\
-/*32*/ {"report vendor id",          0x00, 0x00, report, 0, required},\
-/*33*/ {"report tape status",        0x04, 0x04, report, 0, ccs1},\
-/*34*/ {"skip extended reverse",     0x36, 0x24, motion, 1, ccs1},\
-/*35*/ {"skip extended forward",     0x36, 0x24, motion, 1, ccs1},\
-/*36*/ {"calibrate tape length",     0x17, 0x05, motion, 1, ccs2},\
-/*37*/ {"report format segments",    0x17, 0x05, report, 0, ccs2},\
-/*38*/ {"set format segments",       0x17, 0x05, mode,   0, ccs2},\
-/*39*/ {"reserved (39)",             0x00, 0x00, unused, 0, discretional},\
-/*40*/ {"vendor unique (40)",        0x00, 0x00, unused, 0, discretional},\
-/*41*/ {"vendor unique (41)",        0x00, 0x00, unused, 0, discretional},\
-/*42*/ {"vendor unique (42)",        0x00, 0x00, unused, 0, discretional},\
-/*43*/ {"vendor unique (43)",        0x00, 0x00, unused, 0, discretional},\
-/*44*/ {"vendor unique (44)",        0x00, 0x00, unused, 0, discretional},\
-/*45*/ {"vendor unique (45)",        0x00, 0x00, unused, 0, discretional},\
-/*46*/ {"phantom select",            0x00, 0x00, mode,   0, discretional},\
-/*47*/ {"phantom deselect",          0x00, 0x00, mode,   0, discretional},\
-}
-
-/*
- *      Status bits returned by QIC_REPORT_DRIVE_STATUS
- */
-
-#define QIC_STATUS_READY       0x01    /* Drive is ready or idle. */
-#define QIC_STATUS_ERROR       0x02    /* Error detected, must read
-                                          error code to clear this */
-#define QIC_STATUS_CARTRIDGE_PRESENT 0x04      /* Tape is present */
-#define QIC_STATUS_WRITE_PROTECT 0x08  /* Tape is write protected */
-#define QIC_STATUS_NEW_CARTRIDGE 0x10  /* New cartridge inserted, must
-                                          read error status to clear. */
-#define QIC_STATUS_REFERENCED  0x20    /* Cartridge appears to have been
-                                          formatted. */
-#define QIC_STATUS_AT_BOT      0x40    /* Cartridge is at physical
-                                          beginning of tape. */
-#define QIC_STATUS_AT_EOT      0x80    /* Cartridge is at physical end
-                                          of tape. */
-/*
- *      Status bits returned by QIC_REPORT_DRIVE_CONFIGURATION
- */
-
-#define QIC_CONFIG_RATE_MASK   0x18
-#define QIC_CONFIG_RATE_SHIFT  3
-#define QIC_CONFIG_RATE_250    0
-#define QIC_CONFIG_RATE_500    2
-#define QIC_CONFIG_RATE_1000   3
-#define QIC_CONFIG_RATE_2000   1
-#define QIC_CONFIG_RATE_4000    0       /* since QIC-117 Rev. J */
-
-#define QIC_CONFIG_LONG                0x40    /* Extra Length Tape Detected */
-#define QIC_CONFIG_80          0x80    /* QIC-80 detected. */
-
-/*
- *      Status bits returned by QIC_REPORT_TAPE_STATUS
- */
-
-#define QIC_TAPE_STD_MASK       0x0f
-#define QIC_TAPE_QIC40         0x01
-#define QIC_TAPE_QIC80         0x02
-#define QIC_TAPE_QIC3020       0x03
-#define QIC_TAPE_QIC3010       0x04
-
-#define QIC_TAPE_LEN_MASK      0x70
-#define QIC_TAPE_205FT         0x10
-#define QIC_TAPE_307FT         0x20
-#define QIC_TAPE_VARIABLE      0x30
-#define QIC_TAPE_1100FT                0x40
-#define QIC_TAPE_FLEX          0x60
-
-#define QIC_TAPE_WIDE          0x80
-
-/* Define a value (in feet) slightly higher than 
- * the possible maximum tape length.
- */
-#define QIC_TOP_TAPE_LEN       1500
-
-/*
- *      Errors: List of error codes, and their severity.
- */
-
-typedef struct {
-       char *message;          /* Text describing the error. */
-       unsigned int fatal:1;   /* Non-zero if the error is fatal. */
-} ftape_error;
-
-#define QIC117_ERRORS {\
-  /* 0*/ { "No error", 0, },\
-  /* 1*/ { "Command Received while Drive Not Ready", 0, },\
-  /* 2*/ { "Cartridge Not Present or Removed", 1, },\
-  /* 3*/ { "Motor Speed Error (not within 1%)", 1, },\
-  /* 4*/ { "Motor Speed Fault (jammed, or gross speed error", 1, },\
-  /* 5*/ { "Cartridge Write Protected", 1, },\
-  /* 6*/ { "Undefined or Reserved Command Code", 1, },\
-  /* 7*/ { "Illegal Track Address Specified for Seek", 1, },\
-  /* 8*/ { "Illegal Command in Report Subcontext", 0, },\
-  /* 9*/ { "Illegal Entry into a Diagnostic Mode", 1, },\
-  /*10*/ { "Broken Tape Detected (based on hole sensor)", 1, },\
-  /*11*/ { "Warning--Read Gain Setting Error", 1, },\
-  /*12*/ { "Command Received While Error Status Pending (obs)", 1, },\
-  /*13*/ { "Command Received While New Cartridge Pending", 1, },\
-  /*14*/ { "Command Illegal or Undefined in Primary Mode", 1, },\
-  /*15*/ { "Command Illegal or Undefined in Format Mode", 1, },\
-  /*16*/ { "Command Illegal or Undefined in Verify Mode", 1, },\
-  /*17*/ { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, },\
-  /*18*/ { "Logical EOT Before All Segments generated", 1, },\
-  /*19*/ { "Command Illegal When Cartridge Not Referenced", 1, },\
-  /*20*/ { "Self-Diagnostic Failed (cannot be cleared)", 1, },\
-  /*21*/ { "Warning EEPROM Not Initialized, Defaults Set", 1, },\
-  /*22*/ { "EEPROM Corrupted or Hardware Failure", 1, },\
-  /*23*/ { "Motion Time-out Error", 1, },\
-  /*24*/ { "Data Segment Too Long -- Logical Forward or Pause", 1, },\
-  /*25*/ { "Transmit Overrun (obs)", 1, },\
-  /*26*/ { "Power On Reset Occurred", 0, },\
-  /*27*/ { "Software Reset Occurred", 0, },\
-  /*28*/ { "Diagnostic Mode 1 Error", 1, },\
-  /*29*/ { "Diagnostic Mode 2 Error", 1, },\
-  /*30*/ { "Command Received During Non-Interruptible Process", 1, },\
-  /*31*/ { "Rate or Format Selection Error", 1, },\
-  /*32*/ { "Illegal Command While in High Speed Mode", 1, },\
-  /*33*/ { "Illegal Seek Segment Value", 1, },\
-  /*34*/ { "Invalid Media", 1, },\
-  /*35*/ { "Head Positioning Failure", 1, },\
-  /*36*/ { "Write Reference Burst Failure", 1, },\
-  /*37*/ { "Prom Code Missing", 1, },\
-  /*38*/ { "Invalid Format", 1, },\
-  /*39*/ { "EOT/BOT System Failure", 1, },\
-  /*40*/ { "Prom A Checksum Error", 1, },\
-  /*41*/ { "Drive Wakeup Reset Occurred", 1, },\
-  /*42*/ { "Prom B Checksum Error", 1, },\
-  /*43*/ { "Illegal Entry into Format Mode", 1, },\
-}
-
-#endif                         /* _QIC117_H */
index 5b3b297aa2c5b647294e69ac0090cef6c0deeb16..ce3663fb0101dca7513183833b474424f4d10c54 100644 (file)
@@ -25,6 +25,7 @@ typedef enum {
        i_link_saved_truncate_mask = 0x0020,
        i_has_xattr_dir = 0x0040,
        i_data_log = 0x0080,
+       i_ever_mapped = 0x0100
 } reiserfs_inode_flags;
 
 struct reiserfs_inode_info {
@@ -52,6 +53,7 @@ struct reiserfs_inode_info {
         ** flushed */
        unsigned long i_trans_id;
        struct reiserfs_journal_list *i_jl;
+       struct mutex i_mmap;
 #ifdef CONFIG_REISERFS_FS_POSIX_ACL
        struct posix_acl *i_acl_access;
        struct posix_acl *i_acl_default;
index 97c761652581a722b7872bab49445e37521a8ea7..8b6ce60ea0578f0284e74029f507b8f224831e85 100644 (file)
@@ -250,7 +250,6 @@ void                rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt,
                                int flags, const struct rpc_call_ops *ops,
                                void *data);
 void           rpc_put_task(struct rpc_task *);
-void           rpc_release_task(struct rpc_task *);
 void           rpc_exit_task(struct rpc_task *);
 void           rpc_release_calldata(const struct rpc_call_ops *, void *);
 void           rpc_killall_tasks(struct rpc_clnt *);
index 5cb380a559fd51f379bef2b2c63462737c2ac646..d94e2683be52a623d9947e8aed54e570cff47c44 100644 (file)
@@ -662,6 +662,15 @@ typedef __u64 v4l2_std_id;
 #define V4L2_STD_ATSC_8_VSB     ((v4l2_std_id)0x01000000)
 #define V4L2_STD_ATSC_16_VSB    ((v4l2_std_id)0x02000000)
 
+/* FIXME:
+   Although std_id is 64 bits, there is an issue on PPC32 architecture that
+   makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
+   this value to 32 bits.
+   As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide),
+   it should work fine. However, if needed to add more than two standards,
+   v4l2-common.c should be fixed.
+ */
+
 /* some merged standards */
 #define V4L2_STD_MN    (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)
 #define V4L2_STD_B     (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)
index b9ce5c80d9d5cc83087593f25b6e186ffdebb75d..6f84c1f7fcd43188e239cf46cd134cf5dc491466 100644 (file)
@@ -6,6 +6,7 @@
 #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE)
 
 #include <linux/netfilter_ipv4/ip_conntrack.h>
+#include <linux/socket.h>
 
 #ifdef CONFIG_IP_NF_CONNTRACK_MARK
 static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb,
index 3269ed1cc22202a0859aac5b432f97ad0d6640f2..73cb9943c8a887ef8afb61b59e243ce858427599 100644 (file)
@@ -134,6 +134,7 @@ sctp_state_fn_t sctp_sf_violation;
 sctp_state_fn_t sctp_sf_discard_chunk;
 sctp_state_fn_t sctp_sf_do_5_2_1_siminit;
 sctp_state_fn_t sctp_sf_do_5_2_2_dupinit;
+sctp_state_fn_t sctp_sf_do_5_2_3_initack;
 sctp_state_fn_t sctp_sf_do_5_2_4_dupcook;
 sctp_state_fn_t sctp_sf_unk_chunk;
 sctp_state_fn_t sctp_sf_do_8_5_1_E_sa;
index 6d16bb6de7d296889b015b8ab6c8d480d2c14aa4..f8e10a25ad7d9ece3f9e409eb3859ba282faed73 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -279,7 +279,7 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
        if (size < SHMMIN || size > ns->shm_ctlmax)
                return -EINVAL;
 
-       if (ns->shm_tot + numpages >= ns->shm_ctlall)
+       if (ns->shm_tot + numpages > ns->shm_ctlall)
                return -ENOSPC;
 
        shp = ipc_rcu_alloc(sizeof(*shp));
index b385878c6e807924efbf432644f506297d28097a..8b961adc3bd2d8f27cc14b2b0701e93522e2c232 100644 (file)
@@ -315,6 +315,9 @@ int setup_irq(unsigned int irq, struct irqaction *new)
                        /* Undo nested disables: */
                        desc->depth = 1;
        }
+       /* Reset broken irq detection when installing new handler */
+       desc->irq_count = 0;
+       desc->irqs_unhandled = 0;
        spin_unlock_irqrestore(&desc->lock, flags);
 
        new->irq = irq;
index a6574a18514e9686baf9d6b77f7a6cd3f6c57ca1..d6579d511069130980196be79005f2724a01b8d3 100644 (file)
@@ -331,7 +331,6 @@ out:
        local_irq_restore(flags);
        put_cpu();
 }
-EXPORT_SYMBOL_GPL(profile_hits);
 
 static int __devinit profile_cpu_callback(struct notifier_block *info,
                                        unsigned long action, void *__cpu)
@@ -401,6 +400,8 @@ void profile_hits(int type, void *__pc, unsigned int nr_hits)
 }
 #endif /* !CONFIG_SMP */
 
+EXPORT_SYMBOL_GPL(profile_hits);
+
 void profile_tick(int type)
 {
        struct pt_regs *regs = get_irq_regs();
index c7675c1bfdf24e8c9d45b22e67da5c5679ba662b..6e2101dec0fcfc9e95c52a1ac53bc6898b976edf 100644 (file)
@@ -323,11 +323,18 @@ EXPORT_SYMBOL_GPL(blocking_notifier_chain_unregister);
 int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
                unsigned long val, void *v)
 {
-       int ret;
+       int ret = NOTIFY_DONE;
 
-       down_read(&nh->rwsem);
-       ret = notifier_call_chain(&nh->head, val, v);
-       up_read(&nh->rwsem);
+       /*
+        * We check the head outside the lock, but if this access is
+        * racy then it does not matter what the result of the test
+        * is, we re-check the list after having taken the lock anyway:
+        */
+       if (rcu_dereference(nh->head)) {
+               down_read(&nh->rwsem);
+               ret = notifier_call_chain(&nh->head, val, v);
+               up_read(&nh->rwsem);
+       }
        return ret;
 }
 
index da9463946556311e9e0945583fd76cdd432298e5..c2aec0e1090d03d540dc43d5b35388b044679c81 100644 (file)
@@ -884,6 +884,10 @@ asmlinkage long sys_mbind(unsigned long start, unsigned long len,
        err = get_nodes(&nodes, nmask, maxnode);
        if (err)
                return err;
+#ifdef CONFIG_CPUSETS
+       /* Restrict the nodes to the allowed nodes in the cpuset */
+       nodes_and(nodes, nodes, current->mems_allowed);
+#endif
        return do_mbind(start, len, mode, &nodes, flags);
 }
 
index 29a8fa4d3728bf7e097fd713007e988b1413b2aa..f8c25d5001558dd777868454bd4d7681dd878039 100644 (file)
@@ -585,6 +585,12 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_
                goto done;
        }
 
+       if (la->l2_psm > 0 && btohs(la->l2_psm) < 0x1001 &&
+                               !capable(CAP_NET_BIND_SERVICE)) {
+               err = -EACCES;
+               goto done;
+       }
+               
        write_lock_bh(&l2cap_sk_list.lock);
 
        if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) {
@@ -2150,8 +2156,8 @@ static ssize_t l2cap_sysfs_show(struct class *dev, char *buf)
 
                str += sprintf(str, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d 0x%x\n",
                                batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
-                               sk->sk_state, pi->psm, pi->scid, pi->dcid, pi->imtu,
-                               pi->omtu, pi->link_mode);
+                               sk->sk_state, btohs(pi->psm), pi->scid, pi->dcid,
+                               pi->imtu, pi->omtu, pi->link_mode);
        }
 
        read_unlock_bh(&l2cap_sk_list.lock);
index d137f971f97db39c702533d54550b68783550364..5d25697920b1ae183fe83e627044c601cb845632 100644 (file)
@@ -231,22 +231,16 @@ nocache:
 
                err = resolver(key, family, dir, &obj, &obj_ref);
 
-               if (fle) {
-                       if (err) {
-                               /* Force security policy check on next lookup */
-                               *head = fle->next;
-                               flow_entry_kill(cpu, fle);
-                       } else {
-                               fle->genid = atomic_read(&flow_cache_genid);
-
-                               if (fle->object)
-                                       atomic_dec(fle->object_ref);
-
-                               fle->object = obj;
-                               fle->object_ref = obj_ref;
-                               if (obj)
-                                       atomic_inc(fle->object_ref);
-                       }
+               if (fle && !err) {
+                       fle->genid = atomic_read(&flow_cache_genid);
+
+                       if (fle->object)
+                               atomic_dec(fle->object_ref);
+
+                       fle->object = obj;
+                       fle->object_ref = obj_ref;
+                       if (obj)
+                               atomic_inc(fle->object_ref);
                }
                local_bh_enable();
 
index 5fcf91d617cd44e66a59559b31636c144307a6ac..6f31fad9be13854731486737b30311c4b4f2e1a2 100644 (file)
@@ -959,7 +959,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
        if (cda[CTA_PROTOINFO-1]) {
                err = ctnetlink_change_protoinfo(ct, cda);
                if (err < 0)
-                       return err;
+                       goto err;
        }
 
 #if defined(CONFIG_IP_NF_CONNTRACK_MARK)
index c701f6abbfc14a3ab05ba52c7469dc8cb5875df8..5c16e24a6061ab772588b928aae2a24a15990482 100644 (file)
@@ -4420,9 +4420,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
                         * But, this leaves one open to an easy denial of
                         * service attack, and SYN cookies can't defend
                         * against this problem. So, we drop the data
-                        * in the interest of security over speed.
+                        * in the interest of security over speed unless
+                        * it's still in use.
                         */
-                       goto discard;
+                       kfree_skb(skb);
+                       return 0;
                }
                goto discard;
 
index 32c1a972fa3141d84480f69cf2a9a181cedec502..23e32c806916bd06eb30c6f55e6cbc3bc0d51554 100644 (file)
@@ -1650,7 +1650,8 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
 
                memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
 
-               skb->ip_summed = next_skb->ip_summed;
+               if (next_skb->ip_summed == CHECKSUM_PARTIAL)
+                       skb->ip_summed = CHECKSUM_PARTIAL;
 
                if (skb->ip_summed != CHECKSUM_PARTIAL)
                        skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size);
index f230eeecf09289eaabcb6125af5129ae0fb57cc0..41c157848181f2e8bdc5104f9b01992d81bc16a9 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <net/tcp.h>
 
-MODULE_AUTHOR("Stephen Hemminger <shemminger@osdl.org>");
+MODULE_AUTHOR("Stephen Hemminger <shemminger@linux-foundation.org>");
 MODULE_DESCRIPTION("TCP cwnd snooper");
 MODULE_LICENSE("GPL");
 
index 171e5b55d7d65aa973183b5b8c5d9ed6d311c6d6..2a7e4618f526888cc30b0e013b5aeffc591aa4eb 100644 (file)
@@ -341,6 +341,7 @@ void in6_dev_finish_destroy(struct inet6_dev *idev)
 static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
 {
        struct inet6_dev *ndev;
+       struct in6_addr maddr;
 
        ASSERT_RTNL();
 
@@ -425,6 +426,11 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
 #endif
        /* protected by rtnl_lock */
        rcu_assign_pointer(dev->ip6_ptr, ndev);
+
+       /* Join all-node multicast group */
+       ipv6_addr_all_nodes(&maddr);
+       ipv6_dev_mc_inc(dev, &maddr);
+
        return ndev;
 }
 
index a1c231a04ac2dfa10088a0b2df558f62dbf32635..882cde4b404754c97089e573981eb9ce17e74d4b 100644 (file)
@@ -2258,8 +2258,6 @@ void ipv6_mc_up(struct inet6_dev *idev)
 
 void ipv6_mc_init_dev(struct inet6_dev *idev)
 {
-       struct in6_addr maddr;
-
        write_lock_bh(&idev->lock);
        rwlock_init(&idev->mc_lock);
        idev->mc_gq_running = 0;
@@ -2275,10 +2273,6 @@ void ipv6_mc_init_dev(struct inet6_dev *idev)
        idev->mc_maxdelay = IGMP6_UNSOLICITED_IVAL;
        idev->mc_v1_seen = 0;
        write_unlock_bh(&idev->lock);
-
-       /* Add all-nodes address. */
-       ipv6_addr_all_nodes(&maddr);
-       ipv6_dev_mc_inc(idev->dev, &maddr);
 }
 
 /*
index 8c3d56871b50aa2f7252e4fb7b58b9796c55c428..5f0043c30b70477c423a629a591899543e084415 100644 (file)
@@ -2017,6 +2017,7 @@ static inline size_t rt6_nlmsg_size(void)
               + nla_total_size(4) /* RTA_IIF */
               + nla_total_size(4) /* RTA_OIF */
               + nla_total_size(4) /* RTA_PRIORITY */
+              + RTAX_MAX * nla_total_size(4) /* RTA_METRICS */
               + nla_total_size(sizeof(struct rta_cacheinfo));
 }
 
index bd1d2de75e459deba86c0fcdcfd62cbbbc2364cc..811e3e782f0f2f36c4257ed778e1301172579a7c 100644 (file)
@@ -981,7 +981,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
        if (cda[CTA_PROTOINFO-1]) {
                err = ctnetlink_change_protoinfo(ct, cda);
                if (err < 0)
-                       return err;
+                       goto err;
        }
 
 #if defined(CONFIG_NF_CONNTRACK_MARK)
index 167d888d1df263f29ee3734ba4ee6864931b70f6..0b1ddb1005acf3ba451faa15bf0ff8237f211a1f 100644 (file)
@@ -1562,7 +1562,7 @@ static int sctp_process_missing_param(const struct sctp_association *asoc,
        if (*errp) {
                report.num_missing = htonl(1);
                report.type = paramtype;
-               sctp_init_cause(*errp, SCTP_ERROR_INV_PARAM,
+               sctp_init_cause(*errp, SCTP_ERROR_MISS_PARAM,
                                &report, sizeof(report));
        }
 
@@ -1775,7 +1775,9 @@ int sctp_verify_init(const struct sctp_association *asoc,
 
        /* Verify stream values are non-zero. */
        if ((0 == peer_init->init_hdr.num_outbound_streams) ||
-           (0 == peer_init->init_hdr.num_inbound_streams)) {
+           (0 == peer_init->init_hdr.num_inbound_streams) ||
+           (0 == peer_init->init_hdr.init_tag) ||
+           (SCTP_DEFAULT_MINWINDOW > ntohl(peer_init->init_hdr.a_rwnd))) {
 
                sctp_process_inv_mandatory(asoc, chunk, errp);
                return 0;
index 7bbc6156e45509efb5bc5b0f5f7aff228f6a7927..8bd30976cdee767fbeb5e1eef3b693cc6bdc0025 100644 (file)
@@ -217,7 +217,7 @@ static int sctp_gen_sack(struct sctp_association *asoc, int force,
 
                asoc->peer.sack_needed = 0;
 
-               error = sctp_outq_tail(&asoc->outqueue, sack);
+               sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(sack));
 
                /* Stop the SACK timer.  */
                sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
index aa51d190bfb2cbaddd3e3a5c907b3a14110d5c66..fbbc9e6a3b787bc8209a3c036bb3be7995813068 100644 (file)
@@ -440,7 +440,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
 {
        struct sctp_chunk *chunk = arg;
        sctp_init_chunk_t *initchunk;
-       __u32 init_tag;
        struct sctp_chunk *err_chunk;
        struct sctp_packet *packet;
        sctp_error_t error;
@@ -462,24 +461,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
        /* Grab the INIT header.  */
        chunk->subh.init_hdr = (sctp_inithdr_t *) chunk->skb->data;
 
-       init_tag = ntohl(chunk->subh.init_hdr->init_tag);
-
-       /* Verification Tag: 3.3.3
-        *   If the value of the Initiate Tag in a received INIT ACK
-        *   chunk is found to be 0, the receiver MUST treat it as an
-        *   error and close the association by transmitting an ABORT.
-        */
-       if (!init_tag) {
-               struct sctp_chunk *reply = sctp_make_abort(asoc, chunk, 0);
-               if (!reply)
-                       goto nomem;
-
-               sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(reply));
-               return sctp_stop_t1_and_abort(commands, SCTP_ERROR_INV_PARAM,
-                                             ECONNREFUSED, asoc,
-                                             chunk->transport);
-       }
-
        /* Verify the INIT chunk before processing it. */
        err_chunk = NULL;
        if (!sctp_verify_init(asoc, chunk->chunk_hdr->type,
@@ -550,9 +531,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep,
                        SCTP_CHUNK(err_chunk));
 
        return SCTP_DISPOSITION_CONSUME;
-
-nomem:
-       return SCTP_DISPOSITION_NOMEM;
 }
 
 /*
@@ -1553,6 +1531,28 @@ sctp_disposition_t sctp_sf_do_5_2_2_dupinit(const struct sctp_endpoint *ep,
 }
 
 
+/*
+ * Unexpected INIT-ACK handler.
+ *
+ * Section 5.2.3
+ * If an INIT ACK received by an endpoint in any state other than the
+ * COOKIE-WAIT state, the endpoint should discard the INIT ACK chunk.
+ * An unexpected INIT ACK usually indicates the processing of an old or
+ * duplicated INIT chunk.
+*/
+sctp_disposition_t sctp_sf_do_5_2_3_initack(const struct sctp_endpoint *ep,
+                                           const struct sctp_association *asoc,
+                                           const sctp_subtype_t type,
+                                           void *arg, sctp_cmd_seq_t *commands)
+{
+       /* Per the above section, we'll discard the chunk if we have an
+        * endpoint.  If this is an OOTB INIT-ACK, treat it as such.
+        */
+        if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
+               return sctp_sf_ootb(ep, asoc, type, arg, commands);
+       else
+               return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
+}
 
 /* Unexpected COOKIE-ECHO handler for peer restart (Table 2, action 'A')
  *
index 733dd87b3a7d1459728120768117ec7690fab6b4..5f6cc7aa661bd0371d1394d23610c6be780a6644 100644 (file)
@@ -152,7 +152,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type,
        /* SCTP_STATE_EMPTY */ \
        TYPE_SCTP_FUNC(sctp_sf_ootb), \
        /* SCTP_STATE_CLOSED */ \
-       TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
+       TYPE_SCTP_FUNC(sctp_sf_do_5_2_3_initack), \
        /* SCTP_STATE_COOKIE_WAIT */ \
        TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \
        /* SCTP_STATE_COOKIE_ECHOED */ \
index aba528b9ae769a8aa0fb5b5ece07ff704dab2291..16c9fbc1db6995e059ec263aa02449f912bd3942 100644 (file)
@@ -490,16 +490,14 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
 
        /* Set up the call info struct and execute the task */
        status = task->tk_status;
-       if (status != 0) {
-               rpc_release_task(task);
+       if (status != 0)
                goto out;
-       }
        atomic_inc(&task->tk_count);
        status = rpc_execute(task);
        if (status == 0)
                status = task->tk_status;
-       rpc_put_task(task);
 out:
+       rpc_put_task(task);
        rpc_restore_sigmask(&oldset);
        return status;
 }
@@ -537,7 +535,7 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags,
        if (status == 0)
                rpc_execute(task);
        else
-               rpc_release_task(task);
+               rpc_put_task(task);
 
        rpc_restore_sigmask(&oldset);           
        return status;
index 79bc4cdf5d4861e70c2614012dfbec35d7409e72..fc083f0b354434940b98aa27e882f9d4bef8bfe6 100644 (file)
@@ -42,6 +42,7 @@ static mempool_t      *rpc_buffer_mempool __read_mostly;
 static void                    __rpc_default_timer(struct rpc_task *task);
 static void                    rpciod_killall(void);
 static void                    rpc_async_schedule(struct work_struct *);
+static void                     rpc_release_task(struct rpc_task *task);
 
 /*
  * RPC tasks sit here while waiting for conditions to improve.
@@ -896,7 +897,7 @@ void rpc_put_task(struct rpc_task *task)
 }
 EXPORT_SYMBOL(rpc_put_task);
 
-void rpc_release_task(struct rpc_task *task)
+static void rpc_release_task(struct rpc_task *task)
 {
 #ifdef RPC_DEBUG
        BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
index 47b68a301677a7e65ff647f6cf484abccba1b81f..328d80f000ad67dbc6162b6fb97c542621e1f2d6 100644 (file)
@@ -56,6 +56,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
                        sk_add_backlog(sk, skb);
                }
                bh_unlock_sock(sk);
+               sock_put(sk);
                return queued;
        }
 
index bebd40e5a62e161f03f630adac629d8baa014d99..b7e537fe2d7542d95335e7a2a1fde2172a5ba0b8 100644 (file)
@@ -650,19 +650,18 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
        struct xfrm_policy *pol;
        struct xfrm_policy *delpol;
        struct hlist_head *chain;
-       struct hlist_node *entry, *newpos, *last;
+       struct hlist_node *entry, *newpos;
        struct dst_entry *gc_list;
 
        write_lock_bh(&xfrm_policy_lock);
        chain = policy_hash_bysel(&policy->selector, policy->family, dir);
        delpol = NULL;
        newpos = NULL;
-       last = NULL;
        hlist_for_each_entry(pol, entry, chain, bydst) {
-               if (!delpol &&
-                   pol->type == policy->type &&
+               if (pol->type == policy->type &&
                    !selector_cmp(&pol->selector, &policy->selector) &&
-                   xfrm_sec_ctx_match(pol->security, policy->security)) {
+                   xfrm_sec_ctx_match(pol->security, policy->security) &&
+                   !WARN_ON(delpol)) {
                        if (excl) {
                                write_unlock_bh(&xfrm_policy_lock);
                                return -EEXIST;
@@ -671,17 +670,12 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
                        if (policy->priority > pol->priority)
                                continue;
                } else if (policy->priority >= pol->priority) {
-                       last = &pol->bydst;
+                       newpos = &pol->bydst;
                        continue;
                }
-               if (!newpos)
-                       newpos = &pol->bydst;
                if (delpol)
                        break;
-               last = &pol->bydst;
        }
-       if (!newpos)
-               newpos = last;
        if (newpos)
                hlist_add_after(newpos, &policy->bydst);
        else
index 3eb1fa9f0de18bbd77919c9954b206e41561d21b..ff0393317f39b996912b1c0d552d3653828d4277 100644 (file)
@@ -1299,6 +1299,7 @@ int security_load_policy(void *data, size_t len)
                avc_ss_reset(seqno);
                selnl_notify_policyload(seqno);
                selinux_netlbl_cache_invalidate();
+               atomic_inc(&flow_cache_genid);
                return 0;
        }
 
@@ -1354,6 +1355,7 @@ int security_load_policy(void *data, size_t len)
        avc_ss_reset(seqno);
        selnl_notify_policyload(seqno);
        selinux_netlbl_cache_invalidate();
+       atomic_inc(&flow_cache_genid);
 
        return 0;
 
@@ -1853,6 +1855,7 @@ out:
        if (!rc) {
                avc_ss_reset(seqno);
                selnl_notify_policyload(seqno);
+               atomic_inc(&flow_cache_genid);
        }
        return rc;
 }
index 367f8a32a6657ed66324b69280b760d47d90c288..0a352e46862f37abbdc1b94c2475f8d185e99d63 100644 (file)
@@ -322,7 +322,7 @@ static void i_usX2Y_urb_complete(struct urb *urb)
                usX2Y_error_urb_status(usX2Y, subs, urb);
                return;
        }
-       if (likely(urb->start_frame == usX2Y->wait_iso_frame))
+       if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
                subs->completed_urb = urb;
        else {
                usX2Y_error_sequence(usX2Y, subs, urb);
index 8f3e35e24e72ce5b46771609c2c1dfe694d5c841..a5e7bcd7ca2ec0c5b486ba0b56c5f8e8f9d41a75 100644 (file)
@@ -243,7 +243,7 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb)
                usX2Y_error_urb_status(usX2Y, subs, urb);
                return;
        }
-       if (likely(urb->start_frame == usX2Y->wait_iso_frame))
+       if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
                subs->completed_urb = urb;
        else {
                usX2Y_error_sequence(usX2Y, subs, urb);