]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
authorLinus Torvalds <torvalds@woody.osdl.org>
Sat, 23 Dec 2006 02:46:56 +0000 (18:46 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 23 Dec 2006 02:46:56 +0000 (18:46 -0800)
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (68 commits)
  ACPI: replace kmalloc+memset with kzalloc
  ACPI: Add support for acpi_load_table/acpi_unload_table_id
  fbdev: update after backlight argument change
  ACPI: video: Add dev argument for backlight_device_register
  ACPI: Implement acpi_video_get_next_level()
  ACPI: Kconfig - depend on PM rather than selecting it
  ACPI: fix NULL check in drivers/acpi/osl.c
  ACPI: make drivers/acpi/ec.c:ec_ecdt static
  ACPI: prevent processor module from loading on failures
  ACPI: fix single linked list manipulation
  ACPI: ibm_acpi: allow clean removal
  ACPI: fix git automerge failure
  ACPI: ibm_acpi: respond to workqueue update
  ACPI: dock: add uevent to indicate change in device status
  ACPI: ec: Lindent once again
  ACPI: ec: Change #define to enums there possible.
  ACPI: ec: Style changes.
  ACPI: ec: Acquire Global Lock under EC mutex.
  ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
  ACPI: ec: Rename gpe_bit to gpe
  ...

375 files changed:
.gitignore
Documentation/CodingStyle
Documentation/block/biodoc.txt
Documentation/kernel-parameters.txt
Documentation/powerpc/booting-without-of.txt
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
MAINTAINERS
Makefile
arch/arm/configs/ep93xx_defconfig
arch/arm/configs/iop13xx_defconfig
arch/arm/configs/iop32x_defconfig
arch/arm/configs/iop33x_defconfig
arch/arm/configs/ixp2000_defconfig
arch/arm/configs/ixp23xx_defconfig
arch/arm/configs/lpd270_defconfig
arch/arm/configs/onearm_defconfig
arch/arm/kernel/calls.S
arch/arm/kernel/setup.c
arch/arm/kernel/sys_arm.c
arch/arm/mach-ep93xx/core.c
arch/arm/mach-iop13xx/iq81340mc.c
arch/arm/mach-iop13xx/iq81340sc.c
arch/arm/mach-iop13xx/irq.c
arch/arm/mach-iop13xx/setup.c
arch/arm/mach-s3c2410/Kconfig
arch/arm/mach-s3c2410/cpu.c
arch/arm/mach-s3c2410/devs.c
arch/arm/mach-s3c2410/dma.c
arch/arm/mach-s3c2410/irq.h
arch/arm/mach-s3c2410/mach-anubis.c
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-h1940.c
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2410/mach-nexcoder.c
arch/arm/mach-s3c2410/mach-osiris.c
arch/arm/mach-s3c2410/mach-otom.c
arch/arm/mach-s3c2410/mach-smdk2410.c
arch/arm/mach-s3c2410/mach-smdk2413.c
arch/arm/mach-s3c2410/mach-smdk2440.c
arch/arm/mach-s3c2410/mach-vr1000.c
arch/arm/mach-s3c2410/mach-vstms.c
arch/arm/mach-s3c2410/pm-simtec.c
arch/arm/mach-s3c2410/pm.c
arch/arm/mach-s3c2410/s3c2410-clock.c
arch/arm/mach-s3c2410/s3c2410-dma.c
arch/arm/mach-s3c2410/s3c2410-pm.c
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/mach-s3c2410/s3c2412-clock.c
arch/arm/mach-s3c2410/s3c2412-dma.c
arch/arm/mach-s3c2410/s3c2412.c
arch/arm/mach-s3c2410/s3c2440-clock.c
arch/arm/mach-s3c2410/s3c2440-dma.c
arch/arm/mach-s3c2410/s3c2440.c
arch/arm/mach-s3c2410/s3c2440.h
arch/arm/mach-s3c2410/s3c2442-clock.c
arch/arm/mach-s3c2410/s3c2442.c
arch/arm/mach-s3c2410/s3c244x.c
arch/arm/mach-s3c2410/usb-simtec.h
arch/arm/mm/ioremap.c
arch/arm/mm/mmu.c
arch/arm/mm/proc-xsc3.S
arch/i386/kernel/apm.c
arch/i386/kernel/e820.c
arch/i386/kernel/microcode.c
arch/i386/kernel/process.c
arch/i386/kernel/ptrace.c
arch/i386/kernel/setup.c
arch/i386/mm/discontig.c
arch/i386/mm/init.c
arch/i386/pci/fixup.c
arch/ia64/kernel/process.c
arch/powerpc/boot/Makefile
arch/powerpc/configs/cell_defconfig
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/pci_64.c
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/cell/io-workarounds.c
arch/powerpc/platforms/cell/spu_priv1_mmio.c
arch/powerpc/platforms/iseries/Kconfig
arch/powerpc/sysdev/mpic.c
arch/x86_64/Kconfig
arch/x86_64/kernel/pci-calgary.c
arch/x86_64/kernel/process.c
block/cfq-iosched.c
block/elevator.c
block/ll_rw_blk.c
block/scsi_ioctl.c
drivers/acpi/ibm_acpi.c
drivers/acpi/processor_idle.c
drivers/ata/ahci.c
drivers/ata/libata-scsi.c
drivers/ata/pata_cs5530.c
drivers/ata/pata_via.c
drivers/ata/sata_nv.c
drivers/ata/sata_svw.c
drivers/ata/sata_vsc.c
drivers/atm/Kconfig
drivers/atm/fore200e.c
drivers/base/firmware_class.c
drivers/block/aoe/aoecmd.c
drivers/block/cciss.c
drivers/block/viodasd.c
drivers/bluetooth/hci_usb.c
drivers/cdrom/cdrom.c
drivers/cdrom/viocd.c
drivers/char/drm/drmP.h
drivers/char/drm/drm_lock.c
drivers/char/drm/drm_stub.c
drivers/char/drm/drm_sysfs.c
drivers/char/drm/i915_irq.c
drivers/char/drm/r128_drm.h
drivers/char/drm/r128_drv.h
drivers/char/drm/r128_state.c
drivers/char/drm/r300_cmdbuf.c
drivers/char/drm/radeon_drv.h
drivers/char/drm/radeon_irq.c
drivers/char/drm/radeon_mem.c
drivers/char/drm/radeon_state.c
drivers/char/drm/savage_bci.c
drivers/char/rtc.c
drivers/char/tlclk.c
drivers/char/viocons.c
drivers/char/viotape.c
drivers/ide/pci/atiixp.c
drivers/isdn/i4l/isdn_ppp.c
drivers/kvm/kvm_main.c
drivers/kvm/mmu.c
drivers/kvm/svm.c
drivers/kvm/vmx.c
drivers/md/md.c
drivers/message/i2o/exec-osm.c
drivers/net/iseries_veth.c
drivers/net/smc911x.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/rpaphp_slot.c
drivers/pci/hotplug/shpchp.h
drivers/pci/hotplug/shpchp_core.c
drivers/pci/hotplug/shpchp_ctrl.c
drivers/pci/hotplug/shpchp_hpc.c
drivers/pci/htirq.c
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/pcie/portdrv_pci.c
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pci/search.c
drivers/pci/setup-bus.c
drivers/pci/setup-res.c
drivers/scsi/scsi_lib.c
drivers/serial/uartlite.c
drivers/spi/spi_s3c24xx_gpio.c
drivers/usb/class/usblp.c
drivers/usb/core/devio.c
drivers/usb/gadget/at91_udc.c
drivers/usb/gadget/at91_udc.h
drivers/usb/gadget/dummy_hcd.c
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/gmidi.c
drivers/usb/gadget/goku_udc.c
drivers/usb/gadget/lh7a40x_udc.c
drivers/usb/gadget/net2280.c
drivers/usb/gadget/omap_udc.c
drivers/usb/gadget/pxa2xx_udc.c
drivers/usb/gadget/serial.c
drivers/usb/host/ohci-at91.c
drivers/usb/host/ohci-au1xxx.c
drivers/usb/host/ohci-dbg.c
drivers/usb/host/ohci-ep93xx.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/host/ohci-lh7a404.c
drivers/usb/host/ohci-mem.c
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci-pci.c
drivers/usb/host/ohci-pnx4008.c
drivers/usb/host/ohci-pnx8550.c [new file with mode: 0644]
drivers/usb/host/ohci-ppc-soc.c
drivers/usb/host/ohci-pxa27x.c
drivers/usb/host/ohci-q.c
drivers/usb/host/ohci-s3c2410.c
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci.h
drivers/usb/host/u132-hcd.c
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-hub.c
drivers/usb/input/wacom_sys.c
drivers/usb/input/wacom_wac.c
drivers/usb/misc/auerswald.c
drivers/usb/misc/ftdi-elan.c
drivers/usb/misc/phidgetservo.c
drivers/usb/misc/trancevibrator.c
drivers/usb/net/gl620a.c
drivers/usb/net/rtl8150.c
drivers/usb/serial/airprime.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/funsoft.c
drivers/usb/serial/kl5kusb105.c
drivers/usb/serial/mos7840.c
drivers/usb/serial/option.c
drivers/usb/storage/unusual_devs.h
drivers/video/gxt4500.c
drivers/video/pxafb.c
drivers/video/sa1100fb.c
fs/Kconfig
fs/buffer.c
fs/dlm/lowcomms-tcp.c
fs/file.c
fs/fuse/file.c
fs/gfs2/Kconfig
fs/hugetlbfs/inode.c
fs/jbd/commit.c
fs/jfs/jfs_metapage.c
fs/pipe.c
fs/stack.c
fs/sysv/super.c
fs/sysv/sysv.h
fs/xfs/linux-2.6/xfs_aops.c
include/asm-arm/arch-iop13xx/iq81340.h
include/asm-arm/arch-ixp23xx/memory.h
include/asm-arm/arch-s3c2410/anubis-cpld.h
include/asm-arm/arch-s3c2410/anubis-irq.h
include/asm-arm/arch-s3c2410/anubis-map.h
include/asm-arm/arch-s3c2410/audio.h
include/asm-arm/arch-s3c2410/bast-cpld.h
include/asm-arm/arch-s3c2410/bast-irq.h
include/asm-arm/arch-s3c2410/bast-map.h
include/asm-arm/arch-s3c2410/bast-pmu.h
include/asm-arm/arch-s3c2410/h1940-latch.h
include/asm-arm/arch-s3c2410/hardware.h
include/asm-arm/arch-s3c2410/iic.h
include/asm-arm/arch-s3c2410/leds-gpio.h
include/asm-arm/arch-s3c2410/map.h
include/asm-arm/arch-s3c2410/nand.h
include/asm-arm/arch-s3c2410/osiris-cpld.h
include/asm-arm/arch-s3c2410/regs-serial.h
include/asm-arm/arch-s3c2410/system.h
include/asm-arm/arch-s3c2410/timex.h
include/asm-arm/arch-s3c2410/uncompress.h
include/asm-arm/arch-s3c2410/usb-control.h
include/asm-arm/arch-s3c2410/vr1000-cpld.h
include/asm-arm/arch-s3c2410/vr1000-irq.h
include/asm-arm/arch-s3c2410/vr1000-map.h
include/asm-arm/elf.h
include/asm-arm/system.h
include/asm-arm/unistd.h
include/asm-generic/vmlinux.lds.h
include/asm-i386/e820.h
include/asm-powerpc/spu.h
include/linux/Kbuild
include/linux/blkdev.h
include/linux/debug_locks.h
include/linux/device.h
include/linux/elevator.h
include/linux/file.h
include/linux/if_fddi.h
include/linux/ioport.h
include/linux/kobject.h
include/linux/kvm.h
include/linux/page-flags.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/pci_regs.h
include/linux/rmap.h
include/linux/sctp.h
include/linux/vmstat.h
include/net/ip6_checksum.h
include/net/sctp/sctp.h
include/net/sctp/structs.h
include/net/sctp/ulpevent.h
include/net/sctp/user.h
include/net/tcp.h
include/sound/pcm_oss.h
include/sound/version.h
include/sound/ymfpci.h
init/Kconfig
init/Makefile
init/main.c
kernel/auditfilter.c
kernel/exit.c
kernel/irq/chip.c
kernel/printk.c
kernel/relay.c
kernel/sched.c
kernel/timer.c
kernel/workqueue.c
lib/kobject_uevent.c
lib/kref.c
mm/filemap_xip.c
mm/fremap.c
mm/memory.c
mm/page-writeback.c
mm/rmap.c
mm/shmem.c
mm/slab.c
mm/truncate.c
mm/vmscan.c
net/ipv4/udp.c
net/netlabel/netlabel_cipso_v4.c
net/sctp/ipv6.c
net/sctp/protocol.c
net/sctp/sm_make_chunk.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/ulpevent.c
net/sunrpc/auth_gss/gss_spkm3_mech.c
scripts/kernel-doc
sound/aoa/codecs/snd-aoa-codec-onyx.h
sound/aoa/codecs/snd-aoa-codec-tas.c
sound/core/control.c
sound/core/oss/pcm_oss.c
sound/core/pcm.c
sound/core/pcm_lib.c
sound/core/rawmidi.c
sound/core/seq/seq_memory.c
sound/core/sgbuf.c
sound/isa/gus/gus_mem.c
sound/isa/sb/sb_common.c
sound/isa/wavefront/wavefront_synth.c
sound/pci/ac97/ac97_codec.c
sound/pci/ac97/ac97_patch.c
sound/pci/ad1889.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au88x0.c
sound/pci/azt3328.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106.h
sound/pci/ca0106/ca0106_main.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/echoaudio/echoaudio.c
sound/pci/emu10k1/emu10k1_main.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/es1968.c
sound/pci/fm801.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_intel.c
sound/pci/hda/hda_proc.c
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_si3054.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/korg1212/korg1212.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/hdspm.c
sound/pci/rme9652/rme9652.c
sound/pci/sonicvibes.c
sound/pci/trident/trident_main.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/vx222/vx222.c
sound/pci/ymfpci/ymfpci.c
sound/pci/ymfpci/ymfpci_main.c
sound/usb/usbaudio.c

index 9eb4b77114994877b247c1d165f3920f680cc7e6..060a71d41ad7ccc3214065a182e6f67568420071 100644 (file)
@@ -42,3 +42,6 @@ patches-*
 # quilt's files
 patches
 series
+
+# cscope files
+cscope.*
index 0ad6dcb5d45ffd0f9f7e5ae1d64044afa51b1b8b..9069189e78ef3c7ec272bbeebda291d509b2b66a 100644 (file)
@@ -682,6 +682,24 @@ result.  Typical examples would be functions that return pointers; they use
 NULL or the ERR_PTR mechanism to report failure.
 
 
+               Chapter 17:  Don't re-invent the kernel macros
+
+The header file include/linux/kernel.h contains a number of macros that
+you should use, rather than explicitly coding some variant of them yourself.
+For example, if you need to calculate the length of an array, take advantage
+of the macro
+
+  #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+Similarly, if you need to calculate the size of some structure member, use
+
+  #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+
+There are also min() and max() macros that do strict type checking if you
+need them.  Feel free to peruse that header file to see what else is already
+defined that you shouldn't reproduce in your code.
+
+
 
                Appendix I: References
 
index c6c9a9c10d7f88b5f894990e45878acadbb2ea64..3adaace328a660fac9591e7a4b0726661dd3d832 100644 (file)
@@ -946,6 +946,13 @@ elevator_merged_fn         called when a request in the scheduler has been
                                scheduler for example, to reposition the request
                                if its sorting order has changed.
 
+elevator_allow_merge_fn                called whenever the block layer determines
+                               that a bio can be merged into an existing
+                               request safely. The io scheduler may still
+                               want to stop a merge at this point if it
+                               results in some sort of conflict internally,
+                               this hook allows it to do that.
+
 elevator_dispatch_fn           fills the dispatch queue with ready requests.
                                I/O schedulers are free to postpone requests by
                                not filling the dispatch queue unless @force
index ef69c75780bf4e5ca4650411033f8711b0771fd2..25d2985171044712e864035fc5201147ba96cdb8 100644 (file)
@@ -1714,6 +1714,14 @@ and is between 256 and 4096 characters. It is defined in the file
        uart6850=       [HW,OSS]
                        Format: <io>,<irq>
 
+       uhci-hcd.ignore_oc=
+                       [USB] Ignore overcurrent events (default N).
+                       Some badly-designed motherboards generate lots of
+                       bogus events, for ports that aren't wired to
+                       anything.  Set this parameter to avoid log spamming.
+                       Note that genuine overcurrent events won't be
+                       reported either.
+
        usbhid.mousepoll=
                        [USBHID] The interval which mice are to be polled at.
 
index b3bd36668db3a4cef12a7996dfb51f78180da129..33994271cb3bcbc81caba4581be2c5ec16046946 100644 (file)
@@ -1703,29 +1703,32 @@ platforms are moved over to use the flattened-device-tree model.
     Required properties:
 
      - device_type : has to be "rom"
-     - compatible : Should specify what this ROM device is compatible with
-       (i.e. "onenand"). Currently, this is most likely to be "direct-mapped"
-       (which corresponds to the MTD physmap mapping driver).
-     - regs : Offset and length of the register set (or memory mapping) for
+     - compatible : Should specify what this flash device is compatible with.
+       Currently, this is most likely to be "direct-mapped" (which
+       corresponds to the MTD physmap mapping driver).
+     - reg : Offset and length of the register set (or memory mapping) for
        the device.
+     - bank-width : Width of the flash data bus in bytes. Required
+       for the NOR flashes (compatible == "direct-mapped" and others) ONLY.
 
     Recommended properties :
 
-     - bank-width : Width of the flash data bus in bytes. Required
-       for the NOR flashes (compatible == "direct-mapped" and others) ONLY.
      - partitions : Several pairs of 32-bit values where the first value is
        partition's offset from the start of the device and the second one is
        partition size in bytes with LSB used to signify a read only
-       partititon (so, the parition size should always be an even number).
+       partition (so, the parition size should always be an even number).
      - partition-names : The list of concatenated zero terminated strings
        representing the partition names.
+     - probe-type : The type of probe which should be done for the chip
+       (JEDEC vs CFI actually). Valid ONLY for NOR flashes.
 
    Example:
 
        flash@ff000000 {
                device_type = "rom";
                compatible = "direct-mapped";
-               regs = <ff000000 01000000>;
+               probe-type = "CFI";
+               reg = <ff000000 01000000>;
                bank-width = <4>;
                partitions = <00000000 00f80000
                              00f80000 00080001>;
index 077fbe25ebf44bca5cd9c16a819faebc60849121..ccd0a953953dcc09a52288d766bff968afff3e4b 100644 (file)
           <informalexample>
             <programlisting>
 <![CDATA[
-  struct mychip *chip = (struct mychip *)card->private_data;
+  struct mychip *chip = card->private_data;
 ]]>
             </programlisting>
           </informalexample>
 
           /* release the irq */
           if (chip->irq >= 0)
-                  free_irq(chip->irq, (void *)chip);
+                  free_irq(chip->irq, chip);
           /* release the i/o ports & memory */
           pci_release_regions(chip->pci);
           /* disable the PCI entry */
           }
           chip->port = pci_resource_start(pci, 0);
           if (request_irq(pci->irq, snd_mychip_interrupt,
-                          IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) {
+                          IRQF_SHARED, "My Chip", chip)) {
                   printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
                   snd_mychip_free(chip);
                   return -EBUSY;
           <programlisting>
 <![CDATA[
   if (chip->irq >= 0)
-          free_irq(chip->irq, (void *)chip);
+          free_irq(chip->irq, chip);
 ]]>
           </programlisting>
         </informalexample>
index db38a4d28039bc59f881ce88ee12638d908f3893..db090362d731813b35f5caf8989b5faa8737d74e 100644 (file)
@@ -406,14 +406,14 @@ S:        Maintained
 
 ARM/S3C2410 ARM ARCHITECTURE
 P:     Ben Dooks
-M:     ben-s3c2410@fluff.org
+M:     ben-linux@fluff.org
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 W:     http://www.fluff.org/ben/linux/
 S:     Maintained
 
 ARM/S3C2440 ARM ARCHITECTURE
 P:     Ben Dooks
-M:     ben-s3c2440@fluff.org
+M:     ben-linux@fluff.org
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 W:     http://www.fluff.org/ben/linux/
 S:     Maintained
@@ -943,11 +943,8 @@ L: linux-kernel@vger.kernel.org
 S:     Maintained
 
 DOCBOOK FOR DOCUMENTATION
-P:     Martin Waitz
-M:     tali@admingilde.org
 P:     Randy Dunlap
 M:     rdunlap@xenotime.net
-T:     git http://tali.admingilde.org/git/linux-docbook.git
 S:     Maintained
 
 DOCKING STATION DRIVER
@@ -3139,7 +3136,7 @@ USB EHCI DRIVER
 P:     David Brownell
 M:     dbrownell@users.sourceforge.net
 L:     linux-usb-devel@lists.sourceforge.net
-S:     Maintained
+S:     Odd Fixes
 
 USB ET61X[12]51 DRIVER
 P:     Luca Risolia
@@ -3192,11 +3189,11 @@ S:      Maintained
 W:     http://www.one-eyed-alien.net/~mdharm/linux-usb/
 
 USB OHCI DRIVER
-P:     Roman Weissgaerber
-M:     weissg@vienna.at
+P:     David Brownell
+M:     dbrownell@users.sourceforge.net
 L:     linux-usb-users@lists.sourceforge.net
 L:     linux-usb-devel@lists.sourceforge.net
-S:     Maintained
+S:     Odd Fixes
 
 USB OPTION-CARD DRIVER
 P:     Matthias Urlichs
index 4a47203879369d76a655ae30caf5eceaf4daed07..97155a8fd73cd8866e9151c004917779ccdb45f9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -368,10 +368,14 @@ endif
 # Detect when mixed targets is specified, and make a second invocation
 # of make so .config is not included in this case either (for *config).
 
-no-dot-config-targets := clean mrproper distclean \
+PHONY += generated_headers
+
+generated_headers: include/linux/version.h include/linux/compile.h \
+               include/linux/utsrelease.h
+
+no-dot-config-targets := generated_headers clean mrproper distclean \
                         cscope TAGS tags help %docs check% \
-                        include/linux/version.h headers_% \
-                        kernelrelease kernelversion
+                        headers_% kernelrelease kernelversion
 
 config-targets := 0
 mixed-targets  := 0
@@ -734,6 +738,16 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
 
 endif # ifdef CONFIG_KALLSYMS
 
+# compile.h changes depending on hostname, generation number, etc,
+# so we regenerate it always.
+# mkcompile_h will make sure to only update the
+# actual file if its content has changed.
+
+include/linux/compile.h: FORCE
+       @echo '  CHK     $@'
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
+       "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
+
 # vmlinux image - including updated kernel symbols
 vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
 ifdef CONFIG_HEADERS_CHECK
@@ -852,8 +866,8 @@ endif
 # prepare2 creates a makefile if using a separate output directory
 prepare2: prepare3 outputmakefile
 
-prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
-                   include/asm include/config/auto.conf
+prepare1: prepare2 generated_headers include/asm include/config/auto.conf
+
 ifneq ($(KBUILD_MODULES),)
        $(Q)mkdir -p $(MODVERDIR)
        $(Q)rm -f $(MODVERDIR)/*
@@ -922,14 +936,14 @@ export INSTALL_HDR_PATH
 HDRARCHES=$(filter-out generic,$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild)))
 
 PHONY += headers_install_all
-headers_install_all: include/linux/version.h scripts_basic FORCE
+headers_install_all: generated_headers scripts_basic FORCE
        $(Q)$(MAKE) $(build)=scripts scripts/unifdef
        $(Q)for arch in $(HDRARCHES); do \
         $(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\
         done
 
 PHONY += headers_install
-headers_install: include/linux/version.h scripts_basic FORCE
+headers_install: generated_headers scripts_basic FORCE
        @if [ ! -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
          echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
          exit 1 ; fi
@@ -1026,8 +1040,7 @@ CLEAN_FILES +=    vmlinux System.map \
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include2 usr/include
 MRPROPER_FILES += .config .config.old include/asm .version .old_version \
-                  include/linux/autoconf.h include/linux/version.h      \
-                  include/linux/utsrelease.h                            \
+                  include/linux/autoconf.h generated-headers           \
                  Module.symvers tags TAGS cscope*
 
 # clean - Delete most, but leave enough to build external modules
index f8a66b72ad5df9ffcbcf2eb994dfb4d6df11fc20..24a701ab33e5fce33d68356bde6f57ebd2d02fc0 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc1-git9
-# Sat Jul 15 15:08:10 2006
+# Linux kernel version: 2.6.20-rc1
+# Sat Dec 16 06:05:24 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -28,18 +32,22 @@ 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=y
 CONFIG_IKCONFIG_PROC=y
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -48,12 +56,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
@@ -71,7 +79,10 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -103,7 +114,9 @@ CONFIG_ARCH_EP93XX=y
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
 # CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP23XX is not set
@@ -127,6 +140,7 @@ CONFIG_CRUNCH=y
 #
 CONFIG_MACH_ADSSPHERE=y
 CONFIG_MACH_EDB9302=y
+CONFIG_MACH_EDB9302A=y
 CONFIG_MACH_EDB9312=y
 CONFIG_MACH_EDB9315=y
 CONFIG_MACH_EDB9315A=y
@@ -138,12 +152,14 @@ CONFIG_MACH_TS72XX=y
 #
 CONFIG_CPU_32=y
 CONFIG_CPU_ARM920T=y
-CONFIG_CPU_32v4=y
+CONFIG_CPU_32v4T=y
 CONFIG_CPU_ABRT_EV4T=y
 CONFIG_CPU_CACHE_V4WT=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_COPY_V4WB=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
@@ -230,6 +246,7 @@ CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
 CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
 CONFIG_NET_KEY=y
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
@@ -250,13 +267,29 @@ 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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -283,7 +316,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,7 +362,7 @@ CONFIG_MTD_REDBOOT_PARTS=y
 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
 # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_AFS_PARTS is not set
 
 #
@@ -342,6 +374,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -430,7 +463,7 @@ CONFIG_MTD_NAND_IDS=y
 #
 # CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_UB is not set
 # CONFIG_BLK_DEV_RAM is not set
 # CONFIG_BLK_DEV_INITRD is not set
@@ -442,6 +475,8 @@ CONFIG_MTD_NAND_IDS=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
 
 #
@@ -460,22 +495,28 @@ 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
 #
 # CONFIG_ISCSI_TCP is not set
-# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_DEBUG is not set
 
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
 #
 # Multi-device support (RAID and LVM)
 #
@@ -513,6 +554,7 @@ CONFIG_NETDEVICES=y
 #
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
+CONFIG_EP93XX_ETH=y
 # CONFIG_SMC91X is not set
 # CONFIG_DM9000 is not set
 
@@ -607,17 +649,12 @@ CONFIG_EP93XX_WATCHDOG=y
 # CONFIG_NVRAM 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
@@ -645,7 +682,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # CONFIG_SENSORS_DS1337 is not set
 # CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
+CONFIG_SENSORS_EEPROM=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
@@ -664,6 +701,7 @@ CONFIG_I2C_DEBUG_CHIP=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -697,12 +735,15 @@ 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_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 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
@@ -711,6 +752,7 @@ CONFIG_HWMON=y
 #
 # Misc devices
 #
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -729,7 +771,6 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -742,6 +783,7 @@ CONFIG_VIDEO_V4L2=y
 #
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -763,6 +805,7 @@ CONFIG_USB_DEBUG=y
 CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 CONFIG_USB_DYNAMIC_MINORS=y
+# CONFIG_USB_MULTITHREAD_PROBE is not set
 # CONFIG_USB_OTG is not set
 
 #
@@ -797,12 +840,12 @@ 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 is not set
 
 #
 # USB HID Boot Protocol drivers
@@ -821,6 +864,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 CONFIG_USB_RTL8150=y
+# CONFIG_USB_USBNET_MII is not set
 # CONFIG_USB_USBNET is not set
 # CONFIG_USB_MON is not set
 
@@ -834,8 +878,8 @@ CONFIG_USB_RTL8150=y
 CONFIG_USB_SERIAL=y
 CONFIG_USB_SERIAL_CONSOLE=y
 # CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_AIRCABLE is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
-# CONFIG_USB_SERIAL_ANYDATA is not set
 # CONFIG_USB_SERIAL_ARK3116 is not set
 # CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_WHITEHEAT is not set
@@ -857,6 +901,8 @@ CONFIG_USB_SERIAL_CONSOLE=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=y
 # CONFIG_USB_SERIAL_HP4X is not set
@@ -867,12 +913,14 @@ CONFIG_USB_SERIAL_PL2303=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
 #
 # 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
@@ -880,11 +928,12 @@ CONFIG_USB_SERIAL_PL2303=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_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -908,6 +957,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
@@ -921,7 +971,7 @@ CONFIG_RTC_INTF_DEV=y
 # RTC drivers
 #
 # CONFIG_RTC_DRV_X1205 is not set
-# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1307=y
 # CONFIG_RTC_DRV_DS1553 is not set
 # CONFIG_RTC_DRV_ISL1208 is not set
 # CONFIG_RTC_DRV_DS1672 is not set
@@ -943,12 +993,14 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XIP is not set
 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 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
@@ -980,8 +1032,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=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
@@ -1101,6 +1155,11 @@ 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
+
 #
 # Profiling support
 #
@@ -1110,8 +1169,11 @@ CONFIG_NLS_ISO8859_1=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
@@ -1128,10 +1190,9 @@ CONFIG_DEBUG_MUTEXES=y
 # 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_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -1150,13 +1211,10 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1164,3 +1222,4 @@ CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index f6e46193fd26df1747b97b7504e4c69db81aba3a..43c4a37e92473caec13518cb7dc15b728610ca4f 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19
-# Fri Dec  1 10:51:01 2006
+# Linux kernel version: 2.6.20-rc1-git5
+# Tue Dec 19 21:38:01 2006
 #
 CONFIG_ARM=y
 # CONFIG_GENERIC_TIME is not set
@@ -11,6 +11,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -39,6 +41,7 @@ CONFIG_BSD_PROCESS_ACCT=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
@@ -77,7 +80,9 @@ CONFIG_KMOD=y
 # Block layer
 #
 CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -154,11 +159,13 @@ CONFIG_IO_36=y
 CONFIG_ARM_THUMB=y
 # CONFIG_CPU_DCACHE_DISABLE is not set
 # CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_IWMMXT is not set
 
 #
 # Bus support
 #
 CONFIG_PCI=y
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
@@ -259,9 +266,23 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
-# CONFIG_IPV6 is not set
+# 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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -433,7 +454,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
@@ -448,6 +469,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
 
@@ -467,6 +489,7 @@ 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 Transports
@@ -510,6 +533,7 @@ CONFIG_SCSI_SAS_ATTRS=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
@@ -605,6 +629,7 @@ CONFIG_E1000_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
@@ -711,10 +736,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_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
@@ -820,6 +841,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
@@ -830,6 +852,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
@@ -882,6 +905,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -970,6 +998,7 @@ CONFIG_RAMFS=y
 #
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
+CONFIG_ECRYPT_FS=y
 # CONFIG_HFS_FS is not set
 # CONFIG_HFSPLUS_FS is not set
 # CONFIG_BEFS_FS is not set
@@ -1091,6 +1120,11 @@ 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
+
 #
 # Profiling support
 #
@@ -1103,28 +1137,68 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 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_BUGVERBOSE=y
-# CONFIG_DEBUG_FS is not set
 CONFIG_FRAME_POINTER=y
-# CONFIG_HEADERS_CHECK is not set
 CONFIG_DEBUG_USER=y
 
 #
 # Security options
 #
-# CONFIG_KEYS is not set
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
 
 #
 # Cryptographic options
 #
-# CONFIG_CRYPTO is not set
+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=y
+CONFIG_CRYPTO_NULL=y
+CONFIG_CRYPTO_MD4=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_WP512=y
+CONFIG_CRYPTO_TGR192=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_CAST5=y
+CONFIG_CRYPTO_CAST6=y
+CONFIG_CRYPTO_TEA=y
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_KHAZAD=y
+CONFIG_CRYPTO_ANUBIS=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
 
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 CONFIG_CRC_CCITT=y
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1132,3 +1206,4 @@ CONFIG_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index b275c53728ec2fd66dd4579851d7a9d306a140b7..7909a555706d8e77788e1b7f685e24a46439f184 100644 (file)
@@ -1,15 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc7
-# Tue Sep 19 00:30:18 2006
+# Linux kernel version: 2.6.20-rc1-git5
+# Tue Dec 19 21:37:52 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -29,18 +32,22 @@ 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=y
 # CONFIG_BSD_PROCESS_ACCT_V3 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_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -49,12 +56,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
@@ -72,7 +79,10 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -106,6 +116,7 @@ CONFIG_DEFAULT_IOSCHED="cfq"
 # CONFIG_ARCH_IMX is not set
 CONFIG_ARCH_IOP32X=y
 # CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP23XX is not set
@@ -141,17 +152,22 @@ CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
 # CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_IWMMXT is not set
 CONFIG_XSCALE_PMU=y
 
 #
 # Bus support
 #
 CONFIG_PCI=y
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -225,6 +241,7 @@ CONFIG_PACKET_MMAP=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
@@ -246,13 +263,29 @@ CONFIG_IP_PNP_BOOTP=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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -279,7 +312,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
 
@@ -338,6 +370,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -419,9 +452,11 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
-# CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
@@ -440,6 +475,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
 
 #
@@ -458,14 +495,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 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
@@ -478,26 +517,84 @@ CONFIG_CHR_DEV_SG=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_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # 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
 
 #
 # Multi-device support (RAID and LVM)
@@ -512,6 +609,7 @@ CONFIG_MD_RAID1=y
 # CONFIG_MD_MULTIPATH is not set
 # CONFIG_MD_FAULTY is not set
 CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_DEBUG is not set
 # CONFIG_DM_CRYPT is not set
 # CONFIG_DM_SNAPSHOT is not set
 # CONFIG_DM_MIRROR is not set
@@ -612,6 +710,7 @@ CONFIG_R8169=y
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -620,6 +719,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
@@ -654,6 +754,7 @@ CONFIG_R8169=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -725,10 +826,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_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
@@ -736,7 +833,6 @@ CONFIG_HW_RANDOM=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -801,6 +897,7 @@ CONFIG_I2C_IOP3XX=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -834,15 +931,18 @@ 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
@@ -851,6 +951,8 @@ CONFIG_HWMON=y
 #
 # Misc devices
 #
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -869,12 +971,12 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
 #
 # CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
@@ -894,6 +996,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -909,6 +1016,7 @@ CONFIG_USB=y
 # CONFIG_USB_DEVICEFS is not set
 # 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
 
 #
@@ -946,6 +1054,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
 
 #
@@ -984,6 +1093,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
 
@@ -1001,6 +1111,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
@@ -1008,12 +1119,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
 
 #
 # USB DSL modem support
@@ -1045,6 +1157,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
@@ -1056,6 +1169,7 @@ CONFIG_XFS_FS=y
 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
@@ -1084,8 +1198,10 @@ CONFIG_DNOTIFY=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=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
@@ -1095,6 +1211,7 @@ CONFIG_RAMFS=y
 #
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
+CONFIG_ECRYPT_FS=y
 # CONFIG_HFS_FS is not set
 # CONFIG_HFSPLUS_FS is not set
 # CONFIG_BEFS_FS is not set
@@ -1129,7 +1246,7 @@ CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
 # CONFIG_NFSD_V4 is not set
-# CONFIG_NFSD_TCP is not set
+CONFIG_NFSD_TCP=y
 CONFIG_ROOT_NFS=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
@@ -1171,6 +1288,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Profiling support
 #
@@ -1180,8 +1302,11 @@ CONFIG_MSDOS_PARTITION=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
@@ -1197,10 +1322,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # 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_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 # CONFIG_FORCED_INLINING is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -1211,13 +1335,48 @@ CONFIG_DEBUG_LL=y
 #
 # Security options
 #
-# CONFIG_KEYS is not set
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
 # CONFIG_SECURITY is not set
 
 #
 # Cryptographic options
 #
-# CONFIG_CRYPTO is not set
+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=y
+CONFIG_CRYPTO_NULL=y
+CONFIG_CRYPTO_MD4=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_WP512=y
+CONFIG_CRYPTO_TGR192=y
+CONFIG_CRYPTO_GF128MUL=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_LRW=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_BLOWFISH=y
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+CONFIG_CRYPTO_SERPENT=y
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_CAST5=y
+CONFIG_CRYPTO_CAST6=y
+CONFIG_CRYPTO_TEA=y
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_KHAZAD=y
+CONFIG_CRYPTO_ANUBIS=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_TEST is not set
 
 #
 # Hardware crypto devices
@@ -1226,10 +1385,12 @@ CONFIG_DEBUG_LL=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_LIBCRC32C=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index 848e3ace906965ed214a11eabcad3e0cde55ed1d..fa271bce8ff7de55170a6bfa283bf1670977017d 100644 (file)
@@ -1,15 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc7
-# Tue Sep 19 00:30:42 2006
+# Linux kernel version: 2.6.20-rc1
+# Sat Dec 16 06:05:34 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -29,18 +32,22 @@ 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=y
 # CONFIG_BSD_PROCESS_ACCT_V3 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_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -49,12 +56,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
@@ -72,7 +79,10 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -106,6 +116,7 @@ CONFIG_DEFAULT_IOSCHED="cfq"
 # CONFIG_ARCH_IMX is not set
 # CONFIG_ARCH_IOP32X is not set
 CONFIG_ARCH_IOP33X=y
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP23XX is not set
@@ -139,17 +150,22 @@ CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
 # CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_IWMMXT is not set
 CONFIG_XSCALE_PMU=y
 
 #
 # Bus support
 #
 CONFIG_PCI=y
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -223,6 +239,7 @@ CONFIG_PACKET_MMAP=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
@@ -244,13 +261,29 @@ CONFIG_IP_PNP_BOOTP=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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -277,7 +310,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
 
@@ -336,6 +368,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -423,7 +456,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
 # CONFIG_BLK_DEV_UMEM is not set
 # CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
@@ -443,6 +476,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
 
 #
@@ -461,14 +496,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 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
@@ -481,26 +518,34 @@ CONFIG_CHR_DEV_SG=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_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # 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)
@@ -515,6 +560,7 @@ CONFIG_MD_RAID1=y
 # CONFIG_MD_MULTIPATH is not set
 # CONFIG_MD_FAULTY is not set
 CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_DEBUG is not set
 # CONFIG_DM_CRYPT is not set
 # CONFIG_DM_SNAPSHOT is not set
 # CONFIG_DM_MIRROR is not set
@@ -580,6 +626,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -588,6 +635,7 @@ CONFIG_E1000_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
@@ -622,6 +670,7 @@ CONFIG_E1000_NAPI=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -693,10 +742,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_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
@@ -704,7 +749,6 @@ CONFIG_HW_RANDOM=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -769,6 +813,7 @@ CONFIG_I2C_IOP3XX=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -802,15 +847,18 @@ 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
@@ -819,6 +867,8 @@ CONFIG_HWMON=y
 #
 # Misc devices
 #
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -837,7 +887,6 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -862,6 +911,11 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -900,6 +954,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
@@ -911,6 +966,7 @@ CONFIG_XFS_FS=y
 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
@@ -939,8 +995,10 @@ CONFIG_DNOTIFY=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=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
@@ -1018,6 +1076,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Profiling support
 #
@@ -1027,8 +1090,11 @@ CONFIG_MSDOS_PARTITION=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
@@ -1044,10 +1110,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # 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_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 # CONFIG_FORCED_INLINING is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -1066,10 +1131,6 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
@@ -1078,3 +1139,4 @@ CONFIG_DEBUG_LL=y
 # CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index bbd2dcf91e521d4179f3ed68644177188c5911e1..f8f9793b526f243187ec24754f8fcb6bf7422506 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc1
-# Sun Jul  9 15:28:50 2006
+# Linux kernel version: 2.6.20-rc1
+# Sat Dec 16 06:05:39 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -28,17 +32,22 @@ 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=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# 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_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -47,12 +56,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
@@ -70,7 +79,10 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -102,7 +114,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
 # CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 CONFIG_ARCH_IXP2000=y
 # CONFIG_ARCH_IXP23XX is not set
@@ -143,24 +157,28 @@ CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
 # CONFIG_ARM_THUMB is not set
 CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_IWMMXT is not set
 CONFIG_XSCALE_PMU=y
 
 #
 # Bus support
 #
 CONFIG_PCI=y
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
-# CONFIG_PCCARD is not set
 
 #
 # Kernel Features
@@ -228,6 +246,7 @@ CONFIG_PACKET_MMAP=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 is not set
@@ -248,13 +267,29 @@ 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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -281,7 +316,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
 
@@ -308,7 +342,6 @@ CONFIG_TCP_CONG_BIC=y
 #
 CONFIG_STANDALONE=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
-# CONFIG_FW_LOADER is not set
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_SYS_HYPERVISOR is not set
 
@@ -340,6 +373,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -422,11 +456,12 @@ CONFIG_MTD_IXP2000=y
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
@@ -436,6 +471,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)
@@ -501,8 +542,8 @@ CONFIG_NET_PCI=y
 # CONFIG_FORCEDETH is not set
 CONFIG_CS89x0=y
 # CONFIG_DGRS is not set
-CONFIG_EEPRO100=y
-# CONFIG_E100 is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
@@ -532,6 +573,7 @@ CONFIG_ENP2611_MSF_NET=y
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -540,6 +582,7 @@ CONFIG_ENP2611_MSF_NET=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
@@ -555,7 +598,6 @@ CONFIG_ENP2611_MSF_NET=y
 # Wan interfaces
 #
 CONFIG_WAN=y
-# CONFIG_DSCC4 is not set
 # CONFIG_LANMEDIA is not set
 CONFIG_HDLC=y
 CONFIG_HDLC_RAW=y
@@ -571,6 +613,7 @@ CONFIG_HDLC_PPP=y
 # CONFIG_WANXL is not set
 # CONFIG_PC300 is not set
 # CONFIG_FARSYNC is not set
+# CONFIG_DSCC4 is not set
 CONFIG_DLCI=y
 CONFIG_DLCI_COUNT=24
 CONFIG_DLCI_MAX=8
@@ -592,6 +635,7 @@ CONFIG_DLCI_MAX=8
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -673,10 +717,6 @@ CONFIG_IXP2000_WATCHDOG=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
@@ -684,7 +724,6 @@ CONFIG_IXP2000_WATCHDOG=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -749,6 +788,7 @@ CONFIG_SENSORS_EEPROM=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -782,15 +822,18 @@ 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
@@ -799,6 +842,8 @@ CONFIG_HWMON=y
 #
 # Misc devices
 #
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -817,7 +862,6 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -829,12 +873,18 @@ CONFIG_VIDEO_V4L2=y
 #
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -875,6 +925,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
@@ -882,6 +933,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
@@ -910,8 +962,10 @@ CONFIG_DNOTIFY=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=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
@@ -961,7 +1015,6 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
-# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -993,6 +1046,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Profiling support
 #
@@ -1002,8 +1060,11 @@ CONFIG_MSDOS_PARTITION=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
@@ -1019,10 +1080,9 @@ CONFIG_DEBUG_MUTEXES=y
 # 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_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -1041,13 +1101,10 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1055,3 +1112,4 @@ CONFIG_CRC32=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index 06deefaec1d280c0343b3cb4a720ed12bf719362..27cf022dd807195f5703910fcc7d74164983510f 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc1
-# Sun Jul  9 14:13:35 2006
+# Linux kernel version: 2.6.20-rc1
+# Sat Dec 16 06:05:45 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -28,17 +32,22 @@ 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=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
+# 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_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -47,12 +56,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
@@ -70,7 +79,10 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -102,7 +114,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
 # CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 CONFIG_ARCH_IXP23XX=y
@@ -137,6 +151,8 @@ CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 CONFIG_IO_36=y
 
 #
@@ -144,11 +160,15 @@ CONFIG_IO_36=y
 #
 # CONFIG_ARM_THUMB is not set
 CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_IWMMXT is not set
 
 #
 # Bus support
 #
 CONFIG_PCI=y
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -222,6 +242,7 @@ CONFIG_PACKET_MMAP=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 is not set
@@ -242,13 +263,29 @@ 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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -275,7 +312,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
 
@@ -334,6 +370,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -418,12 +455,13 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
 # CONFIG_BLK_DEV_COW_COMMON is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
@@ -432,6 +470,7 @@ CONFIG_BLK_DEV_INITRD=y
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
 CONFIG_BLK_DEV_IDE=y
 
 #
@@ -455,7 +494,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 is not set
@@ -469,6 +507,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
@@ -477,6 +516,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=y
+# 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
@@ -491,6 +531,8 @@ CONFIG_BLK_DEV_IDEDMA=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
 
 #
@@ -509,14 +551,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
@@ -529,26 +573,34 @@ 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_SCSI_SATA is not set
 # CONFIG_SCSI_HPTIOP is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # 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)
@@ -649,6 +701,7 @@ CONFIG_E1000_NAPI=y
 # CONFIG_VIA_VELOCITY is not set
 # CONFIG_TIGON3 is not set
 # CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
 
 #
 # Ethernet (10000 Mbit)
@@ -657,6 +710,7 @@ CONFIG_E1000_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
@@ -672,7 +726,6 @@ CONFIG_E1000_NAPI=y
 # Wan interfaces
 #
 CONFIG_WAN=y
-# CONFIG_DSCC4 is not set
 # CONFIG_LANMEDIA is not set
 CONFIG_HDLC=y
 CONFIG_HDLC_RAW=y
@@ -688,6 +741,7 @@ CONFIG_HDLC_PPP=y
 # CONFIG_WANXL is not set
 # CONFIG_PC300 is not set
 # CONFIG_FARSYNC is not set
+# CONFIG_DSCC4 is not set
 CONFIG_DLCI=y
 CONFIG_DLCI_COUNT=24
 CONFIG_DLCI_MAX=8
@@ -710,6 +764,7 @@ CONFIG_DLCI_MAX=8
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -795,10 +850,6 @@ CONFIG_WATCHDOG=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
 
@@ -806,7 +857,6 @@ CONFIG_WATCHDOG=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -870,6 +920,7 @@ CONFIG_SENSORS_EEPROM=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -903,15 +954,18 @@ 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
@@ -920,6 +974,8 @@ CONFIG_HWMON=y
 #
 # Misc devices
 #
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -938,7 +994,6 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -951,12 +1006,18 @@ CONFIG_VIDEO_V4L2=y
 #
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -972,6 +1033,7 @@ CONFIG_USB=y
 # CONFIG_USB_DEVICEFS is not set
 # 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
 
 #
@@ -1012,6 +1074,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
 
 #
@@ -1050,6 +1113,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
 
@@ -1067,19 +1131,21 @@ 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
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
-# CONFIG_USB_CY7C63 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
 
 #
 # USB DSL modem support
@@ -1113,6 +1179,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
@@ -1120,6 +1187,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
@@ -1150,8 +1218,10 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=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
@@ -1201,7 +1271,6 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
-# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1272,6 +1341,11 @@ CONFIG_NLS_CODEPAGE_437=y
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Profiling support
 #
@@ -1281,8 +1355,11 @@ CONFIG_NLS_CODEPAGE_437=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
@@ -1298,10 +1375,9 @@ CONFIG_DEBUG_MUTEXES=y
 # 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_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -1320,13 +1396,10 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1334,3 +1407,4 @@ CONFIG_CRC32=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index e146189ab54f17925ec128c2bac27878c88188bf..a3bf5833b87ad94a9987185f333818b7916cab08 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc1
-# Sun Jul  9 14:15:23 2006
+# Linux kernel version: 2.6.20-rc1
+# Sat Dec 16 06:05:51 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_ARCH_MTD_XIP=y
@@ -29,16 +33,21 @@ 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_SYSCTL=y
+# 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_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -47,12 +56,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
@@ -69,7 +78,10 @@ CONFIG_MODULES=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -101,7 +113,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
 # CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP23XX is not set
@@ -125,7 +139,6 @@ CONFIG_MACH_LOGICPD_PXA270=y
 # CONFIG_PXA_SHARPSL is not set
 # CONFIG_MACH_TRIZEPS4 is not set
 CONFIG_PXA27x=y
-CONFIG_IWMMXT=y
 
 #
 # Processor Type
@@ -136,11 +149,15 @@ CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
 # CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_IWMMXT=y
 CONFIG_XSCALE_PMU=y
 
 #
@@ -217,6 +234,7 @@ CONFIG_NET=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 is not set
@@ -237,13 +255,29 @@ CONFIG_IP_PNP_BOOTP=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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -270,7 +304,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
 
@@ -329,6 +362,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -410,7 +444,7 @@ CONFIG_MTD_CFI_UTIL=y
 #
 # CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_RAM is not set
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CDROM_PKTCDVD is not set
@@ -447,6 +481,12 @@ CONFIG_BLK_DEV_IDEDISK=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)
@@ -526,6 +566,7 @@ CONFIG_SMC91X=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -548,6 +589,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 is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
@@ -600,17 +642,12 @@ CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_NVRAM 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
@@ -626,6 +663,7 @@ CONFIG_LEGACY_PTY_COUNT=256
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -634,11 +672,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
 #
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -657,7 +698,6 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -679,6 +719,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_S1D13XXX is not set
 CONFIG_FB_PXA=y
 # CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -725,7 +766,6 @@ CONFIG_SND_VERBOSE_PROCFS=y
 # Generic devices
 #
 CONFIG_SND_AC97_CODEC=y
-CONFIG_SND_AC97_BUS=y
 # CONFIG_SND_DUMMY is not set
 # CONFIG_SND_MTPAV is not set
 # CONFIG_SND_SERIAL_U16550 is not set
@@ -741,6 +781,12 @@ CONFIG_SND_PXA2XX_AC97=y
 # Open Sound System
 #
 # CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+
+#
+# HID Devices
+#
+CONFIG_HID=y
 
 #
 # USB support
@@ -777,10 +823,12 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
 # CONFIG_REISERFS_FS is not set
 # 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
@@ -811,6 +859,7 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
@@ -860,7 +909,6 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
-# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -916,6 +964,11 @@ 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
+
 #
 # Profiling support
 #
@@ -925,8 +978,11 @@ CONFIG_NLS_ISO8859_1=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
@@ -942,10 +998,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
 CONFIG_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -964,13 +1019,10 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -978,3 +1030,4 @@ CONFIG_CRC32=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index 0498ebd7d5de8bb59506c4b7c09c7b7c423342d4..650a248613e5afc6b0d838646d42ed04d6aabb0c 100644 (file)
@@ -1,14 +1,18 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-rc1
-# Sun Jul  9 14:16:20 2006
+# Linux kernel version: 2.6.20-rc1
+# Sat Dec 16 06:05:18 2006
 #
 CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
 CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_VECTORS_BASE=0xffff0000
@@ -28,16 +32,21 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# 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_UID16=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -46,12 +55,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
@@ -69,7 +78,10 @@ CONFIG_KMOD=y
 #
 # Block layer
 #
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
 
 #
 # IO Schedulers
@@ -101,7 +113,9 @@ CONFIG_ARCH_AT91=y
 # CONFIG_ARCH_NETX is not set
 # CONFIG_ARCH_H720X is not set
 # CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IOP13XX is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP23XX is not set
@@ -118,10 +132,6 @@ CONFIG_ARCH_AT91=y
 #
 # Atmel AT91 System-on-Chip
 #
-
-#
-# Atmel AT91 Processors
-#
 CONFIG_ARCH_AT91RM9200=y
 # CONFIG_ARCH_AT91SAM9260 is not set
 # CONFIG_ARCH_AT91SAM9261 is not set
@@ -139,6 +149,10 @@ CONFIG_MACH_ONEARM=y
 # CONFIG_MACH_KB9200 is not set
 # CONFIG_MACH_KAFA is not set
 
+#
+# AT91 Board Options
+#
+
 #
 # AT91 Feature Selections
 #
@@ -149,12 +163,14 @@ CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
 #
 CONFIG_CPU_32=y
 CONFIG_CPU_ARM920T=y
-CONFIG_CPU_32v4=y
+CONFIG_CPU_32v4T=y
 CONFIG_CPU_ABRT_EV4T=y
 CONFIG_CPU_CACHE_V4WT=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_COPY_V4WB=y
 CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
@@ -251,6 +267,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 is not set
@@ -271,13 +288,29 @@ CONFIG_IP_PNP_BOOTP=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_IPV6 is not set
+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 is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+# CONFIG_IPV6_SIT is not set
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
 
@@ -304,7 +337,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
 
@@ -360,6 +392,7 @@ CONFIG_MTD_BLOCK=y
 # CONFIG_NFTL is not set
 # CONFIG_INFTL is not set
 # CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -438,11 +471,12 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=0
 #
 # CONFIG_BLK_DEV_COW_COMMON is not set
 # CONFIG_BLK_DEV_LOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
+CONFIG_BLK_DEV_NBD=y
 # CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
@@ -457,6 +491,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)
@@ -541,6 +581,7 @@ CONFIG_ARM_AT91_ETHER=y
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
 
 #
 # Userland interfaces
@@ -618,10 +659,6 @@ CONFIG_AT91RM9200_WATCHDOG=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 
-#
-# Ftape, the floppy tape device driver
-#
-
 #
 # PCMCIA character devices
 #
@@ -634,7 +671,6 @@ CONFIG_AT91RM9200_WATCHDOG=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -652,6 +688,7 @@ CONFIG_I2C_CHARDEV=y
 #
 # I2C Hardware Bus support
 #
+# CONFIG_I2C_AT91 is not set
 # CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PARPORT_LIGHT is not set
 # CONFIG_I2C_STUB is not set
@@ -681,6 +718,7 @@ CONFIG_I2C_CHARDEV=y
 #
 # Dallas's 1-wire bus
 #
+# CONFIG_W1 is not set
 
 #
 # Hardware Monitoring support
@@ -714,12 +752,15 @@ 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_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47M192 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 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
@@ -728,6 +769,7 @@ CONFIG_HWMON=y
 #
 # Misc devices
 #
+# CONFIG_TIFM_CORE is not set
 
 #
 # LED devices
@@ -746,7 +788,6 @@ CONFIG_HWMON=y
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
 
 #
 # Digital Video Broadcasting Devices
@@ -759,12 +800,18 @@ CONFIG_VIDEO_V4L2=y
 #
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=y
+
 #
 # USB support
 #
@@ -780,6 +827,7 @@ CONFIG_USB_DEBUG=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
 
 #
@@ -804,7 +852,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 #
 # may also be needed; see USB_STORAGE Help for more information
 #
-# CONFIG_USB_STORAGE is not set
 # CONFIG_USB_LIBUSUAL is not set
 
 #
@@ -842,6 +889,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=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
 
@@ -859,18 +907,20 @@ 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
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_LED is not set
-# CONFIG_USB_CY7C63 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_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_TEST is not set
 
 #
@@ -897,6 +947,7 @@ CONFIG_USB_AT91=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
@@ -904,7 +955,8 @@ CONFIG_USB_AT91=y
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 CONFIG_MMC_BLOCK=y
-CONFIG_MMC_AT91RM9200=y
+# CONFIG_MMC_AT91 is not set
+# CONFIG_MMC_TIFM_SD is not set
 
 #
 # Real Time Clock
@@ -919,10 +971,12 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS 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
@@ -951,8 +1005,10 @@ CONFIG_DNOTIFY=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=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
@@ -995,7 +1051,6 @@ CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
-# CONFIG_CIFS_DEBUG2 is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1012,6 +1067,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Profiling support
 #
@@ -1021,8 +1081,11 @@ CONFIG_MSDOS_PARTITION=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
@@ -1038,10 +1101,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # 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_FRAME_POINTER=y
-# CONFIG_UNWIND_INFO is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_DEBUG_USER=y
@@ -1060,16 +1122,14 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_CRYPTO is not set
 
-#
-# Hardware crypto devices
-#
-
 #
 # 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_ZLIB_INFLATE=y
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
index e8f74363328ce6a40fb43084677cda482436284a..f7598cbc7ec5a788cf6f032a548372682f679feb 100644 (file)
                CALL(sys_ni_syscall)            /* was sys_profil */
                CALL(sys_statfs)
 /* 100 */      CALL(sys_fstatfs)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* sys_ioperm */
                CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
                CALL(sys_syslog)
                CALL(sys_setitimer)
 /* 120 */      CALL(sys_clone_wrapper)
                CALL(sys_setdomainname)
                CALL(sys_newuname)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* modify_ldt */
                CALL(sys_adjtimex)
 /* 125 */      CALL(sys_mprotect)
                CALL(sys_sigprocmask)
                CALL(sys_bdflush)
 /* 135 */      CALL(sys_sysfs)
                CALL(sys_personality)
-               CALL(sys_ni_syscall)            /* CALL(_sys_afs_syscall) */
+               CALL(sys_ni_syscall)            /* reserved for afs_syscall */
                CALL(sys_setfsuid16)
                CALL(sys_setfsgid16)
 /* 140 */      CALL(sys_llseek)
                CALL(sys_arm_mremap)
                CALL(sys_setresuid16)
 /* 165 */      CALL(sys_getresuid16)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* vm86 */
                CALL(sys_ni_syscall)            /* was sys_query_module */
                CALL(sys_poll)
                CALL(sys_nfsservctl)
 /* 185 */      CALL(sys_capset)
                CALL(sys_sigaltstack_wrapper)
                CALL(sys_sendfile)
-               CALL(sys_ni_syscall)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* getpmsg */
+               CALL(sys_ni_syscall)            /* putpmsg */
 /* 190 */      CALL(sys_vfork_wrapper)
                CALL(sys_getrlimit)
                CALL(sys_mmap2)
                CALL(sys_readlinkat)
                CALL(sys_fchmodat)
                CALL(sys_faccessat)
+/* 335 */      CALL(sys_ni_syscall)            /* eventually pselect6 */
+               CALL(sys_ni_syscall)            /* eventually ppoll */
+               CALL(sys_unshare)
+               CALL(sys_set_robust_list)
+               CALL(sys_get_robust_list)
+/* 340 */      CALL(sys_splice)
+               CALL(sys_arm_sync_file_range)
+               CALL(sys_tee)
+               CALL(sys_vmsplice)
+               CALL(sys_move_pages)
+/* 345 */      CALL(sys_getcpu)
+               CALL(sys_ni_syscall)            /* eventually epoll_pwait */
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
index cf2bd42428035079943592d45a65374f3081dd57..bbab134cd82d3fa547d72d5d2514591da9f52d92 100644 (file)
@@ -855,6 +855,7 @@ static const char *hwcap_str[] = {
        "edsp",
        "java",
        "iwmmxt",
+       "crunch",
        NULL
 };
 
index 00c18d35913cb2c9a6da852fba86d67efa9fd5a4..3d4fcbc162769b9bf71f3da77b5488f15df5c50a 100644 (file)
@@ -328,3 +328,16 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
 {
        return sys_fadvise64_64(fd, offset, len, advice);
 }
+
+/*
+ * Yet more syscall fsckage - we can't fit sys_sync_file_range's
+ * arguments into the available registers with EABI.  So, let's
+ * create an ARM specific syscall for this which has _sane_
+ * arguments.  (This incidentally also has an ABI-independent
+ * argument layout.)
+ */
+asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags,
+                                       loff_t offset, loff_t nbytes)
+{
+       return sys_sync_file_range(fd, offset, nbytes, flags);
+}
index d649b39711d49296423963c50e9cd2a9753f5bf0..6b26346191c040f9949094232a7cf8e072949161 100644 (file)
@@ -477,4 +477,8 @@ void __init ep93xx_init_devices(void)
 
        platform_device_register(&ep93xx_rtc_device);
        platform_device_register(&ep93xx_ohci_device);
+
+#ifdef CONFIG_CRUNCH
+       elf_hwcap |= HWCAP_CRUNCH;
+#endif
 }
index ee595786cd22bd32f7db4db242d4d3b79b87012b..2a1bbfe9896fcdf21c6183886176de0d7ea63cd9 100644 (file)
@@ -88,11 +88,11 @@ static struct sys_timer iq81340mc_timer = {
 
 MACHINE_START(IQ81340MC, "Intel IQ81340MC")
        /* Maintainer: Dan Williams <dan.j.williams@intel.com> */
-       .phys_io        = PHYS_IO,
-       .io_pg_offst    = IO_PG_OFFSET,
+       .phys_io        = IOP13XX_PMMR_PHYS_MEM_BASE,
+       .io_pg_offst    = (IOP13XX_PMMR_VIRT_MEM_BASE >> 18) & 0xfffc,
+       .boot_params    = 0x00000100,
        .map_io         = iop13xx_map_io,
        .init_irq       = iop13xx_init_irq,
        .timer          = &iq81340mc_timer,
-       .boot_params    = BOOT_PARAM_OFFSET,
        .init_machine   = iq81340mc_init,
 MACHINE_END
index 6677e14b61bf5f965c15bdda1cd60ad425b824a1..5ad2b62c9bfde0582cc614f386f80591c7e82fe8 100644 (file)
@@ -90,11 +90,11 @@ static struct sys_timer iq81340sc_timer = {
 
 MACHINE_START(IQ81340SC, "Intel IQ81340SC")
        /* Maintainer: Dan Williams <dan.j.williams@intel.com> */
-       .phys_io        = PHYS_IO,
-       .io_pg_offst    = IO_PG_OFFSET,
+       .phys_io        = IOP13XX_PMMR_PHYS_MEM_BASE,
+       .io_pg_offst    = (IOP13XX_PMMR_VIRT_MEM_BASE >> 18) & 0xfffc,
+       .boot_params    = 0x00000100,
        .map_io         = iop13xx_map_io,
        .init_irq       = iop13xx_init_irq,
        .timer          = &iq81340sc_timer,
-       .boot_params    = BOOT_PARAM_OFFSET,
        .init_machine   = iq81340sc_init,
 MACHINE_END
index c4d9c8c5579c575d3b4cdc1724b71cdaf77c765e..dbbc07c38b141349f9883b78019407517cf32a33 100644 (file)
@@ -222,25 +222,29 @@ iop13xx_irq_unmask3(unsigned int irq)
        iop13xx_cp6_restore(cp_flags);
 }
 
-static struct irqchip iop13xx_irqchip0 = {
+static struct irq_chip iop13xx_irqchip1 = {
+       .name   = "IOP13xx-1",
        .ack    = iop13xx_irq_mask0,
        .mask   = iop13xx_irq_mask0,
        .unmask = iop13xx_irq_unmask0,
 };
 
-static struct irqchip iop13xx_irqchip1 = {
+static struct irq_chip iop13xx_irqchip2 = {
+       .name   = "IOP13xx-2",
        .ack    = iop13xx_irq_mask1,
        .mask   = iop13xx_irq_mask1,
        .unmask = iop13xx_irq_unmask1,
 };
 
-static struct irqchip iop13xx_irqchip2 = {
+static struct irq_chip iop13xx_irqchip3 = {
+       .name   = "IOP13xx-3",
        .ack    = iop13xx_irq_mask2,
        .mask   = iop13xx_irq_mask2,
        .unmask = iop13xx_irq_unmask2,
 };
 
-static struct irqchip iop13xx_irqchip3 = {
+static struct irq_chip iop13xx_irqchip4 = {
+       .name   = "IOP13xx-4",
        .ack    = iop13xx_irq_mask3,
        .mask   = iop13xx_irq_mask3,
        .unmask = iop13xx_irq_unmask3,
@@ -270,15 +274,15 @@ void __init iop13xx_init_irq(void)
 
        for(i = 0; i < NR_IOP13XX_IRQS; i++) {
                if (i < 32)
-                       set_irq_chip(i, &iop13xx_irqchip0);
-               else if (i < 64)
                        set_irq_chip(i, &iop13xx_irqchip1);
-               else if (i < 96)
+               else if (i < 64)
                        set_irq_chip(i, &iop13xx_irqchip2);
-               else
+               else if (i < 96)
                        set_irq_chip(i, &iop13xx_irqchip3);
+               else
+                       set_irq_chip(i, &iop13xx_irqchip4);
 
-               set_irq_handler(i, do_level_IRQ);
+               set_irq_handler(i, handle_level_irq);
                set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
        }
 
index 3756d2ccb1a7dfc70044435f8a2394b00bf19a11..5fbeb28d04bb6bcf67ceb976e3d2fae931f6b036 100644 (file)
@@ -337,7 +337,7 @@ void __init iop13xx_platform_init(void)
 
 #ifdef CONFIG_MTD_PHYSMAP
        iq8134x_flash_resource.end = iq8134x_flash_resource.start +
-                               iq8134x_probe_flash_size();
+                               iq8134x_probe_flash_size() - 1;
        if (iq8134x_flash_resource.end > iq8134x_flash_resource.start)
                iop13xx_devices[plat_idx++] = &iq8134x_flash;
        else
index 9f46bf330bc8f314420e2764092d8c4602aa1792..eb4ec411312ba8684d7e6830b2be578c8abf2262 100644 (file)
@@ -5,6 +5,7 @@ menu "S3C24XX Implementations"
 config MACH_AML_M5900
        bool "AML M5900 Series"
        select CPU_S3C2410
+       select PM_SIMTEC if PM
        help
           Say Y here if you are using the American Microsystems M5900 Series
            <http://www.amltd.com>
@@ -12,6 +13,7 @@ config MACH_AML_M5900
 config MACH_ANUBIS
        bool "Simtec Electronics ANUBIS"
        select CPU_S3C2440
+       select PM_SIMTEC if PM
        help
          Say Y here if you are using the Simtec Electronics ANUBIS
          development system
@@ -19,6 +21,7 @@ config MACH_ANUBIS
 config MACH_OSIRIS
        bool "Simtec IM2440D20 (OSIRIS) module"
        select CPU_S3C2440
+       select PM_SIMTEC if PM
        help
          Say Y here if you are using the Simtec IM2440D20 module, also
          known as the Osiris.
@@ -26,6 +29,7 @@ config MACH_OSIRIS
 config ARCH_BAST
        bool "Simtec Electronics BAST (EB2410ITX)"
        select CPU_S3C2410
+       select PM_SIMTEC if PM
        select ISA
        help
          Say Y here if you are using the Simtec Electronics EB2410ITX
@@ -43,14 +47,13 @@ config BAST_PC104_IRQ
 
 config PM_H1940
        bool
-       depends on PM
        help
          Internal node for H1940 and related PM
 
 config ARCH_H1940
        bool "IPAQ H1940"
        select CPU_S3C2410
-       select PM_H1940
+       select PM_H1940 if PM
        help
          Say Y here if you are using the HP IPAQ H1940
 
@@ -112,6 +115,7 @@ config MACH_SMDK2413
 
 config MACH_VR1000
        bool "Thorcom VR1000"
+       select PM_SIMTEC if PM
        select CPU_S3C2410
        help
          Say Y here if you are using the Thorcom VR1000 board.
@@ -122,7 +126,7 @@ config MACH_VR1000
 config MACH_RX3715
        bool "HP iPAQ rx3715"
        select CPU_S3C2440
-       select PM_H1940
+       select PM_H1940 if PM
        help
          Say Y here if you are using the HP iPAQ rx3715.
 
@@ -156,7 +160,6 @@ config S3C2410_CLOCK
 
 config S3C2410_PM
        bool
-       depends on CONFIG_PM
        help
          Power Management code common to S3C2410 and better
 
@@ -171,7 +174,7 @@ config CPU_S3C2410
        bool
        depends on ARCH_S3C2410
        select S3C2410_CLOCK
-       select S3C2410_PM
+       select S3C2410_PM if PM
        help
          Support for S3C2410 and S3C2410A family from the S3C24XX line
          of Samsung Mobile CPUs.
@@ -186,14 +189,13 @@ config CPU_S3C2412_ONLY
 
 config S3C2412_PM
        bool
-       default y if PM
-       depends on CPU_S3C2412
        help
          Internal config node to apply S3C2412 power management
 
 config CPU_S3C2412
        bool
        depends on ARCH_S3C2410
+       select S3C2412_PM if PM
        help
          Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
 
@@ -207,7 +209,7 @@ config CPU_S3C2440
        bool
        depends on ARCH_S3C2410
        select S3C2410_CLOCK
-       select S3C2410_PM
+       select S3C2410_PM if PM
        select CPU_S3C244X
        help
          Support for S3C2440 Samsung Mobile CPU based systems.
@@ -216,7 +218,7 @@ config CPU_S3C2442
        bool
        depends on ARCH_S3C2420
        select S3C2410_CLOCK
-       select S3C2410_PM
+       select S3C2410_PM if PM
        select CPU_S3C244X
        help
          Support for S3C2442 Samsung Mobile CPU based systems.
@@ -300,8 +302,9 @@ config S3C2410_PM_CHECK_CHUNKSIZE
 
 config PM_SIMTEC
        bool
-       depends on PM && (ARCH_BAST || MACH_VR1000 || MACH_AML_M5900)
-       default y
+       help
+         Common power management code for systems that are
+         compatible with the Simtec style of power management
 
 config S3C2410_LOWLEVEL_UART_PORT
        int "S3C2410 UART to use for low-level messages"
index 9d4899eddf1f26ccccc8906504c25578c11a4378..ae1f5bb63f7a809081a31a437aa983b944c66fa1 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/hardware.h>
index cae35ff76f339b8be674b5f10262cbcc301bed44..faccde2092d2f353617e61893218c50a263ab22c 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
index 01abb0ace234ad823df9ad39b90ab719f1167d4e..717322a0916bd4f9a9f5831a11db6d6cb3fecc83 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/dma.c
  *
- * (c) 2003-2005,2006 Simtec Electronics
+ * Copyright (c) 2003-2005,2006 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 DMA core
index 3686a00822459b20bced746696e2681f81a46f48..e5913da3b919bb3ffbffbbf48a94c129b6e8d243 100644 (file)
@@ -8,8 +8,6 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
- * Modifications:
 */
 
 #define irqdbf(x...)
index e94cdcd965916437970151942ef26c31af8f1c6d..0fad0c2fe07b3b33d72b5d92dc2f0629dddd6934 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
index 2968fb235f95504b800b9fe2dd3f28d40ed68ed8..b8b76757ec54a70272a9107b06f5b554a50d299f 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/dm9000.h>
 
index f5b98099a5d9cb1c925d060eb0b472be65078e6e..15b625eae499e2e13b0d3e61dea07a7963347520 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
@@ -37,8 +38,6 @@
 #include <asm/arch/h1940-latch.h>
 #include <asm/arch/fb.h>
 
-#include <linux/serial_core.h>
-
 #include "clock.h"
 #include "devs.h"
 #include "cpu.h"
index 116ac31699664cc3f98eaca5a054393c9aea844b..0411e9adb54d9b208682d849859a5dd16c97f08d 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/kthread.h>
 
@@ -37,8 +38,6 @@
 #include <asm/arch/regs-gpio.h>
 #include <asm/arch/iic.h>
 
-#include <linux/serial_core.h>
-
 #include "s3c2410.h"
 #include "clock.h"
 #include "devs.h"
index 065a1d4e860b53fd15fe8cd789917a1ffe471b26..d6dfdad8c90bbdd9d4d442dd0c64ec40086c510a 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/string.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <linux/mtd/map.h>
index a4ab144e7292622d4c4968fb43c8da5544a557de..37b40850c9b9006d9caeef435fc2a08ce24ee4a6 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/serial_core.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index c71673fd9955e24558b9be628644cd48890fb60f..2c738b375e4d6da64359154ea3f0073f6e6a2ea9 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
index b3b0171d5052bb06f953187e57b70aa2340a2925..01c0c986d827de5d12f775aaf4abce49a7bd988e 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
index 3a4ca7f6f7b9b7bf4d51d1053c00cf31132a2ac7..4f89abd7a6dfcd03a58365e562fe205b73414618 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
index e2205ff1b0ee97b76d9038815e6b864e77b3d93b..2b61f4ed1da410fa21449d3ce95af14c80b0c005 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
index e2eda3937ab08915ca1c98b4c3abbfb50567be9e..a382fc095110ec21b9b07563a0b140893e40db98 100644 (file)
@@ -352,7 +352,7 @@ static struct platform_device vr1000_led2 = {
 
 static struct platform_device vr1000_led3 = {
        .name           = "s3c24xx_led",
-       .id             = 1,
+       .id             = 3,
        .dev            = {
                .platform_data  = &vr1000_led3_pdata,
        },
index ea554e7c006e9793f829353faac57489c6a627a2..0360e1055bcd7485e1b6f8e0cfee40310644e4c4 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <linux/mtd/mtd.h>
index 42cd05e298f8dc5765e495712558f271ef4aa91d..619133eb716802b9002c6b44022591f44b80cddd 100644 (file)
@@ -27,7 +27,6 @@
 #include <asm/io.h>
 
 #include <asm/arch/map.h>
-#include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-gpio.h>
 #include <asm/arch/regs-mem.h>
 
index b49a0b3b72b319562dcaf4763627ee52c85ad6de..00834097eb8244567e345f62b5c1b1afe7eca175 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/crc32.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
+#include <linux/serial_core.h>
 
 #include <asm/cacheflush.h>
 #include <asm/hardware.h>
index 00abe199a08eca05ac62644f85a49666e0fbd0ee..992cc6af230e676817185742f5ad6f3e792c5af8 100644 (file)
 #include <linux/clk.h>
 #include <linux/mutex.h>
 #include <linux/delay.h>
+#include <linux/serial_core.h>
+
+#include <asm/mach/map.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
 
+#include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-clock.h>
 #include <asm/arch/regs-gpio.h>
 
+#include "s3c2410.h"
 #include "clock.h"
 #include "cpu.h"
 
index 51e5098b32e870c65dcec8fb120a1770c0547e18..e67ba3911f111e690c9554f12182faa5e52c77f9 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2410-dma.c
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 DMA selection
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sysdev.h>
+#include <linux/serial_core.h>
 
 #include <asm/dma.h>
 #include <asm/arch/dma.h>
@@ -131,6 +132,7 @@ static int s3c2410_dma_add(struct sys_device *sysdev)
        return s3c24xx_dma_init_map(&s3c2410_dma_sel);
 }
 
+#if defined(CONFIG_CPU_S3C2410)
 static struct sysdev_driver s3c2410_dma_driver = {
        .add    = s3c2410_dma_add,
 };
@@ -141,9 +143,10 @@ static int __init s3c2410_dma_init(void)
 }
 
 arch_initcall(s3c2410_dma_init);
+#endif
 
+#if defined(CONFIG_CPU_S3C2442)
 /* S3C2442 DMA contains the same selection table as the S3C2410 */
-
 static struct sysdev_driver s3c2442_dma_driver = {
        .add    = s3c2410_dma_add,
 };
@@ -154,5 +157,5 @@ static int __init s3c2442_dma_init(void)
 }
 
 arch_initcall(s3c2442_dma_init);
-
+#endif
 
index 77c6814c0f0507599c650e72d35bfd3d071b6c58..8bb6e5e21f591b8716569f562a694ac3cd797258 100644 (file)
@@ -87,7 +87,7 @@ static void s3c2410_pm_prepare(void)
 
 }
 
-int s3c2410_pm_resume(struct sys_device *dev)
+static int s3c2410_pm_resume(struct sys_device *dev)
 {
        unsigned long tmp;
 
@@ -111,6 +111,7 @@ static int s3c2410_pm_add(struct sys_device *dev)
        return 0;
 }
 
+#if defined(CONFIG_CPU_S3C2410)
 static struct sysdev_driver s3c2410_pm_driver = {
        .add            = s3c2410_pm_add,
        .resume         = s3c2410_pm_resume,
@@ -124,7 +125,9 @@ static int __init s3c2410_pm_drvinit(void)
 }
 
 arch_initcall(s3c2410_pm_drvinit);
+#endif
 
+#if defined(CONFIG_CPU_S3C2440)
 static struct sysdev_driver s3c2440_pm_driver = {
        .add            = s3c2410_pm_add,
        .resume         = s3c2410_pm_resume,
@@ -136,7 +139,9 @@ static int __init s3c2440_pm_drvinit(void)
 }
 
 arch_initcall(s3c2440_pm_drvinit);
+#endif
 
+#if defined(CONFIG_CPU_S3C2442)
 static struct sysdev_driver s3c2442_pm_driver = {
        .add            = s3c2410_pm_add,
        .resume         = s3c2410_pm_resume,
@@ -148,3 +153,4 @@ static int __init s3c2442_pm_drvinit(void)
 }
 
 arch_initcall(s3c2442_pm_drvinit);
+#endif
index 183e4033ce617b07b9c5bff936d454e21292b47d..4cdc0d70c19f3fa6203440a6ea2f3082575c9861 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/sysdev.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
 /* Initial IO mappings */
 
 static struct map_desc s3c2410_iodesc[] __initdata = {
-       IODESC_ENT(USBHOST),
        IODESC_ENT(CLKPWR),
        IODESC_ENT(LCD),
        IODESC_ENT(TIMER),
-       IODESC_ENT(ADC),
        IODESC_ENT(WATCHDOG),
 };
 
index c95ed3e18580a9a1db711a95f73063f433b1eebd..8f94ad83901db64ed762ba6c2c400cc8d12d1937 100644 (file)
 #include <linux/clk.h>
 #include <linux/mutex.h>
 #include <linux/delay.h>
+#include <linux/serial_core.h>
+
+#include <asm/mach/map.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
 
+#include <asm/arch/regs-serial.h>
 #include <asm/arch/regs-clock.h>
 #include <asm/arch/regs-gpio.h>
 
+#include "s3c2412.h"
 #include "clock.h"
 #include "cpu.h"
 
@@ -49,7 +54,7 @@
  * set the correct muxing at initialisation
 */
 
-int s3c2412_clkcon_enable(struct clk *clk, int enable)
+static int s3c2412_clkcon_enable(struct clk *clk, int enable)
 {
        unsigned int clocks = clk->ctrlbit;
        unsigned long clkcon;
@@ -556,7 +561,7 @@ struct clk_init {
        struct clk      *src_1;
 };
 
-struct clk_init clks_src[] __initdata = {
+static struct clk_init clks_src[] __initdata = {
        {
                .clk    = &clk_usysclk,
                .bit    = S3C2412_CLKSRC_USBCLK_HCLK,
@@ -619,7 +624,7 @@ static void __init s3c2412_clk_initparents(void)
 
 /* clocks to add straight away */
 
-struct clk *clks[] __initdata = {
+static struct clk *clks[] __initdata = {
        &clk_ext,
        &clk_usb_bus,
        &clk_erefclk,
index 171f3706d36d051a86a6c2eba20c0ef0e42a920e..fe71a8fdb87cd55eadc2fe751e32bb05a336a392 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2412-dma.c
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2412 DMA selection
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sysdev.h>
+#include <linux/serial_core.h>
 
 #include <asm/dma.h>
 #include <asm/arch/dma.h>
index e76431c41461f1f195fd77625da0134f77576155..2f651a811ecd5f6c513a5731274192ba28c03673 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/sysdev.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
@@ -60,7 +61,6 @@ static struct map_desc s3c2412_iodesc[] __initdata = {
        IODESC_ENT(CLKPWR),
        IODESC_ENT(LCD),
        IODESC_ENT(TIMER),
-       IODESC_ENT(ADC),
        IODESC_ENT(WATCHDOG),
 };
 
index 15796864d0107911f01aa21dee324b760d960be0..ba13c1d079d100c9b4759b6c89039bd46cf782b5 100644 (file)
@@ -113,18 +113,18 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
 {
        unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
        unsigned long clkdivn;
-       struct clk *clk_h;
-       struct clk *clk_p;
-       struct clk *clk_upll;
+       struct clk *clock_h;
+       struct clk *clock_p;
+       struct clk *clock_upll;
 
        printk("S3C2440: Clock Support, DVS %s\n",
               (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
 
-       clk_p = clk_get(NULL, "pclk");
-       clk_h = clk_get(NULL, "hclk");
-       clk_upll = clk_get(NULL, "upll");
+       clock_p = clk_get(NULL, "pclk");
+       clock_h = clk_get(NULL, "hclk");
+       clock_upll = clk_get(NULL, "upll");
 
-       if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) {
+       if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
                printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");
                return -EINVAL;
        }
@@ -132,8 +132,8 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
        /* check rate of UPLL, and if it is near 96MHz, then change
         * to using half the UPLL rate for the system */
 
-       if (clk_get_rate(clk_upll) > (94 * MHZ)) {
-               clk_usb_bus.rate = clk_get_rate(clk_upll) / 2;
+       if (clk_get_rate(clock_upll) > (94 * MHZ)) {
+               clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
 
                mutex_lock(&clocks_mutex);
 
@@ -144,9 +144,9 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
                mutex_unlock(&clocks_mutex);
        }
 
-       s3c2440_clk_cam.parent = clk_h;
-       s3c2440_clk_ac97.parent = clk_p;
-       s3c2440_clk_cam_upll.parent = clk_upll;
+       s3c2440_clk_cam.parent = clock_h;
+       s3c2440_clk_ac97.parent = clock_p;
+       s3c2440_clk_cam_upll.parent = clock_upll;
 
        s3c24xx_register_clock(&s3c2440_clk_ac97);
        s3c24xx_register_clock(&s3c2440_clk_cam);
index 11e109c84a15970e432e7060df1fbc9fe481b4fe..47b861b9443d7d0a864e0f3d367987e8c0e251de 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2440-dma.c
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2440 DMA selection
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sysdev.h>
+#include <linux/serial_core.h>
 
 #include <asm/dma.h>
 #include <asm/arch/dma.h>
index 0ab50f44f318bef575e414ef24d44430996492ce..344eb27cca48cf7ecb8138431348bf6d46d03c15 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/serial_core.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include <asm/arch/regs-clock.h>
-#include <asm/arch/regs-serial.h>
-#include <asm/arch/regs-gpio.h>
-#include <asm/arch/regs-gpioj.h>
-#include <asm/arch/regs-dsc.h>
-
 #include "s3c2440.h"
-#include "clock.h"
 #include "devs.h"
 #include "cpu.h"
-#include "pm.h"
 
 static struct sys_device s3c2440_sysdev = {
        .cls            = &s3c2440_sysclass,
index 29cb6df65a481bcafa00ce1cd189a17a199d4908..dcd316076c595e3c1c014d7d64a59f95dd20669c 100644 (file)
@@ -8,28 +8,10 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
- * Modifications:
- *     24-Aug-2004 BJD  Start of S3C2440 CPU support
- *     04-Nov-2004 BJD  Added s3c2440_init_uarts()
- *     04-Jan-2005 BJD  Moved uart init to cpu code
- *     10-Jan-2005 BJD  Moved 2440 specific init here
- *     14-Jan-2005 BJD  Split the clock initialisation code
 */
 
 #ifdef CONFIG_CPU_S3C2440
-
 extern  int s3c2440_init(void);
-
-extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
-
-extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-
-extern void s3c2440_init_clocks(int xtal);
-
 #else
-#define s3c2440_init_clocks NULL
-#define s3c2440_init_uarts NULL
-#define s3c2440_map_io NULL
 #define s3c2440_init NULL
 #endif
index d9f54b5cab7ff759e028cbadb8dd1c1edc5aa929..4e292ca7c9be7f7731fffe76ee2a1c358384546c 100644 (file)
@@ -117,18 +117,18 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
 {
        unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
        unsigned long clkdivn;
-       struct clk *clk_h;
-       struct clk *clk_p;
-       struct clk *clk_upll;
+       struct clk *clock_h;
+       struct clk *clock_p;
+       struct clk *clock_upll;
 
        printk("S3C2442: Clock Support, DVS %s\n",
               (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
 
-       clk_p = clk_get(NULL, "pclk");
-       clk_h = clk_get(NULL, "hclk");
-       clk_upll = clk_get(NULL, "upll");
+       clock_p = clk_get(NULL, "pclk");
+       clock_h = clk_get(NULL, "hclk");
+       clock_upll = clk_get(NULL, "upll");
 
-       if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) {
+       if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
                printk(KERN_ERR "S3C2442: Failed to get parent clocks\n");
                return -EINVAL;
        }
@@ -136,8 +136,8 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
        /* check rate of UPLL, and if it is near 96MHz, then change
         * to using half the UPLL rate for the system */
 
-       if (clk_get_rate(clk_upll) > (94 * MHZ)) {
-               clk_usb_bus.rate = clk_get_rate(clk_upll) / 2;
+       if (clk_get_rate(clock_upll) > (94 * MHZ)) {
+               clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
 
                mutex_lock(&clocks_mutex);
 
@@ -148,8 +148,8 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
                mutex_unlock(&clocks_mutex);
        }
 
-       s3c2442_clk_cam.parent = clk_h;
-       s3c2442_clk_cam_upll.parent = clk_upll;
+       s3c2442_clk_cam.parent = clock_h;
+       s3c2442_clk_cam_upll.parent = clock_upll;
 
        s3c24xx_register_clock(&s3c2442_clk_cam);
        s3c24xx_register_clock(&s3c2442_clk_cam_upll);
index 581667efd13c8f8c84af03b80b00796a8ac6482d..428732ee68c41520c4cf4acb72ff4b5f6d11c166 100644 (file)
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
-#include <linux/platform_device.h>
+#include <linux/serial_core.h>
 #include <linux/sysdev.h>
-#include <linux/clk.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-#include <asm/mach/irq.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-
-#include <asm/arch/regs-clock.h>
-#include <asm/arch/regs-serial.h>
-#include <asm/arch/regs-gpio.h>
-#include <asm/arch/regs-gpioj.h>
-#include <asm/arch/regs-dsc.h>
 
 #include "s3c2442.h"
-#include "clock.h"
-#include "devs.h"
 #include "cpu.h"
-#include "pm.h"
 
 static struct sys_device s3c2442_sysdev = {
        .cls            = &s3c2442_sysclass,
index 9a2258270de9cb1e7e9d12b9b45b90f9092d3582..23c7494ad10d57ce685de8e74da04c74da6a9261 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
@@ -47,8 +48,6 @@ static struct map_desc s3c244x_iodesc[] __initdata = {
        IODESC_ENT(TIMER),
        IODESC_ENT(WATCHDOG),
        IODESC_ENT(LCD),
-       IODESC_ENT(ADC),
-       IODESC_ENT(USBHOST),
 };
 
 /* uart initialisation */
index d8aa6127dedb6826e4068ce637895b26d8074fe2..03842ede9e711d903cc17f4c44de5720f1dfc6ca 100644 (file)
@@ -10,9 +10,6 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
- * Modifications:
- *     20-Aug-2004 BJD  Created
 */
 
 extern int usb_simtec_init(void);
index 3bb3951920bc9809b31ee19e184cc6e3475deea1..251685fe73a8841ec51190bf66f23fcf777009c9 100644 (file)
@@ -292,6 +292,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
        if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
                return NULL;
 
+       size = PAGE_ALIGN(size);
+
        area = get_vm_area(size, VM_IOREMAP);
        if (!area)
                return NULL;
index f028aef9a861f284f280abf52f00fa106bdcad26..655c8376f0b57b73ee48dca75ce0197e619605ac 100644 (file)
@@ -154,6 +154,26 @@ static int __init noalign_setup(char *__unused)
 }
 __setup("noalign", noalign_setup);
 
+#ifndef CONFIG_SMP
+void adjust_cr(unsigned long mask, unsigned long set)
+{
+       unsigned long flags;
+
+       mask &= ~CR_A;
+
+       set &= mask;
+
+       local_irq_save(flags);
+
+       cr_no_alignment = (cr_no_alignment & ~mask) | set;
+       cr_alignment = (cr_alignment & ~mask) | set;
+
+       set_cr((get_cr() & ~mask) | set);
+
+       local_irq_restore(flags);
+}
+#endif
+
 struct mem_types {
        unsigned int    prot_pte;
        unsigned int    prot_l1;
index 43494ae8f01af9acd083e2e6a1e66a2e12544da5..94a58455f346cca45fd759af3cb899b03594efd0 100644 (file)
@@ -2,7 +2,7 @@
  * linux/arch/arm/mm/proc-xsc3.S
  *
  * Original Author: Matthew Gilbert
- * Current Maintainer: Deepak Saxena <dsaxena@plexity.net>
+ * Current Maintainer: Lennert Buytenhek <buytenh@wantstofly.org>
  *
  * Copyright 2004 (C) Intel Corp.
  * Copyright 2005 (c) MontaVista Software, Inc.
index b75cff25de4b105b7c4c510d4de9752f053c2488..199016927541871f4dc18a4d0e746e03873ba700 100644 (file)
@@ -785,7 +785,11 @@ static int apm_do_idle(void)
        polling = !!(current_thread_info()->status & TS_POLLING);
        if (polling) {
                current_thread_info()->status &= ~TS_POLLING;
-               smp_mb__after_clear_bit();
+               /*
+                * TS_POLLING-cleared state must be visible before we
+                * test NEED_RESCHED:
+                */
+               smp_mb();
        }
        if (!need_resched()) {
                idled = 1;
index 2f7d0a92fd7cbbb53d5eabc34c8ce5e6e7be8557..f391abcf7da901d2b4320eb2618dc53feddf63c1 100644 (file)
@@ -668,7 +668,7 @@ void __init register_bootmem_low_pages(unsigned long max_low_pfn)
        }
 }
 
-void __init register_memory(void)
+void __init e820_register_memory(void)
 {
        unsigned long gapstart, gapsize, round;
        unsigned long long last;
index 47ffec57c0cb28f4aa0ef6a74fbe665f9c42824f..c8fa13721bcb8f3b3023f6a64208d4b2bcd95f94 100644 (file)
@@ -722,7 +722,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
        return NOTIFY_OK;
 }
 
-static struct notifier_block mc_cpu_notifier = {
+static struct notifier_block __cpuinitdata mc_cpu_notifier = {
        .notifier_call = mc_cpu_callback,
 };
 
index 99308510a17c7fdab49f6a90a1f09e9f9917cf37..c641056233a60a2bffaff12edae8773018019945 100644 (file)
@@ -102,7 +102,12 @@ void default_idle(void)
 {
        if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
                current_thread_info()->status &= ~TS_POLLING;
-               smp_mb__after_clear_bit();
+               /*
+                * TS_POLLING-cleared state must be visible before we
+                * test NEED_RESCHED:
+                */
+               smp_mb();
+
                local_irq_disable();
                if (!need_resched())
                        safe_halt();    /* enables interrupts racelessly */
index f3f94ac5736a254c4a97eb58aa7335a70328df18..af8aabe8580034970071a8ddb57630fbc619ace9 100644 (file)
@@ -45,7 +45,7 @@
 /*
  * Offset of eflags on child stack..
  */
-#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs))
+#define EFL_OFFSET offsetof(struct pt_regs, eflags)
 
 static inline struct pt_regs *get_child_regs(struct task_struct *task)
 {
@@ -54,24 +54,24 @@ static inline struct pt_regs *get_child_regs(struct task_struct *task)
 }
 
 /*
- * this routine will get a word off of the processes privileged stack. 
- * the offset is how far from the base addr as stored in the TSS.  
- * this routine assumes that all the privileged stacks are in our
+ * This routine will get a word off of the processes privileged stack.
+ * the offset is bytes into the pt_regs structure on the stack.
+ * This routine assumes that all the privileged stacks are in our
  * data space.
  */   
 static inline int get_stack_long(struct task_struct *task, int offset)
 {
        unsigned char *stack;
 
-       stack = (unsigned char *)task->thread.esp0;
+       stack = (unsigned char *)task->thread.esp0 - sizeof(struct pt_regs);
        stack += offset;
        return (*((int *)stack));
 }
 
 /*
- * this routine will put a word on the processes privileged stack. 
- * the offset is how far from the base addr as stored in the TSS.  
- * this routine assumes that all the privileged stacks are in our
+ * This routine will put a word on the processes privileged stack.
+ * the offset is bytes into the pt_regs structure on the stack.
+ * This routine assumes that all the privileged stacks are in our
  * data space.
  */
 static inline int put_stack_long(struct task_struct *task, int offset,
@@ -79,7 +79,7 @@ static inline int put_stack_long(struct task_struct *task, int offset,
 {
        unsigned char * stack;
 
-       stack = (unsigned char *) task->thread.esp0;
+       stack = (unsigned char *)task->thread.esp0 - sizeof(struct pt_regs);
        stack += offset;
        *(unsigned long *) stack = data;
        return 0;
@@ -114,7 +114,7 @@ static int putreg(struct task_struct *child,
        }
        if (regno > ES*4)
                regno -= 1*4;
-       put_stack_long(child, regno - sizeof(struct pt_regs), value);
+       put_stack_long(child, regno, value);
        return 0;
 }
 
@@ -137,7 +137,6 @@ static unsigned long getreg(struct task_struct *child,
                default:
                        if (regno > ES*4)
                                regno -= 1*4;
-                       regno = regno - sizeof(struct pt_regs);
                        retval &= get_stack_long(child, regno);
        }
        return retval;
index 79df6e612dbd03a20bfcc959dbb1ceba7158c1dd..6f6cb7b31d18a6384f7debe36040fd4ae80ff07e 100644 (file)
@@ -639,7 +639,7 @@ void __init setup_arch(char **cmdline_p)
                get_smp_config();
 #endif
 
-       register_memory();
+       e820_register_memory();
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
index 103b76e56a9484ea579f0a14f4626859a2e4bf8b..e0c390d6ceb526464d3c3b220e0fdc59f138ec8e 100644 (file)
@@ -405,3 +405,31 @@ void __init set_highmem_pages_init(int bad_ppro)
        totalram_pages += totalhigh_pages;
 #endif
 }
+
+#ifdef CONFIG_MEMORY_HOTPLUG
+int paddr_to_nid(u64 addr)
+{
+       int nid;
+       unsigned long pfn = PFN_DOWN(addr);
+
+       for_each_node(nid)
+               if (node_start_pfn[nid] <= pfn &&
+                   pfn < node_end_pfn[nid])
+                       return nid;
+
+       return -1;
+}
+
+/*
+ * This function is used to ask node id BEFORE memmap and mem_section's
+ * initialization (pfn_to_nid() can't be used yet).
+ * If _PXM is not defined on ACPI's DSDT, node id must be found by this.
+ */
+int memory_add_physaddr_to_nid(u64 addr)
+{
+       int nid = paddr_to_nid(addr);
+       return (nid >= 0) ? nid : 0;
+}
+
+EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
+#endif
index 84697dfc7348b93c6be087584b8653a0e6fd427b..60a7e57af19796fb7876222e67bf76d64dc2fb15 100644 (file)
@@ -673,16 +673,10 @@ void __init mem_init(void)
 #endif
 }
 
-/*
- * this is for the non-NUMA, single node SMP system case.
- * Specifically, in the case of x86, we will always add
- * memory to the highmem for now.
- */
 #ifdef CONFIG_MEMORY_HOTPLUG
-#ifndef CONFIG_NEED_MULTIPLE_NODES
 int arch_add_memory(int nid, u64 start, u64 size)
 {
-       struct pglist_data *pgdata = &contig_page_data;
+       struct pglist_data *pgdata = NODE_DATA(nid);
        struct zone *zone = pgdata->node_zones + ZONE_HIGHMEM;
        unsigned long start_pfn = start >> PAGE_SHIFT;
        unsigned long nr_pages = size >> PAGE_SHIFT;
@@ -694,7 +688,7 @@ int remove_memory(u64 start, u64 size)
 {
        return -EINVAL;
 }
-#endif
+EXPORT_SYMBOL_GPL(remove_memory);
 #endif
 
 struct kmem_cache *pgd_cache;
index cde1170b01a1490e256ab2900cfef82f97787e0f..8053b17ab64753541d9684369c6999f166ccecd7 100644 (file)
@@ -115,7 +115,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, pci
 #define VIA_8363_KL133_REVISION_ID 0x81
 #define VIA_8363_KM133_REVISION_ID 0x84
 
-static void __devinit pci_fixup_via_northbridge_bug(struct pci_dev *d)
+static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
 {
        u8 v;
        u8 revision;
@@ -151,6 +151,10 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_northbridge_bug);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
 
 /*
  * For some reasons Intel decided that certain parts of their
@@ -181,7 +185,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixup_transparent_
  * issue another HALT within 80 ns of the initial HALT, the failure condition
  * is avoided.
  */
-static void __init pci_fixup_nforce2(struct pci_dev *dev)
+static void pci_fixup_nforce2(struct pci_dev *dev)
 {
        u32 val;
 
@@ -204,6 +208,7 @@ static void __init pci_fixup_nforce2(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
 
 /* Max PCI Express root ports */
 #define MAX_PCIEROOT   6
@@ -419,7 +424,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_TI, 0x8032,
  * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
  * configuration space.
  */
-static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
+static void pci_early_fixup_cyrix_5530(struct pci_dev *dev)
 {
        u8 r;
        /* clear 'F4 Video Configuration Trap' bit */
@@ -429,3 +434,5 @@ static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
                        pci_early_fixup_cyrix_5530);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
+                       pci_early_fixup_cyrix_5530);
index 51922b98086afb1919a174772206263ab9519a39..17685abaf49642659b1598f8d5474168c05bc19e 100644 (file)
@@ -268,10 +268,16 @@ cpu_idle (void)
 
        /* endless idle loop with no priority at all */
        while (1) {
-               if (can_do_pal_halt)
+               if (can_do_pal_halt) {
                        current_thread_info()->status &= ~TS_POLLING;
-               else
+                       /*
+                        * TS_POLLING-cleared state must be visible before we
+                        * test NEED_RESCHED:
+                        */
+                       smp_mb();
+               } else {
                        current_thread_info()->status |= TS_POLLING;
+               }
 
                if (!need_resched()) {
                        void (*idle)(void);
index 343dbcfdf08a6484425666e3038cf2f6fd5a6e17..98392fb5f5815243b0ede4a76ef676f782de1bfb 100644 (file)
@@ -152,6 +152,9 @@ $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits)
 $(obj)/zImage.ps3: vmlinux
        $(STRIP) -s -R .comment $< -o $@
 
+$(obj)/zImage.initrd.ps3: vmlinux
+       @echo "  WARNING zImage.initrd.ps3 not supported (yet)"
+
 $(obj)/uImage: vmlinux $(wrapperbits)
        $(call cmd,wrap,uboot)
 
index a98c982c73adac65956e939be1c58af65e08a6a5..d1d25152f74f8a2db4b63771099a7065969ed6d5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19-rc6
-# Wed Nov 22 15:33:04 2006
+# Linux kernel version: 2.6.20-rc1
+# Tue Dec 19 14:59:53 2006
 #
 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 is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -66,6 +69,7 @@ CONFIG_SYSVIPC=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
@@ -128,14 +132,16 @@ 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
 CONFIG_PPC_CELL=y
 CONFIG_PPC_CELL_NATIVE=y
 CONFIG_PPC_IBM_CELL_BLADE=y
-CONFIG_UDBG_RTAS_CONSOLE=y
 CONFIG_PPC_PS3=y
+CONFIG_PPC_NATIVE=y
+CONFIG_UDBG_RTAS_CONSOLE=y
 # CONFIG_U3_DART is not set
 CONFIG_PPC_RTAS=y
 # CONFIG_RTAS_ERROR_LOGGING is not set
@@ -177,12 +183,14 @@ CONFIG_CBE_CPUFREQ=m
 CONFIG_PS3_HTAB_SIZE=20
 # CONFIG_PS3_DYNAMIC_DMA is not set
 CONFIG_PS3_USE_LPAR_ADDR=y
+CONFIG_PS3_VUART=y
 
 #
 # Kernel options
 #
 # 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
@@ -237,6 +245,7 @@ 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
 
 #
@@ -270,7 +279,10 @@ CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_PNP is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
 CONFIG_NET_IPIP=y
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
@@ -289,6 +301,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
@@ -317,31 +330,67 @@ CONFIG_NETFILTER=y
 #
 # Core Netfilter Configuration
 #
-# CONFIG_NETFILTER_NETLINK is not set
-# CONFIG_NETFILTER_XTABLES is not set
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 
 #
 # IP: Netfilter Configuration
 #
-CONFIG_IP_NF_CONNTRACK=y
-# 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=y
-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_IP_NF_QUEUE=m
+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_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=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_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
 
 #
 # IPv6: Netfilter Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
 
 #
 # DCCP Configuration (EXPERIMENTAL)
@@ -373,6 +422,7 @@ CONFIG_IP_NF_QUEUE=m
 # QoS and/or fair queueing
 #
 # CONFIG_NET_SCHED is not set
+CONFIG_NET_CLS_ROUTE=y
 
 #
 # Network testing
@@ -428,6 +478,7 @@ CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_CRYPTOLOOP is not set
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=131072
@@ -457,6 +508,7 @@ CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_BLK_DEV_IDECD is not set
 # CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
 
 #
@@ -468,7 +520,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
@@ -492,6 +543,7 @@ CONFIG_BLK_DEV_AEC62XX=y
 # CONFIG_BLK_DEV_PDC202XX_NEW is not set
 # CONFIG_BLK_DEV_SVWKS is not set
 CONFIG_BLK_DEV_SIIMAGE=y
+# 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
@@ -505,8 +557,74 @@ CONFIG_IDEDMA_AUTO=y
 # SCSI device support
 #
 # CONFIG_RAID_ATTRS is not set
-# CONFIG_SCSI is not set
+CONFIG_SCSI=m
+# CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# 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
+#
+# 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
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_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_SCSI_HPTIOP is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 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
@@ -538,6 +656,9 @@ CONFIG_DM_MULTIPATH=m
 # Fusion MPT device support
 #
 # CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
@@ -552,6 +673,7 @@ CONFIG_DM_MULTIPATH=m
 #
 # Macintosh device drivers
 #
+# CONFIG_MAC_EMUMOUSEBTN is not set
 # CONFIG_WINDFARM is not set
 
 #
@@ -559,7 +681,7 @@ CONFIG_DM_MULTIPATH=m
 #
 CONFIG_NETDEVICES=y
 # CONFIG_DUMMY is not set
-CONFIG_BONDING=y
+CONFIG_BONDING=m
 # CONFIG_EQUALIZER is not set
 CONFIG_TUN=y
 
@@ -604,11 +726,11 @@ CONFIG_E1000_NAPI=y
 # CONFIG_R8169 is not set
 # CONFIG_SIS190 is not set
 CONFIG_SKGE=m
-# CONFIG_SKY2 is not set
+CONFIG_SKY2=m
 # CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
+CONFIG_TIGON3=y
 # CONFIG_BNX2 is not set
-CONFIG_SPIDER_NET=m
+CONFIG_SPIDER_NET=y
 # CONFIG_QLA3XXX is not set
 
 #
@@ -618,6 +740,7 @@ CONFIG_SPIDER_NET=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
@@ -637,6 +760,7 @@ CONFIG_SPIDER_NET=m
 # CONFIG_HIPPI is not set
 # CONFIG_PPP is not set
 # CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
@@ -703,6 +827,7 @@ CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_DIGIEPCA is not set
 # CONFIG_MOXA_INTELLIO is not set
 # CONFIG_MOXA_SMARTIO is not set
+# CONFIG_MOXA_SMARTIO_NEW is not set
 # CONFIG_ISI is not set
 # CONFIG_SYNCLINK is not set
 # CONFIG_SYNCLINKMP is not set
@@ -729,6 +854,7 @@ 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
@@ -756,16 +882,17 @@ CONFIG_WATCHDOG_RTAS=y
 #
 # CONFIG_PCIPCWATCHDOG is not set
 # CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
 # CONFIG_HW_RANDOM is not set
 CONFIG_GEN_RTC=y
 # CONFIG_GEN_RTC_X is not set
 # 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
@@ -855,12 +982,14 @@ CONFIG_I2C_ALGOBIT=y
 # Digital Video Broadcasting Devices
 #
 # CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
 
 #
 # Graphics support
 #
 CONFIG_FIRMWARE_EDID=y
 # CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
 
 #
 # Console display driver support
@@ -874,18 +1003,145 @@ CONFIG_DUMMY_CONSOLE=y
 #
 # CONFIG_SOUND is not set
 
+#
+# HID Devices
+#
+CONFIG_HID=m
+
 #
 # USB support
 #
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+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
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+# CONFIG_USB_EHCI_SPLIT_ISO is not set
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_UHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
 
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Input Devices
+#
+# CONFIG_USB_HID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# 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
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM 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
+
+#
+# USB DSL modem support
+#
+
 #
 # USB Gadget Support
 #
@@ -912,7 +1168,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # InfiniBand support
 #
-CONFIG_INFINIBAND=y
+CONFIG_INFINIBAND=m
 CONFIG_INFINIBAND_USER_MAD=m
 CONFIG_INFINIBAND_USER_ACCESS=m
 CONFIG_INFINIBAND_ADDR_TRANS=y
@@ -922,6 +1178,8 @@ CONFIG_INFINIBAND_MTHCA_DEBUG=y
 CONFIG_INFINIBAND_IPOIB=m
 CONFIG_INFINIBAND_IPOIB_DEBUG=y
 CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
+# CONFIG_INFINIBAND_SRP is not set
+# CONFIG_INFINIBAND_ISER is not set
 
 #
 # EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
@@ -945,6 +1203,10 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
 # DMA Devices
 #
 
+#
+# Virtualization
+#
+
 #
 # File systems
 #
@@ -1028,23 +1290,18 @@ CONFIG_RAMFS=y
 #
 # Network File Systems
 #
-CONFIG_NFS_FS=m
+CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 # CONFIG_NFS_V4 is not set
 # CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
+CONFIG_SUNRPC=y
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1119,9 +1376,15 @@ CONFIG_NLS_ISO8859_15=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 is not set
 # CONFIG_CRC16 is not set
 CONFIG_CRC32=y
@@ -1130,7 +1393,10 @@ CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 CONFIG_TEXTSEARCH=y
 CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
 CONFIG_PLIST=y
+CONFIG_IOMAP_COPY=y
 
 #
 # Instrumentation Support
@@ -1146,6 +1412,8 @@ CONFIG_OPROFILE=y
 # CONFIG_ENABLE_MUST_CHECK is not set
 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=15
 CONFIG_DETECT_SOFTLOCKUP=y
@@ -1159,12 +1427,11 @@ CONFIG_DEBUG_MUTEXES=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
-# 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
@@ -1191,6 +1458,7 @@ CONFIG_CRYPTO_BLKCIPHER=m
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
 # CONFIG_CRYPTO_NULL is not set
 # CONFIG_CRYPTO_MD4 is not set
 CONFIG_CRYPTO_MD5=m
@@ -1199,8 +1467,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=m
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
index 3002ea3a61a24df59fd437ecbd80866af1e3c6d6..b7345176b399f033d4c9270804da1c5f219a6c01 100644 (file)
@@ -50,6 +50,7 @@ static struct of_device_id of_default_bus_ids[] = {
        { .type = "plb5", },
        { .type = "plb4", },
        { .type = "opb", },
+       { .type = "ebc", },
        {},
 };
 
index a6b7692c72690bc592e1429d08a921e23f9ed946..73c59ec4912059d5693f8026a95ff946c4701e9d 100644 (file)
@@ -360,6 +360,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
        DBG("    class: 0x%x\n", dev->class);
 
        dev->current_state = 4;         /* unknown power state */
+       dev->error_state = pci_channel_io_normal;
 
        if (!strcmp(type, "pci") || !strcmp(type, "pciex")) {
                /* a PCI-PCI bridge */
index 0dfbe1cd28eb2644cd59927eae4938fa8fdf088a..12c51e4ad2b4b97b4468e8fca178fa435d86a025 100644 (file)
@@ -920,9 +920,20 @@ static int of_irq_map_oldworld(struct device_node *device, int index,
 
        /*
         * Old machines just have a list of interrupt numbers
-        * and no interrupt-controller nodes.
+        * and no interrupt-controller nodes. We also have dodgy
+        * cases where the APPL,interrupts property is completely
+        * missing behind pci-pci bridges and we have to get it
+        * from the parent (the bridge itself, as apple just wired
+        * everything together on these)
         */
-       ints = get_property(device, "AAPL,interrupts", &intlen);
+       while (device) {
+               ints = get_property(device, "AAPL,interrupts", &intlen);
+               if (ints != NULL)
+                       break;
+               device = device->parent;
+               if (device && strcmp(device->type, "pci") != 0)
+                       break;
+       }
        if (ints == NULL)
                return -EINVAL;
        intlen /= sizeof(u32);
index e4ebe1a6228e5e9a9ad32da2dd7f601f5f6afc61..6b405a3f43f943b67c5b3cd2cabaeed43847aa00 100644 (file)
@@ -835,11 +835,21 @@ long sys_swapcontext(struct ucontext __user *old_ctx,
                return -EINVAL;
 
        if (old_ctx != NULL) {
+               struct mcontext __user *mctx;
+
+               /*
+                * old_ctx might not be 16-byte aligned, in which
+                * case old_ctx->uc_mcontext won't be either.
+                * Because we have the old_ctx->uc_pad2 field
+                * before old_ctx->uc_mcontext, we need to round down
+                * from &old_ctx->uc_mcontext to a 16-byte boundary.
+                */
+               mctx = (struct mcontext __user *)
+                       ((unsigned long) &old_ctx->uc_mcontext & ~0xfUL);
                if (!access_ok(VERIFY_WRITE, old_ctx, sizeof(*old_ctx))
-                   || save_user_regs(regs, &old_ctx->uc_mcontext, 0)
+                   || save_user_regs(regs, mctx, 0)
                    || put_sigset_t(&old_ctx->uc_sigmask, &current->blocked)
-                   || __put_user(to_user_ptr(&old_ctx->uc_mcontext),
-                           &old_ctx->uc_regs))
+                   || __put_user(to_user_ptr(mctx), &old_ctx->uc_regs))
                        return -EFAULT;
        }
        if (new_ctx == NULL)
index 44d95eaf22e642ae0dc14fcfc05f2eff83bc52b8..507d1b98f270521776a3596d6c4b1b6226abe01c 100644 (file)
@@ -5,9 +5,9 @@ ifeq ($(CONFIG_PPC64),y)
 obj-$(CONFIG_PPC_PMAC)         += powermac/
 endif
 endif
+obj-$(CONFIG_PPC_MPC52xx)      += 52xx/
 obj-$(CONFIG_PPC_CHRP)         += chrp/
 obj-$(CONFIG_4xx)              += 4xx/
-obj-$(CONFIG_PPC_MPC52xx)      += 52xx/
 obj-$(CONFIG_PPC_83xx)         += 83xx/
 obj-$(CONFIG_PPC_85xx)         += 85xx/
 obj-$(CONFIG_PPC_86xx)         += 86xx/
index 580d4259591241d167cea642392924492880bc6f..7c73128305ec40754cb87febebec72bbde8a7279 100644 (file)
@@ -37,7 +37,7 @@
  */
 #define SPIDER_DISABLE_PREFETCH
 
-#define MAX_SPIDERS    2
+#define MAX_SPIDERS    3
 
 static struct spider_pci_bus {
        void __iomem    *regs;
index a5de0430c56d8974332a38a5d21c680d3297e7c5..910a926b61a23c7fce9390799d0becc89122819a 100644 (file)
@@ -37,8 +37,9 @@
 #include "interrupt.h"
 #include "spu_priv1_mmio.h"
 
+static DEFINE_MUTEX(add_spumem_mutex);
+
 struct spu_pdata {
-       int nid;
        struct device_node *devnode;
        struct spu_priv1 __iomem *priv1;
 };
@@ -56,20 +57,9 @@ struct device_node *spu_devnode(struct spu *spu)
 
 EXPORT_SYMBOL_GPL(spu_devnode);
 
-static int __init find_spu_node_id(struct device_node *spe)
-{
-       const unsigned int *id;
-       struct device_node *cpu;
-       cpu = spe->parent->parent;
-       id = get_property(cpu, "node-id", NULL);
-       return id ? *id : 0;
-}
-
 static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
                const char *prop)
 {
-       static DEFINE_MUTEX(add_spumem_mutex);
-
        const struct address_prop {
                unsigned long address;
                unsigned int len;
@@ -87,7 +77,7 @@ static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
        start_pfn = p->address >> PAGE_SHIFT;
        nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
 
-       pgdata = NODE_DATA(spu_get_pdata(spu)->nid);
+       pgdata = NODE_DATA(spu->node);
        zone = pgdata->node_zones;
 
        /* XXX rethink locking here */
@@ -140,6 +130,7 @@ static int __init spu_map_interrupts_old(struct spu *spu,
 {
        unsigned int isrc;
        const u32 *tmp;
+       int nid;
 
        /* Get the interrupt source unit from the device-tree */
        tmp = get_property(np, "isrc", NULL);
@@ -147,8 +138,15 @@ static int __init spu_map_interrupts_old(struct spu *spu,
                return -ENODEV;
        isrc = tmp[0];
 
+       tmp = get_property(np->parent->parent, "node-id", NULL);
+       if (!tmp) {
+               printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
+               nid = spu->node;
+       } else
+               nid = tmp[0];
+
        /* Add the node number */
-       isrc |= spu->node << IIC_IRQ_NODE_SHIFT;
+       isrc |= nid << IIC_IRQ_NODE_SHIFT;
 
        /* Now map interrupts of all 3 classes */
        spu->irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
@@ -237,70 +235,88 @@ err:
        return ret;
 }
 
-static int spu_map_resource(struct device_node *node, int nr,
-               void __iomem** virt, unsigned long *phys)
+static int spu_map_resource(struct spu *spu, int nr,
+                           void __iomem** virt, unsigned long *phys)
 {
+       struct device_node *np = spu_get_pdata(spu)->devnode;
+       unsigned long start_pfn, nr_pages;
+       struct pglist_data *pgdata;
+       struct zone *zone;
        struct resource resource = { };
+       unsigned long len;
        int ret;
 
-       ret = of_address_to_resource(node, nr, &resource);
+       ret = of_address_to_resource(np, nr, &resource);
        if (ret)
                goto out;
 
        if (phys)
                *phys = resource.start;
-       *virt = ioremap(resource.start, resource.end - resource.start);
+       len = resource.end - resource.start + 1;
+       *virt = ioremap(resource.start, len);
        if (!*virt)
                ret = -EINVAL;
 
+       start_pfn = resource.start >> PAGE_SHIFT;
+       nr_pages = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
+
+       pgdata = NODE_DATA(spu->node);
+       zone = pgdata->node_zones;
+
+       /* XXX rethink locking here */
+       mutex_lock(&add_spumem_mutex);
+       ret = __add_pages(zone, start_pfn, nr_pages);
+       mutex_unlock(&add_spumem_mutex);
+
 out:
        return ret;
 }
 
-static int __init spu_map_device(struct spu *spu, struct device_node *node)
+static int __init spu_map_device(struct spu *spu)
 {
+       struct device_node *np = spu_get_pdata(spu)->devnode;
        int ret = -ENODEV;
-       spu->name = get_property(node, "name", NULL);
+
+       spu->name = get_property(np, "name", NULL);
        if (!spu->name)
                goto out;
 
-       ret = spu_map_resource(node, 0, (void __iomem**)&spu->local_store,
-                                       &spu->local_store_phys);
+       ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store,
+                              &spu->local_store_phys);
        if (ret) {
                pr_debug("spu_new: failed to map %s resource 0\n",
-                        node->full_name);
+                        np->full_name);
                goto out;
        }
-       ret = spu_map_resource(node, 1, (void __iomem**)&spu->problem,
-                                       &spu->problem_phys);
+       ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem,
+                              &spu->problem_phys);
        if (ret) {
                pr_debug("spu_new: failed to map %s resource 1\n",
-                        node->full_name);
+                        np->full_name);
                goto out_unmap;
        }
-       ret = spu_map_resource(node, 2, (void __iomem**)&spu->priv2,
-                                       NULL);
+       ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL);
        if (ret) {
                pr_debug("spu_new: failed to map %s resource 2\n",
-                        node->full_name);
+                        np->full_name);
                goto out_unmap;
        }
        if (!firmware_has_feature(FW_FEATURE_LPAR))
-               ret = spu_map_resource(node, 3,
-                       (void __iomem**)&spu_get_pdata(spu)->priv1, NULL);
+               ret = spu_map_resource(spu, 3,
+                              (void __iomem**)&spu_get_pdata(spu)->priv1, NULL);
        if (ret) {
                pr_debug("spu_new: failed to map %s resource 3\n",
-                        node->full_name);
+                        np->full_name);
                goto out_unmap;
        }
-       pr_debug("spu_new: %s maps:\n", node->full_name);
+       pr_debug("spu_new: %s maps:\n", np->full_name);
        pr_debug("  local store   : 0x%016lx -> 0x%p\n",
                 spu->local_store_phys, spu->local_store);
        pr_debug("  problem state : 0x%016lx -> 0x%p\n",
                 spu->problem_phys, spu->problem);
        pr_debug("  priv2         :                       0x%p\n", spu->priv2);
        pr_debug("  priv1         :                       0x%p\n",
-                                               spu_get_pdata(spu)->priv1);
+                spu_get_pdata(spu)->priv1);
 
        return 0;
 
@@ -340,8 +356,9 @@ static int __init of_create_spu(struct spu *spu, void *data)
                ret = -ENOMEM;
                goto out;
        }
+       spu_get_pdata(spu)->devnode = of_node_get(spe);
 
-       spu->node = find_spu_node_id(spe);
+       spu->node = of_node_to_nid(spe);
        if (spu->node >= MAX_NUMNODES) {
                printk(KERN_WARNING "SPE %s on node %d ignored,"
                       " node number too big\n", spe->full_name, spu->node);
@@ -350,11 +367,7 @@ static int __init of_create_spu(struct spu *spu, void *data)
                goto out_free;
        }
 
-       spu_get_pdata(spu)->nid = of_node_to_nid(spe);
-       if (spu_get_pdata(spu)->nid == -1)
-               spu_get_pdata(spu)->nid = 0;
-
-       ret = spu_map_device(spu, spe);
+       ret = spu_map_device(spu);
        /* try old method */
        if (ret)
                ret = spu_map_device_old(spu, spe);
@@ -367,8 +380,6 @@ static int __init of_create_spu(struct spu *spu, void *data)
        if (ret)
                goto out_unmap;
 
-       spu_get_pdata(spu)->devnode = of_node_get(spe);
-
        pr_debug(KERN_DEBUG "Using SPE %s %p %p %p %p %d\n", spu->name,
                spu->local_store, spu->problem, spu_get_pdata(spu)->priv1,
                spu->priv2, spu->number);
index 887b68804e6d6dbd41d5a286c941d2be796d3038..54e6b3b6f2615445fb2a742f02f67beda095b560 100644 (file)
@@ -31,5 +31,5 @@ endmenu
 
 config VIOPATH
        bool
-       depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || VETH
+       depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
        default y
index 411480d5c626b9cac903887516305d3615db3f9a..d01ced11694d2b5bdd4dda33a3aa4913bc4e5aad 100644 (file)
@@ -390,7 +390,7 @@ static void __init mpic_scan_ht_pic(struct mpic *mpic, u8 __iomem *devbase,
                u8 id = readb(devbase + pos + PCI_CAP_LIST_ID);
                if (id == PCI_CAP_ID_HT) {
                        id = readb(devbase + pos + 3);
-                       if (id == HT_CAPTYPE_IRQ)
+                       if ((id & HT_5BIT_CAP_MASK) == HT_CAPTYPE_IRQ)
                                break;
                }
        }
index d4275537b25b6e8bc814f19215278da2633420f3..ef6672455695ebfe5f6700f40fd5e5f4e3104345 100644 (file)
@@ -480,14 +480,13 @@ config CALGARY_IOMMU
 
 config CALGARY_IOMMU_ENABLED_BY_DEFAULT
        bool "Should Calgary be enabled by default?"
-       default y
        depends on CALGARY_IOMMU
        help
-         Should Calgary be enabled by default? if you choose 'y', Calgary
+         Should Calgary be enabled by default? If you choose 'y', Calgary
          will be used (if it exists). If you choose 'n', Calgary will not be
          used even if it exists. If you choose 'n' and would like to use
          Calgary anyway, pass 'iommu=calgary' on the kernel command line.
-         If unsure, say Y.
+         If unsure, say N.
 
 # need this always selected by IOMMU for the VIA workaround
 config SWIOTLB
index 3215675ab128b35ce7c793cd234b62f5a8ac795a..87d90cb68a743be271da231719cc025580a087bf 100644 (file)
@@ -1052,7 +1052,7 @@ void __init detect_calgary(void)
        void *tbl;
        int calgary_found = 0;
        unsigned long ptr;
-       int offset;
+       unsigned int offset, prev_offset;
        int ret;
 
        /*
@@ -1071,15 +1071,20 @@ void __init detect_calgary(void)
        ptr = (unsigned long)phys_to_virt(get_bios_ebda());
 
        rio_table_hdr = NULL;
+       prev_offset = 0;
        offset = 0x180;
-       while (offset) {
+       /*
+        * The next offset is stored in the 1st word.
+        * Only parse up until the offset increases:
+        */
+       while (offset > prev_offset) {
                /* The block id is stored in the 2nd word */
                if (*((unsigned short *)(ptr + offset + 2)) == 0x4752){
                        /* set the pointer past the offset & block id */
                        rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4);
                        break;
                }
-               /* The next offset is stored in the 1st word. 0 means no more */
+               prev_offset = offset;
                offset = *((unsigned short *)(ptr + offset));
        }
        if (!rio_table_hdr) {
index a418ee4c8c62a0d14102b22939dfa8c5b16d0f79..cbbc6adc1a92004c902954f10777528f6b964178 100644 (file)
@@ -109,7 +109,11 @@ void exit_idle(void)
 static void default_idle(void)
 {
        current_thread_info()->status &= ~TS_POLLING;
-       smp_mb__after_clear_bit();
+       /*
+        * TS_POLLING-cleared state must be visible before we
+        * test NEED_RESCHED:
+        */
+       smp_mb();
        local_irq_disable();
        if (!need_resched()) {
                /* Enables interrupts one instruction before HLT.
index 533a2938ffd6740f6f41f2c5bd52177e8dde8a0e..4b4217d9be787877277e0b479e6c5a85879fe9db 100644 (file)
@@ -568,6 +568,33 @@ cfq_merged_requests(request_queue_t *q, struct request *rq,
        cfq_remove_request(next);
 }
 
+static int cfq_allow_merge(request_queue_t *q, struct request *rq,
+                          struct bio *bio)
+{
+       struct cfq_data *cfqd = q->elevator->elevator_data;
+       const int rw = bio_data_dir(bio);
+       struct cfq_queue *cfqq;
+       pid_t key;
+
+       /*
+        * Disallow merge, if bio and rq aren't both sync or async
+        */
+       if (!!bio_sync(bio) != !!rq_is_sync(rq))
+               return 0;
+
+       /*
+        * Lookup the cfqq that this bio will be queued with. Allow
+        * merge only if rq is queued there.
+        */
+       key = cfq_queue_pid(current, rw, bio_sync(bio));
+       cfqq = cfq_find_cfq_hash(cfqd, key, current->ioprio);
+
+       if (cfqq == RQ_CFQQ(rq))
+               return 1;
+
+       return 1;
+}
+
 static inline void
 __cfq_set_active_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq)
 {
@@ -2125,6 +2152,7 @@ static struct elevator_type iosched_cfq = {
                .elevator_merge_fn =            cfq_merge,
                .elevator_merged_fn =           cfq_merged_request,
                .elevator_merge_req_fn =        cfq_merged_requests,
+               .elevator_allow_merge_fn =      cfq_allow_merge,
                .elevator_dispatch_fn =         cfq_dispatch_requests,
                .elevator_add_req_fn =          cfq_insert_request,
                .elevator_activate_req_fn =     cfq_activate_request,
index c0063f345c5d620320cd82438394eefe71b442dc..536be740ba4e6443f4ecb3501b4d45631385e4e6 100644 (file)
@@ -50,6 +50,21 @@ static const int elv_hash_shift = 6;
 #define rq_hash_key(rq)                ((rq)->sector + (rq)->nr_sectors)
 #define ELV_ON_HASH(rq)                (!hlist_unhashed(&(rq)->hash))
 
+/*
+ * Query io scheduler to see if the current process issuing bio may be
+ * merged with rq.
+ */
+static int elv_iosched_allow_merge(struct request *rq, struct bio *bio)
+{
+       request_queue_t *q = rq->q;
+       elevator_t *e = q->elevator;
+
+       if (e->ops->elevator_allow_merge_fn)
+               return e->ops->elevator_allow_merge_fn(q, rq, bio);
+
+       return 1;
+}
+
 /*
  * can we safely merge with this request?
  */
@@ -65,12 +80,15 @@ inline int elv_rq_merge_ok(struct request *rq, struct bio *bio)
                return 0;
 
        /*
-        * same device and no special stuff set, merge is ok
+        * must be same device and not a special request
         */
-       if (rq->rq_disk == bio->bi_bdev->bd_disk && !rq->special)
-               return 1;
+       if (rq->rq_disk != bio->bi_bdev->bd_disk || rq->special)
+               return 0;
 
-       return 0;
+       if (!elv_iosched_allow_merge(rq, bio))
+               return 0;
+
+       return 1;
 }
 EXPORT_SYMBOL(elv_rq_merge_ok);
 
index 79807dbc306e58b063464a716c8ace72fb110f10..fb6789725e1b681fc9cf67225b971baf2c2b10a3 100644 (file)
@@ -1405,8 +1405,7 @@ static inline int ll_new_hw_segment(request_queue_t *q,
        return 1;
 }
 
-static int ll_back_merge_fn(request_queue_t *q, struct request *req, 
-                           struct bio *bio)
+int ll_back_merge_fn(request_queue_t *q, struct request *req, struct bio *bio)
 {
        unsigned short max_sectors;
        int len;
@@ -1442,6 +1441,7 @@ static int ll_back_merge_fn(request_queue_t *q, struct request *req,
 
        return ll_new_hw_segment(q, req, bio);
 }
+EXPORT_SYMBOL(ll_back_merge_fn);
 
 static int ll_front_merge_fn(request_queue_t *q, struct request *req, 
                             struct bio *bio)
@@ -1912,9 +1912,6 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
        }
 
        q->request_fn           = rfn;
-       q->back_merge_fn        = ll_back_merge_fn;
-       q->front_merge_fn       = ll_front_merge_fn;
-       q->merge_requests_fn    = ll_merge_requests_fn;
        q->prep_rq_fn           = NULL;
        q->unplug_fn            = generic_unplug_device;
        q->queue_flags          = (1 << QUEUE_FLAG_CLUSTER);
@@ -2350,40 +2347,29 @@ static int __blk_rq_map_user(request_queue_t *q, struct request *rq,
        else
                bio = bio_copy_user(q, uaddr, len, reading);
 
-       if (IS_ERR(bio)) {
+       if (IS_ERR(bio))
                return PTR_ERR(bio);
-       }
 
        orig_bio = bio;
        blk_queue_bounce(q, &bio);
+
        /*
         * We link the bounce buffer in and could have to traverse it
         * later so we have to get a ref to prevent it from being freed
         */
        bio_get(bio);
 
-       /*
-        * for most (all? don't know of any) queues we could
-        * skip grabbing the queue lock here. only drivers with
-        * funky private ->back_merge_fn() function could be
-        * problematic.
-        */
-       spin_lock_irq(q->queue_lock);
        if (!rq->bio)
                blk_rq_bio_prep(q, rq, bio);
-       else if (!q->back_merge_fn(q, rq, bio)) {
+       else if (!ll_back_merge_fn(q, rq, bio)) {
                ret = -EINVAL;
-               spin_unlock_irq(q->queue_lock);
                goto unmap_bio;
        } else {
                rq->biotail->bi_next = bio;
                rq->biotail = bio;
 
-               rq->nr_sectors += bio_sectors(bio);
-               rq->hard_nr_sectors = rq->nr_sectors;
                rq->data_len += bio->bi_size;
        }
-       spin_unlock_irq(q->queue_lock);
 
        return bio->bi_size;
 
@@ -2419,6 +2405,7 @@ int blk_rq_map_user(request_queue_t *q, struct request *rq, void __user *ubuf,
                    unsigned long len)
 {
        unsigned long bytes_read = 0;
+       struct bio *bio = NULL;
        int ret;
 
        if (len > (q->max_hw_sectors << 9))
@@ -2445,6 +2432,8 @@ int blk_rq_map_user(request_queue_t *q, struct request *rq, void __user *ubuf,
                ret = __blk_rq_map_user(q, rq, ubuf, map_len);
                if (ret < 0)
                        goto unmap_rq;
+               if (!bio)
+                       bio = rq->bio;
                bytes_read += ret;
                ubuf += ret;
        }
@@ -2452,7 +2441,7 @@ int blk_rq_map_user(request_queue_t *q, struct request *rq, void __user *ubuf,
        rq->buffer = rq->data = NULL;
        return 0;
 unmap_rq:
-       blk_rq_unmap_user(rq);
+       blk_rq_unmap_user(bio);
        return ret;
 }
 
@@ -2464,6 +2453,7 @@ EXPORT_SYMBOL(blk_rq_map_user);
  * @rq:                request to map data to
  * @iov:       pointer to the iovec
  * @iov_count: number of elements in the iovec
+ * @len:       I/O byte count
  *
  * Description:
  *    Data will be mapped directly for zero copy io, if possible. Otherwise
@@ -2509,27 +2499,33 @@ EXPORT_SYMBOL(blk_rq_map_user_iov);
 
 /**
  * blk_rq_unmap_user - unmap a request with user data
- * @rq:                rq to be unmapped
+ * @bio:              start of bio list
  *
  * Description:
- *    Unmap a rq previously mapped by blk_rq_map_user().
- *    rq->bio must be set to the original head of the request.
+ *    Unmap a rq previously mapped by blk_rq_map_user(). The caller must
+ *    supply the original rq->bio from the blk_rq_map_user() return, since
+ *    the io completion may have changed rq->bio.
  */
-int blk_rq_unmap_user(struct request *rq)
+int blk_rq_unmap_user(struct bio *bio)
 {
-       struct bio *bio, *mapped_bio;
+       struct bio *mapped_bio;
+       int ret = 0, ret2;
 
-       while ((bio = rq->bio)) {
-               if (bio_flagged(bio, BIO_BOUNCED))
+       while (bio) {
+               mapped_bio = bio;
+               if (unlikely(bio_flagged(bio, BIO_BOUNCED)))
                        mapped_bio = bio->bi_private;
-               else
-                       mapped_bio = bio;
 
-               __blk_rq_unmap_user(mapped_bio);
-               rq->bio = bio->bi_next;
-               bio_put(bio);
+               ret2 = __blk_rq_unmap_user(mapped_bio);
+               if (ret2 && !ret)
+                       ret = ret2;
+
+               mapped_bio = bio;
+               bio = bio->bi_next;
+               bio_put(mapped_bio);
        }
-       return 0;
+
+       return ret;
 }
 
 EXPORT_SYMBOL(blk_rq_unmap_user);
@@ -2822,7 +2818,7 @@ static int attempt_merge(request_queue_t *q, struct request *req,
         * will have updated segment counts, update sector
         * counts here.
         */
-       if (!q->merge_requests_fn(q, req, next))
+       if (!ll_merge_requests_fn(q, req, next))
                return 0;
 
        /*
@@ -2939,7 +2935,7 @@ static int __make_request(request_queue_t *q, struct bio *bio)
                case ELEVATOR_BACK_MERGE:
                        BUG_ON(!rq_mergeable(req));
 
-                       if (!q->back_merge_fn(q, req, bio))
+                       if (!ll_back_merge_fn(q, req, bio))
                                break;
 
                        blk_add_trace_bio(q, bio, BLK_TA_BACKMERGE);
@@ -2956,7 +2952,7 @@ static int __make_request(request_queue_t *q, struct bio *bio)
                case ELEVATOR_FRONT_MERGE:
                        BUG_ON(!rq_mergeable(req));
 
-                       if (!q->front_merge_fn(q, req, bio))
+                       if (!ll_front_merge_fn(q, req, bio))
                                break;
 
                        blk_add_trace_bio(q, bio, BLK_TA_FRONTMERGE);
index f322b6a441d82fbe7db9a177ac0837fc54618cf2..2528a0c0dec8bc906533d1b62163f6404d1c697c 100644 (file)
@@ -333,8 +333,7 @@ static int sg_io(struct file *file, request_queue_t *q,
                        hdr->sb_len_wr = len;
        }
 
-       rq->bio = bio;
-       if (blk_rq_unmap_user(rq))
+       if (blk_rq_unmap_user(bio))
                ret = -EFAULT;
 
        /* may not have succeeded, but output values written to control
index 0e7682a88aa84d1a1df886fb04102e7864f32d50..b72d13d11a2726ba3e6e989871303ae8738535a7 100644 (file)
@@ -493,7 +493,7 @@ static char *next_cmd(char **cmds)
        return start;
 }
 
-static int driver_init(void)
+static int ibm_acpi_driver_init(void)
 {
        printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION);
        printk(IBM_INFO "%s\n", IBM_URL);
@@ -2297,7 +2297,7 @@ static void fan_watchdog_fire(struct work_struct *ignored)
 static struct ibm_struct ibms[] = {
        {
         .name = "driver",
-        .init = driver_init,
+        .init = ibm_acpi_driver_init,
         .read = driver_read,
         },
        {
index 4f2982cc54782c156dfddda43d0a7a4fd582a86a..3f30af21574ea37c3d443f54e2050fa4fb85c77f 100644 (file)
@@ -211,7 +211,11 @@ acpi_processor_power_activate(struct acpi_processor *pr,
 static void acpi_safe_halt(void)
 {
        current_thread_info()->status &= ~TS_POLLING;
-       smp_mb__after_clear_bit();
+       /*
+        * TS_POLLING-cleared state must be visible before we
+        * test NEED_RESCHED:
+        */
+       smp_mb();
        if (!need_resched())
                safe_halt();
        current_thread_info()->status |= TS_POLLING;
@@ -345,7 +349,11 @@ static void acpi_processor_idle(void)
         */
        if (cx->type == ACPI_STATE_C2 || cx->type == ACPI_STATE_C3) {
                current_thread_info()->status &= ~TS_POLLING;
-               smp_mb__after_clear_bit();
+               /*
+                * TS_POLLING-cleared state must be visible before we
+                * test NEED_RESCHED:
+                */
+               smp_mb();
                if (need_resched()) {
                        current_thread_info()->status |= TS_POLLING;
                        local_irq_enable();
index dbae6d9710414325f48423490761a52c4ce77fa8..b517d24935514cc08e4c5d0b35a9273b1cdd060c 100644 (file)
@@ -402,6 +402,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
        { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci },            /* MCP65 */
        { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci },            /* MCP65 */
        { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci },            /* MCP65 */
+       { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci },            /* MCP65 */
+       { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci },            /* MCP65 */
+       { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci },            /* MCP65 */
+       { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci },            /* MCP65 */
+       { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci },            /* MCP67 */
+       { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci },            /* MCP67 */
+       { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci },            /* MCP67 */
+       { PCI_VDEVICE(NVIDIA, 0x0553), board_ahci },            /* MCP67 */
        { PCI_VDEVICE(NVIDIA, 0x0554), board_ahci },            /* MCP67 */
        { PCI_VDEVICE(NVIDIA, 0x0555), board_ahci },            /* MCP67 */
        { PCI_VDEVICE(NVIDIA, 0x0556), board_ahci },            /* MCP67 */
index a4790be41d1c52adac75938ab9e3ff544c9760d3..836947da5b14de4f7e75859d2e500cb2001b31a4 100644 (file)
@@ -51,7 +51,7 @@
 
 #define SECTOR_SIZE    512
 
-typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd);
+typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc);
 
 static struct ata_device * __ata_scsi_find_dev(struct ata_port *ap,
                                        const struct scsi_device *scsidev);
@@ -935,7 +935,6 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
 /**
  *     ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
  *     @qc: Storage for translated ATA taskfile
- *     @scsicmd: SCSI command to translate
  *
  *     Sets up an ATA taskfile to issue STANDBY (to stop) or READ VERIFY
  *     (to start). Perhaps these commands should be preceded by
@@ -948,22 +947,25 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
  *     RETURNS:
  *     Zero on success, non-zero on error.
  */
-
-static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc,
-                                            const u8 *scsicmd)
+static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
 {
+       struct scsi_cmnd *scmd = qc->scsicmd;
        struct ata_taskfile *tf = &qc->tf;
+       const u8 *cdb = scmd->cmnd;
+
+       if (scmd->cmd_len < 5)
+               goto invalid_fld;
 
        tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR;
        tf->protocol = ATA_PROT_NODATA;
-       if (scsicmd[1] & 0x1) {
+       if (cdb[1] & 0x1) {
                ;       /* ignore IMMED bit, violates sat-r05 */
        }
-       if (scsicmd[4] & 0x2)
+       if (cdb[4] & 0x2)
                goto invalid_fld;       /* LOEJ bit set not supported */
-       if (((scsicmd[4] >> 4) & 0xf) != 0)
+       if (((cdb[4] >> 4) & 0xf) != 0)
                goto invalid_fld;       /* power conditions not supported */
-       if (scsicmd[4] & 0x1) {
+       if (cdb[4] & 0x1) {
                tf->nsect = 1;  /* 1 sector, lba=0 */
 
                if (qc->dev->flags & ATA_DFLAG_LBA) {
@@ -996,7 +998,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc,
        return 0;
 
 invalid_fld:
-       ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x24, 0x0);
+       ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
        /* "Invalid field in cbd" */
        return 1;
 }
@@ -1005,7 +1007,6 @@ invalid_fld:
 /**
  *     ata_scsi_flush_xlat - Translate SCSI SYNCHRONIZE CACHE command
  *     @qc: Storage for translated ATA taskfile
- *     @scsicmd: SCSI command to translate (ignored)
  *
  *     Sets up an ATA taskfile to issue FLUSH CACHE or
  *     FLUSH CACHE EXT.
@@ -1016,8 +1017,7 @@ invalid_fld:
  *     RETURNS:
  *     Zero on success, non-zero on error.
  */
-
-static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
+static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc)
 {
        struct ata_taskfile *tf = &qc->tf;
 
@@ -1034,7 +1034,7 @@ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc, const u8 *scs
 
 /**
  *     scsi_6_lba_len - Get LBA and transfer length
- *     @scsicmd: SCSI command to translate
+ *     @cdb: SCSI command to translate
  *
  *     Calculate LBA and transfer length for 6-byte commands.
  *
@@ -1042,18 +1042,17 @@ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc, const u8 *scs
  *     @plba: the LBA
  *     @plen: the transfer length
  */
-
-static void scsi_6_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
+static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
 {
        u64 lba = 0;
        u32 len = 0;
 
        VPRINTK("six-byte command\n");
 
-       lba |= ((u64)scsicmd[2]) << 8;
-       lba |= ((u64)scsicmd[3]);
+       lba |= ((u64)cdb[2]) << 8;
+       lba |= ((u64)cdb[3]);
 
-       len |= ((u32)scsicmd[4]);
+       len |= ((u32)cdb[4]);
 
        *plba = lba;
        *plen = len;
@@ -1061,7 +1060,7 @@ static void scsi_6_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
 
 /**
  *     scsi_10_lba_len - Get LBA and transfer length
- *     @scsicmd: SCSI command to translate
+ *     @cdb: SCSI command to translate
  *
  *     Calculate LBA and transfer length for 10-byte commands.
  *
@@ -1069,21 +1068,20 @@ static void scsi_6_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
  *     @plba: the LBA
  *     @plen: the transfer length
  */
-
-static void scsi_10_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
+static void scsi_10_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
 {
        u64 lba = 0;
        u32 len = 0;
 
        VPRINTK("ten-byte command\n");
 
-       lba |= ((u64)scsicmd[2]) << 24;
-       lba |= ((u64)scsicmd[3]) << 16;
-       lba |= ((u64)scsicmd[4]) << 8;
-       lba |= ((u64)scsicmd[5]);
+       lba |= ((u64)cdb[2]) << 24;
+       lba |= ((u64)cdb[3]) << 16;
+       lba |= ((u64)cdb[4]) << 8;
+       lba |= ((u64)cdb[5]);
 
-       len |= ((u32)scsicmd[7]) << 8;
-       len |= ((u32)scsicmd[8]);
+       len |= ((u32)cdb[7]) << 8;
+       len |= ((u32)cdb[8]);
 
        *plba = lba;
        *plen = len;
@@ -1091,7 +1089,7 @@ static void scsi_10_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
 
 /**
  *     scsi_16_lba_len - Get LBA and transfer length
- *     @scsicmd: SCSI command to translate
+ *     @cdb: SCSI command to translate
  *
  *     Calculate LBA and transfer length for 16-byte commands.
  *
@@ -1099,27 +1097,26 @@ static void scsi_10_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
  *     @plba: the LBA
  *     @plen: the transfer length
  */
-
-static void scsi_16_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
+static void scsi_16_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
 {
        u64 lba = 0;
        u32 len = 0;
 
        VPRINTK("sixteen-byte command\n");
 
-       lba |= ((u64)scsicmd[2]) << 56;
-       lba |= ((u64)scsicmd[3]) << 48;
-       lba |= ((u64)scsicmd[4]) << 40;
-       lba |= ((u64)scsicmd[5]) << 32;
-       lba |= ((u64)scsicmd[6]) << 24;
-       lba |= ((u64)scsicmd[7]) << 16;
-       lba |= ((u64)scsicmd[8]) << 8;
-       lba |= ((u64)scsicmd[9]);
+       lba |= ((u64)cdb[2]) << 56;
+       lba |= ((u64)cdb[3]) << 48;
+       lba |= ((u64)cdb[4]) << 40;
+       lba |= ((u64)cdb[5]) << 32;
+       lba |= ((u64)cdb[6]) << 24;
+       lba |= ((u64)cdb[7]) << 16;
+       lba |= ((u64)cdb[8]) << 8;
+       lba |= ((u64)cdb[9]);
 
-       len |= ((u32)scsicmd[10]) << 24;
-       len |= ((u32)scsicmd[11]) << 16;
-       len |= ((u32)scsicmd[12]) << 8;
-       len |= ((u32)scsicmd[13]);
+       len |= ((u32)cdb[10]) << 24;
+       len |= ((u32)cdb[11]) << 16;
+       len |= ((u32)cdb[12]) << 8;
+       len |= ((u32)cdb[13]);
 
        *plba = lba;
        *plen = len;
@@ -1128,7 +1125,6 @@ static void scsi_16_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
 /**
  *     ata_scsi_verify_xlat - Translate SCSI VERIFY command into an ATA one
  *     @qc: Storage for translated ATA taskfile
- *     @scsicmd: SCSI command to translate
  *
  *     Converts SCSI VERIFY command to an ATA READ VERIFY command.
  *
@@ -1138,23 +1134,28 @@ static void scsi_16_lba_len(const u8 *scsicmd, u64 *plba, u32 *plen)
  *     RETURNS:
  *     Zero on success, non-zero on error.
  */
-
-static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
+static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc)
 {
+       struct scsi_cmnd *scmd = qc->scsicmd;
        struct ata_taskfile *tf = &qc->tf;
        struct ata_device *dev = qc->dev;
        u64 dev_sectors = qc->dev->n_sectors;
+       const u8 *cdb = scmd->cmnd;
        u64 block;
        u32 n_block;
 
        tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
        tf->protocol = ATA_PROT_NODATA;
 
-       if (scsicmd[0] == VERIFY)
-               scsi_10_lba_len(scsicmd, &block, &n_block);
-       else if (scsicmd[0] == VERIFY_16)
-               scsi_16_lba_len(scsicmd, &block, &n_block);
-       else
+       if (cdb[0] == VERIFY) {
+               if (scmd->cmd_len < 10)
+                       goto invalid_fld;
+               scsi_10_lba_len(cdb, &block, &n_block);
+       } else if (cdb[0] == VERIFY_16) {
+               if (scmd->cmd_len < 16)
+                       goto invalid_fld;
+               scsi_16_lba_len(cdb, &block, &n_block);
+       } else
                goto invalid_fld;
 
        if (!n_block)
@@ -1229,24 +1230,23 @@ static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc, const u8 *sc
        return 0;
 
 invalid_fld:
-       ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x24, 0x0);
+       ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
        /* "Invalid field in cbd" */
        return 1;
 
 out_of_range:
-       ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x21, 0x0);
+       ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0);
        /* "Logical Block Address out of range" */
        return 1;
 
 nothing_to_do:
-       qc->scsicmd->result = SAM_STAT_GOOD;
+       scmd->result = SAM_STAT_GOOD;
        return 1;
 }
 
 /**
  *     ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one
  *     @qc: Storage for translated ATA taskfile
- *     @scsicmd: SCSI command to translate
  *
  *     Converts any of six SCSI read/write commands into the
  *     ATA counterpart, including starting sector (LBA),
@@ -1262,29 +1262,33 @@ nothing_to_do:
  *     RETURNS:
  *     Zero on success, non-zero on error.
  */
-
-static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
+static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
 {
+       struct scsi_cmnd *scmd = qc->scsicmd;
+       const u8 *cdb = scmd->cmnd;
        unsigned int tf_flags = 0;
        u64 block;
        u32 n_block;
        int rc;
 
-       if (scsicmd[0] == WRITE_10 || scsicmd[0] == WRITE_6 ||
-           scsicmd[0] == WRITE_16)
+       if (cdb[0] == WRITE_10 || cdb[0] == WRITE_6 || cdb[0] == WRITE_16)
                tf_flags |= ATA_TFLAG_WRITE;
 
        /* Calculate the SCSI LBA, transfer length and FUA. */
-       switch (scsicmd[0]) {
+       switch (cdb[0]) {
        case READ_10:
        case WRITE_10:
-               scsi_10_lba_len(scsicmd, &block, &n_block);
-               if (unlikely(scsicmd[1] & (1 << 3)))
+               if (unlikely(scmd->cmd_len < 10))
+                       goto invalid_fld;
+               scsi_10_lba_len(cdb, &block, &n_block);
+               if (unlikely(cdb[1] & (1 << 3)))
                        tf_flags |= ATA_TFLAG_FUA;
                break;
        case READ_6:
        case WRITE_6:
-               scsi_6_lba_len(scsicmd, &block, &n_block);
+               if (unlikely(scmd->cmd_len < 6))
+                       goto invalid_fld;
+               scsi_6_lba_len(cdb, &block, &n_block);
 
                /* for 6-byte r/w commands, transfer length 0
                 * means 256 blocks of data, not 0 block.
@@ -1294,8 +1298,10 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicm
                break;
        case READ_16:
        case WRITE_16:
-               scsi_16_lba_len(scsicmd, &block, &n_block);
-               if (unlikely(scsicmd[1] & (1 << 3)))
+               if (unlikely(scmd->cmd_len < 16))
+                       goto invalid_fld;
+               scsi_16_lba_len(cdb, &block, &n_block);
+               if (unlikely(cdb[1] & (1 << 3)))
                        tf_flags |= ATA_TFLAG_FUA;
                break;
        default:
@@ -1326,17 +1332,17 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicm
                goto out_of_range;
        /* treat all other errors as -EINVAL, fall through */
 invalid_fld:
-       ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x24, 0x0);
+       ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
        /* "Invalid field in cbd" */
        return 1;
 
 out_of_range:
-       ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x21, 0x0);
+       ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0);
        /* "Logical Block Address out of range" */
        return 1;
 
 nothing_to_do:
-       qc->scsicmd->result = SAM_STAT_GOOD;
+       scmd->result = SAM_STAT_GOOD;
        return 1;
 }
 
@@ -1456,7 +1462,6 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd,
                              ata_xlat_func_t xlat_func)
 {
        struct ata_queued_cmd *qc;
-       u8 *scsicmd = cmd->cmnd;
        int is_io = xlat_func == ata_scsi_rw_xlat;
 
        VPRINTK("ENTER\n");
@@ -1488,7 +1493,7 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd,
 
        qc->complete_fn = ata_scsi_qc_complete;
 
-       if (xlat_func(qc, scsicmd))
+       if (xlat_func(qc))
                goto early_finish;
 
        /* select device, send command to hardware */
@@ -2344,7 +2349,6 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
 /**
  *     atapi_xlat - Initialize PACKET taskfile
  *     @qc: command structure to be initialized
- *     @scsicmd: SCSI CDB associated with this PACKET command
  *
  *     LOCKING:
  *     spin_lock_irqsave(host lock)
@@ -2352,25 +2356,25 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
  *     RETURNS:
  *     Zero on success, non-zero on failure.
  */
-
-static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
+static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
 {
-       struct scsi_cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *scmd = qc->scsicmd;
        struct ata_device *dev = qc->dev;
        int using_pio = (dev->flags & ATA_DFLAG_PIO);
-       int nodata = (cmd->sc_data_direction == DMA_NONE);
+       int nodata = (scmd->sc_data_direction == DMA_NONE);
 
        if (!using_pio)
                /* Check whether ATAPI DMA is safe */
                if (ata_check_atapi_dma(qc))
                        using_pio = 1;
 
-       memcpy(&qc->cdb, scsicmd, dev->cdb_len);
+       memset(qc->cdb, 0, dev->cdb_len);
+       memcpy(qc->cdb, scmd->cmnd, scmd->cmd_len);
 
        qc->complete_fn = atapi_qc_complete;
 
        qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-       if (cmd->sc_data_direction == DMA_TO_DEVICE) {
+       if (scmd->sc_data_direction == DMA_TO_DEVICE) {
                qc->tf.flags |= ATA_TFLAG_WRITE;
                DPRINTK("direction: write\n");
        }
@@ -2392,12 +2396,12 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
                qc->tf.protocol = ATA_PROT_ATAPI_DMA;
                qc->tf.feature |= ATAPI_PKT_DMA;
 
-               if (atapi_dmadir && (cmd->sc_data_direction != DMA_TO_DEVICE))
+               if (atapi_dmadir && (scmd->sc_data_direction != DMA_TO_DEVICE))
                        /* some SATA bridges need us to indicate data xfer direction */
                        qc->tf.feature |= ATAPI_DMADIR;
        }
 
-       qc->nbytes = cmd->request_bufflen;
+       qc->nbytes = scmd->request_bufflen;
 
        return 0;
 }
@@ -2517,28 +2521,27 @@ ata_scsi_map_proto(u8 byte1)
 /**
  *     ata_scsi_pass_thru - convert ATA pass-thru CDB to taskfile
  *     @qc: command structure to be initialized
- *     @scsicmd: SCSI command to convert
  *
  *     Handles either 12 or 16-byte versions of the CDB.
  *
  *     RETURNS:
  *     Zero on success, non-zero on failure.
  */
-static unsigned int
-ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
+static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
 {
        struct ata_taskfile *tf = &(qc->tf);
-       struct scsi_cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *scmd = qc->scsicmd;
        struct ata_device *dev = qc->dev;
+       const u8 *cdb = scmd->cmnd;
 
-       if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN)
+       if ((tf->protocol = ata_scsi_map_proto(cdb[1])) == ATA_PROT_UNKNOWN)
                goto invalid_fld;
 
        /* We may not issue DMA commands if no DMA mode is set */
        if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0)
                goto invalid_fld;
 
-       if (scsicmd[1] & 0xe0)
+       if (cdb[1] & 0xe0)
                /* PIO multi not supported yet */
                goto invalid_fld;
 
@@ -2546,18 +2549,18 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
         * 12 and 16 byte CDBs use different offsets to
         * provide the various register values.
         */
-       if (scsicmd[0] == ATA_16) {
+       if (cdb[0] == ATA_16) {
                /*
                 * 16-byte CDB - may contain extended commands.
                 *
                 * If that is the case, copy the upper byte register values.
                 */
-               if (scsicmd[1] & 0x01) {
-                       tf->hob_feature = scsicmd[3];
-                       tf->hob_nsect = scsicmd[5];
-                       tf->hob_lbal = scsicmd[7];
-                       tf->hob_lbam = scsicmd[9];
-                       tf->hob_lbah = scsicmd[11];
+               if (cdb[1] & 0x01) {
+                       tf->hob_feature = cdb[3];
+                       tf->hob_nsect = cdb[5];
+                       tf->hob_lbal = cdb[7];
+                       tf->hob_lbam = cdb[9];
+                       tf->hob_lbah = cdb[11];
                        tf->flags |= ATA_TFLAG_LBA48;
                } else
                        tf->flags &= ~ATA_TFLAG_LBA48;
@@ -2565,26 +2568,26 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
                /*
                 * Always copy low byte, device and command registers.
                 */
-               tf->feature = scsicmd[4];
-               tf->nsect = scsicmd[6];
-               tf->lbal = scsicmd[8];
-               tf->lbam = scsicmd[10];
-               tf->lbah = scsicmd[12];
-               tf->device = scsicmd[13];
-               tf->command = scsicmd[14];
+               tf->feature = cdb[4];
+               tf->nsect = cdb[6];
+               tf->lbal = cdb[8];
+               tf->lbam = cdb[10];
+               tf->lbah = cdb[12];
+               tf->device = cdb[13];
+               tf->command = cdb[14];
        } else {
                /*
                 * 12-byte CDB - incapable of extended commands.
                 */
                tf->flags &= ~ATA_TFLAG_LBA48;
 
-               tf->feature = scsicmd[3];
-               tf->nsect = scsicmd[4];
-               tf->lbal = scsicmd[5];
-               tf->lbam = scsicmd[6];
-               tf->lbah = scsicmd[7];
-               tf->device = scsicmd[8];
-               tf->command = scsicmd[9];
+               tf->feature = cdb[3];
+               tf->nsect = cdb[4];
+               tf->lbal = cdb[5];
+               tf->lbam = cdb[6];
+               tf->lbah = cdb[7];
+               tf->device = cdb[8];
+               tf->command = cdb[9];
        }
        /*
         * If slave is possible, enforce correct master/slave bit
@@ -2611,7 +2614,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
         */
        tf->flags |= (ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE);
 
-       if (cmd->sc_data_direction == DMA_TO_DEVICE)
+       if (scmd->sc_data_direction == DMA_TO_DEVICE)
                tf->flags |= ATA_TFLAG_WRITE;
 
        /*
@@ -2620,7 +2623,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
         * TODO: find out if we need to do more here to
         *       cover scatter/gather case.
         */
-       qc->nsect = cmd->request_bufflen / ATA_SECT_SIZE;
+       qc->nsect = scmd->request_bufflen / ATA_SECT_SIZE;
 
        /* request result TF */
        qc->flags |= ATA_QCFLAG_RESULT_TF;
@@ -2628,7 +2631,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
        return 0;
 
  invalid_fld:
-       ata_scsi_set_sense(qc->scsicmd, ILLEGAL_REQUEST, 0x24, 0x00);
+       ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x00);
        /* "Invalid field in cdb" */
        return 1;
 }
@@ -2701,22 +2704,29 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap,
 #endif
 }
 
-static inline int __ata_scsi_queuecmd(struct scsi_cmnd *cmd,
+static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd,
                                      void (*done)(struct scsi_cmnd *),
                                      struct ata_device *dev)
 {
        int rc = 0;
 
+       if (unlikely(!scmd->cmd_len)) {
+               ata_dev_printk(dev, KERN_WARNING, "WARNING: zero len CDB\n");
+               scmd->result = DID_ERROR << 16;
+               done(scmd);
+               return 0;
+       }
+
        if (dev->class == ATA_DEV_ATA) {
                ata_xlat_func_t xlat_func = ata_get_xlat_func(dev,
-                                                             cmd->cmnd[0]);
+                                                             scmd->cmnd[0]);
 
                if (xlat_func)
-                       rc = ata_scsi_translate(dev, cmd, done, xlat_func);
+                       rc = ata_scsi_translate(dev, scmd, done, xlat_func);
                else
-                       ata_scsi_simulate(dev, cmd, done);
+                       ata_scsi_simulate(dev, scmd, done);
        } else
-               rc = ata_scsi_translate(dev, cmd, done, atapi_xlat);
+               rc = ata_scsi_translate(dev, scmd, done, atapi_xlat);
 
        return rc;
 }
index 1c628014dae612512062fda499f3bca4f6c71c6e..b1ca207e3545dcdce0b828806ded54db5a39891e 100644 (file)
@@ -372,7 +372,8 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 static int cs5530_reinit_one(struct pci_dev *pdev)
 {
        /* If we fail on resume we are doomed */
-       BUG_ON(cs5530_init_chip());
+       if (cs5530_init_chip())
+               BUG();
        return ata_pci_device_resume(pdev);
 }
        
index ff93e8f71cf8e8900d1cb070c5aa0f1d6a5e3477..f0d4f7e9ed314a857f3d70baf77068fe911207b6 100644 (file)
@@ -395,7 +395,7 @@ static void via_config_fifo(struct pci_dev *pdev, unsigned int flags)
        enable &= 3;
        
        if (flags & VIA_SET_FIFO) {
-               u8 fifo_setting[4] = {0x00, 0x60, 0x00, 0x20};
+               static const u8 fifo_setting[4] = {0x00, 0x60, 0x00, 0x20};
                u8 fifo;
 
                pci_read_config_byte(pdev, 0x43, &fifo);
index 0d316eb3c2149da3ac09266985dc7624f92f84db..f6d498e1cf80b11f0dd23299415633d5d00e86f1 100644 (file)
@@ -270,14 +270,6 @@ static const struct pci_device_id nv_pci_tbl[] = {
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
        { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
-       { PCI_VDEVICE(NVIDIA, 0x045c), GENERIC }, /* MCP65 */
-       { PCI_VDEVICE(NVIDIA, 0x045d), GENERIC }, /* MCP65 */
-       { PCI_VDEVICE(NVIDIA, 0x045e), GENERIC }, /* MCP65 */
-       { PCI_VDEVICE(NVIDIA, 0x045f), GENERIC }, /* MCP65 */
-       { PCI_VDEVICE(NVIDIA, 0x0550), GENERIC }, /* MCP67 */
-       { PCI_VDEVICE(NVIDIA, 0x0551), GENERIC }, /* MCP67 */
-       { PCI_VDEVICE(NVIDIA, 0x0552), GENERIC }, /* MCP67 */
-       { PCI_VDEVICE(NVIDIA, 0x0553), GENERIC }, /* MCP67 */
        { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
                PCI_ANY_ID, PCI_ANY_ID,
                PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC },
index d89c9590b84531672fd3e70156258aee31e32c37..46d8a94669b4401735daf626508c12981847b302 100644 (file)
@@ -135,26 +135,31 @@ static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
        unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
 
        if (tf->ctl != ap->last_ctl) {
-               writeb(tf->ctl, ioaddr->ctl_addr);
+               writeb(tf->ctl, (void __iomem *) ioaddr->ctl_addr);
                ap->last_ctl = tf->ctl;
                ata_wait_idle(ap);
        }
        if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
-               writew(tf->feature | (((u16)tf->hob_feature) << 8), ioaddr->feature_addr);
-               writew(tf->nsect | (((u16)tf->hob_nsect) << 8), ioaddr->nsect_addr);
-               writew(tf->lbal | (((u16)tf->hob_lbal) << 8), ioaddr->lbal_addr);
-               writew(tf->lbam | (((u16)tf->hob_lbam) << 8), ioaddr->lbam_addr);
-               writew(tf->lbah | (((u16)tf->hob_lbah) << 8), ioaddr->lbah_addr);
+               writew(tf->feature | (((u16)tf->hob_feature) << 8),
+                      (void __iomem *) ioaddr->feature_addr);
+               writew(tf->nsect | (((u16)tf->hob_nsect) << 8),
+                      (void __iomem *) ioaddr->nsect_addr);
+               writew(tf->lbal | (((u16)tf->hob_lbal) << 8),
+                      (void __iomem *) ioaddr->lbal_addr);
+               writew(tf->lbam | (((u16)tf->hob_lbam) << 8),
+                      (void __iomem *) ioaddr->lbam_addr);
+               writew(tf->lbah | (((u16)tf->hob_lbah) << 8),
+                      (void __iomem *) ioaddr->lbah_addr);
        } else if (is_addr) {
-               writew(tf->feature, ioaddr->feature_addr);
-               writew(tf->nsect, ioaddr->nsect_addr);
-               writew(tf->lbal, ioaddr->lbal_addr);
-               writew(tf->lbam, ioaddr->lbam_addr);
-               writew(tf->lbah, ioaddr->lbah_addr);
+               writew(tf->feature, (void __iomem *) ioaddr->feature_addr);
+               writew(tf->nsect, (void __iomem *) ioaddr->nsect_addr);
+               writew(tf->lbal, (void __iomem *) ioaddr->lbal_addr);
+               writew(tf->lbam, (void __iomem *) ioaddr->lbam_addr);
+               writew(tf->lbah, (void __iomem *) ioaddr->lbah_addr);
        }
 
        if (tf->flags & ATA_TFLAG_DEVICE)
-               writeb(tf->device, ioaddr->device_addr);
+               writeb(tf->device, (void __iomem *) ioaddr->device_addr);
 
        ata_wait_idle(ap);
 }
@@ -166,12 +171,12 @@ static void k2_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
        u16 nsect, lbal, lbam, lbah, feature;
 
        tf->command = k2_stat_check_status(ap);
-       tf->device = readw(ioaddr->device_addr);
-       feature = readw(ioaddr->error_addr);
-       nsect = readw(ioaddr->nsect_addr);
-       lbal = readw(ioaddr->lbal_addr);
-       lbam = readw(ioaddr->lbam_addr);
-       lbah = readw(ioaddr->lbah_addr);
+       tf->device = readw((void __iomem *)ioaddr->device_addr);
+       feature = readw((void __iomem *)ioaddr->error_addr);
+       nsect = readw((void __iomem *)ioaddr->nsect_addr);
+       lbal = readw((void __iomem *)ioaddr->lbal_addr);
+       lbam = readw((void __iomem *)ioaddr->lbam_addr);
+       lbah = readw((void __iomem *)ioaddr->lbah_addr);
 
        tf->feature = feature;
        tf->nsect = nsect;
index e654b990b90541405f53ec2c53a2dcc53ffcf4dd..0fa1b89f76d588fac3745d4d008712162b6c267d 100644 (file)
@@ -149,21 +149,26 @@ static void vsc_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
                vsc_intr_mask_update(ap, tf->ctl & ATA_NIEN);
        }
        if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
-               writew(tf->feature | (((u16)tf->hob_feature) << 8), ioaddr->feature_addr);
-               writew(tf->nsect | (((u16)tf->hob_nsect) << 8), ioaddr->nsect_addr);
-               writew(tf->lbal | (((u16)tf->hob_lbal) << 8), ioaddr->lbal_addr);
-               writew(tf->lbam | (((u16)tf->hob_lbam) << 8), ioaddr->lbam_addr);
-               writew(tf->lbah | (((u16)tf->hob_lbah) << 8), ioaddr->lbah_addr);
+               writew(tf->feature | (((u16)tf->hob_feature) << 8),
+                      (void __iomem *) ioaddr->feature_addr);
+               writew(tf->nsect | (((u16)tf->hob_nsect) << 8),
+                      (void __iomem *) ioaddr->nsect_addr);
+               writew(tf->lbal | (((u16)tf->hob_lbal) << 8),
+                      (void __iomem *) ioaddr->lbal_addr);
+               writew(tf->lbam | (((u16)tf->hob_lbam) << 8),
+                      (void __iomem *) ioaddr->lbam_addr);
+               writew(tf->lbah | (((u16)tf->hob_lbah) << 8),
+                      (void __iomem *) ioaddr->lbah_addr);
        } else if (is_addr) {
-               writew(tf->feature, ioaddr->feature_addr);
-               writew(tf->nsect, ioaddr->nsect_addr);
-               writew(tf->lbal, ioaddr->lbal_addr);
-               writew(tf->lbam, ioaddr->lbam_addr);
-               writew(tf->lbah, ioaddr->lbah_addr);
+               writew(tf->feature, (void __iomem *) ioaddr->feature_addr);
+               writew(tf->nsect, (void __iomem *) ioaddr->nsect_addr);
+               writew(tf->lbal, (void __iomem *) ioaddr->lbal_addr);
+               writew(tf->lbam, (void __iomem *) ioaddr->lbam_addr);
+               writew(tf->lbah, (void __iomem *) ioaddr->lbah_addr);
        }
 
        if (tf->flags & ATA_TFLAG_DEVICE)
-               writeb(tf->device, ioaddr->device_addr);
+               writeb(tf->device, (void __iomem *) ioaddr->device_addr);
 
        ata_wait_idle(ap);
 }
@@ -175,12 +180,12 @@ static void vsc_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
        u16 nsect, lbal, lbam, lbah, feature;
 
        tf->command = ata_check_status(ap);
-       tf->device = readw(ioaddr->device_addr);
-       feature = readw(ioaddr->error_addr);
-       nsect = readw(ioaddr->nsect_addr);
-       lbal = readw(ioaddr->lbal_addr);
-       lbam = readw(ioaddr->lbam_addr);
-       lbah = readw(ioaddr->lbah_addr);
+       tf->device = readw((void __iomem *) ioaddr->device_addr);
+       feature = readw((void __iomem *) ioaddr->error_addr);
+       nsect = readw((void __iomem *) ioaddr->nsect_addr);
+       lbal = readw((void __iomem *) ioaddr->lbal_addr);
+       lbam = readw((void __iomem *) ioaddr->lbam_addr);
+       lbah = readw((void __iomem *) ioaddr->lbah_addr);
 
        tf->feature = feature;
        tf->nsect = nsect;
@@ -327,8 +332,8 @@ static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned lon
        port->ctl_addr          = base + VSC_SATA_TF_CTL_OFFSET;
        port->bmdma_addr        = base + VSC_SATA_DMA_CMD_OFFSET;
        port->scr_addr          = base + VSC_SATA_SCR_STATUS_OFFSET;
-       writel(0, base + VSC_SATA_UP_DESCRIPTOR_OFFSET);
-       writel(0, base + VSC_SATA_UP_DATA_BUFFER_OFFSET);
+       writel(0, (void __iomem *) base + VSC_SATA_UP_DESCRIPTOR_OFFSET);
+       writel(0, (void __iomem *) base + VSC_SATA_UP_DATA_BUFFER_OFFSET);
 }
 
 
index 2ddd76fdbc432bdc0661276d0baf8984d4ae57b2..33687454eb324324f099fd5f79ad5a17caafd0f8 100644 (file)
@@ -167,10 +167,6 @@ config ATM_ZATM_DEBUG
          Note that extended debugging may create certain race conditions
          itself. Enable this ONLY if you suspect problems with the driver.
 
-#   bool 'Rolfs TI TNETA1570' CONFIG_ATM_TNETA1570 y
-#   if [ "$CONFIG_ATM_TNETA1570" = "y" ]; then
-#      bool '  Enable extended debugging' CONFIG_ATM_TNETA1570_DEBUG n
-#   fi
 config ATM_NICSTAR
        tristate "IDT 77201 (NICStAR) (ForeRunnerLE)"
        depends on PCI && ATM && !64BIT
index 3a7b21ff30a558b7bf1bd121eb0b428eef8c630c..4aeb3d062ff6d52630834147015e1c33c039e314 100644 (file)
@@ -172,25 +172,6 @@ fore200e_irq_itoa(int irq)
 }
 
 
-static void*
-fore200e_kmalloc(int size, gfp_t flags)
-{
-    void *chunk = kzalloc(size, flags);
-
-    if (!chunk)
-       printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n",                        size, flags);
-    
-    return chunk;
-}
-
-
-static void
-fore200e_kfree(void* chunk)
-{
-    kfree(chunk);
-}
-
-
 /* allocate and align a chunk of memory intended to hold the data behing exchanged
    between the driver and the adapter (using streaming DVMA) */
 
@@ -206,7 +187,7 @@ fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, i
     chunk->align_size = size;
     chunk->direction  = direction;
 
-    chunk->alloc_addr = fore200e_kmalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA);
+    chunk->alloc_addr = kzalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA);
     if (chunk->alloc_addr == NULL)
        return -ENOMEM;
 
@@ -228,7 +209,7 @@ fore200e_chunk_free(struct fore200e* fore200e, struct chunk* chunk)
 {
     fore200e->bus->dma_unmap(fore200e, chunk->dma_addr, chunk->dma_size, chunk->direction);
 
-    fore200e_kfree(chunk->alloc_addr);
+    kfree(chunk->alloc_addr);
 }
 
 
@@ -882,7 +863,7 @@ fore200e_sba_detect(const struct fore200e_bus* bus, int index)
        return NULL;
     }
 
-    fore200e = fore200e_kmalloc(sizeof(struct fore200e), GFP_KERNEL);
+    fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL);
     if (fore200e == NULL)
        return NULL;
 
@@ -1505,7 +1486,7 @@ fore200e_open(struct atm_vcc *vcc)
 
     spin_unlock_irqrestore(&fore200e->q_lock, flags);
 
-    fore200e_vcc = fore200e_kmalloc(sizeof(struct fore200e_vcc), GFP_ATOMIC);
+    fore200e_vcc = kzalloc(sizeof(struct fore200e_vcc), GFP_ATOMIC);
     if (fore200e_vcc == NULL) {
        vc_map->vcc = NULL;
        return -ENOMEM;
@@ -1526,7 +1507,7 @@ fore200e_open(struct atm_vcc *vcc)
        if (fore200e->available_cell_rate < vcc->qos.txtp.max_pcr) {
            up(&fore200e->rate_sf);
 
-           fore200e_kfree(fore200e_vcc);
+           kfree(fore200e_vcc);
            vc_map->vcc = NULL;
            return -EAGAIN;
        }
@@ -1554,7 +1535,7 @@ fore200e_open(struct atm_vcc *vcc)
 
        fore200e->available_cell_rate += vcc->qos.txtp.max_pcr;
 
-       fore200e_kfree(fore200e_vcc);
+       kfree(fore200e_vcc);
        return -EINVAL;
     }
     
@@ -1630,7 +1611,7 @@ fore200e_close(struct atm_vcc* vcc)
     clear_bit(ATM_VF_PARTIAL,&vcc->flags);
 
     ASSERT(fore200e_vcc);
-    fore200e_kfree(fore200e_vcc);
+    kfree(fore200e_vcc);
 }
 
 
@@ -1831,7 +1812,7 @@ fore200e_getstats(struct fore200e* fore200e)
     u32                     stats_dma_addr;
 
     if (fore200e->stats == NULL) {
-       fore200e->stats = fore200e_kmalloc(sizeof(struct stats), GFP_KERNEL | GFP_DMA);
+       fore200e->stats = kzalloc(sizeof(struct stats), GFP_KERNEL | GFP_DMA);
        if (fore200e->stats == NULL)
            return -ENOMEM;
     }
@@ -2002,17 +1983,6 @@ fore200e_setloop(struct fore200e* fore200e, int loop_mode)
 }
 
 
-static inline unsigned int
-fore200e_swap(unsigned int in)
-{
-#if defined(__LITTLE_ENDIAN)
-    return swab32(in);
-#else
-    return in;
-#endif
-}
-
-
 static int
 fore200e_fetch_stats(struct fore200e* fore200e, struct sonet_stats __user *arg)
 {
@@ -2021,19 +1991,19 @@ fore200e_fetch_stats(struct fore200e* fore200e, struct sonet_stats __user *arg)
     if (fore200e_getstats(fore200e) < 0)
        return -EIO;
 
-    tmp.section_bip = fore200e_swap(fore200e->stats->oc3.section_bip8_errors);
-    tmp.line_bip    = fore200e_swap(fore200e->stats->oc3.line_bip24_errors);
-    tmp.path_bip    = fore200e_swap(fore200e->stats->oc3.path_bip8_errors);
-    tmp.line_febe   = fore200e_swap(fore200e->stats->oc3.line_febe_errors);
-    tmp.path_febe   = fore200e_swap(fore200e->stats->oc3.path_febe_errors);
-    tmp.corr_hcs    = fore200e_swap(fore200e->stats->oc3.corr_hcs_errors);
-    tmp.uncorr_hcs  = fore200e_swap(fore200e->stats->oc3.ucorr_hcs_errors);
-    tmp.tx_cells    = fore200e_swap(fore200e->stats->aal0.cells_transmitted)  +
-                     fore200e_swap(fore200e->stats->aal34.cells_transmitted) +
-                     fore200e_swap(fore200e->stats->aal5.cells_transmitted);
-    tmp.rx_cells    = fore200e_swap(fore200e->stats->aal0.cells_received)     +
-                     fore200e_swap(fore200e->stats->aal34.cells_received)    +
-                     fore200e_swap(fore200e->stats->aal5.cells_received);
+    tmp.section_bip = cpu_to_be32(fore200e->stats->oc3.section_bip8_errors);
+    tmp.line_bip    = cpu_to_be32(fore200e->stats->oc3.line_bip24_errors);
+    tmp.path_bip    = cpu_to_be32(fore200e->stats->oc3.path_bip8_errors);
+    tmp.line_febe   = cpu_to_be32(fore200e->stats->oc3.line_febe_errors);
+    tmp.path_febe   = cpu_to_be32(fore200e->stats->oc3.path_febe_errors);
+    tmp.corr_hcs    = cpu_to_be32(fore200e->stats->oc3.corr_hcs_errors);
+    tmp.uncorr_hcs  = cpu_to_be32(fore200e->stats->oc3.ucorr_hcs_errors);
+    tmp.tx_cells    = cpu_to_be32(fore200e->stats->aal0.cells_transmitted)  +
+                     cpu_to_be32(fore200e->stats->aal34.cells_transmitted) +
+                     cpu_to_be32(fore200e->stats->aal5.cells_transmitted);
+    tmp.rx_cells    = cpu_to_be32(fore200e->stats->aal0.cells_received)     +
+                     cpu_to_be32(fore200e->stats->aal34.cells_received)    +
+                     cpu_to_be32(fore200e->stats->aal5.cells_received);
 
     if (arg)
        return copy_to_user(arg, &tmp, sizeof(struct sonet_stats)) ? -EFAULT : 0;       
@@ -2146,7 +2116,7 @@ fore200e_irq_request(struct fore200e* fore200e)
 static int __devinit
 fore200e_get_esi(struct fore200e* fore200e)
 {
-    struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
+    struct prom_data* prom = kzalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA);
     int ok, i;
 
     if (!prom)
@@ -2154,7 +2124,7 @@ fore200e_get_esi(struct fore200e* fore200e)
 
     ok = fore200e->bus->prom_read(fore200e, prom);
     if (ok < 0) {
-       fore200e_kfree(prom);
+       kfree(prom);
        return -EBUSY;
     }
        
@@ -2169,7 +2139,7 @@ fore200e_get_esi(struct fore200e* fore200e)
        fore200e->esi[ i ] = fore200e->atm_dev->esi[ i ] = prom->mac_addr[ i + 2 ];
     }
     
-    fore200e_kfree(prom);
+    kfree(prom);
 
     return 0;
 }
@@ -2194,7 +2164,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
            DPRINTK(2, "rx buffers %d / %d are being allocated\n", scheme, magn);
 
            /* allocate the array of receive buffers */
-           buffer = bsq->buffer = fore200e_kmalloc(nbr * sizeof(struct buffer), GFP_KERNEL);
+           buffer = bsq->buffer = kzalloc(nbr * sizeof(struct buffer), GFP_KERNEL);
 
            if (buffer == NULL)
                return -ENOMEM;
@@ -2217,7 +2187,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e)
                    
                    while (i > 0)
                        fore200e_chunk_free(fore200e, &buffer[ --i ].data);
-                   fore200e_kfree(buffer);
+                   kfree(buffer);
                    
                    return -ENOMEM;
                }
@@ -2736,7 +2706,7 @@ fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent
        goto out;
     }
     
-    fore200e = fore200e_kmalloc(sizeof(struct fore200e), GFP_KERNEL);
+    fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL);
     if (fore200e == NULL) {
        err = -ENOMEM;
        goto out_disable;
@@ -2999,8 +2969,8 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "  4b5b:\n"
                       "     crc_header_errors:\t\t%10u\n"
                       "     framing_errors:\t\t%10u\n",
-                      fore200e_swap(fore200e->stats->phy.crc_header_errors),
-                      fore200e_swap(fore200e->stats->phy.framing_errors));
+                      cpu_to_be32(fore200e->stats->phy.crc_header_errors),
+                      cpu_to_be32(fore200e->stats->phy.framing_errors));
     
     if (!left--)
        return sprintf(page, "\n"
@@ -3012,13 +2982,13 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "     path_febe_errors:\t\t%10u\n"
                       "     corr_hcs_errors:\t\t%10u\n"
                       "     ucorr_hcs_errors:\t\t%10u\n",
-                      fore200e_swap(fore200e->stats->oc3.section_bip8_errors),
-                      fore200e_swap(fore200e->stats->oc3.path_bip8_errors),
-                      fore200e_swap(fore200e->stats->oc3.line_bip24_errors),
-                      fore200e_swap(fore200e->stats->oc3.line_febe_errors),
-                      fore200e_swap(fore200e->stats->oc3.path_febe_errors),
-                      fore200e_swap(fore200e->stats->oc3.corr_hcs_errors),
-                      fore200e_swap(fore200e->stats->oc3.ucorr_hcs_errors));
+                      cpu_to_be32(fore200e->stats->oc3.section_bip8_errors),
+                      cpu_to_be32(fore200e->stats->oc3.path_bip8_errors),
+                      cpu_to_be32(fore200e->stats->oc3.line_bip24_errors),
+                      cpu_to_be32(fore200e->stats->oc3.line_febe_errors),
+                      cpu_to_be32(fore200e->stats->oc3.path_febe_errors),
+                      cpu_to_be32(fore200e->stats->oc3.corr_hcs_errors),
+                      cpu_to_be32(fore200e->stats->oc3.ucorr_hcs_errors));
 
     if (!left--)
        return sprintf(page,"\n"
@@ -3029,12 +2999,12 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "     vpi no conn:\t\t%10u\n"
                       "     vci out of range:\t\t%10u\n"
                       "     vci no conn:\t\t%10u\n",
-                      fore200e_swap(fore200e->stats->atm.cells_transmitted),
-                      fore200e_swap(fore200e->stats->atm.cells_received),
-                      fore200e_swap(fore200e->stats->atm.vpi_bad_range),
-                      fore200e_swap(fore200e->stats->atm.vpi_no_conn),
-                      fore200e_swap(fore200e->stats->atm.vci_bad_range),
-                      fore200e_swap(fore200e->stats->atm.vci_no_conn));
+                      cpu_to_be32(fore200e->stats->atm.cells_transmitted),
+                      cpu_to_be32(fore200e->stats->atm.cells_received),
+                      cpu_to_be32(fore200e->stats->atm.vpi_bad_range),
+                      cpu_to_be32(fore200e->stats->atm.vpi_no_conn),
+                      cpu_to_be32(fore200e->stats->atm.vci_bad_range),
+                      cpu_to_be32(fore200e->stats->atm.vci_no_conn));
     
     if (!left--)
        return sprintf(page,"\n"
@@ -3042,9 +3012,9 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "     TX:\t\t\t%10u\n"
                       "     RX:\t\t\t%10u\n"
                       "     dropped:\t\t\t%10u\n",
-                      fore200e_swap(fore200e->stats->aal0.cells_transmitted),
-                      fore200e_swap(fore200e->stats->aal0.cells_received),
-                      fore200e_swap(fore200e->stats->aal0.cells_dropped));
+                      cpu_to_be32(fore200e->stats->aal0.cells_transmitted),
+                      cpu_to_be32(fore200e->stats->aal0.cells_received),
+                      cpu_to_be32(fore200e->stats->aal0.cells_dropped));
     
     if (!left--)
        return sprintf(page,"\n"
@@ -3060,15 +3030,15 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "       RX:\t\t\t%10u\n"
                       "       dropped:\t\t\t%10u\n"
                       "       protocol errors:\t\t%10u\n",
-                      fore200e_swap(fore200e->stats->aal34.cells_transmitted),
-                      fore200e_swap(fore200e->stats->aal34.cells_received),
-                      fore200e_swap(fore200e->stats->aal34.cells_dropped),
-                      fore200e_swap(fore200e->stats->aal34.cells_crc_errors),
-                      fore200e_swap(fore200e->stats->aal34.cells_protocol_errors),
-                      fore200e_swap(fore200e->stats->aal34.cspdus_transmitted),
-                      fore200e_swap(fore200e->stats->aal34.cspdus_received),
-                      fore200e_swap(fore200e->stats->aal34.cspdus_dropped),
-                      fore200e_swap(fore200e->stats->aal34.cspdus_protocol_errors));
+                      cpu_to_be32(fore200e->stats->aal34.cells_transmitted),
+                      cpu_to_be32(fore200e->stats->aal34.cells_received),
+                      cpu_to_be32(fore200e->stats->aal34.cells_dropped),
+                      cpu_to_be32(fore200e->stats->aal34.cells_crc_errors),
+                      cpu_to_be32(fore200e->stats->aal34.cells_protocol_errors),
+                      cpu_to_be32(fore200e->stats->aal34.cspdus_transmitted),
+                      cpu_to_be32(fore200e->stats->aal34.cspdus_received),
+                      cpu_to_be32(fore200e->stats->aal34.cspdus_dropped),
+                      cpu_to_be32(fore200e->stats->aal34.cspdus_protocol_errors));
     
     if (!left--)
        return sprintf(page,"\n"
@@ -3084,15 +3054,15 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "       dropped:\t\t\t%10u\n"
                       "       CRC errors:\t\t%10u\n"
                       "       protocol errors:\t\t%10u\n",
-                      fore200e_swap(fore200e->stats->aal5.cells_transmitted),
-                      fore200e_swap(fore200e->stats->aal5.cells_received),
-                      fore200e_swap(fore200e->stats->aal5.cells_dropped),
-                      fore200e_swap(fore200e->stats->aal5.congestion_experienced),
-                      fore200e_swap(fore200e->stats->aal5.cspdus_transmitted),
-                      fore200e_swap(fore200e->stats->aal5.cspdus_received),
-                      fore200e_swap(fore200e->stats->aal5.cspdus_dropped),
-                      fore200e_swap(fore200e->stats->aal5.cspdus_crc_errors),
-                      fore200e_swap(fore200e->stats->aal5.cspdus_protocol_errors));
+                      cpu_to_be32(fore200e->stats->aal5.cells_transmitted),
+                      cpu_to_be32(fore200e->stats->aal5.cells_received),
+                      cpu_to_be32(fore200e->stats->aal5.cells_dropped),
+                      cpu_to_be32(fore200e->stats->aal5.congestion_experienced),
+                      cpu_to_be32(fore200e->stats->aal5.cspdus_transmitted),
+                      cpu_to_be32(fore200e->stats->aal5.cspdus_received),
+                      cpu_to_be32(fore200e->stats->aal5.cspdus_dropped),
+                      cpu_to_be32(fore200e->stats->aal5.cspdus_crc_errors),
+                      cpu_to_be32(fore200e->stats->aal5.cspdus_protocol_errors));
     
     if (!left--)
        return sprintf(page,"\n"
@@ -3103,11 +3073,11 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
                       "     large b2:\t\t\t%10u\n"
                       "     RX PDUs:\t\t\t%10u\n"
                       "     TX PDUs:\t\t\t%10lu\n",
-                      fore200e_swap(fore200e->stats->aux.small_b1_failed),
-                      fore200e_swap(fore200e->stats->aux.large_b1_failed),
-                      fore200e_swap(fore200e->stats->aux.small_b2_failed),
-                      fore200e_swap(fore200e->stats->aux.large_b2_failed),
-                      fore200e_swap(fore200e->stats->aux.rpd_alloc_failed),
+                      cpu_to_be32(fore200e->stats->aux.small_b1_failed),
+                      cpu_to_be32(fore200e->stats->aux.large_b1_failed),
+                      cpu_to_be32(fore200e->stats->aux.small_b2_failed),
+                      cpu_to_be32(fore200e->stats->aux.large_b2_failed),
+                      cpu_to_be32(fore200e->stats->aux.rpd_alloc_failed),
                       fore200e->tx_sat);
     
     if (!left--)
index 4bad2870c48516e1e1711dd6d2052c3161733261..64558f45e6bc15e44b3925c507daeddea63a68ac 100644 (file)
@@ -127,6 +127,7 @@ static ssize_t firmware_loading_show(struct device *dev,
 /**
  * firmware_loading_store - set value in the 'loading' control file
  * @dev: device pointer
+ * @attr: device attribute pointer
  * @buf: buffer to scan for loading control value
  * @count: number of bytes in @buf
  *
index 97f7f535f41208cfcb695bd7d8f7d7b1f928c13b..bb022ed4a8667936288ac328bde688a4dfbe16be 100644 (file)
@@ -30,8 +30,6 @@ new_skb(ulong len)
                skb->nh.raw = skb->mac.raw = skb->data;
                skb->protocol = __constant_htons(ETH_P_AOE);
                skb->priority = 0;
-               skb_put(skb, len);
-               memset(skb->head, 0, len);
                skb->next = skb->prev = NULL;
 
                /* tell the network layer not to perform IP checksums
@@ -122,8 +120,8 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f)
        skb = f->skb;
        h = (struct aoe_hdr *) skb->mac.raw;
        ah = (struct aoe_atahdr *) (h+1);
-       skb->len = sizeof *h + sizeof *ah;
-       memset(h, 0, ETH_ZLEN);
+       skb_put(skb, sizeof *h + sizeof *ah);
+       memset(h, 0, skb->len);
        f->tag = aoehdr_atainit(d, h);
        f->waited = 0;
        f->buf = buf;
@@ -149,7 +147,6 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f)
                skb->len += bcnt;
                skb->data_len = bcnt;
        } else {
-               skb->len = ETH_ZLEN;
                writebit = 0;
        }
 
@@ -206,6 +203,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail)
                        printk(KERN_INFO "aoe: skb alloc failure\n");
                        continue;
                }
+               skb_put(skb, sizeof *h + sizeof *ch);
                skb->dev = ifp;
                if (sl_tail == NULL)
                        sl_tail = skb;
@@ -243,6 +241,7 @@ freeframe(struct aoedev *d)
                        continue;
                if (atomic_read(&skb_shinfo(f->skb)->dataref) == 1) {
                        skb_shinfo(f->skb)->nr_frags = f->skb->data_len = 0;
+                       skb_trim(f->skb, 0);
                        return f;
                }
                n++;
@@ -698,8 +697,8 @@ aoecmd_ata_id(struct aoedev *d)
        skb = f->skb;
        h = (struct aoe_hdr *) skb->mac.raw;
        ah = (struct aoe_atahdr *) (h+1);
-       skb->len = ETH_ZLEN;
-       memset(h, 0, ETH_ZLEN);
+       skb_put(skb, sizeof *h + sizeof *ah);
+       memset(h, 0, skb->len);
        f->tag = aoehdr_atainit(d, h);
        f->waited = 0;
 
index d719a5d8f4355e45905410f4a1c0b506702d5bb4..9d2ddb209343ac7cd8d91ca5aaf2742df14df17c 100644 (file)
@@ -1907,6 +1907,7 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
                               "does not support reading geometry\n");
                        drv->heads = 255;
                        drv->sectors = 32;      // Sectors per track
+                       drv->raid_level = RAID_UNKNOWN;
                } else {
                        drv->heads = inq_buff->data_byte[6];
                        drv->sectors = inq_buff->data_byte[7];
@@ -2491,7 +2492,7 @@ static void do_cciss_request(request_queue_t *q)
        c->Request.Type.Type = TYPE_CMD;        // It is a command.
        c->Request.Type.Attribute = ATTR_SIMPLE;
        c->Request.Type.Direction =
-           (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write;
+           (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE;
        c->Request.Timeout = 0; // Don't time out
        c->Request.CDB[0] =
            (rq_data_dir(creq) == READ) ? h->cciss_read : h->cciss_write;
index e19ba4ebcd4e2c4763c926bfae4be82135962c0a..68592c3360111ef47de71cb88858bfb25d5b8a31 100644 (file)
@@ -49,6 +49,7 @@
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_lp_config.h>
 #include <asm/iseries/vio.h>
+#include <asm/firmware.h>
 
 MODULE_DESCRIPTION("iSeries Virtual DASD");
 MODULE_AUTHOR("Dave Boutcher");
@@ -769,6 +770,11 @@ static int __init viodasd_init(void)
 {
        int rc;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
+               rc = -ENODEV;
+               goto early_fail;
+       }
+
        /* Try to open to our host lp */
        if (viopath_hostLp == HvLpIndexInvalid)
                vio_set_hostlp();
index fdea58ae16b23c31dcb7cb24ecf57e5dab9ecc77..aeefec97fdee2ca40e706e0c4348f0fca68ca892 100644 (file)
@@ -126,6 +126,7 @@ static struct usb_device_id blacklist_ids[] = {
 
        /* Kensington Bluetooth USB adapter */
        { USB_DEVICE(0x047d, 0x105d), .driver_info = HCI_RESET },
+       { USB_DEVICE(0x047d, 0x105e), .driver_info = HCI_WRONG_SCO_MTU },
 
        /* ISSC Bluetooth Adapter v3.1 */
        { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET },
index e4a2f8f3a1d764f909910dfd03c4b55e2e24f17c..66d028d304390877530c31b2dda46a24af84c88a 100644 (file)
@@ -2139,8 +2139,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
                        cdi->last_sense = s->sense_key;
                }
 
-               rq->bio = bio;
-               if (blk_rq_unmap_user(rq))
+               if (blk_rq_unmap_user(bio))
                        ret = -EFAULT;
 
                if (ret)
index 54ca931e19ea0a0c0b36bc896432278dc1361812..93fbf84dcc4a5d48dbd09d34d4ceb6cd3807ea20 100644 (file)
@@ -47,6 +47,7 @@
 #include <asm/iseries/hv_types.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/vio.h>
+#include <asm/firmware.h>
 
 #define VIOCD_DEVICE                   "iseries/vcd"
 
@@ -748,6 +749,9 @@ static int __init viocd_init(void)
        struct proc_dir_entry *e;
        int ret = 0;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return -ENODEV;
+
        if (viopath_hostLp == HvLpIndexInvalid) {
                vio_set_hostlp();
                /* If we don't have a host, bail out */
index 0bbb04f2390f26d8383bff7f6cebb6f40879f827..6dcdceb812033aeb05693fdd3dbb76fcd767a9ff 100644 (file)
@@ -561,8 +561,7 @@ struct drm_driver {
        int (*context_dtor) (struct drm_device * dev, int context);
        int (*kernel_context_switch) (struct drm_device * dev, int old,
                                      int new);
-       void (*kernel_context_switch_unlock) (struct drm_device * dev,
-                                             drm_lock_t *lock);
+       void (*kernel_context_switch_unlock) (struct drm_device * dev);
        int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence);
        int (*vblank_wait2) (struct drm_device * dev, unsigned int *sequence);
        int (*dri_library_name) (struct drm_device *dev, char *buf);
@@ -1143,9 +1142,5 @@ extern void *drm_calloc(size_t nmemb, size_t size, int area);
 extern unsigned long drm_core_get_map_ofs(drm_map_t * map);
 extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev);
 
-#ifndef pci_pretty_name
-#define pci_pretty_name(dev) ""
-#endif
-
 #endif                         /* __KERNEL__ */
 #endif
index 116ed0f2ac09738e500ce038470d63845c019762..e9993ba461a2ba85e39229ebfc9d46dbe240d13a 100644 (file)
@@ -182,7 +182,7 @@ int drm_unlock(struct inode *inode, struct file *filp,
         * modules but is required by the Sparc driver.
         */
        if (dev->driver->kernel_context_switch_unlock)
-               dev->driver->kernel_context_switch_unlock(dev, &lock);
+               dev->driver->kernel_context_switch_unlock(dev);
        else {
                drm_lock_transfer(dev, &dev->lock.hw_lock->lock,
                                  DRM_KERNEL_CONTEXT);
index 5fd6dc0870cf7b4d36c6b526fceca7e846e5096d..120d10256feb6d5371da2d3c9652f8e26ce73aa4 100644 (file)
@@ -211,14 +211,16 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
        if (!dev)
                return -ENOMEM;
 
-       pci_enable_device(pdev);
+       ret = pci_enable_device(pdev);
+       if (ret)
+               goto err_g1;
 
        if ((ret = drm_fill_in_dev(dev, pdev, ent, driver))) {
                printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
-               goto err_g1;
+               goto err_g2;
        }
        if ((ret = drm_get_head(dev, &dev->primary)))
-               goto err_g1;
+               goto err_g2;
        
        DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
                 driver->name, driver->major, driver->minor, driver->patchlevel,
@@ -226,7 +228,9 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
 
        return 0;
 
-      err_g1:
+err_g2:
+       pci_disable_device(pdev);
+err_g1:
        drm_free(dev, sizeof(*dev), DRM_MEM_STUB);
        return ret;
 }
index ba4b8de83cf0feda86f5d126534a56fd814fd33f..cc8e2ebe128c55056b6a29ec66a060cbe7372168 100644 (file)
@@ -45,8 +45,8 @@ struct class *drm_sysfs_create(struct module *owner, char *name)
        int err;
 
        class = class_create(owner, name);
-       if (!class) {
-               err = -ENOMEM;
+       if (IS_ERR(class)) {
+               err = PTR_ERR(class);
                goto err_out;
        }
 
@@ -113,8 +113,8 @@ struct class_device *drm_sysfs_device_add(struct class *cs, drm_head_t *head)
                                        MKDEV(DRM_MAJOR, head->minor),
                                        &(head->dev->pdev)->dev,
                                        "card%d", head->minor);
-       if (!class_dev) {
-               err = -ENOMEM;
+       if (IS_ERR(class_dev)) {
+               err = PTR_ERR(class_dev);
                goto err_out;
        }
 
index e5463b111fc094a173ce4ddf73b89c70f7974ce5..e2c4b3a41b1e33bb64d7c379c21e4873de9fcbf0 100644 (file)
@@ -46,88 +46,167 @@ static void i915_vblank_tasklet(drm_device_t *dev)
 {
        drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
        unsigned long irqflags;
-       struct list_head *list, *tmp;
+       struct list_head *list, *tmp, hits, *hit;
+       int nhits, nrects, slice[2], upper[2], lower[2], i;
+       unsigned counter[2] = { atomic_read(&dev->vbl_received),
+                               atomic_read(&dev->vbl_received2) };
+       drm_drawable_info_t *drw;
+       drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv;
+       u32 cpp = dev_priv->cpp;
+       u32 cmd = (cpp == 4) ? (XY_SRC_COPY_BLT_CMD |
+                               XY_SRC_COPY_BLT_WRITE_ALPHA |
+                               XY_SRC_COPY_BLT_WRITE_RGB)
+                            : XY_SRC_COPY_BLT_CMD;
+       u32 pitchropcpp = (sarea_priv->pitch * cpp) | (0xcc << 16) |
+                         (cpp << 23) | (1 << 24);
+       RING_LOCALS;
 
        DRM_DEBUG("\n");
 
+       INIT_LIST_HEAD(&hits);
+
+       nhits = nrects = 0;
+
        spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);
 
+       /* Find buffer swaps scheduled for this vertical blank */
        list_for_each_safe(list, tmp, &dev_priv->vbl_swaps.head) {
                drm_i915_vbl_swap_t *vbl_swap =
                        list_entry(list, drm_i915_vbl_swap_t, head);
-               atomic_t *counter = vbl_swap->pipe ? &dev->vbl_received2 :
-                       &dev->vbl_received;
-
-               if ((atomic_read(counter) - vbl_swap->sequence) <= (1<<23)) {
-                       drm_drawable_info_t *drw;
-
-                       spin_unlock(&dev_priv->swaps_lock);
-
-                       spin_lock(&dev->drw_lock);
-
-                       drw = drm_get_drawable_info(dev, vbl_swap->drw_id);
-                               
-                       if (drw) {
-                               int i, num_rects = drw->num_rects;
-                               drm_clip_rect_t *rect = drw->rects;
-                               drm_i915_sarea_t *sarea_priv =
-                                   dev_priv->sarea_priv;
-                               u32 cpp = dev_priv->cpp;
-                               u32 cmd = (cpp == 4) ? (XY_SRC_COPY_BLT_CMD |
-                                                       XY_SRC_COPY_BLT_WRITE_ALPHA |
-                                                       XY_SRC_COPY_BLT_WRITE_RGB)
-                                                    : XY_SRC_COPY_BLT_CMD;
-                               u32 pitchropcpp = (sarea_priv->pitch * cpp) |
-                                                 (0xcc << 16) | (cpp << 23) |
-                                                 (1 << 24);
-                               RING_LOCALS;
-
-                               i915_kernel_lost_context(dev);
-
-                               BEGIN_LP_RING(6);
-
-                               OUT_RING(GFX_OP_DRAWRECT_INFO);
-                               OUT_RING(0);
-                               OUT_RING(0);
-                               OUT_RING(sarea_priv->width |
-                                        sarea_priv->height << 16);
-                               OUT_RING(sarea_priv->width |
-                                        sarea_priv->height << 16);
-                               OUT_RING(0);
 
-                               ADVANCE_LP_RING();
+               if ((counter[vbl_swap->pipe] - vbl_swap->sequence) > (1<<23))
+                       continue;
+
+               list_del(list);
+               dev_priv->swaps_pending--;
 
-                               sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT;
+               spin_unlock(&dev_priv->swaps_lock);
+               spin_lock(&dev->drw_lock);
 
-                               for (i = 0; i < num_rects; i++, rect++) {
-                                       BEGIN_LP_RING(8);
+               drw = drm_get_drawable_info(dev, vbl_swap->drw_id);
+
+               if (!drw) {
+                       spin_unlock(&dev->drw_lock);
+                       drm_free(vbl_swap, sizeof(*vbl_swap), DRM_MEM_DRIVER);
+                       spin_lock(&dev_priv->swaps_lock);
+                       continue;
+               }
 
-                                       OUT_RING(cmd);
-                                       OUT_RING(pitchropcpp);
-                                       OUT_RING((rect->y1 << 16) | rect->x1);
-                                       OUT_RING((rect->y2 << 16) | rect->x2);
-                                       OUT_RING(sarea_priv->front_offset);
-                                       OUT_RING((rect->y1 << 16) | rect->x1);
-                                       OUT_RING(pitchropcpp & 0xffff);
-                                       OUT_RING(sarea_priv->back_offset);
+               list_for_each(hit, &hits) {
+                       drm_i915_vbl_swap_t *swap_cmp =
+                               list_entry(hit, drm_i915_vbl_swap_t, head);
+                       drm_drawable_info_t *drw_cmp =
+                               drm_get_drawable_info(dev, swap_cmp->drw_id);
 
-                                       ADVANCE_LP_RING();
-                               }
+                       if (drw_cmp &&
+                           drw_cmp->rects[0].y1 > drw->rects[0].y1) {
+                               list_add_tail(list, hit);
+                               break;
                        }
+               }
 
-                       spin_unlock(&dev->drw_lock);
+               spin_unlock(&dev->drw_lock);
 
-                       spin_lock(&dev_priv->swaps_lock);
+               /* List of hits was empty, or we reached the end of it */
+               if (hit == &hits)
+                       list_add_tail(list, hits.prev);
 
-                       list_del(list);
+               nhits++;
 
-                       drm_free(vbl_swap, sizeof(*vbl_swap), DRM_MEM_DRIVER);
+               spin_lock(&dev_priv->swaps_lock);
+       }
+
+       if (nhits == 0) {
+               spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
+               return;
+       }
+
+       spin_unlock(&dev_priv->swaps_lock);
 
-                       dev_priv->swaps_pending--;
+       i915_kernel_lost_context(dev);
+
+       BEGIN_LP_RING(6);
+
+       OUT_RING(GFX_OP_DRAWRECT_INFO);
+       OUT_RING(0);
+       OUT_RING(0);
+       OUT_RING(sarea_priv->width | sarea_priv->height << 16);
+       OUT_RING(sarea_priv->width | sarea_priv->height << 16);
+       OUT_RING(0);
+
+       ADVANCE_LP_RING();
+
+       sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT;
+
+       upper[0] = upper[1] = 0;
+       slice[0] = max(sarea_priv->pipeA_h / nhits, 1);
+       slice[1] = max(sarea_priv->pipeB_h / nhits, 1);
+       lower[0] = sarea_priv->pipeA_y + slice[0];
+       lower[1] = sarea_priv->pipeB_y + slice[0];
+
+       spin_lock(&dev->drw_lock);
+
+       /* Emit blits for buffer swaps, partitioning both outputs into as many
+        * slices as there are buffer swaps scheduled in order to avoid tearing
+        * (based on the assumption that a single buffer swap would always
+        * complete before scanout starts).
+        */
+       for (i = 0; i++ < nhits;
+            upper[0] = lower[0], lower[0] += slice[0],
+            upper[1] = lower[1], lower[1] += slice[1]) {
+               if (i == nhits)
+                       lower[0] = lower[1] = sarea_priv->height;
+
+               list_for_each(hit, &hits) {
+                       drm_i915_vbl_swap_t *swap_hit =
+                               list_entry(hit, drm_i915_vbl_swap_t, head);
+                       drm_clip_rect_t *rect;
+                       int num_rects, pipe;
+                       unsigned short top, bottom;
+
+                       drw = drm_get_drawable_info(dev, swap_hit->drw_id);
+
+                       if (!drw)
+                               continue;
+
+                       rect = drw->rects;
+                       pipe = swap_hit->pipe;
+                       top = upper[pipe];
+                       bottom = lower[pipe];
+
+                       for (num_rects = drw->num_rects; num_rects--; rect++) {
+                               int y1 = max(rect->y1, top);
+                               int y2 = min(rect->y2, bottom);
+
+                               if (y1 >= y2)
+                                       continue;
+
+                               BEGIN_LP_RING(8);
+
+                               OUT_RING(cmd);
+                               OUT_RING(pitchropcpp);
+                               OUT_RING((y1 << 16) | rect->x1);
+                               OUT_RING((y2 << 16) | rect->x2);
+                               OUT_RING(sarea_priv->front_offset);
+                               OUT_RING((y1 << 16) | rect->x1);
+                               OUT_RING(pitchropcpp & 0xffff);
+                               OUT_RING(sarea_priv->back_offset);
+
+                               ADVANCE_LP_RING();
+                       }
                }
        }
 
-       spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
+       spin_unlock_irqrestore(&dev->drw_lock, irqflags);
+
+       list_for_each_safe(hit, tmp, &hits) {
+               drm_i915_vbl_swap_t *swap_hit =
+                       list_entry(hit, drm_i915_vbl_swap_t, head);
+
+               list_del(hit);
+
+               drm_free(swap_hit, sizeof(*swap_hit), DRM_MEM_DRIVER);
+       }
 }
 
 irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
index 5d835b006f55e41941e7ccdae4f7a11e45d61655..6e8af313f2b4257c2a1363002444cd94486978ed 100644 (file)
@@ -1,7 +1,8 @@
 /* r128_drm.h -- Public header for the r128 driver -*- linux-c -*-
  * Created: Wed Apr  5 19:24:19 2000 by kevin@precisioninsight.com
  */
-/* Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
+/*
+ * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All rights reserved.
  *
index 94abffb2cca56859ded7d19631b77f39af2396cf..f1efb49de8dfb289a880c1992015a79e6434451c 100644 (file)
@@ -1,7 +1,8 @@
 /* r128_drv.h -- Private header for r128 driver -*- linux-c -*-
  * Created: Mon Dec 13 09:51:11 1999 by faith@precisioninsight.com
  */
-/* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+/*
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All rights reserved.
  *
index a080cdd6081ed639baa377107982e3246dc9a7c9..17b11e7d8f32e5f5b518d8ca5448364a2029e4a8 100644 (file)
@@ -1,7 +1,8 @@
 /* r128_state.c -- State support for r128 -*- linux-c -*-
  * Created: Thu Jan 27 02:53:43 2000 by gareth@valinux.com
  */
-/* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+/*
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
index d14477ba3679ef34743c6ba0d25308ea63551170..032a022ec6a8d81cc8c1f322ffcbdf0392ebcc47 100644 (file)
@@ -242,26 +242,6 @@ static __inline__ int r300_check_range(unsigned reg, int count)
        return 0;
 }
 
-/*
- * we expect offsets passed to the framebuffer to be either within video 
- * memory or within AGP space 
- */
-static __inline__ int r300_check_offset(drm_radeon_private_t *dev_priv,
-                                       u32 offset)
-{
-       /* we realy want to check against end of video aperture
-          but this value is not being kept.
-          This code is correct for now (does the same thing as the
-          code that sets MC_FB_LOCATION) in radeon_cp.c */
-       if (offset >= dev_priv->fb_location &&
-           offset < (dev_priv->fb_location + dev_priv->fb_size))
-               return 0;
-       if (offset >= dev_priv->gart_vm_start &&
-           offset < (dev_priv->gart_vm_start + dev_priv->gart_size))
-               return 0;
-       return 1;
-}
-
 static __inline__ int r300_emit_carefully_checked_packet0(drm_radeon_private_t *
                                                          dev_priv,
                                                          drm_radeon_kcmd_buffer_t
@@ -290,7 +270,7 @@ static __inline__ int r300_emit_carefully_checked_packet0(drm_radeon_private_t *
                case MARK_SAFE:
                        break;
                case MARK_CHECK_OFFSET:
-                       if (r300_check_offset(dev_priv, (u32) values[i])) {
+                       if (!radeon_check_offset(dev_priv, (u32) values[i])) {
                                DRM_ERROR
                                    ("Offset failed range check (reg=%04x sz=%d)\n",
                                     reg, sz);
@@ -452,7 +432,7 @@ static __inline__ int r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv,
        i = 1;
        while ((k < narrays) && (i < (count + 1))) {
                i++;            /* skip attribute field */
-               if (r300_check_offset(dev_priv, payload[i])) {
+               if (!radeon_check_offset(dev_priv, payload[i])) {
                        DRM_ERROR
                            ("Offset failed range check (k=%d i=%d) while processing 3D_LOAD_VBPNTR packet.\n",
                             k, i);
@@ -463,7 +443,7 @@ static __inline__ int r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv,
                if (k == narrays)
                        break;
                /* have one more to process, they come in pairs */
-               if (r300_check_offset(dev_priv, payload[i])) {
+               if (!radeon_check_offset(dev_priv, payload[i])) {
                        DRM_ERROR
                            ("Offset failed range check (k=%d i=%d) while processing 3D_LOAD_VBPNTR packet.\n",
                             k, i);
@@ -508,7 +488,7 @@ static __inline__ int r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv,
                if (cmd[1] & (RADEON_GMC_SRC_PITCH_OFFSET_CNTL 
                              | RADEON_GMC_DST_PITCH_OFFSET_CNTL)) {
                        offset = cmd[2] << 10;
-                       ret = r300_check_offset(dev_priv, offset);
+                       ret = !radeon_check_offset(dev_priv, offset);
                        if (ret) {
                                DRM_ERROR("Invalid bitblt first offset is %08X\n", offset);
                                return DRM_ERR(EINVAL);
@@ -518,7 +498,7 @@ static __inline__ int r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv,
                if ((cmd[1] & RADEON_GMC_SRC_PITCH_OFFSET_CNTL) &&
                    (cmd[1] & RADEON_GMC_DST_PITCH_OFFSET_CNTL)) {
                        offset = cmd[3] << 10;
-                       ret = r300_check_offset(dev_priv, offset);
+                       ret = !radeon_check_offset(dev_priv, offset);
                        if (ret) {
                                DRM_ERROR("Invalid bitblt second offset is %08X\n", offset);
                                return DRM_ERR(EINVAL);
@@ -551,7 +531,7 @@ static __inline__ int r300_emit_indx_buffer(drm_radeon_private_t *dev_priv,
                DRM_ERROR("Invalid indx_buffer reg address %08X\n", cmd[1]);
                return DRM_ERR(EINVAL);
        }
-       ret = r300_check_offset(dev_priv, cmd[2]);
+       ret = !radeon_check_offset(dev_priv, cmd[2]);
        if (ret) {
                DRM_ERROR("Invalid indx_buffer offset is %08X\n", cmd[2]);
                return DRM_ERR(EINVAL);
index f45cd7f147a5ad97eaffd2aec313ed1d0fb4fe05..8b105f1460a72a9ac492be62bfe27f63155301fc 100644 (file)
@@ -303,6 +303,21 @@ extern int radeon_no_wb;
 extern drm_ioctl_desc_t radeon_ioctls[];
 extern int radeon_max_ioctl;
 
+/* Check whether the given hardware address is inside the framebuffer or the
+ * GART area.
+ */
+static __inline__ int radeon_check_offset(drm_radeon_private_t *dev_priv,
+                                         u64 off)
+{
+       u32 fb_start = dev_priv->fb_location;
+       u32 fb_end = fb_start + dev_priv->fb_size - 1;
+       u32 gart_start = dev_priv->gart_vm_start;
+       u32 gart_end = gart_start + dev_priv->gart_size - 1;
+
+       return ((off >= fb_start && off <= fb_end) ||
+               (off >= gart_start && off <= gart_end));
+}
+
                                /* radeon_cp.c */
 extern int radeon_cp_init(DRM_IOCTL_ARGS);
 extern int radeon_cp_start(DRM_IOCTL_ARGS);
index d60519de887b035272df3ec43bad0123abb5d40b..3ff0baa2fbfa201f7c37c20df5d6c601afc009d7 100644 (file)
@@ -1,5 +1,5 @@
-/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*-
- *
+/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*- */
+/*
  * Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.
  *
  * The Weather Channel (TM) funded Tungsten Graphics to develop the
index 030a6fad0d86ef0ba695233051e3b7f941ae6230..517cad8b6e3a586b825a14ea3e0118f864846c8e 100644 (file)
@@ -1,5 +1,5 @@
-/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*-
- *
+/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*- */
+/*
  * Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.
  *
  * The Weather Channel (TM) funded Tungsten Graphics to develop the
index 6e04fdd732ac4ab2b0fd36e826e584b4c9b4c1bb..938eccb78cc05211d6d0ac41ad9ce11fbe8e890d 100644 (file)
@@ -43,10 +43,7 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t *
                                                    u32 *offset)
 {
        u64 off = *offset;
-       u32 fb_start = dev_priv->fb_location;
-       u32 fb_end = fb_start + dev_priv->fb_size - 1;
-       u32 gart_start = dev_priv->gart_vm_start;
-       u32 gart_end = gart_start + dev_priv->gart_size - 1;
+       u32 fb_end = dev_priv->fb_location + dev_priv->fb_size - 1;
        struct drm_radeon_driver_file_fields *radeon_priv;
 
        /* Hrm ... the story of the offset ... So this function converts
@@ -66,8 +63,7 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t *
        /* First, the best case, the offset already lands in either the
         * framebuffer or the GART mapped space
         */
-       if ((off >= fb_start && off <= fb_end) ||
-           (off >= gart_start && off <= gart_end))
+       if (radeon_check_offset(dev_priv, off))
                return 0;
 
        /* Ok, that didn't happen... now check if we have a zero based
@@ -81,11 +77,10 @@ static __inline__ int radeon_check_and_fixup_offset(drm_radeon_private_t *
 
        /* Finally, assume we aimed at a GART offset if beyond the fb */
        if (off > fb_end)
-               off = off - fb_end - 1 + gart_start;
+               off = off - fb_end - 1 + dev_priv->gart_vm_start;
 
        /* Now recheck and fail if out of bounds */
-       if ((off >= fb_start && off <= fb_end) ||
-           (off >= gart_start && off <= gart_end)) {
+       if (radeon_check_offset(dev_priv, off)) {
                DRM_DEBUG("offset fixed up to 0x%x\n", (unsigned int)off);
                *offset = off;
                return 0;
index a9a84f88df5e465ce2c9461e97b91bd9c48e074b..b94fab55680940dd44688052e0987634ad3b9cc1 100644 (file)
@@ -963,8 +963,8 @@ static int savage_bci_event_emit(DRM_IOCTL_ARGS)
 
        event.count = savage_bci_emit_event(dev_priv, event.flags);
        event.count |= dev_priv->event_wrap << 16;
-       DRM_COPY_TO_USER_IOCTL(&((drm_savage_event_emit_t __user *) data)->
-                              count, event.count, sizeof(event.count));
+       DRM_COPY_TO_USER_IOCTL((drm_savage_event_emit_t __user *) data,
+                              event, sizeof(event));
        return 0;
 }
 
index e1d70e8b626872f157f7c3731a349bcdc1abb9bf..664f36c98e6acc4f257759aaff8c5586f48653e2 100644 (file)
@@ -113,7 +113,12 @@ static int rtc_has_irq = 1;
 #define hpet_set_rtc_irq_bit(arg)              0
 #define hpet_rtc_timer_init()                  do { } while (0)
 #define hpet_rtc_dropped_irq()                         0
-static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) {return 0;}
+#ifdef RTC_IRQ
+static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
+{
+       return 0;
+}
+#endif
 #else
 extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id);
 #endif
index 244d30a03fef9d80daaf2092875361147202f61e..448d5083c3810abf73d0ea647c44773c5bc52508 100644 (file)
@@ -807,8 +807,6 @@ static int __init tlclk_init(void)
                        &tlclk_attribute_group);
        if (ret) {
                printk(KERN_ERR "tlclk: failed to create sysfs device attributes.\n");
-               sysfs_remove_group(&tlclk_device->dev.kobj,
-                       &tlclk_attribute_group);
                goto out5;
        }
 
index 0e0da443cbd57d545e2875a93dcecaee7d2c5639..8de6b95aeb844cd03468d86f8643d2f65ed18acf 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/tty_flip.h>
 #include <linux/sysrq.h>
 
+#include <asm/firmware.h>
 #include <asm/iseries/vio.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_call_event.h>
@@ -1060,6 +1061,9 @@ static int __init viocons_init2(void)
        atomic_t wait_flag;
        int rc;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return -ENODEV;
+
        /* +2 for fudge */
        rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
                        viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
@@ -1145,6 +1149,9 @@ static int __init viocons_init(void)
 {
        int i;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return -ENODEV;
+
        printk(VIOCONS_KERN_INFO "registering console\n");
        for (i = 0; i < VTTY_PORTS; i++) {
                port_info[i].lp = HvLpIndexInvalid;
index 94d79cb8ce8d559ac4690eabb7e30f7ad1cb00d2..9438512b17f1d593d119753d0def60be2b536cda 100644 (file)
@@ -49,7 +49,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
-
+#include <asm/firmware.h>
 #include <asm/vio.h>
 #include <asm/iseries/vio.h>
 #include <asm/iseries/hv_lp_event.h>
@@ -997,6 +997,9 @@ int __init viotap_init(void)
        int ret;
        struct proc_dir_entry *e;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return -ENODEV;
+
        op_struct_list = NULL;
        if ((ret = add_op_structs(VIOTAPE_MAXREQ)) < 0) {
                printk(VIOTAPE_KERN_WARN "couldn't allocate op structs\n");
index d55b938b1aebeb83bc7d60e3016e7e2b28fdc40b..ffdffb6379efa944b8972bea3c8cbea7ad6194a2 100644 (file)
@@ -368,7 +368,6 @@ static struct pci_device_id atiixp_pci_tbl[] = {
        { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
-       { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, PCI_ANY_ID, PCI_ANY_ID, (PCI_CLASS_STORAGE_IDE<<8)|0x8a, 0xffff05, 1},
        { 0, },
 };
 MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
index 1726131b20be1ed00e2161515582abc89c4de0b2..4e3f127e4003612106c3b1fa10aab971bd88e69b 100644 (file)
@@ -2339,6 +2339,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s
                rs->state = CCPResetIdle;
                rs->is = is;
                rs->id = id;
+               init_timer(&rs->timer);
                rs->timer.data = (unsigned long)rs;
                rs->timer.function = isdn_ppp_ccp_timer_callback;
                is->reset->rs[id] = rs;
index fd1bb870545c28adc3fa8c4bb7927046504e67e8..9f24f22e4cb2f734caeb6aa51974a755b61cd0d6 100644 (file)
@@ -113,6 +113,11 @@ unsigned long segment_base(u16 selector)
 }
 EXPORT_SYMBOL_GPL(segment_base);
 
+static inline int valid_vcpu(int n)
+{
+       return likely(n >= 0 && n < KVM_MAX_VCPUS);
+}
+
 int kvm_read_guest(struct kvm_vcpu *vcpu,
                             gva_t addr,
                             unsigned long size,
@@ -494,7 +499,7 @@ static int kvm_dev_ioctl_create_vcpu(struct kvm *kvm, int n)
        struct kvm_vcpu *vcpu;
 
        r = -EINVAL;
-       if (n < 0 || n >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(n))
                goto out;
 
        vcpu = &kvm->vcpus[n];
@@ -1179,7 +1184,7 @@ static int kvm_dev_ioctl_run(struct kvm *kvm, struct kvm_run *kvm_run)
        struct kvm_vcpu *vcpu;
        int r;
 
-       if (kvm_run->vcpu < 0 || kvm_run->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(kvm_run->vcpu))
                return -EINVAL;
 
        vcpu = vcpu_load(kvm, kvm_run->vcpu);
@@ -1208,7 +1213,7 @@ static int kvm_dev_ioctl_get_regs(struct kvm *kvm, struct kvm_regs *regs)
 {
        struct kvm_vcpu *vcpu;
 
-       if (regs->vcpu < 0 || regs->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(regs->vcpu))
                return -EINVAL;
 
        vcpu = vcpu_load(kvm, regs->vcpu);
@@ -1254,7 +1259,7 @@ static int kvm_dev_ioctl_set_regs(struct kvm *kvm, struct kvm_regs *regs)
 {
        struct kvm_vcpu *vcpu;
 
-       if (regs->vcpu < 0 || regs->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(regs->vcpu))
                return -EINVAL;
 
        vcpu = vcpu_load(kvm, regs->vcpu);
@@ -1301,7 +1306,7 @@ static int kvm_dev_ioctl_get_sregs(struct kvm *kvm, struct kvm_sregs *sregs)
        struct kvm_vcpu *vcpu;
        struct descriptor_table dt;
 
-       if (sregs->vcpu < 0 || sregs->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(sregs->vcpu))
                return -EINVAL;
        vcpu = vcpu_load(kvm, sregs->vcpu);
        if (!vcpu)
@@ -1353,7 +1358,7 @@ static int kvm_dev_ioctl_set_sregs(struct kvm *kvm, struct kvm_sregs *sregs)
        int i;
        struct descriptor_table dt;
 
-       if (sregs->vcpu < 0 || sregs->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(sregs->vcpu))
                return -EINVAL;
        vcpu = vcpu_load(kvm, sregs->vcpu);
        if (!vcpu)
@@ -1412,6 +1417,9 @@ static int kvm_dev_ioctl_set_sregs(struct kvm *kvm, struct kvm_sregs *sregs)
 /*
  * List of msr numbers which we expose to userspace through KVM_GET_MSRS
  * and KVM_SET_MSRS, and KVM_GET_MSR_INDEX_LIST.
+ *
+ * This list is modified at module load time to reflect the
+ * capabilities of the host cpu.
  */
 static u32 msrs_to_save[] = {
        MSR_IA32_SYSENTER_CS, MSR_IA32_SYSENTER_ESP, MSR_IA32_SYSENTER_EIP,
@@ -1422,6 +1430,22 @@ static u32 msrs_to_save[] = {
        MSR_IA32_TIME_STAMP_COUNTER,
 };
 
+static unsigned num_msrs_to_save;
+
+static __init void kvm_init_msr_list(void)
+{
+       u32 dummy[2];
+       unsigned i, j;
+
+       for (i = j = 0; i < ARRAY_SIZE(msrs_to_save); i++) {
+               if (rdmsr_safe(msrs_to_save[i], &dummy[0], &dummy[1]) < 0)
+                       continue;
+               if (j < i)
+                       msrs_to_save[j] = msrs_to_save[i];
+               j++;
+       }
+       num_msrs_to_save = j;
+}
 
 /*
  * Adapt set_msr() to msr_io()'s calling convention
@@ -1444,7 +1468,7 @@ static int __msr_io(struct kvm *kvm, struct kvm_msrs *msrs,
        struct kvm_vcpu *vcpu;
        int i;
 
-       if (msrs->vcpu < 0 || msrs->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(msrs->vcpu))
                return -EINVAL;
 
        vcpu = vcpu_load(kvm, msrs->vcpu);
@@ -1537,7 +1561,7 @@ static int kvm_dev_ioctl_interrupt(struct kvm *kvm, struct kvm_interrupt *irq)
 {
        struct kvm_vcpu *vcpu;
 
-       if (irq->vcpu < 0 || irq->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(irq->vcpu))
                return -EINVAL;
        if (irq->irq < 0 || irq->irq >= 256)
                return -EINVAL;
@@ -1559,7 +1583,7 @@ static int kvm_dev_ioctl_debug_guest(struct kvm *kvm,
        struct kvm_vcpu *vcpu;
        int r;
 
-       if (dbg->vcpu < 0 || dbg->vcpu >= KVM_MAX_VCPUS)
+       if (!valid_vcpu(dbg->vcpu))
                return -EINVAL;
        vcpu = vcpu_load(kvm, dbg->vcpu);
        if (!vcpu)
@@ -1579,6 +1603,9 @@ static long kvm_dev_ioctl(struct file *filp,
        int r = -EINVAL;
 
        switch (ioctl) {
+       case KVM_GET_API_VERSION:
+               r = KVM_API_VERSION;
+               break;
        case KVM_CREATE_VCPU: {
                r = kvm_dev_ioctl_create_vcpu(kvm, arg);
                if (r)
@@ -1730,15 +1757,15 @@ static long kvm_dev_ioctl(struct file *filp,
                if (copy_from_user(&msr_list, user_msr_list, sizeof msr_list))
                        goto out;
                n = msr_list.nmsrs;
-               msr_list.nmsrs = ARRAY_SIZE(msrs_to_save);
+               msr_list.nmsrs = num_msrs_to_save;
                if (copy_to_user(user_msr_list, &msr_list, sizeof msr_list))
                        goto out;
                r = -E2BIG;
-               if (n < ARRAY_SIZE(msrs_to_save))
+               if (n < num_msrs_to_save)
                        goto out;
                r = -EFAULT;
                if (copy_to_user(user_msr_list->indices, &msrs_to_save,
-                                sizeof msrs_to_save))
+                                num_msrs_to_save * sizeof(u32)))
                        goto out;
                r = 0;
        }
@@ -1889,6 +1916,8 @@ static __init int kvm_init(void)
 
        kvm_init_debug();
 
+       kvm_init_msr_list();
+
        if ((bad_page = alloc_page(GFP_KERNEL)) == NULL) {
                r = -ENOMEM;
                goto out;
index 3d367cbfe1f93ca9ac09a452b0baa9c8cfe262d9..bdffe83b19e8237d7818897cbe687640d28e4c3b 100644 (file)
@@ -647,14 +647,20 @@ int kvm_mmu_init(struct kvm_vcpu *vcpu)
        ASSERT(!VALID_PAGE(vcpu->mmu.root_hpa));
        ASSERT(list_empty(&vcpu->free_pages));
 
-       if ((r = alloc_mmu_pages(vcpu)))
-               return r;
+       r = alloc_mmu_pages(vcpu);
+       if (r)
+               goto out;
+
+       r = init_kvm_mmu(vcpu);
+       if (r)
+               goto out_free_pages;
 
-       if ((r = init_kvm_mmu(vcpu))) {
-               free_mmu_pages(vcpu);
-               return r;
-       }
        return 0;
+
+out_free_pages:
+       free_mmu_pages(vcpu);
+out:
+       return r;
 }
 
 void kvm_mmu_destroy(struct kvm_vcpu *vcpu)
index 0e6bc8c649ce9ada43835a155be4c40fd439365d..9ec87636ded6dc0b9f5efd42d9f5e25f38680f43 100644 (file)
@@ -402,11 +402,11 @@ static __init int svm_hardware_setup(void)
        set_msr_interception(msrpm_va, MSR_GS_BASE, 1, 1);
        set_msr_interception(msrpm_va, MSR_FS_BASE, 1, 1);
        set_msr_interception(msrpm_va, MSR_KERNEL_GS_BASE, 1, 1);
-       set_msr_interception(msrpm_va, MSR_STAR, 1, 1);
        set_msr_interception(msrpm_va, MSR_LSTAR, 1, 1);
        set_msr_interception(msrpm_va, MSR_CSTAR, 1, 1);
        set_msr_interception(msrpm_va, MSR_SYSCALL_MASK, 1, 1);
 #endif
+       set_msr_interception(msrpm_va, MSR_K6_STAR, 1, 1);
        set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_CS, 1, 1);
        set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_ESP, 1, 1);
        set_msr_interception(msrpm_va, MSR_IA32_SYSENTER_EIP, 1, 1);
@@ -575,6 +575,8 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
        memset(vcpu->svm->db_regs, 0, sizeof(vcpu->svm->db_regs));
        init_vmcb(vcpu->svm->vmcb);
 
+       fx_init(vcpu);
+
        return 0;
 
 out2:
@@ -1071,6 +1073,8 @@ static int emulate_on_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_ru
 static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
 {
        switch (ecx) {
+       case MSR_IA32_P5_MC_ADDR:
+       case MSR_IA32_P5_MC_TYPE:
        case MSR_IA32_MC0_CTL:
        case MSR_IA32_MCG_STATUS:
        case MSR_IA32_MCG_CAP:
@@ -1098,10 +1102,10 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data)
        case MSR_IA32_APICBASE:
                *data = vcpu->apic_base;
                break;
-#ifdef CONFIG_X86_64
-       case MSR_STAR:
+       case MSR_K6_STAR:
                *data = vcpu->svm->vmcb->save.star;
                break;
+#ifdef CONFIG_X86_64
        case MSR_LSTAR:
                *data = vcpu->svm->vmcb->save.lstar;
                break;
@@ -1173,10 +1177,10 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
        case MSR_IA32_APICBASE:
                vcpu->apic_base = data;
                break;
-#ifdef CONFIG_X86_64_
-       case MSR_STAR:
+       case MSR_K6_STAR:
                vcpu->svm->vmcb->save.star = data;
                break;
+#ifdef CONFIG_X86_64_
        case MSR_LSTAR:
                vcpu->svm->vmcb->save.lstar = data;
                break;
@@ -1387,6 +1391,10 @@ again:
                save_db_regs(vcpu->svm->host_db_regs);
                load_db_regs(vcpu->svm->db_regs);
        }
+
+       fx_save(vcpu->host_fx_image);
+       fx_restore(vcpu->guest_fx_image);
+
        asm volatile (
 #ifdef CONFIG_X86_64
                "push %%rbx; push %%rcx; push %%rdx;"
@@ -1496,6 +1504,9 @@ again:
 #endif
                : "cc", "memory" );
 
+       fx_save(vcpu->guest_fx_image);
+       fx_restore(vcpu->host_fx_image);
+
        if ((vcpu->svm->vmcb->save.dr7 & 0xff))
                load_db_regs(vcpu->svm->host_db_regs);
 
index f0f0b1a781f8191304da44ed396ac8e89cd086ba..983a15b1977c970f341f9af4d6a8ae0e539a9df6 100644 (file)
@@ -359,6 +359,8 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
        case MSR_IA32_SYSENTER_ESP:
                data = vmcs_read32(GUEST_SYSENTER_ESP);
                break;
+       case MSR_IA32_P5_MC_ADDR:
+       case MSR_IA32_P5_MC_TYPE:
        case MSR_IA32_MC0_CTL:
        case MSR_IA32_MCG_STATUS:
        case MSR_IA32_MCG_CAP:
@@ -726,6 +728,7 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
        vmcs_write32(GUEST_SS_AR_BYTES, 0xf3);
 
        vmcs_write32(GUEST_CS_AR_BYTES, 0xf3);
+       vmcs_write32(GUEST_CS_LIMIT, 0xffff);
        vmcs_write16(GUEST_CS_SELECTOR, vmcs_readl(GUEST_CS_BASE) >> 4);
 
        fix_rmode_seg(VCPU_SREG_ES, &vcpu->rmode.es);
index 21e2a7b0884157b8b3016c7a2ac8e74ebfd9fe76..d1cb45f6d6a902c33b333957fffbaee15daa664d 100644 (file)
@@ -1792,7 +1792,8 @@ state_store(mdk_rdev_t *rdev, const char *buf, size_t len)
                else {
                        mddev_t *mddev = rdev->mddev;
                        kick_rdev_from_array(rdev);
-                       md_update_sb(mddev, 1);
+                       if (mddev->pers)
+                               md_update_sb(mddev, 1);
                        md_new_event(mddev);
                        err = 0;
                }
@@ -2004,6 +2005,7 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi
 
        rdev->desc_nr = -1;
        rdev->saved_raid_disk = -1;
+       rdev->raid_disk = -1;
        rdev->flags = 0;
        rdev->data_offset = 0;
        rdev->sb_events = 0;
@@ -2233,7 +2235,6 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks);
 static ssize_t
 raid_disks_store(mddev_t *mddev, const char *buf, size_t len)
 {
-       /* can only set raid_disks if array is not yet active */
        char *e;
        int rv = 0;
        unsigned long n = simple_strtoul(buf, &e, 10);
@@ -2631,7 +2632,7 @@ metadata_store(mddev_t *mddev, const char *buf, size_t len)
                return -EINVAL;
        buf = e+1;
        minor = simple_strtoul(buf, &e, 10);
-       if (e==buf || *e != '\n')
+       if (e==buf || (*e && *e != '\n') )
                return -EINVAL;
        if (major >= sizeof(super_types)/sizeof(super_types[0]) ||
            super_types[major].name == NULL)
@@ -3980,6 +3981,7 @@ static int set_array_info(mddev_t * mddev, mdu_array_info_t *info)
                mddev->major_version = info->major_version;
                mddev->minor_version = info->minor_version;
                mddev->patch_version = info->patch_version;
+               mddev->persistent = !info->not_persistent;
                return 0;
        }
        mddev->major_version = MD_MAJOR_VERSION;
@@ -4304,9 +4306,10 @@ static int md_ioctl(struct inode *inode, struct file *file,
         * Commands querying/configuring an existing array:
         */
        /* if we are not initialised yet, only ADD_NEW_DISK, STOP_ARRAY,
-        * RUN_ARRAY, and SET_BITMAP_FILE are allowed */
+        * RUN_ARRAY, and GET_ and SET_BITMAP_FILE are allowed */
        if (!mddev->raid_disks && cmd != ADD_NEW_DISK && cmd != STOP_ARRAY
-                       && cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE) {
+                       && cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE
+                       && cmd != GET_BITMAP_FILE) {
                err = -ENODEV;
                goto abort_unlock;
        }
index a539d3b61e7680ee739b830a6f2319e7f2ade102..5278aad92bc4efeeec20fab11c5c5a603772896d 100644 (file)
@@ -367,7 +367,7 @@ static int i2o_exec_remove(struct device *dev)
 
 /**
  *     i2o_exec_lct_modified - Called on LCT NOTIFY reply
- *     @work: work struct for a specific controller
+ *     @_work: work struct for a specific controller
  *
  *     This function handles asynchronus LCT NOTIFY replies. It parses the
  *     new LCT and if the buffer for the LCT was to small sends a LCT NOTIFY
index d6f4f185bf3780de7c4375308602675e5628f76c..2194b567239fcf502ebc7c42ee64f476e18a00be 100644 (file)
@@ -73,7 +73,7 @@
 #include <asm/abs_addr.h>
 #include <asm/iseries/mf.h>
 #include <asm/uaccess.h>
-
+#include <asm/firmware.h>
 #include <asm/iseries/hv_lp_config.h>
 #include <asm/iseries/hv_types.h>
 #include <asm/iseries/hv_lp_event.h>
@@ -1668,7 +1668,7 @@ static struct vio_driver veth_driver = {
  * Module initialization/cleanup
  */
 
-void __exit veth_module_cleanup(void)
+static void __exit veth_module_cleanup(void)
 {
        int i;
        struct veth_lpar_connection *cnx;
@@ -1697,11 +1697,14 @@ void __exit veth_module_cleanup(void)
 }
 module_exit(veth_module_cleanup);
 
-int __init veth_module_init(void)
+static int __init veth_module_init(void)
 {
        int i;
        int rc;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return -ENODEV;
+
        this_lp = HvLpConfig_getLpIndex_outline();
 
        for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
index 2c4343395a4d96bd93057da50c6af294723b8144..880d9fdd7c670b6a31ff2e8d3282ba65b7cb40ab 100644 (file)
@@ -148,6 +148,8 @@ struct smc911x_local {
        int tx_throttle;
        spinlock_t lock;
 
+       struct net_device *netdev;
+
 #ifdef SMC_USE_DMA
        /* DMA needs the physical address of the chip */
        u_long physaddr;
@@ -948,10 +950,11 @@ static void smc911x_phy_check_media(struct net_device *dev, int init)
  * of autonegotiation.)  If the RPC ANEG bit is cleared, the selection
  * is controlled by the RPC SPEED and RPC DPLX bits.
  */
-static void smc911x_phy_configure(void *data)
+static void smc911x_phy_configure(struct work_struct *work)
 {
-       struct net_device *dev = data;
-       struct smc911x_local *lp = netdev_priv(dev);
+       struct smc911x_local *lp = container_of(work, struct smc911x_local,
+                                               phy_configure);
+       struct net_device *dev = lp->netdev;
        unsigned long ioaddr = dev->base_addr;
        int phyaddr = lp->mii.phy_id;
        int my_phy_caps; /* My PHY capabilities */
@@ -1331,7 +1334,7 @@ smc911x_rx_dma_irq(int dma, void *data)
 static void smc911x_poll_controller(struct net_device *dev)
 {
        disable_irq(dev->irq);
-       smc911x_interrupt(dev->irq, dev, NULL);
+       smc911x_interrupt(dev->irq, dev);
        enable_irq(dev->irq);
 }
 #endif
@@ -1495,6 +1498,8 @@ static void smc911x_set_multicast_list(struct net_device *dev)
 static int
 smc911x_open(struct net_device *dev)
 {
+       struct smc911x_local *lp = netdev_priv(dev);
+
        DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__);
 
        /*
@@ -1511,7 +1516,7 @@ smc911x_open(struct net_device *dev)
        smc911x_reset(dev);
 
        /* Configure the PHY, initialize the link state */
-       smc911x_phy_configure(dev);
+       smc911x_phy_configure(&lp->phy_configure);
 
        /* Turn on Tx + Rx */
        smc911x_enable(dev);
@@ -2060,7 +2065,7 @@ static int __init smc911x_probe(struct net_device *dev, unsigned long ioaddr)
        dev->poll_controller = smc911x_poll_controller;
 #endif
 
-       INIT_WORK(&lp->phy_configure, smc911x_phy_configure, dev);
+       INIT_WORK(&lp->phy_configure, smc911x_phy_configure);
        lp->mii.phy_id_mask = 0x1f;
        lp->mii.reg_num_mask = 0x1f;
        lp->mii.force_media = 0;
@@ -2154,6 +2159,7 @@ static int smc911x_drv_probe(struct platform_device *pdev)
 {
        struct net_device *ndev;
        struct resource *res;
+       struct smc911x_local *lp;
        unsigned int *addr;
        int ret;
 
@@ -2183,6 +2189,8 @@ static int smc911x_drv_probe(struct platform_device *pdev)
 
        ndev->dma = (unsigned char)-1;
        ndev->irq = platform_get_irq(pdev, 0);
+       lp = netdev_priv(ndev);
+       lp->netdev = ndev;
 
        addr = ioremap(res->start, SMC911X_IO_EXTENT);
        if (!addr) {
@@ -2204,7 +2212,6 @@ out:
        }
 #ifdef SMC_USE_DMA
        else {
-               struct smc911x_local *lp = netdev_priv(ndev);
                lp->physaddr = res->start;
                lp->dev = &pdev->dev;
        }
@@ -2275,7 +2282,7 @@ static int smc911x_drv_resume(struct platform_device *dev)
                        smc911x_reset(ndev);
                        smc911x_enable(ndev);
                        if (lp->phy_type != 0)
-                               smc911x_phy_configure(ndev);
+                               smc911x_phy_configure(&lp->phy_configure);
                        netif_device_attach(ndev);
                }
        }
index 0b9d0db1590a0c56741172fc682e4b4569f2697e..bd1faebf61a05fd10bfe1b299e152467ba959db6 100644 (file)
@@ -1682,7 +1682,7 @@ int __init acpiphp_glue_init(void)
  *
  * This function frees all data allocated in acpiphp_glue_init()
  */
-void __exit acpiphp_glue_exit(void)
+void  acpiphp_glue_exit(void)
 {
        acpi_pci_unregister_driver(&acpi_pci_hp_driver);
 }
index b771196a654ea47d38ae33668649158844430133..3009193f005827965b79f099b730d040e70af5b4 100644 (file)
@@ -47,21 +47,11 @@ static ssize_t location_read_file (struct hotplug_slot *php_slot, char *buf)
        return retval;
 }
 
-static struct hotplug_slot_attribute hotplug_slot_attr_location = {
+static struct hotplug_slot_attribute php_attr_location = {
        .attr = {.name = "phy_location", .mode = S_IFREG | S_IRUGO},
        .show = location_read_file,
 };
 
-static void rpaphp_sysfs_add_attr_location (struct hotplug_slot *slot)
-{
-       sysfs_create_file(&slot->kobj, &hotplug_slot_attr_location.attr);
-}
-
-static void rpaphp_sysfs_remove_attr_location (struct hotplug_slot *slot)
-{
-       sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_location.attr);
-}
-
 /* free up the memory used by a slot */
 static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
 {
@@ -145,7 +135,7 @@ int rpaphp_deregister_slot(struct slot *slot)
        list_del(&slot->rpaphp_slot_list);
        
        /* remove "phy_location" file */
-       rpaphp_sysfs_remove_attr_location(php_slot);
+       sysfs_remove_file(&php_slot->kobj, &php_attr_location.attr);
 
        retval = pci_hp_deregister(php_slot);
        if (retval)
@@ -160,36 +150,45 @@ EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
 
 int rpaphp_register_slot(struct slot *slot)
 {
+       struct hotplug_slot *php_slot = slot->hotplug_slot;
        int retval;
 
        dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", 
                __FUNCTION__, slot->dn->full_name, slot->index, slot->name, 
                slot->power_domain, slot->type);
+
        /* should not try to register the same slot twice */
-       if (is_registered(slot)) { /* should't be here */
+       if (is_registered(slot)) {
                err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name);
-               rpaphp_release_slot(slot->hotplug_slot);
-               return -EAGAIN;
+               retval = -EAGAIN;
+               goto register_fail;
        }       
-       retval = pci_hp_register(slot->hotplug_slot);
+
+       retval = pci_hp_register(php_slot);
        if (retval) {
                err("pci_hp_register failed with error %d\n", retval);
-               rpaphp_release_slot(slot->hotplug_slot);
-               return retval;
+               goto register_fail;
        }
-       
-       /* create "phy_locatoin" file */
-       rpaphp_sysfs_add_attr_location(slot->hotplug_slot);     
 
-       /* add slot to our internal list */
-       dbg("%s adding slot[%s] to rpaphp_slot_list\n",
-           __FUNCTION__, slot->name);
+       /* create "phy_location" file */
+       retval = sysfs_create_file(&php_slot->kobj, &php_attr_location.attr);
+       if (retval) {
+               err("sysfs_create_file failed with error %d\n", retval);
+               goto sysfs_fail;
+       }
 
+       /* add slot to our internal list */
        list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
        info("Slot [%s](PCI location=%s) registered\n", slot->name,
                        slot->location);
        num_slots++;
        return 0;
+
+sysfs_fail:
+       pci_hp_deregister(php_slot);
+register_fail:
+       rpaphp_release_slot(php_slot);
+       return retval;
 }
 
 int rpaphp_get_power_status(struct slot *slot, u8 * value)
index 50757695844fa1de842b28a65651c2f646a388c0..3ca6a4f574b3878bd2ff129374a9f7366e7186c4 100644 (file)
@@ -47,11 +47,17 @@ extern int shpchp_poll_time;
 extern int shpchp_debug;
 extern struct workqueue_struct *shpchp_wq;
 
-/*#define dbg(format, arg...) do { if (shpchp_debug) printk(KERN_DEBUG "%s: " format, MY_NAME , ## arg); } while (0)*/
-#define dbg(format, arg...) do { if (shpchp_debug) printk("%s: " format, MY_NAME , ## arg); } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
+#define dbg(format, arg...)                                            \
+       do {                                                            \
+               if (shpchp_debug)                                       \
+                       printk("%s: " format, MY_NAME , ## arg);        \
+       } while (0)
+#define err(format, arg...)                                            \
+       printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
+#define info(format, arg...)                                           \
+       printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
+#define warn(format, arg...)                                           \
+       printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
 
 #define SLOT_NAME_SIZE 10
 struct slot {
@@ -83,34 +89,27 @@ struct event_info {
 struct controller {
        struct mutex crit_sect;         /* critical section mutex */
        struct mutex cmd_lock;          /* command lock */
-       struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */
        int num_slots;                  /* Number of slots on ctlr */
        int slot_num_inc;               /* 1 or -1 */
        struct pci_dev *pci_dev;
        struct list_head slot_list;
        struct hpc_ops *hpc_ops;
        wait_queue_head_t queue;        /* sleep & wake process */
-       u8 bus;
-       u8 device;
-       u8 function;
        u8 slot_device_offset;
-       u8 add_support;
        u32 pcix_misc2_reg;     /* for amd pogo errata */
-       enum pci_bus_speed speed;
        u32 first_slot;         /* First physical slot number */
-       u8 slot_bus;            /* Bus where the slots handled by this controller sit */
        u32 cap_offset;
        unsigned long mmio_base;
        unsigned long mmio_size;
+       void __iomem *creg;
+       struct timer_list poll_timer;
 };
 
-
 /* Define AMD SHPC ID  */
 #define PCI_DEVICE_ID_AMD_GOLAM_7450   0x7450 
 #define PCI_DEVICE_ID_AMD_POGO_7458    0x7458
 
 /* AMD PCIX bridge registers */
-
 #define PCIX_MEM_BASE_LIMIT_OFFSET     0x1C
 #define PCIX_MISCII_OFFSET             0x48
 #define PCIX_MISC_BRIDGE_ERRORS_OFFSET 0x80
@@ -145,8 +144,6 @@ struct controller {
 #define POWERON_STATE                  3
 #define POWEROFF_STATE                 4
 
-#define PCI_TO_PCI_BRIDGE_CLASS                0x00060400
-
 /* Error messages */
 #define INTERLOCK_OPEN                 0x00000002
 #define ADD_NOT_SUPPORTED              0x00000003
@@ -158,50 +155,32 @@ struct controller {
 #define WRONG_BUS_FREQUENCY            0x0000000D
 #define POWER_FAILURE                  0x0000000E
 
-#define REMOVE_NOT_SUPPORTED           0x00000003
-
-#define DISABLE_CARD                   1
-
-/*
- * error Messages
- */
-#define msg_initialization_err "Initialization failure, error=%d\n"
-#define msg_button_on          "PCI slot #%s - powering on due to button press.\n"
-#define msg_button_off         "PCI slot #%s - powering off due to button press.\n"
-#define msg_button_cancel      "PCI slot #%s - action canceled due to button press.\n"
-
-/* sysfs functions for the hotplug controller info */
 extern int __must_check shpchp_create_ctrl_files(struct controller *ctrl);
-
-extern int     shpchp_sysfs_enable_slot(struct slot *slot);
-extern int     shpchp_sysfs_disable_slot(struct slot *slot);
-
-extern u8      shpchp_handle_attention_button(u8 hp_slot, void *inst_id);
-extern u8      shpchp_handle_switch_change(u8 hp_slot, void *inst_id);
-extern u8      shpchp_handle_presence_change(u8 hp_slot, void *inst_id);
-extern u8      shpchp_handle_power_fault(u8 hp_slot, void *inst_id);
-
-/* pci functions */
-extern int     shpchp_save_config(struct controller *ctrl, int busnumber, int num_ctlr_slots, int first_device_num);
-extern int     shpchp_configure_device(struct slot *p_slot);
-extern int     shpchp_unconfigure_device(struct slot *p_slot);
-extern void    shpchp_remove_ctrl_files(struct controller *ctrl);
-extern void    cleanup_slots(struct controller *ctrl);
-extern void    queue_pushbutton_work(struct work_struct *work);
-
+extern void shpchp_remove_ctrl_files(struct controller *ctrl);
+extern int shpchp_sysfs_enable_slot(struct slot *slot);
+extern int shpchp_sysfs_disable_slot(struct slot *slot);
+extern u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl);
+extern u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl);
+extern u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl);
+extern u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl);
+extern int shpchp_configure_device(struct slot *p_slot);
+extern int shpchp_unconfigure_device(struct slot *p_slot);
+extern void cleanup_slots(struct controller *ctrl);
+extern void queue_pushbutton_work(struct work_struct *work);
+extern int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
 
 #ifdef CONFIG_ACPI
 static inline int get_hp_params_from_firmware(struct pci_dev *dev,
-                       struct hotplug_params *hpp)
+                                             struct hotplug_params *hpp)
 {
        if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev->bus, hpp)))
                        return -ENODEV;
        return 0;
 }
-#define get_hp_hw_control_from_firmware(pdev) \
-       do { \
-               if (DEVICE_ACPI_HANDLE(&(pdev->dev))) \
-                       acpi_run_oshp(DEVICE_ACPI_HANDLE(&(pdev->dev))); \
+#define get_hp_hw_control_from_firmware(pdev)                          \
+       do {                                                            \
+               if (DEVICE_ACPI_HANDLE(&(pdev->dev)))                   \
+                       acpi_run_oshp(DEVICE_ACPI_HANDLE(&(pdev->dev)));\
        } while (0)
 #else
 #define get_hp_params_from_firmware(dev, hpp) (-ENODEV)
@@ -222,108 +201,40 @@ struct ctrl_reg {
        volatile u32 serr_loc;
        volatile u32 serr_intr_enable;
        volatile u32 slot1;
-       volatile u32 slot2;
-       volatile u32 slot3;
-       volatile u32 slot4;
-       volatile u32 slot5;
-       volatile u32 slot6;
-       volatile u32 slot7;
-       volatile u32 slot8;
-       volatile u32 slot9;
-       volatile u32 slot10;
-       volatile u32 slot11;
-       volatile u32 slot12;
 } __attribute__ ((packed));
 
 /* offsets to the controller registers based on the above structure layout */
 enum ctrl_offsets {
-       BASE_OFFSET =   offsetof(struct ctrl_reg, base_offset),
-       SLOT_AVAIL1 =   offsetof(struct ctrl_reg, slot_avail1),
-       SLOT_AVAIL2     =       offsetof(struct ctrl_reg, slot_avail2),
-       SLOT_CONFIG =   offsetof(struct ctrl_reg, slot_config),
-       SEC_BUS_CONFIG =        offsetof(struct ctrl_reg, sec_bus_config),
-       MSI_CTRL        =       offsetof(struct ctrl_reg, msi_ctrl),
-       PROG_INTERFACE =        offsetof(struct ctrl_reg, prog_interface),
-       CMD             =       offsetof(struct ctrl_reg, cmd),
-       CMD_STATUS      =       offsetof(struct ctrl_reg, cmd_status),
-       INTR_LOC        =       offsetof(struct ctrl_reg, intr_loc),
-       SERR_LOC        =       offsetof(struct ctrl_reg, serr_loc),
-       SERR_INTR_ENABLE =      offsetof(struct ctrl_reg, serr_intr_enable),
-       SLOT1 =         offsetof(struct ctrl_reg, slot1),
-       SLOT2 =         offsetof(struct ctrl_reg, slot2),
-       SLOT3 =         offsetof(struct ctrl_reg, slot3),
-       SLOT4 =         offsetof(struct ctrl_reg, slot4),
-       SLOT5 =         offsetof(struct ctrl_reg, slot5),
-       SLOT6 =         offsetof(struct ctrl_reg, slot6),               
-       SLOT7 =         offsetof(struct ctrl_reg, slot7),
-       SLOT8 =         offsetof(struct ctrl_reg, slot8),
-       SLOT9 =         offsetof(struct ctrl_reg, slot9),
-       SLOT10 =        offsetof(struct ctrl_reg, slot10),
-       SLOT11 =        offsetof(struct ctrl_reg, slot11),
-       SLOT12 =        offsetof(struct ctrl_reg, slot12),
-};
-typedef u8(*php_intr_callback_t) (u8 hp_slot, void *instance_id);
-struct php_ctlr_state_s {
-       struct php_ctlr_state_s *pnext;
-       struct pci_dev *pci_dev;
-       unsigned int irq;
-       unsigned long flags;    /* spinlock's */
-       u32 slot_device_offset;
-       u32 num_slots;
-       struct timer_list       int_poll_timer; /* Added for poll event */
-       php_intr_callback_t attention_button_callback;
-       php_intr_callback_t switch_change_callback;
-       php_intr_callback_t presence_change_callback;
-       php_intr_callback_t power_fault_callback;
-       void *callback_instance_id;
-       void __iomem *creg;                     /* Ptr to controller register space */
+       BASE_OFFSET      = offsetof(struct ctrl_reg, base_offset),
+       SLOT_AVAIL1      = offsetof(struct ctrl_reg, slot_avail1),
+       SLOT_AVAIL2      = offsetof(struct ctrl_reg, slot_avail2),
+       SLOT_CONFIG      = offsetof(struct ctrl_reg, slot_config),
+       SEC_BUS_CONFIG   = offsetof(struct ctrl_reg, sec_bus_config),
+       MSI_CTRL         = offsetof(struct ctrl_reg, msi_ctrl),
+       PROG_INTERFACE   = offsetof(struct ctrl_reg, prog_interface),
+       CMD              = offsetof(struct ctrl_reg, cmd),
+       CMD_STATUS       = offsetof(struct ctrl_reg, cmd_status),
+       INTR_LOC         = offsetof(struct ctrl_reg, intr_loc),
+       SERR_LOC         = offsetof(struct ctrl_reg, serr_loc),
+       SERR_INTR_ENABLE = offsetof(struct ctrl_reg, serr_intr_enable),
+       SLOT1            = offsetof(struct ctrl_reg, slot1),
 };
-/* Inline functions */
 
-
-/* Inline functions to check the sanity of a pointer that is passed to us */
-static inline int slot_paranoia_check (struct slot *slot, const char *function)
-{
-       if (!slot) {
-               dbg("%s - slot == NULL", function);
-               return -1;
-       }
-       if (!slot->hotplug_slot) {
-               dbg("%s - slot->hotplug_slot == NULL!", function);
-               return -1;
-       }
-       return 0;
-}
-
-static inline struct slot *get_slot (struct hotplug_slot *hotplug_slot, const char *function)
+static inline struct slot *get_slot(struct hotplug_slot *hotplug_slot)
 { 
-       struct slot *slot;
-
-       if (!hotplug_slot) {
-               dbg("%s - hotplug_slot == NULL\n", function);
-               return NULL;
-       }
-
-       slot = (struct slot *)hotplug_slot->private;
-       if (slot_paranoia_check (slot, function))
-                return NULL;
-       return slot;
+       return hotplug_slot->private;
 }
 
-static inline struct slot *shpchp_find_slot (struct controller *ctrl, u8 device)
+static inline struct slot *shpchp_find_slot(struct controller *ctrl, u8 device)
 {
        struct slot *slot;
 
-       if (!ctrl)
-               return NULL;
-
        list_for_each_entry(slot, &ctrl->slot_list, slot_list) {
                if (slot->device == device)
                        return slot;
        }
 
        err("%s: slot (device=0x%x) not found\n", __FUNCTION__, device);
-
        return NULL;
 }
 
@@ -400,44 +311,27 @@ static inline void amd_pogo_errata_restore_misc_reg(struct slot *p_slot)
        pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISCII_OFFSET, pcix_misc2_temp);
 }
 
-enum php_ctlr_type {
-       PCI,
-       ISA,
-       ACPI
-};
-
-int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
-
-int shpc_get_ctlr_slot_config( struct controller *ctrl,
-               int *num_ctlr_slots,
-               int *first_device_num,
-               int *physical_slot_num,
-               int *updown,
-               int *flags);
-
 struct hpc_ops {
-       int     (*power_on_slot )               (struct slot *slot);
-       int     (*slot_enable )                 (struct slot *slot);
-       int     (*slot_disable )                (struct slot *slot);
-       int     (*set_bus_speed_mode)   (struct slot *slot, enum pci_bus_speed speed);
-       int     (*get_power_status)             (struct slot *slot, u8 *status);
-       int     (*get_attention_status) (struct slot *slot, u8 *status);
-       int     (*set_attention_status) (struct slot *slot, u8 status);
-       int     (*get_latch_status)             (struct slot *slot, u8 *status);
-       int     (*get_adapter_status)   (struct slot *slot, u8 *status);
-
-       int     (*get_max_bus_speed)    (struct slot *slot, enum pci_bus_speed *speed);
-       int     (*get_cur_bus_speed)    (struct slot *slot, enum pci_bus_speed *speed);
-       int     (*get_adapter_speed)    (struct slot *slot, enum pci_bus_speed *speed);
-       int     (*get_mode1_ECC_cap)    (struct slot *slot, u8 *mode);
-       int     (*get_prog_int)                 (struct slot *slot, u8 *prog_int);
-
-       int     (*query_power_fault)    (struct slot *slot);
-       void    (*green_led_on)         (struct slot *slot);
-       void    (*green_led_off)        (struct slot *slot);
-       void    (*green_led_blink)      (struct slot *slot);
-       void    (*release_ctlr)         (struct controller *ctrl);
-       int (*check_cmd_status)         (struct controller *ctrl);
+       int (*power_on_slot)(struct slot *slot);
+       int (*slot_enable)(struct slot *slot);
+       int (*slot_disable)(struct slot *slot);
+       int (*set_bus_speed_mode)(struct slot *slot, enum pci_bus_speed speed);
+       int (*get_power_status)(struct slot *slot, u8 *status);
+       int (*get_attention_status)(struct slot *slot, u8 *status);
+       int (*set_attention_status)(struct slot *slot, u8 status);
+       int (*get_latch_status)(struct slot *slot, u8 *status);
+       int (*get_adapter_status)(struct slot *slot, u8 *status);
+       int (*get_max_bus_speed)(struct slot *slot, enum pci_bus_speed *speed);
+       int (*get_cur_bus_speed)(struct slot *slot, enum pci_bus_speed *speed);
+       int (*get_adapter_speed)(struct slot *slot, enum pci_bus_speed *speed);
+       int (*get_mode1_ECC_cap)(struct slot *slot, u8 *mode);
+       int (*get_prog_int)(struct slot *slot, u8 *prog_int);
+       int (*query_power_fault)(struct slot *slot);
+       void (*green_led_on)(struct slot *slot);
+       void (*green_led_off)(struct slot *slot);
+       void (*green_led_blink)(struct slot *slot);
+       void (*release_ctlr)(struct controller *ctrl);
+       int (*check_cmd_status)(struct controller *ctrl);
 };
 
 #endif                         /* _SHPCHP_H */
index 4eac85b3d90e0a91f449101cf6aed4f1338238be..590cd3cbe0104fd8a3e1eba2a70f28aa8d3e9260 100644 (file)
@@ -104,23 +104,6 @@ static void make_slot_name(struct slot *slot)
                 slot->bus, slot->number);
 }
 
-
-
-
-static int
-shpchprm_get_physical_slot_number(struct controller *ctrl, u32 *sun,
-                               u8 busnum, u8 devnum)
-{
-       int offset = devnum - ctrl->slot_device_offset;
-
-       dbg("%s: ctrl->slot_num_inc %d, offset %d\n", __FUNCTION__,
-                       ctrl->slot_num_inc, offset);
-       *sun = (u8) (ctrl->first_slot + ctrl->slot_num_inc *offset);
-       return 0;
-}
-
-
-
 static int init_slots(struct controller *ctrl)
 {
        struct slot *slot;
@@ -128,7 +111,6 @@ static int init_slots(struct controller *ctrl)
        struct hotplug_slot_info *info;
        int retval = -ENOMEM;
        int i;
-       u32 sun;
 
        for (i = 0; i < ctrl->num_slots; i++) {
                slot = kzalloc(sizeof(*slot), GFP_KERNEL);
@@ -149,16 +131,11 @@ static int init_slots(struct controller *ctrl)
 
                slot->hp_slot = i;
                slot->ctrl = ctrl;
-               slot->bus = ctrl->slot_bus;
+               slot->bus = ctrl->pci_dev->subordinate->number;
                slot->device = ctrl->slot_device_offset + i;
                slot->hpc_ops = ctrl->hpc_ops;
+               slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i);
                mutex_init(&slot->lock);
-
-               if (shpchprm_get_physical_slot_number(ctrl, &sun,
-                                                     slot->bus, slot->device))
-                       goto error_info;
-
-               slot->number = sun;
                INIT_DELAYED_WORK(&slot->work, queue_pushbutton_work);
 
                /* register this slot with the hotplug pci core */
@@ -211,42 +188,12 @@ void cleanup_slots(struct controller *ctrl)
        }
 }
 
-static int get_ctlr_slot_config(struct controller *ctrl)
-{
-       int num_ctlr_slots;
-       int first_device_num;
-       int physical_slot_num;
-       int updown;
-       int rc;
-       int flags;
-
-       rc = shpc_get_ctlr_slot_config(ctrl, &num_ctlr_slots,
-                                      &first_device_num, &physical_slot_num,
-                                      &updown, &flags);
-       if (rc) {
-               err("%s: get_ctlr_slot_config fail for b:d (%x:%x)\n",
-                   __FUNCTION__, ctrl->bus, ctrl->device);
-               return -1;
-       }
-
-       ctrl->num_slots = num_ctlr_slots;
-       ctrl->slot_device_offset = first_device_num;
-       ctrl->first_slot = physical_slot_num;
-       ctrl->slot_num_inc = updown;            /* either -1 or 1 */
-
-       dbg("%s: num_slot(0x%x) 1st_dev(0x%x) psn(0x%x) updown(%d) for b:d "
-           "(%x:%x)\n", __FUNCTION__, num_ctlr_slots, first_device_num,
-           physical_slot_num, updown, ctrl->bus, ctrl->device);
-
-       return 0;
-}
-
 /*
  * set_attention_status - Turns the Amber LED for a slot on, off or blink
  */
 static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
 
@@ -258,7 +205,7 @@ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
 
 static int enable_slot (struct hotplug_slot *hotplug_slot)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
 
@@ -267,7 +214,7 @@ static int enable_slot (struct hotplug_slot *hotplug_slot)
 
 static int disable_slot (struct hotplug_slot *hotplug_slot)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
 
@@ -276,7 +223,7 @@ static int disable_slot (struct hotplug_slot *hotplug_slot)
 
 static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        int retval;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -290,7 +237,7 @@ static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
 
 static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        int retval;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -304,7 +251,7 @@ static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
 
 static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        int retval;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -318,7 +265,7 @@ static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value)
 
 static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        int retval;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -332,7 +279,7 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
 
 static int get_address (struct hotplug_slot *hotplug_slot, u32 *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        struct pci_bus *bus = slot->ctrl->pci_dev->subordinate;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -344,7 +291,7 @@ static int get_address (struct hotplug_slot *hotplug_slot, u32 *value)
 
 static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        int retval;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -358,7 +305,7 @@ static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp
 
 static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
 {
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
+       struct slot *slot = get_slot(hotplug_slot);
        int retval;
 
        dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
@@ -385,9 +332,6 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        int rc;
        struct controller *ctrl;
-       struct slot *t_slot;
-       int first_device_num;   /* first PCI device number */
-       int num_ctlr_slots;     /* number of slots implemented */
 
        if (!is_shpc_capable(pdev))
                return -ENODEV;
@@ -408,47 +352,13 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        pci_set_drvdata(pdev, ctrl);
 
-       ctrl->bus = pdev->bus->number;
-       ctrl->slot_bus = pdev->subordinate->number;
-       ctrl->device = PCI_SLOT(pdev->devfn);
-       ctrl->function = PCI_FUNC(pdev->devfn);
-
-       dbg("ctrl bus=0x%x, device=%x, function=%x, irq=%x\n",
-           ctrl->bus, ctrl->device, ctrl->function, pdev->irq);
-
-       /*
-        * Save configuration headers for this and subordinate PCI buses
-        */
-       rc = get_ctlr_slot_config(ctrl);
-       if (rc) {
-               err(msg_initialization_err, rc);
-               goto err_out_release_ctlr;
-       }
-       first_device_num = ctrl->slot_device_offset;
-       num_ctlr_slots = ctrl->num_slots;
-
-       ctrl->add_support = 1;
-
        /* Setup the slot information structures */
        rc = init_slots(ctrl);
        if (rc) {
-               err(msg_initialization_err, 6);
+               err("%s: slot initialization failed\n", SHPC_MODULE_NAME);
                goto err_out_release_ctlr;
        }
 
-       /* Now hpc_functions (slot->hpc_ops->functions) are ready  */
-       t_slot = shpchp_find_slot(ctrl, first_device_num);
-
-       /* Check for operation bus speed */
-       rc = t_slot->hpc_ops->get_cur_bus_speed(t_slot, &ctrl->speed);
-       dbg("%s: t_slot->hp_slot %x\n", __FUNCTION__,t_slot->hp_slot);
-
-       if (rc || ctrl->speed == PCI_SPEED_UNKNOWN) {
-               err(SHPC_MODULE_NAME ": Can't get current bus speed. "
-                   "Set to 33MHz PCI.\n");
-               ctrl->speed = PCI_SPEED_33MHz;
-       }
-
        rc = shpchp_create_ctrl_files(ctrl);
        if (rc)
                goto err_cleanup_slots;
index 158ac78360961c80d02c03e027f03cb12c9d556f..6bb84734cd6c6520abfb146d48c7e9b95bb6d639 100644 (file)
@@ -57,9 +57,8 @@ static int queue_interrupt_event(struct slot *p_slot, u32 event_type)
        return 0;
 }
 
-u8 shpchp_handle_attention_button(u8 hp_slot, void *inst_id)
+u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl)
 {
-       struct controller *ctrl = (struct controller *) inst_id;
        struct slot *p_slot;
        u32 event_type;
 
@@ -81,9 +80,8 @@ u8 shpchp_handle_attention_button(u8 hp_slot, void *inst_id)
 
 }
 
-u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id)
+u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl)
 {
-       struct controller *ctrl = (struct controller *) inst_id;
        struct slot *p_slot;
        u8 getstatus;
        u32 event_type;
@@ -120,9 +118,8 @@ u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id)
        return 1;
 }
 
-u8 shpchp_handle_presence_change(u8 hp_slot, void *inst_id)
+u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl)
 {
-       struct controller *ctrl = (struct controller *) inst_id;
        struct slot *p_slot;
        u32 event_type;
 
@@ -154,9 +151,8 @@ u8 shpchp_handle_presence_change(u8 hp_slot, void *inst_id)
        return 1;
 }
 
-u8 shpchp_handle_power_fault(u8 hp_slot, void *inst_id)
+u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl)
 {
-       struct controller *ctrl = (struct controller *) inst_id;
        struct slot *p_slot;
        u32 event_type;
 
@@ -497,10 +493,12 @@ static void handle_button_press_event(struct slot *p_slot)
                p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
                if (getstatus) {
                        p_slot->state = BLINKINGOFF_STATE;
-                       info(msg_button_off, p_slot->name);
+                       info("PCI slot #%s - powering off due to button "
+                            "press.\n", p_slot->name);
                } else {
                        p_slot->state = BLINKINGON_STATE;
-                       info(msg_button_on, p_slot->name);
+                       info("PCI slot #%s - powering on due to button "
+                            "press.\n", p_slot->name);
                }
                /* blink green LED and turn off amber */
                p_slot->hpc_ops->green_led_blink(p_slot);
@@ -523,7 +521,8 @@ static void handle_button_press_event(struct slot *p_slot)
                else
                        p_slot->hpc_ops->green_led_off(p_slot);
                p_slot->hpc_ops->set_attention_status(p_slot, 0);
-               info(msg_button_cancel, p_slot->name);
+               info("PCI slot #%s - action canceled due to button press\n",
+                    p_slot->name);
                p_slot->state = STATIC_STATE;
                break;
        case POWEROFF_STATE:
index 83a5226ba9ed4918c4e46fb8f964aaf9a1b90922..b7bede4b7c27037755ea22da751c39be3ac75ffe 100644 (file)
 #define SLOT_SERR_INT_MASK     0x3
 
 DEFINE_DBG_BUFFER              /* Debug string buffer for entire HPC defined here */
-static struct php_ctlr_state_s *php_ctlr_list_head;    /* HPC state linked list */
-static int ctlr_seq_num = 0;   /* Controller sequenc # */
-static spinlock_t list_lock;
-
 static atomic_t shpchp_num_controllers = ATOMIC_INIT(0);
 
 static irqreturn_t shpc_isr(int irq, void *dev_id);
-static void start_int_poll_timer(struct php_ctlr_state_s *php_ctlr, int sec);
+static void start_int_poll_timer(struct controller *ctrl, int sec);
 static int hpc_check_cmd_status(struct controller *ctrl);
 
 static inline u8 shpc_readb(struct controller *ctrl, int reg)
 {
-       return readb(ctrl->hpc_ctlr_handle->creg + reg);
+       return readb(ctrl->creg + reg);
 }
 
 static inline void shpc_writeb(struct controller *ctrl, int reg, u8 val)
 {
-       writeb(val, ctrl->hpc_ctlr_handle->creg + reg);
+       writeb(val, ctrl->creg + reg);
 }
 
 static inline u16 shpc_readw(struct controller *ctrl, int reg)
 {
-       return readw(ctrl->hpc_ctlr_handle->creg + reg);
+       return readw(ctrl->creg + reg);
 }
 
 static inline void shpc_writew(struct controller *ctrl, int reg, u16 val)
 {
-       writew(val, ctrl->hpc_ctlr_handle->creg + reg);
+       writew(val, ctrl->creg + reg);
 }
 
 static inline u32 shpc_readl(struct controller *ctrl, int reg)
 {
-       return readl(ctrl->hpc_ctlr_handle->creg + reg);
+       return readl(ctrl->creg + reg);
 }
 
 static inline void shpc_writel(struct controller *ctrl, int reg, u32 val)
 {
-       writel(val, ctrl->hpc_ctlr_handle->creg + reg);
+       writel(val, ctrl->creg + reg);
 }
 
 static inline int shpc_indirect_read(struct controller *ctrl, int index,
@@ -268,21 +264,20 @@ static inline int shpc_indirect_read(struct controller *ctrl, int index,
 /*
  * This is the interrupt polling timeout function.
  */
-static void int_poll_timeout(unsigned long lphp_ctlr)
+static void int_poll_timeout(unsigned long data)
 {
-       struct php_ctlr_state_s *php_ctlr =
-               (struct php_ctlr_state_s *)lphp_ctlr;
+       struct controller *ctrl = (struct controller *)data;
 
        DBG_ENTER_ROUTINE
 
        /* Poll for interrupt events.  regs == NULL => polling */
-       shpc_isr(0, php_ctlr->callback_instance_id);
+       shpc_isr(0, ctrl);
 
-       init_timer(&php_ctlr->int_poll_timer);
+       init_timer(&ctrl->poll_timer);
        if (!shpchp_poll_time)
                shpchp_poll_time = 2; /* default polling interval is 2 sec */
 
-       start_int_poll_timer(php_ctlr, shpchp_poll_time);
+       start_int_poll_timer(ctrl, shpchp_poll_time);
 
        DBG_LEAVE_ROUTINE
 }
@@ -290,16 +285,16 @@ static void int_poll_timeout(unsigned long lphp_ctlr)
 /*
  * This function starts the interrupt polling timer.
  */
-static void start_int_poll_timer(struct php_ctlr_state_s *php_ctlr, int sec)
+static void start_int_poll_timer(struct controller *ctrl, int sec)
 {
        /* Clamp to sane value */
        if ((sec <= 0) || (sec > 60))
                sec = 2;
 
-       php_ctlr->int_poll_timer.function = &int_poll_timeout;
-       php_ctlr->int_poll_timer.data = (unsigned long)php_ctlr;
-       php_ctlr->int_poll_timer.expires = jiffies + sec * HZ;
-       add_timer(&php_ctlr->int_poll_timer);
+       ctrl->poll_timer.function = &int_poll_timeout;
+       ctrl->poll_timer.data = (unsigned long)ctrl;
+       ctrl->poll_timer.expires = jiffies + sec * HZ;
+       add_timer(&ctrl->poll_timer);
 }
 
 static inline int is_ctrl_busy(struct controller *ctrl)
@@ -666,33 +661,8 @@ static void hpc_set_green_led_blink(struct slot *slot)
        shpc_write_cmd(slot, slot->hp_slot, SET_PWR_BLINK);
 }
 
-int shpc_get_ctlr_slot_config(struct controller *ctrl,
-       int *num_ctlr_slots,    /* number of slots in this HPC                  */
-       int *first_device_num,  /* PCI dev num of the first slot in this SHPC   */
-       int *physical_slot_num, /* phy slot num of the first slot in this SHPC  */
-       int *updown,            /* physical_slot_num increament: 1 or -1        */
-       int *flags)
-{
-       u32 slot_config;
-
-       DBG_ENTER_ROUTINE 
-
-       slot_config = shpc_readl(ctrl, SLOT_CONFIG);
-       *first_device_num = (slot_config & FIRST_DEV_NUM) >> 8;
-       *num_ctlr_slots = slot_config & SLOT_NUM;
-       *physical_slot_num = (slot_config & PSN) >> 16;
-       *updown = ((slot_config & UPDOWN) >> 29) ? 1 : -1;
-
-       dbg("%s: physical_slot_num = %x\n", __FUNCTION__, *physical_slot_num);
-
-       DBG_LEAVE_ROUTINE 
-       return 0;
-}
-
 static void hpc_release_ctlr(struct controller *ctrl)
 {
-       struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle;
-       struct php_ctlr_state_s *p, *p_prev;
        int i;
        u32 slot_reg, serr_int;
 
@@ -722,40 +692,15 @@ static void hpc_release_ctlr(struct controller *ctrl)
        serr_int &= ~SERR_INTR_RSVDZ_MASK;
        shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
 
-       if (shpchp_poll_mode) {
-           del_timer(&php_ctlr->int_poll_timer);
-       } else {        
-               if (php_ctlr->irq) {
-                       free_irq(php_ctlr->irq, ctrl);
-                       php_ctlr->irq = 0;
-                       pci_disable_msi(php_ctlr->pci_dev);
-               }
-       }
-
-       if (php_ctlr->pci_dev) {
-               iounmap(php_ctlr->creg);
-               release_mem_region(ctrl->mmio_base, ctrl->mmio_size);
-               php_ctlr->pci_dev = NULL;
-       }
-
-       spin_lock(&list_lock);
-       p = php_ctlr_list_head;
-       p_prev = NULL;
-       while (p) {
-               if (p == php_ctlr) {
-                       if (p_prev)
-                               p_prev->pnext = p->pnext;
-                       else
-                               php_ctlr_list_head = p->pnext;
-                       break;
-               } else {
-                       p_prev = p;
-                       p = p->pnext;
-               }
+       if (shpchp_poll_mode)
+               del_timer(&ctrl->poll_timer);
+       else {
+               free_irq(ctrl->pci_dev->irq, ctrl);
+               pci_disable_msi(ctrl->pci_dev);
        }
-       spin_unlock(&list_lock);
 
-       kfree(php_ctlr);
+       iounmap(ctrl->creg);
+       release_mem_region(ctrl->mmio_base, ctrl->mmio_size);
 
        /*
         * If this is the last controller to be released, destroy the
@@ -764,8 +709,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
        if (atomic_dec_and_test(&shpchp_num_controllers))
                destroy_workqueue(shpchp_wq);
 
-DBG_LEAVE_ROUTINE
-                         
+       DBG_LEAVE_ROUTINE
 }
 
 static int hpc_power_on_slot(struct slot * slot)
@@ -891,7 +835,6 @@ static int hpc_set_bus_speed_mode(struct slot * slot, enum pci_bus_speed value)
 static irqreturn_t shpc_isr(int irq, void *dev_id)
 {
        struct controller *ctrl = (struct controller *)dev_id;
-       struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle;
        u32 serr_int, slot_reg, intr_loc, intr_loc2;
        int hp_slot;
 
@@ -942,20 +885,16 @@ static irqreturn_t shpc_isr(int irq, void *dev_id)
                    __FUNCTION__, hp_slot, slot_reg);
 
                if (slot_reg & MRL_CHANGE_DETECTED)
-                       php_ctlr->switch_change_callback(
-                               hp_slot, php_ctlr->callback_instance_id);
+                       shpchp_handle_switch_change(hp_slot, ctrl);
 
                if (slot_reg & BUTTON_PRESS_DETECTED)
-                       php_ctlr->attention_button_callback(
-                               hp_slot, php_ctlr->callback_instance_id);
+                       shpchp_handle_attention_button(hp_slot, ctrl);
 
                if (slot_reg & PRSNT_CHANGE_DETECTED)
-                       php_ctlr->presence_change_callback(
-                               hp_slot , php_ctlr->callback_instance_id);
+                       shpchp_handle_presence_change(hp_slot, ctrl);
 
                if (slot_reg & (ISO_PFAULT_DETECTED | CON_PFAULT_DETECTED))
-                       php_ctlr->power_fault_callback(
-                               hp_slot, php_ctlr->callback_instance_id);
+                       shpchp_handle_power_fault(hp_slot, ctrl);
 
                /* Clear all slot events */
                slot_reg &= ~SLOT_REG_RSVDZ_MASK;
@@ -1114,10 +1053,8 @@ static struct hpc_ops shpchp_hpc_ops = {
        .release_ctlr                   = hpc_release_ctlr,
 };
 
-int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
+int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
 {
-       struct php_ctlr_state_s *php_ctlr, *p;
-       void *instance_id = ctrl;
        int rc = -1, num_slots = 0;
        u8 hp_slot;
        u32 shpc_base_offset;
@@ -1128,16 +1065,6 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
 
        ctrl->pci_dev = pdev;  /* pci_dev of the P2P bridge */
 
-       spin_lock_init(&list_lock);
-       php_ctlr = kzalloc(sizeof(*php_ctlr), GFP_KERNEL);
-
-       if (!php_ctlr) {        /* allocate controller state data */
-               err("%s: HPC controller memory allocation error!\n", __FUNCTION__);
-               goto abort;
-       }
-
-       php_ctlr->pci_dev = pdev;       /* save pci_dev in context */
-
        if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device ==
                                PCI_DEVICE_ID_AMD_GOLAM_7450)) {
                /* amd shpc driver doesn't use Base Offset; assume 0 */
@@ -1147,20 +1074,20 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
                ctrl->cap_offset = pci_find_capability(pdev, PCI_CAP_ID_SHPC);
                if (!ctrl->cap_offset) {
                        err("%s : cap_offset == 0\n", __FUNCTION__);
-                       goto abort_free_ctlr;
+                       goto abort;
                }
                dbg("%s: cap_offset = %x\n", __FUNCTION__, ctrl->cap_offset);
 
                rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset);
                if (rc) {
                        err("%s: cannot read base_offset\n", __FUNCTION__);
-                       goto abort_free_ctlr;
+                       goto abort;
                }
 
                rc = shpc_indirect_read(ctrl, 3, &tempdword);
                if (rc) {
                        err("%s: cannot read slot config\n", __FUNCTION__);
-                       goto abort_free_ctlr;
+                       goto abort;
                }
                num_slots = tempdword & SLOT_NUM;
                dbg("%s: num_slots (indirect) %x\n", __FUNCTION__, num_slots);
@@ -1170,7 +1097,7 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
                        if (rc) {
                                err("%s: cannot read creg (index = %d)\n",
                                    __FUNCTION__, i);
-                               goto abort_free_ctlr;
+                               goto abort;
                        }
                        dbg("%s: offset %d: value %x\n", __FUNCTION__,i,
                                        tempdword);
@@ -1187,24 +1114,24 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
        rc = pci_enable_device(pdev);
        if (rc) {
                err("%s: pci_enable_device failed\n", __FUNCTION__);
-               goto abort_free_ctlr;
+               goto abort;
        }
 
        if (!request_mem_region(ctrl->mmio_base, ctrl->mmio_size, MY_NAME)) {
                err("%s: cannot reserve MMIO region\n", __FUNCTION__);
                rc = -1;
-               goto abort_free_ctlr;
+               goto abort;
        }
 
-       php_ctlr->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size);
-       if (!php_ctlr->creg) {
+       ctrl->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size);
+       if (!ctrl->creg) {
                err("%s: cannot remap MMIO region %lx @ %lx\n", __FUNCTION__,
                    ctrl->mmio_size, ctrl->mmio_base);
                release_mem_region(ctrl->mmio_base, ctrl->mmio_size);
                rc = -1;
-               goto abort_free_ctlr;
+               goto abort;
        }
-       dbg("%s: php_ctlr->creg %p\n", __FUNCTION__, php_ctlr->creg);
+       dbg("%s: ctrl->creg %p\n", __FUNCTION__, ctrl->creg);
 
        mutex_init(&ctrl->crit_sect);
        mutex_init(&ctrl->cmd_lock);
@@ -1212,23 +1139,14 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
        /* Setup wait queue */
        init_waitqueue_head(&ctrl->queue);
 
-       /* Find the IRQ */
-       php_ctlr->irq = pdev->irq;
-       php_ctlr->attention_button_callback = shpchp_handle_attention_button,
-       php_ctlr->switch_change_callback = shpchp_handle_switch_change;
-       php_ctlr->presence_change_callback = shpchp_handle_presence_change;
-       php_ctlr->power_fault_callback = shpchp_handle_power_fault;
-       php_ctlr->callback_instance_id = instance_id;
-
-       ctrl->hpc_ctlr_handle = php_ctlr;
        ctrl->hpc_ops = &shpchp_hpc_ops;
 
        /* Return PCI Controller Info */
        slot_config = shpc_readl(ctrl, SLOT_CONFIG);
-       php_ctlr->slot_device_offset = (slot_config & FIRST_DEV_NUM) >> 8;
-       php_ctlr->num_slots = slot_config & SLOT_NUM;
-       dbg("%s: slot_device_offset %x\n", __FUNCTION__, php_ctlr->slot_device_offset);
-       dbg("%s: num_slots %x\n", __FUNCTION__, php_ctlr->num_slots);
+       ctrl->slot_device_offset = (slot_config & FIRST_DEV_NUM) >> 8;
+       ctrl->num_slots = slot_config & SLOT_NUM;
+       ctrl->first_slot = (slot_config & PSN) >> 16;
+       ctrl->slot_num_inc = ((slot_config & UPDOWN) >> 29) ? 1 : -1;
 
        /* Mask Global Interrupt Mask & Command Complete Interrupt Mask */
        tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE);
@@ -1243,7 +1161,7 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
        /* Mask the MRL sensor SERR Mask of individual slot in
         * Slot SERR-INT Mask & clear all the existing event if any
         */
-       for (hp_slot = 0; hp_slot < php_ctlr->num_slots; hp_slot++) {
+       for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) {
                slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot));
                dbg("%s: Default Logical Slot Register %d value %x\n", __FUNCTION__,
                        hp_slot, slot_reg);
@@ -1255,24 +1173,27 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
                shpc_writel(ctrl, SLOT_REG(hp_slot), slot_reg);
        }
        
-       if (shpchp_poll_mode)  {/* Install interrupt polling code */
-               /* Install and start the interrupt polling timer */
-               init_timer(&php_ctlr->int_poll_timer);
-               start_int_poll_timer( php_ctlr, 10 );   /* start with 10 second delay */
+       if (shpchp_poll_mode) {
+               /* Install interrupt polling timer. Start with 10 sec delay */
+               init_timer(&ctrl->poll_timer);
+               start_int_poll_timer(ctrl, 10);
        } else {
                /* Installs the interrupt handler */
                rc = pci_enable_msi(pdev);
                if (rc) {
                        info("Can't get msi for the hotplug controller\n");
                        info("Use INTx for the hotplug controller\n");
-               } else
-                       php_ctlr->irq = pdev->irq;
+               }
                
-               rc = request_irq(php_ctlr->irq, shpc_isr, IRQF_SHARED, MY_NAME, (void *) ctrl);
-               dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc);
+               rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED,
+                                MY_NAME, (void *)ctrl);
+               dbg("%s: request_irq %d for hpc%d (returns %d)\n",
+                   __FUNCTION__, ctrl->pci_dev->irq,
+                   atomic_read(&shpchp_num_controllers), rc);
                if (rc) {
-                       err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq);
-                       goto abort_free_ctlr;
+                       err("Can't get irq %d for the hotplug controller\n",
+                           ctrl->pci_dev->irq);
+                       goto abort_iounmap;
                }
        }
        dbg("%s: HPC at b:d:f:irq=0x%x:%x:%x:%x\n", __FUNCTION__,
@@ -1280,24 +1201,6 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
                        PCI_FUNC(pdev->devfn), pdev->irq);
        get_hp_hw_control_from_firmware(pdev);
 
-       /*  Add this HPC instance into the HPC list */
-       spin_lock(&list_lock);
-       if (php_ctlr_list_head == 0) {
-               php_ctlr_list_head = php_ctlr;
-               p = php_ctlr_list_head;
-               p->pnext = NULL;
-       } else {
-               p = php_ctlr_list_head;
-
-               while (p->pnext)
-                       p = p->pnext;
-
-               p->pnext = php_ctlr;
-       }
-       spin_unlock(&list_lock);
-
-       ctlr_seq_num++;
-
        /*
         * If this is the first controller to be initialized,
         * initialize the shpchpd work queue
@@ -1306,14 +1209,14 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
                shpchp_wq = create_singlethread_workqueue("shpchpd");
                if (!shpchp_wq) {
                        rc = -ENOMEM;
-                       goto abort_free_ctlr;
+                       goto abort_iounmap;
                }
        }
 
        /*
         * Unmask all event interrupts of all slots
         */
-       for (hp_slot = 0; hp_slot < php_ctlr->num_slots; hp_slot++) {
+       for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) {
                slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot));
                dbg("%s: Default Logical Slot Register %d value %x\n", __FUNCTION__,
                        hp_slot, slot_reg);
@@ -1336,10 +1239,8 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
        return 0;
 
        /* We end up here for the many possible ways to fail this API.  */
-abort_free_ctlr:
-       if (php_ctlr->creg)
-               iounmap(php_ctlr->creg);
-       kfree(php_ctlr);
+abort_iounmap:
+       iounmap(ctrl->creg);
 abort:
        DBG_LEAVE_ROUTINE
        return rc;
index 0a8d1cce9fa09c733601f142436a7b39f231e3ff..279c940a00397444a8d49e03e1ec68386f78fc3c 100644 (file)
@@ -99,14 +99,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)
        int pos;
        int irq;
 
-       pos = pci_find_capability(dev, PCI_CAP_ID_HT);
-       while (pos) {
-               u8 subtype;
-               pci_read_config_byte(dev, pos + 3, &subtype);
-               if (subtype == HT_CAPTYPE_IRQ)
-                       break;
-               pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT);
-       }
+       pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
        if (!pos)
                return -EINVAL;
 
index e5ae3a0c13bbcf08f724c8bfc990ddbc98c0f951..b8d2385e29bc04e72926e43d59e84ce59fc2bb27 100644 (file)
@@ -162,14 +162,9 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
 const struct pci_device_id *pci_match_device(struct pci_driver *drv,
                                             struct pci_dev *dev)
 {
-       const struct pci_device_id *id;
        struct pci_dynid *dynid;
 
-       id = pci_match_id(drv->id_table, dev);
-       if (id)
-               return id;
-
-       /* static ids didn't match, lets look at the dynamic ones */
+       /* Look at the dynamic ids first, before the static ones */
        spin_lock(&drv->dynids.lock);
        list_for_each_entry(dynid, &drv->dynids.list, node) {
                if (pci_match_one_device(&dynid->id, dev)) {
@@ -178,7 +173,8 @@ const struct pci_device_id *pci_match_device(struct pci_driver *drv,
                }
        }
        spin_unlock(&drv->dynids.lock);
-       return NULL;
+
+       return pci_match_id(drv->id_table, dev);
 }
 
 static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
@@ -357,6 +353,8 @@ static int pci_device_resume_early(struct device * dev)
        struct pci_dev * pci_dev = to_pci_dev(dev);
        struct pci_driver * drv = pci_dev->driver;
 
+       pci_fixup_device(pci_fixup_resume, pci_dev);
+
        if (drv && drv->resume_early)
                error = drv->resume_early(pci_dev);
        return error;
index 5a14b73cf3a1dc78af86642f349980744572f1ab..6bfb942428e41dd733123a3f3993fdc53802f64b 100644 (file)
@@ -68,12 +68,14 @@ pci_max_busnr(void)
 
 #endif  /*  0  */
 
-static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos, int cap)
+#define PCI_FIND_CAP_TTL       48
+
+static int __pci_find_next_cap_ttl(struct pci_bus *bus, unsigned int devfn,
+                                  u8 pos, int cap, int *ttl)
 {
        u8 id;
-       int ttl = 48;
 
-       while (ttl--) {
+       while ((*ttl)--) {
                pci_bus_read_config_byte(bus, devfn, pos, &pos);
                if (pos < 0x40)
                        break;
@@ -89,6 +91,14 @@ static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 pos,
        return 0;
 }
 
+static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn,
+                              u8 pos, int cap)
+{
+       int ttl = PCI_FIND_CAP_TTL;
+
+       return __pci_find_next_cap_ttl(bus, devfn, pos, cap, &ttl);
+}
+
 int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
 {
        return __pci_find_next_cap(dev->bus, dev->devfn,
@@ -96,10 +106,10 @@ int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
 }
 EXPORT_SYMBOL_GPL(pci_find_next_capability);
 
-static int __pci_bus_find_cap(struct pci_bus *bus, unsigned int devfn, u8 hdr_type, int cap)
+static int __pci_bus_find_cap_start(struct pci_bus *bus,
+                                   unsigned int devfn, u8 hdr_type)
 {
        u16 status;
-       u8 pos;
 
        pci_bus_read_config_word(bus, devfn, PCI_STATUS, &status);
        if (!(status & PCI_STATUS_CAP_LIST))
@@ -108,15 +118,14 @@ static int __pci_bus_find_cap(struct pci_bus *bus, unsigned int devfn, u8 hdr_ty
        switch (hdr_type) {
        case PCI_HEADER_TYPE_NORMAL:
        case PCI_HEADER_TYPE_BRIDGE:
-               pos = PCI_CAPABILITY_LIST;
-               break;
+               return PCI_CAPABILITY_LIST;
        case PCI_HEADER_TYPE_CARDBUS:
-               pos = PCI_CB_CAPABILITY_LIST;
-               break;
+               return PCI_CB_CAPABILITY_LIST;
        default:
                return 0;
        }
-       return __pci_find_next_cap(bus, devfn, pos, cap);
+
+       return 0;
 }
 
 /**
@@ -140,7 +149,13 @@ static int __pci_bus_find_cap(struct pci_bus *bus, unsigned int devfn, u8 hdr_ty
  */
 int pci_find_capability(struct pci_dev *dev, int cap)
 {
-       return __pci_bus_find_cap(dev->bus, dev->devfn, dev->hdr_type, cap);
+       int pos;
+
+       pos = __pci_bus_find_cap_start(dev->bus, dev->devfn, dev->hdr_type);
+       if (pos)
+               pos = __pci_find_next_cap(dev->bus, dev->devfn, pos, cap);
+
+       return pos;
 }
 
 /**
@@ -158,11 +173,16 @@ int pci_find_capability(struct pci_dev *dev, int cap)
  */
 int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap)
 {
+       int pos;
        u8 hdr_type;
 
        pci_bus_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type);
 
-       return __pci_bus_find_cap(bus, devfn, hdr_type & 0x7f, cap);
+       pos = __pci_bus_find_cap_start(bus, devfn, hdr_type & 0x7f);
+       if (pos)
+               pos = __pci_find_next_cap(bus, devfn, pos, cap);
+
+       return pos;
 }
 
 /**
@@ -214,6 +234,74 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap)
 }
 EXPORT_SYMBOL_GPL(pci_find_ext_capability);
 
+static int __pci_find_next_ht_cap(struct pci_dev *dev, int pos, int ht_cap)
+{
+       int rc, ttl = PCI_FIND_CAP_TTL;
+       u8 cap, mask;
+
+       if (ht_cap == HT_CAPTYPE_SLAVE || ht_cap == HT_CAPTYPE_HOST)
+               mask = HT_3BIT_CAP_MASK;
+       else
+               mask = HT_5BIT_CAP_MASK;
+
+       pos = __pci_find_next_cap_ttl(dev->bus, dev->devfn, pos,
+                                     PCI_CAP_ID_HT, &ttl);
+       while (pos) {
+               rc = pci_read_config_byte(dev, pos + 3, &cap);
+               if (rc != PCIBIOS_SUCCESSFUL)
+                       return 0;
+
+               if ((cap & mask) == ht_cap)
+                       return pos;
+
+               pos = __pci_find_next_cap_ttl(dev->bus, dev->devfn, pos,
+                                             PCI_CAP_ID_HT, &ttl);
+       }
+
+       return 0;
+}
+/**
+ * pci_find_next_ht_capability - query a device's Hypertransport capabilities
+ * @dev: PCI device to query
+ * @pos: Position from which to continue searching
+ * @ht_cap: Hypertransport capability code
+ *
+ * To be used in conjunction with pci_find_ht_capability() to search for
+ * all capabilities matching @ht_cap. @pos should always be a value returned
+ * from pci_find_ht_capability().
+ *
+ * NB. To be 100% safe against broken PCI devices, the caller should take
+ * steps to avoid an infinite loop.
+ */
+int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap)
+{
+       return __pci_find_next_ht_cap(dev, pos + PCI_CAP_LIST_NEXT, ht_cap);
+}
+EXPORT_SYMBOL_GPL(pci_find_next_ht_capability);
+
+/**
+ * pci_find_ht_capability - query a device's Hypertransport capabilities
+ * @dev: PCI device to query
+ * @ht_cap: Hypertransport capability code
+ *
+ * Tell if a device supports a given Hypertransport capability.
+ * Returns an address within the device's PCI configuration space
+ * or 0 in case the device does not support the request capability.
+ * The address points to the PCI capability, of type PCI_CAP_ID_HT,
+ * which has a Hypertransport capability matching @ht_cap.
+ */
+int pci_find_ht_capability(struct pci_dev *dev, int ht_cap)
+{
+       int pos;
+
+       pos = __pci_bus_find_cap_start(dev->bus, dev->devfn, dev->hdr_type);
+       if (pos)
+               pos = __pci_find_next_ht_cap(dev, pos, ht_cap);
+
+       return pos;
+}
+EXPORT_SYMBOL_GPL(pci_find_ht_capability);
+
 /**
  * pci_find_parent_resource - return resource region of parent bus of given region
  * @dev: PCI device structure contains resources to be searched
index b4da7954611e2388025afe2fb80e8bb19ebb92cc..f17e7ed2b2a5d8a81d169e313a3ff1514f09da95 100644 (file)
@@ -90,7 +90,7 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev,
                return -ENODEV;
        
        pci_set_master(dev);
-        if (!dev->irq) {
+        if (!dev->irq && dev->pin) {
                printk(KERN_WARNING 
                "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", 
                __FUNCTION__, dev->device, dev->vendor);
index 6a3c1e7289001651b981663878bde47f78678fcb..1ae9c3f50ffad668296114ac981abf4c0dabb52d 100644 (file)
@@ -649,6 +649,9 @@ static void pci_read_irq(struct pci_dev *dev)
  * Returns 0 on success and -1 if unknown type of device (not normal, bridge
  * or CardBus).
  */
+
+#define LEGACY_IO_RESOURCE     (IORESOURCE_IO | IORESOURCE_PCI_FIXED)
+
 static int pci_setup_device(struct pci_dev * dev)
 {
        u32 class;
@@ -692,18 +695,18 @@ static int pci_setup_device(struct pci_dev * dev)
                        if ((progif & 1) == 0) {
                                dev->resource[0].start = 0x1F0;
                                dev->resource[0].end = 0x1F7;
-                               dev->resource[0].flags = IORESOURCE_IO;
+                               dev->resource[0].flags = LEGACY_IO_RESOURCE;
                                dev->resource[1].start = 0x3F6;
                                dev->resource[1].end = 0x3F6;
-                               dev->resource[1].flags = IORESOURCE_IO;
+                               dev->resource[1].flags = LEGACY_IO_RESOURCE;
                        }
                        if ((progif & 4) == 0) {
                                dev->resource[2].start = 0x170;
                                dev->resource[2].end = 0x177;
-                               dev->resource[2].flags = IORESOURCE_IO;
+                               dev->resource[2].flags = LEGACY_IO_RESOURCE;
                                dev->resource[3].start = 0x376;
                                dev->resource[3].end = 0x376;
-                               dev->resource[3].flags = IORESOURCE_IO;
+                               dev->resource[3].flags = LEGACY_IO_RESOURCE;
                        }
                }
                break;
index 9ca9b9bf6160f337ee198d13a42775a7e3166b5a..8f0322d6f3bf473fd60094073bbd353ed834eaa3 100644 (file)
@@ -36,7 +36,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRID
 
 /* Deal with broken BIOS'es that neglect to enable passive release,
    which can cause problems in combination with the 82441FX/PPro MTRRs */
-static void __devinit quirk_passive_release(struct pci_dev *dev)
+static void quirk_passive_release(struct pci_dev *dev)
 {
        struct pci_dev *d = NULL;
        unsigned char dlc;
@@ -53,6 +53,7 @@ static void __devinit quirk_passive_release(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82441,      quirk_passive_release );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82441,      quirk_passive_release );
 
 /*  The VIA VP2/VP3/MVP3 seem to have some 'features'. There may be a workaround
     but VIA don't answer queries. If you happen to have good contacts at VIA
@@ -134,7 +135,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,        PCI_DEVICE_ID_INTEL_82439TX,    quir
  *     Updated based on further information from the site and also on
  *     information provided by VIA 
  */
-static void __devinit quirk_vialatency(struct pci_dev *dev)
+static void quirk_vialatency(struct pci_dev *dev)
 {
        struct pci_dev *p;
        u8 rev;
@@ -185,6 +186,10 @@ exit:
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,     PCI_DEVICE_ID_VIA_8363_0,       quirk_vialatency );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,     PCI_DEVICE_ID_VIA_8371_1,       quirk_vialatency );
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,     PCI_DEVICE_ID_VIA_8361,         quirk_vialatency );
+/* Must restore this on a resume from RAM */
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_8363_0,       quirk_vialatency );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_8371_1,       quirk_vialatency );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_8361,         quirk_vialatency );
 
 /*
  *     VIA Apollo VP3 needs ETBF on BT848/878
@@ -532,7 +537,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_vt8235
  * TODO: When we have device-specific interrupt routers,
  * this code will go away from quirks.
  */
-static void __devinit quirk_via_ioapic(struct pci_dev *dev)
+static void quirk_via_ioapic(struct pci_dev *dev)
 {
        u8 tmp;
        
@@ -548,6 +553,7 @@ static void __devinit quirk_via_ioapic(struct pci_dev *dev)
        pci_write_config_byte (dev, 0x58, tmp);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,     PCI_DEVICE_ID_VIA_82C686,       quirk_via_ioapic );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_82C686,       quirk_via_ioapic );
 
 /*
  * VIA 8237: Some BIOSs don't set the 'Bypass APIC De-Assert Message' Bit.
@@ -555,7 +561,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,  PCI_DEVICE_ID_VIA_82C686,       quirk_via_i
  * Set this bit to get rid of cycle wastage.
  * Otherwise uncritical.
  */
-static void __devinit quirk_via_vt8237_bypass_apic_deassert(struct pci_dev *dev)
+static void quirk_via_vt8237_bypass_apic_deassert(struct pci_dev *dev)
 {
        u8 misc_control2;
 #define BYPASS_APIC_DEASSERT 8
@@ -567,6 +573,7 @@ static void __devinit quirk_via_vt8237_bypass_apic_deassert(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,     PCI_DEVICE_ID_VIA_8237,         quirk_via_vt8237_bypass_apic_deassert);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_8237,         quirk_via_vt8237_bypass_apic_deassert);
 
 /*
  * The AMD io apic can hang the box when an apic irq is masked.
@@ -600,7 +607,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI,   PCI_ANY_ID,                     quirk_ioapic_rmw );
 #define AMD8131_revB0        0x11
 #define AMD8131_MISC         0x40
 #define AMD8131_NIOAMODE_BIT 0
-static void __init quirk_amd_8131_ioapic(struct pci_dev *dev) 
+static void quirk_amd_8131_ioapic(struct pci_dev *dev)
 { 
         unsigned char revid, tmp;
         
@@ -616,6 +623,7 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
         }
 } 
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
 #endif /* CONFIG_X86_IO_APIC */
 
 
@@ -641,65 +649,84 @@ static void __devinit quirk_via_acpi(struct pci_dev *d)
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_82C586_3,     quirk_via_acpi );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_82C686_4,     quirk_via_acpi );
 
-/*
- * Via 686A/B:  The PCI_INTERRUPT_LINE register for the on-chip
- * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
- * when written, it makes an internal connection to the PIC.
- * For these devices, this register is defined to be 4 bits wide.
- * Normally this is fine.  However for IO-APIC motherboards, or
- * non-x86 architectures (yes Via exists on PPC among other places),
- * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
- * interrupts delivered properly.
- *
- * Some of the on-chip devices are actually '586 devices' so they are
- * listed here.
- */
-
-static int via_irq_fixup_needed = -1;
 
 /*
- * As some VIA hardware is available in PCI-card form, we need to restrict
- * this quirk to VIA PCI hardware built onto VIA-based motherboards only.
- * We try to locate a VIA southbridge before deciding whether the quirk
- * should be applied.
+ *     VIA bridges which have VLink
  */
-static const struct pci_device_id via_irq_fixup_tbl[] = {
-       {
-               .vendor         = PCI_VENDOR_ID_VIA,
-               .device         = PCI_ANY_ID,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .class          = PCI_CLASS_BRIDGE_ISA << 8,
-               .class_mask     = 0xffff00,
-       },
+
+static const struct pci_device_id via_vlink_fixup_tbl[] = {
+       /* Internal devices need IRQ line routing, pre VLink */
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C686), 0 },
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8231), 17 },
+       /* Devices with VLink */
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233_0), 17},
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233A), 17 },
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233C_0), 17 },
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8235), 16 },
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237), 15 },
+       { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237A), 15 },
        { 0, },
 };
 
-static void quirk_via_irq(struct pci_dev *dev)
+/**
+ *     quirk_via_vlink         -       VIA VLink IRQ number update
+ *     @dev: PCI device
+ *
+ *     If the device we are dealing with is on a PIC IRQ we need to
+ *     ensure that the IRQ line register which usually is not relevant
+ *     for PCI cards, is actually written so that interrupts get sent
+ *     to the right place
+ */
+
+static void quirk_via_vlink(struct pci_dev *dev)
 {
+       const struct pci_device_id *via_vlink_fixup;
+       static int dev_lo = -1, dev_hi = 18;
        u8 irq, new_irq;
 
-       if (via_irq_fixup_needed == -1)
-               via_irq_fixup_needed = pci_dev_present(via_irq_fixup_tbl);
+       /* Check if we have VLink and cache the result */
 
-       if (!via_irq_fixup_needed)
+       /* Checked already - no */
+       if (dev_lo == -2)
                return;
 
+       /* Not checked - see what bridge we have and find the device
+          ranges */
+
+       if (dev_lo == -1) {
+               via_vlink_fixup = pci_find_present(via_vlink_fixup_tbl);
+               if (via_vlink_fixup == NULL) {
+                       dev_lo = -2;
+                       return;
+               }
+               dev_lo = via_vlink_fixup->driver_data;
+               /* 82C686 is special - 0/0 */
+               if (dev_lo == 0)
+                       dev_hi = 0;
+       }
        new_irq = dev->irq;
 
        /* Don't quirk interrupts outside the legacy IRQ range */
        if (!new_irq || new_irq > 15)
                return;
 
+       /* Internal device ? */
+       if (dev->bus->number != 0 || PCI_SLOT(dev->devfn) > dev_hi ||
+               PCI_SLOT(dev->devfn) < dev_lo)
+               return;
+
+       /* This is an internal VLink device on a PIC interrupt. The BIOS
+          ought to have set this but may not have, so we redo it */
+
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
        if (new_irq != irq) {
-               printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
+               printk(KERN_INFO "PCI: VIA VLink IRQ fixup for %s, from %d to %d\n",
                        pci_name(dev), irq, new_irq);
                udelay(15);     /* unknown if delay really needed */
                pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
        }
 }
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_vlink);
 
 /*
  * VIA VT82C598 has its device ID settable and many BIOSes
@@ -720,13 +747,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,       PCI_DEVICE_ID_VIA_82C597_0,     quirk_vt
  * do this even if the Linux CardBus driver is not loaded, because
  * the Linux i82365 driver does not (and should not) handle CardBus.
  */
-static void __devinit quirk_cardbus_legacy(struct pci_dev *dev)
+static void quirk_cardbus_legacy(struct pci_dev *dev)
 {
        if ((PCI_CLASS_BRIDGE_CARDBUS << 8) ^ dev->class)
                return;
        pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
+DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
 
 /*
  * Following the PCI ordering rules is optional on the AMD762. I'm not
@@ -735,7 +763,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
  * To be fair to AMD, it follows the spec by default, its BIOS people
  * who turn it off!
  */
-static void __devinit quirk_amd_ordering(struct pci_dev *dev)
+static void quirk_amd_ordering(struct pci_dev *dev)
 {
        u32 pcic;
        pci_read_config_dword(dev, 0x4C, &pcic);
@@ -749,6 +777,7 @@ static void __devinit quirk_amd_ordering(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,     PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD,    PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering );
 
 /*
  *     DreamWorks provided workaround for Dunord I-3000 problem
@@ -784,7 +813,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA,     0x605,  quirk_transparent_bridge
  * datasheets found at http://www.national.com/ds/GX for info on what
  * these bits do.  <christer@weinigel.se>
  */
-static void __init quirk_mediagx_master(struct pci_dev *dev)
+static void quirk_mediagx_master(struct pci_dev *dev)
 {
        u8 reg;
        pci_read_config_byte(dev, 0x41, &reg);
@@ -795,13 +824,14 @@ static void __init quirk_mediagx_master(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CYRIX,   PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX,  PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master );
 
 /*
  *     Ensure C0 rev restreaming is off. This is normally done by
  *     the BIOS but in the odd case it is not the results are corruption
  *     hence the presence of a Linux check
  */
-static void __init quirk_disable_pxb(struct pci_dev *pdev)
+static void quirk_disable_pxb(struct pci_dev *pdev)
 {
        u16 config;
        u8 rev;
@@ -817,7 +847,25 @@ static void __init quirk_disable_pxb(struct pci_dev *pdev)
        }
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82454NX,    quirk_disable_pxb );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82454NX,    quirk_disable_pxb );
+
+
+static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
+{
+       /* set sb600 sata to ahci mode */
+       if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
+               u8 tmp;
 
+               pci_read_config_byte(pdev, 0x40, &tmp);
+               pci_write_config_byte(pdev, 0x40, tmp|1);
+               pci_write_config_byte(pdev, 0x9, 1);
+               pci_write_config_byte(pdev, 0xa, 6);
+               pci_write_config_byte(pdev, 0x40, tmp);
+
+               pdev->class = 0x010601;
+       }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata);
 
 /*
  *     Serverworks CSB5 IDE does not fully support native mode
@@ -874,7 +922,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,       PCI_DEVICE_ID_INTEL_82375,      quirk_e
  * runs everywhere at present we suppress the printk output in most
  * irrelevant cases.
  */
-static void __init k8t_sound_hostbridge(struct pci_dev *dev)
+static void k8t_sound_hostbridge(struct pci_dev *dev)
 {
        unsigned char val;
 
@@ -893,8 +941,8 @@ static void __init k8t_sound_hostbridge(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
 
-#ifndef CONFIG_ACPI_SLEEP
 /*
  * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
  * is not activated. The myth is that Asus said that they do not want the
@@ -906,10 +954,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_ho
  * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
  * becomes necessary to do this tweak in two steps -- I've chosen the Host
  * bridge as trigger.
- *
- * Actually, leaving it unhidden and not redoing the quirk over suspend2ram
- * will cause thermal management to break down, and causing machine to
- * overheat.
  */
 static int __initdata asus_hides_smbus;
 
@@ -1019,7 +1063,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,     PCI_DEVICE_ID_INTEL_82855PM_HB, as
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge );
 
-static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
+static void asus_hides_smbus_lpc(struct pci_dev *dev)
 {
        u16 val;
        
@@ -1042,8 +1086,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,    PCI_DEVICE_ID_INTEL_82801CA_0,  asu
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801EB_0,  asus_hides_smbus_lpc );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801DB_0,  asus_hides_smbus_lpc );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801BA_0,  asus_hides_smbus_lpc );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801CA_0,  asus_hides_smbus_lpc );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82801EB_0,  asus_hides_smbus_lpc );
 
-static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
+static void asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
 {
        u32 val, rcba;
        void __iomem *base;
@@ -1059,13 +1109,12 @@ static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
        printk(KERN_INFO "PCI: Enabled ICH6/i801 SMBus device\n");
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_ICH6_1,     asus_hides_smbus_lpc_ich6 );
-
-#endif
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_ICH6_1,     asus_hides_smbus_lpc_ich6 );
 
 /*
  * SiS 96x south bridge: BIOS typically hides SMBus device...
  */
-static void __init quirk_sis_96x_smbus(struct pci_dev *dev)
+static void quirk_sis_96x_smbus(struct pci_dev *dev)
 {
        u8 val = 0;
        printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
@@ -1086,7 +1135,7 @@ static int __devinitdata sis_96x_compatible = 0;
 
 #define SIS_DETECT_REGISTER 0x40
 
-static void __init quirk_sis_503(struct pci_dev *dev)
+static void quirk_sis_503(struct pci_dev *dev)
 {
        u8 reg;
        u16 devid;
@@ -1122,13 +1171,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,      PCI_DEVICE_ID_SI_651,           quirk_sis_96x_
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_735,           quirk_sis_96x_compatible );
 
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_503,           quirk_sis_503 );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_503,           quirk_sis_503 );
 /*
  * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
  * and MC97 modem controller are disabled when a second PCI soundcard is
  * present. This patch, tweaking the VT8237 ISA bridge, enables them.
  * -- bjd
  */
-static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
+static void asus_hides_ac97_lpc(struct pci_dev *dev)
 {
        u8 val;
        int asus_hides_ac97 = 0;
@@ -1159,6 +1209,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,       PCI_DEVICE_ID_SI_962,           quirk_sis_96x_
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_963,           quirk_sis_96x_smbus );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_LPC,           quirk_sis_96x_smbus );
 
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc );
+
+
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_961,           quirk_sis_96x_smbus );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_962,           quirk_sis_96x_smbus );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_963,           quirk_sis_96x_smbus );
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_LPC,           quirk_sis_96x_smbus );
+
 #if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE)
 
 /*
@@ -1167,7 +1225,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,        PCI_DEVICE_ID_SI_LPC,           quirk_sis_96x_
  *     the PCI scanning.
  */
 
-static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev)
+static void quirk_jmicron_dualfn(struct pci_dev *pdev)
 {
        u32 conf;
        u8 hdr;
@@ -1205,6 +1263,7 @@ static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev)
 }
 
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
 
 #endif
 
@@ -1532,6 +1591,8 @@ extern struct pci_fixup __start_pci_fixups_final[];
 extern struct pci_fixup __end_pci_fixups_final[];
 extern struct pci_fixup __start_pci_fixups_enable[];
 extern struct pci_fixup __end_pci_fixups_enable[];
+extern struct pci_fixup __start_pci_fixups_resume[];
+extern struct pci_fixup __end_pci_fixups_resume[];
 
 
 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
@@ -1559,6 +1620,11 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
                end = __end_pci_fixups_enable;
                break;
 
+       case pci_fixup_resume:
+               start = __start_pci_fixups_resume;
+               end = __end_pci_fixups_resume;
+               break;
+
        default:
                /* stupid compiler warning, you would think with an enum... */
                return;
@@ -1596,7 +1662,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,     0x1460,         quirk_p64h2_1k_io);
  * Force it to be linked by setting the corresponding control bit in the
  * config space.
  */
-static void __devinit quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev)
+static void quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev)
 {
        uint8_t b;
        if (pci_read_config_byte(dev, 0xf41, &b) == 0) {
@@ -1610,6 +1676,8 @@ static void __devinit quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA,  PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
                        quirk_nvidia_ck804_pcie_aer_ext_cap);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA,  PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
+                       quirk_nvidia_ck804_pcie_aer_ext_cap);
 
 #ifdef CONFIG_PCI_MSI
 /* To disable MSI globally */
@@ -1644,19 +1712,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_
  * return 1 if a HT MSI capability is found and enabled */
 static int __devinit msi_ht_cap_enabled(struct pci_dev *dev)
 {
-       u8 pos;
-       int ttl;
-       for (pos = pci_find_capability(dev, PCI_CAP_ID_HT), ttl = 48;
-            pos && ttl;
-            pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT), ttl--) {
-               u32 cap_hdr;
-               /* MSI mapping section according to Hypertransport spec */
-               if (pci_read_config_dword(dev, pos, &cap_hdr) == 0
-                   && (cap_hdr & 0xf8000000) == 0xa8000000 /* MSI mapping */) {
-                       printk(KERN_INFO "PCI: Found HT MSI mapping on %s with capability %s\n",
-                              pci_name(dev), cap_hdr & 0x10000 ? "enabled" : "disabled");
-                       return (cap_hdr & 0x10000) != 0; /* MSI mapping cap enabled */
+       int pos, ttl = 48;
+
+       pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING);
+       while (pos && ttl--) {
+               u8 flags;
+
+               if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS,
+                                        &flags) == 0)
+               {
+                       printk(KERN_INFO "PCI: Found %s HT MSI Mapping on %s\n",
+                               flags & HT_MSI_FLAGS_ENABLE ?
+                               "enabled" : "disabled", pci_name(dev));
+                       return (flags & HT_MSI_FLAGS_ENABLE) != 0;
                }
+
+               pos = pci_find_next_ht_capability(dev, pos,
+                                                 HT_CAPTYPE_MSI_MAPPING);
        }
        return 0;
 }
@@ -1688,8 +1760,9 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev)
         * a single one having MSI is enough to be sure that MSI are supported.
         */
        pdev = pci_get_slot(dev->bus, 0);
-       if (dev->subordinate && !msi_ht_cap_enabled(dev)
-           && !msi_ht_cap_enabled(pdev)) {
+       if (!pdev)
+               return;
+       if (!msi_ht_cap_enabled(dev) && !msi_ht_cap_enabled(pdev)) {
                printk(KERN_WARNING "PCI: MSI quirk detected. "
                       "MSI disabled on chipset %s.\n",
                       pci_name(dev));
index 2f13eba5d5aebf9c7a9f0930cbc1022bde441f75..45f2b20ef513d39612dcfd64cc838a65d85973d9 100644 (file)
@@ -413,6 +413,24 @@ exit:
        return dev;
 }
 
+const struct pci_device_id *pci_find_present(const struct pci_device_id *ids)
+{
+       struct pci_dev *dev;
+       const struct pci_device_id *found = NULL;
+
+       WARN_ON(in_interrupt());
+       down_read(&pci_bus_sem);
+       while (ids->vendor || ids->subvendor || ids->class_mask) {
+               list_for_each_entry(dev, &pci_devices, global_list) {
+                       if ((found = pci_match_one_device(ids, dev)) != NULL)
+                               break;
+               }
+               ids++;
+       }
+       up_read(&pci_bus_sem);
+       return found;
+}
+
 /**
  * pci_dev_present - Returns 1 if device matching the device list is present, 0 if not.
  * @ids: A pointer to a null terminated list of struct pci_device_id structures
@@ -426,25 +444,11 @@ exit:
  */
 int pci_dev_present(const struct pci_device_id *ids)
 {
-       struct pci_dev *dev;
-       int found = 0;
-
-       WARN_ON(in_interrupt());
-       down_read(&pci_bus_sem);
-       while (ids->vendor || ids->subvendor || ids->class_mask) {
-               list_for_each_entry(dev, &pci_devices, global_list) {
-                       if (pci_match_one_device(ids, dev)) {
-                               found = 1;
-                               goto exit;
-                       }
-               }
-               ids++;
-       }
-exit:
-       up_read(&pci_bus_sem);
-       return found;
+       return pci_find_present(ids) == NULL ? 0 : 1;
 }
+
 EXPORT_SYMBOL(pci_dev_present);
+EXPORT_SYMBOL(pci_find_present);
 
 EXPORT_SYMBOL(pci_find_device);
 EXPORT_SYMBOL(pci_find_device_reverse);
index 8f7bcf56f1498d17064916d9986433e4e557631b..89f3036f0de8866d46081fca800e146c3376b32b 100644 (file)
@@ -41,7 +41,7 @@
  * have a P2P bridge below a cardbus bridge, we need 4K.
  */
 #define CARDBUS_IO_SIZE                (256)
-#define CARDBUS_MEM_SIZE       (32*1024*1024)
+#define CARDBUS_MEM_SIZE       (64*1024*1024)
 
 static void __devinit
 pbus_assign_resources_sorted(struct pci_bus *bus)
index ab78e4bbdd83044bc6bb6a3f32e4d7ea3834bf52..cb4ced3560e9117109934d27f4dd5f18c38f03b0 100644 (file)
@@ -33,11 +33,22 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
        u32 new, check, mask;
        int reg;
 
-       /* Ignore resources for unimplemented BARs and unused resource slots
-          for 64 bit BARs. */
+       /*
+        * Ignore resources for unimplemented BARs and unused resource slots
+        * for 64 bit BARs.
+        */
        if (!res->flags)
                return;
 
+       /*
+        * Ignore non-moveable resources.  This might be legacy resources for
+        * which no functional BAR register exists or another important
+        * system resource we should better not move around in system address
+        * space.
+        */
+       if (res->flags & IORESOURCE_PCI_FIXED)
+               return;
+
        pcibios_resource_to_bus(dev, &region, res);
 
        pr_debug("  got res [%llx:%llx] bus [%lx:%lx] flags %lx for "
@@ -212,6 +223,10 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head)
                resource_size_t r_align;
 
                r = &dev->resource[i];
+
+               if (r->flags & IORESOURCE_PCI_FIXED)
+                       continue;
+
                r_align = r->end - r->start;
                
                if (!(r->flags) || r->parent)
index 1748e27501cdee45da304d4cdfd97f1c0ff37372..f02f48a882a97b4150a7afe9eb403f1ce7f293fb 100644 (file)
@@ -265,13 +265,11 @@ static int scsi_merge_bio(struct request *rq, struct bio *bio)
 
        if (!rq->bio)
                blk_rq_bio_prep(q, rq, bio);
-       else if (!q->back_merge_fn(q, rq, bio))
+       else if (!ll_back_merge_fn(q, rq, bio))
                return -EINVAL;
        else {
                rq->biotail->bi_next = bio;
                rq->biotail = bio;
-               rq->hard_nr_sectors += bio_sectors(bio);
-               rq->nr_sectors = rq->hard_nr_sectors;
        }
 
        return 0;
index 92eba893559d003189e680bdf7d17f2990300111..db8607e3d5318013a13b0fa94eee7707c6270e7b 100644 (file)
@@ -278,8 +278,8 @@ static int ulite_request_port(struct uart_port *port)
 
 static void ulite_config_port(struct uart_port *port, int flags)
 {
-       ulite_request_port(port);
-       port->type = PORT_UARTLITE;
+       if (!ulite_request_port(port))
+               port->type = PORT_UARTLITE;
 }
 
 static int ulite_verify_port(struct uart_port *port, struct serial_struct *ser)
index a5d2cdfff46f9aeae510956558e2e429f72b920d..bcaf4bd18eb96113c8dd4109b67e793be10f3432 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/spinlock.h>
+#include <linux/workqueue.h>
 #include <linux/platform_device.h>
 
 #include <linux/spi/spi.h>
index 6303970e93c1b7fcc16678069c659e11bb59a414..24ee8be359f5e3d86fa6846fef17d4e9e8152df4 100644 (file)
@@ -130,7 +130,7 @@ MFG:HEWLETT-PACKARD;MDL:DESKJET 970C;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:H
 
 struct usblp {
        struct usb_device       *dev;                   /* USB device */
-       struct semaphore        sem;                    /* locks this struct, especially "dev" */
+       struct mutex            mut;                    /* locks this struct, especially "dev" */
        char                    *writebuf;              /* write transfer_buffer */
        char                    *readbuf;               /* read transfer_buffer */
        char                    *statusbuf;             /* status transfer_buffer */
@@ -465,7 +465,7 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        int twoints[2];
        int retval = 0;
 
-       down (&usblp->sem);
+       mutex_lock (&usblp->mut);
        if (!usblp->present) {
                retval = -ENODEV;
                goto done;
@@ -644,14 +644,14 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                }
 
 done:
-       up (&usblp->sem);
+       mutex_unlock (&usblp->mut);
        return retval;
 }
 
 static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
 {
        struct usblp *usblp = file->private_data;
-       int timeout, rv, err = 0, transfer_length = 0;
+       int timeout, intr, rv, err = 0, transfer_length = 0;
        size_t writecount = 0;
 
        while (writecount < count) {
@@ -668,14 +668,16 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
                        if (rv < 0)
                                return writecount ? writecount : -EINTR;
                }
-               down (&usblp->sem);
+               intr = mutex_lock_interruptible (&usblp->mut);
+               if (intr)
+                       return writecount ? writecount : -EINTR;
                if (!usblp->present) {
-                       up (&usblp->sem);
+                       mutex_unlock (&usblp->mut);
                        return -ENODEV;
                }
 
                if (usblp->sleeping) {
-                       up (&usblp->sem);
+                       mutex_unlock (&usblp->mut);
                        return writecount ? writecount : -ENODEV;
                }
 
@@ -687,10 +689,10 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
                                err = usblp->writeurb->status;
                        } else
                                err = usblp_check_status(usblp, err);
-                       up (&usblp->sem);
+                       mutex_unlock (&usblp->mut);
 
                        /* if the fault was due to disconnect, let khubd's
-                        * call to usblp_disconnect() grab usblp->sem ...
+                        * call to usblp_disconnect() grab usblp->mut ...
                         */
                        schedule ();
                        continue;
@@ -702,7 +704,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
                 */
                writecount += transfer_length;
                if (writecount == count) {
-                       up(&usblp->sem);
+                       mutex_unlock(&usblp->mut);
                        break;
                }
 
@@ -714,7 +716,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
 
                if (copy_from_user(usblp->writeurb->transfer_buffer, 
                                   buffer + writecount, transfer_length)) {
-                       up(&usblp->sem);
+                       mutex_unlock(&usblp->mut);
                        return writecount ? writecount : -EFAULT;
                }
 
@@ -727,10 +729,10 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
                                count = -EIO;
                        else
                                count = writecount ? writecount : -ENOMEM;
-                       up (&usblp->sem);
+                       mutex_unlock (&usblp->mut);
                        break;
                }
-               up (&usblp->sem);
+               mutex_unlock (&usblp->mut);
        }
 
        return count;
@@ -739,12 +741,14 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
 static ssize_t usblp_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
 {
        struct usblp *usblp = file->private_data;
-       int rv;
+       int rv, intr;
 
        if (!usblp->bidir)
                return -EINVAL;
 
-       down (&usblp->sem);
+       intr = mutex_lock_interruptible (&usblp->mut);
+       if (intr)
+               return -EINTR;
        if (!usblp->present) {
                count = -ENODEV;
                goto done;
@@ -757,9 +761,9 @@ static ssize_t usblp_read(struct file *file, char __user *buffer, size_t count,
                        count = -EAGAIN;
                        goto done;
                }
-               up(&usblp->sem);
+               mutex_unlock(&usblp->mut);
                rv = wait_event_interruptible(usblp->wait, usblp->rcomplete || !usblp->present);
-               down(&usblp->sem);
+               mutex_lock(&usblp->mut);
                if (rv < 0) {
                        count = -EINTR;
                        goto done;
@@ -807,7 +811,7 @@ static ssize_t usblp_read(struct file *file, char __user *buffer, size_t count,
        }
 
 done:
-       up (&usblp->sem);
+       mutex_unlock (&usblp->mut);
        return count;
 }
 
@@ -886,7 +890,7 @@ static int usblp_probe(struct usb_interface *intf,
                goto abort;
        }
        usblp->dev = dev;
-       init_MUTEX (&usblp->sem);
+       mutex_init (&usblp->mut);
        init_waitqueue_head(&usblp->wait);
        usblp->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
        usblp->intf = intf;
@@ -1178,7 +1182,7 @@ static void usblp_disconnect(struct usb_interface *intf)
        device_remove_file(&intf->dev, &dev_attr_ieee1284_id);
 
        mutex_lock (&usblp_mutex);
-       down (&usblp->sem);
+       mutex_lock (&usblp->mut);
        usblp->present = 0;
        usb_set_intfdata (intf, NULL);
 
@@ -1187,7 +1191,7 @@ static void usblp_disconnect(struct usb_interface *intf)
                        usblp->writebuf, usblp->writeurb->transfer_dma);
        usb_buffer_free (usblp->dev, USBLP_BUF_SIZE,
                        usblp->readbuf, usblp->readurb->transfer_dma);
-       up (&usblp->sem);
+       mutex_unlock (&usblp->mut);
 
        if (!usblp->used)
                usblp_cleanup (usblp);
@@ -1200,11 +1204,11 @@ static int usblp_suspend (struct usb_interface *intf, pm_message_t message)
 
        /* this races against normal access and open */
        mutex_lock (&usblp_mutex);
-       down (&usblp->sem);
+       mutex_lock (&usblp->mut);
        /* we take no more IO */
        usblp->sleeping = 1;
        usblp_unlink_urbs(usblp);
-       up (&usblp->sem);
+       mutex_unlock (&usblp->mut);
        mutex_unlock (&usblp_mutex);
 
        return 0;
@@ -1216,12 +1220,12 @@ static int usblp_resume (struct usb_interface *intf)
        int r;
 
        mutex_lock (&usblp_mutex);
-       down (&usblp->sem);
+       mutex_lock (&usblp->mut);
 
        usblp->sleeping = 0;
        r = handle_bidir (usblp);
 
-       up (&usblp->sem);
+       mutex_unlock (&usblp->mut);
        mutex_unlock (&usblp_mutex);
 
        return r;
index 3ed4cb2d56d9286e6e8a828b69dcc9304aaf8e81..4b3a6ab29bd3e1a522b5051136627ff4813f3842 100644 (file)
@@ -962,7 +962,11 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb,
                        kfree(dr);
                        return -EFAULT;
                }
-               snoop(&ps->dev->dev, "control urb\n");
+               snoop(&ps->dev->dev, "control urb: bRequest=%02x "
+                       "bRrequestType=%02x wValue=%04x "
+                       "wIndex=%04x wLength=%04x\n",
+                       dr->bRequest, dr->bRequestType, dr->wValue,
+                       dr->wIndex, dr->wLength);
                break;
 
        case USBDEVFS_URB_TYPE_BULK:
index 3e0abbb49fe134e4721037ffdbeedb242dd6e062..812c733ba8ce52f40da03b3c690a9375208c1981 100644 (file)
 #include <linux/usb_gadget.h>
 
 #include <asm/byteorder.h>
+#include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
 
-#include <asm/arch/hardware.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/board.h>
+#include <asm/arch/cpu.h>
+#include <asm/arch/at91sam9261_matrix.h>
 
 #include "at91_udc.h"
 
 static const char driver_name [] = "at91_udc";
 static const char ep0name[] = "ep0";
 
-/*-------------------------------------------------------------------------*/
 
-/*
- * Read from a UDP register.
- */
-static inline unsigned long at91_udp_read(unsigned int reg)
-{
-       void __iomem *udp_base = (void __iomem *)AT91_VA_BASE_UDP;
-
-       return __raw_readl(udp_base + reg);
-}
-
-/*
- * Write to a UDP register.
- */
-static inline void at91_udp_write(unsigned int reg, unsigned long value)
-{
-       void __iomem *udp_base = (void __iomem *)AT91_VA_BASE_UDP;
-
-       __raw_writel(value, udp_base + reg);
-}
+#define at91_udp_read(dev, reg) \
+       __raw_readl((dev)->udp_baseaddr + (reg))
+#define at91_udp_write(dev, reg, val) \
+       __raw_writel((val), (dev)->udp_baseaddr + (reg))
 
 /*-------------------------------------------------------------------------*/
 
@@ -210,13 +196,13 @@ static int proc_udc_show(struct seq_file *s, void *unused)
                return 0;
        }
 
-       tmp = at91_udp_read(AT91_UDP_FRM_NUM);
+       tmp = at91_udp_read(udc, AT91_UDP_FRM_NUM);
        seq_printf(s, "frame %05x:%s%s frame=%d\n", tmp,
                (tmp & AT91_UDP_FRM_OK) ? " ok" : "",
                (tmp & AT91_UDP_FRM_ERR) ? " err" : "",
                (tmp & AT91_UDP_NUM));
 
-       tmp = at91_udp_read(AT91_UDP_GLB_STAT);
+       tmp = at91_udp_read(udc, AT91_UDP_GLB_STAT);
        seq_printf(s, "glbstate %02x:%s" FOURBITS "\n", tmp,
                (tmp & AT91_UDP_RMWUPE) ? " rmwupe" : "",
                (tmp & AT91_UDP_RSMINPR) ? " rsminpr" : "",
@@ -224,13 +210,13 @@ static int proc_udc_show(struct seq_file *s, void *unused)
                (tmp & AT91_UDP_CONFG) ? " confg" : "",
                (tmp & AT91_UDP_FADDEN) ? " fadden" : "");
 
-       tmp = at91_udp_read(AT91_UDP_FADDR);
+       tmp = at91_udp_read(udc, AT91_UDP_FADDR);
        seq_printf(s, "faddr   %03x:%s fadd=%d\n", tmp,
                (tmp & AT91_UDP_FEN) ? " fen" : "",
                (tmp & AT91_UDP_FADD));
 
-       proc_irq_show(s, "imr   ", at91_udp_read(AT91_UDP_IMR));
-       proc_irq_show(s, "isr   ", at91_udp_read(AT91_UDP_ISR));
+       proc_irq_show(s, "imr   ", at91_udp_read(udc, AT91_UDP_IMR));
+       proc_irq_show(s, "isr   ", at91_udp_read(udc, AT91_UDP_ISR));
 
        if (udc->enabled && udc->vbus) {
                proc_ep_show(s, &udc->ep[0]);
@@ -286,6 +272,7 @@ static inline void remove_debug_file(struct at91_udc *udc) {}
 static void done(struct at91_ep *ep, struct at91_request *req, int status)
 {
        unsigned        stopped = ep->stopped;
+       struct at91_udc *udc = ep->udc;
 
        list_del_init(&req->queue);
        if (req->req.status == -EINPROGRESS)
@@ -301,7 +288,7 @@ static void done(struct at91_ep *ep, struct at91_request *req, int status)
 
        /* ep0 is always ready; other endpoints need a non-empty queue */
        if (list_empty(&ep->queue) && ep->int_mask != (1 << 0))
-               at91_udp_write(AT91_UDP_IDR, ep->int_mask);
+               at91_udp_write(udc, AT91_UDP_IDR, ep->int_mask);
 }
 
 /*-------------------------------------------------------------------------*/
@@ -554,8 +541,8 @@ ok:
         * reset/init endpoint fifo.  NOTE:  leaves fifo_bank alone,
         * since endpoint resets don't reset hw pingpong state.
         */
-       at91_udp_write(AT91_UDP_RST_EP, ep->int_mask);
-       at91_udp_write(AT91_UDP_RST_EP, 0);
+       at91_udp_write(dev, AT91_UDP_RST_EP, ep->int_mask);
+       at91_udp_write(dev, AT91_UDP_RST_EP, 0);
 
        local_irq_restore(flags);
        return 0;
@@ -564,6 +551,7 @@ ok:
 static int at91_ep_disable (struct usb_ep * _ep)
 {
        struct at91_ep  *ep = container_of(_ep, struct at91_ep, ep);
+       struct at91_udc *udc = ep->udc;
        unsigned long   flags;
 
        if (ep == &ep->udc->ep[0])
@@ -579,8 +567,8 @@ static int at91_ep_disable (struct usb_ep * _ep)
 
        /* reset fifos and endpoint */
        if (ep->udc->clocked) {
-               at91_udp_write(AT91_UDP_RST_EP, ep->int_mask);
-               at91_udp_write(AT91_UDP_RST_EP, 0);
+               at91_udp_write(udc, AT91_UDP_RST_EP, ep->int_mask);
+               at91_udp_write(udc, AT91_UDP_RST_EP, 0);
                __raw_writel(0, ep->creg);
        }
 
@@ -695,10 +683,10 @@ static int at91_ep_queue(struct usb_ep *_ep,
                         * reconfigures the endpoints.
                         */
                        if (dev->wait_for_config_ack) {
-                               tmp = at91_udp_read(AT91_UDP_GLB_STAT);
+                               tmp = at91_udp_read(dev, AT91_UDP_GLB_STAT);
                                tmp ^= AT91_UDP_CONFG;
                                VDBG("toggle config\n");
-                               at91_udp_write(AT91_UDP_GLB_STAT, tmp);
+                               at91_udp_write(dev, AT91_UDP_GLB_STAT, tmp);
                        }
                        if (req->req.length == 0) {
 ep0_in_status:
@@ -727,7 +715,7 @@ ep0_in_status:
 
        if (req && !status) {
                list_add_tail (&req->queue, &ep->queue);
-               at91_udp_write(AT91_UDP_IER, ep->int_mask);
+               at91_udp_write(dev, AT91_UDP_IER, ep->int_mask);
        }
 done:
        local_irq_restore(flags);
@@ -758,6 +746,7 @@ static int at91_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
 static int at91_ep_set_halt(struct usb_ep *_ep, int value)
 {
        struct at91_ep  *ep = container_of(_ep, struct at91_ep, ep);
+       struct at91_udc *udc = ep->udc;
        u32 __iomem     *creg;
        u32             csr;
        unsigned long   flags;
@@ -785,8 +774,8 @@ static int at91_ep_set_halt(struct usb_ep *_ep, int value)
                        csr |= AT91_UDP_FORCESTALL;
                        VDBG("halt %s\n", ep->ep.name);
                } else {
-                       at91_udp_write(AT91_UDP_RST_EP, ep->int_mask);
-                       at91_udp_write(AT91_UDP_RST_EP, 0);
+                       at91_udp_write(udc, AT91_UDP_RST_EP, ep->int_mask);
+                       at91_udp_write(udc, AT91_UDP_RST_EP, 0);
                        csr &= ~AT91_UDP_FORCESTALL;
                }
                __raw_writel(csr, creg);
@@ -813,9 +802,11 @@ static struct usb_ep_ops at91_ep_ops = {
 
 static int at91_get_frame(struct usb_gadget *gadget)
 {
+       struct at91_udc *udc = to_udc(gadget);
+
        if (!to_udc(gadget)->clocked)
                return -EINVAL;
-       return at91_udp_read(AT91_UDP_FRM_NUM) & AT91_UDP_NUM;
+       return at91_udp_read(udc, AT91_UDP_FRM_NUM) & AT91_UDP_NUM;
 }
 
 static int at91_wakeup(struct usb_gadget *gadget)
@@ -833,11 +824,11 @@ static int at91_wakeup(struct usb_gadget *gadget)
 
        /* NOTE:  some "early versions" handle ESR differently ... */
 
-       glbstate = at91_udp_read(AT91_UDP_GLB_STAT);
+       glbstate = at91_udp_read(udc, AT91_UDP_GLB_STAT);
        if (!(glbstate & AT91_UDP_ESR))
                goto done;
        glbstate |= AT91_UDP_ESR;
-       at91_udp_write(AT91_UDP_GLB_STAT, glbstate);
+       at91_udp_write(udc, AT91_UDP_GLB_STAT, glbstate);
 
 done:
        local_irq_restore(flags);
@@ -861,6 +852,7 @@ static void udc_reinit(struct at91_udc *udc)
                ep->stopped = 0;
                ep->fifo_bank = 0;
                ep->ep.maxpacket = ep->maxpacket;
+               ep->creg = (void __iomem *) udc->udp_baseaddr + AT91_UDP_CSR(i);
                // initialiser une queue par endpoint
                INIT_LIST_HEAD(&ep->queue);
        }
@@ -915,14 +907,41 @@ static void pullup(struct at91_udc *udc, int is_on)
        if (!udc->enabled || !udc->vbus)
                is_on = 0;
        DBG("%sactive\n", is_on ? "" : "in");
+
        if (is_on) {
                clk_on(udc);
-               at91_udp_write(AT91_UDP_TXVC, 0);
-               at91_set_gpio_value(udc->board.pullup_pin, 1);
-       } else  {
+               at91_udp_write(udc, AT91_UDP_TXVC, 0);
+               if (cpu_is_at91rm9200())
+                       at91_set_gpio_value(udc->board.pullup_pin, 1);
+               else if (cpu_is_at91sam9260()) {
+                       u32     txvc = at91_udp_read(udc, AT91_UDP_TXVC);
+
+                       txvc |= AT91_UDP_TXVC_PUON;
+                       at91_udp_write(udc, AT91_UDP_TXVC, txvc);
+               } else if (cpu_is_at91sam9261()) {
+                       u32     usbpucr;
+
+                       usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
+                       usbpucr |= AT91_MATRIX_USBPUCR_PUON;
+                       at91_sys_write(AT91_MATRIX_USBPUCR, usbpucr);
+               }
+       } else {
                stop_activity(udc);
-               at91_udp_write(AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
-               at91_set_gpio_value(udc->board.pullup_pin, 0);
+               at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
+               if (cpu_is_at91rm9200())
+                       at91_set_gpio_value(udc->board.pullup_pin, 0);
+               else if (cpu_is_at91sam9260()) {
+                       u32     txvc = at91_udp_read(udc, AT91_UDP_TXVC);
+
+                       txvc &= ~AT91_UDP_TXVC_PUON;
+                       at91_udp_write(udc, AT91_UDP_TXVC, txvc);
+               } else if (cpu_is_at91sam9261()) {
+                       u32     usbpucr;
+
+                       usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
+                       usbpucr &= ~AT91_MATRIX_USBPUCR_PUON;
+                       at91_sys_write(AT91_MATRIX_USBPUCR, usbpucr);
+               }
                clk_off(udc);
        }
 }
@@ -936,7 +955,10 @@ static int at91_vbus_session(struct usb_gadget *gadget, int is_active)
        // VDBG("vbus %s\n", is_active ? "on" : "off");
        local_irq_save(flags);
        udc->vbus = (is_active != 0);
-       pullup(udc, is_active);
+       if (udc->driver)
+               pullup(udc, is_active);
+       else
+               pullup(udc, 0);
        local_irq_restore(flags);
        return 0;
 }
@@ -1086,7 +1108,7 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
 
        case ((USB_TYPE_STANDARD|USB_RECIP_DEVICE) << 8)
                        | USB_REQ_SET_CONFIGURATION:
-               tmp = at91_udp_read(AT91_UDP_GLB_STAT) & AT91_UDP_CONFG;
+               tmp = at91_udp_read(udc, AT91_UDP_GLB_STAT) & AT91_UDP_CONFG;
                if (pkt.r.wValue)
                        udc->wait_for_config_ack = (tmp == 0);
                else
@@ -1103,7 +1125,7 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
        case ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE) << 8)
                        | USB_REQ_GET_STATUS:
                tmp = (udc->selfpowered << USB_DEVICE_SELF_POWERED);
-               if (at91_udp_read(AT91_UDP_GLB_STAT) & AT91_UDP_ESR)
+               if (at91_udp_read(udc, AT91_UDP_GLB_STAT) & AT91_UDP_ESR)
                        tmp |= (1 << USB_DEVICE_REMOTE_WAKEUP);
                PACKET("get device status\n");
                __raw_writeb(tmp, dreg);
@@ -1114,17 +1136,17 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
                        | USB_REQ_SET_FEATURE:
                if (w_value != USB_DEVICE_REMOTE_WAKEUP)
                        goto stall;
-               tmp = at91_udp_read(AT91_UDP_GLB_STAT);
+               tmp = at91_udp_read(udc, AT91_UDP_GLB_STAT);
                tmp |= AT91_UDP_ESR;
-               at91_udp_write(AT91_UDP_GLB_STAT, tmp);
+               at91_udp_write(udc, AT91_UDP_GLB_STAT, tmp);
                goto succeed;
        case ((USB_TYPE_STANDARD|USB_RECIP_DEVICE) << 8)
                        | USB_REQ_CLEAR_FEATURE:
                if (w_value != USB_DEVICE_REMOTE_WAKEUP)
                        goto stall;
-               tmp = at91_udp_read(AT91_UDP_GLB_STAT);
+               tmp = at91_udp_read(udc, AT91_UDP_GLB_STAT);
                tmp &= ~AT91_UDP_ESR;
-               at91_udp_write(AT91_UDP_GLB_STAT, tmp);
+               at91_udp_write(udc, AT91_UDP_GLB_STAT, tmp);
                goto succeed;
 
        /*
@@ -1206,8 +1228,8 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
                } else if (ep->is_in)
                        goto stall;
 
-               at91_udp_write(AT91_UDP_RST_EP, ep->int_mask);
-               at91_udp_write(AT91_UDP_RST_EP, 0);
+               at91_udp_write(udc, AT91_UDP_RST_EP, ep->int_mask);
+               at91_udp_write(udc, AT91_UDP_RST_EP, 0);
                tmp = __raw_readl(ep->creg);
                tmp |= CLR_FX;
                tmp &= ~(SET_FX | AT91_UDP_FORCESTALL);
@@ -1222,7 +1244,10 @@ static void handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)
 #undef w_length
 
        /* pass request up to the gadget driver */
-       status = udc->driver->setup(&udc->gadget, &pkt.r);
+       if (udc->driver)
+               status = udc->driver->setup(&udc->gadget, &pkt.r);
+       else
+               status = -ENODEV;
        if (status < 0) {
 stall:
                VDBG("req %02x.%02x protocol STALL; stat %d\n",
@@ -1300,13 +1325,13 @@ static void handle_ep0(struct at91_udc *udc)
                        if (udc->wait_for_addr_ack) {
                                u32     tmp;
 
-                               at91_udp_write(AT91_UDP_FADDR,
+                               at91_udp_write(udc, AT91_UDP_FADDR,
                                                AT91_UDP_FEN | udc->addr);
-                               tmp = at91_udp_read(AT91_UDP_GLB_STAT);
+                               tmp = at91_udp_read(udc, AT91_UDP_GLB_STAT);
                                tmp &= ~AT91_UDP_FADDEN;
                                if (udc->addr)
                                        tmp |= AT91_UDP_FADDEN;
-                               at91_udp_write(AT91_UDP_GLB_STAT, tmp);
+                               at91_udp_write(udc, AT91_UDP_GLB_STAT, tmp);
 
                                udc->wait_for_addr_ack = 0;
                                VDBG("address %d\n", udc->addr);
@@ -1374,28 +1399,28 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc)
        while (rescans--) {
                u32 status;
 
-               status = at91_udp_read(AT91_UDP_ISR)
-                       & at91_udp_read(AT91_UDP_IMR);
+               status = at91_udp_read(udc, AT91_UDP_ISR)
+                       & at91_udp_read(udc, AT91_UDP_IMR);
                if (!status)
                        break;
 
                /* USB reset irq:  not maskable */
                if (status & AT91_UDP_ENDBUSRES) {
-                       at91_udp_write(AT91_UDP_IDR, ~MINIMUS_INTERRUPTUS);
-                       at91_udp_write(AT91_UDP_IER, MINIMUS_INTERRUPTUS);
+                       at91_udp_write(udc, AT91_UDP_IDR, ~MINIMUS_INTERRUPTUS);
+                       at91_udp_write(udc, AT91_UDP_IER, MINIMUS_INTERRUPTUS);
                        /* Atmel code clears this irq twice */
-                       at91_udp_write(AT91_UDP_ICR, AT91_UDP_ENDBUSRES);
-                       at91_udp_write(AT91_UDP_ICR, AT91_UDP_ENDBUSRES);
+                       at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_ENDBUSRES);
+                       at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_ENDBUSRES);
                        VDBG("end bus reset\n");
                        udc->addr = 0;
                        stop_activity(udc);
 
                        /* enable ep0 */
-                       at91_udp_write(AT91_UDP_CSR(0),
+                       at91_udp_write(udc, AT91_UDP_CSR(0),
                                        AT91_UDP_EPEDS | AT91_UDP_EPTYPE_CTRL);
                        udc->gadget.speed = USB_SPEED_FULL;
                        udc->suspended = 0;
-                       at91_udp_write(AT91_UDP_IER, AT91_UDP_EP(0));
+                       at91_udp_write(udc, AT91_UDP_IER, AT91_UDP_EP(0));
 
                        /*
                         * NOTE:  this driver keeps clocks off unless the
@@ -1406,9 +1431,9 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc)
 
                /* host initiated suspend (3+ms bus idle) */
                } else if (status & AT91_UDP_RXSUSP) {
-                       at91_udp_write(AT91_UDP_IDR, AT91_UDP_RXSUSP);
-                       at91_udp_write(AT91_UDP_IER, AT91_UDP_RXRSM);
-                       at91_udp_write(AT91_UDP_ICR, AT91_UDP_RXSUSP);
+                       at91_udp_write(udc, AT91_UDP_IDR, AT91_UDP_RXSUSP);
+                       at91_udp_write(udc, AT91_UDP_IER, AT91_UDP_RXRSM);
+                       at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_RXSUSP);
                        // VDBG("bus suspend\n");
                        if (udc->suspended)
                                continue;
@@ -1425,9 +1450,9 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc)
 
                /* host initiated resume */
                } else if (status & AT91_UDP_RXRSM) {
-                       at91_udp_write(AT91_UDP_IDR, AT91_UDP_RXRSM);
-                       at91_udp_write(AT91_UDP_IER, AT91_UDP_RXSUSP);
-                       at91_udp_write(AT91_UDP_ICR, AT91_UDP_RXRSM);
+                       at91_udp_write(udc, AT91_UDP_IDR, AT91_UDP_RXRSM);
+                       at91_udp_write(udc, AT91_UDP_IER, AT91_UDP_RXSUSP);
+                       at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_RXRSM);
                        // VDBG("bus resume\n");
                        if (!udc->suspended)
                                continue;
@@ -1485,8 +1510,6 @@ static struct at91_udc controller = {
                },
                .udc            = &controller,
                .maxpacket      = 8,
-               .creg           = (void __iomem *)(AT91_VA_BASE_UDP
-                                       + AT91_UDP_CSR(0)),
                .int_mask       = 1 << 0,
        },
        .ep[1] = {
@@ -1497,8 +1520,6 @@ static struct at91_udc controller = {
                .udc            = &controller,
                .is_pingpong    = 1,
                .maxpacket      = 64,
-               .creg           = (void __iomem *)(AT91_VA_BASE_UDP
-                                       + AT91_UDP_CSR(1)),
                .int_mask       = 1 << 1,
        },
        .ep[2] = {
@@ -1509,8 +1530,6 @@ static struct at91_udc controller = {
                .udc            = &controller,
                .is_pingpong    = 1,
                .maxpacket      = 64,
-               .creg           = (void __iomem *)(AT91_VA_BASE_UDP
-                                       + AT91_UDP_CSR(2)),
                .int_mask       = 1 << 2,
        },
        .ep[3] = {
@@ -1521,8 +1540,6 @@ static struct at91_udc controller = {
                },
                .udc            = &controller,
                .maxpacket      = 8,
-               .creg           = (void __iomem *)(AT91_VA_BASE_UDP
-                                       + AT91_UDP_CSR(3)),
                .int_mask       = 1 << 3,
        },
        .ep[4] = {
@@ -1533,8 +1550,6 @@ static struct at91_udc controller = {
                .udc            = &controller,
                .is_pingpong    = 1,
                .maxpacket      = 256,
-               .creg           = (void __iomem *)(AT91_VA_BASE_UDP
-                                       + AT91_UDP_CSR(4)),
                .int_mask       = 1 << 4,
        },
        .ep[5] = {
@@ -1545,8 +1560,6 @@ static struct at91_udc controller = {
                .udc            = &controller,
                .is_pingpong    = 1,
                .maxpacket      = 256,
-               .creg           = (void __iomem *)(AT91_VA_BASE_UDP
-                                       + AT91_UDP_CSR(5)),
                .int_mask       = 1 << 5,
        },
        /* ep6 and ep7 are also reserved (custom silicon might use them) */
@@ -1572,9 +1585,8 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
        int             retval;
 
        if (!driver
-                       || driver->speed != USB_SPEED_FULL
+                       || driver->speed < USB_SPEED_FULL
                        || !driver->bind
-                       || !driver->unbind
                        || !driver->setup) {
                DBG("bad parameter.\n");
                return -EINVAL;
@@ -1595,6 +1607,10 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
        if (retval) {
                DBG("driver->bind() returned %d\n", retval);
                udc->driver = NULL;
+               udc->gadget.dev.driver = NULL;
+               udc->gadget.dev.driver_data = NULL;
+               udc->enabled = 0;
+               udc->selfpowered = 0;
                return retval;
        }
 
@@ -1611,12 +1627,12 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
 {
        struct at91_udc *udc = &controller;
 
-       if (!driver || driver != udc->driver)
+       if (!driver || driver != udc->driver || !driver->unbind)
                return -EINVAL;
 
        local_irq_disable();
        udc->enabled = 0;
-       at91_udp_write(AT91_UDP_IDR, ~0);
+       at91_udp_write(udc, AT91_UDP_IDR, ~0);
        pullup(udc, 0);
        local_irq_enable();
 
@@ -1641,6 +1657,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
        struct device   *dev = &pdev->dev;
        struct at91_udc *udc;
        int             retval;
+       struct resource *res;
 
        if (!dev->platform_data) {
                /* small (so we copy it) but critical! */
@@ -1658,7 +1675,13 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       if (!request_mem_region(AT91RM9200_BASE_UDP, SZ_16K, driver_name)) {
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res)
+               return -ENXIO;
+
+       if (!request_mem_region(res->start,
+                       res->end - res->start + 1,
+                       driver_name)) {
                DBG("someone's using UDC memory\n");
                return -EBUSY;
        }
@@ -1668,15 +1691,23 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
        udc->gadget.dev.parent = dev;
        udc->board = *(struct at91_udc_data *) dev->platform_data;
        udc->pdev = pdev;
-       udc_reinit(udc);
        udc->enabled = 0;
 
+       udc->udp_baseaddr = ioremap(res->start, res->end - res->start + 1);
+       if (!udc->udp_baseaddr) {
+               release_mem_region(res->start, res->end - res->start + 1);
+               return -ENOMEM;
+       }
+
+       udc_reinit(udc);
+
        /* get interface and function clocks */
        udc->iclk = clk_get(dev, "udc_clk");
        udc->fclk = clk_get(dev, "udpck");
        if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk)) {
                DBG("clocks missing\n");
-               return -ENODEV;
+               retval = -ENODEV;
+               goto fail0;
        }
 
        retval = device_register(&udc->gadget.dev);
@@ -1685,8 +1716,10 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 
        /* don't do anything until we have both gadget driver and VBUS */
        clk_enable(udc->iclk);
-       at91_udp_write(AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
-       at91_udp_write(AT91_UDP_IDR, 0xffffffff);
+       at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
+       at91_udp_write(udc, AT91_UDP_IDR, 0xffffffff);
+       /* Clear all pending interrupts - UDP may be used by bootloader. */
+       at91_udp_write(udc, AT91_UDP_ICR, 0xffffffff);
        clk_disable(udc->iclk);
 
        /* request UDC and maybe VBUS irqs */
@@ -1698,6 +1731,11 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
                goto fail1;
        }
        if (udc->board.vbus_pin > 0) {
+               /*
+                * Get the initial state of VBUS - we cannot expect
+                * a pending interrupt.
+                */
+               udc->vbus = at91_get_gpio_value(udc->board.vbus_pin);
                if (request_irq(udc->board.vbus_pin, at91_vbus_irq,
                                IRQF_DISABLED, driver_name, udc)) {
                        DBG("request vbus irq %d failed\n",
@@ -1720,7 +1758,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 fail1:
        device_unregister(&udc->gadget.dev);
 fail0:
-       release_mem_region(AT91RM9200_BASE_UDP, SZ_16K);
+       release_mem_region(res->start, res->end - res->start + 1);
        DBG("%s probe failed, %d\n", driver_name, retval);
        return retval;
 }
@@ -1728,13 +1766,14 @@ fail0:
 static int __devexit at91udc_remove(struct platform_device *pdev)
 {
        struct at91_udc *udc = platform_get_drvdata(pdev);
+       struct resource *res;
 
        DBG("remove\n");
 
-       pullup(udc, 0);
+       if (udc->driver)
+               return -EBUSY;
 
-       if (udc->driver != 0)
-               usb_gadget_unregister_driver(udc->driver);
+       pullup(udc, 0);
 
        device_init_wakeup(&pdev->dev, 0);
        remove_debug_file(udc);
@@ -1742,7 +1781,10 @@ static int __devexit at91udc_remove(struct platform_device *pdev)
                free_irq(udc->board.vbus_pin, udc);
        free_irq(udc->udp_irq, udc);
        device_unregister(&udc->gadget.dev);
-       release_mem_region(AT91RM9200_BASE_UDP, SZ_16K);
+
+       iounmap(udc->udp_baseaddr);
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       release_mem_region(res->start, res->end - res->start + 1);
 
        clk_put(udc->iclk);
        clk_put(udc->fclk);
index 882af42e86cc413f2d74d28e4a8b986ff4868f4c..677089baa59dd8bcacfc71fa801a18e91e42fda1 100644 (file)
 #define     AT91_UDP_EP(n)     (1 << (n))      /* Endpoint Interrupt Status */
 #define     AT91_UDP_RXSUSP    (1 <<  8)       /* USB Suspend Interrupt Status */
 #define     AT91_UDP_RXRSM     (1 <<  9)       /* USB Resume Interrupt Status */
-#define     AT91_UDP_EXTRSM    (1 << 10)       /* External Resume Interrupt Status */
+#define     AT91_UDP_EXTRSM    (1 << 10)       /* External Resume Interrupt Status [AT91RM9200 only] */
 #define     AT91_UDP_SOFINT    (1 << 11)       /* Start of Frame Interrupt Status */
 #define     AT91_UDP_ENDBUSRES (1 << 12)       /* End of Bus Reset Interrpt Status */
-#define     AT91_UDP_WAKEUP    (1 << 13)       /* USB Wakeup Interrupt Status */
+#define     AT91_UDP_WAKEUP    (1 << 13)       /* USB Wakeup Interrupt Status [AT91RM9200 only] */
 
 #define AT91_UDP_ICR           0x20            /* Interrupt Clear Register */
 #define AT91_UDP_RST_EP                0x28            /* Reset Endpoint Register */
@@ -84,7 +84,7 @@
 
 #define AT91_UDP_TXVC          0x74            /* Transceiver Control Register */
 #define     AT91_UDP_TXVC_TXVDIS (1 << 8)      /* Transceiver Disable */
-
+#define     AT91_UDP_TXVC_PUON   (1 << 9)      /* PullUp On [AT91SAM9260 only] */
 
 /*-------------------------------------------------------------------------*/
 
@@ -141,6 +141,7 @@ struct at91_udc {
        struct clk                      *iclk, *fclk;
        struct platform_device          *pdev;
        struct proc_dir_entry           *pde;
+       void __iomem                    *udp_baseaddr;
        int                             udp_irq;
 };
 
index f1f32d7be5f929d022660952c18d8e11b202e4dd..3c2bc075ef4f31260ddadaa659e7ea840b2e0d1c 100644 (file)
@@ -779,7 +779,7 @@ usb_gadget_register_driver (struct usb_gadget_driver *driver)
                return -EINVAL;
        if (dum->driver)
                return -EBUSY;
-       if (!driver->bind || !driver->unbind || !driver->setup
+       if (!driver->bind || !driver->setup
                        || driver->speed == USB_SPEED_UNKNOWN)
                return -EINVAL;
 
@@ -837,7 +837,8 @@ usb_gadget_register_driver (struct usb_gadget_driver *driver)
 err_bind_driver:
        driver_unregister (&driver->driver);
 err_register:
-       driver->unbind (&dum->gadget);
+       if (driver->unbind)
+               driver->unbind (&dum->gadget);
        spin_lock_irq (&dum->lock);
        dum->pullup = 0;
        set_link_state (dum);
@@ -857,7 +858,7 @@ usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
 
        if (!dum)
                return -ENODEV;
-       if (!driver || driver != dum->driver)
+       if (!driver || driver != dum->driver || !driver->unbind)
                return -EINVAL;
 
        dev_dbg (udc_dev(dum), "unregister gadget driver '%s'\n",
index a265e262a2eefd4239513613962a54d6bbee64d3..72f2ae96fbf342de37eb1687bc38dab8378fd08c 100644 (file)
@@ -4100,7 +4100,7 @@ static struct usb_gadget_driver           fsg_driver = {
 #endif
        .function       = (char *) longname,
        .bind           = fsg_bind,
-       .unbind         = __exit_p(fsg_unbind),
+       .unbind         = fsg_unbind,
        .disconnect     = fsg_disconnect,
        .setup          = fsg_setup,
        .suspend        = fsg_suspend,
index 31351826f2baddc7c18d17276016745f3d5c2491..f1a679656c967f6cb4cfb40040f97410fb71a33a 100644 (file)
@@ -123,7 +123,7 @@ struct gmidi_device {
        struct usb_request      *req;           /* for control responses */
        u8                      config;
        struct usb_ep           *in_ep, *out_ep;
-       struct snd_card         *card;
+       struct snd_card         *card;
        struct snd_rawmidi      *rmidi;
        struct snd_rawmidi_substream *in_substream;
        struct snd_rawmidi_substream *out_substream;
@@ -490,7 +490,7 @@ static void gmidi_complete(struct usb_ep *ep, struct usb_request *req)
        int status = req->status;
 
        switch (status) {
-       case 0:                         /* normal completion */
+       case 0:                         /* normal completion */
                if (ep == dev->out_ep) {
                        /* we received stuff.
                           req is queued again, below */
@@ -505,7 +505,7 @@ static void gmidi_complete(struct usb_ep *ep, struct usb_request *req)
                break;
 
        /* this endpoint is normally active while we're configured */
-       case -ECONNABORTED:             /* hardware forced ep reset */
+       case -ECONNABORTED:             /* hardware forced ep reset */
        case -ECONNRESET:               /* request dequeued */
        case -ESHUTDOWN:                /* disconnect from host */
                VDBG(dev, "%s gone (%d), %d/%d\n", ep->name, status,
@@ -656,7 +656,7 @@ gmidi_set_config(struct gmidi_device *dev, unsigned number, gfp_t gfp_flags)
                case USB_SPEED_LOW:     speed = "low"; break;
                case USB_SPEED_FULL:    speed = "full"; break;
                case USB_SPEED_HIGH:    speed = "high"; break;
-               default:                speed = "?"; break;
+               default:                speed = "?"; break;
                }
 
                dev->config = number;
@@ -1308,7 +1308,7 @@ static struct usb_gadget_driver gmidi_driver = {
        .speed          = USB_SPEED_FULL,
        .function       = (char *)longname,
        .bind           = gmidi_bind,
-       .unbind         = __exit_p(gmidi_unbind),
+       .unbind         = gmidi_unbind,
 
        .setup          = gmidi_setup,
        .disconnect     = gmidi_disconnect,
@@ -1316,7 +1316,7 @@ static struct usb_gadget_driver gmidi_driver = {
        .suspend        = gmidi_suspend,
        .resume         = gmidi_resume,
 
-       .driver         = {
+       .driver         = {
                .name           = (char *)shortname,
                .owner          = THIS_MODULE,
        },
index 805a9826842d51a1c9a05443d4208fa62e477cb1..d0ef1d6b3fac0c046bfdce5a8f9e878022c15aa3 100644 (file)
@@ -1432,7 +1432,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
        if (!driver
                        || driver->speed != USB_SPEED_FULL
                        || !driver->bind
-                       || !driver->unbind
                        || !driver->disconnect
                        || !driver->setup)
                return -EINVAL;
@@ -1495,7 +1494,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 
        if (!dev)
                return -ENODEV;
-       if (!driver || driver != dev->driver)
+       if (!driver || driver != dev->driver || !driver->unbind)
                return -EINVAL;
 
        spin_lock_irqsave(&dev->lock, flags);
@@ -1808,13 +1807,8 @@ static void goku_remove(struct pci_dev *pdev)
        struct goku_udc         *dev = pci_get_drvdata(pdev);
 
        DBG(dev, "%s\n", __FUNCTION__);
-       /* start with the driver above us */
-       if (dev->driver) {
-               /* should have been done already by driver model core */
-               WARN(dev, "pci remove, driver '%s' is still registered\n",
-                               dev->driver->driver.name);
-               usb_gadget_unregister_driver(dev->driver);
-       }
+
+       BUG_ON(dev->driver);
 
 #ifdef CONFIG_USB_GADGET_DEBUG_FILES
        remove_proc_entry(proc_node_name, NULL);
index 4a991564a03ee5758515f99e01683a64116ddeeb..a0a73c08a34467730f007ed6bcf27bf4d8e7ae78 100644 (file)
@@ -422,9 +422,10 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
        DEBUG("%s: %s\n", __FUNCTION__, driver->driver.name);
 
        if (!driver
-           || driver->speed != USB_SPEED_FULL
-           || !driver->bind
-           || !driver->unbind || !driver->disconnect || !driver->setup)
+                       || driver->speed != USB_SPEED_FULL
+                       || !driver->bind
+                       || !driver->disconnect
+                       || !driver->setup)
                return -EINVAL;
        if (!dev)
                return -ENODEV;
@@ -471,7 +472,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 
        if (!dev)
                return -ENODEV;
-       if (!driver || driver != dev->driver)
+       if (!driver || driver != dev->driver || !driver->unbind)
                return -EINVAL;
 
        spin_lock_irqsave(&dev->lock, flags);
@@ -2125,9 +2126,11 @@ static int lh7a40x_udc_remove(struct platform_device *pdev)
 
        DEBUG("%s: %p\n", __FUNCTION__, pdev);
 
+       if (dev->driver)
+               return -EBUSY;
+
        udc_disable(dev);
        remove_proc_files();
-       usb_gadget_unregister_driver(dev->driver);
 
        free_irq(IRQ_USBINTR, dev);
 
index 3024c679e38e9fcec4e5ada07f8bc00bd799f045..569eb8ccf232bd2bdfe1fcff82d609f9e356d496 100644 (file)
@@ -2020,7 +2020,6 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
        if (!driver
                        || driver->speed != USB_SPEED_HIGH
                        || !driver->bind
-                       || !driver->unbind
                        || !driver->setup)
                return -EINVAL;
        if (!dev)
@@ -2107,7 +2106,7 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
 
        if (!dev)
                return -ENODEV;
-       if (!driver || driver != dev->driver)
+       if (!driver || driver != dev->driver || !driver->unbind)
                return -EINVAL;
 
        spin_lock_irqsave (&dev->lock, flags);
@@ -2803,13 +2802,7 @@ static void net2280_remove (struct pci_dev *pdev)
 {
        struct net2280          *dev = pci_get_drvdata (pdev);
 
-       /* start with the driver above us */
-       if (dev->driver) {
-               /* should have been done already by driver model core */
-               WARN (dev, "pci remove, driver '%s' is still registered\n",
-                               dev->driver->driver.name);
-               usb_gadget_unregister_driver (dev->driver);
-       }
+       BUG_ON(dev->driver);
 
        /* then clean up the resources we allocated during probe() */
        net2280_led_shutdown (dev);
index 030d87c28c2f614f4874c6c1867638fe410b5e87..15d77c30793093e18014c9fafd63daa6376e0095 100644 (file)
@@ -2043,7 +2043,6 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
                        // FIXME if otg, check:  driver->is_otg
                        || driver->speed < USB_SPEED_FULL
                        || !driver->bind
-                       || !driver->unbind
                        || !driver->setup)
                return -EINVAL;
 
@@ -2087,9 +2086,11 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
                status = otg_set_peripheral(udc->transceiver, &udc->gadget);
                if (status < 0) {
                        ERR("can't bind to transceiver\n");
-                       driver->unbind (&udc->gadget);
-                       udc->gadget.dev.driver = NULL;
-                       udc->driver = NULL;
+                       if (driver->unbind) {
+                               driver->unbind (&udc->gadget);
+                               udc->gadget.dev.driver = NULL;
+                               udc->driver = NULL;
+                       }
                        goto done;
                }
        } else {
@@ -2117,7 +2118,7 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
 
        if (!udc)
                return -ENODEV;
-       if (!driver || driver != udc->driver)
+       if (!driver || driver != udc->driver || !driver->unbind)
                return -EINVAL;
 
        if (machine_is_omap_innovator() || machine_is_omap_osk())
@@ -2870,6 +2871,8 @@ static int __exit omap_udc_remove(struct platform_device *pdev)
 
        if (!udc)
                return -ENODEV;
+       if (udc->driver)
+               return -EBUSY;
 
        udc->done = &done;
 
index 1ed506e959853f67c879b58a267787d60dfafb3e..b78de96946652128f326aae340bcdb991cd39d82 100644 (file)
@@ -1623,7 +1623,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
        if (!driver
                        || driver->speed < USB_SPEED_FULL
                        || !driver->bind
-                       || !driver->unbind
                        || !driver->disconnect
                        || !driver->setup)
                return -EINVAL;
@@ -1694,7 +1693,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 
        if (!dev)
                return -ENODEV;
-       if (!driver || driver != dev->driver)
+       if (!driver || driver != dev->driver || !driver->unbind)
                return -EINVAL;
 
        local_irq_disable();
@@ -2638,9 +2637,11 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
 {
        struct pxa2xx_udc *dev = platform_get_drvdata(pdev);
 
+       if (dev->driver)
+               return -EBUSY;
+
        udc_disable(dev);
        remove_proc_files();
-       usb_gadget_unregister_driver(dev->driver);
 
        if (dev->got_irq) {
                free_irq(IRQ_USB, dev);
index 2d12bf9f19d64efecc95b991c94697dc921f7295..f8a3ec64635d503279f0d18d9ec97f8743665ca9 100644 (file)
@@ -296,7 +296,7 @@ static struct usb_gadget_driver gs_gadget_driver = {
 #endif /* CONFIG_USB_GADGET_DUALSPEED */
        .function =             GS_LONG_NAME,
        .bind =                 gs_bind,
-       .unbind =               __exit_p(gs_unbind),
+       .unbind =               gs_unbind,
        .setup =                gs_setup,
        .disconnect =           gs_disconnect,
        .driver = {
index b466581beb4a777499e4ae1e5934471368cea3bd..cc405512fa1c0960ea19f1072bc8768f0889ca1c 100644 (file)
@@ -187,7 +187,6 @@ ohci_at91_start (struct usb_hcd *hcd)
 {
        struct at91_usbh_data   *board = hcd->self.controller->platform_data;
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
-       struct usb_device       *root = hcd->self.root_hub;
        int                     ret;
 
        if ((ret = ohci_init(ohci)) < 0)
@@ -221,7 +220,7 @@ static const struct hc_driver ohci_at91_hc_driver = {
         */
        .start =                ohci_at91_start,
        .stop =                 ohci_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
index 24e23c5783d85da4d5f05d01eec90d7752fed83d..e70b2430e2a9f610777ed415c6a8bcb91b6585f9 100644 (file)
@@ -269,7 +269,7 @@ static const struct hc_driver ohci_au1xxx_hc_driver = {
         */
        .start =                ohci_au1xxx_start,
        .stop =                 ohci_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -336,7 +336,7 @@ static int ohci_hcd_au1xxx_drv_resume(struct platform_device *dev)
 static struct platform_driver ohci_hcd_au1xxx_driver = {
        .probe          = ohci_hcd_au1xxx_drv_probe,
        .remove         = ohci_hcd_au1xxx_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
        /*.suspend      = ohci_hcd_au1xxx_drv_suspend, */
        /*.resume       = ohci_hcd_au1xxx_drv_resume, */
        .driver         = {
index 0f47a57dac28578a25e745c343a589796f8838cf..273d5ddb72be27ce794c59c3f742409ebf3284b8 100644 (file)
@@ -16,7 +16,7 @@
        case PIPE_CONTROL:      temp = "ctrl"; break; \
        case PIPE_BULK:         temp = "bulk"; break; \
        case PIPE_INTERRUPT:    temp = "intr"; break; \
-       default:                temp = "isoc"; break; \
+       default:                temp = "isoc"; break; \
        }; temp;})
 #define pipestring(pipe) edstring(usb_pipetype(pipe))
 
@@ -205,13 +205,13 @@ ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size)
                (temp & RH_PS_PSSC) ? " PSSC" : "", \
                (temp & RH_PS_PESC) ? " PESC" : "", \
                (temp & RH_PS_CSC) ? " CSC" : "", \
-               \
+               \
                (temp & RH_PS_LSDA) ? " LSDA" : "", \
                (temp & RH_PS_PPS) ? " PPS" : "", \
                (temp & RH_PS_PRS) ? " PRS" : "", \
                (temp & RH_PS_POCI) ? " POCI" : "", \
                (temp & RH_PS_PSS) ? " PSS" : "", \
-               \
+               \
                (temp & RH_PS_PES) ? " PES" : "", \
                (temp & RH_PS_CCS) ? " CCS" : "" \
                );
@@ -563,7 +563,7 @@ show_periodic (struct class_device *class_dev, char *buf)
                                        (info & ED_SKIP) ? " K" : "",
                                        (ed->hwHeadP &
                                                cpu_to_hc32(ohci, ED_H)) ?
-                                                       " H" : "");
+                                                       " H" : "");
                                size -= temp;
                                next += temp;
 
index 1bf5e7a4e73551749803a85aed745e0b47898763..43ae696b2ec28f1f872271f1cd304485dc833858 100644 (file)
@@ -204,7 +204,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev)
 static struct platform_driver ohci_hcd_ep93xx_driver = {
        .probe          = ohci_hcd_ep93xx_drv_probe,
        .remove         = ohci_hcd_ep93xx_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
 #ifdef CONFIG_PM
        .suspend        = ohci_hcd_ep93xx_drv_suspend,
        .resume         = ohci_hcd_ep93xx_drv_resume,
index b28a9b602066e03afeba49bfeb7dc8dfc8043392..c1c1d871aba4b630067c90c8fa04c86bf3377c84 100644 (file)
@@ -3,77 +3,21 @@
  *
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
- * 
+ *
  * [ Initialisation is based on Linus'  ]
  * [ uhci code and gregs ohci fragments ]
  * [ (C) Copyright 1999 Linus Torvalds  ]
  * [ (C) Copyright 1999 Gregory P. Smith]
- * 
- * 
+ *
+ *
  * OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller
  * interfaces (though some non-x86 Intel chips use it).  It supports
  * smarter hardware than UHCI.  A download link for the spec available
  * through the http://www.usb.org website.
  *
- * History:
- * 
- * 2004/03/24 LH7A404 support (Durgesh Pattamatta & Marc Singer)
- * 2004/02/04 use generic dma_* functions instead of pci_* (dsaxena@plexity.net)
- * 2003/02/24 show registers in sysfs (Kevin Brosius)
- *
- * 2002/09/03 get rid of ed hashtables, rework periodic scheduling and
- *     bandwidth accounting; if debugging, show schedules in driverfs
- * 2002/07/19 fixes to management of ED and schedule state.
- * 2002/06/09 SA-1111 support (Christopher Hoover)
- * 2002/06/01 remember frame when HC won't see EDs any more; use that info
- *     to fix urb unlink races caused by interrupt latency assumptions;
- *     minor ED field and function naming updates
- * 2002/01/18 package as a patch for 2.5.3; this should match the
- *     2.4.17 kernel modulo some bugs being fixed.
- *
- * 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes
- *     from post-2.4.5 patches.
- * 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning
- * 2001/09/07 match PCI PM changes, errnos from Linus' tree
- * 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify;
- *     pbook pci quirks gone (please fix pbook pci sw!) (db)
- *
- * 2001/04/08 Identify version on module load (gb)
- * 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam);
-       pci_map_single (db)
- * 2001/03/21 td and dev/ed allocation uses new pci_pool API (db)
- * 2001/03/07 hcca allocation uses pci_alloc_consistent (Steve Longerbeam)
- *
- * 2000/09/26 fixed races in removing the private portion of the urb
- * 2000/09/07 disable bulk and control lists when unlinking the last
- *     endpoint descriptor in order to avoid unrecoverable errors on
- *     the Lucent chips. (rwc@sgi)
- * 2000/08/29 use bandwidth claiming hooks (thanks Randy!), fix some
- *     urb unlink probs, indentation fixes
- * 2000/08/11 various oops fixes mostly affecting iso and cleanup from
- *     device unplugs.
- * 2000/06/28 use PCI hotplug framework, for better power management
- *     and for Cardbus support (David Brownell)
- * 2000/earlier:  fixes for NEC/Lucent chips; suspend/resume handling
- *     when the controller loses power; handle UE; cleanup; ...
- *
- * v5.2 1999/12/07 URB 3rd preview, 
- * v5.1 1999/11/30 URB 2nd preview, cpia, (usb-scsi)
- * v5.0 1999/11/22 URB Technical preview, Paul Mackerras powerbook susp/resume 
- *     i386: HUB, Keyboard, Mouse, Printer 
- *
- * v4.3 1999/10/27 multiple HCs, bulk_request
- * v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes
- * v4.1 1999/08/27 Randy Dunlap's - ISO API first impl.
- * v4.0 1999/08/18 
- * v3.0 1999/06/25 
- * v2.1 1999/05/09  code clean up
- * v2.0 1999/05/04 
- * v1.0 1999/04/27 initial release
- *
  * This file is licenced under the GPL.
  */
+
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/pci.h>
@@ -89,7 +33,7 @@
 #include <linux/list.h>
 #include <linux/usb.h>
 #include <linux/usb/otg.h>
-#include <linux/dma-mapping.h> 
+#include <linux/dma-mapping.h>
 #include <linux/dmapool.h>
 #include <linux/reboot.h>
 
@@ -183,11 +127,11 @@ static int ohci_urb_enqueue (
        int             i, size = 0;
        unsigned long   flags;
        int             retval = 0;
-       
+
 #ifdef OHCI_VERBOSE_DEBUG
        urb_print (urb, "SUB", usb_pipein (pipe));
 #endif
-       
+
        /* every endpoint has a ed, locate and maybe (re)initialize it */
        if (! (ed = ed_get (ohci, ep, urb->dev, pipe, urb->interval)))
                return -ENOMEM;
@@ -232,7 +176,7 @@ static int ohci_urb_enqueue (
        memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *));
        INIT_LIST_HEAD (&urb_priv->pending);
        urb_priv->length = size;
-       urb_priv->ed = ed;      
+       urb_priv->ed = ed;
 
        /* allocate the TDs (deferring hash chain updates) */
        for (i = 0; i < size; i++) {
@@ -242,7 +186,7 @@ static int ohci_urb_enqueue (
                        urb_free_priv (ohci, urb_priv);
                        return -ENOMEM;
                }
-       }       
+       }
 
        spin_lock_irqsave (&ohci->lock, flags);
 
@@ -313,13 +257,13 @@ static int ohci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
 {
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
        unsigned long           flags;
-       
+
 #ifdef OHCI_VERBOSE_DEBUG
        urb_print (urb, "UNLINK", 1);
-#endif           
+#endif
 
        spin_lock_irqsave (&ohci->lock, flags);
-       if (HC_IS_RUNNING(hcd->state)) {
+       if (HC_IS_RUNNING(hcd->state)) {
                urb_priv_t  *urb_priv;
 
                /* Unless an IRQ completed the unlink while it was being
@@ -512,11 +456,11 @@ static int ohci_init (struct ohci_hcd *ohci)
 
 /* Start an OHCI controller, set the BUS operational
  * resets USB and controller
- * enable interrupts 
+ * enable interrupts
  */
 static int ohci_run (struct ohci_hcd *ohci)
 {
-       u32                     mask, temp;
+       u32                     mask, temp;
        int                     first = ohci->fminterval == 0;
        struct usb_hcd          *hcd = ohci_to_hcd(ohci);
 
@@ -534,7 +478,7 @@ static int ohci_run (struct ohci_hcd *ohci)
                /* also: power/overcurrent flags in roothub.a */
        }
 
-       /* Reset USB nearly "by the book".  RemoteWakeupConnected was
+       /* Reset USB nearly "by the book".  RemoteWakeupConnected was
         * saved if boot firmware (BIOS/SMM/...) told us it's connected,
         * or if bus glue did the same (e.g. for PCI add-in cards with
         * PCI PM support).
@@ -765,9 +709,9 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
                dl_done_list (ohci);
                spin_unlock (&ohci->lock);
                if (HC_IS_RUNNING(hcd->state))
-                       ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable); 
+                       ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable);
        }
-  
+
        /* could track INTR_SO to reduce available PCI/... bandwidth */
 
        /* handle any pending URB/ED unlinks, leaving INTR_SF enabled
@@ -778,12 +722,12 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
                finish_unlinks (ohci, ohci_frame_no(ohci));
        if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list
                        && HC_IS_RUNNING(hcd->state))
-               ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable);   
+               ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable);
        spin_unlock (&ohci->lock);
 
        if (HC_IS_RUNNING(hcd->state)) {
                ohci_writel (ohci, ints, &regs->intrstatus);
-               ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);   
+               ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);
                // flush those writes
                (void) ohci_readl (ohci, &ohci->regs->control);
        }
@@ -794,7 +738,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
 /*-------------------------------------------------------------------------*/
 
 static void ohci_stop (struct usb_hcd *hcd)
-{      
+{
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
 
        ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n",
@@ -812,8 +756,8 @@ static void ohci_stop (struct usb_hcd *hcd)
        remove_debug_files (ohci);
        ohci_mem_cleanup (ohci);
        if (ohci->hcca) {
-               dma_free_coherent (hcd->self.controller, 
-                               sizeof *ohci->hcca, 
+               dma_free_coherent (hcd->self.controller,
+                               sizeof *ohci->hcca,
                                ohci->hcca, ohci->hcca_dma);
                ohci->hcca = NULL;
                ohci->hcca_dma = 0;
@@ -836,7 +780,7 @@ static int ohci_restart (struct ohci_hcd *ohci)
         * recycle any "live" eds/tds (and urbs) right away.
         * later, khubd disconnect processing will recycle the other state,
         * (either as disconnect/reconnect, or maybe someday as a reset).
-        */ 
+        */
        spin_lock_irq(&ohci->lock);
        disable (ohci);
        usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub);
@@ -875,11 +819,11 @@ static int ohci_restart (struct ohci_hcd *ohci)
        /* empty the interrupt branches */
        for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0;
        for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0;
-       
+
        /* no EDs to remove */
        ohci->ed_rm_list = NULL;
 
-       /* empty control and bulk lists */       
+       /* empty control and bulk lists */
        ohci->ed_controltail = NULL;
        ohci->ed_bulktail    = NULL;
 
@@ -941,6 +885,10 @@ MODULE_LICENSE ("GPL");
 #include "ohci-au1xxx.c"
 #endif
 
+#ifdef CONFIG_PNX8550
+#include "ohci-pnx8550.c"
+#endif
+
 #ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
 #include "ohci-ppc-soc.c"
 #endif
index 2441642cb7b4ddbb30de649b370a05db25783f90..216c9c9d4d6d58b07b0ed39d86ce77e080367740 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * OHCI HCD (Host Controller Driver) for USB.
- * 
+ *
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
- * 
+ *
  * This file is licenced under GPL
  */
 
                (temp & RH_PS_PSSC) ? " PSSC" : "", \
                (temp & RH_PS_PESC) ? " PESC" : "", \
                (temp & RH_PS_CSC) ? " CSC" : "", \
-               \
+               \
                (temp & RH_PS_LSDA) ? " LSDA" : "", \
                (temp & RH_PS_PPS) ? " PPS" : "", \
                (temp & RH_PS_PRS) ? " PRS" : "", \
                (temp & RH_PS_POCI) ? " POCI" : "", \
                (temp & RH_PS_PSS) ? " PSS" : "", \
-               \
+               \
                (temp & RH_PS_PES) ? " PES" : "", \
                (temp & RH_PS_CCS) ? " CCS" : "" \
                );
@@ -484,7 +484,7 @@ ohci_hub_descriptor (
        temp = 0;
        if (rh & RH_A_NPS)              /* no power switching? */
            temp |= 0x0002;
-       if (rh & RH_A_PSM)              /* per-port power switching? */
+       if (rh & RH_A_PSM)              /* per-port power switching? */
            temp |= 0x0001;
        if (rh & RH_A_NOCP)             /* no overcurrent reporting? */
            temp |= 0x0010;
@@ -555,7 +555,7 @@ static void start_hnp(struct ohci_hcd *ohci);
 #define tick_before(t1,t2) ((s16)(((s16)(t1))-((s16)(t2))) < 0)
 
 /* called from some task, normally khubd */
-static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
+static inline int root_port_reset (struct ohci_hcd *ohci, unsigned port)
 {
        __hc32 __iomem *portstat = &ohci->regs->roothub.portstatus [port];
        u32     temp;
@@ -570,10 +570,13 @@ static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
                /* spin until any current reset finishes */
                for (;;) {
                        temp = ohci_readl (ohci, portstat);
+                       /* handle e.g. CardBus eject */
+                       if (temp == ~(u32)0)
+                               return -ESHUTDOWN;
                        if (!(temp & RH_PS_PRS))
                                break;
                        udelay (500);
-               } 
+               }
 
                if (!(temp & RH_PS_CCS))
                        break;
@@ -586,6 +589,8 @@ static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
                now = ohci_readl(ohci, &ohci->regs->fmnumber);
        } while (tick_before(now, reset_done));
        /* caller synchronizes using PRSC */
+
+       return 0;
 }
 
 static int ohci_hub_control (
@@ -702,7 +707,7 @@ static int ohci_hub_control (
                                &ohci->regs->roothub.portstatus [wIndex]);
                        break;
                case USB_PORT_FEAT_RESET:
-                       root_port_reset (ohci, wIndex);
+                       retval = root_port_reset (ohci, wIndex);
                        break;
                default:
                        goto error;
index e121d97ed91caf7e3a7d3c3d9616f9baa5a19093..e9807cf73a2fac93b53a5608a906c763b8663e33 100644 (file)
@@ -38,7 +38,7 @@ static void lh7a404_start_hc(struct platform_device *dev)
        CSC_PWRCNT |= CSC_PWRCNT_USBH_EN; /* Enable clock */
        udelay(1000);
        USBH_CMDSTATUS = OHCI_HCR;
-       
+
        printk(KERN_DEBUG __FILE__
                   ": Clock to USB host has been enabled \n");
 }
@@ -89,7 +89,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
                retval = -EBUSY;
                goto err1;
        }
-       
+
        hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
        if (!hcd->regs) {
                pr_debug("ioremap failed");
@@ -174,7 +174,7 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
         */
        .start =                ohci_lh7a404_start,
        .stop =                 ohci_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -242,7 +242,7 @@ static int ohci_hcd_lh7a404_drv_resume(struct platform_device *dev)
 static struct platform_driver ohci_hcd_lh7a404_driver = {
        .probe          = ohci_hcd_lh7a404_drv_probe,
        .remove         = ohci_hcd_lh7a404_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
        /*.suspend      = ohci_hcd_lh7a404_drv_suspend, */
        /*.resume       = ohci_hcd_lh7a404_drv_resume, */
        .driver         = {
index d976614eebd3b33055bf8b2dd7f327187c55f43b..2f20d3dc895b8b4a959459573f4089e2014f27f8 100644 (file)
@@ -1,24 +1,24 @@
 /*
  * OHCI HCD (Host Controller Driver) for USB.
- * 
+ *
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * 
+ *
  * This file is licenced under the GPL.
  */
 
 /*-------------------------------------------------------------------------*/
 
 /*
- * There's basically three types of memory:
+ * OHCI deals with three types of memory:
  *     - data used only by the HCD ... kmalloc is fine
  *     - async and periodic schedules, shared by HC and HCD ... these
  *       need to use dma_pool or dma_alloc_coherent
  *     - driver buffers, read/written by HC ... the hcd glue or the
  *       device driver provides us with dma addresses
  *
- * There's also PCI "register" data, which is memory mapped.
- * No memory seen by this driver is pagable.
+ * There's also "register" data, which is memory mapped.
+ * No memory seen by this driver (or any HCD) may be paged out.
  */
 
 /*-------------------------------------------------------------------------*/
index 9c02177de50a85a15836301d87993c31e5b41438..27be1f9368853925da47e2b64cd18fb3ec59088e 100644 (file)
@@ -447,7 +447,7 @@ static const struct hc_driver ohci_omap_hc_driver = {
        .reset =                ohci_omap_init,
        .start =                ohci_omap_start,
        .stop =                 ohci_omap_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -533,7 +533,7 @@ static int ohci_omap_resume(struct platform_device *dev)
 static struct platform_driver ohci_hcd_omap_driver = {
        .probe          = ohci_hcd_omap_drv_probe,
        .remove         = ohci_hcd_omap_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
 #ifdef CONFIG_PM
        .suspend        = ohci_omap_suspend,
        .resume         = ohci_omap_resume,
index 874418552789154ee73a72064e6265c299d1edbe..596e0b41e606d9615720a9b1151ce9cf15634a8a 100644 (file)
@@ -3,17 +3,17 @@
  *
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * 
+ *
  * [ Initialisation is based on Linus'  ]
  * [ uhci code and gregs ohci fragments ]
  * [ (C) Copyright 1999 Linus Torvalds  ]
  * [ (C) Copyright 1999 Gregory P. Smith]
- * 
+ *
  * PCI Bus Glue
  *
  * This file is licenced under the GPL.
  */
+
 #ifndef CONFIG_PCI
 #error "This file is PCI bus glue.  CONFIG_PCI must be defined."
 #endif
@@ -83,7 +83,7 @@ ohci_pci_start (struct usb_hcd *hcd)
                        pci_dev_put(b);
                }
 
-               /* Check for Compaq's ZFMicro chipset, which needs short 
+               /* Check for Compaq's ZFMicro chipset, which needs short
                 * delays before control or bulk queues get re-activated
                 * in finish_unlinks()
                 */
@@ -238,8 +238,8 @@ static struct pci_driver ohci_pci_driver = {
        .shutdown =     usb_hcd_pci_shutdown,
 };
 
-static int __init ohci_hcd_pci_init (void) 
+
+static int __init ohci_hcd_pci_init (void)
 {
        printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name);
        if (usb_disabled())
@@ -253,8 +253,8 @@ module_init (ohci_hcd_pci_init);
 
 /*-------------------------------------------------------------------------*/
 
-static void __exit ohci_hcd_pci_cleanup (void) 
-{      
+static void __exit ohci_hcd_pci_cleanup (void)
+{
        pci_unregister_driver (&ohci_pci_driver);
 }
 module_exit (ohci_hcd_pci_cleanup);
index 7f26f9bdbaf1e61e70a8090e9ed3648f538f7f85..3a8cbfb69054c00c40e2d2705a5cb373dcbb8294 100644 (file)
@@ -4,7 +4,7 @@
  * driver for Philips PNX4008 USB Host
  *
  * Authors: Dmitry Chigirev <source@mvista.com>
- *         Vitaly Wool <vitalywool@gmail.com>
+ *         Vitaly Wool <vitalywool@gmail.com>
  *
  * register initialization is based on code examples provided by Philips
  * Copyright (c) 2005 Koninklijke Philips Electronics N.V.
@@ -29,7 +29,7 @@
 #include <asm/arch/irqs.h>
 #include <asm/arch/gpio.h>
 
-#define USB_CTRL       IO_ADDRESS(PNX4008_PWRMAN_BASE + 0x64)
+#define USB_CTRL       IO_ADDRESS(PNX4008_PWRMAN_BASE + 0x64)
 
 /* USB_CTRL bit defines */
 #define USB_SLAVE_HCLK_EN      (1 << 24)
diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c
new file mode 100644 (file)
index 0000000..6922b91
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ * (C) Copyright 2005 Embedded Alley Solutions, Inc.
+ *
+ * Bus Glue for PNX8550
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Russell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa1111.c
+ *  by Durgesh Pattamatta <pattamattad@sharpsec.com>
+ *
+ * Modified for PNX8550 from ohci-sa1111.c and sa-omap.c
+ *  by Vitaly Wool <vitalywool@gmail.com>
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <asm/mach-pnx8550/usb.h>
+#include <asm/mach-pnx8550/int.h>
+#include <asm/mach-pnx8550/pci.h>
+
+#ifndef CONFIG_PNX8550
+#error "This file is PNX8550 bus glue.  CONFIG_PNX8550 must be defined."
+#endif
+
+extern int usb_disabled(void);
+
+/*-------------------------------------------------------------------------*/
+
+static void pnx8550_start_hc(struct platform_device *dev)
+{
+       /*
+        * Set register CLK48CTL to enable and 48MHz
+        */
+       outl(0x00000003, PCI_BASE | 0x0004770c);
+
+       /*
+        * Set register CLK12CTL to enable and 48MHz
+        */
+       outl(0x00000003, PCI_BASE | 0x00047710);
+
+       udelay(100);
+}
+
+static void pnx8550_stop_hc(struct platform_device *dev)
+{
+       udelay(10);
+}
+
+
+/*-------------------------------------------------------------------------*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_pnx8550_probe - initialize pnx8550-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_pnx8550_probe (const struct hc_driver *driver,
+                         struct platform_device *dev)
+{
+       int retval;
+       struct usb_hcd *hcd;
+
+       if (dev->resource[0].flags != IORESOURCE_MEM ||
+                       dev->resource[1].flags != IORESOURCE_IRQ) {
+               dev_err (&dev->dev,"invalid resource type\n");
+               return -ENOMEM;
+       }
+
+       hcd = usb_create_hcd (driver, &dev->dev, "pnx8550");
+       if (!hcd)
+               return -ENOMEM;
+       hcd->rsrc_start = dev->resource[0].start;
+       hcd->rsrc_len = dev->resource[0].end - dev->resource[0].start + 1;
+
+       if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+               dev_err(&dev->dev, "request_mem_region [0x%08llx, 0x%08llx] "
+                               "failed\n", hcd->rsrc_start, hcd->rsrc_len);
+               retval = -EBUSY;
+               goto err1;
+       }
+
+       hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+       if (!hcd->regs) {
+               dev_err(&dev->dev, "ioremap [[0x%08llx, 0x%08llx] failed\n",
+                               hcd->rsrc_start, hcd->rsrc_len);
+               retval = -ENOMEM;
+               goto err2;
+       }
+
+       pnx8550_start_hc(dev);
+
+       ohci_hcd_init(hcd_to_ohci(hcd));
+
+       retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
+       if (retval == 0)
+               return retval;
+
+       pnx8550_stop_hc(dev);
+       iounmap(hcd->regs);
+ err2:
+       release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err1:
+       usb_put_hcd(hcd);
+       return retval;
+}
+
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/**
+ * usb_hcd_pnx8550_remove - shutdown processing for pnx8550-based HCDs
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_pnx8550_probe(), first invoking
+ * the HCD's stop() method.  It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+ */
+void usb_hcd_pnx8550_remove (struct usb_hcd *hcd, struct platform_device *dev)
+{
+       usb_remove_hcd(hcd);
+       pnx8550_stop_hc(dev);
+       iounmap(hcd->regs);
+       release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+       usb_put_hcd(hcd);
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int __devinit
+ohci_pnx8550_start (struct usb_hcd *hcd)
+{
+       struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+       int             ret;
+
+       ohci_dbg (ohci, "ohci_pnx8550_start, ohci:%p", ohci);
+
+       if ((ret = ohci_init(ohci)) < 0)
+               return ret;
+
+       if ((ret = ohci_run (ohci)) < 0) {
+               err ("can't start %s", hcd->self.bus_name);
+               ohci_stop (hcd);
+               return ret;
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static const struct hc_driver ohci_pnx8550_hc_driver = {
+       .description =          hcd_name,
+       .product_desc =         "PNX8550 OHCI",
+       .hcd_priv_size =        sizeof(struct ohci_hcd),
+
+       /*
+        * generic hardware linkage
+        */
+       .irq =                  ohci_irq,
+       .flags =                HCD_USB11 | HCD_MEMORY,
+
+       /*
+        * basic lifecycle operations
+        */
+       .start =                ohci_pnx8550_start,
+       .stop =                 ohci_stop,
+
+       /*
+        * managing i/o requests and associated device resources
+        */
+       .urb_enqueue =          ohci_urb_enqueue,
+       .urb_dequeue =          ohci_urb_dequeue,
+       .endpoint_disable =     ohci_endpoint_disable,
+
+       /*
+        * scheduling support
+        */
+       .get_frame_number =     ohci_get_frame,
+
+       /*
+        * root hub support
+        */
+       .hub_status_data =      ohci_hub_status_data,
+       .hub_control =          ohci_hub_control,
+       .hub_irq_enable =       ohci_rhsc_enable,
+#ifdef CONFIG_PM
+       .bus_suspend =          ohci_bus_suspend,
+       .bus_resume =           ohci_bus_resume,
+#endif
+       .start_port_reset =     ohci_start_port_reset,
+};
+
+/*-------------------------------------------------------------------------*/
+
+static int ohci_hcd_pnx8550_drv_probe(struct platform_device *pdev)
+{
+       int ret;
+
+       if (usb_disabled())
+               return -ENODEV;
+
+       ret = usb_hcd_pnx8550_probe(&ohci_pnx8550_hc_driver, pdev);
+       return ret;
+}
+
+static int ohci_hcd_pnx8550_drv_remove(struct platform_device *pdev)
+{
+       struct usb_hcd *hcd = platform_get_drvdata(pdev);
+
+       usb_hcd_pnx8550_remove(hcd, pdev);
+       return 0;
+}
+
+MODULE_ALIAS("pnx8550-ohci");
+
+static struct platform_driver ohci_hcd_pnx8550_driver = {
+       .driver = {
+               .name           = "pnx8550-ohci",
+       },
+       .probe          = ohci_hcd_pnx8550_drv_probe,
+       .remove         = ohci_hcd_pnx8550_drv_remove,
+};
+
+static int __init ohci_hcd_pnx8550_init (void)
+{
+       pr_debug (DRIVER_INFO " (pnx8550)");
+       pr_debug ("block sizes: ed %d td %d\n",
+               sizeof (struct ed), sizeof (struct td));
+
+       return platform_driver_register(&ohci_hcd_pnx8550_driver);
+}
+
+static void __exit ohci_hcd_pnx8550_cleanup (void)
+{
+       platform_driver_unregister(&ohci_hcd_pnx8550_driver);
+}
+
+module_init (ohci_hcd_pnx8550_init);
+module_exit (ohci_hcd_pnx8550_cleanup);
index d9d1ae236bd517458ca7bbd27a80f17663c837c8..e1a7eb8173135fe7e0d68a32641a6c049b773770 100644 (file)
@@ -5,7 +5,7 @@
  * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
  * (C) Copyright 2002 Hewlett-Packard Company
  * (C) Copyright 2003-2005 MontaVista Software Inc.
- * 
+ *
  * Bus Glue for PPC On-Chip OHCI driver
  * Tested on Freescale MPC5200 and IBM STB04xxx
  *
@@ -85,7 +85,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
  err2:
        release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
  err1:
-       usb_put_hcd(hcd);
+       usb_put_hcd(hcd);
        return retval;
 }
 
@@ -148,7 +148,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
         */
        .start =                ohci_ppc_soc_start,
        .stop =                 ohci_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -197,7 +197,7 @@ static int ohci_hcd_ppc_soc_drv_remove(struct platform_device *pdev)
 static struct platform_driver ohci_hcd_ppc_soc_driver = {
        .probe          = ohci_hcd_ppc_soc_drv_probe,
        .remove         = ohci_hcd_ppc_soc_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
 #ifdef CONFIG_PM
        /*.suspend      = ohci_hcd_ppc_soc_drv_suspend,*/
        /*.resume       = ohci_hcd_ppc_soc_drv_resume,*/
index e176b04d7aeb4ea4921c102ab614dc69ea037906..3bbea844a9e34a7e21c845c2323efa4490d6b5e0 100644 (file)
@@ -47,7 +47,7 @@ static int pxa27x_ohci_select_pmm( int mode )
        switch ( mode ) {
        case PMM_NPS_MODE:
                UHCRHDA |= RH_A_NPS;
-               break; 
+               break;
        case PMM_GLOBAL_MODE:
                UHCRHDA &= ~(RH_A_NPS & RH_A_PSM);
                break;
@@ -60,7 +60,7 @@ static int pxa27x_ohci_select_pmm( int mode )
                break;
        default:
                printk( KERN_ERR
-                       "Invalid mode %d, set to non-power switch mode.\n", 
+                       "Invalid mode %d, set to non-power switch mode.\n",
                        mode );
 
                UHCRHDA |= RH_A_NPS;
@@ -270,7 +270,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
         */
        .start =                ohci_pxa27x_start,
        .stop =                 ohci_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -359,9 +359,9 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
 static struct platform_driver ohci_hcd_pxa27x_driver = {
        .probe          = ohci_hcd_pxa27x_drv_probe,
        .remove         = ohci_hcd_pxa27x_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
 #ifdef CONFIG_PM
-       .suspend        = ohci_hcd_pxa27x_drv_suspend, 
+       .suspend        = ohci_hcd_pxa27x_drv_suspend,
        .resume         = ohci_hcd_pxa27x_drv_resume,
 #endif
        .driver         = {
index fe1fe2f97cb5bbff22371cce9ca60dcf01842878..830a3fe8615e9e1d96008789dc7d817934c882a0 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * OHCI HCD (Host Controller Driver) for USB.
- * 
+ *
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * 
+ *
  * This file is licenced under the GPL.
  */
 
@@ -89,7 +89,7 @@ __acquires(ohci->lock)
 
 /*-------------------------------------------------------------------------*
  * ED handling functions
- *-------------------------------------------------------------------------*/  
+ *-------------------------------------------------------------------------*/
 
 /* search for the right schedule branch to use for a periodic ed.
  * does some load balancing; returns the branch, or negative errno.
@@ -107,7 +107,6 @@ static int balance (struct ohci_hcd *ohci, int interval, int load)
         */
        for (i = 0; i < interval ; i++) {
                if (branch < 0 || ohci->load [branch] > ohci->load [i]) {
-#if 1  /* CONFIG_USB_BANDWIDTH */
                        int     j;
 
                        /* usb 1.1 says 90% of one frame */
@@ -117,8 +116,7 @@ static int balance (struct ohci_hcd *ohci, int interval, int load)
                        }
                        if (j < NUM_INTS)
                                continue;
-#endif
-                       branch = i; 
+                       branch = i;
                }
        }
        return branch;
@@ -171,7 +169,7 @@ static void periodic_link (struct ohci_hcd *ohci, struct ed *ed)
 /* link an ed into one of the HC chains */
 
 static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
-{       
+{
        int     branch;
 
        if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING)
@@ -248,7 +246,7 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
                }
                ed->branch = branch;
                periodic_link (ohci, ed);
-       }               
+       }
 
        /* the HC may not see the schedule updates yet, but if it does
         * then they'll be properly ordered.
@@ -277,7 +275,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
                        *prev = ed->ed_next;
                }
                ohci->load [i] -= ed->load;
-       }       
+       }
        ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval;
 
        ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n",
@@ -285,7 +283,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
                ed, ed->branch, ed->load, ed->interval);
 }
 
-/* unlink an ed from one of the HC chains. 
+/* unlink an ed from one of the HC chains.
  * just the link to the ed is unlinked.
  * the link from the ed still points to another operational ed or 0
  * so the HC can eventually finish the processing of the unlinked ed
@@ -307,7 +305,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
  * When finish_unlinks() runs later, after SOF interrupt, it will often
  * complete one or more URB unlinks before making that state change.
  */
-static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed) 
+static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
 {
        ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
        wmb ();
@@ -397,7 +395,7 @@ static struct ed *ed_get (
        unsigned int            pipe,
        int                     interval
 ) {
-       struct ed               *ed; 
+       struct ed               *ed;
        unsigned long           flags;
 
        spin_lock_irqsave (&ohci->lock, flags);
@@ -413,9 +411,9 @@ static struct ed *ed_get (
                        goto done;
                }
 
-               /* dummy td; end of td list for ed */
+               /* dummy td; end of td list for ed */
                td = td_alloc (ohci, GFP_ATOMIC);
-               if (!td) {
+               if (!td) {
                        /* out of memory */
                        ed_free (ohci, ed);
                        ed = NULL;
@@ -462,7 +460,7 @@ static struct ed *ed_get (
 
 done:
        spin_unlock_irqrestore (&ohci->lock, flags);
-       return ed; 
+       return ed;
 }
 
 /*-------------------------------------------------------------------------*/
@@ -474,7 +472,7 @@ done:
  * and that ed->state is ED_OPER
  */
 static void start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed)
-{    
+{
        ed->hwINFO |= cpu_to_hc32 (ohci, ED_DEQUEUE);
        ed_deschedule (ohci, ed);
 
@@ -541,7 +539,7 @@ td_fill (struct ohci_hcd *ohci, u32 info,
        td->ed = urb_priv->ed;
        td->next_dl_td = NULL;
        td->index = index;
-       td->urb = urb; 
+       td->urb = urb;
        td->data_dma = data;
        if (!len)
                data = 0;
@@ -553,8 +551,8 @@ td_fill (struct ohci_hcd *ohci, u32 info,
                                                (data & 0x0FFF) | 0xE000);
                td->ed->last_iso = info & 0xffff;
        } else {
-               td->hwCBP = cpu_to_hc32 (ohci, data); 
-       }                       
+               td->hwCBP = cpu_to_hc32 (ohci, data);
+       }
        if (data)
                td->hwBE = cpu_to_hc32 (ohci, data + len - 1);
        else
@@ -597,7 +595,7 @@ static void td_submit_urb (
         * use the device toggle bits for resetting, and rely on the fact
         * that resetting toggle is meaningless if the endpoint is active.
         */
-       if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) {
+       if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) {
                usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe),
                        is_out, 1);
                urb_priv->ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_C);
@@ -721,16 +719,16 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
        list_del (&td->td_list);
 
        /* ISO ... drivers see per-TD length/status */
-       if (tdINFO & TD_ISO) {
-               u16     tdPSW = ohci_hwPSW (ohci, td, 0);
+       if (tdINFO & TD_ISO) {
+               u16     tdPSW = ohci_hwPSW (ohci, td, 0);
                int     dlen = 0;
 
                /* NOTE:  assumes FC in tdINFO == 0, and that
                 * only the first of 0..MAXPSW psws is used.
                 */
 
-               cc = (tdPSW >> 12) & 0xF;
-               if (tdINFO & TD_CC)     /* hc didn't touch? */
+               cc = (tdPSW >> 12) & 0xF;
+               if (tdINFO & TD_CC)     /* hc didn't touch? */
                        return;
 
                if (usb_pipeout (urb->pipe))
@@ -758,7 +756,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
                int     type = usb_pipetype (urb->pipe);
                u32     tdBE = hc32_to_cpup (ohci, &td->hwBE);
 
-               cc = TD_CC_GET (tdINFO);
+               cc = TD_CC_GET (tdINFO);
 
                /* update packet status if needed (short is normally ok) */
                if (cc == TD_DATAUNDERRUN
@@ -787,7 +785,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
                                urb, td, 1 + td->index, cc,
                                urb->actual_length,
                                urb->transfer_buffer_length);
-       }
+       }
 }
 
 /*-------------------------------------------------------------------------*/
@@ -795,7 +793,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
 static inline struct td *
 ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
 {
-       struct urb              *urb = td->urb;
+       struct urb              *urb = td->urb;
        struct ed               *ed = td->ed;
        struct list_head        *tmp = td->td_list.next;
        __hc32                  toggle = ed->hwHeadP & cpu_to_hc32 (ohci, ED_C);
@@ -805,7 +803,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
         */
        ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
        wmb ();
-       ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H); 
+       ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H);
 
        /* put any later tds from this urb onto the donelist, after 'td',
         * order won't matter here: no errors, and nothing was transferred.
@@ -833,7 +831,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
                info &= ~cpu_to_hc32 (ohci, TD_CC);
                next->hwINFO = info;
 
-               next->next_dl_td = rev; 
+               next->next_dl_td = rev;
                rev = next;
 
                ed->hwHeadP = next->hwNextTD | toggle;
@@ -881,8 +879,8 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci)
        /* get TD from hc's singly linked list, and
         * prepend to ours.  ed->td_list changes later.
         */
-       while (td_dma) {                
-               int             cc;
+       while (td_dma) {
+               int             cc;
 
                td = dma_to_td (ohci, td_dma);
                if (!td) {
@@ -901,10 +899,10 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci)
                                && (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H)))
                        td_rev = ed_halted (ohci, td, cc, td_rev);
 
-               td->next_dl_td = td_rev;        
+               td->next_dl_td = td_rev;
                td_rev = td;
                td_dma = hc32_to_cpup (ohci, &td->hwNextTD);
-       }       
+       }
        return td_rev;
 }
 
@@ -1013,9 +1011,9 @@ rescan_this:
 
                if (modified)
                        goto rescan_all;
-       }
+       }
 
-       /* maybe reenable control and bulk lists */ 
+       /* maybe reenable control and bulk lists */
        if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state)
                        && ohci_to_hcd(ohci)->state != HC_STATE_QUIESCING
                        && !ohci->ed_rm_list) {
@@ -1041,20 +1039,20 @@ rescan_this:
                                        &ohci->regs->ed_bulkcurrent);
                        }
                }
-               
+
                /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */
                if (control) {
                        ohci->hc_control |= control;
                        if (ohci->flags & OHCI_QUIRK_ZFMICRO)
                                mdelay(1);
-                       ohci_writel (ohci, ohci->hc_control,
-                                       &ohci->regs->control);   
-               }
+                       ohci_writel (ohci, ohci->hc_control,
+                                       &ohci->regs->control);
+               }
                if (command) {
                        if (ohci->flags & OHCI_QUIRK_ZFMICRO)
                                mdelay(1);
-                       ohci_writel (ohci, command, &ohci->regs->cmdstatus);   
-               }
+                       ohci_writel (ohci, command, &ohci->regs->cmdstatus);
+               }
        }
 }
 
@@ -1074,19 +1072,19 @@ dl_done_list (struct ohci_hcd *ohci)
 {
        struct td       *td = dl_reverse_done_list (ohci);
 
-       while (td) {
+       while (td) {
                struct td       *td_next = td->next_dl_td;
                struct urb      *urb = td->urb;
                urb_priv_t      *urb_priv = urb->hcpriv;
                struct ed       *ed = td->ed;
 
                /* update URB's length and status from TD */
-               td_done (ohci, urb, td);
-               urb_priv->td_cnt++;
+               td_done (ohci, urb, td);
+               urb_priv->td_cnt++;
 
                /* If all this urb's TDs are done, call complete() */
-               if (urb_priv->td_cnt == urb_priv->length)
-                       finish_urb (ohci, urb);
+               if (urb_priv->td_cnt == urb_priv->length)
+                       finish_urb (ohci, urb);
 
                /* clean schedule:  unlink EDs that are no longer busy */
                if (list_empty (&ed->td_list)) {
@@ -1094,25 +1092,26 @@ dl_done_list (struct ohci_hcd *ohci)
                                start_ed_unlink (ohci, ed);
 
                /* ... reenabling halted EDs only after fault cleanup */
-               } else if ((ed->hwINFO & cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE))
+               } else if ((ed->hwINFO & cpu_to_hc32 (ohci,
+                                               ED_SKIP | ED_DEQUEUE))
                                        == cpu_to_hc32 (ohci, ED_SKIP)) {
                        td = list_entry (ed->td_list.next, struct td, td_list);
-                       if (!(td->hwINFO & cpu_to_hc32 (ohci, TD_DONE))) {
+                       if (!(td->hwINFO & cpu_to_hc32 (ohci, TD_DONE))) {
                                ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP);
                                /* ... hc may need waking-up */
                                switch (ed->type) {
                                case PIPE_CONTROL:
                                        ohci_writel (ohci, OHCI_CLF,
-                                               &ohci->regs->cmdstatus);   
+                                               &ohci->regs->cmdstatus);
                                        break;
                                case PIPE_BULK:
                                        ohci_writel (ohci, OHCI_BLF,
-                                               &ohci->regs->cmdstatus);   
+                                               &ohci->regs->cmdstatus);
                                        break;
                                }
                        }
                }
 
-               td = td_next;
-       }  
+               td = td_next;
+       }
 }
index 59e436424d4145fc1e181b3b25c9a047e6b17180..b350d45033e7e45de6109da134fa511458106345 100644 (file)
@@ -447,7 +447,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
         */
        .start =                ohci_s3c2410_start,
        .stop =                 ohci_stop,
-       .shutdown =             ohci_shutdown,
+       .shutdown =             ohci_shutdown,
 
        /*
         * managing i/o requests and associated device resources
@@ -492,7 +492,7 @@ static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
 static struct platform_driver ohci_hcd_s3c2410_driver = {
        .probe          = ohci_hcd_s3c2410_drv_probe,
        .remove         = ohci_hcd_s3c2410_drv_remove,
-       .shutdown       = usb_hcd_platform_shutdown,
+       .shutdown       = usb_hcd_platform_shutdown,
        /*.suspend      = ohci_hcd_s3c2410_drv_suspend, */
        /*.resume       = ohci_hcd_s3c2410_drv_resume, */
        .driver         = {
index 71371de32ada4c21bed7e61d7a30914ea35db9b4..fe0090e33675b909a69882251d788bbac134aac8 100644 (file)
@@ -4,7 +4,7 @@
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
  * (C) Copyright 2002 Hewlett-Packard Company
- * 
+ *
  * SA1111 Bus Glue
  *
  * Written by Christopher Hoover <ch@hpl.hp.com>
@@ -12,7 +12,7 @@
  *
  * This file is licenced under the GPL.
  */
+
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/arch/assabet.h>
@@ -31,7 +31,7 @@ static void sa1111_start_hc(struct sa1111_dev *dev)
 {
        unsigned int usb_rst = 0;
 
-       printk(KERN_DEBUG __FILE__ 
+       printk(KERN_DEBUG __FILE__
               ": starting SA-1111 OHCI USB Controller\n");
 
 #ifdef CONFIG_SA1100_BADGE4
@@ -65,7 +65,7 @@ static void sa1111_start_hc(struct sa1111_dev *dev)
 static void sa1111_stop_hc(struct sa1111_dev *dev)
 {
        unsigned int usb_rst;
-       printk(KERN_DEBUG __FILE__ 
+       printk(KERN_DEBUG __FILE__
               ": stopping SA-1111 OHCI USB Controller\n");
 
        /*
index a2f42a2f47c6f440165fb05be038dae041668167..405257f3e8532ff2d250cdfd612d29d44261523d 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * OHCI HCD (Host Controller Driver) for USB.
- * 
+ *
  * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
  * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
- * 
+ *
  * This file is licenced under the GPL.
  */
 
@@ -14,7 +14,7 @@
  */
 typedef __u32 __bitwise __hc32;
 typedef __u16 __bitwise __hc16;
+
 /*
  * OHCI Endpoint Descriptor (ED) ... holds TD queue
  * See OHCI spec, section 4.2
@@ -24,7 +24,7 @@ typedef __u16 __bitwise __hc16;
  */
 struct ed {
        /* first fields are hardware-specified */
-       __hc32                  hwINFO;         /* endpoint config bitmap */
+       __hc32                  hwINFO;      /* endpoint config bitmap */
        /* info bits defined by hcd */
 #define ED_DEQUEUE     (1 << 27)
        /* info bits defined by the hardware */
@@ -52,11 +52,11 @@ struct ed {
         * usually:  OPER --> UNLINK --> (IDLE | OPER) --> ...
         */
        u8                      state;          /* ED_{IDLE,UNLINK,OPER} */
-#define ED_IDLE        0x00            /* NOT linked to HC */
-#define ED_UNLINK      0x01            /* being unlinked from hc */
+#define ED_IDLE                0x00            /* NOT linked to HC */
+#define ED_UNLINK      0x01            /* being unlinked from hc */
 #define ED_OPER                0x02            /* IS linked to hc */
 
-       u8                      type;           /* PIPE_{BULK,...} */
+       u8                      type;           /* PIPE_{BULK,...} */
 
        /* periodic scheduling params (for intr and iso) */
        u8                      branch;
@@ -70,7 +70,7 @@ struct ed {
 
 #define ED_MASK        ((u32)~0x0f)            /* strip hw status in low addr bits */
 
+
 /*
  * OHCI Transfer Descriptor (TD) ... one per transfer segment
  * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt)
@@ -107,22 +107,22 @@ struct td {
 
        /* (no hwINFO #defines yet for iso tds) */
 
-       __hc32          hwCBP;          /* Current Buffer Pointer (or 0) */
-       __hc32          hwNextTD;       /* Next TD Pointer */
-       __hc32          hwBE;           /* Memory Buffer End Pointer */
+       __hc32          hwCBP;          /* Current Buffer Pointer (or 0) */
+       __hc32          hwNextTD;       /* Next TD Pointer */
+       __hc32          hwBE;           /* Memory Buffer End Pointer */
 
        /* PSW is only for ISO.  Only 1 PSW entry is used, but on
         * big-endian PPC hardware that's the second entry.
         */
 #define MAXPSW 2
-       __hc16          hwPSW [MAXPSW];
+       __hc16          hwPSW [MAXPSW];
 
        /* rest are purely for the driver's use */
-       __u8            index;
-       struct ed       *ed;
-       struct td       *td_hash;       /* dma-->td hashtable */
-       struct td       *next_dl_td;
-       struct urb      *urb;
+       __u8            index;
+       struct ed       *ed;
+       struct td       *td_hash;       /* dma-->td hashtable */
+       struct td       *next_dl_td;
+       struct urb      *urb;
 
        dma_addr_t      td_dma;         /* addr of this TD */
        dma_addr_t      data_dma;       /* addr of data it points to */
@@ -152,8 +152,8 @@ struct td {
 #define TD_NOTACCESSED     0x0F
 
 
-/* map OHCI TD status codes (CC) to errno values */ 
-static const int cc_to_error [16] = { 
+/* map OHCI TD status codes (CC) to errno values */
+static const int cc_to_error [16] = {
        /* No  Error  */               0,
        /* CRC Error  */               -EILSEQ,
        /* Bit Stuff  */               -EPROTO,
@@ -169,7 +169,7 @@ static const int cc_to_error [16] = {
        /* BufferOver */               -ECOMM,
        /* BuffUnder  */               -ENOSR,
        /* (for HCD)  */               -EALREADY,
-       /* (for HCD)  */               -EALREADY 
+       /* (for HCD)  */               -EALREADY
 };
 
 
@@ -182,7 +182,7 @@ struct ohci_hcca {
 #define NUM_INTS 32
        __hc32  int_table [NUM_INTS];   /* periodic schedule */
 
-       /* 
+       /*
         * OHCI defines u16 frame_no, followed by u16 zero pad.
         * Since some processors can't do 16 bit bus accesses,
         * portable access must be a 32 bits wide.
@@ -262,10 +262,10 @@ struct ohci_regs {
  * HcCommandStatus (cmdstatus) register masks
  */
 #define OHCI_HCR       (1 << 0)        /* host controller reset */
-#define OHCI_CLF       (1 << 1)        /* control list filled */
-#define OHCI_BLF       (1 << 2)        /* bulk list filled */
-#define OHCI_OCR       (1 << 3)        /* ownership change request */
-#define OHCI_SOC       (3 << 16)       /* scheduling overrun count */
+#define OHCI_CLF       (1 << 1)        /* control list filled */
+#define OHCI_BLF       (1 << 2)        /* bulk list filled */
+#define OHCI_OCR       (1 << 3)        /* ownership change request */
+#define OHCI_SOC       (3 << 16)       /* scheduling overrun count */
 
 /*
  * masks used with interrupt registers:
@@ -285,20 +285,20 @@ struct ohci_regs {
 
 
 /* OHCI ROOT HUB REGISTER MASKS */
+
 /* roothub.portstatus [i] bits */
-#define RH_PS_CCS            0x00000001        /* current connect status */
-#define RH_PS_PES            0x00000002        /* port enable status*/
-#define RH_PS_PSS            0x00000004        /* port suspend status */
-#define RH_PS_POCI           0x00000008        /* port over current indicator */
-#define RH_PS_PRS            0x00000010        /* port reset status */
-#define RH_PS_PPS            0x00000100        /* port power status */
-#define RH_PS_LSDA           0x00000200        /* low speed device attached */
-#define RH_PS_CSC            0x00010000        /* connect status change */
-#define RH_PS_PESC           0x00020000        /* port enable status change */
-#define RH_PS_PSSC           0x00040000        /* port suspend status change */
-#define RH_PS_OCIC           0x00080000        /* over current indicator change */
-#define RH_PS_PRSC           0x00100000        /* port reset status change */
+#define RH_PS_CCS            0x00000001                /* current connect status */
+#define RH_PS_PES            0x00000002                /* port enable status*/
+#define RH_PS_PSS            0x00000004                /* port suspend status */
+#define RH_PS_POCI           0x00000008                /* port over current indicator */
+#define RH_PS_PRS            0x00000010                /* port reset status */
+#define RH_PS_PPS            0x00000100                /* port power status */
+#define RH_PS_LSDA           0x00000200                /* low speed device attached */
+#define RH_PS_CSC            0x00010000                /* connect status change */
+#define RH_PS_PESC           0x00020000                /* port enable status change */
+#define RH_PS_PSSC           0x00040000                /* port suspend status change */
+#define RH_PS_OCIC           0x00080000                /* over current indicator change */
+#define RH_PS_PRSC           0x00100000                /* port reset status change */
 
 /* roothub.status bits */
 #define RH_HS_LPS           0x00000001         /* local power status */
@@ -333,7 +333,7 @@ typedef struct urb_priv {
 } urb_priv_t;
 
 #define TD_HASH_SIZE    64    /* power'o'two */
-// sizeof (struct td) ~= 64 == 2^6 ... 
+// sizeof (struct td) ~= 64 == 2^6 ...
 #define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE)
 
 
@@ -364,11 +364,11 @@ struct ohci_hcd {
 
        struct ed               *ed_bulktail;           /* last in bulk list */
        struct ed               *ed_controltail;        /* last in ctrl list */
-       struct ed               *periodic [NUM_INTS];   /* shadow int_table */
+       struct ed               *periodic [NUM_INTS];   /* shadow int_table */
 
        /*
         * OTG controllers and transceivers need software interaction;
-        * other external transceivers should be software-transparent 
+        * other external transceivers should be software-transparent
         */
        struct otg_transceiver  *transceiver;
 
@@ -385,7 +385,7 @@ struct ohci_hcd {
         */
        int                     num_ports;
        int                     load [NUM_INTS];
-       u32                     hc_control;     /* copy of hc control reg */
+       u32                     hc_control;     /* copy of hc control reg */
        unsigned long           next_statechange;       /* suspend/resume */
        u32                     fminterval;             /* saved register */
        unsigned                autostop:1;     /* rh auto stopping/stopped */
@@ -598,11 +598,11 @@ static inline void disable (struct ohci_hcd *ohci)
 }
 
 #define        FI                      0x2edf          /* 12000 bits per frame (-1) */
-#define        FSMP(fi)                (0x7fff & ((6 * ((fi) - 210)) / 7))
+#define        FSMP(fi)                (0x7fff & ((6 * ((fi) - 210)) / 7))
 #define        FIT                     (1 << 31)
 #define LSTHRESH               0x628           /* lowspeed bit threshold */
 
-static void periodic_reinit (struct ohci_hcd *ohci)
+static inline void periodic_reinit (struct ohci_hcd *ohci)
 {
        u32     fi = ohci->fminterval & 0x03fff;
        u32     fit = ohci_readl(ohci, &ohci->regs->fminterval) & FIT;
@@ -626,11 +626,11 @@ static void periodic_reinit (struct ohci_hcd *ohci)
                        temp = ohci_readl (hc, &hc->regs->roothub.register); \
        temp; })
 
-static u32 roothub_a (struct ohci_hcd *hc)
+static inline u32 roothub_a (struct ohci_hcd *hc)
        { return read_roothub (hc, a, 0xfc0fe000); }
 static inline u32 roothub_b (struct ohci_hcd *hc)
        { return ohci_readl (hc, &hc->regs->roothub.b); }
 static inline u32 roothub_status (struct ohci_hcd *hc)
        { return ohci_readl (hc, &hc->regs->roothub.status); }
-static u32 roothub_portstatus (struct ohci_hcd *hc, int i)
+static inline u32 roothub_portstatus (struct ohci_hcd *hc, int i)
        { return read_roothub (hc, portstatus [i], 0xffe0fce0); }
index a9d7119e3176921958aeafcf977aa4cb5bd17573..a7fa0d75567dcdb995fca738f65878ca30f71f18 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
+#include <linux/pci_ids.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/smp_lock.h>
@@ -210,15 +211,16 @@ struct u132 {
 * these cannot be inlines because we need the structure offset!!
 * Does anyone have a better way?????
 */
+#define ftdi_read_pcimem(pdev, member, data) usb_ftdi_elan_read_pcimem(pdev, \
+        offsetof(struct ohci_regs, member), 0, data);
+#define ftdi_write_pcimem(pdev, member, data) usb_ftdi_elan_write_pcimem(pdev, \
+        offsetof(struct ohci_regs, member), 0, data);
 #define u132_read_pcimem(u132, member, data) \
         usb_ftdi_elan_read_pcimem(u132->platform_dev, offsetof(struct \
         ohci_regs, member), 0, data);
 #define u132_write_pcimem(u132, member, data) \
         usb_ftdi_elan_write_pcimem(u132->platform_dev, offsetof(struct \
         ohci_regs, member), 0, data);
-#define u132_write_pcimem_byte(u132, member, data) \
-        usb_ftdi_elan_write_pcimem(u132->platform_dev, offsetof(struct \
-        ohci_regs, member), 0x0e, data);
 static inline struct u132 *udev_to_u132(struct u132_udev *udev)
 {
         u8 udev_number = udev->udev_number;
@@ -1574,59 +1576,12 @@ static char *hcfs2string(int state)
         return "?";
 }
 
-static int u132_usb_reset(struct u132 *u132)
-{
-        int retval;
-        retval = u132_read_pcimem(u132, control, &u132->hc_control);
-        if (retval)
-                return retval;
-        u132->hc_control &= OHCI_CTRL_RWC;
-        retval = u132_write_pcimem(u132, control, u132->hc_control);
-        if (retval)
-                return retval;
-        return 0;
-}
-
 static int u132_init(struct u132 *u132)
 {
         int retval;
         u32 control;
         u132_disable(u132);
-        u132->next_statechange =
-                jiffies; /* SMM owns the HC? not for long! */  {
-                u32 control;
-                retval = u132_read_pcimem(u132, control, &control);
-                if (retval)
-                        return retval;
-                if (control & OHCI_CTRL_IR) {
-                        u32 temp = 50;
-                        retval = u132_write_pcimem(u132, intrenable,
-                                OHCI_INTR_OC);
-                        if (retval)
-                                return retval;
-                        retval = u132_write_pcimem_byte(u132, cmdstatus,
-                                OHCI_OCR);
-                        if (retval)
-                                return retval;
-                      check:{
-                                retval = u132_read_pcimem(u132, control,
-                                        &control);
-                                if (retval)
-                                        return retval;
-                        }
-                        if (control & OHCI_CTRL_IR) {
-                                msleep(10);
-                                if (--temp == 0) {
-                                        dev_err(&u132->platform_dev->dev, "USB "
-                                                "HC takeover failed!(BIOS/SMM b"
-                                                "ug) control=%08X\n", control);
-                                        return -EBUSY;
-                                }
-                                goto check;
-                        }
-                        u132_usb_reset(u132);
-                }
-        }
+        u132->next_statechange = jiffies;
         retval = u132_write_pcimem(u132, intrdisable, OHCI_INTR_MIE);
         if (retval)
                 return retval;
@@ -1725,7 +1680,7 @@ static int u132_run(struct u132 *u132)
       retry:retval = u132_read_pcimem(u132, cmdstatus, &status);
         if (retval)
                 return retval;
-        retval = u132_write_pcimem_byte(u132, cmdstatus, OHCI_HCR);
+        retval = u132_write_pcimem(u132, cmdstatus, OHCI_HCR);
         if (retval)
                 return retval;
       extra:{
@@ -1782,7 +1737,7 @@ static int u132_run(struct u132 *u132)
         retval = u132_write_pcimem(u132, control, u132->hc_control);
         if (retval)
                 return retval;
-        retval = u132_write_pcimem_byte(u132, cmdstatus, OHCI_BLF);
+        retval = u132_write_pcimem(u132, cmdstatus, OHCI_BLF);
         if (retval)
                 return retval;
         retval = u132_read_pcimem(u132, cmdstatus, &cmdstatus);
@@ -1839,8 +1794,8 @@ static void u132_hcd_stop(struct usb_hcd *hcd)
 {
         struct u132 *u132 = hcd_to_u132(hcd);
         if (u132->going > 1) {
-                dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
-                        , u132->going);
+                dev_err(&u132->platform_dev->dev, "u132 device %p(hcd=%p) has b"
+                        "een removed %d\n", u132, hcd, u132->going);
         } else if (u132->going > 0) {
                 dev_err(&u132->platform_dev->dev, "device hcd=%p is being remov"
                         "ed\n", hcd);
@@ -2545,8 +2500,9 @@ static void u132_endpoint_disable(struct usb_hcd *hcd,
 {
         struct u132 *u132 = hcd_to_u132(hcd);
         if (u132->going > 2) {
-                dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
-                        , u132->going);
+                dev_err(&u132->platform_dev->dev, "u132 device %p(hcd=%p hep=%p"
+                        ") has been removed %d\n", u132, hcd, hep,
+                        u132->going);
         } else {
                 struct u132_endp *endp = hep->hcpriv;
                 if (endp)
@@ -2790,7 +2746,6 @@ static int u132_hub_status_data(struct usb_hcd *hcd, char *buf)
         } else if (u132->going > 0) {
                 dev_err(&u132->platform_dev->dev, "device hcd=%p is being remov"
                         "ed\n", hcd);
-                dump_stack();
                 return -ESHUTDOWN;
         } else {
                 int i, changed = 0, length = 1;
@@ -3034,12 +2989,15 @@ static int __devexit u132_remove(struct platform_device *pdev)
         struct usb_hcd *hcd = platform_get_drvdata(pdev);
         if (hcd) {
                 struct u132 *u132 = hcd_to_u132(hcd);
-                dump_stack();
                 if (u132->going++ > 1) {
+                        dev_err(&u132->platform_dev->dev, "already being remove"
+                               "d\n");
                         return -ENODEV;
                 } else {
                         int rings = MAX_U132_RINGS;
                         int endps = MAX_U132_ENDPS;
+                        dev_err(&u132->platform_dev->dev, "removing device u132"
+                               ".%d\n", u132->sequence_num);
                         msleep(100);
                         down(&u132->sw_lock);
                         u132_monitor_cancel_work(u132);
@@ -3121,10 +3079,24 @@ static void u132_initialise(struct u132 *u132, struct platform_device *pdev)
 static int __devinit u132_probe(struct platform_device *pdev)
 {
         struct usb_hcd *hcd;
+        int retval;
+        u32 control;
+        u32 rh_a = -1;
+        u32 num_ports;
         msleep(100);
         if (u132_exiting > 0) {
                 return -ENODEV;
-        }                        /* refuse to confuse usbcore */
+        }
+        retval = ftdi_write_pcimem(pdev, intrdisable, OHCI_INTR_MIE);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(pdev, control, &control);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(pdev, roothub.a, &rh_a);
+        if (retval)
+                return retval;
+        num_ports = rh_a & RH_A_NDP;        /* refuse to confuse usbcore */
         if (pdev->dev.dma_mask) {
                 return -EINVAL;
         }
index e87692c31be470b6df00d7a305154918bfa82ce7..acd101caeeeb4760a983c34cea5cf3c865476d67 100644 (file)
@@ -60,6 +60,11 @@ Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber, \
 Alan Stern"
 #define DRIVER_DESC "USB Universal Host Controller Interface driver"
 
+/* for flakey hardware, ignore overcurrent indicators */
+static int ignore_oc;
+module_param(ignore_oc, bool, S_IRUGO);
+MODULE_PARM_DESC(ignore_oc, "ignore hardware overcurrent indications");
+
 /*
  * debug = 0, no debugging messages
  * debug = 1, dump failed URBs except for stalls
@@ -169,6 +174,11 @@ static int resume_detect_interrupts_are_broken(struct uhci_hcd *uhci)
 {
        int port;
 
+       /* If we have to ignore overcurrent events then almost by definition
+        * we can't depend on resume-detect interrupts. */
+       if (ignore_oc)
+               return 1;
+
        switch (to_pci_dev(uhci_dev(uhci))->vendor) {
            default:
                break;
@@ -921,7 +931,8 @@ static int __init uhci_hcd_init(void)
 {
        int retval = -ENOMEM;
 
-       printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "\n");
+       printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "%s\n",
+                       ignore_oc ? ", overcurrent ignored" : "");
 
        if (usb_disabled())
                return -ENODEV;
index f8347f1a10b6633303e333233e59ef8df5dd5d51..bacc25c53ba3318c3626f1043ffb878706c85a69 100644 (file)
@@ -52,10 +52,20 @@ static int any_ports_active(struct uhci_hcd *uhci)
 static inline int get_hub_status_data(struct uhci_hcd *uhci, char *buf)
 {
        int port;
+       int mask = RWC_BITS;
+
+       /* Some boards (both VIA and Intel apparently) report bogus
+        * overcurrent indications, causing massive log spam unless
+        * we completely ignore them.  This doesn't seem to be a problem
+        * with the chipset so much as with the way it is connected on
+        * the motherboard; if the overcurrent input is left to float
+        * then it may constantly register false positives. */
+       if (ignore_oc)
+               mask &= ~USBPORTSC_OCC;
 
        *buf = 0;
        for (port = 0; port < uhci->rh_numports; ++port) {
-               if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||
+               if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & mask) ||
                                test_bit(port, &uhci->port_c_suspend))
                        *buf |= (1 << (port + 1));
        }
@@ -263,7 +273,7 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                        wPortChange |= USB_PORT_STAT_C_CONNECTION;
                if (status & USBPORTSC_PEC)
                        wPortChange |= USB_PORT_STAT_C_ENABLE;
-               if (status & USBPORTSC_OCC)
+               if ((status & USBPORTSC_OCC) && !ignore_oc)
                        wPortChange |= USB_PORT_STAT_C_OVERCURRENT;
 
                if (test_bit(port, &uhci->port_c_suspend)) {
index e7cc20ab8155083f235a54de6a042af92cd7afa3..12b42746ded89bab41a144338681cc977531fb14 100644 (file)
@@ -159,13 +159,13 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
        input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
        input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3);
-       input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0);
+       input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
 }
 
 void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
        input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7);
-       input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0);
+       input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
 }
 
 void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
index 92726fe89379e7631f7c3bf382063ed7859c5e26..4142e36730fc7a359012a937def88fc8b7e299d6 100644 (file)
@@ -209,13 +209,15 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
                        wacom_report_key(wcombo, BTN_STYLUS, data[1] & 0x02);
                        wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 0x04);
                }
-       }
-
-       if (data[1] & 0x10)
                wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */
+       }
        else
                wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */
-       wacom_report_key(wcombo, wacom->tool[0], data[1] & 0x10);
+
+       if (data[1] & 0x10)  /* only report prox-in when in area */
+               wacom_report_key(wcombo, wacom->tool[0], 1);
+       if (!(data[1] & 0x90))  /* report prox-out when physically out */
+               wacom_report_key(wcombo, wacom->tool[0], 0);
        wacom_input_sync(wcombo);
 
        /* send pad data */
@@ -405,7 +407,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
        if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40))
                  return 0;
 
-       if (wacom->features->type >= INTUOS3) {
+       if (wacom->features->type >= INTUOS3S) {
                wacom_report_abs(wcombo, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1));
                wacom_report_abs(wcombo, ABS_Y, (data[4] << 9) | (data[5] << 1) | (data[9] & 1));
                wacom_report_abs(wcombo, ABS_DISTANCE, ((data[9] >> 2) & 0x3f));
@@ -423,7 +425,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
 
                if (data[1] & 0x02) {
                        /* Rotation packet */
-                       if (wacom->features->type >= INTUOS3) {
+                       if (wacom->features->type >= INTUOS3S) {
                                /* I3 marker pen rotation reported as wheel
                                 * due to valuator limitation
                                 */
@@ -547,11 +549,11 @@ static struct wacom_features wacom_features[] = {
        { "Wacom Graphire3 6x8", 8,  16704, 12064,  511, 63, GRAPHIRE },
        { "Wacom Graphire4 4x5", 8,  10208,  7424,  511, 63, WACOM_G4 },
        { "Wacom Graphire4 6x8", 8,  16704, 12064,  511, 63, WACOM_G4 },
-       { "Wacom Volito",        8,   5104,  3712,  511,  0, GRAPHIRE },
-       { "Wacom PenStation2",   8,   3250,  2320,  255,  0, GRAPHIRE },
-       { "Wacom Volito2 4x5",   8,   5104,  3712,  511,  0, GRAPHIRE },
-       { "Wacom Volito2 2x3",   8,   3248,  2320,  511,  0, GRAPHIRE },
-       { "Wacom PenPartner2",   8,   3250,  2320,  255,  0, GRAPHIRE },
+       { "Wacom Volito",        8,   5104,  3712,  511, 63, GRAPHIRE },
+       { "Wacom PenStation2",   8,   3250,  2320,  255, 63, GRAPHIRE },
+       { "Wacom Volito2 4x5",   8,   5104,  3712,  511, 63, GRAPHIRE },
+       { "Wacom Volito2 2x3",   8,   3248,  2320,  511, 63, GRAPHIRE },
+       { "Wacom PenPartner2",   8,   3250,  2320,  255, 63, GRAPHIRE },
        { "Wacom Intuos 4x5",   10,  12700, 10600, 1023, 63, INTUOS },
        { "Wacom Intuos 6x8",   10,  20320, 16240, 1023, 63, INTUOS },
        { "Wacom Intuos 9x12",  10,  30480, 24060, 1023, 63, INTUOS },
@@ -580,7 +582,7 @@ static struct wacom_features wacom_features[] = {
        { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L },
        { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L },
        { "Wacom Intuos3 6x11",  10, 54204, 31750, 1023, 63, INTUOS3 },
-       { "Wacom Intuos3 4x6",   10, 31496, 19685, 1023, 15, INTUOS3S },
+       { "Wacom Intuos3 4x6",   10, 31496, 19685, 1023, 63, INTUOS3S },
        { "Wacom Cintiq 21UX",   10, 87200, 65600, 1023, 63, CINTIQ },
        { "Wacom Intuos2 6x8",   10, 20320, 16240, 1023, 63, INTUOS },
        { }
index 6c7f3efb1d40d71a74e8e8296c81f187e1264860..b5332e679c4644f86ed1ab0a45459ebf9810b04c 100644 (file)
@@ -1376,7 +1376,7 @@ static int auerchar_open (struct inode *inode, struct file *file)
        }
 
        /* we have access to the device. Now lets allocate memory */
-       ccp = (pauerchar_t) kmalloc(sizeof(auerchar_t), GFP_KERNEL);
+       ccp = kzalloc(sizeof(auerchar_t), GFP_KERNEL);
        if (ccp == NULL) {
                err ("out of memory");
                ret = -ENOMEM;
@@ -1384,7 +1384,6 @@ static int auerchar_open (struct inode *inode, struct file *file)
        }
 
        /* Initialize device descriptor */
-       memset( ccp, 0, sizeof(auerchar_t));
        init_MUTEX( &ccp->mutex);
        init_MUTEX( &ccp->readmutex);
         auerbuf_init (&ccp->bufctl);
@@ -1912,14 +1911,13 @@ static int auerswald_probe (struct usb_interface *intf,
                return -ENODEV;
 
        /* allocate memory for our device and initialize it */
-       cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL);
+       cp = kzalloc (sizeof(auerswald_t), GFP_KERNEL);
        if (cp == NULL) {
                err ("out of memory");
                goto pfail;
        }
 
        /* Initialize device descriptor */
-       memset (cp, 0, sizeof(auerswald_t));
        init_MUTEX (&cp->mutex);
        cp->usbdev = usbdev;
        auerchain_init (&cp->controlchain);
index 18b1925032a859fa4ce6b436359a15c7c81cb463..41c0161abdb9eb0dc18ab216b4da10fd40e87001 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/ioctl.h>
+#include <linux/pci_ids.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/kref.h>
@@ -51,6 +52,10 @@ MODULE_AUTHOR("Tony Olech");
 MODULE_DESCRIPTION("FTDI ELAN driver");
 MODULE_LICENSE("GPL");
 #define INT_MODULE_PARM(n, v) static int n = v;module_param(n, int, 0444)
+static int distrust_firmware = 1;
+module_param(distrust_firmware, bool, 0);
+MODULE_PARM_DESC(distrust_firmware, "true to distrust firmware power/overcurren"
+        "t setup");
 extern struct platform_driver u132_platform_driver;
 static struct workqueue_struct *status_queue;
 static struct workqueue_struct *command_queue;
@@ -66,7 +71,9 @@ static struct list_head ftdi_static_list;
 * end of the global variables protected by ftdi_module_lock
 */
 #include "usb_u132.h"
-#define TD_DEVNOTRESP 5
+#include <asm/io.h>
+#include "../core/hcd.h"
+#include "../host/ohci.h"
 /* Define these values to match your devices*/
 #define USB_FTDI_ELAN_VENDOR_ID 0x0403
 #define USB_FTDI_ELAN_PRODUCT_ID 0xd6ea
@@ -551,7 +558,7 @@ static void ftdi_elan_status_work(struct work_struct *work)
                 } else {
                         dev_err(&ftdi->udev->dev, "initialized failed - trying "
                                 "again in 10 seconds\n");
-                        work_delay_in_msec = 10 *1000;
+                        work_delay_in_msec = 1 *1000;
                 }
         } else if (ftdi->registered == 0) {
                 work_delay_in_msec = 10;
@@ -2288,82 +2295,288 @@ static int ftdi_elan_checkingPCI(struct usb_ftdi *ftdi)
         }
 }
 
-static int ftdi_elan_enumeratePCI(struct usb_ftdi *ftdi)
+
+#define ftdi_read_pcimem(ftdi, member, data) ftdi_elan_read_pcimem(ftdi, \
+        offsetof(struct ohci_regs, member), 0, data);
+#define ftdi_write_pcimem(ftdi, member, data) ftdi_elan_write_pcimem(ftdi, \
+        offsetof(struct ohci_regs, member), 0, data);
+#define OHCI_QUIRK_AMD756 0x01
+#define OHCI_QUIRK_SUPERIO 0x02
+#define OHCI_QUIRK_INITRESET 0x04
+#define OHCI_BIG_ENDIAN 0x08
+#define OHCI_QUIRK_ZFMICRO 0x10
+#define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
+#define OHCI_INTR_INIT (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | \
+        OHCI_INTR_WDH)
+static int ftdi_elan_check_controller(struct usb_ftdi *ftdi, int quirk)
+{
+        int devices = 0;
+        int retval;
+        u32 hc_control;
+        int num_ports;
+        u32 control;
+        u32 rh_a = -1;
+        u32 status;
+        u32 fminterval;
+        u32 hc_fminterval;
+        u32 periodicstart;
+        u32 cmdstatus;
+        u32 roothub_a;
+        int mask = OHCI_INTR_INIT;
+        int sleep_time = 0;
+        int reset_timeout = 30;        /* ... allow extra time */
+        int temp;
+        retval = ftdi_write_pcimem(ftdi, intrdisable, OHCI_INTR_MIE);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, control, &control);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, roothub.a, &rh_a);
+        if (retval)
+                return retval;
+        num_ports = rh_a & RH_A_NDP;
+        retval = ftdi_read_pcimem(ftdi, fminterval, &hc_fminterval);
+        if (retval)
+                return retval;
+        hc_fminterval &= 0x3fff;
+        if (hc_fminterval != FI) {
+        }
+        hc_fminterval |= FSMP(hc_fminterval) << 16;
+        retval = ftdi_read_pcimem(ftdi, control, &hc_control);
+        if (retval)
+                return retval;
+        switch (hc_control & OHCI_CTRL_HCFS) {
+        case OHCI_USB_OPER:
+                sleep_time = 0;
+                break;
+        case OHCI_USB_SUSPEND:
+        case OHCI_USB_RESUME:
+                hc_control &= OHCI_CTRL_RWC;
+                hc_control |= OHCI_USB_RESUME;
+                sleep_time = 10;
+                break;
+        default:
+                hc_control &= OHCI_CTRL_RWC;
+                hc_control |= OHCI_USB_RESET;
+                sleep_time = 50;
+                break;
+        }
+        retval = ftdi_write_pcimem(ftdi, control, hc_control);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, control, &control);
+        if (retval)
+                return retval;
+        msleep(sleep_time);
+        retval = ftdi_read_pcimem(ftdi, roothub.a, &roothub_a);
+        if (retval)
+                return retval;
+        if (!(roothub_a & RH_A_NPS)) {        /* power down each port */
+                for (temp = 0; temp < num_ports; temp++) {
+                        retval = ftdi_write_pcimem(ftdi,
+                                roothub.portstatus[temp], RH_PS_LSDA);
+                        if (retval)
+                                return retval;
+                }
+        }
+        retval = ftdi_read_pcimem(ftdi, control, &control);
+        if (retval)
+                return retval;
+      retry:retval = ftdi_read_pcimem(ftdi, cmdstatus, &status);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, cmdstatus, OHCI_HCR);
+        if (retval)
+                return retval;
+      extra:{
+                retval = ftdi_read_pcimem(ftdi, cmdstatus, &status);
+                if (retval)
+                        return retval;
+                if (0 != (status & OHCI_HCR)) {
+                        if (--reset_timeout == 0) {
+                                dev_err(&ftdi->udev->dev, "USB HC reset timed o"
+                                        "ut!\n");
+                                return -ENODEV;
+                        } else {
+                                msleep(5);
+                                goto extra;
+                        }
+                }
+        }
+        if (quirk & OHCI_QUIRK_INITRESET) {
+                retval = ftdi_write_pcimem(ftdi, control, hc_control);
+                if (retval)
+                        return retval;
+                retval = ftdi_read_pcimem(ftdi, control, &control);
+                if (retval)
+                        return retval;
+        }
+        retval = ftdi_write_pcimem(ftdi, ed_controlhead, 0x00000000);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, ed_bulkhead, 0x11000000);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, hcca, 0x00000000);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, fminterval, &fminterval);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, fminterval,
+                ((fminterval & FIT) ^ FIT) | hc_fminterval);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, periodicstart,
+                ((9 *hc_fminterval) / 10) & 0x3fff);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, fminterval, &fminterval);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, periodicstart, &periodicstart);
+        if (retval)
+                return retval;
+        if (0 == (fminterval & 0x3fff0000) || 0 == periodicstart) {
+                if (!(quirk & OHCI_QUIRK_INITRESET)) {
+                        quirk |= OHCI_QUIRK_INITRESET;
+                        goto retry;
+                } else
+                        dev_err(&ftdi->udev->dev, "init err(%08x %04x)\n",
+                                fminterval, periodicstart);
+        }                        /* start controller operations */
+        hc_control &= OHCI_CTRL_RWC;
+        hc_control |= OHCI_CONTROL_INIT | OHCI_CTRL_BLE | OHCI_USB_OPER;
+        retval = ftdi_write_pcimem(ftdi, control, hc_control);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, cmdstatus, OHCI_BLF);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, cmdstatus, &cmdstatus);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, control, &control);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, roothub.status, RH_HS_DRWE);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, intrstatus, mask);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, intrdisable,
+                OHCI_INTR_MIE | OHCI_INTR_OC | OHCI_INTR_RHSC | OHCI_INTR_FNO |
+                OHCI_INTR_UE | OHCI_INTR_RD | OHCI_INTR_SF | OHCI_INTR_WDH |
+                OHCI_INTR_SO);
+        if (retval)
+                return retval;        /* handle root hub init quirks ... */
+        retval = ftdi_read_pcimem(ftdi, roothub.a, &roothub_a);
+        if (retval)
+                return retval;
+        roothub_a &= ~(RH_A_PSM | RH_A_OCPM);
+        if (quirk & OHCI_QUIRK_SUPERIO) {
+                roothub_a |= RH_A_NOCP;
+                roothub_a &= ~(RH_A_POTPGT | RH_A_NPS);
+                retval = ftdi_write_pcimem(ftdi, roothub.a, roothub_a);
+                if (retval)
+                        return retval;
+        } else if ((quirk & OHCI_QUIRK_AMD756) || distrust_firmware) {
+                roothub_a |= RH_A_NPS;
+                retval = ftdi_write_pcimem(ftdi, roothub.a, roothub_a);
+                if (retval)
+                        return retval;
+        }
+        retval = ftdi_write_pcimem(ftdi, roothub.status, RH_HS_LPSC);
+        if (retval)
+                return retval;
+        retval = ftdi_write_pcimem(ftdi, roothub.b,
+                (roothub_a & RH_A_NPS) ? 0 : RH_B_PPCM);
+        if (retval)
+                return retval;
+        retval = ftdi_read_pcimem(ftdi, control, &control);
+        if (retval)
+                return retval;
+        mdelay((roothub_a >> 23) & 0x1fe);
+        for (temp = 0; temp < num_ports; temp++) {
+                u32 portstatus;
+                retval = ftdi_read_pcimem(ftdi, roothub.portstatus[temp],
+                        &portstatus);
+                if (retval)
+                        return retval;
+                if (1 & portstatus)
+                        devices += 1;
+        }
+        return devices;
+}
+
+static int ftdi_elan_setup_controller(struct usb_ftdi *ftdi, int fn)
 {
         u32 latence_timer;
-        u32 controlreg;
         int UxxxStatus;
         u32 pcidata;
         int reg = 0;
-        int foundOHCI = 0;
-        u8 fn;
-        int activePCIfn = 0;
-        u32 pciVID = 0;
-        u32 pciPID = 0;
-        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
-        if (UxxxStatus)
-                return UxxxStatus;
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x00000000L);
-        if (UxxxStatus)
-                return UxxxStatus;
-        msleep(750);
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x00000200L | 0x100);
+        int activePCIfn = fn << 8;
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000025FL | 0x2800);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x00000200L | 0x500);
+        reg = 16;
+        UxxxStatus = ftdi_elan_write_config(ftdi, activePCIfn | reg, 0,
+                0xFFFFFFFF);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
+                &pcidata);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000020CL | 0x000);
+        UxxxStatus = ftdi_elan_write_config(ftdi, activePCIfn | reg, 0,
+                0xF0000000);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000020DL | 0x000);
+        UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
+                &pcidata);
         if (UxxxStatus)
                 return UxxxStatus;
-        msleep(250);
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000020FL | 0x000);
+        reg = 12;
+        UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
+                &latence_timer);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        latence_timer &= 0xFFFF00FF;
+        latence_timer |= 0x00001600;
+        UxxxStatus = ftdi_elan_write_config(ftdi, activePCIfn | reg, 0x00,
+                latence_timer);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000025FL | 0x800);
+        UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
+                &pcidata);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        reg = 4;
+        UxxxStatus = ftdi_elan_write_config(ftdi, activePCIfn | reg, 0x00,
+                0x06);
         if (UxxxStatus)
                 return UxxxStatus;
-        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
+                &pcidata);
         if (UxxxStatus)
                 return UxxxStatus;
-        msleep(1000);
-        for (fn = 0; (fn < 4) && (!foundOHCI); fn++) {
-                activePCIfn = fn << 8;
-                ftdi->function = fn + 1;
-                UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
-                        &pcidata);
+        for (reg = 0; reg <= 0x54; reg += 4) {
+                UxxxStatus = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
                 if (UxxxStatus)
                         return UxxxStatus;
-                pciVID = pcidata & 0xFFFF;
-                pciPID = (pcidata >> 16) & 0xFFFF;
-                if ((pciVID == 0x1045) && (pciPID == 0xc861)) {
-                        foundOHCI = 1;
-                } else if ((pciVID == 0x1033) && (pciPID == 0x0035)) {
-                        foundOHCI = 1;
-                } else if ((pciVID == 0x10b9) && (pciPID == 0x5237)) {
-                        foundOHCI = 1;
-                } else if ((pciVID == 0x11c1) && (pciPID == 0x5802)) {
-                        foundOHCI = 1;
-                } else if ((pciVID == 0x11AB) && (pciPID == 0x1FA6)) {
-                }
-        }
-        if (foundOHCI == 0) {
-                return -ENXIO;
         }
-        ftdi->platform_data.vendor = pciVID;
-        ftdi->platform_data.device = pciPID;
+        return 0;
+}
+
+static int ftdi_elan_close_controller(struct usb_ftdi *ftdi, int fn)
+{
+        u32 latence_timer;
+        int UxxxStatus;
+        u32 pcidata;
+        int reg = 0;
+        int activePCIfn = fn << 8;
         UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000025FL | 0x2800);
         if (UxxxStatus)
                 return UxxxStatus;
@@ -2377,7 +2590,7 @@ static int ftdi_elan_enumeratePCI(struct usb_ftdi *ftdi)
         if (UxxxStatus)
                 return UxxxStatus;
         UxxxStatus = ftdi_elan_write_config(ftdi, activePCIfn | reg, 0,
-                0xF0000000);
+                0x00000000);
         if (UxxxStatus)
                 return UxxxStatus;
         UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
@@ -2401,7 +2614,7 @@ static int ftdi_elan_enumeratePCI(struct usb_ftdi *ftdi)
                 return UxxxStatus;
         reg = 4;
         UxxxStatus = ftdi_elan_write_config(ftdi, activePCIfn | reg, 0x00,
-                0x06);
+                0x00);
         if (UxxxStatus)
                 return UxxxStatus;
         UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
@@ -2411,159 +2624,139 @@ static int ftdi_elan_enumeratePCI(struct usb_ftdi *ftdi)
         return 0;
 }
 
+static int ftdi_elan_found_controller(struct usb_ftdi *ftdi, int fn, int quirk)
+{
+        int result;
+        int UxxxStatus;
+        UxxxStatus = ftdi_elan_setup_controller(ftdi, fn);
+        if (UxxxStatus)
+                return UxxxStatus;
+        result = ftdi_elan_check_controller(ftdi, quirk);
+        UxxxStatus = ftdi_elan_close_controller(ftdi, fn);
+        if (UxxxStatus)
+                return UxxxStatus;
+        return result;
+}
+
+static int ftdi_elan_enumeratePCI(struct usb_ftdi *ftdi)
+{
+        u32 controlreg;
+        u8 sensebits;
+        int UxxxStatus;
+        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x00000000L);
+        if (UxxxStatus)
+                return UxxxStatus;
+        msleep(750);
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x00000200L | 0x100);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x00000200L | 0x500);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000020CL | 0x000);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000020DL | 0x000);
+        if (UxxxStatus)
+                return UxxxStatus;
+        msleep(250);
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000020FL | 0x000);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_write_reg(ftdi, 0x0000025FL | 0x800);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        if (UxxxStatus)
+                return UxxxStatus;
+        UxxxStatus = ftdi_elan_read_reg(ftdi, &controlreg);
+        if (UxxxStatus)
+                return UxxxStatus;
+        msleep(1000);
+        sensebits = (controlreg >> 16) & 0x000F;
+        if (0x0D == sensebits)
+                return 0;
+        else
+               return - ENXIO;
+}
+
 static int ftdi_elan_setupOHCI(struct usb_ftdi *ftdi)
 {
+        int UxxxStatus;
         u32 pcidata;
-        int U132Status;
-        int reg;
-        int reset_repeat = 0;
-      do_reset:reg = 8;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x0e, 0x01);
-        if (U132Status)
-                return U132Status;
-      reset_check:{
-                U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-                if (U132Status)
-                        return U132Status;
-                if (pcidata & 1) {
-                        msleep(500);
-                        if (reset_repeat++ > 100) {
-                                reset_repeat = 0;
-                                goto do_reset;
-                        } else
-                                goto reset_check;
+        int reg = 0;
+        u8 fn;
+        int activePCIfn = 0;
+        int max_devices = 0;
+        int controllers = 0;
+        int unrecognized = 0;
+        ftdi->function = 0;
+        for (fn = 0; (fn < 4); fn++) {
+                u32 pciVID = 0;
+                u32 pciPID = 0;
+                int devices = 0;
+                activePCIfn = fn << 8;
+                UxxxStatus = ftdi_elan_read_config(ftdi, activePCIfn | reg, 0,
+                        &pcidata);
+                if (UxxxStatus)
+                        return UxxxStatus;
+                pciVID = pcidata & 0xFFFF;
+                pciPID = (pcidata >> 16) & 0xFFFF;
+                if ((pciVID == PCI_VENDOR_ID_OPTI) && (pciPID == 0xc861)) {
+                        devices = ftdi_elan_found_controller(ftdi, fn, 0);
+                        controllers += 1;
+                } else if ((pciVID == PCI_VENDOR_ID_NEC) && (pciPID == 0x0035))
+                        {
+                        devices = ftdi_elan_found_controller(ftdi, fn, 0);
+                        controllers += 1;
+                } else if ((pciVID == PCI_VENDOR_ID_AL) && (pciPID == 0x5237)) {
+                        devices = ftdi_elan_found_controller(ftdi, fn, 0);
+                        controllers += 1;
+                } else if ((pciVID == PCI_VENDOR_ID_ATT) && (pciPID == 0x5802))
+                        {
+                        devices = ftdi_elan_found_controller(ftdi, fn, 0);
+                        controllers += 1;
+                } else if (pciVID == PCI_VENDOR_ID_AMD && pciPID == 0x740c) {
+                        devices = ftdi_elan_found_controller(ftdi, fn,
+                                OHCI_QUIRK_AMD756);
+                        controllers += 1;
+                } else if (pciVID == PCI_VENDOR_ID_COMPAQ && pciPID == 0xa0f8) {
+                        devices = ftdi_elan_found_controller(ftdi, fn,
+                                OHCI_QUIRK_ZFMICRO);
+                        controllers += 1;
+                } else if (0 == pcidata) {
+                } else
+                        unrecognized += 1;
+                if (devices > max_devices) {
+                        max_devices = devices;
+                        ftdi->function = fn + 1;
+                        ftdi->platform_data.vendor = pciVID;
+                        ftdi->platform_data.device = pciPID;
                 }
         }
-        goto dump_regs;
-        msleep(500);
-        reg = 0x28;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x11000000);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x40;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x2edf);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x34;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x2edf2edf);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 4;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0xA0);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        msleep(250);
-        reg = 8;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x0e, 0x04);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x28;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 8;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x48;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x00001200);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x54;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x58;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x34;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x28002edf);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        msleep(100);
-        reg = 0x50;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x10000);
-        if (U132Status)
-                return U132Status;
-        reg = 0x54;
-      power_check:U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        if (!(pcidata & 1)) {
-                msleep(500);
-                goto power_check;
-        }
-        msleep(3000);
-        reg = 0x54;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x58;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x54;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x02);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x54;
-        U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x10);
-        if (U132Status)
-                return U132Status;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        msleep(750);
-        reg = 0x54;
-        if (0) {
-                U132Status = ftdi_elan_write_pcimem(ftdi, reg, 0x00, 0x02);
-                if (U132Status)
-                        return U132Status;
-        }
-        if (0) {
-                U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-                if (U132Status)
-                        return U132Status;
-        }
-        reg = 0x54;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-        reg = 0x58;
-        U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-        if (U132Status)
-                return U132Status;
-      dump_regs:for (reg = 0; reg <= 0x54; reg += 4) {
-                U132Status = ftdi_elan_read_pcimem(ftdi, reg, 0, &pcidata);
-                if (U132Status)
-                        return U132Status;
+        if (ftdi->function > 0) {
+                UxxxStatus = ftdi_elan_setup_controller(ftdi,
+                        ftdi->function - 1);
+                if (UxxxStatus)
+                        return UxxxStatus;
+                return 0;
+        } else if (controllers > 0) {
+                return -ENXIO;
+        } else if (unrecognized > 0) {
+                return -ENXIO;
+        } else {
+                ftdi->enumerated = 0;
+                return -ENXIO;
         }
-        return 0;
 }
 
 
@@ -2688,6 +2881,7 @@ static void ftdi_elan_disconnect(struct usb_interface *interface)
                         platform_device_unregister(&ftdi->platform_dev);
                         ftdi->synchronized = 0;
                         ftdi->enumerated = 0;
+                        ftdi->initialized = 0;
                         ftdi->registered = 0;
                 }
                 flush_workqueue(status_queue);
index 7163f05c5b27063eb18b7554372fe99280205c8b..0d9de2f739301b6170635f4461f5dded1d9292dc 100644 (file)
@@ -282,6 +282,7 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
                dev->dev = NULL;
                goto out;
        }
+       dev_set_drvdata(dev->dev, dev);
 
        servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1;
 
index 33cd91d11ecaab107c3afb67ba6bada07b0d22e1..67e2fc20eeeb29d8381dddea4588318630725273 100644 (file)
@@ -120,8 +120,8 @@ static void tv_disconnect(struct usb_interface *interface)
        struct trancevibrator *dev;
 
        dev = usb_get_intfdata (interface);
-       usb_set_intfdata(interface, NULL);
        device_remove_file(&interface->dev, &dev_attr_speed);
+       usb_set_intfdata(interface, NULL);
        usb_put_dev(dev->udev);
        kfree(dev);
 }
index a3242be21959561504431d9004415d25ff37b2cc..a6f0f4d934dfd854f6a72550eb9c3b776bc08229 100644 (file)
@@ -79,160 +79,6 @@ struct gl_header {
        struct gl_packet        packets;
 };
 
-#ifdef GENELINK_ACK
-
-// FIXME:  this code is incomplete, not debugged; it doesn't
-// handle interrupts correctly; it should use the generic
-// status IRQ code (which didn't exist back in 2001).
-
-struct gl_priv {
-       struct urb      *irq_urb;
-       char            irq_buf [INTERRUPT_BUFSIZE];
-};
-
-static inline int gl_control_write(struct usbnet *dev, u8 request, u16 value)
-{
-       int retval;
-
-       retval = usb_control_msg(dev->udev,
-                     usb_sndctrlpipe(dev->udev, 0),
-                     request,
-                     USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-                     value,
-                     0,                        // index
-                     0,                        // data buffer
-                     0,                        // size
-                     USB_CTRL_SET_TIMEOUT);
-       return retval;
-}
-
-static void gl_interrupt_complete(struct urb *urb)
-{
-       int status = urb->status;
-
-       switch (status) {
-       case 0:
-               /* success */
-               break;
-       case -ECONNRESET:
-       case -ENOENT:
-       case -ESHUTDOWN:
-               /* this urb is terminated, clean up */
-               dbg("%s - urb shutting down with status: %d",
-                               __FUNCTION__, status);
-               return;
-       default:
-               dbg("%s - nonzero urb status received: %d",
-                               __FUNCTION__, urb->status);
-       }
-
-       status = usb_submit_urb(urb, GFP_ATOMIC);
-       if (status)
-               err("%s - usb_submit_urb failed with result %d",
-                    __FUNCTION__, status);
-}
-
-static int gl_interrupt_read(struct usbnet *dev)
-{
-       struct gl_priv  *priv = dev->priv_data;
-       int             retval;
-
-       // issue usb interrupt read
-       if (priv && priv->irq_urb) {
-               // submit urb
-               if ((retval = usb_submit_urb(priv->irq_urb, GFP_KERNEL)) != 0)
-                       dbg("gl_interrupt_read: submit fail - %X...", retval);
-               else
-                       dbg("gl_interrupt_read: submit success...");
-       }
-
-       return 0;
-}
-
-// check whether another side is connected
-static int genelink_check_connect(struct usbnet *dev)
-{
-       int                     retval;
-
-       dbg("genelink_check_connect...");
-
-       // detect whether another side is connected
-       if ((retval = gl_control_write(dev, GENELINK_CONNECT_WRITE, 0)) != 0) {
-               dbg("%s: genelink_check_connect write fail - %X",
-                       dev->net->name, retval);
-               return retval;
-       }
-
-       // usb interrupt read to ack another side
-       if ((retval = gl_interrupt_read(dev)) != 0) {
-               dbg("%s: genelink_check_connect read fail - %X",
-                       dev->net->name, retval);
-               return retval;
-       }
-
-       dbg("%s: genelink_check_connect read success", dev->net->name);
-       return 0;
-}
-
-// allocate and initialize the private data for genelink
-static int genelink_init(struct usbnet *dev)
-{
-       struct gl_priv *priv;
-
-       // allocate the private data structure
-       if ((priv = kmalloc(sizeof *priv, GFP_KERNEL)) == 0) {
-               dbg("%s: cannot allocate private data per device",
-                       dev->net->name);
-               return -ENOMEM;
-       }
-
-       // allocate irq urb
-       if ((priv->irq_urb = usb_alloc_urb(0, GFP_KERNEL)) == 0) {
-               dbg("%s: cannot allocate private irq urb per device",
-                       dev->net->name);
-               kfree(priv);
-               return -ENOMEM;
-       }
-
-       // fill irq urb
-       usb_fill_int_urb(priv->irq_urb, dev->udev,
-               usb_rcvintpipe(dev->udev, GENELINK_INTERRUPT_PIPE),
-               priv->irq_buf, INTERRUPT_BUFSIZE,
-               gl_interrupt_complete, 0,
-               GENELINK_INTERRUPT_INTERVAL);
-
-       // set private data pointer
-       dev->priv_data = priv;
-
-       return 0;
-}
-
-// release the private data
-static int genelink_free(struct usbnet *dev)
-{
-       struct gl_priv  *priv = dev->priv_data;
-
-       if (!priv)
-               return 0;
-
-// FIXME:  can't cancel here; it's synchronous, and
-// should have happened earlier in any case (interrupt
-// handling needs to be generic)
-
-       // cancel irq urb first
-       usb_kill_urb(priv->irq_urb);
-
-       // free irq urb
-       usb_free_urb(priv->irq_urb);
-
-       // free the private data structure
-       kfree(priv);
-
-       return 0;
-}
-
-#endif
-
 static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 {
        struct gl_header        *header;
index c54235f73cb68b14c1a733536ac0411a91dc3093..e0eecda78ec12cac845fac5831742643db94688f 100644 (file)
 #define        RX_URB_FAIL             3
 
 /* Define these values to match your device */
-#define VENDOR_ID_REALTEK              0x0bda
+#define        VENDOR_ID_REALTEK               0x0bda
 #define        VENDOR_ID_MELCO                 0x0411
-#define VENDOR_ID_MICRONET             0x3980
+#define        VENDOR_ID_MICRONET              0x3980
 #define        VENDOR_ID_LONGSHINE             0x07b8
+#define        VENDOR_ID_OQO                   0x1557
 #define        VENDOR_ID_ZYXEL                 0x0586
 
 #define PRODUCT_ID_RTL8150             0x8150
@@ -144,6 +145,7 @@ static struct usb_device_id rtl8150_table[] = {
        {USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
        {USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},
        {USB_DEVICE(VENDOR_ID_LONGSHINE, PRODUCT_ID_LCS8138TX)},
+       {USB_DEVICE(VENDOR_ID_OQO, PRODUCT_ID_RTL8150)},
        {USB_DEVICE(VENDOR_ID_ZYXEL, PRODUCT_ID_PRESTIGE)},
        {}
 };
index 96c73726d74a4b5fe23a25a489582c13cc2282a1..f2ca76a9cbac147d91bf83214188782793c0a0e7 100644 (file)
 static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
        { USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */
+       { USB_DEVICE(0x1410, 0x1130) }, /* Novatel Wireless S720 CDMA/EV-DO */
+       { USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720 CDMA/EV-DO */
        { USB_DEVICE(0x1410, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */
        { USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */
+       { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */
        { },
 };
 MODULE_DEVICE_TABLE(usb, id_table);
index 2f9b7ac326633a6d6835164d52c7a9c00648e7a2..7ebaffd6ed8643ab43edf52aeb4201e5c6324873 100644 (file)
@@ -69,6 +69,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
        { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
        { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
+       { USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */
        { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
        { } /* Terminating Entry */
 };
index 45cdf9bc43b2bd01ae9daa5bb10f8949386a1cce..6bc1f404e1869c18b32679da0dd93ab8ad9b3aab 100644 (file)
@@ -962,21 +962,6 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi
                        cypress_set_termios(port, &priv->tmp_termios);
                        return (0);
                        break;
-               /* these are called when setting baud rate from gpsd */
-               case TCGETS:
-                       if (copy_to_user((void __user *)arg, port->tty->termios, sizeof(struct termios))) {
-                               return -EFAULT;
-                       }
-                       return (0);
-                       break;
-               case TCSETS:
-                       if (copy_from_user(port->tty->termios, (void __user *)arg, sizeof(struct termios))) {
-                               return -EFAULT;
-                       }
-                       /* here we need to call cypress_set_termios to invoke the new settings */
-                       cypress_set_termios(port, &priv->tmp_termios);
-                       return (0);
-                       break;
                /* This code comes from drivers/char/serial.c and ftdi_sio.c */
                case TIOCMIWAIT:
                        while (priv != NULL) {
index 41b0ad2d56ac97062d353a12779f2d55e2610418..6986e756f7c00897e73e33a963f985bda15c5ccb 100644 (file)
@@ -452,6 +452,7 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(FTDI_VID, LINX_FUTURE_2_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CCSICDU20_0_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CCSICDU40_1_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_CCSMACHX_2_PID) },
        { USB_DEVICE(FTDI_VID, INSIDE_ACCESSO) },
        { USB_DEVICE(INTREPID_VID, INTREPID_VALUECAN_PID) },
        { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) },
index bae117d359af1ba1d38f8e62471111828e11a104..40dd394de58da7c26b42c13ead3b2b1ef8670a9a 100644 (file)
 
 /* CCS Inc. ICDU/ICDU40 product ID - the FT232BM is used in an in-circuit-debugger */
 /* unit for PIC16's/PIC18's */
-#define FTDI_CCSICDU20_0_PID    0xF9D0     
-#define FTDI_CCSICDU40_1_PID    0xF9D1     
+#define FTDI_CCSICDU20_0_PID    0xF9D0
+#define FTDI_CCSICDU40_1_PID    0xF9D1
+#define FTDI_CCSMACHX_2_PID     0xF9D2
 
 /* Inside Accesso contactless reader (http://www.insidefr.com) */
 #define INSIDE_ACCESSO         0xFAD0
index 77b977206a8c09186d1d8e42203e40c4774ad790..d3be9214c7c117c70489db857935900ad60eba9f 100644 (file)
@@ -14,6 +14,9 @@
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/usb/serial.h>
+#include <asm/uaccess.h>
+
+static int debug;
 
 static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x1404, 0xcddc) },
@@ -21,6 +24,26 @@ static struct usb_device_id id_table [] = {
 };
 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;
+
+       dbg("%s - port %d, cmd 0x%04x", __FUNCTION__, port->number, cmd);
+
+       if (cmd == TCSETSF) {
+               if (user_termios_to_kernel_termios(&t, (void __user *)arg))
+                       return -EFAULT;
+
+               dbg("%s - iflag:%x oflag:%x cflag:%x lflag:%x", __FUNCTION__,
+                   t.c_iflag, t.c_oflag, t.c_cflag, t.c_lflag);
+
+               if (!(t.c_lflag & ICANON))
+                       return -EINVAL;
+       }
+       return -ENOIOCTLCMD;
+}
+
 static struct usb_driver funsoft_driver = {
        .name =         "funsoft",
        .probe =        usb_serial_probe,
@@ -39,6 +62,7 @@ static struct usb_serial_driver funsoft_device = {
        .num_bulk_in =          NUM_DONT_CARE,
        .num_bulk_out =         NUM_DONT_CARE,
        .num_ports =            1,
+       .ioctl =                funsoft_ioctl,
 };
 
 static int __init funsoft_init(void)
@@ -63,3 +87,6 @@ static void __exit funsoft_exit(void)
 module_init(funsoft_init);
 module_exit(funsoft_exit);
 MODULE_LICENSE("GPL");
+
+module_param(debug, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(debug, "Debug enabled or not");
index 73d755df4840e32527dfbb10386723726295f4cc..5c4b06a99ac0e00fb44d71fb553da436da98d5c5 100644 (file)
@@ -87,10 +87,6 @@ static int  klsi_105_write_room          (struct usb_serial_port *port);
 static void klsi_105_read_bulk_callback  (struct urb *urb);
 static void klsi_105_set_termios         (struct usb_serial_port *port,
                                          struct ktermios *old);
-static int  klsi_105_ioctl              (struct usb_serial_port *port,
-                                         struct file * file,
-                                         unsigned int cmd,
-                                         unsigned long arg);
 static void klsi_105_throttle           (struct usb_serial_port *port);
 static void klsi_105_unthrottle                 (struct usb_serial_port *port);
 /*
@@ -140,7 +136,6 @@ static struct usb_serial_driver kl5kusb105d_device = {
        .chars_in_buffer =   klsi_105_chars_in_buffer,
        .write_room =        klsi_105_write_room,
        .read_bulk_callback =klsi_105_read_bulk_callback,
-       .ioctl =             klsi_105_ioctl,
        .set_termios =       klsi_105_set_termios,
        /*.break_ctl =       klsi_105_break_ctl,*/
        .tiocmget =          klsi_105_tiocmget,
@@ -899,69 +894,6 @@ static int klsi_105_tiocmset (struct usb_serial_port *port, struct file *file,
 */
        return retval;
 }
-                                       
-static int klsi_105_ioctl (struct usb_serial_port *port, struct file * file,
-                          unsigned int cmd, unsigned long arg)
-{
-       struct klsi_105_private *priv = usb_get_serial_port_data(port);
-       void __user *user_arg = (void __user *)arg;
-       
-       dbg("%scmd=0x%x", __FUNCTION__, cmd);
-
-       /* Based on code from acm.c and others */
-       switch (cmd) {
-       case TIOCMIWAIT:
-               /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
-               /* TODO */
-               dbg("%s - TIOCMIWAIT not handled", __FUNCTION__);
-               return -ENOIOCTLCMD;
-       case TIOCGICOUNT:
-               /* return count of modemline transitions */
-               /* TODO */
-               dbg("%s - TIOCGICOUNT not handled", __FUNCTION__);
-               return -ENOIOCTLCMD;
-       case TCGETS:
-               /* return current info to caller */
-               dbg("%s - TCGETS data faked/incomplete", __FUNCTION__);
-
-               if (!access_ok(VERIFY_WRITE, user_arg, sizeof(struct termios)))
-                       return -EFAULT;
-
-               if (kernel_termios_to_user_termios((struct termios __user *)arg,
-                                                  &priv->termios))
-                       return -EFAULT;
-               return 0;
-       case TCSETS:
-               /* set port termios to the one given by the user */
-               dbg("%s - TCSETS not handled", __FUNCTION__);
-
-               if (!access_ok(VERIFY_READ, user_arg, sizeof(struct termios)))
-                       return -EFAULT;
-
-               if (user_termios_to_kernel_termios(&priv->termios,
-                                                  (struct termios __user *)arg))
-                       return -EFAULT;
-               klsi_105_set_termios(port, &priv->termios);
-               return 0;
-       case TCSETSW: {
-               /* set port termios and try to wait for completion of last
-                * write operation */
-               /* We guess here. If there are not too many write urbs
-                * outstanding, we lie. */
-               /* what is the right way to wait here? schedule() ? */
-               /*
-               while (klsi_105_chars_in_buffer(port) > (NUM_URBS / 4 ) * URB_TRANSFER_BUFFER_SIZE)
-                           schedule();
-                */
-               return -ENOIOCTLCMD;
-                     }
-       default:
-               dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
-               return(-ENOIOCTLCMD);
-               break;
-       }
-       return 0;
-} /* klsi_105_ioctl */
 
 static void klsi_105_throttle (struct usb_serial_port *port)
 {
index 8cc728a49e41fce1b644e42507c2106491bc6ac6..83f661403ba110fbae190e98fb8de28a6bbe020d 100644 (file)
@@ -2460,12 +2460,6 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
                tty_ldisc_deref(ld);
                return 0;
 
-       case TCGETS:
-               if (kernel_termios_to_user_termios
-                   ((struct termios __user *)argp, tty->termios))
-                       return -EFAULT;
-               return 0;
-
        case TIOCSERGETLSR:
                dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number);
                return mos7840_get_lsr_info(mos7840_port, argp);
index 0ae4098718c360601976de27738cad3264b5a0c0..819266b7e2f8e3368ddb6f20201918d44a14a889 100644 (file)
@@ -79,6 +79,7 @@ static int  option_send_setup(struct usb_serial_port *port);
 #define OPTION_PRODUCT_COBRA            0x6500
 #define OPTION_PRODUCT_COBRA2           0x6600
 #define HUAWEI_PRODUCT_E600             0x1001
+#define HUAWEI_PRODUCT_E220             0x1003
 #define AUDIOVOX_PRODUCT_AIRCARD        0x0112
 #define NOVATELWIRELESS_PRODUCT_U740    0x1400
 #define ANYDATA_PRODUCT_ID              0x6501
@@ -90,6 +91,7 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
+       { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
        { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) },
        { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) },
@@ -103,6 +105,7 @@ static struct usb_device_id option_ids1[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
+       { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
        { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) },
        { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) },
index db8b26012c756ede717156b7a5e3ab878f19bac5..5fe7ff441a094def351508a8fa8e069364a04b89 100644 (file)
@@ -153,6 +153,13 @@ UNUSUAL_DEV(  0x0421, 0x042e, 0x0100, 0x0100,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
 
+/* Reported by <honkkis@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x0433, 0x0100, 0x0100,
+               "Nokia",
+               "E70",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
+
 /* Reported by Jon Hart <Jon.Hart@web.de> */
 UNUSUAL_DEV(  0x0421, 0x0434, 0x0100, 0x0100,
                "Nokia",
@@ -1328,6 +1335,15 @@ UNUSUAL_DEV(  0x1210, 0x0003, 0x0100, 0x0100,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_IGNORE_RESIDUE ),
 
+/* This prevents the kernel from detecting the virtual cd-drive with the
+ * Windows drivers.  <johann.wilhelm@student.tugraz.at>
+*/
+UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0xffff,
+               "HUAWEI",
+               "E220 USB-UMTS Install",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_DEVICE),
+
 /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
 UNUSUAL_DEV(  0x132b, 0x000b, 0x0001, 0x0001,
                "Minolta",
index 3adf6ab0768f87a6e617cf735a572710d2c99a26..23a6bcc3e3ceb74703d1f9aeb76718b0de7e7ede 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Frame buffer device for IBM GXT4500P display adaptor
+ * Frame buffer device for IBM GXT4500P and GXT6000P display adaptors
  *
  * Copyright (C) 2006 Paul Mackerras, IBM Corp. <paulus@samba.org>
  */
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
 #include <linux/delay.h>
+#include <linux/string.h>
 
 #define PCI_DEVICE_ID_IBM_GXT4500P     0x21c
+#define PCI_DEVICE_ID_IBM_GXT6000P     0x170
 
 /* GXT4500P registers */
 
@@ -94,6 +96,7 @@ static const unsigned char pixsize[] = {
 #define PLL_M                  0x4040
 #define PLL_N                  0x4044
 #define PLL_POSTDIV            0x4048
+#define PLL_C                  0x404c
 
 /* Hardware cursor */
 #define CURSOR_X               0x4078
@@ -140,6 +143,7 @@ struct gxt4500_par {
        int pixfmt;             /* pixel format, see DFA_PIX_* values */
 
        /* PLL parameters */
+       int refclk_ps;          /* ref clock period in picoseconds */
        int pll_m;              /* ref clock divisor */
        int pll_n;              /* VCO divisor */
        int pll_pd1;            /* first post-divisor */
@@ -166,6 +170,21 @@ static const struct fb_videomode defaultmode __devinitdata = {
        .vmode = FB_VMODE_NONINTERLACED
 };
 
+/* List of supported cards */
+enum gxt_cards {
+       GXT4500P,
+       GXT6000P
+};
+
+/* Card-specific information */
+static const struct cardinfo {
+       int     refclk_ps;      /* period of PLL reference clock in ps */
+       const char *cardname;
+} cardinfo[] = {
+       [GXT4500P] = { .refclk_ps = 9259, .cardname = "IBM GXT4500P" },
+       [GXT6000P] = { .refclk_ps = 40000, .cardname = "IBM GXT6000P" },
+};
+
 /*
  * The refclk and VCO dividers appear to use a linear feedback shift
  * register, which gets reloaded when it reaches a terminal value, at
@@ -203,27 +222,16 @@ static const unsigned char ndivtab[] = {
 /* 130 */      0x9e, 0x4f, 0x27, 0x93, 0xc9, 0xe4, 0x72, 0x39, 0x1c, 0x0e,
 /* 140 */      0x87, 0xc3, 0x61, 0x30, 0x18, 0x8c, 0xc6, 0x63, 0x31, 0x98,
 /* 150 */      0xcc, 0xe6, 0x73, 0xb9, 0x5c, 0x2e, 0x97, 0x4b, 0xa5, 0xd2,
-/* 160 */      0x69, 0xb4, 0xda, 0xed, 0x76, 0xbb, 0x5d, 0xae, 0xd7, 0x6b,
-/* 170 */      0xb5, 0x5a, 0xad, 0x56, 0xab, 0xd5, 0x6a, 0x35, 0x1a, 0x8d,
-/* 180 */      0x46, 0x23, 0x11, 0x88, 0x44, 0x22, 0x91, 0xc8, 0x64, 0x32,
-/* 190 */      0x19, 0x0c, 0x86, 0x43, 0x21, 0x10, 0x08, 0x04, 0x02, 0x81,
-/* 200 */      0x40, 0xa0, 0xd0, 0x68, 0x34, 0x9a, 0xcd, 0x66, 0x33, 0x99,
-/* 210 */      0x4c, 0xa6, 0x53, 0xa9, 0xd4, 0xea, 0x75, 0x3a, 0x9d, 0xce,
-/* 220 */      0xe7, 0xf3, 0xf9, 0x7c, 0x3e, 0x1f, 0x8f, 0x47, 0xa3, 0x51,
-/* 230 */      0xa8, 0x54, 0xaa, 0x55, 0x2a, 0x15, 0x0a, 0x05, 0x82, 0xc1,
-/* 240 */      0x60, 0xb0, 0x58, 0xac, 0xd6, 0xeb, 0xf5, 0x7a, 0xbd, 0xde,
-/* 250 */      0x6f, 0x37, 0x1b, 0x0d, 0x06, 0x03, 0x01,
+/* 160 */      0x69,
 };
 
-#define REF_PERIOD_PS  9259    /* period of reference clock in ps */
-
 static int calc_pll(int period_ps, struct gxt4500_par *par)
 {
        int m, n, pdiv1, pdiv2, postdiv;
-       int pll_period, best_error, t;
+       int pll_period, best_error, t, intf;
 
-       /* only deal with range 1MHz - 400MHz */
-       if (period_ps < 2500 || period_ps > 1000000)
+       /* only deal with range 5MHz - 300MHz */
+       if (period_ps < 3333 || period_ps > 200000)
                return -1;
 
        best_error = 1000000;
@@ -231,14 +239,17 @@ static int calc_pll(int period_ps, struct gxt4500_par *par)
                for (pdiv2 = 1; pdiv2 <= pdiv1; ++pdiv2) {
                        postdiv = pdiv1 * pdiv2;
                        pll_period = (period_ps + postdiv - 1) / postdiv;
-                       /* keep pll in range 500..1250 MHz */
-                       if (pll_period < 800 || pll_period > 2000)
+                       /* keep pll in range 350..600 MHz */
+                       if (pll_period < 1666 || pll_period > 2857)
                                continue;
-                       for (m = 3; m <= 40; ++m) {
-                               n = REF_PERIOD_PS * m * postdiv / period_ps;
-                               if (n < 5 || n > 256)
+                       for (m = 1; m <= 64; ++m) {
+                               intf = m * par->refclk_ps;
+                               if (intf > 500000)
+                                       break;
+                               n = intf * postdiv / period_ps;
+                               if (n < 3 || n > 160)
                                        continue;
-                               t = REF_PERIOD_PS * m * postdiv / n;
+                               t = par->refclk_ps * m * postdiv / n;
                                t -= period_ps;
                                if (t >= 0 && t < best_error) {
                                        par->pll_m = m;
@@ -257,7 +268,7 @@ static int calc_pll(int period_ps, struct gxt4500_par *par)
 
 static int calc_pixclock(struct gxt4500_par *par)
 {
-       return REF_PERIOD_PS * par->pll_m * par->pll_pd1 * par->pll_pd2
+       return par->refclk_ps * par->pll_m * par->pll_pd1 * par->pll_pd2
                / par->pll_n;
 }
 
@@ -357,7 +368,7 @@ static int gxt4500_set_par(struct fb_info *info)
        struct gxt4500_par *par = info->par;
        struct fb_var_screeninfo *var = &info->var;
        int err;
-       u32 ctrlreg;
+       u32 ctrlreg, tmp;
        unsigned int dfa_ctl, pixfmt, stride;
        unsigned int wid_tiles, i;
        unsigned int prefetch_pix, htot;
@@ -376,10 +387,25 @@ static int gxt4500_set_par(struct fb_info *info)
        writereg(par, DTG_CONTROL, ctrlreg);
 
        /* set PLL registers */
+       tmp = readreg(par, PLL_C) & ~0x7f;
+       if (par->pll_n < 38)
+               tmp |= 0x29;
+       if (par->pll_n < 69)
+               tmp |= 0x35;
+       else if (par->pll_n < 100)
+               tmp |= 0x76;
+       else
+               tmp |= 0x7e;
+       writereg(par, PLL_C, tmp);
        writereg(par, PLL_M, mdivtab[par->pll_m - 1]);
        writereg(par, PLL_N, ndivtab[par->pll_n - 2]);
-       writereg(par, PLL_POSTDIV,
-                ((8 - par->pll_pd1) << 3) | (8 - par->pll_pd2));
+       tmp = ((8 - par->pll_pd2) << 3) | (8 - par->pll_pd1);
+       if (par->pll_pd1 == 8 || par->pll_pd2 == 8) {
+               /* work around erratum */
+               writereg(par, PLL_POSTDIV, tmp | 0x9);
+               udelay(1);
+       }
+       writereg(par, PLL_POSTDIV, tmp);
        msleep(20);
 
        /* turn off hardware cursor */
@@ -483,8 +509,8 @@ static int gxt4500_setcolreg(unsigned int reg, unsigned int red,
 
        if (reg > 1023)
                return 1;
-       cmap_entry = ((transp & 0xff00) << 16) | ((blue & 0xff00) << 8) |
-               (green & 0xff00) | (red >> 8);
+       cmap_entry = ((transp & 0xff00) << 16) | ((red & 0xff00) << 8) |
+               (green & 0xff00) | (blue >> 8);
        writereg(par, CMAP + reg * 4, cmap_entry);
 
        if (reg < 16 && par->pixfmt != DFA_PIX_8BIT) {
@@ -585,6 +611,7 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
        struct gxt4500_par *par;
        struct fb_info *info;
        struct fb_var_screeninfo var;
+       enum gxt_cards cardtype;
 
        err = pci_enable_device(pdev);
        if (err) {
@@ -613,7 +640,11 @@ static int __devinit gxt4500_probe(struct pci_dev *pdev,
                goto err_free_fb;
        }
        par = info->par;
+       cardtype = ent->driver_data;
+       par->refclk_ps = cardinfo[cardtype].refclk_ps;
        info->fix = gxt4500_fix;
+       strlcpy(info->fix.id, cardinfo[cardtype].cardname,
+               sizeof(info->fix.id));
        info->pseudo_palette = par->pseudo_palette;
 
        info->fix.mmio_start = reg_phys;
@@ -703,8 +734,10 @@ static void __devexit gxt4500_remove(struct pci_dev *pdev)
 
 /* supported chipsets */
 static const struct pci_device_id gxt4500_pci_tbl[] = {
-       { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4500P,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT4500P),
+         .driver_data = GXT4500P },
+       { PCI_DEVICE(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_GXT6000P),
+         .driver_data = GXT6000P },
        { 0 }
 };
 
@@ -735,7 +768,7 @@ static void __exit gxt4500_exit(void)
 module_exit(gxt4500_exit);
 
 MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
-MODULE_DESCRIPTION("FBDev driver for IBM GXT4500P");
+MODULE_DESCRIPTION("FBDev driver for IBM GXT4500P/6000P");
 MODULE_LICENSE("GPL");
 module_param(mode_option, charp, 0);
 MODULE_PARM_DESC(mode_option, "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\"");
index 38eb0b69c2d7ab10961c0f7eedbf094a137e7ac6..b4947c810706c14c95d9406a51cebad10d20c47e 100644 (file)
@@ -1216,7 +1216,7 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
                done:
                        if (res_specified) {
                                dev_info(dev, "overriding resolution: %dx%d\n", xres, yres);
-                               inf->xres = xres; inf->yres = yres;
+                               inf->modes[0].xres = xres; inf->modes[0].yres = yres;
                        }
                        if (bpp_specified)
                                switch (bpp) {
@@ -1225,48 +1225,48 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
                                case 4:
                                case 8:
                                case 16:
-                                       inf->bpp = bpp;
+                                       inf->modes[0].bpp = bpp;
                                        dev_info(dev, "overriding bit depth: %d\n", bpp);
                                        break;
                                default:
                                        dev_err(dev, "Depth %d is not valid\n", bpp);
                                }
                 } else if (!strncmp(this_opt, "pixclock:", 9)) {
-                        inf->pixclock = simple_strtoul(this_opt+9, NULL, 0);
-                       dev_info(dev, "override pixclock: %ld\n", inf->pixclock);
+                        inf->modes[0].pixclock = simple_strtoul(this_opt+9, NULL, 0);
+                       dev_info(dev, "override pixclock: %ld\n", inf->modes[0].pixclock);
                 } else if (!strncmp(this_opt, "left:", 5)) {
-                        inf->left_margin = simple_strtoul(this_opt+5, NULL, 0);
-                       dev_info(dev, "override left: %u\n", inf->left_margin);
+                        inf->modes[0].left_margin = simple_strtoul(this_opt+5, NULL, 0);
+                       dev_info(dev, "override left: %u\n", inf->modes[0].left_margin);
                 } else if (!strncmp(this_opt, "right:", 6)) {
-                        inf->right_margin = simple_strtoul(this_opt+6, NULL, 0);
-                       dev_info(dev, "override right: %u\n", inf->right_margin);
+                        inf->modes[0].right_margin = simple_strtoul(this_opt+6, NULL, 0);
+                       dev_info(dev, "override right: %u\n", inf->modes[0].right_margin);
                 } else if (!strncmp(this_opt, "upper:", 6)) {
-                        inf->upper_margin = simple_strtoul(this_opt+6, NULL, 0);
-                       dev_info(dev, "override upper: %u\n", inf->upper_margin);
+                        inf->modes[0].upper_margin = simple_strtoul(this_opt+6, NULL, 0);
+                       dev_info(dev, "override upper: %u\n", inf->modes[0].upper_margin);
                 } else if (!strncmp(this_opt, "lower:", 6)) {
-                        inf->lower_margin = simple_strtoul(this_opt+6, NULL, 0);
-                       dev_info(dev, "override lower: %u\n", inf->lower_margin);
+                        inf->modes[0].lower_margin = simple_strtoul(this_opt+6, NULL, 0);
+                       dev_info(dev, "override lower: %u\n", inf->modes[0].lower_margin);
                 } else if (!strncmp(this_opt, "hsynclen:", 9)) {
-                        inf->hsync_len = simple_strtoul(this_opt+9, NULL, 0);
-                       dev_info(dev, "override hsynclen: %u\n", inf->hsync_len);
+                        inf->modes[0].hsync_len = simple_strtoul(this_opt+9, NULL, 0);
+                       dev_info(dev, "override hsynclen: %u\n", inf->modes[0].hsync_len);
                 } else if (!strncmp(this_opt, "vsynclen:", 9)) {
-                        inf->vsync_len = simple_strtoul(this_opt+9, NULL, 0);
-                       dev_info(dev, "override vsynclen: %u\n", inf->vsync_len);
+                        inf->modes[0].vsync_len = simple_strtoul(this_opt+9, NULL, 0);
+                       dev_info(dev, "override vsynclen: %u\n", inf->modes[0].vsync_len);
                 } else if (!strncmp(this_opt, "hsync:", 6)) {
                         if (simple_strtoul(this_opt+6, NULL, 0) == 0) {
                                dev_info(dev, "override hsync: Active Low\n");
-                               inf->sync &= ~FB_SYNC_HOR_HIGH_ACT;
+                               inf->modes[0].sync &= ~FB_SYNC_HOR_HIGH_ACT;
                        } else {
                                dev_info(dev, "override hsync: Active High\n");
-                               inf->sync |= FB_SYNC_HOR_HIGH_ACT;
+                               inf->modes[0].sync |= FB_SYNC_HOR_HIGH_ACT;
                        }
                 } else if (!strncmp(this_opt, "vsync:", 6)) {
                         if (simple_strtoul(this_opt+6, NULL, 0) == 0) {
                                dev_info(dev, "override vsync: Active Low\n");
-                               inf->sync &= ~FB_SYNC_VERT_HIGH_ACT;
+                               inf->modes[0].sync &= ~FB_SYNC_VERT_HIGH_ACT;
                        } else {
                                dev_info(dev, "override vsync: Active High\n");
-                               inf->sync |= FB_SYNC_VERT_HIGH_ACT;
+                               inf->modes[0].sync |= FB_SYNC_VERT_HIGH_ACT;
                        }
                 } else if (!strncmp(this_opt, "dpc:", 4)) {
                         if (simple_strtoul(this_opt+4, NULL, 0) == 0) {
index cd10b18150b879f15ddc919e611d4e789fd8771c..5d2a4a4b731c66f0b17efd148d0827cde4f72cc2 100644 (file)
@@ -1200,9 +1200,9 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, u_int state)
  * Our LCD controller task (which is called when we blank or unblank)
  * via keventd.
  */
-static void sa1100fb_task(void *dummy)
+static void sa1100fb_task(struct work_struct *w)
 {
-       struct sa1100fb_info *fbi = dummy;
+       struct sa1100fb_info *fbi = container_of(w, struct sa1100fb_info, task);
        u_int state = xchg(&fbi->task_state, -1);
 
        set_ctrlr_state(fbi, state);
@@ -1444,7 +1444,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
                                          fbi->max_bpp / 8;
 
        init_waitqueue_head(&fbi->ctrlr_wait);
-       INIT_WORK(&fbi->task, sa1100fb_task, fbi);
+       INIT_WORK(&fbi->task, sa1100fb_task);
        init_MUTEX(&fbi->ctrlr_sem);
 
        return fbi;
index 276ff3baaafec7722d92a2e1ba125eb034e7e230..8cd2417a14dbb08894389195e26019ae421bdf99 100644 (file)
@@ -1198,13 +1198,16 @@ config EFS_FS
 
 config JFFS_FS
        tristate "Journalling Flash File System (JFFS) support"
-       depends on MTD && BLOCK
+       depends on MTD && BLOCK && BROKEN
        help
          JFFS is the Journalling Flash File System developed by Axis
          Communications in Sweden, aimed at providing a crash/powerdown-safe
          file system for disk-less embedded devices. Further information is
          available at (<http://developer.axis.com/software/jffs/>).
 
+         NOTE: This filesystem is deprecated and is scheduled for removal in
+         2.6.21.  See Documentation/feature-removal-schedule.txt
+
 config JFFS_FS_VERBOSE
        int "JFFS debugging verbosity (0 = quiet, 3 = noisy)"
        depends on JFFS_FS
index d1f1b54d3108c6bb52ebc25ce285451eecab8e9b..263f88e4dffb8bcd617742374d0934d316be948f 100644 (file)
@@ -2834,7 +2834,7 @@ int try_to_free_buffers(struct page *page)
        int ret = 0;
 
        BUG_ON(!PageLocked(page));
-       if (PageWriteback(page))
+       if (PageDirty(page) || PageWriteback(page))
                return 0;
 
        if (mapping == NULL) {          /* can this still happen? */
@@ -2845,22 +2845,6 @@ int try_to_free_buffers(struct page *page)
        spin_lock(&mapping->private_lock);
        ret = drop_buffers(page, &buffers_to_free);
        spin_unlock(&mapping->private_lock);
-       if (ret) {
-               /*
-                * If the filesystem writes its buffers by hand (eg ext3)
-                * then we can have clean buffers against a dirty page.  We
-                * clean the page here; otherwise later reattachment of buffers
-                * could encounter a non-uptodate page, which is unresolvable.
-                * This only applies in the rare case where try_to_free_buffers
-                * succeeds but the page is not freed.
-                *
-                * Also, during truncate, discard_buffer will have marked all
-                * the page's buffers clean.  We discover that here and clean
-                * the page also.
-                */
-               if (test_clear_page_dirty(page))
-                       task_io_account_cancelled_write(PAGE_CACHE_SIZE);
-       }
 out:
        if (buffers_to_free) {
                struct buffer_head *bh = buffers_to_free;
index 8f2791fc84477cd449c08addb52892556deda83a..9be3a440c42a084ba5c335d05d77218c1a480b21 100644 (file)
@@ -143,7 +143,7 @@ static DECLARE_WAIT_QUEUE_HEAD(lowcomms_recv_waitq);
 /* An array of pointers to connections, indexed by NODEID */
 static struct connection **connections;
 static DECLARE_MUTEX(connections_lock);
-static kmem_cache_t *con_cache;
+static struct kmem_cache *con_cache;
 static int conn_array_size;
 
 /* List of sockets that have reads pending */
index 857fa49e984ca025b36a653aced4af23d56f20b5..c5575de01113eb24aa182c77b35d46d0f0fced48 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -206,7 +206,7 @@ static int expand_fdtable(struct files_struct *files, int nr)
                copy_fdtable(new_fdt, cur_fdt);
                rcu_assign_pointer(files->fdt, new_fdt);
                if (cur_fdt->max_fds > NR_OPEN_DEFAULT)
-                       call_rcu(&cur_fdt->rcu, free_fdtable_rcu);
+                       free_fdtable(cur_fdt);
        } else {
                /* Somebody else expanded, so undo our attempt */
                free_fdarr(new_fdt);
index 1387749201b397a8d020dd1b137dd66b780600aa..f63efe1337ece4b2547bc62461436d1c84b58867 100644 (file)
@@ -483,10 +483,8 @@ static int fuse_commit_write(struct file *file, struct page *page,
                        i_size_write(inode, pos);
                spin_unlock(&fc->lock);
 
-               if (offset == 0 && to == PAGE_CACHE_SIZE) {
-                       clear_page_dirty(page);
+               if (offset == 0 && to == PAGE_CACHE_SIZE)
                        SetPageUptodate(page);
-               }
        }
        fuse_invalidate_attr(inode);
        return err;
index c0791cbacad91e614652be6e10a868099107098e..6a2ffa2db14f55566db9b6f9d643218afa6d5b59 100644 (file)
@@ -34,7 +34,9 @@ config GFS2_FS_LOCKING_NOLOCK
 
 config GFS2_FS_LOCKING_DLM
        tristate "GFS2 DLM locking module"
-       depends on GFS2_FS
+       depends on GFS2_FS && NET && INET && (IPV6 || IPV6=n)
+       select IP_SCTP if DLM_SCTP
+       select CONFIGFS_FS
        select DLM
        help
        Multiple node locking module for GFS2
index ed2c22340ad73c0a807bacb7c1baffbf27dfaafb..4f4cd132b571337b8145d2c7432056b6d92b8d61 100644 (file)
@@ -176,7 +176,7 @@ static int hugetlbfs_commit_write(struct file *file,
 
 static void truncate_huge_page(struct page *page)
 {
-       clear_page_dirty(page);
+       cancel_dirty_page(page, /* No IO accounting for huge pages? */0);
        ClearPageUptodate(page);
        remove_from_page_cache(page);
        put_page(page);
index 10be51290a27e887c7cc503dbbb21ef4cc82301e..be4648bc7a2f8febe584a999040599bac87edfb6 100644 (file)
@@ -248,8 +248,12 @@ write_out_data:
                                bufs = 0;
                                goto write_out_data;
                        }
-               }
-               else {
+               } else if (!locked && buffer_locked(bh)) {
+                       __journal_file_buffer(jh, commit_transaction,
+                                               BJ_Locked);
+                       jbd_unlock_bh_state(bh);
+                       put_bh(bh);
+               } else {
                        BUFFER_TRACE(bh, "writeout complete: unfile");
                        __journal_unfile_buffer(jh);
                        jbd_unlock_bh_state(bh);
index b1a1c7296014de6dc0da37af7b4cfade89639eec..ceaf03b94935c2b021efa38de64a228b1f5ca037 100644 (file)
@@ -764,22 +764,9 @@ void release_metapage(struct metapage * mp)
        } else if (mp->lsn)     /* discard_metapage doesn't remove it */
                remove_from_logsync(mp);
 
-#if MPS_PER_PAGE == 1
-       /*
-        * If we know this is the only thing in the page, we can throw
-        * the page out of the page cache.  If pages are larger, we
-        * don't want to do this.
-        */
-
-       /* Retest mp->count since we may have released page lock */
-       if (test_bit(META_discard, &mp->flag) && !mp->count) {
-               clear_page_dirty(page);
-               ClearPageUptodate(page);
-       }
-#else
        /* Try to keep metapages from using up too much memory */
        drop_metapage(page, mp);
-#endif
+
        unlock_page(page);
        page_cache_release(page);
 }
index 9a06e8e48e8dfb366a8c08bd387985788391a5d8..68090e84f589305ebe80ee57e723c86494ca6143 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -935,8 +935,9 @@ struct file *create_write_pipe(void)
 
 void free_write_pipe(struct file *f)
 {
-       mntput(f->f_path.mnt);
+       free_pipe_info(f->f_dentry->d_inode);
        dput(f->f_path.dentry);
+       mntput(f->f_path.mnt);
        put_filp(f);
 }
 
@@ -994,6 +995,8 @@ int do_pipe(int *fd)
  err_fdr:
        put_unused_fd(fdr);
  err_read_pipe:
+       dput(fr->f_dentry);
+       mntput(fr->f_vfsmnt);
        put_filp(fr);
  err_write_pipe:
        free_write_pipe(fw);
index 5ddbc34535f9300ddbe8dc0578d67d0dc7dccea8..8ffb880d2f466a9f850cbe69f468fb51ad2dcaf5 100644 (file)
@@ -34,7 +34,5 @@ void fsstack_copy_attr_all(struct inode *dest, const struct inode *src,
        dest->i_ctime = src->i_ctime;
        dest->i_blkbits = src->i_blkbits;
        dest->i_flags = src->i_flags;
-
-       fsstack_copy_inode_size(dest, src);
 }
 EXPORT_SYMBOL_GPL(fsstack_copy_attr_all);
index dc9e7dc07fb7d1be9a8c899f940cccd2fb2000be..6f9707a1b95438312b27a2e32e0bdcbf557244ac 100644 (file)
@@ -528,9 +528,6 @@ static struct file_system_type v7_fs_type = {
        .fs_flags       = FS_REQUIRES_DEV,
 };
 
-extern int sysv_init_icache(void) __init;
-extern void sysv_destroy_icache(void);
-
 static int __init init_sysv_fs(void)
 {
        int error;
index 9dcc82120935baba74960a691fc0ef15d2b1009b..dcb18b2171feafbb7d2d13d1d45bcb2e312fe77e 100644 (file)
@@ -143,6 +143,9 @@ extern int sysv_sync_inode(struct inode *);
 extern int sysv_sync_file(struct file *, struct dentry *, int);
 extern void sysv_set_inode(struct inode *, dev_t);
 extern int sysv_getattr(struct vfsmount *, struct dentry *, struct kstat *);
+extern int sysv_init_icache(void);
+extern void sysv_destroy_icache(void);
+
 
 /* dir.c */
 extern struct sysv_dir_entry *sysv_find_entry(struct dentry *, struct page **);
index b56eb754e2d23d6f87208a9cff5c9c759193f0d8..7b54461695e2de979924c14cfe79a1c56d2587ef 100644 (file)
@@ -341,9 +341,9 @@ xfs_start_page_writeback(
 {
        ASSERT(PageLocked(page));
        ASSERT(!PageWriteback(page));
-       set_page_writeback(page);
        if (clear_dirty)
-               clear_page_dirty(page);
+               clear_page_dirty_for_io(page);
+       set_page_writeback(page);
        unlock_page(page);
        if (!buffers) {
                end_page_writeback(page);
index b98f8f109c229e1778b3bfca1e1d4a0c8f73e8ca..ba2cf931e9ce1d0baae3b1933b8d9a35130dd5fb 100644 (file)
@@ -24,8 +24,5 @@
 #define PBI_CF_IDE_BASE     (IQ81340_CMP_FLSH)
 #define PBI_CF_BAR_ADDR     (IOP13XX_PBI_BAR1)
 
-/* These are the values used in the Machine description */
-#define PHYS_IO         0xfeffff00
-#define IO_PG_OFFSET    0xffffff00
-#define BOOT_PARAM_OFFSET  0x00000100
+
 #endif /* _IQ81340_H_ */
index c85fc06a043c10dc00392d72b3ef726aa40eece9..6d859d742d7f5e405c705a46d4182448ffbad434 100644 (file)
        data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR);                \
         __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); })
 
-/*
- * Coherency support.  Only supported on A2 CPUs or on A1
- * systems that have the cache coherency workaround.
- */
-static inline int __ixp23xx_arch_is_coherent(void)
-{
-       extern unsigned int processor_id;
-
-       if (((processor_id & 15) >= 4) || machine_is_roadrunner())
-               return 1;
-
-       return 0;
-}
-
-#define arch_is_coherent()     __ixp23xx_arch_is_coherent()
+#define arch_is_coherent()     1
 
 #endif
 
index 40e8e270d337b8b97c49a9a14d6039aac0486478..dcebf6d61903b07686b808eba4e2f97a8d95ffeb 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/anubis-cpld.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  *     http://www.simtec.co.uk/products/
  *     Ben Dooks <ben@simtec.co.uk>
  *
index 4b5f423779dff0b05bd34ea451b7ae07e60f667e..cd77a70d45c0849648f7cf69a99f60432aa26f08 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/anubis-irq.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  *     http://www.simtec.co.uk/products/
  *     Ben Dooks <ben@simtec.co.uk>
  *
index 058a2104b0358e039713576c6803d049262bdb9c..ab076de4a0d01f91a3659289bfb281a544e5952c 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/anubis-map.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  *     http://www.simtec.co.uk/products/
  *     Ben Dooks <ben@simtec.co.uk>
  *
index 7e0222276c98cc3f68b6b7f40b9a0381bd42777d..65e0acffa1aded6a29bc74bfa148cd20d5f1f838 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/audio.h
  *
- * (c) 2004-2005 Simtec Electronics
+ * Copyright (c) 2004-2005 Simtec Electronics
  *     http://www.simtec.co.uk/products/SWLINUX/
  *     Ben Dooks <ben@simtec.co.uk>
  *
index 8969cffe83fac597cd96cc28cfa0a966a2e403d9..034d2c5a47c4b2aaf0df5dac66607221b64b0bd0 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-cpld.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003,2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * BAST - CPLD control constants
  *
index 15ffa66f50110ea0f2a2a2ab3ca0fb11d8262eb1..726c0466f85a4160183e650fe4a7e4e81ca54246 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-irq.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003,2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * Machine BAST - IRQ Number definitions
  *
index 727cef84c70e4c9a6d81c7baff6b17c88294828a..86ac1c108db857e7323334f8661b7175c6a6888c 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-map.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003,2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * Machine BAST - Memory map definitions
  *
index 82836027f00fe12a23b5f98c9dd10e20a1052ae0..37a11fe54a782ed71fbb6dffc912bc3b7419b9c8 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-pmu.h
  *
- * (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003,2004 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *     Vincent Sanders <vince@simtec.co.uk>
  *
index c5802411f43dfbb7ef0fee2f0cd76d6287851546..c3de5ab102ebeffb31e75d6152f4a613c217640f 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/h1940-latch.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  *     http://armlinux.simtec.co.uk/
  *     Ben Dooks <ben@simtec.co.uk>
  *
@@ -16,7 +16,7 @@
 
 
 #ifndef __ASSEMBLY__
-#define H1940_LATCH            ((void __iomem *)0xF8000000)
+#define H1940_LATCH            ((void __force __iomem *)0xF8000000)
 #else
 #define H1940_LATCH            0xF8000000
 #endif
index 871f8af09b8b06d9f30cea3e5f10c90e82f3253f..729565e5cdf43bc35d505284b15b6e701406d5c8 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/hardware.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - hardware
  *
index ed3d6c7bf6d7745b6558094c1fdbd86e89a45de0..71211c8b5384a85d76a8b7b03ccf845ac287f0e8 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/iic.h
  *
- * (c) 2004 Simtec Electronics
+ * Copyright (c) 2004 Simtec Electronics
  *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - I2C Controller platfrom_device info
index f07ed040622b145c0e6fef9d6085ad33fad34f62..800846ebddba5b497dd5ce7623c9270af742e937 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/leds-gpio.h
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  *     http://armlinux.simtec.co.uk/
  *     Ben Dooks <ben@simtec.co.uk>
  *
index 7895042d176b3f4710514c7e6593484b709bf937..4505aefbad17175308ac8a31049eb269058cb258 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/map.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - Memory map definitions
  *
@@ -25,7 +25,7 @@
  */
 
 #ifndef __ASSEMBLY__
-#define S3C2410_ADDR(x)          ((void __iomem *)0xF0000000 + (x))
+#define S3C2410_ADDR(x)          ((void __iomem __force *)0xF0000000 + (x))
 #else
 #define S3C2410_ADDR(x)          (0xF0000000 + (x))
 #endif
 #define S3C24XX_SZ_MEMCTRL SZ_1M
 
 /* USB host controller */
-#define S3C24XX_VA_USBHOST S3C2410_ADDR(0x00200000)
 #define S3C2400_PA_USBHOST (0x14200000)
 #define S3C2410_PA_USBHOST (0x49000000)
 #define S3C24XX_SZ_USBHOST SZ_1M
 
 /* DMA controller */
-#define S3C24XX_VA_DMA    S3C2410_ADDR(0x00300000)
 #define S3C2400_PA_DMA    (0x14600000)
 #define S3C2410_PA_DMA    (0x4B000000)
 #define S3C24XX_SZ_DMA    SZ_1M
 
 /* Clock and Power management */
-#define S3C24XX_VA_CLKPWR  S3C2410_ADDR(0x00400000)
+#define S3C24XX_VA_CLKPWR  S3C2410_ADDR(0x00200000)
 #define S3C2400_PA_CLKPWR  (0x14800000)
 #define S3C2410_PA_CLKPWR  (0x4C000000)
 #define S3C24XX_SZ_CLKPWR  SZ_1M
 
 /* LCD controller */
-#define S3C24XX_VA_LCD    S3C2410_ADDR(0x00600000)
+#define S3C24XX_VA_LCD    S3C2410_ADDR(0x00300000)
 #define S3C2400_PA_LCD    (0x14A00000)
 #define S3C2410_PA_LCD    (0x4D000000)
 #define S3C24XX_SZ_LCD    SZ_1M
 
 /* NAND flash controller */
-#define S3C24XX_VA_NAND           S3C2410_ADDR(0x00700000)
 #define S3C2410_PA_NAND           (0x4E000000)
 #define S3C24XX_SZ_NAND           SZ_1M
 
 /* MMC controller - available on the S3C2400 */
-#define S3C2400_VA_MMC            S3C2400_ADDR(0x00700000)
 #define S3C2400_PA_MMC            (0x15A00000)
 #define S3C2400_SZ_MMC            SZ_1M
 
 /* UARTs */
-#define S3C24XX_VA_UART           S3C2410_ADDR(0x00800000)
+#define S3C24XX_VA_UART           S3C2410_ADDR(0x00400000)
 #define S3C2400_PA_UART           (0x15000000)
 #define S3C2410_PA_UART           (0x50000000)
 #define S3C24XX_SZ_UART           SZ_1M
 
 /* Timers */
-#define S3C24XX_VA_TIMER   S3C2410_ADDR(0x00900000)
+#define S3C24XX_VA_TIMER   S3C2410_ADDR(0x00500000)
 #define S3C2400_PA_TIMER   (0x15100000)
 #define S3C2410_PA_TIMER   (0x51000000)
 #define S3C24XX_SZ_TIMER   SZ_1M
 
 /* USB Device port */
-#define S3C24XX_VA_USBDEV  S3C2410_ADDR(0x00A00000)
+#define S3C24XX_VA_USBDEV  S3C2410_ADDR(0x00600000)
 #define S3C2400_PA_USBDEV  (0x15200140)
 #define S3C2410_PA_USBDEV  (0x52000000)
 #define S3C24XX_SZ_USBDEV  SZ_1M
 
 /* Watchdog */
-#define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x00B00000)
+#define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x00700000)
 #define S3C2400_PA_WATCHDOG (0x15300000)
 #define S3C2410_PA_WATCHDOG (0x53000000)
 #define S3C24XX_SZ_WATCHDOG SZ_1M
 
 /* IIC hardware controller */
-#define S3C24XX_VA_IIC    S3C2410_ADDR(0x00C00000)
 #define S3C2400_PA_IIC    (0x15400000)
 #define S3C2410_PA_IIC    (0x54000000)
 #define S3C24XX_SZ_IIC    SZ_1M
 
-#define VA_IIC_BASE       (S3C24XX_VA_IIC)
-
 /* IIS controller */
-#define S3C24XX_VA_IIS    S3C2410_ADDR(0x00D00000)
 #define S3C2400_PA_IIS    (0x15508000)
 #define S3C2410_PA_IIS    (0x55000000)
 #define S3C24XX_SZ_IIS    SZ_1M
 #define S3C24XX_SZ_GPIO           SZ_1M
 
 /* RTC */
-#define S3C24XX_VA_RTC    S3C2410_ADDR(0x00F00000)
 #define S3C2400_PA_RTC    (0x15700040)
 #define S3C2410_PA_RTC    (0x57000000)
 #define S3C24XX_SZ_RTC    SZ_1M
 
 /* ADC */
-#define S3C24XX_VA_ADC    S3C2410_ADDR(0x01000000)
 #define S3C2400_PA_ADC    (0x15800000)
 #define S3C2410_PA_ADC    (0x58000000)
 #define S3C24XX_SZ_ADC    SZ_1M
 
 /* SPI */
-#define S3C24XX_VA_SPI    S3C2410_ADDR(0x01100000)
 #define S3C2400_PA_SPI    (0x15900000)
 #define S3C2410_PA_SPI    (0x59000000)
 #define S3C24XX_SZ_SPI    SZ_1M
 
 /* SDI */
-#define S3C24XX_VA_SDI    S3C2410_ADDR(0x01200000)
 #define S3C2410_PA_SDI    (0x5A000000)
 #define S3C24XX_SZ_SDI    SZ_1M
 
index e350ae2acfc65ebe64129c4ca772fc2c38dca071..8816f7f9cee15add2e5614d281db721c374c0392 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/nand.h
  *
- * (c) 2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - NAND device controller platfrom_device info
  *
index e9d1ae1f354fb6ce3470620b8d077d55a47237de..3b6498468d621690a4c6d150a3ae5f4ae525c07a 100644 (file)
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  *     http://www.simtec.co.uk/products/
  *     Ben Dooks <ben@simtec.co.uk>
  *
index 19c77da9c3fe144578da1aaaffa75b43c14a1d28..46f52401d132f9e2baacd635d12bd475e4a51701 100644 (file)
@@ -197,7 +197,7 @@ struct s3c2410_uartcfg {
        unsigned char      hwport;       /* hardware port number */
        unsigned char      unused;
        unsigned short     flags;
-       unsigned long      uart_flags;   /* default uart flags */
+       upf_t              uart_flags;   /* default uart flags */
 
        unsigned long      ucon;         /* value of ucon for port */
        unsigned long      ulcon;        /* value of ulcon for port */
index 4f72a853a5cfc76fbbb4a95fe7efdf283eb7d564..ecf250db45fbc613dd892f1595e39850a2c898e0 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/system.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - System function defines and includes
  *
index 703c337c5617674f4e3ba4411bf86d0738c73c5c..c16a99c5a59a8baf7e03d9d3686d1d1d96268f0d 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/timex.h
  *
- * (c) 2003-2005 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003-2005 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - time parameters
  *
index 81b3e91c56ab144eff8605763c8911c1e9944ab2..dcb2cef38f509b1eee3f88d54037b76aeab207d3 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/uncompress.h
  *
- * (c) 2003 Simtec Electronics
- *    Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - uncompress code
  *
@@ -13,6 +13,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
+typedef unsigned int upf_t;    /* cannot include linux/serial_core.h */
 
 /* defines for UART registers */
 #include "asm/arch/regs-serial.h"
index 35723569a17ab11695246925aefe678814a34447..5bfa376e33dc4213e0cdb3fa865f3283fff0abf8 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/usb-control.h
  *
- * (c) 2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 - usb port information
  *
index a341b1e1bd98a681cdd3b4fcc7ec7da4a324e488..0557b0a5ab1d5152893cd53372464763ff8549ad 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/vr1000-cpld.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * VR1000 - CPLD control constants
  *
index c39a0ffa670dade99e20a41167982059c0ffe5f1..890937083c61f14c0949fb24799729b2f161cdb1 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/vr1000-irq.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003,2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * Machine VR1000 - IRQ Number definitions
  *
index 1fe4db36c8345fcf5d138bf3960d7dbb871a7f52..92a56a724a8c52839f322b9219873c6ac4346ee9 100644 (file)
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/vr1000-map.h
  *
- * (c) 2003-2005 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2003-2005 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
  *
  * Machine VR1000 - Memory map definitions
  *
index 642382d2c9f051eec79f4b13ffcfc7cbc4a42432..3679a8a8922ee97778818e9fe75e7dd6ba4cf195 100644 (file)
@@ -52,6 +52,7 @@ typedef struct user_fp elf_fpregset_t;
 #define HWCAP_EDSP     128
 #define HWCAP_JAVA     256
 #define HWCAP_IWMMXT   512
+#define HWCAP_CRUNCH   1024
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
index e160aeb0138d0c4a4c6f0a1aa324938bfa13850a..aa223fc546afdee10d5b0d74bae41014122a07fe 100644 (file)
@@ -73,6 +73,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/linkage.h>
+#include <linux/irqflags.h>
 
 struct thread_info;
 struct task_struct;
@@ -139,6 +140,9 @@ static inline int cpu_is_xsc3(void)
 #define        cpu_is_xscale() 1
 #endif
 
+extern unsigned long cr_no_alignment;  /* defined in entry-armv.S */
+extern unsigned long cr_alignment;     /* defined in entry-armv.S */
+
 static inline unsigned int get_cr(void)
 {
        unsigned int val;
@@ -152,6 +156,10 @@ static inline void set_cr(unsigned int val)
          : : "r" (val) : "cc");
 }
 
+#ifndef CONFIG_SMP
+extern void adjust_cr(unsigned long mask, unsigned long set);
+#endif
+
 #define CPACC_FULL(n)          (3 << (n * 2))
 #define CPACC_SVC(n)           (1 << (n * 2))
 #define CPACC_DISABLE(n)       (0 << (n * 2))
@@ -170,29 +178,6 @@ static inline void set_copro_access(unsigned int val)
          : : "r" (val) : "cc");
 }
 
-extern unsigned long cr_no_alignment;  /* defined in entry-armv.S */
-extern unsigned long cr_alignment;     /* defined in entry-armv.S */
-
-#ifndef CONFIG_SMP
-static inline void adjust_cr(unsigned long mask, unsigned long set)
-{
-       unsigned long flags, cr;
-
-       mask &= ~CR_A;
-
-       set &= mask;
-
-       local_irq_save(flags);
-
-       cr_no_alignment = (cr_no_alignment & ~mask) | set;
-       cr_alignment = (cr_alignment & ~mask) | set;
-
-       set_cr((get_cr() & ~mask) | set);
-
-       local_irq_restore(flags);
-}
-#endif
-
 #define UDBG_UNDEFINED (1 << 0)
 #define UDBG_SYSCALL   (1 << 1)
 #define UDBG_BADABORT  (1 << 2)
@@ -248,8 +233,6 @@ static inline void sched_cacheflush(void)
 {
 }
 
-#include <linux/irqflags.h>
-
 #ifdef CONFIG_SMP
 
 #define smp_mb()               mb()
index 32b06eb5281949a1511d394fdd6fab8a87f3240b..97e7060000cf9170fe376bf689681ef2c1f303f7 100644 (file)
 #define __NR_readlinkat                        (__NR_SYSCALL_BASE+332)
 #define __NR_fchmodat                  (__NR_SYSCALL_BASE+333)
 #define __NR_faccessat                 (__NR_SYSCALL_BASE+334)
+                                       /* 335 for pselect6 */
+                                       /* 336 for ppoll */
+#define __NR_unshare                   (__NR_SYSCALL_BASE+337)
+#define __NR_set_robust_list           (__NR_SYSCALL_BASE+338)
+#define __NR_get_robust_list           (__NR_SYSCALL_BASE+339)
+#define __NR_splice                    (__NR_SYSCALL_BASE+340)
+#define __NR_arm_sync_file_range       (__NR_SYSCALL_BASE+341)
+#define __NR_tee                       (__NR_SYSCALL_BASE+342)
+#define __NR_vmsplice                  (__NR_SYSCALL_BASE+343)
+#define __NR_move_pages                        (__NR_SYSCALL_BASE+344)
+#define __NR_getcpu                    (__NR_SYSCALL_BASE+345)
+                                       /* 346 for epoll_pwait */
 
 /*
  * The following SWIs are ARM private.
index 1587121730c5e3e635aed737cf5d41f8e86fc2f7..9fcc8d9fbb14e85250d9e4e610a773bcde39932d 100644 (file)
@@ -35,6 +35,9 @@
                VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;          \
                *(.pci_fixup_enable)                                    \
                VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;          \
+               *(.pci_fixup_resume)                                    \
+               VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;            \
        }                                                               \
                                                                        \
        /* RapidIO route ops */                                         \
index 395077aba583000b5a22fe55f6dad22b04938c48..c5b8fc6109d6cc0bc4214a347cc2c7583cbe0029 100644 (file)
@@ -40,7 +40,7 @@ extern int e820_all_mapped(unsigned long start, unsigned long end,
                           unsigned type);
 extern void find_max_pfn(void);
 extern void register_bootmem_low_pages(unsigned long max_low_pfn);
-extern void register_memory(void);
+extern void e820_register_memory(void);
 extern void limit_regions(unsigned long long size);
 extern void print_memory_map(char *who);
 
index fdad4267b447d10dbd48e9219ed45fa35b2475f3..3d90264e9d367b50a5c543bb66265ddc7a6ccd87 100644 (file)
@@ -161,6 +161,7 @@ struct spu_syscall_block {
 extern long spu_sys_callback(struct spu_syscall_block *s);
 
 /* syscalls implemented in spufs */
+struct file;
 extern struct spufs_calls {
        asmlinkage long (*create_thread)(const char __user *name,
                                        unsigned int flags, mode_t mode);
@@ -232,6 +233,7 @@ void spu_remove_sysdev_attr_group(struct attribute_group *attrs);
  * to object-id spufs file from user space and the notifer
  * function can assume that spu->ctx is valid.
  */
+struct notifier_block;
 int spu_switch_event_register(struct notifier_block * n);
 int spu_switch_event_unregister(struct notifier_block * n);
 
index a1b04d8a1d01ecf2e64a2334c9c52cda3cc3fd6a..862e483cce8a03e7eb5398d03bd622fec5d1c107 100644 (file)
@@ -119,7 +119,6 @@ header-y += nfs4_mount.h
 header-y += nfs_mount.h
 header-y += oom.h
 header-y += param.h
-header-y += pci_ids.h
 header-y += pci_regs.h
 header-y += personality.h
 header-y += pfkeyv2.h
@@ -138,7 +137,6 @@ header-y += radeonfb.h
 header-y += raw.h
 header-y += resource.h
 header-y += rose.h
-header-y += sctp.h
 header-y += smbno.h
 header-y += snmp.h
 header-y += sockios.h
@@ -162,7 +160,6 @@ header-y += vt.h
 header-y += wireless.h
 header-y += xattr.h
 header-y += x25.h
-header-y += zorro_ids.h
 
 unifdef-y += acct.h
 unifdef-y += adb.h
index ea330d7b46c089f28f1b4c4f24e81af99b09150b..36a6eacefe20d2c17f60b9b34c569cc8f425a843 100644 (file)
@@ -331,10 +331,6 @@ struct request_pm_state
 
 #include <linux/elevator.h>
 
-typedef int (merge_request_fn) (request_queue_t *, struct request *,
-                               struct bio *);
-typedef int (merge_requests_fn) (request_queue_t *, struct request *,
-                                struct request *);
 typedef void (request_fn_proc) (request_queue_t *q);
 typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
 typedef int (prep_rq_fn) (request_queue_t *, struct request *);
@@ -376,9 +372,6 @@ struct request_queue
        struct request_list     rq;
 
        request_fn_proc         *request_fn;
-       merge_request_fn        *back_merge_fn;
-       merge_request_fn        *front_merge_fn;
-       merge_requests_fn       *merge_requests_fn;
        make_request_fn         *make_request_fn;
        prep_rq_fn              *prep_rq_fn;
        unplug_fn               *unplug_fn;
@@ -648,6 +641,11 @@ extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __
 extern int sg_scsi_ioctl(struct file *, struct request_queue *,
                struct gendisk *, struct scsi_ioctl_command __user *);
 
+/*
+ * Temporary export, until SCSI gets fixed up.
+ */
+extern int ll_back_merge_fn(request_queue_t *, struct request *, struct bio *);
+
 /*
  * A queue has just exitted congestion.  Note this in the global counter of
  * congested queues, and wake up anyone who was waiting for requests to be
@@ -674,7 +672,7 @@ extern void __blk_stop_queue(request_queue_t *q);
 extern void blk_run_queue(request_queue_t *);
 extern void blk_start_queueing(request_queue_t *);
 extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long);
-extern int blk_rq_unmap_user(struct request *);
+extern int blk_rq_unmap_user(struct bio *);
 extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
 extern int blk_rq_map_user_iov(request_queue_t *, struct request *,
                               struct sg_iovec *, int, unsigned int);
index a1c10b0c4cf02ae072eea67d312dbd21c236557f..1678a5de7013a91f08f3f352a773ff90166240f1 100644 (file)
@@ -24,7 +24,7 @@ extern int debug_locks_off(void);
        int __ret = 0;                                                  \
                                                                        \
        if (unlikely(c)) {                                              \
-               if (debug_locks_silent || debug_locks_off())            \
+               if (debug_locks_off() && !debug_locks_silent)           \
                        WARN_ON(1);                                     \
                __ret = 1;                                              \
        }                                                               \
index 49ab53ce92dc5d79a55218192de5a9b60d8934a0..f44247fe8135b861b46ac24cacc83a230e874eec 100644 (file)
@@ -433,6 +433,8 @@ static inline int device_is_registered(struct device *dev)
        return dev->is_registered;
 }
 
+void driver_init(void);
+
 /*
  * High level routines for use by the bus drivers
  */
index a24931d244046d72e056fab76f670719256de00a..e88fcbc77f8f381d3c1b801955406f260b0cab4f 100644 (file)
@@ -12,6 +12,8 @@ typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struc
 
 typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int);
 
+typedef int (elevator_allow_merge_fn) (request_queue_t *, struct request *, struct bio *);
+
 typedef int (elevator_dispatch_fn) (request_queue_t *, int);
 
 typedef void (elevator_add_req_fn) (request_queue_t *, struct request *);
@@ -33,6 +35,7 @@ struct elevator_ops
        elevator_merge_fn *elevator_merge_fn;
        elevator_merged_fn *elevator_merged_fn;
        elevator_merge_req_fn *elevator_merge_req_fn;
+       elevator_allow_merge_fn *elevator_allow_merge_fn;
 
        elevator_dispatch_fn *elevator_dispatch_fn;
        elevator_add_req_fn *elevator_add_req_fn;
index edca361f2ab4c7babd090e42b5a43ffc64eb54ef..a59001e9ea58bb2cd91c999d6b0f9dba6ac06f7e 100644 (file)
@@ -80,6 +80,11 @@ extern int expand_files(struct files_struct *, int nr);
 extern void free_fdtable_rcu(struct rcu_head *rcu);
 extern void __init files_defer_init(void);
 
+static inline void free_fdtable(struct fdtable *fdt)
+{
+       call_rcu(&fdt->rcu, free_fdtable_rcu);
+}
+
 static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
 {
        struct file * file = NULL;
index e0a150046208465fe8d8f61e44c1e1d5bc956cad..4aba6b0ad41c114d442c2e871cfe03208e716822 100644 (file)
@@ -103,6 +103,8 @@ struct fddihdr
        } __attribute__ ((packed));
 
 #ifdef __KERNEL__
+#include <linux/netdevice.h>
+
 /* Define FDDI statistics structure */
 struct fddi_statistics {
 
index cf8696d4a138824cf11a3e899ebae39f7a4bd69f..15228d79c5bc0c32f5189ceb28b6adff526f3423 100644 (file)
@@ -91,6 +91,9 @@ struct resource_list {
 #define IORESOURCE_ROM_COPY            (1<<2)  /* ROM is alloc'd copy, resource field overlaid */
 #define IORESOURCE_ROM_BIOS_COPY       (1<<3)  /* ROM is BIOS copy, resource field overlaid */
 
+/* PCI control bits.  Shares IORESOURCE_BITS with above PCI ROM.  */
+#define IORESOURCE_PCI_FIXED           (1<<4)  /* Do not move resource */
+
 /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
 extern struct resource ioport_resource;
 extern struct resource iomem_resource;
index d1c8d28fa92ebc844906c88d9081c78af719dcdb..76538fcf2c4ee6ee0f3eaa13bae7180bbdaa5b5e 100644 (file)
@@ -265,8 +265,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
                                        struct subsys_attribute *);
 
 #if defined(CONFIG_HOTPLUG)
-void kobject_uevent(struct kobject *kobj, enum kobject_action action);
-void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+int kobject_uevent(struct kobject *kobj, enum kobject_action action);
+int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                        char *envp[]);
 
 int add_uevent_var(char **envp, int num_envp, int *cur_index,
@@ -274,11 +274,12 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
                        const char *format, ...)
        __attribute__((format (printf, 7, 8)));
 #else
-static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
-static inline void kobject_uevent_env(struct kobject *kobj,
+static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action)
+{ return 0; }
+static inline int kobject_uevent_env(struct kobject *kobj,
                                      enum kobject_action action,
                                      char *envp[])
-{ }
+{ return 0; }
 
 static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
                                      char *buffer, int buffer_size, int *cur_len, 
index 5bb2c3c585c1fbd3b878ca44da7f7138c8cd5059..28fdce1ac1db3e6c4d3db845989ec5f502ad25a3 100644 (file)
@@ -11,6 +11,8 @@
 #include <asm/types.h>
 #include <linux/ioctl.h>
 
+#define KVM_API_VERSION 1
+
 /*
  * Architectural interrupt line count, and the size of the bitmap needed
  * to hold them.
@@ -209,6 +211,7 @@ struct kvm_dirty_log {
 
 #define KVMIO 0xAE
 
+#define KVM_GET_API_VERSION       _IO(KVMIO, 1)
 #define KVM_RUN                   _IOWR(KVMIO, 2, struct kvm_run)
 #define KVM_GET_REGS              _IOWR(KVMIO, 3, struct kvm_regs)
 #define KVM_SET_REGS              _IOW(KVMIO, 4, struct kvm_regs)
index 4830a3bedfb240480e1ade7c58d030b0ab12e978..350878a2d848cf2efe561449ac7d9ccece15630b 100644 (file)
@@ -253,15 +253,11 @@ static inline void SetPageUptodate(struct page *page)
 
 struct page;   /* forward declaration */
 
-int test_clear_page_dirty(struct page *page);
+extern void cancel_dirty_page(struct page *page, unsigned int account_size);
+
 int test_clear_page_writeback(struct page *page);
 int test_set_page_writeback(struct page *page);
 
-static inline void clear_page_dirty(struct page *page)
-{
-       test_clear_page_dirty(page);
-}
-
 static inline void set_page_writeback(struct page *page)
 {
        test_set_page_writeback(page);
index 01c707261f9ce6f9b42d03c62f622351100f82df..f3c617eabd8dd9ebe85ce979f343ca36e3db55f0 100644 (file)
@@ -20,9 +20,6 @@
 /* Include the pci register defines */
 #include <linux/pci_regs.h>
 
-/* Include the ID list */
-#include <linux/pci_ids.h>
-
 /*
  * The PCI interface treats multi-function devices as independent
  * devices.  The slot/function address of each device is encoded
@@ -54,6 +51,9 @@
 #include <asm/atomic.h>
 #include <linux/device.h>
 
+/* Include the ID list */
+#include <linux/pci_ids.h>
+
 /* File state for mmap()s on /proc/bus/pci/X/Y */
 enum pci_mmap_state {
        pci_mmap_io,
@@ -396,6 +396,21 @@ struct pci_driver {
  */
 #define pci_module_init        pci_register_driver
 
+/**
+ * PCI_VDEVICE - macro used to describe a specific pci device in short form
+ * @vend: the vendor name
+ * @dev: the 16 bit PCI Device ID
+ *
+ * This macro is used to create a struct pci_device_id that matches a
+ * specific PCI device.  The subvendor, and subdevice fields will be set
+ * to PCI_ANY_ID. The macro allows the next field to follow as the device
+ * private data.
+ */
+
+#define PCI_VDEVICE(vendor, device)            \
+       PCI_VENDOR_ID_##vendor, (device),       \
+       PCI_ANY_ID, PCI_ANY_ID, 0, 0
+
 /* these external functions are only available when PCI support is enabled */
 #ifdef CONFIG_PCI
 
@@ -454,6 +469,8 @@ struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
 int pci_find_capability (struct pci_dev *dev, int cap);
 int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
 int pci_find_ext_capability (struct pci_dev *dev, int cap);
+int pci_find_ht_capability (struct pci_dev *dev, int ht_cap);
+int pci_find_next_ht_capability (struct pci_dev *dev, int pos, int ht_cap);
 struct pci_bus *pci_find_next_bus(const struct pci_bus *from);
 
 struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device,
@@ -468,6 +485,7 @@ struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn);
 struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn);
 struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from);
 int pci_dev_present(const struct pci_device_id *ids);
+const struct pci_device_id *pci_find_present(const struct pci_device_id *ids);
 
 int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
 int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val);
@@ -681,6 +699,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *
 { return NULL; }
 
 #define pci_dev_present(ids)   (0)
+#define pci_find_present(ids)  (NULL)
 #define pci_dev_put(dev)       do { } while (0)
 
 static inline void pci_set_master(struct pci_dev *dev) { }
@@ -783,6 +802,7 @@ enum pci_fixup_pass {
        pci_fixup_header,       /* After reading configuration header */
        pci_fixup_final,        /* Final phase of device fixups */
        pci_fixup_enable,       /* pci_enable_device() time */
+       pci_fixup_resume,       /* pci_enable_device() time */
 };
 
 /* Anonymous variables would be nice... */
@@ -801,6 +821,9 @@ enum pci_fixup_pass {
 #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook)                 \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable,                    \
                        vendor##device##hook, vendor, device, hook)
+#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook)                 \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume,                    \
+                       resume##vendor##device##hook, vendor, device, hook)
 
 
 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
index 95c1e74afebcc943993d0f876df0d7f882410f02..778e701eff30df2944a84456789387cbacf48ded 100644 (file)
 #define PCI_CLASS_SERIAL_FIBER         0x0c04
 #define PCI_CLASS_SERIAL_SMBUS         0x0c05
 
+#define PCI_BASE_CLASS_WIRELESS                        0x0d
+#define PCI_CLASS_WIRELESS_RF_CONTROLLER       0x0d10
+#define PCI_CLASS_WIRELESS_WHCI                        0x0d1010
+
 #define PCI_BASE_CLASS_INTELLIGENT     0x0e
 #define PCI_CLASS_INTELLIGENT_I2O      0x0e00
 
index 064b1dc71c228d0edfb29dd18da8477ab445235c..7a6d34ee5ab132593c2efce4000edd3bb3af3408 100644 (file)
 #define PCI_PWR_CAP            12      /* Capability */
 #define  PCI_PWR_CAP_BUDGET(x) ((x) & 1)       /* Included in system budget */
 
-/* Hypertransport sub capability types */
+/*
+ * Hypertransport sub capability types
+ *
+ * Unfortunately there are both 3 bit and 5 bit capability types defined
+ * in the HT spec, catering for that is a little messy. You probably don't
+ * want to use these directly, just use pci_find_ht_capability() and it
+ * will do the right thing for you.
+ */
+#define HT_3BIT_CAP_MASK       0xE0
 #define HT_CAPTYPE_SLAVE       0x00    /* Slave/Primary link configuration */
 #define HT_CAPTYPE_HOST                0x20    /* Host/Secondary link configuration */
+
+#define HT_5BIT_CAP_MASK       0xF8
 #define HT_CAPTYPE_IRQ         0x80    /* IRQ Configuration */
 #define HT_CAPTYPE_REMAPPING_40        0xA0    /* 40 bit address remapping */
 #define HT_CAPTYPE_REMAPPING_64 0xA2   /* 64 bit address remapping */
 #define HT_CAPTYPE_UNITID_CLUMP        0x90    /* Unit ID clumping */
 #define HT_CAPTYPE_EXTCONF     0x98    /* Extended Configuration Space Access */
 #define HT_CAPTYPE_MSI_MAPPING 0xA8    /* MSI Mapping Capability */
+#define  HT_MSI_FLAGS          0x02            /* Offset to flags */
+#define  HT_MSI_FLAGS_ENABLE   0x1             /* Mapping enable */
+#define  HT_MSI_FLAGS_FIXED    0x2             /* Fixed mapping only */
+#define  HT_MSI_FIXED_ADDR     0x00000000FEE00000ULL   /* Fixed addr */
+#define  HT_MSI_ADDR_LO                0x04            /* Offset to low addr bits */
+#define  HT_MSI_ADDR_LO_MASK   0xFFF00000      /* Low address bit mask */
+#define  HT_MSI_ADDR_HI                0x08            /* Offset to high addr bits */
 #define HT_CAPTYPE_DIRECT_ROUTE        0xB0    /* Direct routing configuration */
 #define HT_CAPTYPE_VCSET       0xB8    /* Virtual Channel configuration */
 #define HT_CAPTYPE_ERROR_RETRY 0xC0    /* Retry on error configuration */
index 36f850373d2c85180c0e71f523f6f70eb66463e5..bdd277223af01e9b013b69b5f604bc877c987186 100644 (file)
@@ -72,7 +72,7 @@ void __anon_vma_link(struct vm_area_struct *);
 void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long);
 void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long);
 void page_add_file_rmap(struct page *);
-void page_remove_rmap(struct page *);
+void page_remove_rmap(struct page *, struct vm_area_struct *);
 
 /**
  * page_dup_rmap - duplicate pte mapping to a page
index 35108fe7a6860f350d4732626061815630ea69de..d4f86560bfff550dbfd15b59bfcccb08cd347a86 100644 (file)
@@ -180,7 +180,7 @@ typedef enum {
        SCTP_PARAM_ERR_CAUSE            = __constant_htons(0xc003),
        SCTP_PARAM_SET_PRIMARY          = __constant_htons(0xc004),
        SCTP_PARAM_SUCCESS_REPORT       = __constant_htons(0xc005),
-       SCTP_PARAM_ADAPTION_LAYER_IND   = __constant_htons(0xc006),
+       SCTP_PARAM_ADAPTATION_LAYER_IND = __constant_htons(0xc006),
 
 } sctp_param_t; /* enum */
 
@@ -281,11 +281,11 @@ typedef struct sctp_ecn_capable_param {
        sctp_paramhdr_t param_hdr;
 } __attribute__((packed)) sctp_ecn_capable_param_t;
 
-/* ADDIP Section 3.2.6 Adaption Layer Indication */
-typedef struct sctp_adaption_ind_param {
+/* ADDIP Section 3.2.6 Adaptation Layer Indication */
+typedef struct sctp_adaptation_ind_param {
        struct sctp_paramhdr param_hdr;
-       __be32 adaption_ind;
-} __attribute__((packed)) sctp_adaption_ind_param_t;
+       __be32 adaptation_ind;
+} __attribute__((packed)) sctp_adaptation_ind_param_t;
 
 /* RFC 2960.  Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2):
  *   The INIT ACK chunk is used to acknowledge the initiation of an SCTP
index c89df55f6e035df2ef064726c870911506c7debc..5e9803ed17fc4dd9c167c13541bbe209063ec7a6 100644 (file)
@@ -10,8 +10,9 @@
 /*
  * Light weight per cpu counter implementation.
  *
- * Counters should only be incremented and no critical kernel component
- * should rely on the counter values.
+ * Counters should only be incremented.  You need to set EMBEDDED
+ * to disable VM_EVENT_COUNTERS.  Things like procps (vmstat,
+ * top, etc) use /proc/vmstat and depend on these counters.
  *
  * Counters are handled completely inline. On many platforms the code
  * generated will simply be the increment of a global address.
@@ -73,7 +74,13 @@ static inline void count_vm_events(enum vm_event_item item, long delta)
 }
 
 extern void all_vm_events(unsigned long *);
+#ifdef CONFIG_HOTPLUG
 extern void vm_events_fold_cpu(int cpu);
+#else
+static inline void vm_events_fold_cpu(int cpu)
+{
+}
+#endif
 
 #else
 
index 68e2b32cf1d6f1ed421a579c1cd19e707b3df80d..bc1b0fda2b0452d7cadd32a30f6df0e2a697d99e 100644 (file)
@@ -87,7 +87,7 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
        carry = (sum < uproto);
        sum += carry;
 
-       return csum_fold((__force __wsum)csum);
+       return csum_fold((__force __wsum)sum);
 }
 
 #endif
index c818f87122af1c4046a643a4ab374f5adc5e6ea7..28af68059521b52f93989bf386d38c571eaff891 100644 (file)
@@ -128,8 +128,6 @@ extern int sctp_copy_local_addr_list(struct sctp_bind_addr *,
                                     int flags);
 extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
 extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
-int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
-                        void *ptr);
 
 /*
  * sctp/socket.c
index 8d7f26d684e5e5a02c9a67e5b6f83b038596c2df..31a8e88f1a745fb1c783f6998c058133b27d24ca 100644 (file)
@@ -306,7 +306,7 @@ struct sctp_sock {
        __u8 disable_fragments;
        __u8 pd_mode;
        __u8 v4mapped;
-       __u32 adaption_ind;
+       __u32 adaptation_ind;
 
        /* Receive to here while partial delivery is in effect. */
        struct sk_buff_head pd_lobby;
@@ -388,7 +388,7 @@ struct sctp_cookie {
        /* Padding for future use */
        __u8 padding;           
 
-       __u32 adaption_ind;     
+       __u32 adaptation_ind;
 
 
        /* This is a shim for my peer's INIT packet, followed by
@@ -431,7 +431,7 @@ union sctp_params {
        struct sctp_ipv4addr_param *v4;
        struct sctp_ipv6addr_param *v6;
        union sctp_addr_param *addr;
-       struct sctp_adaption_ind_param *aind;
+       struct sctp_adaptation_ind_param *aind;
 };
 
 /* RFC 2960.  Section 3.3.5 Heartbeat.
@@ -1483,7 +1483,7 @@ struct sctp_association {
                __u8    asconf_capable;  /* Does peer support ADDIP? */
                __u8    prsctp_capable;  /* Can peer do PR-SCTP? */
 
-               __u32   adaption_ind;    /* Adaption Code point. */
+               __u32   adaptation_ind;  /* Adaptation Code point. */
 
                /* This mask is used to disable sending the ASCONF chunk
                 * with specified parameter to peer.
index 1a4ddc1ec7d24cfd9a6b5acfe090c430a40a1502..2923e3d31a08785eac97688213a5b5794ba9349f 100644 (file)
@@ -120,7 +120,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_pdapi(
        const struct sctp_association *asoc,
        __u32 indication, gfp_t gfp);
 
-struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication(
+struct sctp_ulpevent *sctp_ulpevent_make_adaptation_indication(
        const struct sctp_association *asoc, gfp_t gfp);
 
 struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
index 9e4a39fd129d0a59214557e7ed9e648b847d3634..67a30eb2b3a4fad36fe536896e3e32c0b367e401 100644 (file)
@@ -75,8 +75,8 @@ enum sctp_optname {
 #define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR
        SCTP_PRIMARY_ADDR,
 #define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR
-       SCTP_ADAPTION_LAYER,      
-#define SCTP_ADAPTION_LAYER SCTP_ADAPTION_LAYER
+       SCTP_ADAPTATION_LAYER,
+#define SCTP_ADAPTATION_LAYER SCTP_ADAPTATION_LAYER
        SCTP_DISABLE_FRAGMENTS,
 #define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS
        SCTP_PEER_ADDR_PARAMS,
@@ -331,17 +331,17 @@ struct sctp_shutdown_event {
 };
 
 /*
- * 5.3.1.6 SCTP_ADAPTION_INDICATION
+ * 5.3.1.6 SCTP_ADAPTATION_INDICATION
  *
- *   When a peer sends a Adaption Layer Indication parameter , SCTP
+ *   When a peer sends a Adaptation Layer Indication parameter , SCTP
  *   delivers this notification to inform the application
- *   that of the peers requested adaption layer.
+ *   that of the peers requested adaptation layer.
  */
-struct sctp_adaption_event {
+struct sctp_adaptation_event {
        __u16 sai_type;
        __u16 sai_flags;
        __u32 sai_length;
-       __u32 sai_adaption_ind;
+       __u32 sai_adaptation_ind;
        sctp_assoc_t sai_assoc_id;
 };
 
@@ -374,7 +374,7 @@ struct sctp_event_subscribe {
        __u8 sctp_peer_error_event;
        __u8 sctp_shutdown_event;
        __u8 sctp_partial_delivery_event;
-       __u8 sctp_adaption_layer_event;
+       __u8 sctp_adaptation_layer_event;
 };
 
 /*
@@ -395,7 +395,7 @@ union sctp_notification {
        struct sctp_remote_error sn_remote_error;
        struct sctp_send_failed sn_send_failed;
        struct sctp_shutdown_event sn_shutdown_event;
-       struct sctp_adaption_event sn_adaption_event;
+       struct sctp_adaptation_event sn_adaptation_event;
        struct sctp_pdapi_event sn_pdapi_event;
 };
 
@@ -412,7 +412,7 @@ enum sctp_sn_type {
        SCTP_REMOTE_ERROR,
        SCTP_SHUTDOWN_EVENT,
        SCTP_PARTIAL_DELIVERY_EVENT,
-       SCTP_ADAPTION_INDICATION,
+       SCTP_ADAPTATION_INDICATION,
 };
 
 /* Notification error codes used to fill up the error fields in some
@@ -488,13 +488,13 @@ struct sctp_prim {
 } __attribute__((packed, aligned(4)));
 
 /*
- * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
+ * 7.1.11 Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
  *
- * Requests that the local endpoint set the specified Adaption Layer
+ * Requests that the local endpoint set the specified Adaptation Layer
  * Indication parameter for all future INIT and INIT-ACK exchanges.
  */
-struct sctp_setadaption {
-       __u32   ssb_adaption_ind;
+struct sctp_setadaptation {
+       __u32   ssb_adaptation_ind;
 };
 
 /*
index c99774f15eba92d76a43a6a76eae5773be6224a8..b7d8317f22acf9d256d79c48eabd8c7b2e723c83 100644 (file)
@@ -242,14 +242,9 @@ extern int tcp_memory_pressure;
 
 static inline int before(__u32 seq1, __u32 seq2)
 {
-        return (__s32)(seq1-seq2) < 0;
+        return (__s32)(seq2-seq1) > 0;
 }
-
-static inline int after(__u32 seq1, __u32 seq2)
-{
-       return (__s32)(seq2-seq1) < 0;
-}
-
+#define after(seq2, seq1)      before(seq1, seq2)
 
 /* is s2<=s1<=s3 ? */
 static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
index c854647b6f3c9e416db5d4d21872e5f73d5085b0..1cd4f64cdf31529d60dbb91d7fa74bad6420d4f0 100644 (file)
@@ -56,6 +56,7 @@ struct snd_pcm_oss_runtime {
        size_t mmap_bytes;
        char *buffer;                           /* vmallocated period */
        size_t buffer_used;                     /* used length from period buffer */
+       struct mutex params_lock;
 #ifdef CONFIG_SND_PCM_OSS_PLUGINS
        struct snd_pcm_plugin *plugin_first;
        struct snd_pcm_plugin *plugin_last;
index 17137f3a3b6fc39cc4ad3040beae03f3bec9b900..2949b9b991b52f79786a630af0d5da42cf9d8c4d 100644 (file)
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated by alsa/ksync script.  */
-#define CONFIG_SND_VERSION "1.0.13"
-#define CONFIG_SND_DATE " (Tue Nov 28 14:07:24 2006 UTC)"
+#define CONFIG_SND_VERSION "1.0.14rc1"
+#define CONFIG_SND_DATE " (Wed Dec 20 08:11:48 2006 UTC)"
index d41cda97e952de447c481eb20240a704e6af1a0f..f3514ee96bd9753f64782d89fe978e16c8bd8261 100644 (file)
@@ -286,7 +286,7 @@ struct snd_ymfpci {
        int irq;
 
        unsigned int device_id; /* PCI device ID */
-       unsigned int rev;       /* PCI revision */
+       unsigned char rev;      /* PCI revision */
        unsigned long reg_area_phys;
        void __iomem *reg_area_virt;
        struct resource *res_reg_area;
@@ -345,7 +345,6 @@ struct snd_ymfpci {
        struct snd_kcontrol *spdif_pcm_ctl;
        int mode_dup4ch;
        int rear_opened;
-       int rear_swap;
        int spdif_opened;
        struct {
                u16 left;
@@ -378,7 +377,7 @@ int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
 int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
 int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
 int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
-int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch, int rear_swap);
+int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch);
 int snd_ymfpci_timer(struct snd_ymfpci *chip, int device);
 
 #endif /* __SOUND_YMFPCI_H */
index f000edb3bb7a8b121951b445b37b8328418f3507..a3f83e2c8250bf6ebf0a8429ed707a270531f769 100644 (file)
@@ -450,7 +450,7 @@ config SHMEM
 
 config SLAB
        default y
-       bool "Use full SLAB allocator" if EMBEDDED
+       bool "Use full SLAB allocator" if (EMBEDDED && !SMP && !SPARSEMEM)
        help
          Disabling this replaces the advanced SLAB allocator and
          kmalloc support with the drastically simpler SLOB allocator.
@@ -461,10 +461,10 @@ config VM_EVENT_COUNTERS
        default y
        bool "Enable VM event counters for /proc/vmstat" if EMBEDDED
        help
-         VM event counters are only needed to for event counts to be
-         shown. They have no function for the kernel itself. This
-         option allows the disabling of the VM event counters.
-         /proc/vmstat will only show page counts.
+         VM event counters are needed for event counts to be shown.
+         This option allows the disabling of the VM event counters
+         on EMBEDDED systems.  /proc/vmstat will only show page counts
+         if VM event counters are disabled.
 
 endmenu                # General setup
 
index d6c764d0eabbefcd01afb7dfaced7b277bdaa581..9cd871ce57847439d865c64444c54607048a8c43 100644 (file)
@@ -18,12 +18,3 @@ clean-files := ../include/linux/compile.h
 $(obj)/main.o: include/linux/compile.h
 $(obj)/version.o: include/linux/compile.h
 
-# compile.h changes depending on hostname, generation number, etc,
-# so we regenerate it always.
-# mkcompile_h will make sure to only update the
-# actual file if its content has changed.
-
-include/linux/compile.h: FORCE
-       @echo '  CHK     $@'
-       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
-       "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
index e3f0bb20b4ddffc0e82181f48ef42e3953df4fdd..2b1cdaab45e654bd1dd9c7d772c48e226e6ec20d 100644 (file)
@@ -53,6 +53,7 @@
 #include <linux/utsrelease.h>
 #include <linux/pid_namespace.h>
 #include <linux/compile.h>
+#include <linux/device.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -94,7 +95,6 @@ extern void pidmap_init(void);
 extern void prio_tree_init(void);
 extern void radix_tree_init(void);
 extern void free_initmem(void);
-extern void driver_init(void);
 extern void prepare_namespace(void);
 #ifdef CONFIG_ACPI
 extern void acpi_early_init(void);
index 2e896f8ae29e4ce81886f115395dcedd9f898acf..9c8c23227c7f28970f64de6e21cab6e8bfa08415 100644 (file)
@@ -800,8 +800,8 @@ static inline int audit_dupe_selinux_field(struct audit_field *df,
 
        /* our own copy of se_str */
        se_str = kstrdup(sf->se_str, GFP_KERNEL);
-       if (unlikely(IS_ERR(se_str)))
-           return -ENOMEM;
+       if (unlikely(!se_str))
+               return -ENOMEM;
        df->se_str = se_str;
 
        /* our own (refreshed) copy of se_rule */
index 122fadb972fc2dd9ff3fda5cf15c3c0432a50007..46cf6b6814605fc1fa83871ce30cb0763d74ef99 100644 (file)
@@ -468,7 +468,7 @@ void fastcall put_files_struct(struct files_struct *files)
                fdt = files_fdtable(files);
                if (fdt != &files->fdtab)
                        kmem_cache_free(files_cachep, files);
-               call_rcu(&fdt->rcu, free_fdtable_rcu);
+               free_fdtable(fdt);
        }
 }
 
@@ -597,14 +597,6 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper)
 static void
 reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
 {
-       /* We don't want people slaying init.  */
-       if (p->exit_signal != -1)
-               p->exit_signal = SIGCHLD;
-
-       if (p->pdeath_signal)
-               /* We already hold the tasklist_lock here.  */
-               group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
-
        /* Move the child from its dying parent to the new one.  */
        if (unlikely(traced)) {
                /* Preserve ptrace links if someone else is tracing this child.  */
@@ -620,13 +612,7 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
                p->parent = p->real_parent;
                add_parent(p);
 
-               /* If we'd notified the old parent about this child's death,
-                * also notify the new parent.
-                */
-               if (p->exit_state == EXIT_ZOMBIE && p->exit_signal != -1 &&
-                   thread_group_empty(p))
-                       do_notify_parent(p, p->exit_signal);
-               else if (p->state == TASK_TRACED) {
+               if (p->state == TASK_TRACED) {
                        /*
                         * If it was at a trace stop, turn it into
                         * a normal stop since it's no longer being
@@ -636,6 +622,27 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced)
                }
        }
 
+       /* If this is a threaded reparent there is no need to
+        * notify anyone anything has happened.
+        */
+       if (p->real_parent->group_leader == father->group_leader)
+               return;
+
+       /* We don't want people slaying init.  */
+       if (p->exit_signal != -1)
+               p->exit_signal = SIGCHLD;
+               
+       if (p->pdeath_signal)
+               /* We already hold the tasklist_lock here.  */
+               group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
+
+       /* If we'd notified the old parent about this child's death,
+        * also notify the new parent.
+        */
+       if (!traced && p->exit_state == EXIT_ZOMBIE &&
+           p->exit_signal != -1 && thread_group_empty(p))
+               do_notify_parent(p, p->exit_signal);
+
        /*
         * process group orphan check
         * Case ii: Our child is in a different pgrp
index ebfd24a41858fd0c9751bfa356a9e85248e57c95..d27b2585574318ff2a3dd9e21b798c21164fa302 100644 (file)
@@ -517,10 +517,9 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 
        if (!handle)
                handle = handle_bad_irq;
-
-       if (desc->chip == &no_irq_chip) {
+       else if (desc->chip == &no_irq_chip) {
                printk(KERN_WARNING "Trying to install %sinterrupt handler "
-                      "for IRQ%d\n", is_chained ? "chained " : " ", irq);
+                      "for IRQ%d\n", is_chained ? "chained " : "", irq);
                /*
                 * Some ARM implementations install a handler for really dumb
                 * interrupt hardware without setting an irq_chip. This worked
index 185bb45eacf7289db6b99039634ad9f9f6fa5d96..c770e1a4e882289f66ae0e54451ba186f09c03d2 100644 (file)
@@ -335,7 +335,7 @@ static void __call_console_drivers(unsigned long start, unsigned long end)
 
 static int __read_mostly ignore_loglevel;
 
-int __init ignore_loglevel_setup(char *str)
+static int __init ignore_loglevel_setup(char *str)
 {
        ignore_loglevel = 1;
        printk(KERN_INFO "debug: ignoring loglevel setting.\n");
index a4701e7ba7d0967195ac6397a37729205e1cb97d..284e2e8b4eed0e0d31ea1a5d5fb9f732f0a16d67 100644 (file)
@@ -302,7 +302,7 @@ static struct rchan_callbacks default_channel_callbacks = {
 
 /**
  *     wakeup_readers - wake up readers waiting on a channel
- *     @private: the channel buffer
+ *     @work: work struct that contains the the channel buffer
  *
  *     This is the work function used to defer reader waking.  The
  *     reason waking is deferred is that calling directly from write
@@ -322,7 +322,7 @@ static void wakeup_readers(struct work_struct *work)
  *
  *     See relay_reset for description of effect.
  */
-static inline void __relay_reset(struct rchan_buf *buf, unsigned int init)
+static void __relay_reset(struct rchan_buf *buf, unsigned int init)
 {
        size_t i;
 
@@ -418,7 +418,7 @@ static struct rchan_buf *relay_open_buf(struct rchan *chan,
  *     The channel buffer and channel buffer data structure are then freed
  *     automatically when the last reference is given up.
  */
-static inline void relay_close_buf(struct rchan_buf *buf)
+static void relay_close_buf(struct rchan_buf *buf)
 {
        buf->finalized = 1;
        cancel_delayed_work(&buf->wake_readers);
@@ -426,7 +426,7 @@ static inline void relay_close_buf(struct rchan_buf *buf)
        kref_put(&buf->kref, relay_remove_buf);
 }
 
-static inline void setup_callbacks(struct rchan *chan,
+static void setup_callbacks(struct rchan *chan,
                                   struct rchan_callbacks *cb)
 {
        if (!cb) {
@@ -946,11 +946,10 @@ typedef int (*subbuf_actor_t) (size_t read_start,
 /*
  *     relay_file_read_subbufs - read count bytes, bridging subbuf boundaries
  */
-static inline ssize_t relay_file_read_subbufs(struct file *filp,
-                                             loff_t *ppos,
-                                             subbuf_actor_t subbuf_actor,
-                                             read_actor_t actor,
-                                             read_descriptor_t *desc)
+static ssize_t relay_file_read_subbufs(struct file *filp, loff_t *ppos,
+                                       subbuf_actor_t subbuf_actor,
+                                       read_actor_t actor,
+                                       read_descriptor_t *desc)
 {
        struct rchan_buf *buf = filp->private_data;
        size_t read_start, avail;
index 5cd833bc217367add6a2b07feaf923cab5c8d801..b515e3caad7f06531c8c669ff993bd1b1ea74f18 100644 (file)
@@ -1567,6 +1567,7 @@ int fastcall wake_up_state(struct task_struct *p, unsigned int state)
        return try_to_wake_up(p, state, 0);
 }
 
+static void task_running_tick(struct rq *rq, struct task_struct *p);
 /*
  * Perform scheduler related setup for a newly forked process p.
  * p is forked by current.
@@ -1627,7 +1628,7 @@ void fastcall sched_fork(struct task_struct *p, int clone_flags)
                 * runqueue lock is not a problem.
                 */
                current->time_slice = 1;
-               scheduler_tick();
+               task_running_tick(cpu_rq(cpu), current);
        }
        local_irq_enable();
        put_cpu();
@@ -4618,8 +4619,10 @@ asmlinkage long sys_sched_yield(void)
 
 static inline int __resched_legal(int expected_preempt_count)
 {
+#ifdef CONFIG_PREEMPT
        if (unlikely(preempt_count() != expected_preempt_count))
                return 0;
+#endif
        if (unlikely(system_state != SYSTEM_RUNNING))
                return 0;
        return 1;
@@ -5607,7 +5610,7 @@ static void cpu_attach_domain(struct sched_domain *sd, int cpu)
 }
 
 /* cpus with isolated domains */
-static cpumask_t __cpuinitdata cpu_isolated_map = CPU_MASK_NONE;
+static cpumask_t cpu_isolated_map = CPU_MASK_NONE;
 
 /* Setup the mask of cpus configured for isolated domains */
 static int __init isolated_cpu_setup(char *str)
index feddf817baa57f1180a01db876e2a4d17752daf0..c2a8ccfc288210fb45a3ae199c94572edbbc72b4 100644 (file)
@@ -1344,11 +1344,10 @@ fastcall signed long __sched schedule_timeout(signed long timeout)
                 * should never happens anyway). You just have the printk()
                 * that will tell you if something is gone wrong and where.
                 */
-               if (timeout < 0)
-               {
+               if (timeout < 0) {
                        printk(KERN_ERR "schedule_timeout: wrong timeout "
-                               "value %lx from %p\n", timeout,
-                               __builtin_return_address(0));
+                               "value %lx\n", timeout);
+                       dump_stack();
                        current->state = TASK_RUNNING;
                        goto out;
                }
index 742cbbe49bdc66ca9f39908af1bda5baed8194c6..a3da07c5af2835f57f094cddd20e731a8a77bdb5 100644 (file)
@@ -233,7 +233,7 @@ static void delayed_work_timer_fn(unsigned long __data)
 /**
  * queue_delayed_work - queue work on a workqueue after delay
  * @wq: workqueue to use
- * @work: delayable work to queue
+ * @dwork: delayable work to queue
  * @delay: number of jiffies to wait before queueing
  *
  * Returns 0 if @work was already on a queue, non-zero otherwise.
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(queue_delayed_work);
  * queue_delayed_work_on - queue work on specific CPU after delay
  * @cpu: CPU number to execute work on
  * @wq: workqueue to use
- * @work: work to queue
+ * @dwork: work to queue
  * @delay: number of jiffies to wait before queueing
  *
  * Returns 0 if @work was already on a queue, non-zero otherwise.
@@ -637,9 +637,11 @@ int schedule_on_each_cpu(work_func_t func)
 
        mutex_lock(&workqueue_mutex);
        for_each_online_cpu(cpu) {
-               INIT_WORK(per_cpu_ptr(works, cpu), func);
-               __queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu),
-                               per_cpu_ptr(works, cpu));
+               struct work_struct *work = per_cpu_ptr(works, cpu);
+
+               INIT_WORK(work, func);
+               set_bit(WORK_STRUCT_PENDING, work_data_bits(work));
+               __queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu), work);
        }
        mutex_unlock(&workqueue_mutex);
        flush_workqueue(keventd_wq);
index a1922765ff315dfe1a90879f567c82e08521eaa2..84272ed77f039c55de62be540ac19d23189cc06f 100644 (file)
@@ -63,8 +63,11 @@ static char *action_to_string(enum kobject_action action)
  * @action: action that is happening (usually KOBJ_MOVE)
  * @kobj: struct kobject that the action is happening to
  * @envp_ext: pointer to environmental data
+ *
+ * Returns 0 if kobject_uevent() is completed with success or the
+ * corresponding error when it fails.
  */
-void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                        char *envp_ext[])
 {
        char **envp;
@@ -79,14 +82,16 @@ void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
        u64 seq;
        char *seq_buff;
        int i = 0;
-       int retval;
+       int retval = 0;
        int j;
 
        pr_debug("%s\n", __FUNCTION__);
 
        action_string = action_to_string(action);
-       if (!action_string)
-               return;
+       if (!action_string) {
+               pr_debug("kobject attempted to send uevent without action_string!\n");
+               return -EINVAL;
+       }
 
        /* search the kset we belong to */
        top_kobj = kobj;
@@ -95,31 +100,39 @@ void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                        top_kobj = top_kobj->parent;
                } while (!top_kobj->kset && top_kobj->parent);
        }
-       if (!top_kobj->kset)
-               return;
+       if (!top_kobj->kset) {
+               pr_debug("kobject attempted to send uevent without kset!\n");
+               return -EINVAL;
+       }
 
        kset = top_kobj->kset;
        uevent_ops = kset->uevent_ops;
 
        /*  skip the event, if the filter returns zero. */
        if (uevent_ops && uevent_ops->filter)
-               if (!uevent_ops->filter(kset, kobj))
-                       return;
+               if (!uevent_ops->filter(kset, kobj)) {
+                       pr_debug("kobject filter function caused the event to drop!\n");
+                       return 0;
+               }
 
        /* environment index */
        envp = kzalloc(NUM_ENVP * sizeof (char *), GFP_KERNEL);
        if (!envp)
-               return;
+               return -ENOMEM;
 
        /* environment values */
        buffer = kmalloc(BUFFER_SIZE, GFP_KERNEL);
-       if (!buffer)
+       if (!buffer) {
+               retval = -ENOMEM;
                goto exit;
+       }
 
        /* complete object path */
        devpath = kobject_get_path(kobj, GFP_KERNEL);
-       if (!devpath)
+       if (!devpath) {
+               retval = -ENOENT;
                goto exit;
+       }
 
        /* originating subsystem */
        if (uevent_ops && uevent_ops->name)
@@ -204,7 +217,7 @@ exit:
        kfree(devpath);
        kfree(buffer);
        kfree(envp);
-       return;
+       return retval;
 }
 
 EXPORT_SYMBOL_GPL(kobject_uevent_env);
@@ -214,10 +227,13 @@ EXPORT_SYMBOL_GPL(kobject_uevent_env);
  *
  * @action: action that is happening (usually KOBJ_ADD and KOBJ_REMOVE)
  * @kobj: struct kobject that the action is happening to
+ *
+ * Returns 0 if kobject_uevent() is completed with success or the
+ * corresponding error when it fails.
  */
-void kobject_uevent(struct kobject *kobj, enum kobject_action action)
+int kobject_uevent(struct kobject *kobj, enum kobject_action action)
 {
-       kobject_uevent_env(kobj, action, NULL);
+       return kobject_uevent_env(kobj, action, NULL);
 }
 
 EXPORT_SYMBOL_GPL(kobject_uevent);
index 4a467faf1367bb031d49eb136ac16de0551a1629..0d07cc31c818108a5d9e3bc26444957108bad721 100644 (file)
@@ -52,12 +52,7 @@ int kref_put(struct kref *kref, void (*release)(struct kref *kref))
        WARN_ON(release == NULL);
        WARN_ON(release == (void (*)(struct kref *))kfree);
 
-       /*
-        * if current count is one, we are the last user and can release object
-        * right now, avoiding an atomic operation on 'refcount'
-        */
-       if ((atomic_read(&kref->refcount) == 1) ||
-           (atomic_dec_and_test(&kref->refcount))) {
+       if (atomic_dec_and_test(&kref->refcount)) {
                release(kref);
                return 1;
        }
index 8d667617f55847903ad1d364f6ee7fde3612f069..45b3553865cf731a865d03caab2684770a107dde 100644 (file)
@@ -189,7 +189,7 @@ __xip_unmap (struct address_space * mapping,
                        /* Nuke the page table entry. */
                        flush_cache_page(vma, address, pte_pfn(*pte));
                        pteval = ptep_clear_flush(vma, address, pte);
-                       page_remove_rmap(page);
+                       page_remove_rmap(page, vma);
                        dec_mm_counter(mm, file_rss);
                        BUG_ON(pte_dirty(pteval));
                        pte_unmap_unlock(pte, ptl);
index b77a002c3352f7c91898b75b6636cc60e3ceadc2..4e3f53dd5fd448d20a23296dfb398dd1d281fee0 100644 (file)
@@ -33,7 +33,7 @@ static int zap_pte(struct mm_struct *mm, struct vm_area_struct *vma,
                if (page) {
                        if (pte_dirty(pte))
                                set_page_dirty(page);
-                       page_remove_rmap(page);
+                       page_remove_rmap(page, vma);
                        page_cache_release(page);
                }
        } else {
index c00bac66ce9f2af4a651205c579b8b528565740f..563792f4f687e6e6dde9f98aaf87d3116b82daff 100644 (file)
@@ -681,7 +681,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
                                        mark_page_accessed(page);
                                file_rss--;
                        }
-                       page_remove_rmap(page);
+                       page_remove_rmap(page, vma);
                        tlb_remove_page(tlb, page);
                        continue;
                }
@@ -1586,7 +1586,7 @@ gotten:
        page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
        if (likely(pte_same(*page_table, orig_pte))) {
                if (old_page) {
-                       page_remove_rmap(old_page);
+                       page_remove_rmap(old_page, vma);
                        if (!PageAnon(old_page)) {
                                dec_mm_counter(mm, file_rss);
                                inc_mm_counter(mm, anon_rss);
index 237107c1b0847d79e6139daf5c811ea1c432c087..b3a198c9248d7947e7e3a929848431f7fbcb5954 100644 (file)
@@ -844,38 +844,6 @@ int set_page_dirty_lock(struct page *page)
 }
 EXPORT_SYMBOL(set_page_dirty_lock);
 
-/*
- * Clear a page's dirty flag, while caring for dirty memory accounting. 
- * Returns true if the page was previously dirty.
- */
-int test_clear_page_dirty(struct page *page)
-{
-       struct address_space *mapping = page_mapping(page);
-       unsigned long flags;
-
-       if (!mapping)
-               return TestClearPageDirty(page);
-
-       write_lock_irqsave(&mapping->tree_lock, flags);
-       if (TestClearPageDirty(page)) {
-               radix_tree_tag_clear(&mapping->page_tree,
-                               page_index(page), PAGECACHE_TAG_DIRTY);
-               write_unlock_irqrestore(&mapping->tree_lock, flags);
-               /*
-                * We can continue to use `mapping' here because the
-                * page is locked, which pins the address_space
-                */
-               if (mapping_cap_account_dirty(mapping)) {
-                       page_mkclean(page);
-                       dec_zone_page_state(page, NR_FILE_DIRTY);
-               }
-               return 1;
-       }
-       write_unlock_irqrestore(&mapping->tree_lock, flags);
-       return 0;
-}
-EXPORT_SYMBOL(test_clear_page_dirty);
-
 /*
  * Clear a page's dirty flag, while caring for dirty memory accounting.
  * Returns true if the page was previously dirty.
index d8a842a586db774f7a6b38fe08b187d0563e13fd..57306fa0114dfba74a081affcc4f988b1b05b310 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -47,6 +47,7 @@
 #include <linux/rmap.h>
 #include <linux/rcupdate.h>
 #include <linux/module.h>
+#include <linux/kallsyms.h>
 
 #include <asm/tlbflush.h>
 
@@ -432,7 +433,7 @@ static int page_mkclean_one(struct page *page, struct vm_area_struct *vma)
 {
        struct mm_struct *mm = vma->vm_mm;
        unsigned long address;
-       pte_t *pte, entry;
+       pte_t *pte;
        spinlock_t *ptl;
        int ret = 0;
 
@@ -444,17 +445,18 @@ static int page_mkclean_one(struct page *page, struct vm_area_struct *vma)
        if (!pte)
                goto out;
 
-       if (!pte_dirty(*pte) && !pte_write(*pte))
-               goto unlock;
+       if (pte_dirty(*pte) || pte_write(*pte)) {
+               pte_t entry;
 
-       entry = ptep_get_and_clear(mm, address, pte);
-       entry = pte_mkclean(entry);
-       entry = pte_wrprotect(entry);
-       ptep_establish(vma, address, pte, entry);
-       lazy_mmu_prot_update(entry);
-       ret = 1;
+               flush_cache_page(vma, address, pte_pfn(*pte));
+               entry = ptep_clear_flush(vma, address, pte);
+               entry = pte_wrprotect(entry);
+               entry = pte_mkclean(entry);
+               set_pte_at(vma, address, pte, entry);
+               lazy_mmu_prot_update(entry);
+               ret = 1;
+       }
 
-unlock:
        pte_unmap_unlock(pte, ptl);
 out:
        return ret;
@@ -489,6 +491,8 @@ int page_mkclean(struct page *page)
                if (mapping)
                        ret = page_mkclean_file(mapping, page);
        }
+       if (page_test_and_clear_dirty(page))
+               ret = 1;
 
        return ret;
 }
@@ -567,14 +571,20 @@ void page_add_file_rmap(struct page *page)
  *
  * The caller needs to hold the pte lock.
  */
-void page_remove_rmap(struct page *page)
+void page_remove_rmap(struct page *page, struct vm_area_struct *vma)
 {
        if (atomic_add_negative(-1, &page->_mapcount)) {
                if (unlikely(page_mapcount(page) < 0)) {
                        printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page));
+                       printk (KERN_EMERG "  page pfn = %lx\n", page_to_pfn(page));
                        printk (KERN_EMERG "  page->flags = %lx\n", page->flags);
                        printk (KERN_EMERG "  page->count = %x\n", page_count(page));
                        printk (KERN_EMERG "  page->mapping = %p\n", page->mapping);
+                       print_symbol (KERN_EMERG "  vma->vm_ops = %s\n", (unsigned long)vma->vm_ops);
+                       if (vma->vm_ops)
+                               print_symbol (KERN_EMERG "  vma->vm_ops->nopage = %s\n", (unsigned long)vma->vm_ops->nopage);
+                       if (vma->vm_file && vma->vm_file->f_op)
+                               print_symbol (KERN_EMERG "  vma->vm_file->f_op->mmap = %s\n", (unsigned long)vma->vm_file->f_op->mmap);
                        BUG();
                }
 
@@ -679,7 +689,7 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
                dec_mm_counter(mm, file_rss);
 
 
-       page_remove_rmap(page);
+       page_remove_rmap(page, vma);
        page_cache_release(page);
 
 out_unmap:
@@ -769,7 +779,7 @@ static void try_to_unmap_cluster(unsigned long cursor,
                if (pte_dirty(pteval))
                        set_page_dirty(page);
 
-               page_remove_rmap(page);
+               page_remove_rmap(page, vma);
                page_cache_release(page);
                dec_mm_counter(mm, file_rss);
                (*mapcount)--;
index 4bb28d218eb5caf064026e479873cc994e282a88..70da7a0981bfbad9683b5e9b0747277256a678ff 100644 (file)
@@ -515,7 +515,12 @@ static void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end)
                        size = SHMEM_NR_DIRECT;
                nr_swaps_freed = shmem_free_swp(ptr+idx, ptr+size);
        }
-       if (!topdir)
+
+       /*
+        * If there are no indirect blocks or we are punching a hole
+        * below indirect blocks, nothing to be done.
+        */
+       if (!topdir || (punch_hole && (limit <= SHMEM_NR_DIRECT)))
                goto done2;
 
        BUG_ON(limit <= SHMEM_NR_DIRECT);
index 909975f6e0903f4a4f065ded0f109a338193173f..0d4e57431de41c8d7fccfe9307bfb504087e5c03 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3553,7 +3553,7 @@ EXPORT_SYMBOL(kmem_cache_zalloc);
  *
  * Currently only used for dentry validation.
  */
-int fastcall kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)
+int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)
 {
        unsigned long addr = (unsigned long)ptr;
        unsigned long min_addr = PAGE_OFFSET;
@@ -3587,6 +3587,7 @@ out:
  * @cachep: The cache to allocate from.
  * @flags: See kmalloc().
  * @nodeid: node number of the target node.
+ * @caller: return address of caller, used for debug information
  *
  * Identical to kmem_cache_alloc but it will allocate memory on the given
  * node, which can improve the performance for cpu bound structures.
index 9bfb8e853860df2da0d752948352f87e3c099abd..4a38dd1a4ce85efffaa8275ccaaf1b42251f0ae9 100644 (file)
@@ -51,6 +51,22 @@ static inline void truncate_partial_page(struct page *page, unsigned partial)
                do_invalidatepage(page, partial);
 }
 
+void cancel_dirty_page(struct page *page, unsigned int account_size)
+{
+       /* If we're cancelling the page, it had better not be mapped any more */
+       if (page_mapped(page)) {
+               static unsigned int warncount;
+
+               WARN_ON(++warncount < 5);
+       }
+               
+       if (TestClearPageDirty(page) && account_size &&
+                       mapping_cap_account_dirty(page->mapping)) {
+               dec_zone_page_state(page, NR_FILE_DIRTY);
+               task_io_account_cancelled_write(account_size);
+       }
+}
+
 /*
  * If truncate cannot remove the fs-private metadata from the page, the page
  * becomes anonymous.  It will be left on the LRU and may even be mapped into
@@ -67,11 +83,11 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
        if (page->mapping != mapping)
                return;
 
+       cancel_dirty_page(page, PAGE_CACHE_SIZE);
+
        if (PagePrivate(page))
                do_invalidatepage(page, 0);
 
-       if (test_clear_page_dirty(page))
-               task_io_account_cancelled_write(PAGE_CACHE_SIZE);
        ClearPageUptodate(page);
        ClearPageMappedToDisk(page);
        remove_from_page_cache(page);
@@ -350,7 +366,6 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
                for (i = 0; !ret && i < pagevec_count(&pvec); i++) {
                        struct page *page = pvec.pages[i];
                        pgoff_t page_index;
-                       int was_dirty;
 
                        lock_page(page);
                        if (page->mapping != mapping) {
@@ -386,12 +401,8 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
                                          PAGE_CACHE_SIZE, 0);
                                }
                        }
-                       was_dirty = test_clear_page_dirty(page);
-                       if (!invalidate_complete_page2(mapping, page)) {
-                               if (was_dirty)
-                                       set_page_dirty(page);
+                       if (!invalidate_complete_page2(mapping, page))
                                ret = -EIO;
-                       }
                        unlock_page(page);
                }
                pagevec_release(&pvec);
index e9813b06c7a32f2be3b534722c521457a384e028..63eb9ab0032b9a865a3ca88f98ae36c0e2f115db 100644 (file)
@@ -1369,8 +1369,8 @@ void wakeup_kswapd(struct zone *zone, int order)
  *
  * For pass > 3 we also try to shrink the LRU lists that contain a few pages
  */
-static unsigned long shrink_all_zones(unsigned long nr_pages, int pass,
-                                     int prio, struct scan_control *sc)
+static unsigned long shrink_all_zones(unsigned long nr_pages, int prio,
+                                     int pass, struct scan_control *sc)
 {
        struct zone *zone;
        unsigned long nr_to_scan, ret = 0;
index 035915fc9ed3b397c98dcd204d02384401619a68..cfff930f2bafc78039908c1ab728d2340e4dc26d 100644 (file)
@@ -165,11 +165,14 @@ int __udp_lib_get_port(struct sock *sk, unsigned short snum,
                                goto gotit;
                        }
                        size = 0;
-                       sk_for_each(sk2, node, head)
-                               if (++size < best_size_so_far) {
-                                       best_size_so_far = size;
-                                       best = result;
-                               }
+                       sk_for_each(sk2, node, head) {
+                               if (++size >= best_size_so_far)
+                                       goto next;
+                       }
+                       best_size_so_far = size;
+                       best = result;
+               next:
+                       ;
                }
                result = best;
                for(i = 0; i < (1 << 16) / UDP_HTABLE_SIZE; i++, result += UDP_HTABLE_SIZE) {
index 743b05734a497598feea4ca8dd609ad33ed276bf..4afc75f9e377b7bb167749b8a51ec50589182cf9 100644 (file)
@@ -162,6 +162,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
        struct nlattr *nla_b;
        int nla_a_rem;
        int nla_b_rem;
+       u32 iter;
 
        if (!info->attrs[NLBL_CIPSOV4_A_TAGLST] ||
            !info->attrs[NLBL_CIPSOV4_A_MLSLVLLST])
@@ -185,20 +186,31 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
        ret_val = netlbl_cipsov4_add_common(info, doi_def);
        if (ret_val != 0)
                goto add_std_failure;
+       ret_val = -EINVAL;
 
        nla_for_each_nested(nla_a,
                            info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
                            nla_a_rem)
                if (nla_a->nla_type == NLBL_CIPSOV4_A_MLSLVL) {
+                       if (nla_validate_nested(nla_a,
+                                           NLBL_CIPSOV4_A_MAX,
+                                           netlbl_cipsov4_genl_policy) != 0)
+                                       goto add_std_failure;
                        nla_for_each_nested(nla_b, nla_a, nla_b_rem)
                                switch (nla_b->nla_type) {
                                case NLBL_CIPSOV4_A_MLSLVLLOC:
+                                       if (nla_get_u32(nla_b) >
+                                           CIPSO_V4_MAX_LOC_LVLS)
+                                               goto add_std_failure;
                                        if (nla_get_u32(nla_b) >=
                                            doi_def->map.std->lvl.local_size)
                                             doi_def->map.std->lvl.local_size =
                                                     nla_get_u32(nla_b) + 1;
                                        break;
                                case NLBL_CIPSOV4_A_MLSLVLREM:
+                                       if (nla_get_u32(nla_b) >
+                                           CIPSO_V4_MAX_REM_LVLS)
+                                               goto add_std_failure;
                                        if (nla_get_u32(nla_b) >=
                                            doi_def->map.std->lvl.cipso_size)
                                             doi_def->map.std->lvl.cipso_size =
@@ -206,9 +218,6 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
                                        break;
                                }
                }
-       if (doi_def->map.std->lvl.local_size > CIPSO_V4_MAX_LOC_LVLS ||
-           doi_def->map.std->lvl.cipso_size > CIPSO_V4_MAX_REM_LVLS)
-               goto add_std_failure;
        doi_def->map.std->lvl.local = kcalloc(doi_def->map.std->lvl.local_size,
                                              sizeof(u32),
                                              GFP_KERNEL);
@@ -223,6 +232,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
                ret_val = -ENOMEM;
                goto add_std_failure;
        }
+       for (iter = 0; iter < doi_def->map.std->lvl.local_size; iter++)
+               doi_def->map.std->lvl.local[iter] = CIPSO_V4_INV_LVL;
+       for (iter = 0; iter < doi_def->map.std->lvl.cipso_size; iter++)
+               doi_def->map.std->lvl.cipso[iter] = CIPSO_V4_INV_LVL;
        nla_for_each_nested(nla_a,
                            info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
                            nla_a_rem)
@@ -230,11 +243,6 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
                        struct nlattr *lvl_loc;
                        struct nlattr *lvl_rem;
 
-                       if (nla_validate_nested(nla_a,
-                                             NLBL_CIPSOV4_A_MAX,
-                                             netlbl_cipsov4_genl_policy) != 0)
-                               goto add_std_failure;
-
                        lvl_loc = nla_find_nested(nla_a,
                                                  NLBL_CIPSOV4_A_MLSLVLLOC);
                        lvl_rem = nla_find_nested(nla_a,
@@ -264,12 +272,18 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
                                nla_for_each_nested(nla_b, nla_a, nla_b_rem)
                                        switch (nla_b->nla_type) {
                                        case NLBL_CIPSOV4_A_MLSCATLOC:
+                                               if (nla_get_u32(nla_b) >
+                                                   CIPSO_V4_MAX_LOC_CATS)
+                                                       goto add_std_failure;
                                                if (nla_get_u32(nla_b) >=
                                              doi_def->map.std->cat.local_size)
                                             doi_def->map.std->cat.local_size =
                                                     nla_get_u32(nla_b) + 1;
                                                break;
                                        case NLBL_CIPSOV4_A_MLSCATREM:
+                                               if (nla_get_u32(nla_b) >
+                                                   CIPSO_V4_MAX_REM_CATS)
+                                                       goto add_std_failure;
                                                if (nla_get_u32(nla_b) >=
                                              doi_def->map.std->cat.cipso_size)
                                             doi_def->map.std->cat.cipso_size =
@@ -277,9 +291,6 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
                                                break;
                                        }
                        }
-               if (doi_def->map.std->cat.local_size > CIPSO_V4_MAX_LOC_CATS ||
-                   doi_def->map.std->cat.cipso_size > CIPSO_V4_MAX_REM_CATS)
-                       goto add_std_failure;
                doi_def->map.std->cat.local = kcalloc(
                                              doi_def->map.std->cat.local_size,
                                              sizeof(u32),
@@ -296,6 +307,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
                        ret_val = -ENOMEM;
                        goto add_std_failure;
                }
+               for (iter = 0; iter < doi_def->map.std->cat.local_size; iter++)
+                       doi_def->map.std->cat.local[iter] = CIPSO_V4_INV_CAT;
+               for (iter = 0; iter < doi_def->map.std->cat.cipso_size; iter++)
+                       doi_def->map.std->cat.cipso[iter] = CIPSO_V4_INV_CAT;
                nla_for_each_nested(nla_a,
                                    info->attrs[NLBL_CIPSOV4_A_MLSCATLST],
                                    nla_a_rem)
index d8d36dee5ab6b91693e23800afb5ffd2ca5c7b36..ef36be073a139418ef7e50942150eaa7f4acfcaf 100644 (file)
@@ -79,8 +79,8 @@
 #include <asm/uaccess.h>
 
 /* Event handler for inet6 address addition/deletion events.  */
-int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
-                        void *ptr)
+static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
+                               void *ptr)
 {
        struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr;
        struct sctp_sockaddr_entry *addr;
index 3a3db56729ce7159494b1e8a28b2cfcec39aeaeb..225f39b5d595760d19a84755962da2b083e2a7ed 100644 (file)
@@ -601,8 +601,8 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
 }
 
 /* Event handler for inet address addition/deletion events.  */
-int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
-                        void *ptr)
+static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
+                              void *ptr)
 {
        struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
        struct sctp_sockaddr_entry *addr;
index 30927d3a597f891e6c4a7dc852fa1b7a9802248a..f0bbe36799cffad5b6fa60891b08ed51ac58869f 100644 (file)
@@ -184,7 +184,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
        struct sctp_sock *sp;
        sctp_supported_addrs_param_t sat;
        __be16 types[2];
-       sctp_adaption_ind_param_t aiparam;
+       sctp_adaptation_ind_param_t aiparam;
 
        /* RFC 2960 3.3.2 Initiation (INIT) (1)
         *
@@ -249,9 +249,9 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
        sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param);
        if (sctp_prsctp_enable)
                sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param);
-       aiparam.param_hdr.type = SCTP_PARAM_ADAPTION_LAYER_IND;
+       aiparam.param_hdr.type = SCTP_PARAM_ADAPTATION_LAYER_IND;
        aiparam.param_hdr.length = htons(sizeof(aiparam));
-       aiparam.adaption_ind = htonl(sp->adaption_ind);
+       aiparam.adaptation_ind = htonl(sp->adaptation_ind);
        sctp_addto_chunk(retval, sizeof(aiparam), &aiparam);
 nodata:
        kfree(addrs.v);
@@ -269,7 +269,7 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
        sctp_cookie_param_t *cookie;
        int cookie_len;
        size_t chunksize;
-       sctp_adaption_ind_param_t aiparam;
+       sctp_adaptation_ind_param_t aiparam;
 
        retval = NULL;
 
@@ -323,9 +323,9 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
        if (asoc->peer.prsctp_capable)
                sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param);
 
-       aiparam.param_hdr.type = SCTP_PARAM_ADAPTION_LAYER_IND;
+       aiparam.param_hdr.type = SCTP_PARAM_ADAPTATION_LAYER_IND;
        aiparam.param_hdr.length = htons(sizeof(aiparam));
-       aiparam.adaption_ind = htonl(sctp_sk(asoc->base.sk)->adaption_ind);
+       aiparam.adaptation_ind = htonl(sctp_sk(asoc->base.sk)->adaptation_ind);
        sctp_addto_chunk(retval, sizeof(aiparam), &aiparam);
 
        /* We need to remove the const qualifier at this point.  */
@@ -1300,8 +1300,8 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep,
        /* Remember PR-SCTP capability. */
        cookie->c.prsctp_capable = asoc->peer.prsctp_capable;
 
-       /* Save adaption indication in the cookie. */
-       cookie->c.adaption_ind = asoc->peer.adaption_ind;
+       /* Save adaptation indication in the cookie. */
+       cookie->c.adaptation_ind = asoc->peer.adaptation_ind;
 
        /* Set an expiration time for the cookie.  */
        do_gettimeofday(&cookie->c.expiration);
@@ -1512,7 +1512,7 @@ no_hmac:
        retval->addip_serial = retval->c.initial_tsn;
        retval->adv_peer_ack_point = retval->ctsn_ack_point;
        retval->peer.prsctp_capable = retval->c.prsctp_capable;
-       retval->peer.adaption_ind = retval->c.adaption_ind;
+       retval->peer.adaptation_ind = retval->c.adaptation_ind;
 
        /* The INIT stuff will be done by the side effects.  */
        return retval;
@@ -1743,7 +1743,7 @@ static int sctp_verify_param(const struct sctp_association *asoc,
        case SCTP_PARAM_HEARTBEAT_INFO:
        case SCTP_PARAM_UNRECOGNIZED_PARAMETERS:
        case SCTP_PARAM_ECN_CAPABLE:
-       case SCTP_PARAM_ADAPTION_LAYER_IND:
+       case SCTP_PARAM_ADAPTATION_LAYER_IND:
                break;
 
        case SCTP_PARAM_HOST_NAME_ADDRESS:
@@ -2098,8 +2098,8 @@ static int sctp_process_param(struct sctp_association *asoc,
                asoc->peer.ecn_capable = 1;
                break;
 
-       case SCTP_PARAM_ADAPTION_LAYER_IND:
-               asoc->peer.adaption_ind = param.aind->adaption_ind;
+       case SCTP_PARAM_ADAPTATION_LAYER_IND:
+               asoc->peer.adaptation_ind = param.aind->adaptation_ind;
                break;
 
        case SCTP_PARAM_FWD_TSN_SUPPORT:
index 27cc444aaf119904408dc68d0bc66e6cee246ba9..aa51d190bfb2cbaddd3e3a5c907b3a14110d5c66 100644 (file)
@@ -688,12 +688,12 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
                goto nomem_ev;
 
        /* Sockets API Draft Section 5.3.1.6    
-        * When a peer sends a Adaption Layer Indication parameter , SCTP
+        * When a peer sends a Adaptation Layer Indication parameter , SCTP
         * delivers this notification to inform the application that of the
-        * peers requested adaption layer.
+        * peers requested adaptation layer.
         */
-       if (new_asoc->peer.adaption_ind) {
-               ai_ev = sctp_ulpevent_make_adaption_indication(new_asoc,
+       if (new_asoc->peer.adaptation_ind) {
+               ai_ev = sctp_ulpevent_make_adaptation_indication(new_asoc,
                                                            GFP_ATOMIC);
                if (!ai_ev)
                        goto nomem_aiev;
@@ -820,12 +820,12 @@ sctp_disposition_t sctp_sf_do_5_1E_ca(const struct sctp_endpoint *ep,
        sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
 
        /* Sockets API Draft Section 5.3.1.6
-        * When a peer sends a Adaption Layer Indication parameter , SCTP
+        * When a peer sends a Adaptation Layer Indication parameter , SCTP
         * delivers this notification to inform the application that of the
-        * peers requested adaption layer.
+        * peers requested adaptation layer.
         */
-       if (asoc->peer.adaption_ind) {
-               ev = sctp_ulpevent_make_adaption_indication(asoc, GFP_ATOMIC);
+       if (asoc->peer.adaptation_ind) {
+               ev = sctp_ulpevent_make_adaptation_indication(asoc, GFP_ATOMIC);
                if (!ev)
                        goto nomem;
 
@@ -1698,12 +1698,12 @@ static sctp_disposition_t sctp_sf_do_dupcook_b(const struct sctp_endpoint *ep,
        sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
 
        /* Sockets API Draft Section 5.3.1.6
-        * When a peer sends a Adaption Layer Indication parameter , SCTP
+        * When a peer sends a Adaptation Layer Indication parameter , SCTP
         * delivers this notification to inform the application that of the
-        * peers requested adaption layer.
+        * peers requested adaptation layer.
         */
-       if (asoc->peer.adaption_ind) {
-               ev = sctp_ulpevent_make_adaption_indication(asoc, GFP_ATOMIC);
+       if (asoc->peer.adaptation_ind) {
+               ev = sctp_ulpevent_make_adaptation_indication(asoc, GFP_ATOMIC);
                if (!ev)
                        goto nomem_ev;
 
@@ -1791,12 +1791,12 @@ static sctp_disposition_t sctp_sf_do_dupcook_d(const struct sctp_endpoint *ep,
                        goto nomem;
 
                /* Sockets API Draft Section 5.3.1.6
-                * When a peer sends a Adaption Layer Indication parameter,
+                * When a peer sends a Adaptation Layer Indication parameter,
                 * SCTP delivers this notification to inform the application
-                * that of the peers requested adaption layer.
+                * that of the peers requested adaptation layer.
                 */
-               if (asoc->peer.adaption_ind) {
-                       ai_ev = sctp_ulpevent_make_adaption_indication(asoc,
+               if (asoc->peer.adaptation_ind) {
+                       ai_ev = sctp_ulpevent_make_adaptation_indication(asoc,
                                                                 GFP_ATOMIC);
                        if (!ai_ev)
                                goto nomem;
index bdd8bd428b64f3de8ae4fff0c9414fce324ddf30..388d0fb1a3776a7e8a487ab3656df4b17166f2fa 100644 (file)
@@ -2731,17 +2731,17 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
        return err;
 }
 
-static int sctp_setsockopt_adaption_layer(struct sock *sk, char __user *optval,
+static int sctp_setsockopt_adaptation_layer(struct sock *sk, char __user *optval,
                                          int optlen)
 {
-       struct sctp_setadaption adaption;
+       struct sctp_setadaptation adaptation;
 
-       if (optlen != sizeof(struct sctp_setadaption))
+       if (optlen != sizeof(struct sctp_setadaptation))
                return -EINVAL;
-       if (copy_from_user(&adaption, optval, optlen)) 
+       if (copy_from_user(&adaptation, optval, optlen))
                return -EFAULT;
 
-       sctp_sk(sk)->adaption_ind = adaption.ssb_adaption_ind;
+       sctp_sk(sk)->adaptation_ind = adaptation.ssb_adaptation_ind;
 
        return 0;
 }
@@ -2894,8 +2894,8 @@ SCTP_STATIC int sctp_setsockopt(struct sock *sk, int level, int optname,
        case SCTP_MAXSEG:
                retval = sctp_setsockopt_maxseg(sk, optval, optlen);
                break;
-       case SCTP_ADAPTION_LAYER:
-               retval = sctp_setsockopt_adaption_layer(sk, optval, optlen);
+       case SCTP_ADAPTATION_LAYER:
+               retval = sctp_setsockopt_adaptation_layer(sk, optval, optlen);
                break;
        case SCTP_CONTEXT:
                retval = sctp_setsockopt_context(sk, optval, optlen);
@@ -3123,7 +3123,7 @@ SCTP_STATIC int sctp_init_sock(struct sock *sk)
        /* User specified fragmentation limit. */
        sp->user_frag         = 0;
 
-       sp->adaption_ind = 0;
+       sp->adaptation_ind = 0;
 
        sp->pf = sctp_get_pf_specific(sk->sk_family);
 
@@ -4210,21 +4210,21 @@ static int sctp_getsockopt_primary_addr(struct sock *sk, int len,
 }
 
 /*
- * 7.1.11  Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
+ * 7.1.11  Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
  *
- * Requests that the local endpoint set the specified Adaption Layer
+ * Requests that the local endpoint set the specified Adaptation Layer
  * Indication parameter for all future INIT and INIT-ACK exchanges.
  */
-static int sctp_getsockopt_adaption_layer(struct sock *sk, int len,
+static int sctp_getsockopt_adaptation_layer(struct sock *sk, int len,
                                  char __user *optval, int __user *optlen)
 {
-       struct sctp_setadaption adaption;
+       struct sctp_setadaptation adaptation;
 
-       if (len != sizeof(struct sctp_setadaption))
+       if (len != sizeof(struct sctp_setadaptation))
                return -EINVAL;
 
-       adaption.ssb_adaption_ind = sctp_sk(sk)->adaption_ind;
-       if (copy_to_user(optval, &adaption, len))
+       adaptation.ssb_adaptation_ind = sctp_sk(sk)->adaptation_ind;
+       if (copy_to_user(optval, &adaptation, len))
                return -EFAULT;
 
        return 0;
@@ -4635,8 +4635,8 @@ SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname,
                retval = sctp_getsockopt_peer_addr_info(sk, len, optval,
                                                        optlen);
                break;
-       case SCTP_ADAPTION_LAYER:
-               retval = sctp_getsockopt_adaption_layer(sk, len, optval,
+       case SCTP_ADAPTATION_LAYER:
+               retval = sctp_getsockopt_adaptation_layer(sk, len, optval,
                                                        optlen);
                break;
        case SCTP_CONTEXT:
index 93ac63b055ba21c5ca3e3dc06367061ff43dd68e..445e07a7ac4b873cd1f7138e806fd97c1d1a0193 100644 (file)
@@ -609,31 +609,31 @@ fail:
        return NULL;
 }
 
-/* Create and initialize a SCTP_ADAPTION_INDICATION notification.
+/* Create and initialize a SCTP_ADAPTATION_INDICATION notification.
  *
  * Socket Extensions for SCTP
- * 5.3.1.6 SCTP_ADAPTION_INDICATION
+ * 5.3.1.6 SCTP_ADAPTATION_INDICATION
  */
-struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication(
+struct sctp_ulpevent *sctp_ulpevent_make_adaptation_indication(
        const struct sctp_association *asoc, gfp_t gfp)
 {
        struct sctp_ulpevent *event;
-       struct sctp_adaption_event *sai;
+       struct sctp_adaptation_event *sai;
        struct sk_buff *skb;
 
-       event = sctp_ulpevent_new(sizeof(struct sctp_adaption_event),
+       event = sctp_ulpevent_new(sizeof(struct sctp_adaptation_event),
                                  MSG_NOTIFICATION, gfp);
        if (!event)
                goto fail;
 
        skb = sctp_event2skb(event);
-       sai = (struct sctp_adaption_event *)
-               skb_put(skb, sizeof(struct sctp_adaption_event));
+       sai = (struct sctp_adaptation_event *)
+               skb_put(skb, sizeof(struct sctp_adaptation_event));
 
-       sai->sai_type = SCTP_ADAPTION_INDICATION;
+       sai->sai_type = SCTP_ADAPTATION_INDICATION;
        sai->sai_flags = 0;
-       sai->sai_length = sizeof(struct sctp_adaption_event);
-       sai->sai_adaption_ind = asoc->peer.adaption_ind;
+       sai->sai_length = sizeof(struct sctp_adaptation_event);
+       sai->sai_adaptation_ind = asoc->peer.adaptation_ind;
        sctp_ulpevent_set_owner(event, asoc);
        sai->sai_assoc_id = sctp_assoc2id(asoc);
 
index 41465072d0b59168cbdcb9a3aed3294a58ab7458..8ef3f1c1943564f5eb788467f40dff1ff8852604 100644 (file)
@@ -228,7 +228,7 @@ static int __init init_spkm3_module(void)
        status = gss_mech_register(&gss_spkm3_mech);
        if (status)
                printk("Failed to register spkm3 gss mechanism!\n");
-       return 0;
+       return status;
 }
 
 static void __exit cleanup_spkm3_module(void)
index df3b272f7ce6b1d47bc2014b9c5f18e9ec763d2b..f50a70f550b39b37566269d466eaebd33de50ea6 100755 (executable)
@@ -1469,6 +1469,7 @@ sub push_parameter($$$) {
        my $param = shift;
        my $type = shift;
        my $file = shift;
+       my $anon = 0;
 
        my $param_name = $param;
        $param_name =~ s/\[.*//;
@@ -1484,9 +1485,20 @@ sub push_parameter($$$) {
            $param="void";
            $parameterdescs{void} = "no arguments";
        }
+       elsif ($type eq "" && ($param eq "struct" or $param eq "union"))
+       # handle unnamed (anonymous) union or struct:
+       {
+               $type = $param;
+               $param = "{unnamed_" . $param. "}";
+               $parameterdescs{$param} = "anonymous\n";
+               $anon = 1;
+       }
+
        # warn if parameter has no description
-       # (but ignore ones starting with # as these are no parameters
-       # but inline preprocessor statements
+       # (but ignore ones starting with # as these are not parameters
+       # but inline preprocessor statements);
+       # also ignore unnamed structs/unions;
+       if (!$anon) {
        if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) {
 
            $parameterdescs{$param_name} = $undescribed;
@@ -1500,6 +1512,7 @@ sub push_parameter($$$) {
                         " No description found for parameter '$param'\n";
            ++$warnings;
         }
+        }
 
        push @parameterlist, $param;
        $parametertypes{$param} = $type;
index aeedda77369989aa89d015af43dc92e30fc1a81c..ffd20254ff76113b90cef058e79ce5ecc6d63600 100644 (file)
@@ -9,7 +9,6 @@
 #define __SND_AOA_CODEC_ONYX_H
 #include <stddef.h>
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 #include <asm/pmac_low_i2c.h>
 #include <asm/prom.h>
 
index 9de8485ba3f591cf5d29ba6c416773683f4191f3..2cd81fa07ce100b2e12b3ba89425457845270b42 100644 (file)
@@ -61,7 +61,6 @@
  */
 #include <stddef.h>
 #include <linux/i2c.h>
-#include <linux/i2c-dev.h>
 #include <asm/pmac_low_i2c.h>
 #include <asm/prom.h>
 #include <linux/delay.h>
index 48ef0a09a7a71ad964aac00a79404945e6102d22..0c7bcd62e5b223f6c31f4328cd9baf376d700328 100644 (file)
@@ -1275,7 +1275,7 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer,
                        schedule();
                        remove_wait_queue(&ctl->change_sleep, &wait);
                        if (signal_pending(current))
-                               return result > 0 ? result : -ERESTARTSYS;
+                               return -ERESTARTSYS;
                        spin_lock_irq(&ctl->read_lock);
                }
                kev = snd_kctl_event(ctl->events.next);
index e0821eb3d8517b2f258bb0353ebe0c10418f8b73..786a82e68890c86247052513f6c72b2d9e3523d3 100644 (file)
@@ -810,6 +810,8 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream)
        struct snd_mask sformat_mask;
        struct snd_mask mask;
 
+       if (mutex_lock_interruptible(&runtime->oss.params_lock))
+               return -EINTR;
        sw_params = kmalloc(sizeof(*sw_params), GFP_KERNEL);
        params = kmalloc(sizeof(*params), GFP_KERNEL);
        sparams = kmalloc(sizeof(*sparams), GFP_KERNEL);
@@ -1020,6 +1022,7 @@ failure:
        kfree(sw_params);
        kfree(params);
        kfree(sparams);
+       mutex_unlock(&runtime->oss.params_lock);
        return err;
 }
 
@@ -1307,14 +1310,17 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
 
        if ((tmp = snd_pcm_oss_make_ready(substream)) < 0)
                return tmp;
+       mutex_lock(&runtime->oss.params_lock);
        while (bytes > 0) {
                if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) {
                        tmp = bytes;
                        if (tmp + runtime->oss.buffer_used > runtime->oss.period_bytes)
                                tmp = runtime->oss.period_bytes - runtime->oss.buffer_used;
                        if (tmp > 0) {
-                               if (copy_from_user(runtime->oss.buffer + runtime->oss.buffer_used, buf, tmp))
-                                       return xfer > 0 ? (snd_pcm_sframes_t)xfer : -EFAULT;
+                               if (copy_from_user(runtime->oss.buffer + runtime->oss.buffer_used, buf, tmp)) {
+                                       tmp = -EFAULT;
+                                       goto err;
+                               }
                        }
                        runtime->oss.buffer_used += tmp;
                        buf += tmp;
@@ -1325,22 +1331,24 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
                                tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer + runtime->oss.period_ptr, 
                                                         runtime->oss.buffer_used - runtime->oss.period_ptr, 1);
                                if (tmp <= 0)
-                                       return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
+                                       goto err;
                                runtime->oss.bytes += tmp;
                                runtime->oss.period_ptr += tmp;
                                runtime->oss.period_ptr %= runtime->oss.period_bytes;
                                if (runtime->oss.period_ptr == 0 ||
                                    runtime->oss.period_ptr == runtime->oss.buffer_used)
                                        runtime->oss.buffer_used = 0;
-                               else if ((substream->f_flags & O_NONBLOCK) != 0)
-                                       return xfer > 0 ? xfer : -EAGAIN;
+                               else if ((substream->f_flags & O_NONBLOCK) != 0) {
+                                       tmp = -EAGAIN;
+                                       goto err;
+                               }
                        }
                } else {
                        tmp = snd_pcm_oss_write2(substream,
                                                 (const char __force *)buf,
                                                 runtime->oss.period_bytes, 0);
                        if (tmp <= 0)
-                               return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
+                               goto err;
                        runtime->oss.bytes += tmp;
                        buf += tmp;
                        bytes -= tmp;
@@ -1350,7 +1358,12 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
                                break;
                }
        }
+       mutex_unlock(&runtime->oss.params_lock);
        return xfer;
+
+ err:
+       mutex_unlock(&runtime->oss.params_lock);
+       return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
 }
 
 static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf, size_t bytes, int in_kernel)
@@ -1397,12 +1410,13 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
 
        if ((tmp = snd_pcm_oss_make_ready(substream)) < 0)
                return tmp;
+       mutex_lock(&runtime->oss.params_lock);
        while (bytes > 0) {
                if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) {
                        if (runtime->oss.buffer_used == 0) {
                                tmp = snd_pcm_oss_read2(substream, runtime->oss.buffer, runtime->oss.period_bytes, 1);
                                if (tmp <= 0)
-                                       return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
+                                       goto err;
                                runtime->oss.bytes += tmp;
                                runtime->oss.period_ptr = tmp;
                                runtime->oss.buffer_used = tmp;
@@ -1410,8 +1424,10 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
                        tmp = bytes;
                        if ((size_t) tmp > runtime->oss.buffer_used)
                                tmp = runtime->oss.buffer_used;
-                       if (copy_to_user(buf, runtime->oss.buffer + (runtime->oss.period_ptr - runtime->oss.buffer_used), tmp))
-                               return xfer > 0 ? (snd_pcm_sframes_t)xfer : -EFAULT;
+                       if (copy_to_user(buf, runtime->oss.buffer + (runtime->oss.period_ptr - runtime->oss.buffer_used), tmp)) {
+                               tmp = -EFAULT;
+                               goto err;
+                       }
                        buf += tmp;
                        bytes -= tmp;
                        xfer += tmp;
@@ -1420,14 +1436,19 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
                        tmp = snd_pcm_oss_read2(substream, (char __force *)buf,
                                                runtime->oss.period_bytes, 0);
                        if (tmp <= 0)
-                               return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
+                               goto err;
                        runtime->oss.bytes += tmp;
                        buf += tmp;
                        bytes -= tmp;
                        xfer += tmp;
                }
        }
+       mutex_unlock(&runtime->oss.params_lock);
        return xfer;
+
+ err:
+       mutex_unlock(&runtime->oss.params_lock);
+       return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
 }
 
 static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file)
@@ -1528,6 +1549,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
                        return err;
                format = snd_pcm_oss_format_from(runtime->oss.format);
                width = snd_pcm_format_physical_width(format);
+               mutex_lock(&runtime->oss.params_lock);
                if (runtime->oss.buffer_used > 0) {
 #ifdef OSS_DEBUG
                        printk("sync: buffer_used\n");
@@ -1537,8 +1559,10 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
                                                   runtime->oss.buffer + runtime->oss.buffer_used,
                                                   size);
                        err = snd_pcm_oss_sync1(substream, runtime->oss.period_bytes);
-                       if (err < 0)
+                       if (err < 0) {
+                               mutex_unlock(&runtime->oss.params_lock);
                                return err;
+                       }
                } else if (runtime->oss.period_ptr > 0) {
 #ifdef OSS_DEBUG
                        printk("sync: period_ptr\n");
@@ -1548,8 +1572,10 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
                                                   runtime->oss.buffer,
                                                   size * 8 / width);
                        err = snd_pcm_oss_sync1(substream, size);
-                       if (err < 0)
+                       if (err < 0) {
+                               mutex_unlock(&runtime->oss.params_lock);
                                return err;
+                       }
                }
                /*
                 * The ALSA's period might be a bit large than OSS one.
@@ -1579,6 +1605,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
                                snd_pcm_lib_writev(substream, buffers, size);
                        }
                }
+               mutex_unlock(&runtime->oss.params_lock);
                /*
                 * finish sync: drain the buffer
                 */
@@ -2172,6 +2199,7 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream,
        runtime->oss.params = 1;
        runtime->oss.trigger = 1;
        runtime->oss.rate = 8000;
+       mutex_init(&runtime->oss.params_lock);
        switch (SNDRV_MINOR_OSS_DEVICE(minor)) {
        case SNDRV_MINOR_OSS_PCM_8:
                runtime->oss.format = AFMT_U8;
index 5ac6e19ccb4128814c2356f634c43a46a67b0ccf..8e018988551610574daece3988e78d53d1ca9c5d 100644 (file)
@@ -640,6 +640,10 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
                err = snd_pcm_substream_proc_init(substream);
                if (err < 0) {
                        snd_printk(KERN_ERR "Error in snd_pcm_stream_proc_init\n");
+                       if (prev == NULL)
+                               pstr->substream = NULL;
+                       else
+                               prev->next = NULL;
                        kfree(substream);
                        return err;
                }
index 0bb142a28539fe93c6be231b715b076821a33b3f..b336797be4fc877f4cd2ff0e8fa1e9e184ff2774 100644 (file)
@@ -79,19 +79,17 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram
                        runtime->silence_filled -= frames;
                        if ((snd_pcm_sframes_t)runtime->silence_filled < 0) {
                                runtime->silence_filled = 0;
-                               runtime->silence_start = (ofs + frames) - runtime->buffer_size;
+                               runtime->silence_start = new_hw_ptr;
                        } else {
-                               runtime->silence_start = ofs - runtime->silence_filled;
+                               runtime->silence_start = ofs;
                        }
-                       if ((snd_pcm_sframes_t)runtime->silence_start < 0)
-                               runtime->silence_start += runtime->boundary;
                }
                frames = runtime->buffer_size - runtime->silence_filled;
        }
        snd_assert(frames <= runtime->buffer_size, return);
        if (frames == 0)
                return;
-       ofs = (runtime->silence_start + runtime->silence_filled) % runtime->buffer_size;
+       ofs = runtime->silence_start % runtime->buffer_size;
        while (frames > 0) {
                transfer = ofs + frames > runtime->buffer_size ? runtime->buffer_size - ofs : frames;
                if (runtime->access == SNDRV_PCM_ACCESS_RW_INTERLEAVED ||
index 269c467ca9bb2ba76f3c001f1d824414ccb5bd07..0f055bfcbdac3b305e78c80fc6f0f01e0d21f56c 100644 (file)
@@ -1385,7 +1385,6 @@ static int snd_rawmidi_alloc_substreams(struct snd_rawmidi *rmidi,
        struct snd_rawmidi_substream *substream;
        int idx;
 
-       INIT_LIST_HEAD(&stream->substreams);
        for (idx = 0; idx < count; idx++) {
                substream = kzalloc(sizeof(*substream), GFP_KERNEL);
                if (substream == NULL) {
@@ -1440,6 +1439,9 @@ int snd_rawmidi_new(struct snd_card *card, char *id, int device,
        rmidi->device = device;
        mutex_init(&rmidi->open_mutex);
        init_waitqueue_head(&rmidi->open_wait);
+       INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams);
+       INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams);
+
        if (id != NULL)
                strlcpy(rmidi->id, id, sizeof(rmidi->id));
        if ((err = snd_rawmidi_alloc_substreams(rmidi,
index 4bffe509f7198a3617e754a21fa0da245d19878b..a3dc5e01e9f2cab6b17cf9602e876501a0d3ebeb 100644 (file)
@@ -151,7 +151,7 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
                return len;
        newlen = len;
        if (size_aligned > 0)
-               newlen = ((len + size_aligned - 1) / size_aligned) * size_aligned;
+               newlen = roundup(len, size_aligned);
        if (count < newlen)
                return -EAGAIN;
 
index c30669f14ac0f2f386ba524aae4eaba5add06c03..cefd228cd2aafb964b61150a7a2d9931459a7fe8 100644 (file)
@@ -27,7 +27,7 @@
 
 /* table entries are align to 32 */
 #define SGBUF_TBL_ALIGN                32
-#define sgbuf_align_table(tbl) ((((tbl) + SGBUF_TBL_ALIGN - 1) / SGBUF_TBL_ALIGN) * SGBUF_TBL_ALIGN)
+#define sgbuf_align_table(tbl) ALIGN((tbl), SGBUF_TBL_ALIGN)
 
 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab)
 {
index f50c276caee84923f69af67de63ab2fe08206b3f..7107753b85b52b727499ebdc4a8c018b988166ec 100644 (file)
@@ -143,9 +143,8 @@ static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
        struct snd_gf1_mem_block *pblock;
        unsigned int ptr1, ptr2;
 
-       align--;
-       if (w_16 && align < 1)
-               align = 1;
+       if (w_16 && align < 2)
+               align = 2;
        block->flags = w_16 ? SNDRV_GF1_MEM_BLOCK_16BIT : 0;
        block->owner = SNDRV_GF1_MEM_OWNER_DRIVER;
        block->share = 0;
@@ -165,7 +164,7 @@ static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
                        if (pblock->next->ptr < boundary)
                                ptr2 = pblock->next->ptr;
                }
-               ptr1 = (pblock->ptr + pblock->size + align) & ~align;
+               ptr1 = ALIGN(pblock->ptr + pblock->size, align);
                if (ptr1 >= ptr2)
                        continue;
                size1 = ptr2 - ptr1;
index c62a9e3d2ae4fd2aaa98202e5c01d53617e45643..3094f3852167c57585ff58418d3d92b45e8a1aea 100644 (file)
@@ -232,7 +232,7 @@ int snd_sbdsp_create(struct snd_card *card,
        chip->port = port;
        
        if (request_irq(irq, irq_handler, hardware == SB_HW_ALS4000 ?
-                       IRQF_DISABLED | IRQF_SHARED : IRQF_DISABLED,
+                       IRQF_SHARED : IRQF_DISABLED,
                        "SoundBlaster", (void *) chip)) {
                snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq);
                snd_sbdsp_free(chip);
index bed329edbdd7a357f2a9bd4a65aa91ab327d2261..78020d832e042ba089cae9c71f94833f988ec111 100644 (file)
@@ -1068,7 +1068,7 @@ wavefront_send_sample (snd_wavefront_t *dev,
                        blocksize = max_blksize;
                } else {
                        /* round to nearest 16-byte value */
-                       blocksize = ((length-written+7)&~0x7);
+                       blocksize = ALIGN(length - written, 8);
                }
 
                if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_BLOCK, NULL, NULL)) {
index 7abcb10b2754c01b5c156006ff92504c2c75134b..d2994cb4c8c96aad65b05ef787629bfbe46983e4 100644 (file)
@@ -129,9 +129,9 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x434d4941, 0xffffffff, "CMI9738",           patch_cm9738,   NULL },
 { 0x434d4961, 0xffffffff, "CMI9739",           patch_cm9739,   NULL },
 { 0x434d4969, 0xffffffff, "CMI9780",           patch_cm9780,   NULL },
-{ 0x434d4978, 0xffffffff, "CMI9761",           patch_cm9761,   NULL },
-{ 0x434d4982, 0xffffffff, "CMI9761",           patch_cm9761,   NULL },
-{ 0x434d4983, 0xffffffff, "CMI9761",           patch_cm9761,   NULL },
+{ 0x434d4978, 0xffffffff, "CMI9761A",          patch_cm9761,   NULL },
+{ 0x434d4982, 0xffffffff, "CMI9761B",          patch_cm9761,   NULL },
+{ 0x434d4983, 0xffffffff, "CMI9761A+",         patch_cm9761,   NULL },
 { 0x43525900, 0xfffffff8, "CS4297",            NULL,           NULL },
 { 0x43525910, 0xfffffff8, "CS4297A",           patch_cirrus_spdif,     NULL },
 { 0x43525920, 0xfffffff8, "CS4298",            patch_cirrus_spdif,             NULL },
@@ -382,7 +382,7 @@ int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg,
        unsigned short old, new;
 
        old = snd_ac97_read_cache(ac97, reg);
-       new = (old & ~mask) | value;
+       new = (old & ~mask) | (value & mask);
        change = old != new;
        if (change) {
                ac97->regs[reg] = new;
@@ -399,7 +399,7 @@ static int snd_ac97_ad18xx_update_pcm_bits(struct snd_ac97 *ac97, int codec, uns
 
        mutex_lock(&ac97->page_mutex);
        old = ac97->spec.ad18xx.pcmreg[codec];
-       new = (old & ~mask) | value;
+       new = (old & ~mask) | (value & mask);
        change = old != new;
        if (change) {
                mutex_lock(&ac97->reg_mutex);
index 15be6ba87c82f85e95fd661a311f19133a285f4a..e813968e0cf8a91324e1822e2453396836cf9991 100644 (file)
@@ -1467,7 +1467,9 @@ static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int
        snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0002);          // ID1C
        ac97->spec.ad18xx.codec_cfg[unchained_idx] = 0x0002;
        if (cidx1 >= 0) {
-               if (patch_ad1881_chained1(ac97, cidx1, 0x0006))         // SDIE | ID1C
+               if (cidx2 < 0)
+                       patch_ad1881_chained1(ac97, cidx1, 0);
+               else if (patch_ad1881_chained1(ac97, cidx1, 0x0006))    // SDIE | ID1C
                        patch_ad1881_chained1(ac97, cidx2, 0);
                else if (patch_ad1881_chained1(ac97, cidx2, 0x0006))    // SDIE | ID1C
                        patch_ad1881_chained1(ac97, cidx1, 0);
@@ -2261,7 +2263,8 @@ int patch_alc655(struct snd_ac97 * ac97)
        else { /* ALC655 */
                if (ac97->subsystem_vendor == 0x1462 &&
                    (ac97->subsystem_device == 0x0131 || /* MSI S270 laptop */
-                    ac97->subsystem_device == 0x0161)) /* LG K1 Express */
+                    ac97->subsystem_device == 0x0161 || /* LG K1 Express */
+                    ac97->subsystem_device == 0x0351))  /* MSI L725 laptop */
                        val &= ~(1 << 1); /* Pin 47 is EAPD (for internal speaker) */
                else
                        val |= (1 << 1); /* Pin 47 is spdif input pin */
index cbf8331c3d336aab210b3acf886e44c5f8e2f4ea..98970d401be9872be2eb61d3b4f1148da97d80e7 100644 (file)
@@ -858,7 +858,7 @@ snd_ad1889_free(struct snd_ad1889 *chip)
        synchronize_irq(chip->irq);
        
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void*)chip);
+               free_irq(chip->irq, chip);
 
 skip_hw:
        if (chip->iobase)
@@ -945,7 +945,7 @@ snd_ad1889_create(struct snd_card *card,
        spin_lock_init(&chip->lock);    /* only now can we call ad1889_free */
 
        if (request_irq(pci->irq, snd_ad1889_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, card->driver, (void*)chip)) {
+                       IRQF_SHARED, card->driver, chip)) {
                printk(KERN_ERR PFX "cannot obtain IRQ %d\n", pci->irq);
                snd_ad1889_free(chip);
                return -EBUSY;
index a7edd56542d4f571b27c93ffee5a868204a6e216..9327ab2eccb0c704a951a2a59b51f1c5eb28e2df 100644 (file)
@@ -2095,7 +2095,7 @@ static int snd_ali_free(struct snd_ali * codec)
                snd_ali_disable_address_interrupt(codec);
        if (codec->irq >= 0) {
                synchronize_irq(codec->irq);
-               free_irq(codec->irq, (void *)codec);
+               free_irq(codec->irq, codec);
        }
        if (codec->port)
                pci_release_regions(codec->pci);
@@ -2192,7 +2192,8 @@ static int __devinit snd_ali_resources(struct snd_ali *codec)
                return err;
        codec->port = pci_resource_start(codec->pci, 0);
 
-       if (request_irq(codec->pci->irq, snd_ali_card_interrupt, IRQF_DISABLED|IRQF_SHARED, "ALI 5451", (void *)codec)) {
+       if (request_irq(codec->pci->irq, snd_ali_card_interrupt,
+                       IRQF_SHARED, "ALI 5451", codec)) {
                snd_printk(KERN_ERR "Unable to request irq.\n");
                return -EBUSY;
        }
index 95f70f3cc37eb9621f24651b51db19d367caade2..9f406fbe0d9568e80cf691a8583f597419501fef 100644 (file)
@@ -190,7 +190,7 @@ static int snd_als300_free(struct snd_als300 *chip)
        snd_als300_dbgcallenter();
        snd_als300_set_irq_flag(chip, IRQ_DISABLE);
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
        pci_release_regions(chip->pci);
        pci_disable_device(chip->pci);
        kfree(chip);
@@ -722,8 +722,8 @@ static int __devinit snd_als300_create(snd_card_t *card,
        else
                irq_handler = snd_als300_interrupt;
 
-       if (request_irq(pci->irq, irq_handler, IRQF_DISABLED|IRQF_SHARED,
-                                       card->shortname, (void *)chip)) {
+       if (request_irq(pci->irq, irq_handler, IRQF_SHARED,
+                       card->shortname, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_als300_free(chip);
                return -EBUSY;
index e3e99f396711edecb7b0f06578ff40776488858c..476c3433073e9c1d78dfbeb8a737adb3c06f941c 100644 (file)
@@ -1583,7 +1583,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
                return -EIO;
        }
 
-       if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED,
                        card->shortname, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_atiixp_free(chip);
index dc54f2c68ed7a4fbaf3ba03415c932caa325bb3c..cc2e6b9d407e41e8456e6837083668494f5d8f96 100644 (file)
@@ -1256,7 +1256,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
                return -EIO;
        }
 
-       if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED,
                        card->shortname, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_atiixp_free(chip);
index 6ed5ad59f5b5c5051bb17f7762b2f2b46da6d360..238154bb7a254695894e5bd1bea6e38cdba5d92c 100644 (file)
@@ -198,7 +198,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
        }
 
        if ((err = request_irq(pci->irq, vortex_interrupt,
-                              IRQF_DISABLED | IRQF_SHARED, CARD_NAME_SHORT,
+                              IRQF_SHARED, CARD_NAME_SHORT,
                               chip)) != 0) {
                printk(KERN_ERR "cannot grab irq\n");
                goto irq_out;
index 2414ee6307565861c872b0b498f518d1c959ca3c..43edd2839b5afa7e9da3e8d5368d2e118023f03d 100644 (file)
@@ -1513,7 +1513,7 @@ snd_azf3328_free(struct snd_azf3328 *chip)
 __end_hw:
        snd_azf3328_free_joystick(chip);
         if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
        pci_release_regions(chip->pci);
        pci_disable_device(chip->pci);
 
@@ -1724,7 +1724,8 @@ snd_azf3328_create(struct snd_card *card,
        chip->synth_port = pci_resource_start(pci, 3);
        chip->mixer_port = pci_resource_start(pci, 4);
 
-       if (request_irq(pci->irq, snd_azf3328_interrupt, IRQF_DISABLED|IRQF_SHARED, card->shortname, (void *)chip)) {
+       if (request_irq(pci->irq, snd_azf3328_interrupt,
+                       IRQF_SHARED, card->shortname, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                err = -EBUSY;
                goto out_err;
index d33a37086df9afc4c5eaa40edcfacfc9ae931234..c3f3da21123454f3e8df27d0212c5eb084b2a93c 100644 (file)
@@ -699,7 +699,7 @@ static int __devinit snd_bt87x_pcm(struct snd_bt87x *chip, int device, char *nam
                                                     SNDRV_DMA_TYPE_DEV_SG,
                                                     snd_dma_pci_data(chip->pci),
                                                        128 * 1024,
-                                                       (255 * 4092 + 1023) & ~1023);
+                                                       ALIGN(255 * 4092, 1024));
 }
 
 static int __devinit snd_bt87x_create(struct snd_card *card,
@@ -747,7 +747,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
        snd_bt87x_writel(chip, REG_INT_MASK, 0);
        snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS);
 
-       if (request_irq(pci->irq, snd_bt87x_interrupt, IRQF_DISABLED | IRQF_SHARED,
+       if (request_irq(pci->irq, snd_bt87x_interrupt, IRQF_SHARED,
                        "Bt87x audio", chip)) {
                snd_bt87x_free(chip);
                snd_printk(KERN_ERR "cannot grab irq\n");
index 9cb66c59f523e50251fe17013f87564347735777..aaac6e5b47676c07f1966a6ce0c709ace94d738f 100644 (file)
@@ -590,7 +590,7 @@ struct snd_ca0106 {
        struct resource *res_port;
        int irq;
 
-       unsigned int revision;          /* chip revision */
+       unsigned char revision;         /* chip revision */
        unsigned int serial;            /* serial number */
        unsigned short model;           /* subsystem id */
 
index 6fa4a302f7de06d7371007b49a8109ea2a2d031b..f61f052f6d14d01cb88933c014cc9a945acbaba8 100644 (file)
@@ -154,6 +154,7 @@ MODULE_SUPPORTED_DEVICE("{{Creative,SB CA0106 chip}}");
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+static uint subsystem[SNDRV_CARDS]; /* Force card subsystem model */
 
 module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for the CA0106 soundcard.");
@@ -161,6 +162,8 @@ module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for the CA0106 soundcard.");
 module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, "Enable the CA0106 soundcard.");
+module_param_array(subsystem, uint, NULL, 0444);
+MODULE_PARM_DESC(subsystem, "Force card subsystem model.");
 
 #include "ca0106.h"
 
@@ -194,6 +197,17 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
           .gpio_type = 1,
           .i2c_adc = 1,
           .spi_dac = 1 } ,
+        /* New Audigy LS. Has a different DAC. */
+        /* SB0570:
+         * CTRL:CA0106-DAT
+         * ADC: WM8775EDS
+         * DAC: WM8768GEDS
+         */
+        { .serial = 0x10111102,
+          .name   = "Audigy SE OEM [SB0570a]",
+          .gpio_type = 1,
+          .i2c_adc = 1,
+          .spi_dac = 1 } ,
         /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */
         /* SB0438
          * CTRL:CA0106-DAT
@@ -1046,7 +1060,7 @@ static int snd_ca0106_free(struct snd_ca0106 *chip)
 
        // release the irq
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
        pci_disable_device(chip->pci);
        kfree(chip);
        return 0;
@@ -1223,7 +1237,7 @@ static unsigned int i2c_adc_init[][2] = {
        { 0x15, ADC_MUX_LINEIN },  /* ADC Mixer control */
 };
 
-static int __devinit snd_ca0106_create(struct snd_card *card,
+static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
                                         struct pci_dev *pci,
                                         struct snd_ca0106 **rchip)
 {
@@ -1267,8 +1281,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card,
        }
 
        if (request_irq(pci->irq, snd_ca0106_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, "snd_ca0106",
-                       (void *)chip)) {
+                       IRQF_SHARED, "snd_ca0106", chip)) {
                snd_ca0106_free(chip);
                printk(KERN_ERR "cannot grab irq\n");
                return -EBUSY;
@@ -1283,21 +1296,29 @@ static int __devinit snd_ca0106_create(struct snd_card *card,
 
        pci_set_master(pci);
        /* read revision & serial */
-       pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
+       pci_read_config_byte(pci, PCI_REVISION_ID, &chip->revision);
        pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
        pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
 #if 1
-       printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
+       printk(KERN_INFO "snd-ca0106: Model %04x Rev %08x Serial %08x\n", chip->model,
               chip->revision, chip->serial);
 #endif
        strcpy(card->driver, "CA0106");
        strcpy(card->shortname, "CA0106");
 
        for (c = ca0106_chip_details; c->serial; c++) {
-               if (c->serial == chip->serial)
+               if (subsystem[dev]) {
+                       if (c->serial == subsystem[dev])
+                               break;
+               } else if (c->serial == chip->serial)
                        break;
        }
        chip->details = c;
+       if (subsystem[dev]) {
+               printk(KERN_INFO "snd-ca0106: Sound card name=%s, subsystem=0x%x. Forced to subsystem=0x%x\n",
+                        c->name, chip->serial, subsystem[dev]);
+       }
+
        sprintf(card->longname, "%s at 0x%lx irq %i",
                c->name, chip->port, chip->irq);
 
@@ -1540,7 +1561,7 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
        if (card == NULL)
                return -ENOMEM;
 
-       if ((err = snd_ca0106_create(card, pci, &chip)) < 0) {
+       if ((err = snd_ca0106_create(dev, card, pci, &chip)) < 0) {
                snd_card_free(card);
                return err;
        }
index 0093cd1f92db3ac352124dda27df0d9e42e6454a..71c58df4af285569a55945757d4568849b5457d8 100644 (file)
@@ -2862,7 +2862,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
        cm->iobase = pci_resource_start(pci, 0);
 
        if (request_irq(pci->irq, snd_cmipci_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, card->driver, cm)) {
+                       IRQF_SHARED, card->driver, cm)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_cmipci_free(cm);
                return -EBUSY;
index 0905fa88129dde9a9550dba00b776082e2d02893..8e5519de7115f2897f0d31072fa12194e9d9ef38 100644 (file)
@@ -1391,7 +1391,7 @@ static int __devinit snd_cs4281_create(struct snd_card *card,
                return -ENOMEM;
        }
        
-       if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_SHARED,
                        "CS4281", chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_cs4281_free(chip);
index 2807b9756ef09d96e2f48646084d201aa7daefd0..2ae539b195fdd95f8de6d508a90ebbde67fc1ec0 100644 (file)
@@ -3867,7 +3867,7 @@ int __devinit snd_cs46xx_create(struct snd_card *card,
                }
        }
 
-       if (request_irq(pci->irq, snd_cs46xx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_cs46xx_interrupt, IRQF_SHARED,
                        "CS46XX", chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_cs46xx_free(chip);
index 2441238f2004ab40e94e1e160c8176e00407e06e..b8e75ef9c1e6f6672723fb4c5a689f5efc36d1d8 100644 (file)
@@ -320,7 +320,7 @@ static int __devinit snd_cs5535audio_create(struct snd_card *card,
        cs5535au->port = pci_resource_start(pci, 0);
 
        if (request_irq(pci->irq, snd_cs5535audio_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, "CS5535 Audio", cs5535au)) {
+                       IRQF_SHARED, "CS5535 Audio", cs5535au)) {
                snd_printk("unable to grab IRQ %d\n", pci->irq);
                err = -EBUSY;
                goto sndfail;
index e5e88fe54de05d416ac39f1910f0dc9c9a83aa6c..047e0b5bf15d3af1ac3b44a622c0a0a4a2cfce38 100644 (file)
@@ -1872,7 +1872,7 @@ static int snd_echo_free(struct echoaudio *chip)
        DE_INIT(("Stopped.\n"));
 
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
 
        if (chip->dsp_registers)
                iounmap(chip->dsp_registers);
@@ -1950,8 +1950,8 @@ static __devinit int snd_echo_create(struct snd_card *card,
        chip->dsp_registers = (volatile u32 __iomem *)
                ioremap_nocache(chip->dsp_registers_phys, sz);
 
-       if (request_irq(pci->irq, snd_echo_interrupt, IRQF_DISABLED | IRQF_SHARED,
-                                               ECHOCARD_NAME, (void *)chip)) {
+       if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
+                       ECHOCARD_NAME, chip)) {
                snd_echo_free(chip);
                snd_printk(KERN_ERR "cannot grab irq\n");
                return -EBUSY;
index 8bc4ffa6220db1c9d629fef93db74d3fced0bd47..972ec40d8166ce3d90001a790ac34cabaa7c6048 100644 (file)
@@ -759,7 +759,7 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu)
        free_pm_buffer(emu);
 #endif
        if (emu->irq >= 0)
-               free_irq(emu->irq, (void *)emu);
+               free_irq(emu->irq, emu);
        if (emu->port)
                pci_release_regions(emu->pci);
        if (emu->card_capabilities->ca0151_chip) /* P16V */     
@@ -1246,7 +1246,8 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
        }
        emu->port = pci_resource_start(pci, 0);
 
-       if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_DISABLED|IRQF_SHARED, "EMU10K1", (void *)emu)) {
+       if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED,
+                       "EMU10K1", emu)) {
                err = -EBUSY;
                goto error;
        }
index c46905a111753b3774d487018852af7318856b39..2199b42a601994539c076c81d8e361e415316d32 100644 (file)
@@ -235,7 +235,7 @@ struct emu10k1x {
        struct resource *res_port;
        int irq;
 
-       unsigned int revision;          /* chip revision */
+       unsigned char revision;         /* chip revision */
        unsigned int serial;            /* serial number */
        unsigned short model;           /* subsystem id */
 
@@ -760,7 +760,7 @@ static int snd_emu10k1x_free(struct emu10k1x *chip)
 
        // release the irq
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
 
        // release the DMA
        if (chip->dma_buffer.area) {
@@ -927,8 +927,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
        }
 
        if (request_irq(pci->irq, snd_emu10k1x_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, "EMU10K1X",
-                       (void *)chip)) {
+                       IRQF_SHARED, "EMU10K1X", chip)) {
                snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq);
                snd_emu10k1x_free(chip);
                return -EBUSY;
@@ -943,7 +942,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
 
        pci_set_master(pci);
        /* read revision & serial */
-       pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
+       pci_read_config_byte(pci, PCI_REVISION_ID, &chip->revision);
        pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
        pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
        snd_printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
index d2a811f222c926b4549dda3e8b3b07ebc04a3357..a84f6b21024fb368e18eee643be6b47b81886873 100644 (file)
@@ -2141,7 +2141,7 @@ static int __devinit snd_ensoniq_create(struct snd_card *card,
                return err;
        }
        ensoniq->port = pci_resource_start(pci, 0);
-       if (request_irq(pci->irq, snd_audiopci_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_audiopci_interrupt, IRQF_SHARED,
                        "Ensoniq AudioPCI", ensoniq)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_ensoniq_free(ensoniq);
index 1a8d36df4b5dab6d102cb87c879c43106afa3edf..66ac26c5a2403027bf724dc2e095a83f41768343 100644 (file)
@@ -1508,7 +1508,7 @@ static int es1938_resume(struct pci_dev *pci)
        }
 
        if (request_irq(pci->irq, snd_es1938_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, "ES1938", chip)) {
+                       IRQF_SHARED, "ES1938", chip)) {
                printk(KERN_ERR "es1938: unable to grab IRQ %d, "
                       "disabling device\n", pci->irq);
                snd_card_disconnect(card);
@@ -1631,7 +1631,7 @@ static int __devinit snd_es1938_create(struct snd_card *card,
        chip->vc_port = pci_resource_start(pci, 2);
        chip->mpu_port = pci_resource_start(pci, 3);
        chip->game_port = pci_resource_start(pci, 4);
-       if (request_irq(pci->irq, snd_es1938_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_es1938_interrupt, IRQF_SHARED,
                        "ES1938", chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_es1938_free(chip);
index 092da53e1464688d877cc1c0a6979fe0fa5258c4..dc84c189b05f25922e253c4418b71754fba4838d 100644 (file)
@@ -1337,7 +1337,7 @@ static struct esm_memory *snd_es1968_new_memory(struct es1968 *chip, int size)
        struct esm_memory *buf;
        struct list_head *p;
        
-       size = ((size + ESM_MEM_ALIGN - 1) / ESM_MEM_ALIGN) * ESM_MEM_ALIGN;
+       size = ALIGN(size, ESM_MEM_ALIGN);
        mutex_lock(&chip->memory_mutex);
        list_for_each(p, &chip->buf_list) {
                buf = list_entry(p, struct esm_memory, list);
@@ -2462,7 +2462,7 @@ static int snd_es1968_free(struct es1968 *chip)
        }
 
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
        snd_es1968_free_gameport(chip);
        chip->master_switch = NULL;
        chip->master_volume = NULL;
@@ -2552,8 +2552,8 @@ static int __devinit snd_es1968_create(struct snd_card *card,
                return err;
        }
        chip->io_port = pci_resource_start(pci, 0);
-       if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_DISABLED|IRQF_SHARED,
-                       "ESS Maestro", (void*)chip)) {
+       if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_SHARED,
+                       "ESS Maestro", chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_es1968_free(chip);
                return -EBUSY;
index 77e3d5c1830201b206768ea1e84092e71a107bc1..b7b361ce3a93bb6270807fc75b0ea31db10aa09a 100644 (file)
@@ -1395,7 +1395,7 @@ static int __devinit snd_fm801_create(struct snd_card *card,
        }
        chip->port = pci_resource_start(pci, 0);
        if ((tea575x_tuner & 0x0010) == 0) {
-               if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_DISABLED|IRQF_SHARED,
+               if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_SHARED,
                                "FM801", chip)) {
                        snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq);
                        snd_fm801_free(chip);
index 71482c15a852b0d6b5325d449ac353f3f47119af..18bbc87e376f167c5beb9c823ab2ffb3cb0d4f0a 100644 (file)
@@ -1367,9 +1367,6 @@ static struct hda_rate_tbl rate_bits[] = {
        { 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */
        { 192000, SNDRV_PCM_RATE_192000, 0x1800 }, /* 4 x 48 */
 
-       /* not autodetected value */
-       { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
-
        { 0 } /* terminator */
 };
 
index e35cfd326df28b0048483813037dfa0384dfbe6a..9fd34f85cad507a0847d1d582c1a6c157f884bb7 100644 (file)
@@ -1380,7 +1380,8 @@ static int __devinit azx_init_stream(struct azx *chip)
 
 static int azx_acquire_irq(struct azx *chip, int do_disconnect)
 {
-       if (request_irq(chip->pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(chip->pci->irq, azx_interrupt,
+                       chip->msi ? 0 : IRQF_SHARED,
                        "HDA Intel", chip)) {
                printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
                       "disabling device\n", chip->pci->irq);
index d737f17695a33acc62fd772202068a67b4f7618b..17df4d0fe135b4a13e56a78df4f36c58c296b4a6 100644 (file)
@@ -45,7 +45,7 @@ static const char *get_wid_type_name(unsigned int wid_value)
        if (names[wid_value])
                return names[wid_value];
        else
-               return "UNKOWN Widget";
+               return "UNKNOWN Widget";
 }
 
 static void print_amp_caps(struct snd_info_buffer *buffer,
@@ -88,6 +88,48 @@ static void print_amp_vals(struct snd_info_buffer *buffer,
        snd_iprintf(buffer, "\n");
 }
 
+static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm)
+{
+       static unsigned int rates[] = {
+               8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200,
+               96000, 176400, 192000, 384000
+       };
+       int i;
+
+       pcm &= AC_SUPPCM_RATES;
+       snd_iprintf(buffer, "    rates [0x%x]:", pcm);
+       for (i = 0; i < ARRAY_SIZE(rates); i++) 
+               if (pcm & (1 << i))
+                       snd_iprintf(buffer, " %d", rates[i]);
+       snd_iprintf(buffer, "\n");
+}
+
+static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm)
+{
+       static unsigned int bits[] = { 8, 16, 20, 24, 32 };
+       int i;
+
+       pcm = (pcm >> 16) & 0xff;
+       snd_iprintf(buffer, "    bits [0x%x]:", pcm);
+       for (i = 0; i < ARRAY_SIZE(bits); i++)
+               if (pcm & (1 << i))
+                       snd_iprintf(buffer, " %d", bits[i]);
+       snd_iprintf(buffer, "\n");
+}
+
+static void print_pcm_formats(struct snd_info_buffer *buffer,
+                             unsigned int streams)
+{
+       snd_iprintf(buffer, "    formats [0x%x]:", streams & 0xf);
+       if (streams & AC_SUPFMT_PCM)
+               snd_iprintf(buffer, " PCM");
+       if (streams & AC_SUPFMT_FLOAT32)
+               snd_iprintf(buffer, " FLOAT");
+       if (streams & AC_SUPFMT_AC3)
+               snd_iprintf(buffer, " AC3");
+       snd_iprintf(buffer, "\n");
+}
+
 static void print_pcm_caps(struct snd_info_buffer *buffer,
                           struct hda_codec *codec, hda_nid_t nid)
 {
@@ -97,8 +139,9 @@ static void print_pcm_caps(struct snd_info_buffer *buffer,
                snd_iprintf(buffer, "N/A\n");
                return;
        }
-       snd_iprintf(buffer, "rates 0x%03x, bits 0x%02x, types 0x%x\n",
-                   pcm & AC_SUPPCM_RATES, (pcm >> 16) & 0xff, stream & 0xf);
+       print_pcm_rates(buffer, pcm);
+       print_pcm_bits(buffer, pcm);
+       print_pcm_formats(buffer, stream);
 }
 
 static const char *get_jack_location(u32 cfg)
@@ -210,7 +253,7 @@ static void print_codec_info(struct snd_info_entry *entry, struct snd_info_buffe
        snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id);
        if (! codec->afg)
                return;
-       snd_iprintf(buffer, "Default PCM: ");
+       snd_iprintf(buffer, "Default PCM:\n");
        print_pcm_caps(buffer, codec, codec->afg);
        snd_iprintf(buffer, "Default Amp-In caps: ");
        print_amp_caps(buffer, codec, codec->afg, HDA_INPUT);
@@ -278,7 +321,7 @@ static void print_codec_info(struct snd_info_entry *entry, struct snd_info_buffe
 
                if ((wid_type == AC_WID_AUD_OUT || wid_type == AC_WID_AUD_IN) &&
                    (wid_caps & AC_WCAP_FORMAT_OVRD)) {
-                       snd_iprintf(buffer, "  PCM: ");
+                       snd_iprintf(buffer, "  PCM:\n");
                        print_pcm_caps(buffer, codec, nid);
                }
 
index edd22dec8286e0161b57a0ce4570bf060a572b3b..076365bc10e970706db63bbf99f52303347664fe 100644 (file)
@@ -794,6 +794,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
        { .modelname = "3stack",        .config = AD1986A_3STACK },
        { .pci_subvendor = 0x10de, .pci_subdevice = 0xcb84,
          .config = AD1986A_3STACK }, /* ASUS A8N-VM CSM */
+       { .pci_subvendor = 0x1043, .pci_subdevice = 0x817f,
+         .config = AD1986A_3STACK }, /* ASUS P5P-L2 */
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b3,
          .config = AD1986A_3STACK }, /* ASUS P5RD2-VM / P5GPL-X SE */
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x81cb,
@@ -811,7 +813,7 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
        { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024,
          .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */
        { .pci_subvendor = 0x144d, .pci_subdevice = 0xc026,
-         .config = AD1986A_LAPTOP_EAPD }, /* Samsung X10-T2300 Culesa */
+         .config = AD1986A_LAPTOP_EAPD }, /* Samsung X11-T2300 Culesa */
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x1153,
          .config = AD1986A_LAPTOP_EAPD }, /* ASUS M9 */
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213,
@@ -822,6 +824,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
          .config = AD1986A_LAPTOP_EAPD }, /* ASUS U5F */
        { .pci_subvendor = 0x1043, .pci_subdevice = 0x1297,
          .config = AD1986A_LAPTOP_EAPD }, /* ASUS Z62F */
+       { .pci_subvendor = 0x1043, .pci_subdevice = 0x12b3,
+         .config = AD1986A_LAPTOP_EAPD }, /* ASUS V1j */
        { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af,
          .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */
        { .pci_subvendor = 0x17aa, .pci_subdevice = 0x2066,
@@ -1640,7 +1644,7 @@ static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol,
        int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
                                      spec->num_channel_mode,
                                      &spec->multiout.max_channels);
-       if (! err && spec->need_dac_fix)
+       if (err >= 0 && spec->need_dac_fix)
                spec->multiout.num_dacs = spec->multiout.max_channels / 2;
        return err;
 }
index fb961448db199701271a4688840b8a1e300f983f..29e4c48151bc4d9fda220d26ccca0f424de77fd2 100644 (file)
@@ -271,7 +271,7 @@ static int alc_ch_mode_put(struct snd_kcontrol *kcontrol,
        int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
                                      spec->num_channel_mode,
                                      &spec->multiout.max_channels);
-       if (! err && spec->need_dac_fix)
+       if (err >= 0 && spec->need_dac_fix)
                spec->multiout.num_dacs = spec->multiout.max_channels / 2;
        return err;
 }
@@ -5872,6 +5872,8 @@ static struct hda_board_config alc262_cfg_tbl[] = {
        { .modelname = "hp-bpc", .config = ALC262_HP_BPC },
        { .pci_subvendor = 0x103c, .pci_subdevice = 0x280c,
          .config = ALC262_HP_BPC }, /* xw4400 */
+       { .pci_subvendor = 0x103c, .pci_subdevice = 0x2801,
+         .config = ALC262_HP_BPC }, /* q965 */
        { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014,
          .config = ALC262_HP_BPC }, /* xw6400 */
        { .pci_subvendor = 0x103c, .pci_subdevice = 0x3015,
index cc87dff1eb567feb1c942523d604e14b60b43a37..ed5e45e35963e063fa1249c4a7c8469ba7e4d133 100644 (file)
@@ -243,7 +243,8 @@ static int si3054_init(struct hda_codec *codec)
 
        if((val&SI3054_MEI_READY) != SI3054_MEI_READY) {
                snd_printk(KERN_ERR "si3054: cannot initialize. EXT MID = %04x\n", val);
-               return -EACCES;
+               /* let's pray that this is no fatal error */
+               /* return -EACCES; */
        }
 
        SET_REG(codec, SI3054_GPIO_POLARITY, 0xffff);
index 8a576b78bee529e30334b28a6c520f5cf7ecb2fd..8ba31cfb90450146d47dd663f060714245a89f14 100644 (file)
@@ -2614,7 +2614,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card,
        ice->dmapath_port = pci_resource_start(pci, 2);
        ice->profi_port = pci_resource_start(pci, 3);
 
-       if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_SHARED,
                        "ICE1712", ice)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_ice1712_free(ice);
index e9cbfdf370590cf78075b5677e26d5666bfc5011..3e3a102e6c34286884476f394a6cb3324586a7fb 100644 (file)
@@ -2253,7 +2253,7 @@ static int __devinit snd_vt1724_create(struct snd_card *card,
        ice->profi_port = pci_resource_start(pci, 1);
 
        if (request_irq(pci->irq, snd_vt1724_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, "ICE1724", ice)) {
+                       IRQF_SHARED, "ICE1724", ice)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_vt1724_free(ice);
                return -EIO;
index 9c1bce7afa867b169a33271b0b053bbce7ebf830..30aaa6092a84433d3c8315617d2bfbbe9bd8898b 100644 (file)
@@ -2509,7 +2509,7 @@ static int intel8x0_resume(struct pci_dev *pci)
        }
        pci_set_master(pci);
        if (request_irq(pci->irq, snd_intel8x0_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, card->shortname, chip)) {
+                       IRQF_SHARED, card->shortname, chip)) {
                printk(KERN_ERR "intel8x0: unable to grab IRQ %d, "
                       "disabling device\n", pci->irq);
                snd_card_disconnect(card);
@@ -2887,7 +2887,7 @@ static int __devinit snd_intel8x0_create(struct snd_card *card,
 
        /* request irq after initializaing int_sta_mask, etc */
        if (request_irq(pci->irq, snd_intel8x0_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, card->shortname, chip)) {
+                       IRQF_SHARED, card->shortname, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_intel8x0_free(chip);
                return -EBUSY;
index bd467c501123f3b3523ce1268c0c7712b381ad9a..09dcf923b5471fdda5015daf25f8b6a4f7a239a2 100644 (file)
@@ -1071,7 +1071,7 @@ static int intel8x0m_resume(struct pci_dev *pci)
        }
        pci_set_master(pci);
        if (request_irq(pci->irq, snd_intel8x0_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED, card->shortname, chip)) {
+                       IRQF_SHARED, card->shortname, chip)) {
                printk(KERN_ERR "intel8x0m: unable to grab IRQ %d, "
                       "disabling device\n", pci->irq);
                snd_card_disconnect(card);
@@ -1205,7 +1205,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
        }
 
  port_inited:
-       if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_SHARED,
                        card->shortname, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_intel8x0_free(chip);
index fa8cd8cecc21ab3691493a7b8da16c72480e1131..345eefeedb394628c9f8ffb224fc54ce278ebb76 100644 (file)
@@ -2233,7 +2233,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
         }
 
         err = request_irq(pci->irq, snd_korg1212_interrupt,
-                          IRQF_DISABLED|IRQF_SHARED,
+                          IRQF_SHARED,
                           "korg1212", korg1212);
 
         if (err) {
index 8cab342bbaaf94f5c0ece3a13e093df9752c831f..6efe6d5ade1e9518673735f7fdfe3f02c79ccb1a 100644 (file)
@@ -2377,7 +2377,7 @@ static int __devinit snd_m3_assp_client_init(struct snd_m3 *chip, struct m3_dma
         * shifted list address is aligned.
         * list address = (mem address >> 1) >> 7;
         */
-       data_bytes = (data_bytes + 255) & ~255;
+       data_bytes = ALIGN(data_bytes, 256);
        address = 0x1100 + ((data_bytes/2) * index);
 
        if ((address + (data_bytes/2)) >= 0x1c00) {
@@ -2762,7 +2762,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
 
        tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip);
 
-       if (request_irq(pci->irq, snd_m3_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_m3_interrupt, IRQF_SHARED,
                        card->driver, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_m3_free(chip);
index 216aee5f93e777fc5a04dab34e77e7eb1a470863..21386da3bc869aab17d446f83310ffb0ee0a5a7a 100644 (file)
@@ -1066,7 +1066,7 @@ static int snd_mixart_free(struct mixart_mgr *mgr)
 
        /* release irq  */
        if (mgr->irq >= 0)
-               free_irq(mgr->irq, (void *)mgr);
+               free_irq(mgr->irq, mgr);
 
        /* reset board if some firmware was loaded */
        if(mgr->dsp_loaded) {
@@ -1319,7 +1319,8 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
                                                   pci_resource_len(pci, i));
        }
 
-       if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_DISABLED|IRQF_SHARED, CARD_NAME, (void *)mgr)) {
+       if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_SHARED,
+                       CARD_NAME, mgr)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_mixart_free(mgr);
                return -EBUSY;
index 945d21bf187ec2251ee601bf53b0a999b4dda620..879e31a9f9c63937cc998cec1c2c7f646a8501ee 100644 (file)
@@ -465,7 +465,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip)
 {
        mutex_lock(&chip->irq_mutex);
        if (chip->irq < 0) {
-               if (request_irq(chip->pci->irq, chip->interrupt, IRQF_DISABLED|IRQF_SHARED,
+               if (request_irq(chip->pci->irq, chip->interrupt, IRQF_SHARED,
                                chip->card->driver, chip)) {
                        snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->pci->irq);
                        mutex_unlock(&chip->irq_mutex);
index 533c672ae8f3fd395b4d96b0c0041917b5654d71..d97413484ae9f80ba547f57ea0e932814524ea6d 100644 (file)
@@ -1250,7 +1250,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
        mgr->pci = pci;
        mgr->irq = -1;
 
-       if (request_irq(pci->irq, pcxhr_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, pcxhr_interrupt, IRQF_SHARED,
                        card_name, mgr)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                pcxhr_free(mgr);
index 56e0c01123e70246433cdb0a34c5fb0459465175..5e1d5d2b285030be51f42d7cee4e3654a20f50b0 100644 (file)
@@ -1899,9 +1899,8 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci,
        hwport = (struct riptideport *)chip->port;
        UNSET_AIE(hwport);
 
-       if (request_irq
-           (pci->irq, snd_riptide_interrupt, IRQF_DISABLED | IRQF_SHARED,
-            "RIPTIDE", chip)) {
+       if (request_irq(pci->irq, snd_riptide_interrupt, IRQF_SHARED,
+                       "RIPTIDE", chip)) {
                snd_printk(KERN_ERR "Riptide: unable to grab IRQ %d\n",
                           pci->irq);
                snd_riptide_free(chip);
index dc8d1302e22ddc3eec6e878b281a5ee98156cac8..6bb7ac650ec42dde1fc8dfb97ff304881bee976c 100644 (file)
@@ -1373,7 +1373,8 @@ static int __devinit snd_rme32_create(struct rme32 * rme32)
                return -ENOMEM;
        }
 
-       if (request_irq(pci->irq, snd_rme32_interrupt, IRQF_DISABLED | IRQF_SHARED, "RME32", (void *) rme32)) {
+       if (request_irq(pci->irq, snd_rme32_interrupt, IRQF_SHARED,
+                       "RME32", rme32)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                return -EBUSY;
        }
index 106110a89a4c5dfa1f5cbbe06e008b54dcc34464..e3304b7ccbcbb1345beefdf1b757214a21ac59f1 100644 (file)
@@ -1587,7 +1587,8 @@ snd_rme96_create(struct rme96 *rme96)
                return -ENOMEM;
        }
 
-       if (request_irq(pci->irq, snd_rme96_interrupt, IRQF_DISABLED|IRQF_SHARED, "RME96", (void *)rme96)) {
+       if (request_irq(pci->irq, snd_rme96_interrupt, IRQF_SHARED,
+                       "RME96", rme96)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                return -EBUSY;
        }
index 694aa057ed496ae476d45cb66e3b58ed37ee26b2..6383987b460e388c6711a4962d8ff04b63f25d70 100644 (file)
@@ -3516,8 +3516,8 @@ static int __devinit snd_hdsp_initialize_memory(struct hdsp *hdsp)
 
        /* Align to bus-space 64K boundary */
 
-       cb_bus = (hdsp->capture_dma_buf.addr + 0xFFFF) & ~0xFFFFl;
-       pb_bus = (hdsp->playback_dma_buf.addr + 0xFFFF) & ~0xFFFFl;
+       cb_bus = ALIGN(hdsp->capture_dma_buf.addr, 0x10000ul);
+       pb_bus = ALIGN(hdsp->playback_dma_buf.addr, 0x10000ul);
 
        /* Tell the card where it is */
 
@@ -4934,13 +4934,14 @@ static int __devinit snd_hdsp_create(struct snd_card *card,
                return -EBUSY;
        }
 
-       if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_DISABLED|IRQF_SHARED, "hdsp", (void *)hdsp)) {
+       if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_SHARED,
+                       "hdsp", hdsp)) {
                snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq);
                return -EBUSY;
        }
 
        hdsp->irq = pci->irq;
-       hdsp->precise_ptr = 1;
+       hdsp->precise_ptr = 0;
        hdsp->use_midi_tasklet = 1;
 
        if ((err = snd_hdsp_initialize_memory(hdsp)) < 0)
index 7055d893855d1df75781a7a77d5d4818e7931ee8..0547f6f04bdceb480eece1fb07351459e2a26761 100644 (file)
@@ -3496,8 +3496,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp
                   hdspm->port + io_extent - 1);
 
        if (request_irq(pci->irq, snd_hdspm_interrupt,
-                       IRQF_DISABLED | IRQF_SHARED, "hdspm",
-                       (void *) hdspm)) {
+                       IRQF_SHARED, "hdspm", hdspm)) {
                snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq);
                return -EBUSY;
        }
index cf0427b4bfdef623da7d41b15d2c16da4bf535ff..cc3bdececce769e8f9e1fb7ab808c4639b1b33d1 100644 (file)
@@ -1827,8 +1827,8 @@ static int __devinit snd_rme9652_initialize_memory(struct snd_rme9652 *rme9652)
 
        /* Align to bus-space 64K boundary */
 
-       cb_bus = (rme9652->capture_dma_buf.addr + 0xFFFF) & ~0xFFFFl;
-       pb_bus = (rme9652->playback_dma_buf.addr + 0xFFFF) & ~0xFFFFl;
+       cb_bus = ALIGN(rme9652->capture_dma_buf.addr, 0x10000ul);
+       pb_bus = ALIGN(rme9652->playback_dma_buf.addr, 0x10000ul);
 
        /* Tell the card where it is */
 
@@ -2500,7 +2500,8 @@ static int __devinit snd_rme9652_create(struct snd_card *card,
                return -EBUSY;
        }
        
-       if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_DISABLED|IRQF_SHARED, "rme9652", (void *)rme9652)) {
+       if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_SHARED,
+                       "rme9652", rme9652)) {
                snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq);
                return -EBUSY;
        }
index f9b8afabda9c8b4ac539e1f1fdf0f0f97c695e53..9f25d93cbec22fc7798ae650c4fe4c948fc609ce 100644 (file)
@@ -1195,7 +1195,7 @@ static int snd_sonicvibes_free(struct sonicvibes *sonic)
        pci_write_config_dword(sonic->pci, 0x40, sonic->dmaa_port);
        pci_write_config_dword(sonic->pci, 0x48, sonic->dmac_port);
        if (sonic->irq >= 0)
-               free_irq(sonic->irq, (void *)sonic);
+               free_irq(sonic->irq, sonic);
        release_and_free_resource(sonic->res_dmaa);
        release_and_free_resource(sonic->res_dmac);
        pci_release_regions(sonic->pci);
@@ -1257,7 +1257,8 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card,
        sonic->midi_port = pci_resource_start(pci, 3);
        sonic->game_port = pci_resource_start(pci, 4);
 
-       if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_DISABLED|IRQF_SHARED, "S3 SonicVibes", (void *)sonic)) {
+       if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_SHARED,
+                       "S3 SonicVibes", sonic)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_sonicvibes_free(sonic);
                return -EBUSY;
index 1fbc4321122f64caed4552487d3af2631fa7397f..474f2d451ae800dca606c003fc7e3ed1b2fd22b5 100644 (file)
@@ -3380,8 +3380,8 @@ static int __devinit snd_trident_tlb_alloc(struct snd_trident *trident)
                snd_printk(KERN_ERR "trident: unable to allocate TLB buffer\n");
                return -ENOMEM;
        }
-       trident->tlb.entries = (unsigned int*)(((unsigned long)trident->tlb.buffer.area + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1));
-       trident->tlb.entries_dmaaddr = (trident->tlb.buffer.addr + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1);
+       trident->tlb.entries = (unsigned int*)ALIGN((unsigned long)trident->tlb.buffer.area, SNDRV_TRIDENT_MAX_PAGES * 4);
+       trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4);
        /* allocate shadow TLB page table (virtual addresses) */
        trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long));
        if (trident->tlb.shadow_entries == NULL) {
@@ -3608,7 +3608,7 @@ int __devinit snd_trident_create(struct snd_card *card,
        }
        trident->port = pci_resource_start(pci, 0);
 
-       if (request_irq(pci->irq, snd_trident_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_trident_interrupt, IRQF_SHARED,
                        "Trident Audio", trident)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_trident_free(trident);
index 92b0736c0fdbf244591daa7a39746eb6e763813e..a572b018807fff08d52efd5686349a8fc7bd8aa7 100644 (file)
@@ -2307,7 +2307,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card,
        if (request_irq(pci->irq,
                        chip_type == TYPE_VIA8233 ?
                        snd_via8233_interrupt : snd_via686_interrupt,
-                       IRQF_DISABLED|IRQF_SHARED,
+                       IRQF_SHARED,
                        card->driver, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_via82xx_free(chip);
@@ -2366,7 +2366,7 @@ struct dxs_whitelist {
 
 static int __devinit check_dxs_list(struct pci_dev *pci, int revision)
 {
-       static struct dxs_whitelist whitelist[] = {
+       static struct dxs_whitelist whitelist[] __devinitdata = {
                { .subvendor = 0x1005, .subdevice = 0x4710, .action = VIA_DXS_ENABLE }, /* Avance Logic Mobo */
                { .subvendor = 0x1019, .subdevice = 0x0996, .action = VIA_DXS_48K },
                { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */
@@ -2427,7 +2427,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci, int revision)
                { .subvendor = 0x4005, .subdevice = 0x4710, .action = VIA_DXS_SRC },    /* MSI K7T266 Pro2 (MS-6380 V2.0) BIOS 3.7 */
                { } /* terminator */
        };
-       struct dxs_whitelist *w;
+       const struct dxs_whitelist *w;
        unsigned short subsystem_vendor;
        unsigned short subsystem_device;
 
index feb27c966256a7df4247aed74fd564d0ebed0a13..17d6b847585f5663114a52bd318cc4456553aa5e 100644 (file)
@@ -1124,7 +1124,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card,
                return err;
        }
        chip->port = pci_resource_start(pci, 0);
-       if (request_irq(pci->irq, snd_via82xx_interrupt, IRQF_DISABLED|IRQF_SHARED,
+       if (request_irq(pci->irq, snd_via82xx_interrupt, IRQF_SHARED,
                        card->driver, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_via82xx_free(chip);
index af49e8aabf5529331876b4d9e543586cf9854735..89f58ea180b3a79dedea5700f409c52cf8d203ee 100644 (file)
@@ -169,8 +169,8 @@ static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci
        for (i = 0; i < 2; i++)
                vx->port[i] = pci_resource_start(pci, i + 1);
 
-       if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_DISABLED|IRQF_SHARED,
-                       CARD_NAME, (void *) chip)) {
+       if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_SHARED,
+                       CARD_NAME, chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_vx222_free(chip);
                return -EBUSY;
index 186453f7abe700a818df68f32d1a9b73bb055798..fd9b7b83a88430ac90842a21bfcf8a64d280d9b5 100644 (file)
@@ -49,7 +49,6 @@ static long mpu_port[SNDRV_CARDS];
 static long joystick_port[SNDRV_CARDS];
 #endif
 static int rear_switch[SNDRV_CARDS];
-static int rear_swap[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 1 };
 
 module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, "Index value for the Yamaha DS-1 PCI soundcard.");
@@ -67,8 +66,6 @@ MODULE_PARM_DESC(joystick_port, "Joystick port address");
 #endif
 module_param_array(rear_switch, bool, NULL, 0444);
 MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch");
-module_param_array(rear_swap, bool, NULL, 0444);
-MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output");
 
 static struct pci_device_id snd_ymfpci_ids[] = {
         { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* YMF724 */
@@ -298,7 +295,7 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
                snd_card_free(card);
                return err;
        }
-       if ((err = snd_ymfpci_mixer(chip, rear_switch[dev], rear_swap[dev])) < 0) {
+       if ((err = snd_ymfpci_mixer(chip, rear_switch[dev])) < 0) {
                snd_card_free(card);
                return err;
        }
index a40c1085fd208a852391a4e92f45ec8666b34252..7881944a19576d56345d3440fb40ff26863bd3e3 100644 (file)
@@ -910,7 +910,7 @@ static int snd_ymfpci_playback_open(struct snd_pcm_substream *substream)
        ypcm = runtime->private_data;
        ypcm->output_front = 1;
        ypcm->output_rear = chip->mode_dup4ch ? 1 : 0;
-       ypcm->swap_rear = chip->rear_swap;
+       ypcm->swap_rear = 0;
        spin_lock_irq(&chip->reg_lock);
        if (ypcm->output_rear) {
                ymfpci_open_extension(chip);
@@ -936,6 +936,7 @@ static int snd_ymfpci_playback_spdif_open(struct snd_pcm_substream *substream)
        ypcm = runtime->private_data;
        ypcm->output_front = 0;
        ypcm->output_rear = 1;
+       ypcm->swap_rear = 1;
        spin_lock_irq(&chip->reg_lock);
        snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTCTRL,
                          snd_ymfpci_readw(chip, YDSXGR_SPDIFOUTCTRL) | 2);
@@ -963,6 +964,7 @@ static int snd_ymfpci_playback_4ch_open(struct snd_pcm_substream *substream)
        ypcm = runtime->private_data;
        ypcm->output_front = 0;
        ypcm->output_rear = 1;
+       ypcm->swap_rear = 0;
        spin_lock_irq(&chip->reg_lock);
        ymfpci_open_extension(chip);
        chip->rear_opened++;
@@ -1755,7 +1757,7 @@ static void snd_ymfpci_mixer_free_ac97(struct snd_ac97 *ac97)
        chip->ac97 = NULL;
 }
 
-int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch, int rear_swap)
+int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch)
 {
        struct snd_ac97_template ac97;
        struct snd_kcontrol *kctl;
@@ -1767,7 +1769,6 @@ int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch, int rea
                .read = snd_ymfpci_codec_read,
        };
 
-       chip->rear_swap = rear_swap;
        if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0)
                return err;
        chip->ac97_bus->private_free = snd_ymfpci_mixer_free_ac97_bus;
@@ -2025,10 +2026,10 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
        chip->bank_size_effect = snd_ymfpci_readl(chip, YDSXGR_EFFCTRLSIZE) << 2;
        chip->work_size = YDSXG_DEFAULT_WORK_SIZE;
        
-       size = ((playback_ctrl_size + 0x00ff) & ~0x00ff) +
-              ((chip->bank_size_playback * 2 * YDSXG_PLAYBACK_VOICES + 0x00ff) & ~0x00ff) +
-              ((chip->bank_size_capture * 2 * YDSXG_CAPTURE_VOICES + 0x00ff) & ~0x00ff) +
-              ((chip->bank_size_effect * 2 * YDSXG_EFFECT_VOICES + 0x00ff) & ~0x00ff) +
+       size = ALIGN(playback_ctrl_size, 0x100) +
+              ALIGN(chip->bank_size_playback * 2 * YDSXG_PLAYBACK_VOICES, 0x100) +
+              ALIGN(chip->bank_size_capture * 2 * YDSXG_CAPTURE_VOICES, 0x100) +
+              ALIGN(chip->bank_size_effect * 2 * YDSXG_EFFECT_VOICES, 0x100) +
               chip->work_size;
        /* work_ptr must be aligned to 256 bytes, but it's already
           covered with the kernel page allocation mechanism */
@@ -2043,8 +2044,8 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
        chip->bank_base_playback_addr = ptr_addr;
        chip->ctrl_playback = (u32 *)ptr;
        chip->ctrl_playback[0] = cpu_to_le32(YDSXG_PLAYBACK_VOICES);
-       ptr += (playback_ctrl_size + 0x00ff) & ~0x00ff;
-       ptr_addr += (playback_ctrl_size + 0x00ff) & ~0x00ff;
+       ptr += ALIGN(playback_ctrl_size, 0x100);
+       ptr_addr += ALIGN(playback_ctrl_size, 0x100);
        for (voice = 0; voice < YDSXG_PLAYBACK_VOICES; voice++) {
                chip->voices[voice].number = voice;
                chip->voices[voice].bank = (struct snd_ymfpci_playback_bank *)ptr;
@@ -2055,8 +2056,8 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
                        ptr_addr += chip->bank_size_playback;
                }
        }
-       ptr = (char *)(((unsigned long)ptr + 0x00ff) & ~0x00ff);
-       ptr_addr = (ptr_addr + 0x00ff) & ~0x00ff;
+       ptr = (char *)ALIGN((unsigned long)ptr, 0x100);
+       ptr_addr = ALIGN(ptr_addr, 0x100);
        chip->bank_base_capture = ptr;
        chip->bank_base_capture_addr = ptr_addr;
        for (voice = 0; voice < YDSXG_CAPTURE_VOICES; voice++)
@@ -2065,8 +2066,8 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
                        ptr += chip->bank_size_capture;
                        ptr_addr += chip->bank_size_capture;
                }
-       ptr = (char *)(((unsigned long)ptr + 0x00ff) & ~0x00ff);
-       ptr_addr = (ptr_addr + 0x00ff) & ~0x00ff;
+       ptr = (char *)ALIGN((unsigned long)ptr, 0x100);
+       ptr_addr = ALIGN(ptr_addr, 0x100);
        chip->bank_base_effect = ptr;
        chip->bank_base_effect_addr = ptr_addr;
        for (voice = 0; voice < YDSXG_EFFECT_VOICES; voice++)
@@ -2075,8 +2076,8 @@ static int __devinit snd_ymfpci_memalloc(struct snd_ymfpci *chip)
                        ptr += chip->bank_size_effect;
                        ptr_addr += chip->bank_size_effect;
                }
-       ptr = (char *)(((unsigned long)ptr + 0x00ff) & ~0x00ff);
-       ptr_addr = (ptr_addr + 0x00ff) & ~0x00ff;
+       ptr = (char *)ALIGN((unsigned long)ptr, 0x100);
+       ptr_addr = ALIGN(ptr_addr, 0x100);
        chip->work_base = ptr;
        chip->work_base_addr = ptr_addr;
        
@@ -2153,7 +2154,7 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
                snd_dma_free_pages(&chip->work_ptr);
        
        if (chip->irq >= 0)
-               free_irq(chip->irq, (void *)chip);
+               free_irq(chip->irq, chip);
        release_and_free_resource(chip->res_reg_area);
 
        pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);
@@ -2290,7 +2291,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
        chip->pci = pci;
        chip->irq = -1;
        chip->device_id = pci->device;
-       pci_read_config_byte(pci, PCI_REVISION_ID, (u8 *)&chip->rev);
+       pci_read_config_byte(pci, PCI_REVISION_ID, &chip->rev);
        chip->reg_area_phys = pci_resource_start(pci, 0);
        chip->reg_area_virt = ioremap_nocache(chip->reg_area_phys, 0x8000);
        pci_set_master(pci);
@@ -2300,7 +2301,8 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
                snd_ymfpci_free(chip);
                return -EBUSY;
        }
-       if (request_irq(pci->irq, snd_ymfpci_interrupt, IRQF_DISABLED|IRQF_SHARED, "YMFPCI", (void *) chip)) {
+       if (request_irq(pci->irq, snd_ymfpci_interrupt, IRQF_SHARED,
+                       "YMFPCI", chip)) {
                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
                snd_ymfpci_free(chip);
                return -EBUSY;
@@ -2322,7 +2324,6 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
                return -EIO;
        }
 
-       chip->rear_swap = 1;
        if ((err = snd_ymfpci_ac3_init(chip)) < 0) {
                snd_ymfpci_free(chip);
                return err;
index 67202b9eeb77c09bf4c3d10fb372c5582e92394c..3d7f36fb4cf02b514a9599cbf8db64adb1cfa8b6 100644 (file)
@@ -3577,8 +3577,7 @@ static int __init snd_usb_audio_init(void)
                printk(KERN_WARNING "invalid nrpacks value.\n");
                return -EINVAL;
        }
-       usb_register(&usb_audio_driver);
-       return 0;
+       return usb_register(&usb_audio_driver);
 }